[Bf-blender-cvs] [59321aa] temp_merge_gooseberry_hair: Renaming "Kink" texture influence to "Kink Frequency" to be more specific.

Lukas Tönne noreply at git.blender.org
Mon Jan 19 20:52:01 CET 2015


Commit: 59321aa163b147dde2ac851becd5b83543ba3bb6
Author: Lukas Tönne
Date:   Wed Jan 14 12:03:55 2015 +0100
Branches: temp_merge_gooseberry_hair
https://developer.blender.org/rB59321aa163b147dde2ac851becd5b83543ba3bb6

Renaming "Kink" texture influence to "Kink Frequency" to be more
specific.

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

M	release/scripts/startup/bl_ui/properties_texture.py
M	source/blender/blenkernel/BKE_particle.h
M	source/blender/blenkernel/intern/particle.c
M	source/blender/blenkernel/intern/particle_child.c
M	source/blender/makesdna/DNA_material_types.h
M	source/blender/makesdna/DNA_particle_types.h
M	source/blender/makesrna/intern/rna_particle.c

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

diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 884ef54..f7c0408 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -1164,7 +1164,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
             factor_but(col, "use_map_clump", "clump_factor", "Clump")
 
             col = split.column()
-            factor_but(col, "use_map_kink", "kink_factor", "Kink")
+            factor_but(col, "use_map_kink_freq", "kink_freq_factor", "Kink Frequency")
             factor_but(col, "use_map_rough", "rough_factor", "Rough")
 
         elif isinstance(idblock, FreestyleLineStyle):
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 481ed9f..ff61fcb 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -110,7 +110,7 @@ typedef struct ParticleTexture {
 	float ivel;                           /* used in reset */
 	float time, life, exist, size;        /* used in init */
 	float damp, gravity, field;           /* used in physics */
-	float length, clump, kink, effector;  /* used in path caching */
+	float length, clump, kink_freq, effector;  /* used in path caching */
 	float rough1, rough2, roughe;         /* used in path caching */
 } ParticleTexture;
 
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 25768fb..f8f9297 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -3326,7 +3326,7 @@ static void get_cpa_texture(DerivedMesh *dm, ParticleSystem *psys, ParticleSetti
 	float value, rgba[4], texvec[3];
 
 	ptex->ivel = ptex->life = ptex->exist = ptex->size = ptex->damp =
-	ptex->gravity = ptex->field = ptex->time = ptex->clump = ptex->kink =
+	ptex->gravity = ptex->field = ptex->time = ptex->clump = ptex->kink_freq =
 	ptex->effector = ptex->rough1 = ptex->rough2 = ptex->roughe = 1.0f;
 
 	ptex->length = 1.0f - part->randlength * psys_frand(psys, child_index + 26);
@@ -3373,14 +3373,14 @@ static void get_cpa_texture(DerivedMesh *dm, ParticleSystem *psys, ParticleSetti
 
 			SET_PARTICLE_TEXTURE(PAMAP_LENGTH, ptex->length, mtex->lengthfac);
 			SET_PARTICLE_TEXTURE(PAMAP_CLUMP, ptex->clump, mtex->clumpfac);
-			SET_PARTICLE_TEXTURE(PAMAP_KINK, ptex->kink, mtex->kinkfac);
+			SET_PARTICLE_TEXTURE(PAMAP_KINK_FREQ, ptex->kink_freq, mtex->kinkfac);
 			SET_PARTICLE_TEXTURE(PAMAP_DENS, ptex->exist, mtex->padensfac);
 		}
 	}
 
 	CLAMP_PARTICLE_TEXTURE_POS(PAMAP_LENGTH, ptex->length);
 	CLAMP_PARTICLE_TEXTURE_POS(PAMAP_CLUMP, ptex->clump);
-	CLAMP_PARTICLE_TEXTURE_POS(PAMAP_KINK, ptex->kink);
+	CLAMP_PARTICLE_TEXTURE_POS(PAMAP_KINK_FREQ, ptex->kink_freq);
 	CLAMP_PARTICLE_TEXTURE_POS(PAMAP_ROUGH, ptex->rough1);
 	CLAMP_PARTICLE_TEXTURE_POS(PAMAP_DENS, ptex->exist);
 }
@@ -3397,7 +3397,7 @@ void psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTex
 
 	/* initialize ptex */
 	ptex->ivel = ptex->life = ptex->exist = ptex->size = ptex->damp =
-	ptex->gravity = ptex->field = ptex->length = ptex->clump = ptex->kink =
+	ptex->gravity = ptex->field = ptex->length = ptex->clump = ptex->kink_freq =
 	ptex->effector = ptex->rough1 = ptex->rough2 = ptex->roughe = 1.0f;
 
 	ptex->time = (float)(pa - sim->psys->particles) / (float)sim->psys->totpart;
@@ -3551,7 +3551,7 @@ static void get_child_modifier_parameters(ParticleSettings *part, ParticleThread
 	if (ctx->vg_clump)
 		ptex->clump *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_clump);
 	if (ctx->vg_kink)
-		ptex->kink *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_kink);
+		ptex->kink_freq *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_kink);
 	if (ctx->vg_rough1)
 		ptex->rough1 *= psys_interpolate_value_from_verts(ctx->dm, cpa_from, cpa_num, cpa_fuv, ctx->vg_rough1);
 	if (ctx->vg_rough2)
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index e26a61f..d79dd91 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -204,7 +204,7 @@ static void do_kink_spiral(ParticleThreadContext *ctx, ParticleTexture *ptex, co
 	float kink_base[3];
 
 	if (ptex) {
-		kink_freq *= ptex->kink;
+		kink_freq *= ptex->kink_freq;
 		rough1 *= ptex->rough1;
 		rough2 *= ptex->rough2;
 		rough_end *= ptex->roughe;
@@ -677,7 +677,7 @@ void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *ptex, cons
 	const bool smooth_start = (sim->psys->part->childtype == PART_CHILD_FACES);
 
 	if (ptex) {
-		kink_freq *= ptex->kink;
+		kink_freq *= ptex->kink_freq;
 		rough1 *= ptex->rough1;
 		rough2 *= ptex->rough2;
 		rough_end *= ptex->roughe;
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 3f94a9c..c327043 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -438,6 +438,7 @@ typedef struct Material {
 #define MAP_PA_CLUMP	128
 #define MAP_PA_KINK		256
 #define MAP_PA_ROUGH	512
+#define MAP_PA_FREQ		1024
 
 /* pr_type */
 #define MA_FLAT			0
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 819e310..9ea1a55 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -583,24 +583,26 @@ typedef enum eParticleChildFlag {
 #define PTARGET_MODE_ENEMY		2
 
 /* mapto */
-/* init */
-#define PAMAP_INIT		(PAMAP_TIME | PAMAP_LIFE | PAMAP_DENS | PAMAP_SIZE)
-#define PAMAP_TIME		(1<<0)	/* emission time */
-#define PAMAP_LIFE		(1<<1)	/* life time */
-#define PAMAP_DENS		(1<<2)	/* density */
-#define PAMAP_SIZE		(1<<3)	/* physical size */
-/* reset */
-#define PAMAP_IVEL		(1<<5)	/* initial velocity */
-/* physics */
-#define PAMAP_PHYSICS	(PAMAP_FIELD | PAMAP_GRAVITY | PAMAP_DAMP)
-#define PAMAP_FIELD		(1<<6)	/* force fields */
-#define PAMAP_GRAVITY	(1<<10)
-#define PAMAP_DAMP		(1<<11)
-/* children */
-#define PAMAP_CHILD		(PAMAP_CLUMP | PAMAP_KINK | PAMAP_ROUGH | PAMAP_LENGTH)
-#define PAMAP_CLUMP		(1<<7)
-#define PAMAP_KINK		(1<<8)
-#define PAMAP_ROUGH		(1<<9)
-#define PAMAP_LENGTH	(1<<4)
+typedef enum eParticleTextureInfluence {
+	/* init */
+	PAMAP_TIME		= (1<<0),	/* emission time */
+	PAMAP_LIFE		= (1<<1),	/* life time */
+	PAMAP_DENS		= (1<<2),	/* density */
+	PAMAP_SIZE		= (1<<3),	/* physical size */
+	PAMAP_INIT		= (PAMAP_TIME | PAMAP_LIFE | PAMAP_DENS | PAMAP_SIZE),
+	/* reset */
+	PAMAP_IVEL		= (1<<5),	/* initial velocity */
+	/* physics */
+	PAMAP_FIELD		= (1<<6),	/* force fields */
+	PAMAP_GRAVITY	= (1<<10),
+	PAMAP_DAMP		= (1<<11),
+	PAMAP_PHYSICS	= (PAMAP_FIELD | PAMAP_GRAVITY | PAMAP_DAMP),
+	/* children */
+	PAMAP_CLUMP		= (1<<7),
+	PAMAP_KINK_FREQ		= (1<<8),
+	PAMAP_ROUGH		= (1<<9),
+	PAMAP_LENGTH	= (1<<4),
+	PAMAP_CHILD		= (PAMAP_CLUMP | PAMAP_KINK_FREQ | PAMAP_ROUGH | PAMAP_LENGTH),
+} eParticleTextureInfluence;
 
 #endif
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index a687086..ab2e794 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1835,9 +1835,9 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Clump", "Affect the child clumping");
 	RNA_def_property_update(prop, 0, "rna_Particle_reset");
 
-	prop = RNA_def_property(srna, "use_map_kink", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_KINK);
-	RNA_def_property_ui_text(prop, "Kink", "Affect the child kink");
+	prop = RNA_def_property(srna, "use_map_kink_freq", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_KINK_FREQ);
+	RNA_def_property_ui_text(prop, "Kink Frequency", "Affect the child kink frequency");
 	RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
 
 	prop = RNA_def_property(srna, "use_map_rough", PROP_BOOLEAN, PROP_NONE);
@@ -1914,10 +1914,10 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Clump Factor", "Amount texture affects child clump");
 	RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
 
-	prop = RNA_def_property(srna, "kink_factor", PROP_FLOAT, PROP_NONE);
+	prop = RNA_def_property(srna, "kink_freq_factor", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "kinkfac");
 	RNA_def_property_ui_range(prop, 0, 1, 10, 3);
-	RNA_def_property_ui_text(prop, "Kink Factor", "Amount texture affects child kink");
+	RNA_def_property_ui_text(prop, "Kink Frequency Factor", "Amount texture affects child kink frequency");
 	RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
 
 	prop = RNA_def_property(srna, "rough_factor", PROP_FLOAT, PROP_NONE);




More information about the Bf-blender-cvs mailing list