make bpy.ops.object.select_name(name) also make the object active since Alt+RMB wasnt...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 27 May 2010 08:09:25 +0000 (08:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 27 May 2010 08:09:25 +0000 (08:09 +0000)
if other tools need this not to switch the active object we could make setting active an option.

source/blender/editors/object/object_select.c

index f1a906f36dd7f6c2528706c1f9eb8619e66afff1..8e3d613e02ea44665f911504bbe59d2edf0ca8d3 100644 (file)
@@ -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;
                }