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:
authorJanne Karhu <jhkarh@gmail.com>2011-02-23 22:29:59 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-02-23 22:29:59 +0300
commit3bee6abb74f03cb2170c15c14ea76187dbaead48 (patch)
treee5b53a6ef2d296496b85071d9c1208f816a637d2 /source/blender/makesrna
parent00c05c84048857391a4f30042721f79c60798814 (diff)
Fix for [#26133] Explode modifier doesn't care about UVs (Option "split edges")
* This is basically a total rewrite of the edge split algorithm. The old one didn't handle tris at all and quads were cut wrong in some cases too with the addition of not handling uv coordinates at all. * This new algorithm uses a flag system to categorize different splits and the identical but rotated cases in a similar way to how marching cubes indexes different cases. * It cuts quads and tris and creates proper uv's for the new faces too. * I also renamed the option to "edge cut" to differentiate if from the edge split modifier and added an option to override a uv-channel in the exploded mesh with particle age as x-coordinate so that the shrapnel can be faded out nicely etc.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 07db55ecba3..3c77ab63821 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1720,9 +1720,9 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Protect", "Clean vertex group edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_edge_split", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_EdgeSplit);
- RNA_def_property_ui_text(prop, "Split Edges", "Split face edges for nicer shrapnel");
+ prop= RNA_def_property(srna, "use_edge_cut", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_EdgeCut);
+ RNA_def_property_ui_text(prop, "Cut Edges", "Cut face edges for nicer shrapnel");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
@@ -1744,6 +1744,12 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_PaSize);
RNA_def_property_ui_text(prop, "Size", "Use particle size for the shrapnel");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "particle_uv", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "uvname");
+ RNA_def_property_string_maxlength(prop, 32);
+ RNA_def_property_ui_text(prop, "Particle UV", "UV Layer to change with particle age");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_cloth(BlenderRNA *brna)