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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-02 12:55:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-02 12:55:26 +0400
commitab2450a58d8ac4d4d9fd3534ac1843ffa7831ea0 (patch)
treecba04f1a20b05a630568d1e15b3b836089413526 /source
parentdbe1f07c765857b2dfcaa7860aafce4fe031794f (diff)
fix [#27557] Linked object (camera) should not be able to set position by using camera to view operator
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 32e8ae81f90..0c4ab161e71 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -391,12 +391,15 @@ static int view3d_setcameratoview_exec(bContext *C, wmOperator *UNUSED(op))
static int view3d_setcameratoview_poll(bContext *C)
{
- View3D *v3d = CTX_wm_view3d(C);
- RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ View3D *v3d= CTX_wm_view3d(C);
+ if(v3d && v3d->camera && v3d->camera->id.lib==NULL) {
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ if(rv3d && !rv3d->viewlock) {
+ return 1;
+ }
+ }
- if (v3d==NULL || v3d->camera==NULL) return 0;
- if (rv3d && rv3d->viewlock != 0) return 0;
- return 1;
+ return 0;
}
void VIEW3D_OT_setcameratoview(wmOperatorType *ot)