Revision: 55245
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55245
Author:   mont29
Date:     2013-03-13 15:27:54 +0000 (Wed, 13 Mar 2013)
Log Message:
-----------
Fix [#34621] I18n Switch Issue When Gimbal and Rotation Manipulator On.

Real issue was that transform manipulators' code was calling 
TRANSFORM_OT_trackball with data (PointerRNA) from VIEW3D_OT_manipulator. That 
op has constraints props, while trackball has not. This created some kind of 
"ghost" properties, that showed up in redo panel.

Why this only segfaults in BLF_pgettext in 32bit builds remains a deep mystery 
(currently dusting out my 32 vbox to try to understand it...). BLF_pgettext is 
supposed to be pretty secure. :/

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform_manipulator.c

Modified: trunk/blender/source/blender/editors/transform/transform_manipulator.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_manipulator.c      
2013-03-13 15:11:45 UTC (rev 55244)
+++ trunk/blender/source/blender/editors/transform/transform_manipulator.c      
2013-03-13 15:27:54 UTC (rev 55245)
@@ -1861,8 +1861,15 @@
                        //wm_operator_invoke(C, 
WM_operatortype_find("TRANSFORM_OT_resize", 0), event, op->ptr, NULL, FALSE);
                }
                else if (drawflags == MAN_ROT_T) { /* trackball need special 
case, init is different */
-                       WM_operator_name_call(C, "TRANSFORM_OT_trackball", 
WM_OP_INVOKE_DEFAULT, op->ptr);
-                       //wm_operator_invoke(C, 
WM_operatortype_find("TRANSFORM_OT_trackball", 0), event, op->ptr, NULL, FALSE);
+                       /* Do not pass op->ptr!!! trackball has no "constraint" 
properties!
+                        * See [#34621], it's a miracle it did not cause more 
problems!!! */
+                       /* However, we need to copy the "release_confirm" 
property... */
+                       PointerRNA props_ptr;
+                       WM_operator_properties_create(&props_ptr, 
"TRANSFORM_OT_trackball");
+                       RNA_boolean_set(&props_ptr, "release_confirm", 
RNA_boolean_get(op->ptr, "release_confirm"));
+
+                       WM_operator_name_call(C, "TRANSFORM_OT_trackball", 
WM_OP_INVOKE_DEFAULT, &props_ptr);
+                       //wm_operator_invoke(C, 
WM_operatortype_find("TRANSFORM_OT_trackball", 0), event, NULL, NULL, FALSE);
                }
                else if (drawflags & MAN_ROT_C) {
                        switch (drawflags) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to