[Bf-blender-cvs] [f30048504b] cloth-improvements: UI Cleanup: Remove scaling flag
Luca Rood
noreply at git.blender.org
Sat Jan 7 05:10:02 CET 2017
Commit: f30048504b378501fed9fed97fdee52792cc413c
Author: Luca Rood
Date: Fri Jan 6 22:20:05 2017 -0200
Branches: cloth-improvements
https://developer.blender.org/rBf30048504b378501fed9fed97fdee52792cc413c
UI Cleanup: Remove scaling flag
===================================================================
M release/scripts/startup/bl_ui/properties_physics_cloth.py
M source/blender/blenkernel/BKE_cloth.h
M source/blender/blenkernel/intern/cloth.c
M source/blender/makesrna/intern/rna_cloth.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 8eae32755b..a4a32d7e9c 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -235,12 +235,6 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
- def draw_header(self, context):
- cloth = context.cloth.settings
-
- self.layout.active = cloth_panel_enabled(context.cloth)
- self.layout.prop(cloth, "use_stiffness_scale", text="")
-
def draw(self, context):
layout = self.layout
@@ -248,7 +242,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
ob = context.object
cloth = context.cloth.settings
- layout.active = (cloth.use_stiffness_scale and cloth_panel_enabled(md))
+ layout.active = cloth_panel_enabled(md)
row = layout.row()
row.label(text="Structural Stiffness:")
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index 6a1a415af4..52c8e9a472 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -169,7 +169,6 @@ typedef struct ClothSpring {
typedef enum {
CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ),// object is only collision object, no cloth simulation is done
CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled
- CLOTH_SIMSETTINGS_FLAG_SCALING = ( 1 << 8 ), /* is advanced scaling active? */
CLOTH_SIMSETTINGS_FLAG_CCACHE_EDIT = (1 << 12), /* edit cache in editmode */
CLOTH_SIMSETTINGS_FLAG_NO_SPRING_COMPRESS = (1 << 13), /* don't allow spring compression */
CLOTH_SIMSETTINGS_FLAG_SEW = (1 << 14), /* pull ends of loose edges together */
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 3a03951aa3..d30ce9fce0 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -749,18 +749,16 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
verts->flags |= CLOTH_VERT_FLAG_PINNED;
}
- if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) {
- if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_struct-1)) {
- verts->struct_stiff = dvert->dw [j].weight;
- }
+ if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_struct-1)) {
+ verts->struct_stiff = dvert->dw [j].weight;
+ }
- if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_shear-1)) {
- verts->shear_stiff = dvert->dw [j].weight;
- }
-
- if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_bend-1)) {
- verts->bend_stiff = dvert->dw [j].weight;
- }
+ if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_shear-1)) {
+ verts->shear_stiff = dvert->dw [j].weight;
+ }
+
+ if ( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_bend-1)) {
+ verts->bend_stiff = dvert->dw [j].weight;
}
if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) {
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index b67e419174..26d144a7e3 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -560,13 +560,6 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_cloth_update");
/* springs */
-
- prop = RNA_def_property(srna, "use_stiffness_scale", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_SCALING);
- RNA_def_property_ui_text(prop, "Stiffness Scaling",
- "If enabled, stiffness can be scaled along a weight painted vertex group");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
prop = RNA_def_property(srna, "tension_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tension_damp");
More information about the Bf-blender-cvs
mailing list