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:
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r--source/blender/editors/object/object_select.c16
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);