Search found 5 matches

by mini3d
Mon May 20, 2013 2:28 pm
Forum: Python
Topic: Where to put "global" properties
Replies: 10
Views: 6201

Ok, so here is what I ended up doing after trying a lot of different solutions... Presets can only be used for operators. It works by adding the 'PRESETS' flag for the bl_options variable for the operator (see blender operator python documentation for details). Some of the panels in the UI also have...
by mini3d
Fri May 10, 2013 11:22 pm
Forum: Python
Topic: Where to put "global" properties
Replies: 10
Views: 6201

Thanks, CoDEmanX! Those are great suggestions. You mentioned the shader nodes which made me realize i should store these properties with the materials instead. Then I can use the presets you pointed out instead of storing the settings in the blend files. Since blender links materials to meshes by de...
by mini3d
Thu May 09, 2013 5:55 pm
Forum: Python
Topic: Where to put "global" properties
Replies: 10
Views: 6201

True, I tried the real id props as well... same result. I am pretty sure I am doing it right. It works for scene, object and the like, just not for operators or window managers. As a side note, the documentation suggests that only the id-properties are saved anyway (the very bottom of the page under...
by mini3d
Wed May 08, 2013 8:10 pm
Forum: Python
Topic: Where to put "global" properties
Replies: 10
Views: 6201

Thank you for the reply, CoDEmanX! You confirm my suspicions... Putting the settings in the operator is what I did at first. It seems operator properties are not written to the blend file though, and that is something that I really need... I also tried the WindowManager, but the same thing there, it...
by mini3d
Wed May 08, 2013 3:44 pm
Forum: Python
Topic: Where to put "global" properties
Replies: 10
Views: 6201

Where to put "global" properties

Blender python docs says custom properties for objects are added like so: bpy.types.Scenes.custom_float = bpy.props.FloatProperty(name="Test Prob") I want to add a property that is common for all scenes but still gets saved in the .blend file. I have looked in bpy.types.* but I have not found a good...