so the scenario is, I’d like to create a custom category for my attributes. After declaring the attributes, I add them to my new ‘custom category’ using
CLASS_ATTR_CATEGORY. The problem is that this way I’m getting two different ‘custom categories’ at the same time, both containing all of my attributes. One is the category I created, and the other category has the name of my object. Has anyone an idea of what am I doing wrong?
@Siska: I don’t get it
You can also do something like this:
CLASS_STICKY_ATTR(c, "category", 0, "orthographe"); // the 'h' in otrhographe is kinda required ;-)
CLASS_ATTR_LONG(c, "genou", ATTR_FLAGS_NONE, t_flop, genou);
CLASS_ATTR_LONG(c, "hibou", ATTR_FLAGS_NONE, t_flop, hibou);
CLASS_ATTR_LONG(c, "chou", ATTR_FLAGS_NONE, t_flop, chou);
what I’d like to avoid is to get a category with the name of my object, as my object has a rather long name, and it doesn’t look cool if it appears as a category in the Object Inspector. I’ve seen, for instance, that the [number] object doesn’t have a category named ‘number’, although it has two custom-attributes in a category called ‘Value’ (these are the ‘minimum’ and ‘maximum’ attributes). So I’m pretty sure I can avoid having a category with my own object’s name, just I can’t realize, how…
Just to make my problem more clear, I uploaded a screenshot of the Inspector for my object. The problem is that now I have a category called 'Output' (which I wanted to have) with the two attributes, but I also have a category called 'sadam.foo', with the same two attributes. The question is: since I just need the 'Output' category, how can I remove the 'sadam.foo' category from the Inspector? I guess this can be done somehow, as for instance the [number] object doesn't have a category called 'number' in its Inspector, however, there's a category called 'Value', which is clearly a custom category that only exists for [number], other boxed objects don't have that category by default…
from what I can see, you are trying to give attributes to an non-UI object.
Non-UI objects will always display the name of the object (in this case sadam.foo) in a separate tab.
Have a look at metro or coll. They also behave the same way.
In my experience I have never been able to avoid that.
Number is a UI object and for some reason, with UI objects the problem does not occur.
That has probably something to do with the way attributes are implemented under the hood.
In any case if there is a trick to overcome this problem, I am not aware of it.
Maybe, someone at C74 could tell us…
Forums > Dev