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:
authorDaniel Genrich <daniel.genrich@gmx.net>2009-07-14 02:35:04 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2009-07-14 02:35:04 +0400
commit8f98c5e87352c3622176913f80a4b6f5c72cea32 (patch)
tree0e7c578bc4cdb35cb21629b67099a948151bbf78
parent2ba8b72157d22ee92359e87e88860443a1f5cef2 (diff)
Fix cloth UI + tooltips - patch provided by nudelZ
-rw-r--r--release/ui/buttons_physic_cloth.py45
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c10
2 files changed, 29 insertions, 26 deletions
diff --git a/release/ui/buttons_physic_cloth.py b/release/ui/buttons_physic_cloth.py
index edb778b4dce..277a6dfe760 100644
--- a/release/ui/buttons_physic_cloth.py
+++ b/release/ui/buttons_physic_cloth.py
@@ -40,19 +40,23 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
split = layout.split()
- col = split.column()
+ col = split.column(align=True)
col.itemR(cloth, "quality", slider=True)
col.itemR(cloth, "gravity")
- subcol = col.column(align=True)
- subcol.itemR(cloth, "mass")
- subcol.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
-
- col = split.column()
- col.itemL(text="Stiffness:")
+ col.itemR(cloth, "pin_cloth", text="Pin")
+ col = col.column(align=True)
+ col.active = cloth.pin_cloth
+ col.itemR(cloth, "pin_stiffness", text="Stiffness")
+ col.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
+
+ col = split.column(align=True)
+ col.itemL(text="Presets...")
+ col.itemL(text="")
+ col.itemR(cloth, "mass")
col.itemR(cloth, "structural_stiffness", text="Structural")
col.itemR(cloth, "bending_stiffness", text="Bending")
- col.itemL(text="Damping:")
+ col.itemL(text="Damping")
col.itemR(cloth, "spring_damping", text="Spring")
col.itemR(cloth, "air_damping", text="Air")
@@ -133,21 +137,21 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
def draw(self, context):
layout = self.layout
cloth = context.cloth.collision_settings
+ split = layout.split()
- layout.active = cloth.enable_collision
+ layout.active = cloth.enable_collision
- col = layout.column_flow()
- col.itemR(cloth, "collision_quality", slider=True)
+ col = split.column(align=True)
+ col.itemR(cloth, "collision_quality", slider=True, text="Quality")
+ col.itemR(cloth, "min_distance", text="Distance")
col.itemR(cloth, "friction")
- col.itemR(cloth, "min_distance", text="MinDistance")
-
-
- layout.itemR(cloth, "enable_self_collision", text="Self Collision")
- col = layout.column_flow()
+ col = split.column(align="True")
+ col.itemR(cloth, "enable_self_collision", text="Self Collision")
+ col = col.column(align=True)
col.active = cloth.enable_self_collision
- col.itemR(cloth, "self_collision_quality", slider=True)
- col.itemR(cloth, "self_min_distance", text="MinDistance")
+ col.itemR(cloth, "self_collision_quality", slider=True, text="Quality")
+ col.itemR(cloth, "self_min_distance", text="Distance")
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_stiffness"
@@ -173,16 +177,15 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
sub = split.column(align=True)
sub.itemL(text="Structural Stiffness:")
- sub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
sub.itemR(cloth, "structural_stiffness_max", text="Max")
+ sub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
sub = split.column(align=True)
sub.itemL(text="Bending Stiffness:")
- sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
sub.itemR(cloth, "bending_stiffness_max", text="Max")
+ sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
bpy.types.register(PHYSICS_PT_cloth)
bpy.types.register(PHYSICS_PT_cloth_cache)
bpy.types.register(PHYSICS_PT_cloth_collision)
bpy.types.register(PHYSICS_PT_cloth_stiffness)
-
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index cefd2316fbf..95b580ac298 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -215,7 +215,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "mass_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_mass_vgroup_get", "rna_ClothSettings_mass_vgroup_length", "rna_ClothSettings_mass_vgroup_set");
- RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex group for fine control over mass distribution.");
+ RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices.");
RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_VECTOR);
@@ -235,7 +235,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "pin_cloth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_GOAL);
- RNA_def_property_ui_text(prop, "Pin Cloth", "Define forces for vertices to stick to animated position.");
+ RNA_def_property_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions.");
RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "pin_stiffness", PROP_FLOAT, PROP_NONE);
@@ -363,18 +363,18 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "epsilon");
RNA_def_property_range(prop, 0.001f, 1.0f);
- RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in, can be changed for each frame.");
+ RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in");
RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
- RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened (0=movement not changed, 100=no movement left)");
+ RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened (higher = less movement).");
RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "loop_count");
RNA_def_property_range(prop, 1, 20);
- RNA_def_property_ui_text(prop, "Collision Quality", "How many collision iterations should be done. (higher is better quality but slower)");
+ RNA_def_property_ui_text(prop, "Collision Quality", "How many collision iterations should be done (higher is better quality but slower).");
RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* self collision */