cloudrig.ui converts all Float/Int Properties into Sliders #115

Closed
opened 2023-08-29 15:10:14 +02:00 by ThaliaSolari · 2 comments
ThaliaSolari commented 2023-08-29 15:10:14 +02:00 (Migrated from gitlab.com)

At lines 1399 and 1483, there is code which converts rig ui Custom Properties into sliders, and I think this is poor design.

It's useful only if the Custom Property is designed to be used in a slider context. Like a factor between 0 and X. It's definitely not as useful when you need to say, introduce -inf and inf into the min and max. The step size will be out of wack.

Now that subtypes are exposed in the UI, I don't think they were before, users can set properties to be "Factor" if they'd like for it to be a slider. No extra code is needed, just have to remove slider=True from those lines. Well. At least, that seems to work for character properties, not for rig settings proper. I'm not sure where in the code they're being set to sliders.

At lines 1399 and 1483, there is code which converts rig ui Custom Properties into sliders, and I think this is poor design. It's useful only if the Custom Property is designed to be used in a slider context. Like a factor between 0 and X. It's definitely not as useful when you need to say, introduce -inf and inf into the min and max. The step size will be out of wack. Now that subtypes are exposed in the UI, I don't think they were before, users can set properties to be "Factor" if they'd like for it to be a slider. No extra code is needed, just have to remove slider=True from those lines. Well. At least, that seems to work for character properties, not for rig settings proper. I'm not sure where in the code they're being set to sliders.
ThaliaSolari commented 2023-08-29 22:20:41 +02:00 (Migrated from gitlab.com)

Hmm, I guess on closer inspection it might be a bad idea to remove this functionality in regards to int properties, the visual distinction seems rather useful in my own rig. They benefit from being sliders more than average, there might be some use cases where they won't, but... they don't even have subtypes anyways so there wouldn't be a way to use that to determine whether or not they get a slider.

I guess as well, depending upon the extent of the changes planned here #110, that would maybe impact both this issue and #116.

Hmm, I guess on closer inspection it might be a bad idea to remove this functionality in regards to int properties, the visual distinction seems rather useful in my own rig. They benefit from being sliders more than average, there might be some use cases where they won't, but... they don't even have subtypes anyways so there wouldn't be a way to use that to determine whether or not they get a slider. I guess as well, depending upon the extent of the changes planned here #110, that would maybe impact both this issue and #116.

It's an interesting problem though.

I fixed it by using the range as a heuristic for whether we want a slider or not. I thought 100 is a nice round number. If the soft range of a slider is >100, it will not be a slider anymore.

Also ran into a bunch of other issues with custom properties on both CloudRig's and Blender's side and fixed and reported everything.
(1, 2, 3, 4)

Thanks for the report!

It's an interesting problem though. I [fixed it](https://projects.blender.org/Mets/CloudRig/commit/241b69f659cfa9cf362cb53c068387f2f8db0936) by using the range as a heuristic for whether we want a slider or not. I thought 100 is a nice round number. If the soft range of a slider is >100, it will not be a slider anymore. Also ran into a bunch of other issues with custom properties on both CloudRig's and Blender's side and fixed and reported everything. ([1](https://projects.blender.org/blender/blender/issues/122211), [2](https://projects.blender.org/blender/blender/issues/122205), [3](https://projects.blender.org/blender/blender/issues/122206), [4](https://projects.blender.org/blender/blender/issues/122217)) Thanks for the report!
Sign in to join this conversation.
No description provided.