Commit: 6a151c186623e2e237cf142343dce6ae28cc7c97
Author: Lukas Tönne
Date:   Sun Jul 24 09:52:19 2016 +0200
Branches: strand_nodes
https://developer.blender.org/rB6a151c186623e2e237cf142343dce6ae28cc7c97

Removed the "effects" settings for statically defined fiber displacement 
effects.

These things will now be possible using nodes.

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

M       release/scripts/startup/bl_ui/properties_data_modifier.py
M       source/blender/editors/space_view3d/drawstrands.c
M       source/blender/gpu/GPU_strands.h
M       source/blender/gpu/intern/gpu_strands_shader.c
M       source/blender/makesdna/DNA_modifier_types.h
M       source/blender/makesrna/intern/rna_modifier.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py 
b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 43d55de..f2dda4d 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -902,22 +902,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col = split.column()
         col.label(text="Shader:")
         col.prop(md, "shader_model", text="")
-        
-        layout.separator()
-
-        box = layout.box()
-        box.prop(md, "use_clump_effect")
-        if md.use_clump_effect:
-            box.prop(md, "clump_thickness")
-            box.prop(md, "clump_shape")
-        
-        box = layout.box()
-        box.prop(md, "use_curl_effect")
-        if md.use_curl_effect:
-            box.prop(md, "curl_thickness")
-            box.prop(md, "curl_shape")
-            box.prop(md, "curl_radius")
-            box.prop(md, "curl_length")
 
         layout.separator()
 
diff --git a/source/blender/editors/space_view3d/drawstrands.c 
b/source/blender/editors/space_view3d/drawstrands.c
index 751af58..4cab9e4 100644
--- a/source/blender/editors/space_view3d/drawstrands.c
+++ b/source/blender/editors/space_view3d/drawstrands.c
@@ -91,17 +91,6 @@ static GPUStrands_FiberPrimitive get_fiber_primitive(int 
smd_fiber_primitive)
        return 0;
 }
 
-static int get_effects(int smd_effects)
-{
-       GPUStrands_Effects effects = 0;
-       if (smd_effects & MOD_STRANDS_EFFECT_CLUMP)
-               effects |= GPU_STRAND_EFFECT_CLUMP;
-       if (smd_effects & MOD_STRANDS_EFFECT_CURL)
-               effects |= GPU_STRAND_EFFECT_CURL;
-       
-       return effects;
-}
-
 static void bind_strands_shader(GPUStrandsShader *shader, RegionView3D *rv3d,
                                 Object *ob, StrandsModifierData *smd, int 
debug_value)
 {
@@ -147,7 +136,6 @@ void draw_strands(Scene *scene, View3D *UNUSED(v3d), 
RegionView3D *rv3d,
        if (!strands->gpu_shader) {
                GPUStrandsShaderParams shader_params;
                shader_params.fiber_primitive = fiber_primitive;
-               shader_params.effects = get_effects(smd->effects);
                shader_params.use_geomshader = use_geomshader;
                shader_params.shader_model = 
get_shader_model(smd->shader_model);
                
diff --git a/source/blender/gpu/GPU_strands.h b/source/blender/gpu/GPU_strands.h
index f936f00..8bff26e 100644
--- a/source/blender/gpu/GPU_strands.h
+++ b/source/blender/gpu/GPU_strands.h
@@ -63,7 +63,6 @@ typedef enum GPUStrands_FiberPrimitive {
 
 typedef struct GPUStrandsShaderParams {
        GPUStrands_FiberPrimitive fiber_primitive;
-       int effects;
        bool use_geomshader;
        GPUStrands_ShaderModel shader_model;
        struct bNodeTree *nodes;
diff --git a/source/blender/gpu/intern/gpu_strands_shader.c 
b/source/blender/gpu/intern/gpu_strands_shader.c
index 4edea90..e585af1 100644
--- a/source/blender/gpu/intern/gpu_strands_shader.c
+++ b/source/blender/gpu/intern/gpu_strands_shader.c
@@ -102,11 +102,6 @@ static void get_defines(GPUStrandsShaderParams *params, 
char *defines)
                        break;
        }
        
-       if (params->effects & GPU_STRAND_EFFECT_CLUMP)
-               strcat(defines, "#define USE_EFFECT_CLUMPING\n");
-       if (params->effects & GPU_STRAND_EFFECT_CURL)
-               strcat(defines, "#define USE_EFFECT_CURL\n");
-       
        if (params->use_geomshader) {
                strcat(defines, "#define USE_GEOMSHADER\n");
        }
diff --git a/source/blender/makesdna/DNA_modifier_types.h 
b/source/blender/makesdna/DNA_modifier_types.h
index 5024e8c..2066867 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1562,13 +1562,11 @@ typedef struct StrandsModifierData {
        
        struct GPUDrawStrands *gpu_buffer;  /* draw data (runtime) */
        
-       int effects;
        float clump_thickness, clump_shape;
        float curl_thickness, curl_shape, curl_radius, curl_length;
        
        int debug_value;                    /* debugging value */
        float debug_scale;                  /* scale for debug vectors */
-       int pad2;
 } StrandsModifierData;
 
 /* StrandsModifierData.flag */
@@ -1596,10 +1594,4 @@ enum {
        MOD_STRANDS_FIBER_RIBBON = 1,
 };
 
-/* StrandsModifierData.effects */
-enum {
-       MOD_STRANDS_EFFECT_CLUMP     = (1 << 0),
-       MOD_STRANDS_EFFECT_CURL         = (1 << 1),
-};
-
 #endif  /* __DNA_MODIFIER_TYPES_H__ */
diff --git a/source/blender/makesrna/intern/rna_modifier.c 
b/source/blender/makesrna/intern/rna_modifier.c
index 4f1f232..e7e8bbd 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -4752,54 +4752,6 @@ static void rna_def_modifier_strands(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Use Geometry Shader", "Use a geometry 
shader to generate fiber primitives");
        RNA_def_property_update(prop, 0, "rna_StrandsModifier_shader_update");
        
-       /* Clumping */
-       prop = RNA_def_property(srna, "use_clump_effect", PROP_BOOLEAN, 
PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "effects", 
MOD_STRANDS_EFFECT_CLUMP);
-       RNA_def_property_ui_text(prop, "Clump", "Hairs stick together and form 
bundles");
-       RNA_def_property_update(prop, 0, "rna_StrandsModifier_shader_update");
-       
-       prop = RNA_def_property(srna, "clump_thickness", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Clump Thickness", "Thickness of fully 
clumped strands");
-       RNA_def_property_update(prop, 0, "rna_Modifier_update");
-       
-       prop = RNA_def_property(srna, "clump_shape", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_range(prop, 0.0f, FLT_MAX);
-       RNA_def_property_ui_range(prop, 0.001f, 10.0f, 0.1f, 3);
-       RNA_def_property_float_default(prop, 1.0f);
-       RNA_def_property_ui_text(prop, "Clump Shape", "Tapering of the clump 
effect");
-       RNA_def_property_update(prop, 0, "rna_Modifier_update");
-       
-       /* Curl */
-       prop = RNA_def_property(srna, "use_curl_effect", PROP_BOOLEAN, 
PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "effects", 
MOD_STRANDS_EFFECT_CURL);
-       RNA_def_property_ui_text(prop, "Curl", "Hairs form spirals");
-       RNA_def_property_update(prop, 0, "rna_StrandsModifier_shader_update");
-
-       prop = RNA_def_property(srna, "curl_thickness", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Curl Thickness", "Thickness of curls");
-       RNA_def_property_update(prop, 0, "rna_Modifier_update");
-       
-       prop = RNA_def_property(srna, "curl_shape", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_range(prop, 0.0f, FLT_MAX);
-       RNA_def_property_ui_range(prop, 0.001f, 10.0f, 0.1f, 3);
-       RNA_def_property_float_default(prop, 1.0f);
-       RNA_def_property_ui_text(prop, "Curl Shape", "Tapering of the curl 
effect");
-       RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
-       prop = RNA_def_property(srna, "curl_radius", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_range(prop, 0.0f, FLT_MAX);
-       RNA_def_property_ui_range(prop, 0.001f, 10.0f, 0.1f, 3);
-       RNA_def_property_ui_text(prop, "Curl Radius", "Radius of curls");
-       RNA_def_property_update(prop, 0, "rna_Modifier_update");
-       
-       prop = RNA_def_property(srna, "curl_length", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_range(prop, 0.0f, FLT_MAX);
-       RNA_def_property_ui_range(prop, 0.001f, 10.0f, 0.1f, 3);
-       RNA_def_property_ui_text(prop, "Curl Length", "Distance between two 
curls along the strand");
-       RNA_def_property_update(prop, 0, "rna_Modifier_update");
-       
        /* Debugging */
        prop = RNA_def_property(srna, "debug_value", PROP_INT, PROP_NONE);
        RNA_def_property_ui_text(prop, "Debug Value", "Value for controlling 
debugging features");

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to