diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-05-27 12:09:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-05-27 12:09:25 +0400 |
commit | 9852543154c551e96a7b074546cdfe52a05282d4 (patch) | |
tree | 5b5bbc6ee071c3f36dc9b086221fe6e1dca4c105 /source/blender/editors/object/object_select.c | |
parent | ef0239fa6f25d5ca5b4f125b79d763eda196dea9 (diff) |
make bpy.ops.object.select_name(name) also make the object active since Alt+RMB wasnt setting the object active.
if other tools need this not to switch the active object we could make setting active an option.
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r-- | source/blender/editors/object/object_select.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index f1a906f36dd..8e3d613e02e 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -999,7 +999,9 @@ static int object_select_name_exec(bContext *C, wmOperator *op) } CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { + /* this is a bit dodjy, there should only be ONE object with this name, but library objects can mess this up */ if(strcmp(name, base->object->id.name+2)==0) { + ED_base_object_activate(C, base); ED_base_object_select(base, BA_SELECT); changed= 1; } |