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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-11 07:40:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-11 07:40:20 +0400
commitf1c229e8b3f21f3819f001ce470831147c1b6289 (patch)
treebd28524cf87a79a2d6776ef75abf9c929e33bad7 /source/blender/editors/object/object_select.c
parent482bad6dccd5ed46c2e1260183d88cb7efa11d55 (diff)
Change how object menu selection works, use an operator with an enum rather then a menu with 'OBJECT_OT_select_name',
remove 'OBJECT_OT_select_name' operator since its no longer needed.
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r--source/blender/editors/object/object_select.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index c4d33b74574..b48b2e8718d 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -939,63 +939,6 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot)
}
-static int object_select_name_exec(bContext *C, wmOperator *op)
-{
- char *name= RNA_string_get_alloc(op->ptr, "name", NULL, 0);
- short extend= RNA_boolean_get(op->ptr, "extend");
- short changed = 0;
-
- if(!extend) {
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if(base->flag & SELECT) {
- ED_base_object_select(base, BA_DESELECT);
- changed= 1;
- }
- }
- CTX_DATA_END;
- }
-
- 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;
- }
- }
- CTX_DATA_END;
-
- MEM_freeN(name);
-
- /* undo? */
- if(changed) {
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
- return OPERATOR_FINISHED;
- }
- else {
- return OPERATOR_CANCELLED;
- }
-}
-
-void OBJECT_OT_select_name(wmOperatorType *ot)
-{
-
- /* identifiers */
- ot->name= "Select Name";
- ot->description = "Select an object with this name";
- ot->idname= "OBJECT_OT_select_name";
-
- /* api callbacks */
- ot->exec= object_select_name_exec;
- ot->poll= objects_selectable_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_string(ot->srna, "name", "", 0, "Name", "Object name to select");
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
-}
-
/**************************** Select Random ****************************/
static int object_select_random_exec(bContext *C, wmOperator *op)