From abdd9934f6cecc15461cd9d1d0e170aa95c58e2c Mon Sep 17 00:00:00 2001 From: satabol Date: Fri, 17 Nov 2023 22:29:52 +0300 Subject: [PATCH] fix #5064. Matrix In Recreate operator exception. Fixed - fix SvMatrixInNodeMK3 migrate_from - fix SvMatrixInNodeMK4 migrate_from --- nodes/matrix/matrix_in_mk4.py | 2 +- old_nodes/matrix_in_mk3.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/nodes/matrix/matrix_in_mk4.py b/nodes/matrix/matrix_in_mk4.py index 7b37dfddbb..0ce7378025 100644 --- a/nodes/matrix/matrix_in_mk4.py +++ b/nodes/matrix/matrix_in_mk4.py @@ -184,7 +184,7 @@ def migrate_from(self, old_node): self.angle_units = AngleUnits.DEGREES self.last_angle_units = AngleUnits.DEGREES - elif old_node.bl_idname == "SvMatrixInNodeMK4": + elif old_node.bl_idname == "SvMatrixInNodeMK3": self.rotation_mode = old_node.mode def sv_init(self, context): diff --git a/old_nodes/matrix_in_mk3.py b/old_nodes/matrix_in_mk3.py index cf7671f07d..1fe2778831 100644 --- a/old_nodes/matrix_in_mk3.py +++ b/old_nodes/matrix_in_mk3.py @@ -165,10 +165,11 @@ def update_angle(self, context): def migrate_from(self, old_node): ''' Migration from MK2 (attributes mapping) ''' - self.location_ = old_node.l_ - self.scale = old_node.s_ - self.axis = old_node.r_ - self.angle = old_node.a_ + if old_node.bl_idname == "SvMatrixGenNodeMK2": + self.location_ = old_node.l_ + self.scale = old_node.s_ + self.axis = old_node.r_ + self.angle = old_node.a_ def sv_init(self, context):