Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_particle_info.cc
| Show All 31 Lines | |||||
| #if 0 /* quaternion sockets not yet supported */ | #if 0 /* quaternion sockets not yet supported */ | ||||
| {SOCK_QUATERNION, "Rotation"}, | {SOCK_QUATERNION, "Rotation"}, | ||||
| #endif | #endif | ||||
| {SOCK_FLOAT, "Size"}, | {SOCK_FLOAT, "Size"}, | ||||
| {SOCK_VECTOR, "Velocity"}, | {SOCK_VECTOR, "Velocity"}, | ||||
| {SOCK_VECTOR, "Angular Velocity"}, | {SOCK_VECTOR, "Angular Velocity"}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static void node_shader_exec_particle_info(void *UNUSED(data), | |||||
| int UNUSED(thread), | |||||
| bNode *UNUSED(node), | |||||
| bNodeExecData *UNUSED(execdata), | |||||
| bNodeStack **UNUSED(in), | |||||
| bNodeStack **UNUSED(out)) | |||||
| { | |||||
| } | |||||
| static int gpu_shader_particle_info(GPUMaterial *mat, | static int gpu_shader_particle_info(GPUMaterial *mat, | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| GPUNodeStack *in, | GPUNodeStack *in, | ||||
| GPUNodeStack *out) | GPUNodeStack *out) | ||||
| { | { | ||||
| Show All 14 Lines | |||||
| void register_node_type_sh_particle_info() | void register_node_type_sh_particle_info() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_particle_info_cc; | namespace file_ns = blender::nodes::node_shader_particle_info_cc; | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_PARTICLE_INFO, "Particle Info", NODE_CLASS_INPUT); | sh_node_type_base(&ntype, SH_NODE_PARTICLE_INFO, "Particle Info", NODE_CLASS_INPUT); | ||||
| node_type_socket_templates(&ntype, nullptr, file_ns::outputs); | node_type_socket_templates(&ntype, nullptr, file_ns::outputs); | ||||
| node_type_exec(&ntype, nullptr, nullptr, file_ns::node_shader_exec_particle_info); | |||||
| node_type_gpu(&ntype, file_ns::gpu_shader_particle_info); | node_type_gpu(&ntype, file_ns::gpu_shader_particle_info); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||