This commit is contained in:
nicomacbookpro
2025-08-28 15:10:09 +08:00
parent bc75e5e298
commit 529384a8e6
13 changed files with 18262 additions and 3 deletions

View File

@@ -43,9 +43,7 @@ def create_nothing_material():
def create_emissive_material():
mat = bpy.data.materials.new(name="emissive")
mat.use_nodes = True
bsdf = mat.node_tree.nodes["Principled BSDF"]
# 在Blender 4.0+中,发光属性可能位置不同
bsdf = mat.node_tree.nodes["Principled BSDF"]
try:
if "Emission" in bsdf.inputs:
bsdf.inputs["Emission"].default_value = (1.0, 0.8, 0.2, 1.0)