Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2016-03-24 13:41:44 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-03-24 14:07:03 +0300
commitbdae647670817f4c09d4c871314f237dde1bfaac (patch)
tree59907fb1b268a3023e43b3b4568798a5e4c3f7e2 /source/blender/makesdna/DNA_node_types.h
parent8e9a55f1e51daaadf92cd4f8236e3214b8db7c85 (diff)
Color sources for point density textures based on mesh vertices
This patch adds support for coloring point density textures based on several mesh vertex attributes. * Vertex Color: Use a vertex color layer for coloring the point density texture * Vertex Weight: Use a weights from a vertex group as intensity values. (for Blender Render engine the additional color band is used) * Vertex Normals: Use object-space vertex normals as RGB values. The vertex color source enum is stored separately from the particle color source, to avoid invalid values when switching. Note that vertex colors are technically "corner colors" (MLoop), so each vertex can have as many colors as faces it is part of. For the purpose of point density the mloop colors are simply averaged, which is physically plausible because corners can be viewed as multiple points in the same location.
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r--source/blender/makesdna/DNA_node_types.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index cf5d2dfc815..c75a019a28e 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -807,7 +807,8 @@ typedef struct NodeShaderTexPointDensity {
short space;
short interpolation;
short color_source;
- short pad2;
+ short ob_color_source;
+ char vertex_attribute_name[64]; /* vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME */
PointDensity pd;
} NodeShaderTexPointDensity;
@@ -1142,4 +1143,10 @@ enum {
SHD_POINTDENSITY_COLOR_PARTVEL = 3,
};
+enum {
+ SHD_POINTDENSITY_COLOR_VERTCOL = 0,
+ SHD_POINTDENSITY_COLOR_VERTWEIGHT = 1,
+ SHD_POINTDENSITY_COLOR_VERTNOR = 2,
+};
+
#endif