5
$\begingroup$

How can I check which preset a user has chosen via Python?

For example, I would like to check whether a user is utilizing the default Interaction preset or the Maya preset.

Is this possible in Python? Or can I only check against specific values (such as select_mouse)?

$\endgroup$
5
$\begingroup$

That's not possible in Blender's current preset system implementation.

Plain preset execution operator, script.execute_preset, merely executes the script file corresponding to selected preset and changes the menu title temporarily. It doesn't store nor provide access to preset selection info. I needed this feature once, and had to subclass the operator myself to get it.

Yes, you can only check specific values modified by the preset's script file.

$\endgroup$

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.