diff options
author | Anthony Edlin <akrashe@gmail.com> | 2014-09-10 13:59:21 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-09-10 14:06:22 +0400 |
commit | 1811ffff5d8cad4fea0f34fd7ee86e8726536137 (patch) | |
tree | 99c53459399a904f88f81d4cf5ad7f0992fc4a26 /source/blender/editors/transform | |
parent | 9871788a156a6cae711e0ac0e1953ad86df2e4a4 (diff) |
Fix T41112: Rotate manipulator (Trackball) + release confirm not working?
Usual same issue (unset property != set property to default value).
Review and minor edits by mont29 (Bastien Montagne).
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 2daaa102ea9..2161e52d7b2 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1886,11 +1886,14 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op) else if (drawflags == MAN_ROT_T) { /* trackball need special case, init is different */ /* 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... */ + /* However, we need to copy the "release_confirm" property, but only if defined, see T41112. */ PointerRNA props_ptr; + PropertyRNA *prop; wmOperatorType *ot = WM_operatortype_find("TRANSFORM_OT_trackball", true); WM_operator_properties_create_ptr(&props_ptr, ot); - RNA_boolean_set(&props_ptr, "release_confirm", RNA_boolean_get(op->ptr, "release_confirm")); + if ((prop = RNA_struct_find_property(op->ptr, "release_confirm")) && RNA_property_is_set(op->ptr, prop)) { + RNA_property_boolean_set(&props_ptr, prop, RNA_property_boolean_get(op->ptr, prop)); + } WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, &props_ptr); //wm_operator_invoke(C, WM_operatortype_find(ot->idname, 0), event, NULL, NULL, false); WM_operator_properties_free(&props_ptr); |