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-01-24 15:29:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-24 15:29:17 +0300
commita47a7f2a7beb0e17d903e058b791aa6eae96bf55 (patch)
treefb28767bf2b0d8d0087b5c6337694bb05b2e41db /source/blender/editors/space_view3d
parentd8b5b4b7b1cdd3f605bec40f33b3fa9dd5886c04 (diff)
Manipulator: add show_drag option for 2d buttons
Needed so 3d navigation buttons can show show drag cursor only for buttons with modal operators.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_navigate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_navigate.c b/source/blender/editors/space_view3d/view3d_manipulator_navigate.c
index 4b873107911..49e7f42d715 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_navigate.c
@@ -224,6 +224,15 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmManipulatorG
RNA_enum_set(ptr, "type", RV3D_VIEW_CAMERA);
}
+ /* Click only buttons (not modal). */
+ {
+ int mpr_ids[] = {MPR_PERSP, MPR_ORTHO, MPR_CAMERA};
+ for (int i = 0; i < ARRAY_SIZE(mpr_ids); i++) {
+ wmManipulator *mpr = navgroup->mpr_array[mpr_ids[i]];
+ RNA_boolean_set(mpr->ptr, "show_drag", false);
+ }
+ }
+
{
wmManipulator *mpr = navgroup->mpr_array[MPR_ROTATE];
mpr->scale_basis = MANIPULATOR_SIZE / 2;