Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/texture/node_texture_tree.c
| Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | else if (snode->texfrom == SNODE_TEX_LINESTYLE) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCallback func) | static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCallback func) | ||||
| { | { | ||||
| func(calldata, NODE_CLASS_INPUT, N_("Input")); | func(calldata, NODE_CLASS_INPUT, N_("Input")); | ||||
| func(calldata, NODE_CLASS_OUTPUT, N_("Output")); | func(calldata, NODE_CLASS_OUTPUT, N_("Output")); | ||||
| func(calldata, NODE_CLASS_TEXTURE, N_("Texture")); | |||||
| func(calldata, NODE_CLASS_OP_COLOR, N_("Color")); | func(calldata, NODE_CLASS_OP_COLOR, N_("Color")); | ||||
| func(calldata, NODE_CLASS_PATTERN, N_("Patterns")); | func(calldata, NODE_CLASS_OP_VECTOR, N_("Vector")); | ||||
| func(calldata, NODE_CLASS_TEXTURE, N_("Textures")); | |||||
| func(calldata, NODE_CLASS_CONVERTER, N_("Converter")); | func(calldata, NODE_CLASS_CONVERTER, N_("Converter")); | ||||
| func(calldata, NODE_CLASS_DISTORT, N_("Distort")); | |||||
| func(calldata, NODE_CLASS_GROUP, N_("Group")); | func(calldata, NODE_CLASS_GROUP, N_("Group")); | ||||
| func(calldata, NODE_CLASS_INTERFACE, N_("Interface")); | func(calldata, NODE_CLASS_INTERFACE, N_("Interface")); | ||||
| func(calldata, NODE_CLASS_LAYOUT, N_("Layout")); | func(calldata, NODE_CLASS_LAYOUT, N_("Layout")); | ||||
| } | } | ||||
| /* XXX muting disabled in previews because of threading issues with the main execution | /* XXX muting disabled in previews because of threading issues with the main execution | ||||
| * it works here, but disabled for consistency | * it works here, but disabled for consistency | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | bNodeTreeExec *ntreeTexBeginExecTree_internal(bNodeExecContext *context, | ||||
| for (node = exec->nodetree->nodes.first; node; node = node->next) { | for (node = exec->nodetree->nodes.first; node; node = node->next) { | ||||
| node->need_exec = 1; | node->need_exec = 1; | ||||
| } | } | ||||
| return exec; | return exec; | ||||
| } | } | ||||
| #if 0 | |||||
| bNodeTreeExec *ntreeTexBeginExecTree(bNodeTree *ntree) | bNodeTreeExec *ntreeTexBeginExecTree(bNodeTree *ntree) | ||||
| { | { | ||||
| bNodeExecContext context; | bNodeExecContext context; | ||||
| bNodeTreeExec *exec; | bNodeTreeExec *exec; | ||||
| /* XXX hack: prevent exec data from being generated twice. | /* XXX hack: prevent exec data from being generated twice. | ||||
| * this should be handled by the renderer! | * this should be handled by the renderer! | ||||
| */ | */ | ||||
| if (ntree->execdata) { | if (ntree->execdata) { | ||||
| return ntree->execdata; | return ntree->execdata; | ||||
| } | } | ||||
| context.previews = ntree->previews; | context.previews = ntree->previews; | ||||
| exec = ntreeTexBeginExecTree_internal(&context, ntree, NODE_INSTANCE_KEY_BASE); | exec = ntreeTexBeginExecTree_internal(&context, ntree, NODE_INSTANCE_KEY_BASE); | ||||
| /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, | /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, | ||||
| * which only store the ntree pointer. Should be fixed at some point! | * which only store the ntree pointer. Should be fixed at some point! | ||||
| */ | */ | ||||
| ntree->execdata = exec; | ntree->execdata = exec; | ||||
| return exec; | return exec; | ||||
| } | } | ||||
| #endif | |||||
| /* free texture delegates */ | /* free texture delegates */ | ||||
| static void tex_free_delegates(bNodeTreeExec *exec) | static void tex_free_delegates(bNodeTreeExec *exec) | ||||
| { | { | ||||
| bNodeThreadStack *nts; | bNodeThreadStack *nts; | ||||
| bNodeStack *ns; | bNodeStack *ns; | ||||
| int th, a; | int th, a; | ||||
| Show All 27 Lines | if (exec->threadstack) { | ||||
| MEM_freeN(exec->threadstack); | MEM_freeN(exec->threadstack); | ||||
| exec->threadstack = NULL; | exec->threadstack = NULL; | ||||
| } | } | ||||
| ntree_exec_end(exec); | ntree_exec_end(exec); | ||||
| } | } | ||||
| #if 0 | |||||
| void ntreeTexEndExecTree(bNodeTreeExec *exec) | void ntreeTexEndExecTree(bNodeTreeExec *exec) | ||||
| { | { | ||||
| if (exec) { | if (exec) { | ||||
| /* exec may get freed, so assign ntree */ | /* exec may get freed, so assign ntree */ | ||||
| bNodeTree *ntree = exec->nodetree; | bNodeTree *ntree = exec->nodetree; | ||||
| ntreeTexEndExecTree_internal(exec); | ntreeTexEndExecTree_internal(exec); | ||||
| /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ | /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | int ntreeTexExecTree(bNodeTree *ntree, | ||||
| nts = ntreeGetThreadStack(exec, thread); | nts = ntreeGetThreadStack(exec, thread); | ||||
| ntreeExecThreadNodes(exec, nts, &data, thread); | ntreeExecThreadNodes(exec, nts, &data, thread); | ||||
| ntreeReleaseThreadStack(nts); | ntreeReleaseThreadStack(nts); | ||||
| retval |= TEX_RGB; | retval |= TEX_RGB; | ||||
| return retval; | return retval; | ||||
| } | } | ||||
| #endif | |||||