Blender
V3.3
|
#include <Materials.h>
Public Member Functions | |
MaterialNode (bContext *C, COLLADAFW::EffectCommon *ef, Material *ma, UidImageMap &uid_image_map) | |
MaterialNode (bContext *C, Material *ma, KeyImageMap &key_image_map) | |
Image * | get_diffuse_image () |
void | set_diffuse (COLLADAFW::ColorOrTexture &cot) |
void | set_specular (COLLADAFW::ColorOrTexture &cot) |
void | set_ambient (COLLADAFW::ColorOrTexture &cot) |
void | set_reflective (COLLADAFW::ColorOrTexture &cot) |
void | set_emission (COLLADAFW::ColorOrTexture &cot) |
void | set_opacity (COLLADAFW::ColorOrTexture &cot) |
void | set_reflectivity (COLLADAFW::FloatOrParam &val) |
void | set_shininess (COLLADAFW::FloatOrParam &val) |
void | set_ior (COLLADAFW::FloatOrParam &val) |
void | set_alpha (COLLADAFW::EffectCommon::OpaqueMode mode, COLLADAFW::ColorOrTexture &cot, COLLADAFW::FloatOrParam &val) |
void | update_material_nodetree () |
Definition at line 19 of file Materials.h.
MaterialNode::MaterialNode | ( | bContext * | C, |
COLLADAFW::EffectCommon * | ef, | ||
Material * | ma, | ||
UidImageMap & | uid_image_map | ||
) |
Definition at line 19 of file Materials.cpp.
References C, NODE_SELECT, SH_NODE_ADD_SHADER, SH_NODE_BSDF_PRINCIPLED, SH_NODE_BSDF_TRANSPARENT, SH_NODE_EMISSION, SH_NODE_MIX_SHADER, and SH_NODE_OUTPUT_MATERIAL.
MaterialNode::MaterialNode | ( | bContext * | C, |
Material * | ma, | ||
KeyImageMap & | key_image_map | ||
) |
Definition at line 7 of file Materials.cpp.
References SH_NODE_BSDF_PRINCIPLED, and SH_NODE_OUTPUT_MATERIAL.
Image * MaterialNode::get_diffuse_image | ( | ) |
Definition at line 249 of file Materials.cpp.
References bNodeLink::fromnode, bNode::id, image(), bNodeSocket::link, nodeFindSocket(), ntreeFindType(), SH_NODE_BSDF_PRINCIPLED, SH_NODE_TEX_IMAGE, SOCK_IN, and bNode::type.
void MaterialNode::set_alpha | ( | COLLADAFW::EffectCommon::OpaqueMode | mode, |
COLLADAFW::ColorOrTexture & | cot, | ||
COLLADAFW::FloatOrParam & | val | ||
) |
Definition at line 172 of file Materials.cpp.
References Material::a, col, Color, bNodeSocket::default_value, nodeFindSocket(), and SOCK_IN.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_ambient | ( | COLLADAFW::ColorOrTexture & | cot | ) |
Definition at line 290 of file Materials.cpp.
References col, Color, node, set_color(), and SH_NODE_RGB.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_diffuse | ( | COLLADAFW::ColorOrTexture & | cot | ) |
Definition at line 218 of file Materials.cpp.
References Material::a, Material::b, col, Color, bNodeSocket::default_value, Material::g, if(), nodeFindSocket(), Material::r, and SOCK_IN.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_emission | ( | COLLADAFW::ColorOrTexture & | cot | ) |
Definition at line 322 of file Materials.cpp.
References col, Color, bNodeSocket::default_value, nodeFindSocket(), and SOCK_IN.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_ior | ( | COLLADAFW::FloatOrParam & | val | ) |
Definition at line 158 of file Materials.cpp.
References bNodeSocket::default_value, usdtokens::ior(), nodeFindSocket(), and SOCK_IN.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_opacity | ( | COLLADAFW::ColorOrTexture & | cot | ) |
Definition at line 349 of file Materials.cpp.
References col, Color, bNodeSocket::default_value, nodeFindSocket(), and SOCK_IN.
void MaterialNode::set_reflective | ( | COLLADAFW::ColorOrTexture & | cot | ) |
Definition at line 306 of file Materials.cpp.
References col, Color, node, set_color(), and SH_NODE_RGB.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_reflectivity | ( | COLLADAFW::FloatOrParam & | val | ) |
Definition at line 136 of file Materials.cpp.
References bNodeSocket::default_value, Material::metallic, nodeFindSocket(), and SOCK_IN.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_shininess | ( | COLLADAFW::FloatOrParam & | val | ) |
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::set_specular | ( | COLLADAFW::ColorOrTexture & | cot | ) |
Definition at line 374 of file Materials.cpp.
References col, Color, bNodeSocket::default_value, node, nodeFindSocket(), set_color(), SH_NODE_RGB, and SOCK_IN.
Referenced by DocumentImporter::write_profile_COMMON().
void MaterialNode::update_material_nodetree | ( | ) |
Definition at line 95 of file Materials.cpp.
References BKE_ntree_update_main_tree(), and CTX_data_main().
Referenced by DocumentImporter::write_profile_COMMON().