Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix out format fix #4003

Merged
merged 2 commits into from
Mar 31, 2021
Merged

Conversation

vicdoval
Copy link
Collaborator

Format fix for matrix_out mk2.
Flat Quaternions Output option to keep them in the original format that can be disabled or wont be used when inputing list of list of matrices

image

also in this PR:

a method added to the nodes to assing properties to the input sockets via dictionary, (suggestion from @zeffii)
now you can use as example:
self.sv_new_input('SvVerticesSocket', 'Vectors', dict(prop_name='Vector', is_madatory=True))

  • Ready for merge.

node_tree.py Outdated
@@ -322,6 +322,11 @@ def init(self, context):
sys.stderr.write('ERROR: %s\n' % str(err))
self.set_color()

def sv_new_input(self, socket_type, name, attrib_dict):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def sv_new_input(self, socket_type, name, attrib_dict):
def sv_new_input(self, socket_type, name, **attrib_dict):

As to me it would be a little bit more flexible.
It will be still possible to use dictionary self.sv_new_input(**{'attribute': value})
and in the same time you have option to pass attributes as normal parameters self.sv_new_input(attribute=value)

@@ -80,7 +85,7 @@ def update_mode(self, context):
items=mode_items, default="AXISANGLE", update=update_mode)

def sv_init(self, context):
self.inputs.new('SvMatrixSocket', "Matrix").is_mandatory =True
self.sv_new_input('SvMatrixSocket', "Matrix", dict(is_mandatory=True, nesting_level=2))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.sv_new_input('SvMatrixSocket', "Matrix", dict(is_mandatory=True, nesting_level=2))
self.sv_new_input('SvMatrixSocket', "Matrix", is_mandatory=True, nesting_level=2)

I see this as more convenient API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants