diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-03-13 19:27:54 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-03-13 19:27:54 +0400 |
commit | 6d070e47c1862b76a0e0b56ee697c8828a15b866 (patch) | |
tree | 3a1af5ef93e1aac2ec2e735625d025df4514d23f /source/blender/editors/transform | |
parent | 1d9b80fc3b89dee028ae28e9e63c0f2b91851fbf (diff) |
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. :/
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 968e1ec94d0..bea1f9da057 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1861,8 +1861,15 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op) //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) { |