diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-30 06:32:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-30 06:42:28 +0300 |
commit | 47908f015551fa5acf1359b3f1c0e1930856af83 (patch) | |
tree | b3c03d4700ab7ef64a2a1aa9935137ae84cd7be8 /source | |
parent | 2778937fb6b965d4c428f87551cccb2eafd56bf1 (diff) |
Operator: expose ED_operator_object_active_local_editable_ex
Support calling this function with an object argument,
useful for implementing filter functions that loop over objects.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 1 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index dd7ca5c65a4..d9c7128c2ee 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -344,6 +344,7 @@ bool ED_operator_console_active(struct bContext *C); bool ED_operator_object_active(struct bContext *C); bool ED_operator_object_active_editable_ex(struct bContext *C, const Object *ob); bool ED_operator_object_active_editable(struct bContext *C); +bool ED_operator_object_active_local_editable_ex(struct bContext *C, const Object *ob); bool ED_operator_object_active_local_editable(struct bContext *C); bool ED_operator_object_active_editable_mesh(struct bContext *C); bool ED_operator_object_active_editable_font(struct bContext *C); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index aff19ddacf1..5730d8b2d03 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -363,6 +363,11 @@ bool ED_operator_object_active_editable(bContext *C) } /** Object must be editable and fully local (i.e. not an override). */ +bool ED_operator_object_active_local_editable_ex(bContext *C, const Object *ob) +{ + return ED_operator_object_active_editable_ex(C, ob) && !ID_IS_OVERRIDE_LIBRARY(ob); +} + bool ED_operator_object_active_local_editable(bContext *C) { Object *ob = ED_object_active_context(C); |