diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 15:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 15:30:59 +0300 |
commit | cd972535027a73ba70069051fe9038b6a8b5696a (patch) | |
tree | b50696bddbc710192b89e34fcdd1e82e6c8073b7 /source/blender/editors/object/object_select.c | |
parent | aca76ddb502cbf0ee7888c3356f9f35240919410 (diff) |
- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r-- | source/blender/editors/object/object_select.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index b131a358ae7..deda2ce0129 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -51,6 +51,7 @@ #include "BKE_property.h" #include "BKE_report.h" #include "BKE_scene.h" +#include "BKE_library.h" #include "BKE_deform.h" #include "WM_api.h" @@ -826,21 +827,26 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot) /**************************** Select Mirror ****************************/ static int object_select_mirror_exec(bContext *C, wmOperator *op) { + Scene *scene= CTX_data_scene(C); short extend; extend= RNA_boolean_get(op->ptr, "extend"); CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) { - char tmpname[32]; + flip_side_name(tmpname, primbase->object->id.name+2, TRUE); + + if(strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */ + Object *ob= (Object *)find_id("OB", tmpname); + if(ob) { + Base *secbase= object_in_scene(ob, scene); - CTX_DATA_BEGIN(C, Base*, secbase, visible_bases) { - if(!strcmp(secbase->object->id.name+2, tmpname)) { - ED_base_object_select(secbase, BA_SELECT); + if(secbase) { + ED_base_object_select(secbase, BA_SELECT); + } } } - CTX_DATA_END; if (extend == 0) ED_base_object_select(primbase, BA_DESELECT); |