Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_volume_info.c
- This file was moved from source/blender/nodes/shader/nodes/node_shader_volume_info.cc.
| Show All 11 Lines | |||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| * | * | ||||
| * The Original Code is Copyright (C) 2005 Blender Foundation. | * The Original Code is Copyright (C) 2005 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| #include "node_shader_util.hh" | #include "../node_shader_util.h" | ||||
| namespace blender::nodes::node_shader_volume_info_cc { | |||||
| static bNodeSocketTemplate sh_node_volume_info_out[] = { | static bNodeSocketTemplate sh_node_volume_info_out[] = { | ||||
| {SOCK_RGBA, N_("Color")}, | {SOCK_RGBA, N_("Color")}, | ||||
| {SOCK_FLOAT, N_("Density")}, | {SOCK_FLOAT, N_("Density")}, | ||||
| {SOCK_FLOAT, N_("Flame")}, | {SOCK_FLOAT, N_("Flame")}, | ||||
| {SOCK_FLOAT, N_("Temperature")}, | {SOCK_FLOAT, N_("Temperature")}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| Show All 15 Lines | static int node_shader_gpu_volume_info(GPUMaterial *mat, | ||||
| } | } | ||||
| if (out[3].hasoutput) { | if (out[3].hasoutput) { | ||||
| out[3].link = GPU_volume_grid(mat, "temperature", GPU_VOLUME_DEFAULT_0); | out[3].link = GPU_volume_grid(mat, "temperature", GPU_VOLUME_DEFAULT_0); | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| } // namespace blender::nodes::node_shader_volume_info_cc | void register_node_type_sh_volume_info(void) | ||||
| void register_node_type_sh_volume_info() | |||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_volume_info_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_VOLUME_INFO, "Volume Info", NODE_CLASS_INPUT, 0); | sh_node_type_base(&ntype, SH_NODE_VOLUME_INFO, "Volume Info", NODE_CLASS_INPUT, 0); | ||||
| node_type_socket_templates(&ntype, nullptr, file_ns::sh_node_volume_info_out); | node_type_socket_templates(&ntype, NULL, sh_node_volume_info_out); | ||||
| node_type_gpu(&ntype, file_ns::node_shader_gpu_volume_info); | node_type_gpu(&ntype, node_shader_gpu_volume_info); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||