0
$\begingroup$

I'm using the addon preferences to store some props (bool, filepath ecc...). But this prop are saved only in the global preferences of blender.

I want that some of these props could be saved in the working.blend file.

So I've create a specular prop in the bpy.types.Scene.ecc...

and I want to use as default option the prop from the user preferences.

But don't work because Blender don't find the prop in the user preference when I'm create the prope in the bpy.types.Scene.

I'm working on a complex script, so the Scene props are create in init.py and the preference are created in the setting.py. The script work fine keeping the props direct from the user preferences, but don't if I try to put the props in the default option of the scene props.

Sorry for the complexity of the message, I don't speak English very well.

Edit: This is an example of the code: the init.py: http://www.pasteall.org/blend/31637 The settings.py: http://www.pasteall.org/blend/31638

I want that the default of "color" in the RandomizeColorSettings Class is the "color" prop in the ColorPreferences class

$\endgroup$
  • $\begingroup$ Welcome on this Site! please upload your code you speak about. otherwise maybe nobody can help you... $\endgroup$ – Leon95 Sep 15 '14 at 20:09
  • $\begingroup$ The code are a bit complicate because is store in 3 files... I prepare something to replicate the error, thanks. $\endgroup$ – Alfonso Annarumma Sep 15 '14 at 20:16
  • $\begingroup$ Set default scene property to None. When needed if scene.property is None them set it to addon preferences value. $\endgroup$ – sambler Sep 16 '14 at 6:49
  • $\begingroup$ I've edited the question with the example code $\endgroup$ – Alfonso Annarumma Sep 16 '14 at 16:30

Your Answer

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

Browse other questions tagged or ask your own question.