-
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
fix #5049. Logic Functions cannot recreate node #5050
base: master
Are you sure you want to change the base?
Conversation
@@ -118,13 +118,47 @@ def rclick_menu(self, context, layout): | |||
layout.prop(self, "output_numpy", expand=False) | |||
|
|||
def migrate_from(self, old_node): |
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.
I think I would prefer like this:
def migrate_from(self, old_node):
if old_node.bl_idname == 'SvLogicNodeMK2':
return
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.
Ok, fixed.
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.
I meant that this is the only changes which are required for the node to work properly.
- Refactor migrate_from
merge this if it works |
elif old_node_input_B and hasattr(old_node_input_B, 'default_property_type'): | ||
self.inputs['B'].default_property_type = old_node_input_B.default_property_type | ||
self.inputs['B'].use_prop = True # like sv_init | ||
self.inputs['B'].show_property_type = True |
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.
wow, these 40 lines are painful :) .. but if it must be so.
fix #5049. Logic Functions cannot recreate node. Fixed
New node created with all settings of old node.