diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-03 10:55:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-03 10:57:00 +0300 |
commit | fe8fcb4343a5da4ec97db697a70afe423898e833 (patch) | |
tree | 76ffea09718b7d3d62af922ee83a94545448ca24 /source/blender/editors/manipulator_library | |
parent | c27446b5a0077cd7c69a27b88a3efdc93920dfb9 (diff) |
Manipulator: render border widget
Note there are issues clamping & updating,
will resolve as part of changes to cage2d widget.
Diffstat (limited to 'source/blender/editors/manipulator_library')
3 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/manipulator_library/manipulator_library_utils.c b/source/blender/editors/manipulator_library/manipulator_library_utils.c index f49b0044273..e0e326a2b2f 100644 --- a/source/blender/editors/manipulator_library/manipulator_library_utils.c +++ b/source/blender/editors/manipulator_library/manipulator_library_utils.c @@ -126,9 +126,13 @@ void manipulator_property_data_update( if (constrained) { if ((data->flag & MANIPULATOR_CUSTOM_RANGE_SET) == 0) { float range[2]; - WM_manipulator_target_property_range_get(mpr, mpr_prop, range); - data->range = range[1] - range[0]; - data->min = range[0]; + if (WM_manipulator_target_property_range_get(mpr, mpr_prop, range)) { + data->range = range[1] - range[0]; + data->min = range[0]; + } + else { + BLI_assert(0); + } } data->offset = manipulator_offset_from_value_constr(data->range_fac, data->min, data->range, value, inverted); } diff --git a/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c index 0f33a6abe09..dbfac595fc1 100644 --- a/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c +++ b/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c @@ -579,9 +579,10 @@ static void manipulator_rect_transform_modal( wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "scale"); if (mpr_prop->type != NULL) { float range[2]; - WM_manipulator_target_property_range_get(mpr, mpr_prop, range); - CLAMP(scale[0], range[0], range[1]); - CLAMP(scale[1], range[0], range[1]); + if (WM_manipulator_target_property_range_get(mpr, mpr_prop, range)) { + CLAMP(scale[0], range[0], range[1]); + CLAMP(scale[1], range[0], range[1]); + } } } diff --git a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c index 152595eea38..2b7864b0a4c 100644 --- a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c +++ b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c @@ -141,6 +141,7 @@ static void grab3d_draw_intern( float col[4]; BLI_assert(CTX_wm_area(C)->spacetype == SPACE_VIEW3D); + UNUSED_VARS_NDEBUG(C); manipulator_color_get(mpr, highlight, col); |