Closed janhohenheim closed 3 months ago
Sorry @janhohenheim , I reread your message a few times, and I still don't understand either the issue or what you mean with the "collapsible grouping" ?
This:
Ok, but what is the actual issue ?
It doesn't really matter, as long as there is a way to register and differentiate two components with the same name. One guaranteed unique identifier would be the full namespace, which would end up like this in the Blender UI:
the obvious issue here is that the nesting can get quite deep for Bevy types. Maybe we'd have to filter those and put them all into a single flat group called "Bevy".
Alternatively, I can also imagine passing a group along as metadata for the registry export, e.g. as extension methods on App
:
app
.group_type::<foo::Objective>("Foo")
.group_type::<bar::Objective>("Bar")
The downside here is that the registry is no longer a simple dump of reflection data.
My core issue is that I want to organize my Rust code into different modules that all don't know about each other. However, the Blender addon effectively forces me to use only unique names for components that I wish to use in the Blender UI, so there is a weird coupling between modules now. My modules quests::kill_the_rich_baron
and quests::steal_the_money_from_the_vault
cannot each have a component named Objective
, even though in the context of their respective scopes, this is exactly what I'd want. Instead I have to have quests::kill_the_rich_baron::KillTheRichBaronObjective
and quests::steal_the_money_from_the_vault::StealTheMoneyFromTheVaultObjective
. This is repetitive, reads worse and is harder to refactor.
Does this make sense now? Sorry if what I wrote before was confusing :)
Ah yes, It makes sense now ! :) Sadly this is way more than just a UI issue, it essentially boils down to the use of Component "short names", and it would be insanely hard to get away from it: (because I hit the limitations below multiple times)
Good point :/
Some more thoughts:
Apparently the same limit exists for other names as well: https://blenderartists.org/t/material-name-character-limit-63/1146620/18 This is really really dumb on Blender's side
As far as I can tell, the 63 char limit only exists on the names of the properties. What if the addon used only a single property called "bevy_components" that contained a RON array of all components with their full paths? At least on the Bevy side that shouldn't be too much work.
Apparently the same limit exists for other names as well: https://blenderartists.org/t/material-name-character-limit-63/1146620/18 This is really really dumb on Blender's side
Yep, ran into that one multiple times while developing bevy_components (and the reason for the first breaking change), sigh
As far as I can tell, the 63 char limit only exists on the names of the properties. What if the addon used only a single property called "bevy_components" that contained a RON array of all components with their full paths? At least on the Bevy side that shouldn't be too much work.
...hmm packing it all into one could work, but yeah, waay too much work for now for all the rest. I am already close to burning out on this whole project :D
Fair enough, it's not that important. As I said on Discord, I'm very happy with the workflow as-is, even if it never supported any additional features from now on ❤️
Say I have two quests
Foo
andBar
. They might both have a componentObjective
, but in order to disambiguate them in the Blender addon, I have to name themFooObjective
andBarObjective
. If we instead had some kind of collapsible groupings, I would not have to do this.