[Bf-blender-cvs] [47bf093] master: Removed generic debug1..4 values from the cloth data.

Lukas Tönne noreply at git.blender.org
Wed Jan 21 10:08:41 CET 2015


Commit: 47bf0934f5743d14024ef693b2bfe4510c2c666a
Author: Lukas Tönne
Date:   Wed Jan 21 10:07:11 2015 +0100
Branches: master
https://developer.blender.org/rB47bf0934f5743d14024ef693b2bfe4510c2c666a

Removed generic debug1..4 values from the cloth data.

These were used as UI buttons during development. If such parameters are
needed again later they should instead be added in the (now global)
SimDebugData and made accessible with a dev addon or so.

===================================================================

M	release/scripts/startup/bl_ui/properties_particle.py
M	source/blender/makesdna/DNA_cloth_types.h
M	source/blender/makesrna/intern/rna_cloth.c
M	source/blender/physics/intern/BPH_mass_spring.cpp
M	source/blender/physics/intern/hair_volume.cpp
M	source/blender/physics/intern/implicit.h

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 9e88043..1176245 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -361,11 +361,6 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
         sub.prop(cloth, "density_target", text="Density Target")
         sub.prop(cloth, "density_strength", slider=True, text="Strength")
         col.prop(cloth, "voxel_cell_size")
-        sub = col.column(align=True)
-        sub.prop(cloth, "debug1")
-        sub.prop(cloth, "debug2")
-        sub.prop(cloth, "debug3")
-        sub.prop(cloth, "debug4")
 
         split.separator()
 
@@ -381,7 +376,6 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
 
         row = col.row()
         row.prop(psys.settings, "show_hair_grid", text="HairGrid")
-        row.prop(cloth_md, "show_debug_data", text="Debug")
 
         if result:
             box = layout.box()
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index a665c22..3144dad 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -76,12 +76,6 @@ typedef struct ClothSimSettings {
 	float	shrink_min;  /* min amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing) */
 	float	shrink_max;  /* max amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing) */
 	
-	/* XXX generic debug values, could be done nicer as id props */
-	float debug1;
-	float debug2;
-	int debug3;
-	int debug4;
-	
 	/* XXX various hair stuff
 	 * should really be separate, this struct is a horrible mess already
 	 */
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 4e8cfb8..991020a 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -397,26 +397,6 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Target Density Strength", "Influence of target density on the simulation");
 	RNA_def_property_update(prop, 0, "rna_cloth_update");
 
-	prop = RNA_def_property(srna, "debug1", PROP_FLOAT, PROP_NONE);
-	RNA_def_property_range(prop, 0.0f, 1000000.0f);
-	RNA_def_property_ui_text(prop, "Debug1", "");
-	RNA_def_property_update(prop, 0, "rna_cloth_update");
-
-	prop = RNA_def_property(srna, "debug2", PROP_FLOAT, PROP_NONE);
-	RNA_def_property_range(prop, 0.0f, 1000000.0f);
-	RNA_def_property_ui_text(prop, "Debug2", "");
-	RNA_def_property_update(prop, 0, "rna_cloth_update");
-
-	prop = RNA_def_property(srna, "debug3", PROP_INT, PROP_NONE);
-	RNA_def_property_range(prop, 0.0f, 1000000.0f);
-	RNA_def_property_ui_text(prop, "Debug3", "");
-	RNA_def_property_update(prop, 0, "rna_cloth_update");
-
-	prop = RNA_def_property(srna, "debug4", PROP_INT, PROP_NONE);
-	RNA_def_property_range(prop, 0.0f, 1000000.0f);
-	RNA_def_property_ui_text(prop, "Debug4", "");
-	RNA_def_property_update(prop, 0, "rna_cloth_update");
-
 	/* mass */
 
 	prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index a4f4fb1..6cddbc6 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -712,8 +712,6 @@ static void cloth_continuum_step(ClothModifierData *clmd, float dt)
 	if (smoothfac > 0.0f || density_strength > 0.0f) {
 		HairGrid *grid = BPH_hair_volume_create_vertex_grid(clmd->sim_parms->voxel_cell_size, gmin, gmax);
 		
-		BPH_hair_volume_set_debug_value(grid, parms->debug1, parms->debug2, parms->debug3, parms->debug4);
-		
 		cloth_continuum_fill_grid(grid, cloth);
 		
 		/* main hair continuum solver */
diff --git a/source/blender/physics/intern/hair_volume.cpp b/source/blender/physics/intern/hair_volume.cpp
index 3e98d3b..b07af1d 100644
--- a/source/blender/physics/intern/hair_volume.cpp
+++ b/source/blender/physics/intern/hair_volume.cpp
@@ -91,9 +91,6 @@ typedef struct HairGrid {
 	int res[3];
 	float gmin[3], gmax[3];
 	float cellsize, inv_cellsize;
-	
-	float debug1, debug2;
-	int debug3, debug4;
 } HairGrid;
 
 #define HAIR_GRID_INDEX_AXIS(vec, res, gmin, scale, axis) ( min_ii( max_ii( (int)((vec[axis] - gmin[axis]) * scale), 0), res[axis]-2 ) )
@@ -1023,14 +1020,6 @@ void BPH_hair_volume_free_vertex_grid(HairGrid *grid)
 	}
 }
 
-void BPH_hair_volume_set_debug_value(HairGrid *grid, float debug1, float debug2, int debug3, int debug4)
-{
-	grid->debug1 = debug1;
-	grid->debug2 = debug2;
-	grid->debug3 = debug3;
-	grid->debug4 = debug4;
-}
-
 void BPH_hair_volume_grid_geometry(HairGrid *grid, float *cellsize, int res[3], float gmin[3], float gmax[3])
 {
 	if (cellsize) *cellsize = grid->cellsize;
diff --git a/source/blender/physics/intern/implicit.h b/source/blender/physics/intern/implicit.h
index f0d59d9..7ded479 100644
--- a/source/blender/physics/intern/implicit.h
+++ b/source/blender/physics/intern/implicit.h
@@ -139,7 +139,6 @@ struct VoxelData;
 struct HairGrid *BPH_hair_volume_create_vertex_grid(float cellsize, const float gmin[3], const float gmax[3]);
 void BPH_hair_volume_free_vertex_grid(struct HairGrid *grid);
 void BPH_hair_volume_grid_geometry(struct HairGrid *grid, float *cellsize, int res[3], float gmin[3], float gmax[3]);
-void BPH_hair_volume_set_debug_value(struct HairGrid *grid, float debug1, float debug2, int debug3, int debug4);
 
 void BPH_hair_volume_grid_clear(struct HairGrid *grid);
 void BPH_hair_volume_add_vertex(struct HairGrid *grid, const float x[3], const float v[3]);




More information about the Bf-blender-cvs mailing list