hannesdelbeke / unimenu

easy consistent menus across apps: unreal, blender, maya, krita, substance painter, Katana, marmoset, 3ds max, cry-engine, FreeCAD, Hero, Nuke, Qt,...
https://github.com/hannesdelbeke/unimenu/wiki/features-overview
Apache License 2.0
87 stars 9 forks source link

unreal fails to pass import any_dcc_test sample #50

Closed hannesdelbeke closed 1 year ago

hannesdelbeke commented 1 year ago

image

JLHayde commented 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 image

Unsure as to why it duplicates the menu atm

JLHayde commented 1 year ago

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

image

JLHayde commented 1 year ago

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}" ?

image

hannesdelbeke commented 1 year ago

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.

hannesdelbeke commented 1 year ago

pushed a commit that will raise an error if there are duplicate names.