Closed nickberckley closed 5 months ago
Potentially, the fact that the block name is decoupled from the name of the ID it references could be an advantage because it allows to keep object data names frozen, while changing block names for the UI. I have mixed feelings about this, but might revisit.
Because now blocks are directly stored on objects as references
keymesh.blocks
collection can be used in Frame Pickers UI list instead of filtered meshes (that means filtering can be completely removed). Becausekeymesh.blocks
has internal index it means blocks in UI list can be ordered by that index instead of name, as they were before.But ordering by name is still desired, so this PR also adds
name
property toKeymeshBlocks
PropertyGroup. Now UI list is displaying that name property, instead of the mesh name directly. The downside is that it needsupdate_block_name
function on an update to make mesh names matchKeymeshBlocks
name, but the upside is that since UI list can optionally sort by name, and allows searching by it too.Since ordering is done by index now, we can also have operator that changes that index to reorder items in Frame Picker UI list. Two buttons are placed in the UI, similar to built-in UI lists in Blender.
Other changes in this PR:
block_active_index
is moved from scene to object properties, where it should bename
property is set based on blocks name