Giter Club home page Giter Club logo

Comments (5)

JLHayde avatar JLHayde commented on June 19, 2024

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

from unimenu.

JLHayde avatar JLHayde commented on June 19, 2024

setting the id in the config, is then used here to correctly add a unique sub menu

name=self.id, # todo check if needs to be unique like in add_to_menu

image

from unimenu.

JLHayde avatar JLHayde commented on June 19, 2024

a solution could be to prepend the self.id so we get with some string or a random id or a defined string here

def _default_root_parent(self):

something like self.id = f"unm_{self.id}" ?

image

from unimenu.

hannesdelbeke avatar hannesdelbeke commented on June 19, 2024

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.

from unimenu.

hannesdelbeke avatar hannesdelbeke commented on June 19, 2024

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

from unimenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.