[Bf-blender-cvs] [2eafae4e393] master: Fix T71295: Duplicate macro faulty after rotation

Stanislav Blinov noreply at git.blender.org
Thu Jan 9 13:02:34 CET 2020


Commit: 2eafae4e393d508d59ff5ab81072e61360c81e6f
Author: Stanislav Blinov
Date:   Thu Jan 9 09:01:06 2020 -0300
Branches: master
https://developer.blender.org/rB2eafae4e393d508d59ff5ab81072e61360c81e6f

Fix T71295: Duplicate macro faulty after rotation

As per T71295, the "duplicate+move" macro fails to store TRANSFORM_OT_translate properties once it's been used with rotation. I believe this is due to it being re-initialized with incorrect properties, reading bogus values from stored TRANSFORM_OT_rotate properties.

Force storing of actual operator id name instead of one defined in the macro, which in turn forces a name mismatch on initialization.

Reviewed By: #modeling, campbellbarton

Maniphest Tasks: T71295

Differential Revision: https://developer.blender.org/D6413

===================================================================

M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 947babea24f..98ed908377c 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1363,7 +1363,7 @@ bool WM_operator_last_properties_store(wmOperator *op)
               IDP_GROUP, &(IDPropertyTemplate){0}, "wmOperatorProperties");
         }
         IDProperty *idp_macro = IDP_CopyProperty(opm->properties);
-        STRNCPY(idp_macro->name, opm->idname);
+        STRNCPY(idp_macro->name, opm->type->idname);
         IDP_ReplaceInGroup(op->type->last_properties, idp_macro);
       }
     }



More information about the Bf-blender-cvs mailing list