Merge pull request #332 from Reonu/preview-packed-colors

preview vertex colors on packed materials (temporary solution)
This commit is contained in:
Sauraen
2024-04-20 16:32:46 -07:00
committed by GitHub
+4 -1
View File
@@ -1735,7 +1735,10 @@ def update_node_values_of_material(material: Material, context):
else:
nodes["UV"].node_tree = bpy.data.node_groups["UV"]
if f3dMat.rdp_settings.g_lighting:
# This is a temporary measure to be able to see the vertex colors in packed materials.
if bpy.context.scene.f3d_type == "F3DEX3" and f3dMat.rdp_settings.g_packed_normals:
nodes["Shade Color"].node_tree = bpy.data.node_groups["ShdCol_V"]
elif f3dMat.rdp_settings.g_lighting:
nodes["Shade Color"].node_tree = bpy.data.node_groups["ShdCol_L"]
else:
nodes["Shade Color"].node_tree = bpy.data.node_groups["ShdCol_V"]