6
$\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$
1

1 Answer 1

6
$\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$
0

You must log in to answer this question.

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