-1
$\begingroup$

I have a situation where I want to allow the user to override specific values for a panel or window of properties - primarily a bunch of simple strings, floats, and ints. I can easily store states internally that tell me which things are overridden, but I'm having trouble with user communication.

What could I use to allow the user to communicate which properties they want to override to the add-on? I was hoping there would be some type of interaction I could use, such as middle clicking on UI controls to toggle them on/off.

I've considered a few options, but none of them are good:

  1. Checkboxes: Place a checkbox beside every single value. The property UI would be disabled until they enable the checkbox. This is my choice at the moment, although I don't like it much.
  2. Updates: Use the update= event on all properties as a trigger to enable each override. The user could simply change the value to override it. However, there would be no way to disable them without some type of clear all button.
  3. Null Values: Use specific values for each property as a designated empty value. For example, many strings can be blank to represent no-override. Some int properties could use -1 or 0. However, some properties, like object PointerProperty, don't really have the capability to be null, because None would be a valid choice as an override. I would have to do things like create dummy objects to represent null, which seems terrible.

My favorite solution, which I don't think is possible, would be to show all properties as disabled until the user clicks on them (modifier click, right click, middle click, anything), which would toggle them between enabled/disabled, where enable represents an override.

Does anyone have any ideas or know of anything that might help?

$\endgroup$

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.