Commit: 085f043447ec544f617e433efcac8993428865ca
Author: Lukas Tönne
Date:   Thu May 24 10:23:25 2018 +0100
Branches: hair_guides_grooming
https://developer.blender.org/rB085f043447ec544f617e433efcac8993428865ca

Draw mode for hair guide curves.

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

M       source/blender/makesdna/DNA_hair_types.h
M       source/blender/makesrna/intern/rna_hair.c

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

diff --git a/source/blender/makesdna/DNA_hair_types.h 
b/source/blender/makesdna/DNA_hair_types.h
index 34e195b6d63..ecf55eb9248 100644
--- a/source/blender/makesdna/DNA_hair_types.h
+++ b/source/blender/makesdna/DNA_hair_types.h
@@ -110,8 +110,8 @@ typedef enum eHairSystemFlag
 typedef struct HairDrawSettings
 {
        short follicle_mode;
-       short pad1;
-       int pad2;
+       short guide_mode;
+       int pad;
 } HairDrawSettings;
 
 typedef enum eHairDrawFollicleMode
@@ -120,6 +120,12 @@ typedef enum eHairDrawFollicleMode
        HAIR_DRAW_FOLLICLE_POINTS   = 1,
 } eHairDrawFollicleMode;
 
+typedef enum eHairDrawGuideMode
+{
+       HAIR_DRAW_GUIDE_NONE        = 0,
+       HAIR_DRAW_GUIDE_CURVES      = 1,
+} eHairDrawGuideMode;
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/makesrna/intern/rna_hair.c 
b/source/blender/makesrna/intern/rna_hair.c
index 5ac7224559d..f2fdbfbdc48 100644
--- a/source/blender/makesrna/intern/rna_hair.c
+++ b/source/blender/makesrna/intern/rna_hair.c
@@ -209,6 +209,12 @@ static void rna_def_hair_draw_settings(BlenderRNA *brna)
            {0, NULL, 0, NULL, NULL}
        };
        
+       static const EnumPropertyItem guide_mode_items[] = {
+           {HAIR_DRAW_GUIDE_NONE, "NONE", 0, "None", ""},
+           {HAIR_DRAW_GUIDE_CURVES, "CURVES", 0, "Curves", "Draw guide 
curves"},
+           {0, NULL, 0, NULL, NULL}
+       };
+       
        srna = RNA_def_struct(brna, "HairDrawSettings", NULL);
        RNA_def_struct_ui_text(srna, "Hair Draw Settings", "Settings for 
drawing hair systems");
        RNA_def_struct_sdna(srna, "HairDrawSettings");
@@ -216,6 +222,10 @@ static void rna_def_hair_draw_settings(BlenderRNA *brna)
        prop = RNA_def_property(srna, "follicle_mode", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_items(prop, follicle_mode_items);
        RNA_def_property_ui_text(prop, "Follicle Mode", "Draw follicles on the 
scalp surface");
+       
+       prop = RNA_def_property(srna, "guide_mode", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_items(prop, guide_mode_items);
+       RNA_def_property_ui_text(prop, "Guide Mode", "Draw guide curves");
 }
 
 void RNA_def_hair(BlenderRNA *brna)

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

Reply via email to