You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a developer merges/appends objects from other blend files and those objects have the same material. The glTf Setting node gets incremented by adding a .00x to it. These produce warning errors on export about Occlusion/Comp materials.
PR? add to msfs_material_panel.py
class MSFS_OT_glTfSettingsMaterialData(bpy.types.Operator): # TODO: Remove eventually
"""This addon changes some of the internal property names. glTf Settings will be updated for ALL materials."""
bl_idname = "msfs.gltfsetttings_material_data"
bl_label = "Reset glTf Settings Material Data"
@staticmethod
def gltf_settings_with_dot_present():
# Ensure the material has a shader node tree
for material in bpy.data.materials:
if material.use_nodes:
for node in material.node_tree.nodes:
# Check if the node is a group node with a name "glTF Settings new"
if node.type == 'GROUP' and node.node_tree and ( 'glTF Settings.' in node.node_tree.name) :
return True
return False
def execute(self, context):
# Ensure the material has a shader node tree
for material in bpy.data.materials:
if material.use_nodes:
for node in material.node_tree.nodes:
# Check if the node is a group node with a name "glTF Settings new"
if node.type == 'GROUP' and node.node_tree and ( 'glTF Settings.' in node.node_tree.name) :
# Reassign the proper node group
proper_occlusion_node_tree = bpy.data.node_groups.get("glTF Settings")
node.node_tree = proper_occlusion_node_tree
print(f"Reassigned 'glTF Settings.xxx' to 'glTF Settings' in material '{material.name}'", node.node_tree.name)
return {"FINISHED"}
then add
if mat:
if MSFS_OT_glTfSettingsMaterialData.gltf_settings_with_dot_present():
layout.operator(MSFS_OT_glTfSettingsMaterialData.bl_idname)
The text was updated successfully, but these errors were encountered:
When a developer merges/appends objects from other blend files and those objects have the same material. The glTf Setting node gets incremented by adding a .00x to it. These produce warning errors on export about Occlusion/Comp materials.
PR? add to msfs_material_panel.py
then add
The text was updated successfully, but these errors were encountered: