forked from bartvdbraak/blender
small fix so older files are loaded with merge on in the mirror modifiers
This commit is contained in:
parent
cbe544fb6c
commit
0ebf448bee
@ -235,7 +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)
|
||||
#define MOD_MIR_NO_MERGE (1<<7)
|
||||
|
||||
typedef struct EdgeSplitModifierData {
|
||||
ModifierData modifier;
|
||||
|
@ -778,7 +778,7 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
|
||||
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_boolean_negative_sdna(prop, NULL, "flag", MOD_MIR_NO_MERGE);
|
||||
RNA_def_property_ui_text(prop, "Merge Verticies", "Merge vertices within the merge threshold");
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
||||
|
@ -49,7 +49,7 @@ static void initData(ModifierData *md)
|
||||
{
|
||||
MirrorModifierData *mmd = (MirrorModifierData*) md;
|
||||
|
||||
mmd->flag |= (MOD_MIR_AXIS_X | MOD_MIR_VGROUP | MOD_MIR_MERGE);
|
||||
mmd->flag |= (MOD_MIR_AXIS_X | MOD_MIR_VGROUP);
|
||||
mmd->tolerance = 0.001;
|
||||
mmd->mirror_ob = NULL;
|
||||
}
|
||||
@ -143,10 +143,10 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
|
||||
mul_m4_v3(mtx, co);
|
||||
}
|
||||
|
||||
if(mmd->flag & MOD_MIR_MERGE)
|
||||
isShared = ABS(co[axis])<=tolerance;
|
||||
else
|
||||
if(mmd->flag & MOD_MIR_NO_MERGE)
|
||||
isShared = 0;
|
||||
else
|
||||
isShared = ABS(co[axis])<=tolerance;
|
||||
|
||||
/* Because the topology result (# of vertices) must be the same if
|
||||
* the mesh data is overridden by vertex cos, have to calc sharedness
|
||||
|
Loading…
Reference in New Issue
Block a user