I have a few properties created like:

bpy.types.Scene.myprop = bpy.props.IntProperty(name="Myprop",default=1)

I want to save their values to a text file but don't know how to extract the actual value (saving just myprop saves all object data instead of just the int value). How to get the actual value?


1 Answer 1


You can access using bpy.context.scene likes this: print(bpy.context.scene.myprop) or set it equal to a variable: value = bpy.context.scene.myprop, also in your post, make sure you have IntProperty not InProperty like you currently have.

  • 1
    $\begingroup$ Yep, using bpy.context.scene instead of bpy.types.Scene did the trick for me. Thx! $\endgroup$
    – Val
    Oct 23, 2014 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .