1
0
forked from Rowland/EG

修改导入逻辑,避免出现模型与播放动画模型大小不一致问题

This commit is contained in:
Hector 2025-10-15 10:51:00 +08:00
parent 367cde9e54
commit b5dbd96462
11 changed files with 230 additions and 193 deletions

6
.idea/EG.iml generated
View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.10 virtualenv at ~/EG/venv" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">

2
.idea/misc.xml generated
View File

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Python 3.12 (PythonProject)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (EG)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 virtualenv at ~/EG/venv" project-jdk-type="Python SDK" />
</project>

Binary file not shown.

View File

@ -342,53 +342,58 @@ class AssemblyInteractionManager(DirectObject):
"""设置操作是否启用"""
self.operation_enabled = enabled
print(f"🔧 操作权限: {'启用' if enabled else '禁用'}")
def check_operation_permission(self):
"""检查操作权限"""
if not self.is_active:
print("⚠️ 交互模式未激活")
return False
# 获取当前步骤数据
if self.current_step >= self.total_steps:
print("⚠️ 所有步骤已完成")
return False
step_data = self.config_data['steps'][self.current_step]
required_tool = step_data.get('required_tool', '')
# 获取当前选择的工具优先从维修GUI获取
current_tool = ""
if self.maintenance_gui:
current_tool = self.maintenance_gui.get_current_tool()
elif hasattr(self, 'step_dialog') and self.step_dialog and hasattr(self.step_dialog, 'tool_combo'):
current_tool = self.step_dialog.tool_combo.currentText()
# 使用 getChinese 处理工具名称
if hasattr(self.world, 'getChinese'):
required_tool = self.world.getChinese(required_tool)
current_tool = self.world.getChinese(current_tool)
print(f"🔧 工具检查: 需要'{required_tool}',当前'{current_tool}'")
# 检查工具是否匹配
tool_matches = self.check_tool_match(current_tool, required_tool)
if self.mode == "training":
# 训练模式显示GUI警告并阻止错误操作
if not tool_matches:
print("⚠️ 训练模式 - 工具不匹配,无法进行操作")
# 在维修GUI中显示警告
if self.maintenance_gui:
warning_msg = f"请先选择 '{required_tool}' 工具!"
self.maintenance_gui.show_warning(warning_msg, 2.0)
# 也在Qt对话框中显示警告仅在非维修系统模式下
elif hasattr(self, 'step_dialog') and self.step_dialog:
QMessageBox.warning(self.step_dialog, "工具不匹配",
f"当前步骤需要使用 '{required_tool}' 工具,请先选择正确的工具!")
QMessageBox.warning(self.step_dialog, "工具不匹配",
f"当前步骤需要使用 '{required_tool}' 工具,请先选择正确的工具!")
return False
return True
else:
# 考核模式:不显示提示,但记录工具错误并阻止操作
if not tool_matches:
print(f"❌ 考核模式 - 工具错误:需要'{required_tool}',实际选择'{current_tool}',操作被阻止")
# 记录工具错误(扣分)
self.record_tool_error()
return False
@ -693,17 +698,23 @@ class AssemblyInteractionManager(DirectObject):
return
step_data = self.config_data['steps'][self.current_step]
# 兼容中文和英文配置格式
operation_type = self.normalize_operation_type(step_data)
step_type = self.normalize_step_type(step_data)
target_model_name = step_data.get('target_model', '未设置')
# 调试信息:显示字段映射结果
print(f"🔄 字段映射: '{step_data.get('type', 'N/A')}' -> '{step_type}'")
print(f"🔄 操作映射: '{step_data.get('interaction_type', 'N/A')}' -> '{operation_type}'")
print(f"\n=== 开始第 {self.current_step + 1} 步: {step_data.get('name', '未命名')} ===")
# 使用 getChinese 处理步骤名称
step_name = step_data.get('name', '未命名')
if hasattr(self.world, 'getChinese'):
step_name = self.world.getChinese(step_name)
target_model_name = self.world.getChinese(target_model_name)
print(f"\n=== 开始第 {self.current_step + 1} 步: {step_name} ===")
print(f"目标模型: {target_model_name}")
print(f"操作类型: {operation_type}")
print(f"步骤类型: {step_type}")
@ -748,18 +759,23 @@ class AssemblyInteractionManager(DirectObject):
if self.maintenance_gui:
step_name = step_data.get('name', f'步骤 {self.current_step + 1}')
step_description = step_data.get('description', '')
# 使用 getChinese 处理文本
if hasattr(self.world, 'getChineseFont'):
step_name = self.world.getChineseFont()
step_description = self.world.getChineseFont()
if self.mode == "exam":
# 考核模式:只显示步骤编号和名称,不显示描述
step_info = f"考核步骤 {self.current_step + 1}/{self.total_steps}: {step_name}"
step_info = f"Step {self.current_step + 1}/{self.total_steps}: {step_name}"
print(f"📝 考核模式步骤信息: {step_info}")
else:
# 训练模式:显示完整信息
step_info = f"步骤 {self.current_step + 1}/{self.total_steps}: {step_name}"
step_info = f"Step: {self.current_step + 1}/{self.total_steps}: {step_name}"
if step_description:
step_info += f"\n{step_description}"
print(f"📚 训练模式步骤信息: {step_info}")
self.maintenance_gui.update_step_info(step_info)
# 更新Qt步骤对话框仅在非维修系统模式下
@ -2045,6 +2061,11 @@ class StepGuideDialog(QDialog):
self.interaction_manager = interaction_manager
self.current_required_tool = "" # 当前步骤要求的工具
self.mode = interaction_manager.mode # 获取模式
self.chinese_font = None
if hasattr(interaction_manager.world,'getChineseFont'):
self.chinese_font = interaction_manager.world.getChineseFont()
self.setupUI()
def setupUI(self):
@ -2052,82 +2073,105 @@ class StepGuideDialog(QDialog):
self.setWindowTitle("拆装考核")
else:
self.setWindowTitle("拆装步骤指引")
self.setFixedSize(450, 400)
self.setWindowFlags(Qt.Window | Qt.WindowStaysOnTopHint)
layout = QVBoxLayout(self)
# 步骤信息
self.step_info_label = QLabel("准备开始...")
self.step_info_label.setStyleSheet("font-size: 14px; font-weight: bold; color: #2E86C1;")
if self.chinese_font:
self.step_info_label.setFont(self.chinese_font)
layout.addWidget(self.step_info_label)
# 步骤描述(考核模式下隐藏)
if self.mode != "exam":
self.step_desc_text = QTextEdit()
self.step_desc_text.setMaximumHeight(100)
self.step_desc_text.setReadOnly(True)
if self.chinese_font:
self.step_desc_text.setFont(self.chinese_font)
layout.addWidget(self.step_desc_text)
else:
self.step_desc_text = None
# 工具选择组
tool_group = QGroupBox("工具选择")
if self.chinese_font:
tool_group.setFont(self.chinese_font)
tool_layout = QVBoxLayout(tool_group)
# 在训练模式下显示要求的工具,考核模式下不显示
if self.mode != "exam":
self.required_tool_label = QLabel("当前步骤要求工具: 无")
self.required_tool_label.setStyleSheet("font-weight: bold; color: #E74C3C;")
if self.chinese_font:
self.required_tool_label.setFont(self.chinese_font)
tool_layout.addWidget(self.required_tool_label)
else:
self.required_tool_label = None
current_tool_layout = QHBoxLayout()
current_tool_layout.addWidget(QLabel("当前选择工具:"))
current_tool_label = QLabel("当前选择工具:")
if self.chinese_font:
current_tool_label.setFont(self.chinese_font)
current_tool_layout.addWidget(current_tool_label)
self.current_tool_combo = QComboBox()
self.current_tool_combo.addItem("") # 默认只有"无"选项
self.current_tool_combo.currentTextChanged.connect(self.on_tool_changed)
if self.chinese_font:
self.current_tool_combo.setFont(self.chinese_font)
current_tool_layout.addWidget(self.current_tool_combo)
tool_layout.addLayout(current_tool_layout)
# 在训练模式下显示工具状态,考核模式下不显示
if self.mode != "exam":
self.tool_status_label = QLabel("✅ 工具匹配,可以进行操作")
self.tool_status_label.setStyleSheet("color: #27AE60; font-weight: bold;")
if self.chinese_font:
self.tool_status_label.setFont(self.chinese_font)
tool_layout.addWidget(self.tool_status_label)
else:
self.tool_status_label = None
layout.addWidget(tool_group)
# 操作提示(考核模式下隐藏)
if self.mode != "exam":
self.operation_label = QLabel("操作提示:")
self.operation_label.setStyleSheet("font-weight: bold;")
if self.chinese_font:
self.operation_label.setFont(self.chinese_font)
layout.addWidget(self.operation_label)
self.operation_text = QTextEdit()
self.operation_text.setMaximumHeight(80)
self.operation_text.setReadOnly(True)
if self.chinese_font:
self.operation_text.setFont(self.chinese_font)
layout.addWidget(self.operation_text)
else:
self.operation_label = None
self.operation_text = None
# 按钮
button_layout = QHBoxLayout()
self.skip_button = QPushButton("跳过当前步骤")
if self.chinese_font:
self.skip_button.setFont(self.chinese_font)
self.skip_button.clicked.connect(self.skip_current_step)
button_layout.addWidget(self.skip_button)
self.stop_button = QPushButton("停止交互")
if self.chinese_font:
self.stop_button.setFont(self.chinese_font)
self.stop_button.clicked.connect(self.stop_interaction)
button_layout.addWidget(self.stop_button)
layout.addLayout(button_layout)
# 初始化工具状态
self.sync_current_tool()
self.update_tool_status()
def sync_current_tool(self):
"""初始化拆装工具状态"""
# 从配置文件中加载工具列表
@ -2207,7 +2251,7 @@ class StepGuideDialog(QDialog):
def update_step_info(self, step_data, current_step, total_steps):
step_name = step_data.get('name', f'步骤 {current_step}')
if self.mode == "exam":
# 考核模式:显示考核信息
step_score = step_data.get('score', 10)
@ -2216,16 +2260,24 @@ class StepGuideDialog(QDialog):
# 训练模式:正常显示
self.step_info_label.setText(f"{current_step}/{total_steps} 步: {step_name}")
# 为动态文本设置中文字体
if self.chinese_font:
self.step_info_label.setFont(self.chinese_font)
# 步骤描述(考核模式下不显示)
if self.step_desc_text is not None:
step_desc = step_data.get('description', '无描述')
self.step_desc_text.setPlainText(step_desc)
if self.chinese_font:
self.step_desc_text.setFont(self.chinese_font)
# 更新工具要求
self.current_required_tool = step_data.get('required_tool', '')
if self.required_tool_label is not None:
self.required_tool_label.setText(f"当前步骤要求工具: {self.current_required_tool}")
if self.chinese_font:
self.required_tool_label.setFont(self.chinese_font)
# 更新工具状态
self.update_tool_status()
@ -2263,6 +2315,8 @@ class StepGuideDialog(QDialog):
# 操作提示(考核模式下不显示)
if self.operation_text is not None:
self.operation_text.setPlainText(operation_hint)
if self.chinese_font:
self.operation_text.setFont(self.chinese_font)
def skip_current_step(self):
if self.interaction_manager.is_active:

View File

@ -23,7 +23,11 @@ class MaintenanceGUI(DirectObject):
def __init__(self, world):
DirectObject.__init__(self)
self.world = world
self.chinese_font = None
if hasattr(self.world, 'getChineseFont'):
self.chinese_font = self.world.getChineseFont()
# 获取GUI父节点引用
self.aspect2d = None
print(f"🔍 初始化维修GUIworld类型: {type(world).__name__}")
@ -316,7 +320,7 @@ class MaintenanceGUI(DirectObject):
if not self.aspect2d:
print("❌ aspect2d引用不可用无法创建步骤文本")
return
self.step_text = DirectLabel(
text="准备开始维修训练...",
text_align=TextNode.ALeft,
@ -329,7 +333,7 @@ class MaintenanceGUI(DirectObject):
parent=self.aspect2d
)
print("✅ 步骤显示文本创建成功")
except Exception as e:
print(f"❌ 创建步骤文本失败: {e}")
import traceback
@ -427,7 +431,7 @@ class MaintenanceGUI(DirectObject):
return
self.current_tool_text = DirectLabel(
text=f"当前工具: {self.current_tool}",
text=f"Tool: {self.current_tool}",
text_align=TextNode.ALeft,
text_scale=0.07,
text_fg=(1, 1, 0, 1),
@ -530,7 +534,7 @@ class MaintenanceGUI(DirectObject):
# 更新当前工具显示
if self.current_tool_text:
self.current_tool_text['text'] = f"当前工具: {tool}"
self.current_tool_text['text'] = f"Tool: {tool}"
print(f"✅ 当前工具显示已更新")
# 更新按钮样式

View File

@ -7,7 +7,6 @@
- 拖拽变换逻辑
- 射线检测和碰撞检测
"""
from PIL.ImageChops import lighter
from direct.showbase.ShowBaseGlobal import globalClock
from panda3d.core import (Vec3, Point3, Point2, LineSegs, ColorAttrib, RenderState,
DepthTestAttrib, CollisionTraverser, CollisionHandlerQueue,

View File

@ -335,56 +335,56 @@ class CoreWorld(Panda3DWorld):
mat.set_metallic(0.5) # 设置较低的初始金属性
self.ground.set_material(mat)
#创建第二个相同的地面,位置稍有偏移
self.ground2 = self.render.attachNewNode(cm.generate())
self.ground2.setH(-90)
self.ground2.setZ(-1.0)
self.ground2.setX(50) # 在X轴方向偏移
self.ground2.setZ(49) # 在X轴方向偏移
self.ground2.setColor(0.8, 0.8, 0.8, 1)
self.ground2.set_material(mat)
self.ground2.setTag("is_scene_element", "1")
self.ground2.setTag("tree_item_type", "SCENE_NODE")
# 创建第三个相同的地面,位置在另一个方向
self.ground3 = self.render.attachNewNode(cm.generate())
self.ground3.setH(90)
self.ground3.setZ(-1.0)
self.ground3.setX(-50) # 在X轴负方向偏移
self.ground3.setZ(49) # 在X轴负方向偏移
self.ground3.setColor(0.8, 0.8, 0.8, 1)
self.ground3.set_material(mat)
self.ground3.setTag("is_scene_element", "1")
self.ground3.setTag("tree_item_type", "SCENE_NODE")
self.ground4 = self.render.attachNewNode(cm.generate())
# self.ground3.setR(90)
self.ground4.setZ(-1.0)
self.ground4.setY(50) # 在X轴负方向偏移
self.ground4.setZ(49) # 在X轴负方向偏移
self.ground4.setColor(0.8, 0.8, 0.8, 1)
self.ground4.set_material(mat)
self.ground4.setTag("is_scene_element", "1")
self.ground4.setTag("tree_item_type", "SCENE_NODE")
self.ground5 = self.render.attachNewNode(cm.generate())
self.ground5.setP(180)
self.ground5.setZ(-1)
self.ground5.setY(-50) # 在X轴负方向偏移
self.ground5.setZ(49) # 在X轴负方向偏移
self.ground5.setColor(0.8, 0.8, 0.8, 1)
self.ground5.set_material(mat)
self.ground5.setTag("is_scene_element", "1")
self.ground5.setTag("tree_item_type", "SCENE_NODE")
self.ground6 = self.render.attachNewNode(cm.generate())
self.ground6.setP(90)
self.ground6.setZ(-1)
self.ground6.setZ(99) # 在X轴负方向偏移
self.ground6.setColor(0.8, 0.8, 0.8, 1)
self.ground6.set_material(mat)
self.ground6.setTag("is_scene_element", "1")
self.ground6.setTag("tree_item_type", "SCENE_NODE")
# #创建第二个相同的地面,位置稍有偏移
# self.ground2 = self.render.attachNewNode(cm.generate())
# self.ground2.setH(-90)
# self.ground2.setZ(-1.0)
# self.ground2.setX(50) # 在X轴方向偏移
# self.ground2.setZ(49) # 在X轴方向偏移
# self.ground2.setColor(0.8, 0.8, 0.8, 1)
# self.ground2.set_material(mat)
# self.ground2.setTag("is_scene_element", "1")
# self.ground2.setTag("tree_item_type", "SCENE_NODE")
#
# # 创建第三个相同的地面,位置在另一个方向
# self.ground3 = self.render.attachNewNode(cm.generate())
# self.ground3.setH(90)
# self.ground3.setZ(-1.0)
# self.ground3.setX(-50) # 在X轴负方向偏移
# self.ground3.setZ(49) # 在X轴负方向偏移
# self.ground3.setColor(0.8, 0.8, 0.8, 1)
# self.ground3.set_material(mat)
# self.ground3.setTag("is_scene_element", "1")
# self.ground3.setTag("tree_item_type", "SCENE_NODE")
#
# self.ground4 = self.render.attachNewNode(cm.generate())
# # self.ground3.setR(90)
# self.ground4.setZ(-1.0)
# self.ground4.setY(50) # 在X轴负方向偏移
# self.ground4.setZ(49) # 在X轴负方向偏移
# self.ground4.setColor(0.8, 0.8, 0.8, 1)
# self.ground4.set_material(mat)
# self.ground4.setTag("is_scene_element", "1")
# self.ground4.setTag("tree_item_type", "SCENE_NODE")
#
# self.ground5 = self.render.attachNewNode(cm.generate())
# self.ground5.setP(180)
# self.ground5.setZ(-1)
# self.ground5.setY(-50) # 在X轴负方向偏移
# self.ground5.setZ(49) # 在X轴负方向偏移
# self.ground5.setColor(0.8, 0.8, 0.8, 1)
# self.ground5.set_material(mat)
# self.ground5.setTag("is_scene_element", "1")
# self.ground5.setTag("tree_item_type", "SCENE_NODE")
#
# self.ground6 = self.render.attachNewNode(cm.generate())
# self.ground6.setP(90)
# self.ground6.setZ(-1)
# self.ground6.setZ(99) # 在X轴负方向偏移
# self.ground6.setColor(0.8, 0.8, 0.8, 1)
# self.ground6.set_material(mat)
# self.ground6.setTag("is_scene_element", "1")
# self.ground6.setTag("tree_item_type", "SCENE_NODE")
# 应用默认PBR效果确保支持贴图
try:
@ -402,73 +402,73 @@ class CoreWorld(Panda3DWorld):
},
50
)
# 为其他两个地面也应用相同的效果
self.render_pipeline.set_effect(
self.ground2,
"effects/default.yaml",
{
"normal_mapping": True,
"render_gbuffer": True,
"alpha_testing": False,
"parallax_mapping": False,
"render_shadow": True,
"render_envmap": True
},
50
)
self.render_pipeline.set_effect(
self.ground3,
"effects/default.yaml",
{
"normal_mapping": True,
"render_gbuffer": True,
"alpha_testing": False,
"parallax_mapping": False,
"render_shadow": True,
"render_envmap": True
},
50
)
self.render_pipeline.set_effect(
self.ground4,
"effects/default.yaml",
{
"normal_mapping": True,
"render_gbuffer": True,
"alpha_testing": False,
"parallax_mapping": False,
"render_shadow": True,
"render_envmap": True
},
50
)
self.render_pipeline.set_effect(
self.ground5,
"effects/default.yaml",
{
"normal_mapping": True,
"render_gbuffer": True,
"alpha_testing": False,
"parallax_mapping": False,
"render_shadow": True,
"render_envmap": True
},
50
)
self.render_pipeline.set_effect(
self.ground6,
"effects/default.yaml",
{
"normal_mapping": True,
"render_gbuffer": True,
"alpha_testing": False,
"parallax_mapping": False,
"render_shadow": True,
"render_envmap": True
},
50
)
print("✓ 地板PBR效果已应用")
# # 为其他两个地面也应用相同的效果
# self.render_pipeline.set_effect(
# self.ground2,
# "effects/default.yaml",
# {
# "normal_mapping": True,
# "render_gbuffer": True,
# "alpha_testing": False,
# "parallax_mapping": False,
# "render_shadow": True,
# "render_envmap": True
# },
# 50
# )
# self.render_pipeline.set_effect(
# self.ground3,
# "effects/default.yaml",
# {
# "normal_mapping": True,
# "render_gbuffer": True,
# "alpha_testing": False,
# "parallax_mapping": False,
# "render_shadow": True,
# "render_envmap": True
# },
# 50
# )
# self.render_pipeline.set_effect(
# self.ground4,
# "effects/default.yaml",
# {
# "normal_mapping": True,
# "render_gbuffer": True,
# "alpha_testing": False,
# "parallax_mapping": False,
# "render_shadow": True,
# "render_envmap": True
# },
# 50
# )
# self.render_pipeline.set_effect(
# self.ground5,
# "effects/default.yaml",
# {
# "normal_mapping": True,
# "render_gbuffer": True,
# "alpha_testing": False,
# "parallax_mapping": False,
# "render_shadow": True,
# "render_envmap": True
# },
# 50
# )
# self.render_pipeline.set_effect(
# self.ground6,
# "effects/default.yaml",
# {
# "normal_mapping": True,
# "render_gbuffer": True,
# "alpha_testing": False,
# "parallax_mapping": False,
# "render_shadow": True,
# "render_envmap": True
# },
# 50
# )
# print("✓ 地板PBR效果已应用")
else:
print("⚠️ RenderPipeline未初始化地板将使用基础渲染")
except Exception as e:

26
main.py
View File

@ -483,26 +483,12 @@ class MyWorld(CoreWorld):
# 模型导入和处理方法 - 代理到scene_manager
def importModel(self, filepath):
"""导入模型到场景"""
# 检查是否是FBX文件如果是则询问用户是否要转换为GLB
if filepath.lower().endswith('.fbx'):
try:
from PyQt5.QtWidgets import QMessageBox
reply = QMessageBox.question(
None,
'格式转换选择',
'FBX文件检测到\n\n是否要尝试转换为GLB格式以获得更好的动画支持\n\n点击""尝试转换为GLB格式需要安装转换工具\n点击""直接使用原始FBX格式导入',
QMessageBox.Yes | QMessageBox.No,
QMessageBox.Yes
)
auto_convert = (reply == QMessageBox.Yes)
except ImportError:
# 如果没有PyQt5默认不转换
print("检测到FBX文件由于GUI不可用将直接使用原始格式导入")
auto_convert = False
else:
# 非FBX文件保持原有逻辑
auto_convert = True
# 自动转换FBX等格式为GLB以获得更好的动画支持不再弹窗询问
# 如果你不想自动转换,可以将 auto_convert 改为 False
auto_convert = False
print(f"[模型导入] 文件: {filepath}, 自动转换GLB: {auto_convert}")
return self.scene_manager.importModel(filepath, auto_convert_to_glb=auto_convert)
def importModelAsync(self, filepath):

View File

@ -121,19 +121,12 @@ class SceneManager:
# 检查是否需要转换为GLB以获得更好的动画支持
if auto_convert_to_glb and self._shouldConvertToGLB(filepath):
#print(f"🔄 检测到需要转换的格式尝试转换为GLB...")
print(f"🔄 检测到需要转换的格式尝试转换为GLB...")
converted_path = self._convertToGLBWithProgress(filepath)
if converted_path:
#print(f"✅ 转换成功: {converted_path}")
print(f"✅ 转换成功: {converted_path}")
filepath = converted_path
# 显示成功消息
try:
from PyQt5.QtWidgets import QMessageBox
original_ext = os.path.splitext(original_filepath)[1].upper()
QMessageBox.information(None, "转换成功",
f"已将 {original_ext} 格式自动转换为 GLB 格式\n以获得更好的动画支持!")
except:
pass
# 转换成功的消息已在控制台显示,不再弹窗提示
else:
print(f"⚠️ 转换失败,使用原始文件")

View File

@ -1,4 +1,3 @@
from PIL.ImageChops import lighter
from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QMenu, QStyle
from PyQt5.QtCore import Qt
from PyQt5.sip import delete

View File

@ -7472,8 +7472,8 @@ class PropertyPanelManager:
print(f"🎯 目标节点: {node.getName()}")
# 3. 设置材质金属性为1.0
material.set_metallic(1.0)
print("🔧 材质金属性设置为1.0")
# material.set_metallic(1.0)
# print("🔧 材质金属性设置为1.0")
# # 4. 创建纹理阶段
# metallic_stage = TextureStage("metallic_map")