Blender
V3.3
|
#include <node.h>
Public Attributes | |
ustring | name |
const NodeType * | type |
InternalNode | internal |
LeafNode | leaf |
Protected Member Functions | |
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 () |
Static Protected Member Functions | |
template<typename T > | |
static T & | get_socket_value (const Node *node, const SocketType &socket) |
Protected Attributes | |
const NodeOwner * | owner |
int | ref_count {0} |
SocketModifiedFlags | socket_modified |
Definition at line 89 of file graph/node.h.
|
explicit |
Definition at line 20 of file graph/node.cpp.
References NodeType::inputs, name, NodeType::name, owner, set_default_value(), tag_modified(), and type.
|
pure virtual |
Definition at line 38 of file graph/node.cpp.
void Node::clear_modified | ( | ) |
Definition at line 814 of file graph/node.cpp.
References socket_modified.
|
inline |
Definition at line 198 of file graph/node.h.
References ref_count.
Referenced by Scene::delete_node_impl().
void Node::copy_value | ( | const SocketType & | input, |
const Node & | other, | ||
const SocketType & | other_input | ||
) |
Definition at line 321 of file graph/node.cpp.
References SocketType::BOOLEAN_ARRAY, SocketType::COLOR_ARRAY, SocketType::FLOAT_ARRAY, SocketType::INT_ARRAY, SocketType::is_array(), SocketType::NODE, node, SocketType::NODE_ARRAY, SocketType::NORMAL_ARRAY, SocketType::POINT2_ARRAY, SocketType::POINT_ARRAY, SocketType::size(), src, SocketType::STRING_ARRAY, SocketType::struct_offset, SocketType::TRANSFORM_ARRAY, SocketType::type, and SocketType::VECTOR_ARRAY.
Referenced by ShaderGraph::relink(), and ShaderGraph::remove_proxy_nodes().
|
inline |
Definition at line 190 of file graph/node.h.
References ref_count.
Referenced by set_if_different().
|
protected |
Definition at line 779 of file graph/node.cpp.
References NodeType::inputs, SocketType::NODE, node, SocketType::NODE_ARRAY, type, and SocketType::type.
Referenced by Light::Light(), Background::~Background(), and Geometry::~Geometry().
Definition at line 549 of file graph/node.cpp.
References equals_value(), NodeType::inputs, and type.
bool Node::equals_value | ( | const Node & | other, |
const SocketType & | input | ||
) | const |
Definition at line 485 of file graph/node.cpp.
References SocketType::BOOLEAN, SocketType::BOOLEAN_ARRAY, SocketType::CLOSURE, SocketType::COLOR, SocketType::COLOR_ARRAY, SocketType::ENUM, SocketType::FLOAT, SocketType::FLOAT_ARRAY, SocketType::INT, SocketType::INT_ARRAY, SocketType::NODE, SocketType::NODE_ARRAY, SocketType::NORMAL, SocketType::NORMAL_ARRAY, SocketType::POINT, SocketType::POINT2, SocketType::POINT2_ARRAY, SocketType::POINT_ARRAY, SocketType::STRING, SocketType::STRING_ARRAY, SocketType::TRANSFORM, SocketType::TRANSFORM_ARRAY, SocketType::type, SocketType::UINT, SocketType::UNDEFINED, SocketType::VECTOR, and SocketType::VECTOR_ARRAY.
Referenced by equals(), and ShaderNode::equals().
bool Node::get_bool | ( | const SocketType & | input | ) | const |
Definition at line 179 of file graph/node.cpp.
References SocketType::BOOLEAN, and input.
const array< bool > & Node::get_bool_array | ( | const SocketType & | input | ) | const |
Definition at line 244 of file graph/node.cpp.
References SocketType::BOOLEAN_ARRAY, and input.
float Node::get_float | ( | const SocketType & | input | ) | const |
Definition at line 197 of file graph/node.cpp.
References SocketType::FLOAT, and input.
Referenced by PrincipledBsdfNode::compile(), VolumeNode::compile(), BsdfNode::compile(), ConstantFolder::fold_mix(), ConstantFolder::is_one(), ConstantFolder::is_zero(), and ConstantFolder::try_bypass_or_make_constant().
float2 Node::get_float2 | ( | const SocketType & | input | ) | const |
Definition at line 203 of file graph/node.cpp.
References input, and SocketType::POINT2.
const array< float2 > & Node::get_float2_array | ( | const SocketType & | input | ) | const |
Definition at line 262 of file graph/node.cpp.
References input, and SocketType::POINT2_ARRAY.
float3 Node::get_float3 | ( | const SocketType & | input | ) | const |
Definition at line 209 of file graph/node.cpp.
References input, and is_socket_float3().
Referenced by PrincipledBsdfNode::compile(), ConstantFolder::fold_mix(), ConstantFolder::is_one(), ConstantFolder::is_zero(), and ConstantFolder::try_bypass_or_make_constant().
const array< float3 > & Node::get_float3_array | ( | const SocketType & | input | ) | const |
Definition at line 268 of file graph/node.cpp.
References input, and is_socket_array_float3().
const array< float > & Node::get_float_array | ( | const SocketType & | input | ) | const |
Definition at line 256 of file graph/node.cpp.
References SocketType::FLOAT_ARRAY, and input.
int Node::get_int | ( | const SocketType & | input | ) | const |
Definition at line 185 of file graph/node.cpp.
References SocketType::ENUM, input, and SocketType::INT.
const array< int > & Node::get_int_array | ( | const SocketType & | input | ) | const |
Definition at line 250 of file graph/node.cpp.
References input, and SocketType::INT_ARRAY.
Node * Node::get_node | ( | const SocketType & | input | ) | const |
Definition at line 237 of file graph/node.cpp.
References input, and SocketType::NODE.
const array< Node * > & Node::get_node_array | ( | const SocketType & | input | ) | const |
Definition at line 286 of file graph/node.cpp.
References input, and SocketType::NODE_ARRAY.
const NodeOwner * Node::get_owner | ( | ) | const |
Definition at line 768 of file graph/node.cpp.
References owner.
|
inlinestaticprotected |
Definition at line 207 of file graph/node.h.
References node, SocketType::struct_offset, and T.
Referenced by set_if_different(), and set_value().
ustring Node::get_string | ( | const SocketType & | input | ) | const |
Definition at line 215 of file graph/node.cpp.
References SocketType::ENUM, NodeEnum::exists(), input, and SocketType::STRING.
const array< ustring > & Node::get_string_array | ( | const SocketType & | input | ) | const |
Definition at line 274 of file graph/node.cpp.
References input, and SocketType::STRING_ARRAY.
size_t Node::get_total_size_in_bytes | ( | ) | const |
Definition at line 695 of file graph/node.cpp.
References SocketType::BOOLEAN, SocketType::BOOLEAN_ARRAY, SocketType::CLOSURE, SocketType::COLOR, SocketType::COLOR_ARRAY, SocketType::ENUM, SocketType::FLOAT, SocketType::FLOAT_ARRAY, NodeType::inputs, SocketType::INT, SocketType::INT_ARRAY, SocketType::NODE, SocketType::NODE_ARRAY, SocketType::NORMAL, SocketType::NORMAL_ARRAY, SocketType::POINT, SocketType::POINT2, SocketType::POINT2_ARRAY, SocketType::POINT_ARRAY, SocketType::size(), SocketType::STRING, SocketType::STRING_ARRAY, SocketType::TRANSFORM, SocketType::TRANSFORM_ARRAY, type, SocketType::type, SocketType::UINT, SocketType::UNDEFINED, SocketType::VECTOR, and SocketType::VECTOR_ARRAY.
Referenced by GeometryManager::collect_statistics().
Transform Node::get_transform | ( | const SocketType & | input | ) | const |
Definition at line 231 of file graph/node.cpp.
References input, and SocketType::TRANSFORM.
const array< Transform > & Node::get_transform_array | ( | const SocketType & | input | ) | const |
Definition at line 280 of file graph/node.cpp.
References input, and SocketType::TRANSFORM_ARRAY.
uint Node::get_uint | ( | const SocketType & | input | ) | const |
Definition at line 191 of file graph/node.cpp.
References input, and SocketType::UINT.
bool Node::has_default_value | ( | const SocketType & | input | ) | const |
Definition at line 294 of file graph/node.cpp.
Definition at line 595 of file graph/node.cpp.
References MD5Hash::append(), SocketType::BOOLEAN, SocketType::BOOLEAN_ARRAY, SocketType::CLOSURE, SocketType::COLOR, SocketType::COLOR_ARRAY, SocketType::ENUM, SocketType::FLOAT, SocketType::FLOAT_ARRAY, NodeType::inputs, SocketType::INT, SocketType::INT_ARRAY, SocketType::name, NodeType::name, SocketType::NODE, SocketType::NODE_ARRAY, SocketType::NORMAL, SocketType::NORMAL_ARRAY, SocketType::POINT, SocketType::POINT2, SocketType::POINT2_ARRAY, SocketType::POINT_ARRAY, SocketType::STRING, SocketType::STRING_ARRAY, SocketType::TRANSFORM, SocketType::TRANSFORM_ARRAY, type, SocketType::type, SocketType::UINT, SocketType::UNDEFINED, SocketType::VECTOR, and SocketType::VECTOR_ARRAY.
Definition at line 758 of file graph/node.cpp.
References NodeType::base, and type.
Referenced by xml_read_node().
bool Node::is_modified | ( | ) | const |
Definition at line 804 of file graph/node.cpp.
References socket_modified.
Referenced by Background::device_update(), Film::device_update(), Integrator::device_update(), GeometryManager::device_update(), ObjectManager::device_update(), GeometryManager::device_update_displacement_images(), GeometryManager::device_update_volume_images(), Scene::need_data_update(), Scene::need_reset(), Scene::need_update(), Background::tag_update(), Light::tag_update(), Object::tag_update(), Camera::update(), Film::update_passes(), and BlenderSession::view_draw().
void Node::print_modified_sockets | ( | ) | const |
Definition at line 881 of file graph/node.cpp.
References NodeType::inputs, name, SocketType::name, socket_is_modified(), and type.
|
inline |
Definition at line 185 of file graph/node.h.
References ref_count.
Referenced by ShaderManager::add_default(), and set_if_different().
|
inline |
Definition at line 180 of file graph/node.h.
References ref_count.
Referenced by SVMCompiler::compile_type(), ShaderManager::device_update(), ShaderManager::get_kernel_features(), Scene::get_max_closure_count(), and Shader::tag_used().
void Node::set | ( | const SocketType & | input, |
array< bool > & | value | ||
) |
Definition at line 130 of file graph/node.cpp.
References SocketType::BOOLEAN_ARRAY, input, and set_if_different().
void Node::set | ( | const SocketType & | input, |
array< float > & | value | ||
) |
Definition at line 142 of file graph/node.cpp.
References SocketType::FLOAT_ARRAY, input, and set_if_different().
void Node::set | ( | const SocketType & | input, |
array< float2 > & | value | ||
) |
Definition at line 148 of file graph/node.cpp.
References input, SocketType::POINT2_ARRAY, and set_if_different().
void Node::set | ( | const SocketType & | input, |
array< float3 > & | value | ||
) |
Definition at line 154 of file graph/node.cpp.
References input, is_socket_array_float3(), and set_if_different().
void Node::set | ( | const SocketType & | input, |
array< int > & | value | ||
) |
Definition at line 136 of file graph/node.cpp.
References input, SocketType::INT_ARRAY, and set_if_different().
void Node::set | ( | const SocketType & | input, |
array< Node * > & | value | ||
) |
Definition at line 172 of file graph/node.cpp.
References input, SocketType::NODE_ARRAY, and set_if_different().
void Node::set | ( | const SocketType & | input, |
array< Transform > & | value | ||
) |
Definition at line 166 of file graph/node.cpp.
References input, set_if_different(), and SocketType::TRANSFORM_ARRAY.
void Node::set | ( | const SocketType & | input, |
array< ustring > & | value | ||
) |
Definition at line 160 of file graph/node.cpp.
References input, set_if_different(), and SocketType::STRING_ARRAY.
void Node::set | ( | const SocketType & | input, |
bool | value | ||
) |
Definition at line 57 of file graph/node.cpp.
References SocketType::BOOLEAN, input, and set_if_different().
Referenced by BKE_scene_base_iter_next(), set(), and set_value().
void Node::set | ( | const SocketType & | input, |
const char * | value | ||
) |
Definition at line 93 of file graph/node.cpp.
void Node::set | ( | const SocketType & | input, |
const Transform & | value | ||
) |
Definition at line 117 of file graph/node.cpp.
References input, set_if_different(), and SocketType::TRANSFORM.
|
inline |
Definition at line 108 of file graph/node.h.
void Node::set | ( | const SocketType & | input, |
float | value | ||
) |
Definition at line 75 of file graph/node.cpp.
References SocketType::FLOAT, input, and set_if_different().
void Node::set | ( | const SocketType & | input, |
float2 | value | ||
) |
Definition at line 81 of file graph/node.cpp.
References input, SocketType::POINT2, and set_if_different().
void Node::set | ( | const SocketType & | input, |
float3 | value | ||
) |
Definition at line 87 of file graph/node.cpp.
References input, is_socket_float3(), and set_if_different().
void Node::set | ( | const SocketType & | input, |
int | value | ||
) |
Definition at line 63 of file graph/node.cpp.
References SocketType::ENUM, input, SocketType::INT, and set_if_different().
void Node::set | ( | const SocketType & | input, |
Node * | value | ||
) |
Definition at line 123 of file graph/node.cpp.
References input, SocketType::NODE, and set_if_different().
void Node::set | ( | const SocketType & | input, |
uint | value | ||
) |
Definition at line 69 of file graph/node.cpp.
References input, set_if_different(), and SocketType::UINT.
void Node::set | ( | const SocketType & | input, |
ustring | value | ||
) |
Definition at line 98 of file graph/node.cpp.
References SocketType::ENUM, NodeEnum::exists(), input, set_if_different(), and SocketType::STRING.
void Node::set_default_value | ( | const SocketType & | input | ) |
Definition at line 301 of file graph/node.cpp.
References SocketType::default_value, SocketType::size(), src, and SocketType::struct_offset.
Referenced by Node().
|
protected |
Definition at line 860 of file graph/node.cpp.
References get_socket_value(), input, socket_is_modified(), and socket_modified.
|
protected |
Definition at line 848 of file graph/node.cpp.
References get_socket_value(), input, socket_is_modified(), and socket_modified.
|
protected |
Definition at line 829 of file graph/node.cpp.
References dereference(), input, reference(), and socket_modified.
|
protected |
Definition at line 819 of file graph/node.cpp.
References input, and socket_modified.
Referenced by set().
Definition at line 773 of file graph/node.cpp.
References owner.
Referenced by xml_read_shader_graph().
void Node::set_value | ( | const SocketType & | input, |
const Node & | other, | ||
const SocketType & | other_input | ||
) |
Definition at line 388 of file graph/node.cpp.
References SocketType::BOOLEAN, SocketType::BOOLEAN_ARRAY, SocketType::COLOR, SocketType::COLOR_ARRAY, SocketType::ENUM, SocketType::FLOAT, SocketType::FLOAT_ARRAY, get_socket_value(), SocketType::INT, SocketType::INT_ARRAY, SocketType::is_array(), SocketType::NODE, SocketType::NODE_ARRAY, SocketType::NORMAL, SocketType::NORMAL_ARRAY, SocketType::POINT, SocketType::POINT2, SocketType::POINT2_ARRAY, SocketType::POINT_ARRAY, set(), SocketType::STRING, SocketType::STRING_ARRAY, SocketType::TRANSFORM, SocketType::TRANSFORM_ARRAY, SocketType::type, SocketType::UINT, SocketType::VECTOR, SocketType::VECTOR_ARRAY, and void.
Referenced by add_node(), and ShaderGraph::constant_fold().
bool Node::socket_is_modified | ( | const SocketType & | input | ) | const |
Definition at line 799 of file graph/node.cpp.
References input, and socket_modified.
Referenced by print_modified_sockets(), and set_if_different().
void Node::tag_modified | ( | ) |
Definition at line 809 of file graph/node.cpp.
References socket_modified.
Referenced by Geometry::clear(), Scene::create_node(), Scene::delete_node_impl(), Scene::delete_nodes(), Scene::device_update(), Node(), Scene::reset(), BakeManager::set(), Camera::set_screen_size(), Geometry::tag_bvh_update(), Shader::tag_update(), Integrator::tag_update(), Shader::tag_used(), and Film::update_passes().
InternalNode Node::internal |
Definition at line 163 of file octree.h.
Referenced by Octree::scanConvert().
ustring Node::name |
Definition at line 174 of file graph/node.h.
Referenced by ShaderManager::add_default(), OSLNode::add_input(), OSLNode::add_output(), BlenderSession::bake(), BKE_object_facemap_index_map_create(), ConstantFolder::bypass(), RenderStats::collect_profiling(), GeometryManager::collect_statistics(), CurvesNode::compile(), Geometry::compute_bvh(), ShaderGraph::connect(), copy_particle_systems_to_object(), GeometryManager::create_volume_mesh(), BakeManager::device_update(), ShaderManager::device_update_common(), ObjectManager::device_update_object_transform(), SVMShaderManager::device_update_shader(), ConstantFolder::discard(), GeometryManager::displace(), drw_volume_object_grids_init(), ShaderGraph::dump_graph(), ED_mesh_join_objects_exec(), ed_preview_draw_rect(), Pass::find(), BufferParams::find_pass(), Film::get_aov_offset(), ShaderManager::get_cryptomatte_materials(), ObjectManager::get_cryptomatte_objects(), gpencil_armatures_enum_itemf(), ShaderNode::input(), lineart_gpencil_generate(), ConstantFolder::make_constant(), Geometry::need_attribute(), Node(), ShaderNode::output(), preview_get_world(), print_modified_sockets(), render_image_update_pass_and_layer(), screen_render_invoke(), screen_render_single_layer_set(), ShaderNode::ShaderNode(), OutputAOVNode::simplify_settings(), SVMCompiler::stack_find_offset(), switch_preview_floor_material(), template_id_liboverride_hierarchy_collections_tag_recursive(), blender::bke::VertexGroupsAttributeProvider::try_delete(), blender::bke::VertexGroupsAttributeProvider::try_get_for_read(), blender::bke::VertexGroupsAttributeProvider::try_get_for_write(), GeometryManager::update_osl_attributes(), Hair::update_shadow_transparency(), updateDepsgraph(), xml_read_state(), and xml_write_node().
|
protected |
Definition at line 204 of file graph/node.h.
Referenced by get_owner(), Node(), and set_owner().
|
protected |
Definition at line 205 of file graph/node.h.
Referenced by clear_reference_count(), dereference(), reference(), and reference_count().
|
protected |
Definition at line 212 of file graph/node.h.
Referenced by clear_modified(), is_modified(), set_if_different(), socket_is_modified(), and tag_modified().
const NodeType* Node::type |
Definition at line 175 of file graph/node.h.
Referenced by OSLNode::add_input(), OSLNode::add_output(), CurvesNode::compile(), compile_fallback_shader(), compile_shader_program(), Pass::contains(), ShaderGraph::copy_nodes(), ShaderNode::create_inputs_outputs(), dereference_all_used_nodes(), LightManager::device_update_background(), equals(), ShaderNode::equals(), Pass::find(), BufferParams::find_pass(), BufferParams::get_actual_display_pass(), Pass::get_info(), get_total_size_in_bytes(), HdCyclesDelegate::GetRenderSetting(), HdCyclesDelegate::GetRenderSettingDescriptors(), hash(), OSLNode::input_default_value(), is_a(), Shader::is_constant_emission(), Node(), NODE_DEFINE(), Hair::pack_curves(), print_modified_sockets(), HdCyclesDelegate::SetRenderSetting(), ShaderNode::ShaderNode(), and OSLNode::~OSLNode().