Blender
V3.3
|
#include <shader_graph.h>
Public Attributes | |
vector< ShaderInput * > | inputs |
vector< ShaderOutput * > | outputs |
int | id |
ShaderBump | bump |
ShaderNodeSpecialType | special_type |
![]() | |
ustring | name |
const NodeType * | type |
InternalNode | internal |
LeafNode | leaf |
Additional Inherited Members | |
![]() | |
template<typename T > | |
void | set_if_different (const SocketType &input, T value) |
void | set_if_different (const SocketType &input, Node *value) |
template<typename T > | |
void | set_if_different (const SocketType &input, array< T > &value) |
void | set_if_different (const SocketType &input, array< Node * > &value) |
void | dereference_all_used_nodes () |
![]() | |
template<typename T > | |
static T & | get_socket_value (const Node *node, const SocketType &socket) |
![]() | |
const NodeOwner * | owner |
int | ref_count {0} |
SocketModifiedFlags | socket_modified |
Definition at line 144 of file shader_graph.h.
|
explicit |
Definition at line 66 of file shader_graph.cpp.
References bump, create_inputs_outputs(), Node::name, NodeType::name, SHADER_BUMP_NONE, SHADER_SPECIAL_TYPE_NONE, special_type, and Node::type.
|
virtual |
Definition at line 76 of file shader_graph.cpp.
|
virtual |
Reimplemented in VectorDisplacementNode, TangentNode, NormalMapNode, AttributeNode, VertexColorNode, VolumeInfoNode, PointInfoNode, HairInfoNode, ParticleInfoNode, UVMapNode, TextureCoordinateNode, GeometryNode, PrincipledHairBsdfNode, PrincipledVolumeNode, PrincipledBsdfNode, AnisotropicBsdfNode, PointDensityTextureNode, EnvironmentTextureNode, and ImageTextureNode.
Definition at line 143 of file shader_graph.cpp.
References ATTR_STD_GENERATED, ATTR_STD_GENERATED_TRANSFORM, ATTR_STD_UV, ShaderInput::flags(), Shader::has_surface_link(), Shader::has_volume, input(), inputs, ShaderInput::link, SocketType::LINK_TEXTURE_GENERATED, and SocketType::LINK_TEXTURE_UV.
Referenced by ImageTextureNode::attributes(), EnvironmentTextureNode::attributes(), PointDensityTextureNode::attributes(), AnisotropicBsdfNode::attributes(), PrincipledBsdfNode::attributes(), PrincipledVolumeNode::attributes(), PrincipledHairBsdfNode::attributes(), GeometryNode::attributes(), TextureCoordinateNode::attributes(), UVMapNode::attributes(), ParticleInfoNode::attributes(), HairInfoNode::attributes(), PointInfoNode::attributes(), VolumeInfoNode::attributes(), VertexColorNode::attributes(), AttributeNode::attributes(), NormalMapNode::attributes(), TangentNode::attributes(), and VectorDisplacementNode::attributes().
|
pure virtual |
Implemented in OSLNode, IESLightNode, PointDensityTextureNode, EnvironmentTextureNode, and ImageTextureNode.
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
Reimplemented in VectorDisplacementNode, DisplacementNode, RGBRampNode, FloatCurveNode, VectorCurvesNode, RGBCurvesNode, BumpNode, VectorMathNode, MathNode, ClampNode, BlackbodyNode, SeparateXYZNode, SeparateHSVNode, SeparateRGBNode, SeparateColorNode, BrightContrastNode, GammaNode, CombineXYZNode, CombineHSVNode, CombineRGBNode, CombineColorNode, MixNode, InvertNode, MixClosureNode, AddClosureNode, ColorNode, ValueNode, BackgroundNode, EmissionNode, ConvertNode, RGBToBWNode, and MappingNode.
Definition at line 169 of file shader_graph.h.
Definition at line 85 of file shader_graph.cpp.
References SocketType::flags, NodeType::inputs, inputs, SocketType::LINKABLE, NodeType::outputs, outputs, and Node::type.
Referenced by ShaderGraph::copy_nodes(), and ShaderNode().
|
virtual |
Reimplemented in PointDensityTextureNode, EnvironmentTextureNode, ImageTextureNode, ImageSlotTextureNode, OSLNode, VolumeNode, BsdfBaseNode, OutputAOVNode, and OutputNode.
Definition at line 161 of file shader_graph.cpp.
References bump, Node::equals_value(), SocketType::flags, NodeType::inputs, inputs, ShaderInput::link, SocketType::LINKABLE, NULL, ShaderInput::socket_type, and Node::type.
Referenced by ImageSlotTextureNode::equals(), and PointDensityTextureNode::equals().
|
inlinevirtual |
Reimplemented in MathNode, MapRangeNode, VectorMapRangeNode, VolumeInfoNode, and PrincipledBsdfNode.
Definition at line 163 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in HairBsdfNode, VolumeNode, HoldoutNode, SubsurfaceScatteringNode, RefractionBsdfNode, GlassBsdfNode, GlossyBsdfNode, AnisotropicBsdfNode, and BsdfBaseNode.
Definition at line 238 of file shader_graph.h.
References CLOSURE_NONE_ID.
|
inlinevirtual |
Reimplemented in VectorDisplacementNode, DisplacementNode, BevelNode, BumpNode, VolumeNode, AmbientOcclusionNode, BackgroundNode, EmissionNode, BsdfBaseNode, and VoronoiTextureNode.
Definition at line 232 of file shader_graph.h.
References bump, KERNEL_FEATURE_NODE_BUMP, and SHADER_BUMP_NONE.
Referenced by VoronoiTextureNode::get_feature(), BsdfBaseNode::get_feature(), EmissionNode::get_feature(), BackgroundNode::get_feature(), and VolumeNode::get_feature().
|
inlinevirtual |
Reimplemented in VectorDisplacementNode, TangentNode, NormalMapNode, AttributeNode, VertexColorNode, VolumeInfoNode, PointInfoNode, HairInfoNode, ParticleInfoNode, UVMapNode, TextureCoordinateNode, GeometryNode, PrincipledVolumeNode, PrincipledBsdfNode, AnisotropicBsdfNode, PointDensityTextureNode, EnvironmentTextureNode, and ImageTextureNode.
Definition at line 202 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in SubsurfaceScatteringNode, and PrincipledBsdfNode.
Definition at line 194 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in BsdfBaseNode.
Definition at line 190 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in RefractionBsdfNode, GlassBsdfNode, GlossyBsdfNode, and PrincipledBsdfNode.
Definition at line 206 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in BevelNode, TangentNode, NormalMapNode, OSLNode, BumpNode, WireframeNode, LayerWeightNode, FresnelNode, CameraNode, AttributeNode, VertexColorNode, VolumeInfoNode, PointInfoNode, HairInfoNode, LightFalloffNode, UVMapNode, TextureCoordinateNode, GeometryNode, AmbientOcclusionNode, BsdfBaseNode, and PointDensityTextureNode.
Definition at line 198 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in SubsurfaceScatteringNode, and PrincipledBsdfNode.
Definition at line 186 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in EmissionNode.
Definition at line 178 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in TransparentBsdfNode.
Definition at line 182 of file shader_graph.h.
|
inlinevirtual |
Reimplemented in OSLNode, VolumeNode, and EmissionNode.
Definition at line 210 of file shader_graph.h.
ShaderInput * ShaderNode::input | ( | const char * | name | ) |
Definition at line 98 of file shader_graph.cpp.
References inputs, Node::name, ShaderInput::name(), and NULL.
Referenced by attributes(), AnisotropicBsdfNode::attributes(), PrincipledBsdfNode::attributes(), PrincipledVolumeNode::attributes(), PrincipledHairBsdfNode::attributes(), ShaderGraph::bump_from_displacement(), CurvesNode::compile(), PrincipledBsdfNode::compile(), VolumeNode::compile(), BsdfNode::compile(), ShaderGraph::compute_displacement_hash(), EmissionNode::constant_fold(), BackgroundNode::constant_fold(), AddClosureNode::constant_fold(), MixClosureNode::constant_fold(), InvertNode::constant_fold(), GammaNode::constant_fold(), BumpNode::constant_fold(), RGBCurvesNode::constant_fold(), VectorCurvesNode::constant_fold(), FloatCurveNode::constant_fold(), CurvesNode::constant_fold(), ShaderGraph::constant_fold(), ShaderGraph::copy_nodes(), ImageTextureNode::cull_tiles(), LightManager::device_update_background(), PrincipledBsdfNode::expand(), MapRangeNode::expand(), MathNode::expand(), ShaderGraph::finalize(), ConstantFolder::fold_mapping(), ConstantFolder::fold_math(), ConstantFolder::fold_mix(), ConstantFolder::fold_vector_math(), ShaderManager::get_kernel_features(), SubsurfaceScatteringNode::has_bssrdf_bump(), BsdfBaseNode::has_bump(), PrincipledBsdfNode::has_integrator_dependency(), GlossyBsdfNode::has_integrator_dependency(), GlassBsdfNode::has_integrator_dependency(), RefractionBsdfNode::has_integrator_dependency(), PrincipledBsdfNode::has_surface_bssrdf(), Shader::is_constant_emission(), remove_input(), Shader::set_graph(), OutputAOVNode::simplify_settings(), GlossyBsdfNode::simplify_settings(), GlassBsdfNode::simplify_settings(), RefractionBsdfNode::simplify_settings(), ShaderGraph::transform_multi_closure(), and ShaderGraph::verify_volume_output().
ShaderInput * ShaderNode::input | ( | ustring | name | ) |
Definition at line 117 of file shader_graph.cpp.
References inputs, Node::name, ShaderInput::name(), and NULL.
ShaderOutput * ShaderNode::output | ( | const char * | name | ) |
Definition at line 108 of file shader_graph.cpp.
References Node::name, ShaderOutput::name(), NULL, and outputs.
Referenced by CCL_NAMESPACE_BEGIN::ShaderGraphBuilder::add_connection(), ShaderManager::add_default(), GeometryNode::attributes(), TextureCoordinateNode::attributes(), UVMapNode::attributes(), ParticleInfoNode::attributes(), HairInfoNode::attributes(), PointInfoNode::attributes(), VolumeInfoNode::attributes(), VertexColorNode::attributes(), AttributeNode::attributes(), ShaderGraph::bump_from_displacement(), VectorMathNode::constant_fold(), BumpNode::constant_fold(), RGBRampNode::constant_fold(), ShaderGraph::constant_fold(), ShaderGraph::copy_nodes(), ShaderGraph::default_inputs(), LightManager::device_update_background(), PrincipledBsdfNode::expand(), VolumeInfoNode::expand(), MapRangeNode::expand(), MathNode::expand(), and ShaderGraph::transform_multi_closure().
ShaderOutput * ShaderNode::output | ( | ustring | name | ) |
Definition at line 127 of file shader_graph.cpp.
References Node::name, ShaderOutput::name(), NULL, and outputs.
void ShaderNode::remove_input | ( | ShaderInput * | input | ) |
Definition at line 136 of file shader_graph.cpp.
References input(), inputs, ShaderInput::link, NULL, and blender::bke::attribute_accessor_functions::remove().
Referenced by PrincipledBsdfNode::expand().
Reimplemented in RefractionBsdfNode, GlassBsdfNode, GlossyBsdfNode, and OutputAOVNode.
Definition at line 176 of file shader_graph.h.
ShaderBump ShaderNode::bump |
Definition at line 218 of file shader_graph.h.
Referenced by equals(), get_feature(), and ShaderNode().
int ShaderNode::id |
Definition at line 217 of file shader_graph.h.
Referenced by ShaderGraph::break_cycles(), ShaderNodeIDComparator::operator()(), and ShaderGraph::remove_proxy_nodes().
vector<ShaderInput *> ShaderNode::inputs |
Definition at line 214 of file shader_graph.h.
Referenced by add_nodes(), ConstantFolder::all_inputs_constant(), attributes(), OSLNode::clone(), ConvertNode::constant_fold(), ShaderGraph::copy_nodes(), create_inputs_outputs(), equals(), SVMCompiler::generate_multi_closure(), input(), remove_input(), ShaderGraph::remove_proxy_nodes(), ConstantFolder::try_bypass_or_make_constant(), xml_read_shader_graph(), and ~ShaderNode().
vector<ShaderOutput *> ShaderNode::outputs |
Definition at line 215 of file shader_graph.h.
Referenced by add_node(), add_nodes(), SeparateColorNode::constant_fold(), SeparateRGBNode::constant_fold(), SeparateHSVNode::constant_fold(), SeparateXYZNode::constant_fold(), ShaderGraph::copy_nodes(), create_inputs_outputs(), ShaderGraph::deduplicate_nodes(), output(), ShaderGraph::remove_proxy_nodes(), xml_read_shader_graph(), and ~ShaderNode().
ShaderNodeSpecialType ShaderNode::special_type |
Definition at line 220 of file shader_graph.h.
Referenced by BsdfBaseNode::BsdfBaseNode(), ConvertNode::constant_fold(), ConvertNode::ConvertNode(), SubsurfaceScatteringNode::has_bssrdf_bump(), BsdfBaseNode::has_bump(), ImageSlotTextureNode::ImageSlotTextureNode(), ShaderGraph::remove_proxy_nodes(), and ShaderNode().