[Bf-blender-cvs] [0076ba4] fracture_modifier: deactivated the unfinished multiple fracture settings per object for now, didnt work properly
Martin Felke
noreply at git.blender.org
Wed Nov 4 15:21:47 CET 2015
Commit: 0076ba4833c7a6f60459674aad03b646ebd00690
Author: Martin Felke
Date: Wed Nov 4 15:21:27 2015 +0100
Branches: fracture_modifier
https://developer.blender.org/rB0076ba4833c7a6f60459674aad03b646ebd00690
deactivated the unfinished multiple fracture settings per object for now, didnt work properly
===================================================================
M release/scripts/startup/bl_ui/properties_physics_fracture.py
M source/blender/makesrna/intern/rna_modifier.c
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 e49c618..0af4970 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fracture.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fracture.py
@@ -49,17 +49,17 @@ class FRACTURE_UL_fracture_settings(UIList):
layout.alignment = 'CENTER'
layout.label(text="", icon_value=icon)
-class PHYSICS_PT_fracture_settings(PhysicButtonsPanel, Panel):
- bl_label = "Fracture Settings"
+#class PHYSICS_PT_fracture_settings(PhysicButtonsPanel, Panel):
+# bl_label = "Fracture Settings"
- def draw(self, context):
- layout = self.layout
- md = context.fracture
+# def draw(self, context):
+# layout = self.layout
+# md = context.fracture
- layout.template_list("FRACTURE_UL_fracture_settings", "", md, "fracture_settings", md, "active_setting", rows=3)
+# layout.template_list("FRACTURE_UL_fracture_settings", "", md, "fracture_settings", md, "active_setting", rows=3)
class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
- bl_label = "Active Fracture Settings"
+ bl_label = "Fracture Settings"
def icon(self, bool):
if bool:
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5c032b6..5bf4e4a 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -5197,6 +5197,7 @@ static void rna_def_modifier_fracture(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update_and_keep");
+#if 0
prop = RNA_def_property(srna, "fracture_settings", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FractureSettings");
RNA_def_property_collection_sdna(prop, NULL, "fracture_settings", NULL);
@@ -5207,6 +5208,7 @@ static void rna_def_modifier_fracture(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "active_setting");
RNA_def_property_ui_text(prop, "Active Fracture Setting", "Index of active fracture setting");
RNA_def_property_update(prop, 0, "rna_Modifier_update_index");
+#endif
prop = RNA_def_property(srna, "use_compounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyModifier_use_compounds_set");
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 166ec52..ff4b248 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -3711,6 +3711,7 @@ static FractureSetting* create_default_setting(bDeformGroup *vgroup)
return fs;
}
+#if 0
static bool detect_vgroups(FractureModifierData *fmd, Object *ob)
{
//use silly name prefix... S_, because other vgroups may exist too
@@ -3760,6 +3761,7 @@ static bool detect_vgroups(FractureModifierData *fmd, Object *ob)
return vgroups > 0;
}
+#endif
static void do_modifier(FractureModifierData *fmd, Object *ob, DerivedMesh *dm)
{
@@ -3842,6 +3844,8 @@ static void do_modifier(FractureModifierData *fmd, Object *ob, DerivedMesh *dm)
/*HERE we must know which shard(s) to fracture... hmm shards... we should "merge" states which happen in the same frame automatically !*/
if (fmd->fracture_mode == MOD_FRACTURE_PREFRACTURED)
{
+
+#if 0
//detect all vgroups(nameprefix ?) and make default settings first....
//if vgroups > settings, insert new settings
//if vgroups = settings, keep....
@@ -3849,6 +3853,7 @@ static void do_modifier(FractureModifierData *fmd, Object *ob, DerivedMesh *dm)
if (detect_vgroups(fmd, ob))
//attempt to halve here...
do_prehalving(fmd, ob, dm);
+#endif
//then check settings
if (BLI_listbase_is_empty(&fmd->fracture_settings))
@@ -4177,7 +4182,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
if (fmd->fracture_mode == MOD_FRACTURE_PREFRACTURED)
{
bool init = false;
-
+ //deactivate multiple settings for now, not working properly XXX TODO (also deactivated in RNA and python)
+#if 0
if (BLI_listbase_is_empty(&fmd->fracture_settings) && detect_vgroups(fmd, ob))
{
//attempt to halve here...
@@ -4186,6 +4192,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
fmd->shard_count = 1;
init = true;
}
+#endif
final_dm = do_prefractured(fmd, ob, derivedData);
More information about the Bf-blender-cvs
mailing list