Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc
| Context not available. | |||||
| /* Find sockets linked to "Color" socket in normal map node. */ | /* Find sockets linked to "Color" socket in normal map node. */ | ||||
| linked_sockets_to_dest_id(normal_map_node, *node_tree, "Color", linked_sockets); | linked_sockets_to_dest_id(normal_map_node, *node_tree, "Color", linked_sockets); | ||||
| } | } | ||||
| else if (texture_map.key == eMTLSyntaxElement::map_Ke) { | |||||
| float emission_strength = 0.0f; | |||||
| copy_property_from_node(SOCK_FLOAT, bnode, "Emission Strength", {&emission_strength, 1}); | |||||
| if (emission_strength == 0.0f) { | |||||
| continue; | |||||
| } | |||||
| } | |||||
| else { | else { | ||||
| /* Skip emission map if emission strength is zero. */ | |||||
| if (texture_map.key == eMTLSyntaxElement::map_Ke) { | |||||
| float emission_strength = 0.0f; | |||||
| copy_property_from_node(SOCK_FLOAT, bnode, "Emission Strength", {&emission_strength, 1}); | |||||
| if (emission_strength == 0.0f) { | |||||
| continue; | |||||
| } | |||||
| } | |||||
| /* Find sockets linked to the destination socket of interest, in P-BSDF node. */ | /* Find sockets linked to the destination socket of interest, in P-BSDF node. */ | ||||
| linked_sockets_to_dest_id( | linked_sockets_to_dest_id( | ||||
| bnode, *node_tree, texture_map.value.dest_socket_id, linked_sockets); | bnode, *node_tree, texture_map.value.dest_socket_id, linked_sockets); | ||||
| Context not available. | |||||