diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-03-21 09:26:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-03-21 09:26:58 +0300 |
commit | f3efa2526d86bcc398931a4b148549225ce8123b (patch) | |
tree | 277d30b29947328fccc009867c86e20ec977fd8c /source/blender/editors/space_view3d/view3d_manipulator_camera.c | |
parent | 7701f9e35c524fb3fb4ba9164b701dfcca7f80ec (diff) |
Fix T54366: Custom manipulator acts on linked data
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_manipulator_camera.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_manipulator_camera.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_camera.c b/source/blender/editors/space_view3d/view3d_manipulator_camera.c index 6a45ec5095f..3c826c69f3c 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_camera.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_camera.c @@ -64,8 +64,14 @@ struct CameraWidgetGroup { static bool WIDGETGROUP_camera_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { Object *ob = CTX_data_active_object(C); - - return (ob && ob->type == OB_CAMERA); + if (ob && ob->type == OB_CAMERA) { + Camera *camera = ob->data; + /* TODO: support overrides. */ + if (camera->id.lib == NULL) { + return true; + } + } + return false; } static void WIDGETGROUP_camera_setup(const bContext *C, wmManipulatorGroup *mgroup) @@ -332,10 +338,7 @@ static void manipulator_render_border_prop_matrix_set( static bool WIDGETGROUP_camera_view_poll(const bContext *C, wmManipulatorGroupType *UNUSED(wgt)) { - ARegion *ar = CTX_wm_region(C); - RegionView3D *rv3d = ar->regiondata; Scene *scene = CTX_data_scene(C); - View3D *v3d = CTX_wm_view3d(C); /* This is just so the border isn't always in the way, * stealing mouse clicks from regular usage. @@ -347,9 +350,15 @@ static bool WIDGETGROUP_camera_view_poll(const bContext *C, wmManipulatorGroupTy } } + 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) { - return true; + /* TODO: support overrides. */ + if (scene->id.lib == NULL) { + return true; + } } } else if (v3d->flag2 & V3D_RENDER_BORDER) { |