如何用Python读取Blender中的自定义属性?

2024-04-28 07:06:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在Blender中使用脚本模式读取Blender对象的自定义属性。 到目前为止,我发现只有可能读取您在脚本模式下创建的自定义属性。但我想读一读我自己标记的自定义属性。这意味着我没有使用局部变量。

我希望在以下情况下: 我有一个循环遍历所有对象:

for obj in bpy.data.objects:
if not 'Camera' in obj.name and not 'Lamp' in obj.name and not 'Armature' in obj.name:
    #here I get the location of the current Object
    loc.append(obj.location)

现在什么才是完美的,就像:

obj.getCustomProperties

有没有办法在搅拌机Python模式下做到这一点?

谢谢, 丹尼尔


Tags: andthe对象namein标记脚本obj