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
path: root/source
diff options
context:
space:
mode:
authorMichael Fox <mfoxdogg@gmail.com>2011-02-10 03:05:03 +0300
committerMichael Fox <mfoxdogg@gmail.com>2011-02-10 03:05:03 +0300
commit446299db1c0a4cf89068312174c7f30fadbd79d2 (patch)
tree97d82d78ce8e9345cd1ecd94f0643ff0ab05de62 /source
parentea50e5f5873f471c5f35b4a45330b3a2995e8891 (diff)
small feature request from zanqdo, merging in the mirror modifier is now optional, simply turning town the merge limit just simply do anything, and merging is off by default as this seems more logical behaviour
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c5
-rw-r--r--source/blender/modifiers/intern/MOD_mirror.c10
3 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 914a980cd79..f219f54cc25 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -235,6 +235,7 @@ typedef struct MirrorModifierData {
#define MOD_MIR_AXIS_Y (1<<4)
#define MOD_MIR_AXIS_Z (1<<5)
#define MOD_MIR_VGROUP (1<<6)
+#define MOD_MIR_MERGE (1<<7)
typedef struct EdgeSplitModifierData {
ModifierData modifier;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 15da48a82d4..6045b920e01 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -776,6 +776,11 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_VGROUP);
RNA_def_property_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "use_mirror_merge", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MERGE);
+ RNA_def_property_ui_text(prop, "Merge Verticies", "Merge verticies within the merge threshold");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_mirror_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_U);
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index 9546bf1300b..19f21ce655f 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -142,7 +142,11 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
if (mmd->mirror_ob) {
mul_m4_v3(mtx, co);
}
- isShared = ABS(co[axis])<=tolerance;
+
+ if(mmd->flag & MOD_MIR_MERGE)
+ isShared = ABS(co[axis])<=tolerance;
+ else
+ isShared = 0;
/* Because the topology result (# of vertices) must be the same if
* the mesh data is overridden by vertex cos, have to calc sharedness
@@ -154,8 +158,8 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
indexMap[i][0] = numVerts - 1;
indexMap[i][1] = !isShared;
-
- if(isShared) {
+ //
+ if(isShared ) {
co[axis] = 0;
if (mmd->mirror_ob) {
mul_m4_v3(imtx, co);