diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-24 17:44:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-24 17:44:26 +0300 |
commit | d638ad3b20577101cffedca069222b219e71b14f (patch) | |
tree | bcd820cfae65052686420fb5570ce871ca015aa0 | |
parent | 5505ba8d4753ee6b3c0101ba3e4abf337546a1b0 (diff) | |
parent | 8d9faf840b8f99255b9989d178e5e4a6f5ec7f87 (diff) |
Merge branch 'master' into blender2.8
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 1 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ops.c | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 749d1347eb3..919c8d14db5 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -248,6 +248,7 @@ int ED_operator_screen_mainwinactive(struct bContext *C); int ED_operator_areaactive(struct bContext *C); int ED_operator_regionactive(struct bContext *C); +int ED_operator_scene(struct bContext *C); int ED_operator_scene_editable(struct bContext *C); int ED_operator_objectmode(struct bContext *C); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 2063191658b..44406745333 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -146,6 +146,14 @@ int ED_operator_screen_mainwinactive(bContext *C) return 1; } +int ED_operator_scene(bContext *C) +{ + Scene *scene = CTX_data_scene(C); + if (scene) + return 1; + return 0; +} + int ED_operator_scene_editable(bContext *C) { Scene *scene = CTX_data_scene(C); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 26efdc4123c..4d362ae5425 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -112,7 +112,7 @@ static void VIEW3D_OT_copybuffer(wmOperatorType *ot) /* api callbacks */ ot->exec = view3d_copybuffer_exec; - ot->poll = ED_operator_view3d_active; + ot->poll = ED_operator_scene; } static int view3d_pastebuffer_exec(bContext *C, wmOperator *op) @@ -149,7 +149,7 @@ static void VIEW3D_OT_pastebuffer(wmOperatorType *ot) /* api callbacks */ ot->exec = view3d_pastebuffer_exec; - ot->poll = ED_operator_view3d_active; + ot->poll = ED_operator_scene_editable; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; |