【发布时间】:2016-09-19 11:24:37
【问题描述】:
我正在尝试使用 Blender Python API 设置属性并将其添加到 RotationSyncFinalValue List。 列表已按所需方式设置,但属性未更新,因此列表未显示值。
这是我定义属性的代码:
atr = bpy.types.Scene
RotationSyncFinalValue = []
atr.RotationSyncValuesList =EnumProperty(
items= RotationSyncFinalValue,
name = "List",
description = "Select The Action to Do with the Value")
这里是我在 Panel 中设置属性的地方:
layout = self.layout
scene = bpy.context.scene
col.prop(scene,"RotationSyncValuesList")
col = layout.column(align=True)
这是我向数组添加值的尝试RotationSyncFinalValue
fvalue = ('{0:.4f}'.format(value),
'{0:.4f}'.format(value),
'{0:.4f}'.format(value))
RotationSyncFinalValue.extend([fvalue])
【问题讨论】:
标签: python list properties blender