|
Blender V4.5
|
#include "scene/shader.h"#include "scene/background.h"#include "scene/integrator.h"#include "scene/light.h"#include "scene/osl.h"#include "scene/scene.h"#include "scene/shader_graph.h"#include "scene/shader_nodes.h"#include "blender/image.h"#include "blender/sync.h"#include "blender/texture.h"#include "blender/util.h"#include "util/set.h"#include "util/string.h"#include "util/task.h"#include "BKE_duplilist.hh"Go to the source code of this file.
Typedefs | |
| using | PtrInputMap = unordered_multimap<void *, ShaderInput *> |
| using | PtrOutputMap = map<void *, ShaderOutput *> |
| using | ProxyMap = map<string, ConvertNode *> |
Functions | |
| static VolumeSampling | get_volume_sampling (PointerRNA &ptr) |
| static VolumeInterpolation | get_volume_interpolation (PointerRNA &ptr) |
| static EmissionSampling | get_emission_sampling (PointerRNA &ptr) |
| static int | validate_enum_value (const int value, const int num_values, const int default_value) |
| static DisplacementMethod | get_displacement_method (BL::Material &b_mat) |
| template<typename NodeType> | |
| static InterpolationType | get_image_interpolation (NodeType &b_node) |
| template<typename NodeType> | |
| static ExtensionType | get_image_extension (NodeType &b_node) |
| static ImageAlphaType | get_image_alpha_type (BL::Image &b_image) |
| static const string_view | object_attr_prefix ("\x01object:") |
| static const string_view | instancer_attr_prefix ("\x01instancer:") |
| static const string_view | view_layer_attr_prefix ("\x01layer:") |
| static ustring | blender_attribute_name_add_type (const string &name, BlenderAttributeType type) |
| BlenderAttributeType | blender_attribute_name_split_type (ustring name, string *r_real_name) |
| static BL::NodeSocket | get_node_output (BL::Node &b_node, const string &name) |
| static float3 | get_node_output_rgba (BL::Node &b_node, const string &name) |
| static float | get_node_output_value (BL::Node &b_node, const string &name) |
| static float3 | get_node_output_vector (BL::Node &b_node, const string &name) |
| static SocketType::Type | convert_socket_type (BL::NodeSocket &b_socket) |
| static void | set_default_value (ShaderInput *input, BL::NodeSocket &b_sock, BL::BlendData &b_data, BL::ID &b_id) |
| static void | get_tex_mapping (TextureNode *mapping, BL::TexMapping &b_mapping) |
| static bool | is_image_animated (BL::Image::source_enum b_image_source, BL::ImageUser &b_image_user) |
| static ShaderNode * | add_node (Scene *scene, BL::RenderEngine &b_engine, BL::BlendData &b_data, BL::Depsgraph &b_depsgraph, BL::Scene &b_scene, ShaderGraph *graph, BL::ShaderNodeTree &b_ntree, BL::ShaderNode &b_node) |
| static bool | node_use_modified_socket_name (ShaderNode *node) |
| static ShaderInput * | node_find_input_by_name (BL::Node b_node, ShaderNode *node, BL::NodeSocket &b_socket) |
| static ShaderOutput * | node_find_output_by_name (BL::Node b_node, ShaderNode *node, BL::NodeSocket &b_socket) |
| static void | add_nodes (Scene *scene, BL::RenderEngine &b_engine, BL::BlendData &b_data, BL::Depsgraph &b_depsgraph, BL::Scene &b_scene, ShaderGraph *graph, BL::ShaderNodeTree &b_ntree, const ProxyMap &proxy_input_map, const ProxyMap &proxy_output_map) |
| static void | add_nodes (Scene *scene, BL::RenderEngine &b_engine, BL::BlendData &b_data, BL::Depsgraph &b_depsgraph, BL::Scene &b_scene, ShaderGraph *graph, BL::ShaderNodeTree &b_ntree) |
| using ProxyMap = map<string, ConvertNode *> |
Definition at line 29 of file blender/shader.cpp.
| using PtrInputMap = unordered_multimap<void *, ShaderInput *> |
Definition at line 27 of file blender/shader.cpp.
| using PtrOutputMap = map<void *, ShaderOutput *> |
Definition at line 28 of file blender/shader.cpp.
|
static |
Definition at line 278 of file blender/shader.cpp.
References add_node(), blender_attribute_name_add_type(), CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID, CLOSURE_BSDF_ASHIKHMIN_VELVET_ID, CLOSURE_BSDF_DIFFUSE_TOON_ID, CLOSURE_BSDF_F82_CONDUCTOR, CLOSURE_BSDF_GLOSSY_TOON_ID, CLOSURE_BSDF_HAIR_REFLECTION_ID, CLOSURE_BSDF_HAIR_TRANSMISSION_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID, CLOSURE_BSDF_MICROFACET_GGX_ID, CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID, CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID, CLOSURE_BSDF_MICROFACET_MULTI_GGX_ID, CLOSURE_BSDF_PHYSICAL_CONDUCTOR, CLOSURE_BSDF_SHEEN_ID, CLOSURE_BSSRDF_BURLEY_ID, CLOSURE_BSSRDF_RANDOM_WALK_ID, CLOSURE_BSSRDF_RANDOM_WALK_SKIN_ID, CLOSURE_VOLUME_DRAINE_ID, CLOSURE_VOLUME_FOURNIER_FORAND_ID, CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID, CLOSURE_VOLUME_MIE_ID, CLOSURE_VOLUME_RAYLEIGH_ID, ShaderGraph::create_node(), get_image_alpha_type(), get_image_extension(), get_image_interpolation(), get_node_output_rgba(), get_node_output_value(), get_node_output_vector(), get_tex_mapping(), ImageSlotTextureNode::handle, PointDensityTextureNode::handle, Scene::image_manager, EnvironmentTextureNode::image_params(), ImageTextureNode::image_params(), PointDensityTextureNode::image_params(), is_image_animated(), mix, Node::name, NODE_PRINCIPLED_HAIR_HUANG, NODE_PRINCIPLED_HAIR_MODEL_NUM, NODE_PRINCIPLED_HAIR_PARAMETRIZATION_NUM, NODE_PRINCIPLED_HAIR_REFLECTANCE, norm(), normalize, point_density_texture_space(), RAMP_TABLE_SIZE, scatter(), Node::set_value(), Scene::shader_manager, sheen(), size(), tiles, transform_inverse(), transform_scale(), and transform_translate().
Referenced by add_node(), and add_nodes().
|
static |
Definition at line 1486 of file blender/shader.cpp.
References add_nodes().
|
static |
Definition at line 1280 of file blender/shader.cpp.
References add_node(), add_nodes(), ShaderGraph::connect(), convert_socket_type(), ShaderGraph::create_node(), input, ShaderNode::inputs, node_find_input_by_name(), node_find_output_by_name(), output, ShaderGraph::output(), ShaderNode::outputs, PointerRNA_NULL, set_default_value(), and SocketType::UNDEFINED.
Referenced by add_nodes(), and add_nodes().
|
static |
Definition at line 116 of file blender/shader.cpp.
References blender_attribute_name_add_type(), instancer_attr_prefix(), object_attr_prefix(), and view_layer_attr_prefix().
Referenced by add_node(), and blender_attribute_name_add_type().
| BlenderAttributeType blender_attribute_name_split_type | ( | ustring | name, |
| string * | r_real_name ) |
Definition at line 130 of file blender/shader.cpp.
References blender_attribute_name_split_type(), instancer_attr_prefix(), object_attr_prefix(), and view_layer_attr_prefix().
Referenced by blender_attribute_name_split_type().
|
static |
Definition at line 187 of file blender/shader.cpp.
References SocketType::CLOSURE, SocketType::COLOR, convert_socket_type(), SocketType::FLOAT, SocketType::INT, SocketType::STRING, SocketType::UNDEFINED, and SocketType::VECTOR.
Referenced by add_nodes(), and convert_socket_type().
|
static |
Definition at line 72 of file blender/shader.cpp.
References DISPLACE_BUMP, DISPLACE_NUM_METHODS, get_displacement_method(), and validate_enum_value().
Referenced by get_displacement_method().
|
static |
Definition at line 58 of file blender/shader.cpp.
References EMISSION_SAMPLING_AUTO, EMISSION_SAMPLING_NUM, and get_emission_sampling().
Referenced by get_emission_sampling().
|
static |
Definition at line 91 of file blender/shader.cpp.
References get_image_alpha_type(), IMAGE_ALPHA_AUTO, IMAGE_ALPHA_NUM_TYPES, and validate_enum_value().
Referenced by add_node(), and get_image_alpha_type().
|
static |
Definition at line 85 of file blender/shader.cpp.
References EXTENSION_NUM_TYPES, EXTENSION_REPEAT, get_image_extension(), and validate_enum_value().
Referenced by add_node(), and get_image_extension().
|
static |
Definition at line 78 of file blender/shader.cpp.
References get_image_interpolation(), INTERPOLATION_LINEAR, INTERPOLATION_NUM_TYPES, and validate_enum_value().
Referenced by add_node(), and get_image_interpolation().
|
static |
Definition at line 154 of file blender/shader.cpp.
References assert, and get_node_output().
Referenced by get_node_output(), get_node_output_rgba(), get_node_output_value(), and get_node_output_vector().
|
static |
Definition at line 165 of file blender/shader.cpp.
References get_node_output(), get_node_output_rgba(), make_float3(), and RNA_float_get_array().
Referenced by add_node(), and get_node_output_rgba().
|
static |
Definition at line 173 of file blender/shader.cpp.
References get_node_output(), get_node_output_value(), and RNA_float_get().
Referenced by add_node(), and get_node_output_value().
|
static |
Definition at line 179 of file blender/shader.cpp.
References get_node_output(), get_node_output_vector(), make_float3(), and RNA_float_get_array().
Referenced by add_node(), and get_node_output_vector().
|
static |
Definition at line 255 of file blender/shader.cpp.
References get_tex_mapping().
Referenced by add_node(), and get_tex_mapping().
|
static |
Definition at line 52 of file blender/shader.cpp.
References get_volume_interpolation(), VOLUME_INTERPOLATION_LINEAR, and VOLUME_NUM_INTERPOLATION.
Referenced by get_volume_interpolation().
|
static |
Definition at line 46 of file blender/shader.cpp.
References get_volume_sampling(), VOLUME_NUM_SAMPLING, and VOLUME_SAMPLING_DISTANCE.
Referenced by get_volume_sampling().
|
static |
References instancer_attr_prefix().
Referenced by blender_attribute_name_add_type(), blender_attribute_name_split_type(), and instancer_attr_prefix().
|
static |
Definition at line 271 of file blender/shader.cpp.
References is_image_animated().
Referenced by add_node(), and is_image_animated().
|
static |
Definition at line 1177 of file blender/shader.cpp.
References input, ShaderNode::input(), node_find_input_by_name(), node_use_modified_socket_name(), string_endswith(), string_replace(), and string_startswith().
Referenced by add_nodes(), and node_find_input_by_name().
|
static |
Definition at line 1247 of file blender/shader.cpp.
References node_find_output_by_name(), node_use_modified_socket_name(), output, ShaderNode::output(), string_endswith(), and string_replace().
Referenced by add_nodes(), and node_find_output_by_name().
|
static |
Definition at line 1168 of file blender/shader.cpp.
References node_use_modified_socket_name(), SHADER_SPECIAL_TYPE_OSL, and ShaderNode::special_type.
Referenced by node_find_input_by_name(), node_find_output_by_name(), and node_use_modified_socket_name().
|
static |
References object_attr_prefix().
Referenced by blender_attribute_name_add_type(), blender_attribute_name_split_type(), and object_attr_prefix().
|
static |
Definition at line 209 of file blender/shader.cpp.
References SocketType::COLOR, SocketType::FLOAT, input, SocketType::INT, make_float3(), SocketType::NORMAL, SocketType::POINT, Node::set(), set_default_value(), SocketType::STRING, and SocketType::VECTOR.
Referenced by add_nodes(), and set_default_value().
|
static |
Definition at line 64 of file blender/shader.cpp.
References validate_enum_value().
Referenced by get_displacement_method(), get_image_alpha_type(), get_image_extension(), get_image_interpolation(), and validate_enum_value().
|
static |
References view_layer_attr_prefix().
Referenced by blender_attribute_name_add_type(), blender_attribute_name_split_type(), and view_layer_attr_prefix().