diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-05 15:24:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-05 15:54:52 +0300 |
commit | 2891fb645b95ca45ee5ace1d51221e5b3ea52dae (patch) | |
tree | 7a375d7b3b16afa2337c3546d871a335785b48d2 /source/blender/editors/space_view3d | |
parent | 24bd483ee1551e2fb1dadea9fada98045700b5b2 (diff) |
3D View: disable manipulators & text w/o overlay
Manipulators which aren't explicitly activated via tools are now hidden.
Tool manipulators are kept because it doesn't make sense to interact
with a tool with hidden manipulators.
Diffstat (limited to 'source/blender/editors/space_view3d')
7 files changed, 52 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 5cd36cce31c..e199e84029e 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1203,11 +1203,15 @@ void view3d_draw_region_info(const bContext *C, ARegion *ar, const int offset) BLF_batch_draw_begin(); - if (U.uiflag & USER_SHOW_ROTVIEWICON) { + if (((U.uiflag & USER_SHOW_ROTVIEWICON) != 0) && + (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) + { draw_view_axis(rv3d, &rect); } - if ((v3d->overlay.flag & V3D_OVERLAY_HIDE_TEXT) == 0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0 && + (v3d->overlay.flag & V3D_OVERLAY_HIDE_TEXT) == 0) + { if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) { ED_scene_draw_fps(scene, &rect); } diff --git a/source/blender/editors/space_view3d/view3d_manipulator_armature.c b/source/blender/editors/space_view3d/view3d_manipulator_armature.c index 5d3d88ff2a2..abbd6c888b2 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_armature.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_armature.c @@ -134,7 +134,10 @@ static bool WIDGETGROUP_armature_spline_poll(const bContext *C, wmManipulatorGro const bArmature *arm = ob->data; if (arm->drawtype == ARM_B_BONE) { if (arm->act_bone && arm->act_bone->segments > 1) { - return true; + View3D *v3d = CTX_wm_view3d(C); + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { + return true; + } } } } diff --git a/source/blender/editors/space_view3d/view3d_manipulator_camera.c b/source/blender/editors/space_view3d/view3d_manipulator_camera.c index b680818dc14..00b47a516c1 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_camera.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_camera.c @@ -63,12 +63,17 @@ struct CameraWidgetGroup { static bool WIDGETGROUP_camera_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + Object *ob = CTX_data_active_object(C); if (ob && ob->type == OB_CAMERA) { Camera *camera = ob->data; /* TODO: support overrides. */ if (camera->id.lib == NULL) { - return true; + return false; } } return false; @@ -352,9 +357,13 @@ static bool WIDGETGROUP_camera_view_poll(const bContext *C, wmManipulatorGroupTy } } + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + ARegion *ar = CTX_wm_region(C); RegionView3D *rv3d = ar->regiondata; - View3D *v3d = CTX_wm_view3d(C); if (rv3d->persp == RV3D_CAMOB) { if (scene->r.mode & R_BORDER) { /* TODO: support overrides. */ diff --git a/source/blender/editors/space_view3d/view3d_manipulator_empty.c b/source/blender/editors/space_view3d/view3d_manipulator_empty.c index 1d56c5ee7f4..75e4a9e3314 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_empty.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_empty.c @@ -106,6 +106,11 @@ static void manipulator_empty_image_prop_matrix_set( static bool WIDGETGROUP_empty_image_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + Object *ob = CTX_data_active_object(C); if (ob && ob->type == OB_EMPTY) { diff --git a/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c b/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c index e76be448be4..2a1fdee8e8a 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c @@ -54,6 +54,11 @@ static bool WIDGETGROUP_forcefield_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + Object *ob = CTX_data_active_object(C); return (ob && ob->pd && ob->pd->forcefield); diff --git a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c index 88c36fc2c0b..01c38cfd899 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c @@ -54,6 +54,11 @@ static bool WIDGETGROUP_lamp_spot_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + Object *ob = CTX_data_active_object(C); if (ob && ob->type == OB_LAMP) { @@ -151,8 +156,12 @@ static void manipulator_area_lamp_prop_matrix_set( static bool WIDGETGROUP_lamp_area_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { - Object *ob = CTX_data_active_object(C); + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + Object *ob = CTX_data_active_object(C); if (ob && ob->type == OB_LAMP) { Lamp *la = ob->data; return (la->type == LA_AREA); @@ -226,6 +235,11 @@ void VIEW3D_WGT_lamp_area(wmManipulatorGroupType *wgt) static bool WIDGETGROUP_lamp_target_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + Object *ob = CTX_data_active_object(C); if (ob != NULL) { diff --git a/source/blender/editors/space_view3d/view3d_manipulator_navigate.c b/source/blender/editors/space_view3d/view3d_manipulator_navigate.c index d86c6595bfa..c869e23d552 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_navigate.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_navigate.c @@ -176,8 +176,13 @@ struct NavigateWidgetGroup { int region_size[2]; }; -static bool WIDGETGROUP_navigate_poll(const bContext *UNUSED(C), wmManipulatorGroupType *UNUSED(wgt)) +static bool WIDGETGROUP_navigate_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { + View3D *v3d = CTX_wm_view3d(C); + if (v3d->flag2 & V3D_RENDER_OVERRIDE) { + return false; + } + if (U.manipulator_flag & USER_MANIPULATOR_DRAW_NAVIGATE) { return true; } |