仅当“自定义 UI”属性为空时,才会自动生成 MCG 工具的默认卷展栏。如果使用“自定义 UI”属性中的 MAXScript 扩展 MCG 工具且不想定义自定义卷展栏,则必须恢复默认卷展栏。
为此,请使用以下代码:
rollout params "Parameters" ( -- Restore the rollout UI elements <<ParamUIDefs>> -- Restore any rollout events required by lists or other pecific parameters <<RolloutParamsHanders>> ) -- Your custom MAXScript goes here
<<ParamUIDefs>> 和 <<RolloutParamsHanders>> 标记替换为通常在“自定义 UI”属性为空时自动生成的 UI 控件的对应代码。它是可用于“自定义 UI”属性的几个标记之一。
对于模拟图形,还应该添加 <<SimRollout>> 标记,以使用“重置模拟”按钮恢复“模拟”卷展栏。例如:
rollout params "Parameters" ( -- Restore the rollout UI elements <<ParamUIDefs>> -- Restore any rollout events required by lists or other pecific parameters <<RolloutParamsHanders>> ) -- Restore the Simulation rollout <<SimRollout>> -- Your custom MAXScript goes here