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

fix #5049. Logic Functions cannot recreate node #5050

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

satabol
Copy link
Collaborator

@satabol satabol commented Nov 5, 2023

fix #5049. Logic Functions cannot recreate node. Fixed

image

New node created with all settings of old node.

@satabol satabol requested a review from Durman November 5, 2023 23:36
nodes/logic/logic_node.py Outdated Show resolved Hide resolved
@@ -118,13 +118,47 @@ def rclick_menu(self, context, layout):
layout.prop(self, "output_numpy", expand=False)

def migrate_from(self, old_node):
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, fixed.

Copy link
Collaborator

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.

@satabol satabol requested a review from Durman November 8, 2023 17:42
@zeffii
Copy link
Collaborator

zeffii commented Nov 21, 2023

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
Copy link
Collaborator

@zeffii zeffii Nov 21, 2023

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.

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.

Logic Functions cannot recreate node
3 participants