-
Notifications
You must be signed in to change notification settings - Fork 233
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
Add new Combinatorics node (WIP) #2346
Conversation
The combinatoric operations implemented so far, based on itertools module are: PRODUCT PERMUTATION COMBINATION
nodes/list_mutators/combinatorics.py
Outdated
|
||
self.outputs.new('StringsSocket', "Result") | ||
|
||
self.operation = "PRODUCT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is already set in the EnumProperty default. If you are doing this just to trigger update_operation, just call it straight up.
- self.operation = "PRODUCT"
+ self.update_operation(context)
if you really need to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. I did add the default value to the enum after I had added the above code in sv_init :)
If there are no objections, comments, suggestions.. this node should be ready to land. |
Btw, currently the node is placed in the BETA section of the index.md... (though its node/doc file location is in List Mutator). If appropriate I can move it to the List Mutator in the index as well, unless it is recommended to keep it in beta for now until it is further beta tested by users. |
279d945
to
321544a
Compare
def update(self): | ||
''' Add/remove sockets as A-Z sockets are connected/disconnected ''' | ||
|
||
# not a multiple quaternion operation ? => no need to update sockets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which quaternions?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops. cut and paste :)
The combinatoric operations implemented so far (based on itertools module) are:
PRODUCT
PERMUTATIONS
COMBINATIONS
The node is vectorized and works with lists of any type.
Node UI:
Product operation:
note: The example shows the product of 3 different lists (numbers, strings and vertices).
Permutations operation (with vectorization):
Combinations operation (with vectorization):