Page MenuHome

Fix T80258: UILayout.prop_search() issues with datablock names
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Aug 31 2020, 12:39 PM.

Details

Summary

If the search menu was used for a string property, and a data-block was
selected from the search, the value set would be an invalid name. The
property would get the modified UI string, not the proper data name set.

This problem was already once solved in rB249ccab111ac, but resurfaced
in rB937d89afba36.

Now only use the modified UI string if requires_exact_data_name is not
true.

Note: the comments in rB249ccab111ac [reg. library hints and string
properties, also that pointer properties are preferred over string
properties when dealing with IDs] still apply.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Aug 31 2020, 12:39 PM

Confirmed this fixes the issue, from reading surrounding code the fix is straightforward & correct.

This revision is now accepted and ready to land.Aug 31 2020, 1:01 PM

keeping open, committed to 2.90 rBcb0b0416f454, but still needs to go in master separately