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>2009-09-11 02:32:33 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-09-11 02:32:33 +0400
commite9587a89faf33aa0c1383b59f006be4cc7443a5a (patch)
treebfa5264b90b75a58912448eb3d589b188cbd0472 /source/blender/makesrna/intern/rna_cloth.c
parentfcc5884c252ae10b07a6f8c5e1c5990e9aa4e7c5 (diff)
Hair dynamics with cloth simulation
- Hair dynamics have their own panel in particle settings with the settings from cloth panel that apply to hair. - Basic internal friction force to quickly emulate self collisions and volume preservation. (Still very early code, but gives some idea of what's possible). - Softbody simulation is no longer used for hair. * Old files with sb dynamics should just load the hair without dynamics so new dynamics can be applied. * Invasion of particles exceptions in sb code is finally over. - Collisions with other objects are disabled for now and will be worked out in the future. Other changes/fixes: - Particle mode editing flag wasn't saved properly. - Some old files with edited hair didn't load correctly. - Disabled delete & specials menu in particle mode for non-hair editing. - Fixed yet one more cloth & softbody pointcache update issue. - Disconnect/connect hair now uses only the deformed mesh so it works correctly also for subsurfed emitters. - Hair editing now updates correctly with a moving emitter.
Diffstat (limited to 'source/blender/makesrna/intern/rna_cloth.c')
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 38086502d6f..22cc2e2c9c3 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -152,7 +152,7 @@ static char *rna_ClothSettings_path(PointerRNA *ptr)
Object *ob= (Object*)ptr->id.data;
ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
- return BLI_sprintfN("modifiers[%s].settings", md->name);
+ return md ? BLI_sprintfN("modifiers[%s].settings", md->name) : NULL;
}
static char *rna_ClothCollisionSettings_path(PointerRNA *ptr)
@@ -160,7 +160,7 @@ static char *rna_ClothCollisionSettings_path(PointerRNA *ptr)
Object *ob= (Object*)ptr->id.data;
ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
- return BLI_sprintfN("modifiers[%s].collision_settings", md->name);
+ return md ? BLI_sprintfN("modifiers[%s].collision_settings", md->name) : NULL;
}
#else
@@ -207,6 +207,12 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction.");
RNA_def_property_update(prop, 0, "rna_cloth_update");
+ prop= RNA_def_property(srna, "internal_friction", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "velocity_smooth");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Internal Friction", "");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
+
/* mass */
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);