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:
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r--source/blender/editors/object/object_edit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index e4b27f58e05..b3e5232cfdc 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -112,6 +112,10 @@ static int pupmenu(const char *UNUSED(msg)) {return 0;}
static bContext *evil_C;
static void error_libdata(void) {}
+Object *ED_object_context(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 */
@@ -119,7 +123,7 @@ Object *ED_object_active_context(bContext *C)
{
Object *ob= NULL;
if(C) {
- ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ ob= ED_object_context(C);
if (!ob) ob= CTX_data_active_object(C);
}
return ob;