Blender V2.61 - r43446
|
#include <string.h>
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLF_translation.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_scene.h"
#include "BKE_utildefines.h"
#include "GPU_material.h"
#include "RE_shader_ext.h"
#include "node_exec.h"
#include "node_util.h"
#include "node_shader_util.h"
Go to the source code of this file.
Functions | |
static void | foreach_nodetree (Main *main, void *calldata, bNodeTreeCallback func) |
static void | foreach_nodeclass (Scene *scene, void *calldata, bNodeClassCallback func) |
static void | local_sync (bNodeTree *localtree, bNodeTree *ntree) |
static void | update (bNodeTree *ntree) |
void | ntreeGPUMaterialNodes (bNodeTree *ntree, GPUMaterial *mat) |
void | set_node_shader_lamp_loop (void(*lamp_loop_func)(ShadeInput *, ShadeResult *)) |
bNodeTreeExec * | ntreeShaderBeginExecTree (bNodeTree *ntree, int use_tree_data) |
void | ntreeShaderEndExecTree (bNodeTreeExec *exec, int use_tree_data) |
void | ntreeShaderExecTree (bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr) |
Variables | |
bNodeTreeType | ntreeType_Shader |
void(* | node_shader_lamp_loop )(struct ShadeInput *, struct ShadeResult *) |
Definition in file node_shader_tree.c.
static void foreach_nodeclass | ( | Scene * | scene, |
void * | calldata, | ||
bNodeClassCallback | func | ||
) | [static] |
Definition at line 81 of file node_shader_tree.c.
References IFACE_, NODE_CLASS_CONVERTOR, NODE_CLASS_GROUP, NODE_CLASS_INPUT, NODE_CLASS_LAYOUT, NODE_CLASS_OP_COLOR, NODE_CLASS_OP_VECTOR, NODE_CLASS_OUTPUT, NODE_CLASS_SHADER, NODE_CLASS_TEXTURE, and scene_use_new_shading_nodes().
static void foreach_nodetree | ( | Main * | main, |
void * | calldata, | ||
bNodeTreeCallback | func | ||
) | [static] |
Definition at line 62 of file node_shader_tree.c.
References ListBase::first, Material::id, World::id, Lamp::id, Main::lamp, Main::mat, ID::next, Lamp::nodetree, Material::nodetree, World::nodetree, and Main::world.
Definition at line 98 of file node_shader_tree.c.
References ListBase::first, bNode::new_node, bNode::next, bNodeTree::nodes, ntreeNodeExists(), bNode::preview, bNodePreview::rect, bNodePreview::xsize, and bNodePreview::ysize.
void ntreeGPUMaterialNodes | ( | bNodeTree * | ntree, |
GPUMaterial * | mat | ||
) |
Definition at line 146 of file node_shader_tree.c.
References exec(), ntreeExecGPUNodes(), ntreeShaderBeginExecTree(), and ntreeShaderEndExecTree().
Referenced by GPU_material_from_blender().
bNodeTreeExec* ntreeShaderBeginExecTree | ( | bNodeTree * | ntree, |
int | use_tree_data | ||
) | [read] |
Definition at line 170 of file node_shader_tree.c.
References BLENDER_MAX_THREADS, exec(), bNodeTree::execdata, ListBase::first, MEM_callocN(), bNode::need_exec, bNode::next, bNodeTree::nodes, bNodeTreeExec::nodetree, ntree_exec_begin(), ntreeSetOutput(), and bNodeTreeExec::threadstack.
Referenced by group_initexec(), init_render_material(), ntreeGPUMaterialNodes(), and ntreeShaderExecTree().
void ntreeShaderEndExecTree | ( | bNodeTreeExec * | exec, |
int | use_tree_data | ||
) |
Definition at line 208 of file node_shader_tree.c.
References BLENDER_MAX_THREADS, BLI_freelistN(), bNodeTree::execdata, ListBase::first, MEM_freeN(), bNodeThreadStack::next, bNodeTreeExec::nodetree, ntree_exec_end(), NULL, bNodeThreadStack::stack, and bNodeTreeExec::threadstack.
Referenced by end_render_material(), group_freeexec(), ntreeFreeTree(), and ntreeGPUMaterialNodes().
void ntreeShaderExecTree | ( | bNodeTree * | ntree, |
ShadeInput * | shi, | ||
ShadeResult * | shr | ||
) |
Definition at line 235 of file node_shader_tree.c.
References BLI_lock_thread(), BLI_unlock_thread(), ShadeResult::combined, exec(), bNodeTree::execdata, LOCK_NODES, ShadeInput::mat, ntreeExecThreadNodes(), ntreeGetThreadStack(), ntreeReleaseThreadStack(), ntreeShaderBeginExecTree(), NULL, ShaderCallData::shi, ShaderCallData::shr, and ShadeInput::thread.
Referenced by bake_shade(), shade_input_do_shade(), and shade_ray().
void set_node_shader_lamp_loop | ( | void(*)(ShadeInput *, ShadeResult *) | lamp_loop_func | ) |
Definition at line 161 of file node_shader_tree.c.
References node_shader_lamp_loop.
static void update | ( | bNodeTree * | ntree | ) | [static] |
Definition at line 118 of file node_shader_tree.c.
References ntreeSetOutput().
void(* node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *) |
Definition at line 159 of file node_shader_tree.c.
Referenced by node_shader_exec_material(), and set_node_shader_lamp_loop().
{ NTREE_SHADER, "NTShader Nodetree", { NULL, NULL }, NULL, NULL, foreach_nodetree, foreach_nodeclass, NULL, local_sync, NULL, update, NULL, NULL, node_shader_pass_on, node_mute_get_links, gpu_shader_pass_on }
Definition at line 123 of file node_shader_tree.c.
Referenced by ntreeGetType().