Closed hannesdelbeke closed 1 year ago
I think this is to be expected as the any_dcc_sample is adding the menu "Tools" which already exists. testing with adding to "edit" results are the same
Unsure as to why it duplicates the menu atm
setting the id in the config, is then used here to correctly add a unique sub menu https://github.com/hannesdelbeke/unimenu/blob/5ea3f945851dcf900b4a0a02ca15e4ccdb161fb0/unimenu/apps/unreal.py#L28
a solution could be to prepend the self.id so we get with some string or a random id or a defined string here https://github.com/hannesdelbeke/unimenu/blob/5ea3f945851dcf900b4a0a02ca15e4ccdb161fb0/unimenu/apps/unreal.py#L8
something like self.id = f"unm_{self.id}"
?
I'll see if i can raise a warning or error in case of duplicate names.
i considered the unimenu prepending before. the reason i didn't go ahead with it is because it makes it more complex for the user to keep track of the names when you want to insert a menu in another menu.
If I make menu A, and name it menu_a
, unimenu will now rename it to unm_menu_a
.
I have to now read the docs and know about this, else I might get confused later.
If I make menu B, and name it menu_b
, and want to parent it to menu A. I would expect the parent path to be menu_a
Let's say I did read the docs, and know it adds unm_
, and add that to the name. great parenting works now. but i have to not do this if i want to add to a default unreal menu. So sometimes i do sometimes i don't.
pushed a commit that will raise an error if there are duplicate names.