[Bf-blender-cvs] [5e1888965ba] hair_guides: DNA data for explicitly storing hair guide curves.

Lukas Tönne noreply at git.blender.org
Thu Nov 9 09:12:35 CET 2017


Commit: 5e1888965baa8d6eed102eeb66982bd7e536144f
Author: Lukas Tönne
Date:   Sun Sep 10 09:07:26 2017 +0100
Branches: hair_guides
https://developer.blender.org/rB5e1888965baa8d6eed102eeb66982bd7e536144f

DNA data for explicitly storing hair guide curves.

The idea is to separate guide curves from the various methods of
generating them. Guides could be created explicitly (as hair
strands), or automatically from vertices or external mesh data.

A guide then forms the basis for interpolating the render data
(fibers).

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

M	source/blender/makesdna/DNA_hair_types.h

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

diff --git a/source/blender/makesdna/DNA_hair_types.h b/source/blender/makesdna/DNA_hair_types.h
index 3095ecc91fb..9c8203a65b2 100644
--- a/source/blender/makesdna/DNA_hair_types.h
+++ b/source/blender/makesdna/DNA_hair_types.h
@@ -57,20 +57,24 @@ typedef struct HairGroup {
 	
 	char name[64]; /* MAX_NAME */
 	int type;
-	int pad;
+	int flag;
 	
 	struct HairFollicle *follicles;
 	int num_follicles;
+	int pad;
+	
+	struct HairGuideData *guide_data;
+	
+	void *draw_batch_cache;
+	void *draw_texture_cache;
 	
 	/* NORMALS */
 	float normals_max_length;
-
+	int pad2;
+	
 	/* STRANDS */
 	int (*strands_parent_index)[4];
 	float (*strands_parent_weight)[4];
-	
-	void *draw_batch_cache;
-	void *draw_texture_cache;
 } HairGroup;
 
 typedef enum HairGroup_Type {
@@ -78,6 +82,30 @@ typedef enum HairGroup_Type {
 	HAIR_GROUP_TYPE_STRANDS    = 2,
 } HairGroup_Type;
 
+typedef enum HairGroup_Flag {
+	HAIR_GROUP_FLAG_GUIDESDIRTY    = 1,
+} HairGroup_Flag;
+
+typedef struct HairGuide {
+	/* Sample on the scalp mesh for the root vertex */
+	MeshSample mesh_sample;
+	int vertstart;
+	int totvert;
+} HairGuide;
+
+typedef struct HairGuideVertex {
+	int flag;
+	float co[3];
+} HairGuideVertex;
+
+typedef struct HairGuideData {
+	struct HairGuide *guides;
+	int num_guides;
+	
+	struct HairGuideVertex *verts;
+	int totvert;
+} HairGuideData;
+
 #ifdef __cplusplus
 }
 #endif



More information about the Bf-blender-cvs mailing list