Page MenuHome

Hair Curves: make the "surface_uv_map" a searchable dropdown
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 13 2022, 1:36 PM.

Details

Summary

The users had to type in a name here, but we can also make it a dropdown
choice with existing UV Maps for convenience:

  • dont have to remember a name or copy paste obviously
  • shows in red if it was removed / invalid

Came up in T101028

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Sep 13 2022, 1:36 PM
Philipp Oeser (lichtwerk) created this revision.
Jacques Lucke (JacquesLucke) requested changes to this revision.Sep 13 2022, 3:36 PM
Jacques Lucke (JacquesLucke) added inline comments.
release/scripts/startup/bl_ui/properties_data_curves.py
48

I think the property should always be visible. Just maybe grayed out when no surface is set.

This revision now requires changes to proceed.Sep 13 2022, 3:36 PM

Will we still be able to type the name of a generic float2 attribute here? Or maybe we should just ignore that since D14365 is the solution?

Yeah, think we can ignore that for now. The attribute on the original data can always be converted if necessary.

release/scripts/startup/bl_ui/properties_data_curves.py
48

Not sure, we usually hide prop_search if the data to search from is not available?

Philipp Oeser (lichtwerk) requested review of this revision.Sep 21 2022, 1:50 PM
release/scripts/startup/bl_ui/properties_data_curves.py
48

Do you have examples?

release/scripts/startup/bl_ui/properties_data_curves.py
48

I disagree. We usually just gray out properties if they don't have an effect. This is more intuitive since you don't "lose" things in the UI-- instead the fact that they don't work is explicit.

release/scripts/startup/bl_ui/properties_data_curves.py
48

Really dont have a strong opinion here, but searching for .prop_search(in the Proerties Editor gives a couple of examples that are conditional (preceeded by if-checking the existance of the data we are searching from)

Soo... have you checked on the cases in the Properties Editor? (constraints subtargets etc.).
While not a 1:1 match (these often also check the type of data we are searching from -- but also checking the existance in the first place).

Anyways, will update the patch to have it show grayed out.

show UV map even if no surface is available

Philipp Oeser (lichtwerk) marked 3 inline comments as done.Oct 4 2022, 1:30 PM
release/scripts/startup/bl_ui/properties_data_curves.py
47–54

Any reason not to do it simpler like this?
Also, usually active is used instead of enabled just so it can still be edited.

Afk atm. but doesnt prop_search print errors to the console if ob.data.surface.data is None?

Ah, could be. Maybe that could be noted in a comment, it's not obvious otherwise.

This revision is now accepted and ready to land.Oct 19 2022, 10:38 AM