Resource file for radiogroup

  • On 24/01/2013 at 11:56, xxxxxxxx wrote:

    Wait a moment. You're writing a description, aren't you? Because you've got this:

        NAME ECHOS;   
        INCLUDE Obase;   

    That code is used for descriptions, not dialogs, but the radio buttons can only be used in dialogs. Did you edit the .res file by hand to add CONTAINER, etc.?

    I assumed when you said you used ResEdit that you were building a dialog. Your resource file would work, in that case. But it won't in a description.

  • On 24/01/2013 at 12:06, xxxxxxxx wrote:

    I do not know the difference between a description and a dialog.

    I'm trying to create a tag.
    That was ok, until I wanted to add radiobuttons.
    In above code I stripped most of the other code to pinpoint the error.

    This is the code I use to register my tag plugin.

    plugins.RegisterTagPlugin(id=PLUGIN_ID, str="Echos.", info=c4d.TAG_VISIBLE|c4d.TAG_EXPRESSION, g=ECHOS, description="echos",  icon=bmp)

  • On 24/01/2013 at 12:07, xxxxxxxx wrote:

    Also, I'm not using the ResEdit anymore.
    I do it by 'manually' editing the .res, .h and .str files.

  • On 24/01/2013 at 12:18, xxxxxxxx wrote:

    A dialog is the user interface you see in a dialog. Like the C4D preferences, that's a dialog.

    A description is what you see in the attribute manager, or the material editor. The two things are completely different but have enough similarities to be really confusing. Some elements are found in both, like GROUP. Some elements which look alike occur in both interface types but with different names. Some can only be used in one or other interface, such as RADIOGADGET (dialog only).

    If you're writing a tag, you need a description, so see 'Description resource' in the SDK. Descriptions tend to follow a set pattern so for most tags you will see something like this (taken from one of my tags) :

    CONTAINER Txgenattach   
         NAME Txgenattach;   
         INCLUDE Texpression;   

    The INCLUDE line adds the Priority drop down in the Basic tab. The GROUP named ID_TAGPROPERTIES will create a tab named 'Tag'. And so on.

    Never use the resource editor for descriptions, it won't work. (Some would say, never use the resource editor!)

    In your case you can't use radio buttons, try a drop-down instead (look for the LONG element with CYCLE flag).

  • On 24/01/2013 at 12:35, xxxxxxxx wrote:

    If I understand correctly, a description is in fact describing the object and its attributes.
    A dialog is asking the user to select certain options.
    What if I use python to build up the dialog instead of a resource file?
            self.AddRadioGroup(1000, c4d.BFH_SCALEFIT, 1)
            self.AddChild(1000, 0, 'Radio A')

  • On 24/01/2013 at 12:57, xxxxxxxx wrote:

    You cannot use a dialog as a description (from Python), therefore this won't have any use for you.
    Instead of the radio-elements, you could use the QUICKTABRADIO customgui. Example:

            LONG PR1M_ALIGNMENT_Y {
                CYCLE {

    Looks like this:

  • On 24/01/2013 at 13:01, xxxxxxxx wrote:

    It won't work. AddRadioGroup etc. are members of GeDialog, so you need a dialog to use them. They can't be used in a description.

    If you want the user to be able to select one option from a range of them use a LONG like so:


    Then you can find the option the user chose by accssing the BaseContainer for the tag (C++, sorry) :

    BaseContainer *bc = myTag->GetDataInstance();   
        LONG user_choice = bc->GetLong(MY_CHOICES);   
        if(user_choice == OPTION_1)   
            // do something   
        // etc.   

  • On 24/01/2013 at 13:10, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Instead of the radio-elements, you could use the QUICKTABRADIO customgui.

    I'd forgotten about that, good reminder, thanks. A bit non-standard but it works.

    (Probably I'd forgotten because it is not documented in the SDK as with several other description elements.)

  • On 24/01/2013 at 13:13, xxxxxxxx wrote:

    So, why is it then possible, that I can create Radio buttons using User Data.
    Isn't that also a description?

  • On 24/01/2013 at 14:00, xxxxxxxx wrote:

    it is possible, it is the long customgui RADIOBUTTONS. the c4d description documenation
    is joke. in the python docs is none at all and the cpp documenation only contains 50% of 
    the flags.

  • On 24/01/2013 at 15:29, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    the c4d description documenation
    is joke. in the python docs is none at all and the cpp documenation only contains 50% of 
    the flags.

    Sad, but true. It really needs a good work up.

Log in to reply