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:
authorBastien Montagne <bastien@blender.org>2022-05-30 17:22:06 +0300
committerBastien Montagne <bastien@blender.org>2022-05-30 17:58:27 +0300
commitfb62fcf0717e5a3e6ef464e12cbdbd21e91533a0 (patch)
treeefb59c86091e4baf7fdd4499e18707c2eb721f27 /source/blender/editors/screen
parente7544e3ce4066cfb1759477a7cc4e405b6969067 (diff)
Fix polling function for background image removal not checking linked ID.
Linked ID is (almost) never editable... Also rename that function to add the `_poll` suffix.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index d7cf09ca89a..a922e5aaaee 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -685,10 +685,10 @@ bool ED_operator_mask(bContext *C)
return false;
}
-bool ED_operator_camera(bContext *C)
+bool ED_operator_camera_poll(bContext *C)
{
struct Camera *cam = CTX_data_pointer_get_type(C, "camera", &RNA_Camera).data;
- return (cam != NULL);
+ return (cam != NULL && !ID_IS_LINKED(cam));
}
/** \} */