I have a series of frames, which contain user-entered meta data. After a render I have to retrieve the user entered values.

The path shown is:


Yet I get an error:

>>> print(bpy.types.OBJECT_OT_paperdoll_operator.title_frame_1)
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: type object 'PaperDoll' has no attribute 'title_frame_1'

In this case, it should return the string "This is Frame 1 meta"

So obviously I am missing something.

enter image description here


What you access via bpy.types is just the type / class, what you are after are the properties of an instance of that class.

It would be best to store the user data in global properties, but if you really want to access the active operator's properties (that's what is shown in the redo panel), use bpy.context.active_operator:

>>> C.active_operator
<bpy_struct, Operator("TRANSFORM_OT_translate")>

>>> C.active_operator.properties['value']
<bpy id property array [3]>

>>> C.active_operator.properties['value'][:]
(0.17133378982543945, -1.7650548219680786, -1.7467097043991089)

>>> C.active_operator.value
Vector((0.17133378982543945, -1.7650548219680786, -1.7467097043991089))

Note that Macro properties need to be accessed in the following way:

>>> C.active_operator.properties.keys()
['OBJECT_OT_duplicate', 'TRANSFORM_OT_translate']

>>> C.active_operator.OBJECT_OT_duplicate.linked

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.