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:
authorHans Goudey <h.goudey@me.com>2020-07-03 18:58:43 +0300
committerHans Goudey <h.goudey@me.com>2020-07-03 18:58:43 +0300
commita21cb22f8b12ea73937e7e6eda8465f1cba02b6e (patch)
tree17fa94d2e1a22f8c0ece10b4a680a39784aae981 /source/blender/editors/object
parent33a74941c5fd4efb6eefcaace3315d3e2b65681f (diff)
Cleanup: Deduplicate code for finding context object
Instead of manually checking the pinned object, use the existing ED_object_active_context function. This requires adding const to the context in that function.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 0ea9d24a016..a9eb454eb04 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -126,14 +126,14 @@ static ListBase selected_objects_get(bContext *C);
/** \name Internal Utilities
* \{ */
-Object *ED_object_context(bContext *C)
+Object *ED_object_context(const bContext *C)
{
return CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
}
/* find the correct active object per context
* note: context can be NULL when called from a enum with PROP_ENUM_NO_CONTEXT */
-Object *ED_object_active_context(bContext *C)
+Object *ED_object_active_context(const bContext *C)
{
Object *ob = NULL;
if (C) {