Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我正在尝试做的事情:
reference_object= bpy.context.active_object reference_object.add_variable(name='some_property',value=5) reference_object.some_property
它会打印回来 5
我基本上是在尝试向已经创建的对象添加一个属性,并且没有我要在其类中添加的特定变量。我尝试查找如何执行此操作,但我似乎无法理解其他一些帖子。任何建议都会很棒。
你可以简单地做:
reference_object['some_property'] = 5
然后访问它:
reference_object['some_property'] # Prints back 5