Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/linestyle.c
| Show First 20 Lines • Show All 2,035 Lines • ▼ Show 20 Lines | |||||
| void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linestyle) | void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linestyle) | ||||
| { | { | ||||
| bNode *uv_along_stroke, *input_texture, *output_linestyle; | bNode *uv_along_stroke, *input_texture, *output_linestyle; | ||||
| bNodeSocket *fromsock, *tosock; | bNodeSocket *fromsock, *tosock; | ||||
| bNodeTree *ntree; | bNodeTree *ntree; | ||||
| BLI_assert(linestyle->nodetree == NULL); | BLI_assert(linestyle->nodetree == NULL); | ||||
| ntree = ntreeAddTree(NULL, "stroke_shader", "ShaderNodeTree"); | ntree = ntreeAddTreeEmbedded(NULL, &linestyle->id, "stroke_shader", "ShaderNodeTree"); | ||||
| linestyle->nodetree = ntree; | |||||
| uv_along_stroke = nodeAddStaticNode(C, ntree, SH_NODE_UVALONGSTROKE); | uv_along_stroke = nodeAddStaticNode(C, ntree, SH_NODE_UVALONGSTROKE); | ||||
| uv_along_stroke->locx = 0.0f; | uv_along_stroke->locx = 0.0f; | ||||
| uv_along_stroke->locy = 300.0f; | uv_along_stroke->locy = 300.0f; | ||||
| uv_along_stroke->custom1 = 0; /* use_tips */ | uv_along_stroke->custom1 = 0; /* use_tips */ | ||||
| input_texture = nodeAddStaticNode(C, ntree, SH_NODE_TEX_IMAGE); | input_texture = nodeAddStaticNode(C, ntree, SH_NODE_TEX_IMAGE); | ||||
| input_texture->locx = 200.0f; | input_texture->locx = 200.0f; | ||||
| Show All 20 Lines | |||||