Skip to content

Commit f872007

Browse files
author
nkx
committed
ignore diffusetexture alpha if support recoloring
1 parent d793719 commit f872007

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

io_mesh_w3d/common/materials/RA3/properties.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,13 @@ def OnDiffuseTextureChanged(self, context):
505505
self.node_tree.links.new(tex_spec.outputs["Color"], spec_sepa_node.inputs["Color"])
506506

507507
#self.node_tree.links.new(tex_node.outputs["Color"], principled.node_principled_bsdf.inputs["Base Color"])
508-
self.node_tree.links.new(tex_diffuse.outputs["Alpha"], principled.node_principled_bsdf.inputs["Alpha"])
508+
if "Allied" in self.material_type or "Soviet" in self.material_type or "Japan" in self.material_type:
509+
inputs = principled.node_principled_bsdf.inputs["Alpha"]
510+
if inputs.is_linked:
511+
link = inputs.links[0]
512+
self.node_tree.links.remove(link)
513+
else:
514+
self.node_tree.links.new(tex_diffuse.outputs["Alpha"], principled.node_principled_bsdf.inputs["Alpha"])
509515

510516
faction_color_node = create_node_no_repeative(nodes, 'ShaderNodeRGB', "faction_color_node")
511517
faction_color_node.outputs["Color"].default_value = (*self.faction_color, 1.0) # Convert to 4D vector

readme_plugin_cn.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ GitHub地址:https://github.com/nkx111/OpenSAGE.BlenderPlugin
1818
1. 同时导入和管理多个动画
1919
2. 动画透明度channel问题、多channel动画导出疑似存在异常
2020

21+
2025/6/21(0.8.1) 更新:
22+
修复了导入插件后无法识别的问题。
23+
2124
2025/6/7(0.8.1) 更新:
2225
修复【分离顶点】导致顶点法向异常的问题。(当一个顶点有多个uv坐标时(即该顶点附近贴图不连续),需要【分离顶点】)
2326
允许不退回物体模式导出。导出时自动退回物体模式。

0 commit comments

Comments
 (0)