Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-12-03 04:55:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-03 04:55:55 +0300
commit4978ef5ed5990df2d8aaf287379c0dec8d9fb251 (patch)
tree4536ba6359686cc231ba58556f603123d1334fe5 /source/blender/editors/gizmo_library
parenta205493426bee2c604cb7160465138db711efaba (diff)
Fix T58573: Camera lens gizmo error on click
Diffstat (limited to 'source/blender/editors/gizmo_library')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
index 4e41f95a063..1e39e1cca52 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
@@ -379,7 +379,11 @@ static void gizmo_arrow_exit(bContext *C, wmGizmo *gz, const bool cancel)
/* Assign incase applying the opetration needs an updated offset
* editmesh bisect needs this. */
if (is_prop_valid) {
- data->offset = WM_gizmo_target_property_float_get(gz, gz_prop);
+ const int transform_flag = RNA_enum_get(arrow->gizmo.ptr, "transform");
+ const bool constrained = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_CONSTRAINED) != 0;
+ const bool inverted = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_INVERTED) != 0;
+ const float value = WM_gizmo_target_property_float_get(gz, gz_prop);
+ data->offset = gizmo_offset_from_value(data, value, constrained, inverted);
}
return;
}