[Bf-blender-cvs] [88ddeb3] fracture_modifier: Modifier GUI "redesign", second revision
Martin Felke
noreply at git.blender.org
Mon Dec 1 20:24:06 CET 2014
Commit: 88ddeb3edcd13ef82dac6c5af397be5a38709330
Author: Martin Felke
Date: Mon Dec 1 20:23:49 2014 +0100
Branches: fracture_modifier
https://developer.blender.org/rB88ddeb3edcd13ef82dac6c5af397be5a38709330
Modifier GUI "redesign", second revision
===================================================================
M release/scripts/startup/bl_ui/properties_physics_fracture.py
M source/blender/modifiers/intern/MOD_fracture.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_physics_fracture.py b/release/scripts/startup/bl_ui/properties_physics_fracture.py
index d296ac8..5bd3dd3 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fracture.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fracture.py
@@ -58,6 +58,12 @@ class FRACTURE_UL_fracture_levels(UIList):
class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
bl_label = "Fracture Settings"
+ def icon(self, bool):
+ if bool:
+ return 'TRIA_DOWN'
+ else:
+ return 'TRIA_RIGHT'
+
def draw(self, context):
layout = self.layout
@@ -80,24 +86,29 @@ class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
row = layout.row()
row.prop(md, "shards_to_islands")
row.prop(md, "auto_execute")
- layout.label("Fracture Point Source:")
- col = layout.column()
- col.prop(md, "point_source")
- col.prop(md, "extra_group")
- col.prop(md, "dm_group")
- col.prop(md, "use_particle_birth_coordinates")
-
row = layout.row(align=True)
row.prop(md, "splinter_axis")
layout.prop(md, "splinter_length")
- layout.prop(md, "percentage")
- layout.label("Threshold Vertex Group:")
- layout.prop_search(md, "thresh_vertex_group", ob, "vertex_groups", text = "")
- layout.label("Passive Vertex Group:")
- layout.prop_search(md, "ground_vertex_group", ob, "vertex_groups", text = "")
- layout.label("Inner Vertex Group:")
- layout.prop_search(md, "inner_vertex_group", ob, "vertex_groups", text = "")
- layout.operator("object.fracture_refresh", text="Execute Fracture")
+
+ box = layout.box()
+ box.prop(md, "use_experimental", text="Advanced Fracture Settings", icon=self.icon(md.use_experimental), emboss = False)
+ if md.use_experimental:
+ box.label("Fracture Point Source:")
+ col = box.column()
+ col.prop(md, "point_source")
+ col.prop(md, "extra_group")
+ col.prop(md, "dm_group")
+ col.prop(md, "use_particle_birth_coordinates")
+
+ box.prop(md, "percentage")
+ box.label("Threshold Vertex Group:")
+ box.prop_search(md, "thresh_vertex_group", ob, "vertex_groups", text = "")
+ box.label("Passive Vertex Group:")
+ box.prop_search(md, "ground_vertex_group", ob, "vertex_groups", text = "")
+ box.label("Inner Vertex Group:")
+ box.prop_search(md, "inner_vertex_group", ob, "vertex_groups", text = "")
+
+ layout.operator("object.fracture_refresh", text="Execute Fracture", icon='MOD_EXPLODE')
class PHYSICS_PT_fracture_simulation(PhysicButtonsPanel, Panel):
bl_label = "Fracture Constraint Settings"
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 85a2ffc..9e5092d 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -131,6 +131,9 @@ static void initData(ModifierData *md)
fmd->cluster_breaking_angle = 0;
fmd->cluster_breaking_distance = 0;
fmd->cluster_breaking_percentage = 0;
+
+ /* used for advanced fracture settings now, XXX needs rename perhaps*/
+ fmd->use_experimental = 0;
}
static void freeMeshIsland(FractureModifierData *rmd, MeshIsland *mi, bool remove_rigidbody)
More information about the Bf-blender-cvs
mailing list