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:
authorMatt Ebb <matt@mke3.net>2010-03-31 04:55:01 +0400
committerMatt Ebb <matt@mke3.net>2010-03-31 04:55:01 +0400
commit4a451714d64e0628e06cce6f7cdedcb88a79efc5 (patch)
tree15aa4fd835f0d309f5f2fbe0d09f11efc3bd14c6 /source/blender/editors/object/object_modifier.c
parent05c2906b769a3a56939bd870589dab637b73d63d (diff)
Fix [#21832] Add Modifier, Pinned Context
Added convenience function ED_object_active_context(C) to get either the object in the data context, or if not, the active object.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 8150bd9b84f..a43f3de9b14 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -499,7 +499,7 @@ static int modifier_poll(bContext *C)
static int modifier_add_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
- Object *ob = CTX_data_active_object(C);
+ Object *ob = ED_object_active_context(C);
int type= RNA_enum_get(op->ptr, "type");
if(!ED_object_modifier_add(op->reports, scene, ob, NULL, type))
@@ -512,7 +512,7 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *ptr, int *free)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob= ED_object_active_context(C);
EnumPropertyItem *item= NULL, *md_item;
ModifierTypeInfo *mti;
int totitem= 0, a;