Forums > Dev


April 26, 2011 | 11:51 am

Hi List,

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?


April 27, 2011 | 8:09 am

@Siska: I don’t get it

#vanille béchamel:

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);

April 27, 2011 | 9:17 am


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…


April 29, 2011 | 12:18 am

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 '', with the same two attributes. The question is: since I just need the 'Output' category, how can I remove the '' 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…


  1. ScreenShot.gif
April 29, 2011 | 7:50 am

Hi Siska,

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 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…

- Luigi

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Dev