PyTag ComboBox?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/06/2011 at 08:56, xxxxxxxx wrote:

    Hi, I fail making a ComboBox on a PyTag..
    I'm trying to make a ComboBox with three options in it.
    Is making a ComboBox anywhere close to how "regular" items are done?
    (Like the CUSTOMGUI REALSLIDER shown below, that works fine.)
    I get the error from the .res file at "COMBOBOX".

    My .pyp init is:

      
    def self.InitAttr(tag, int, [c4d.NROLLMODE])   
        tag[c4d.NROLLMODE] = 1   
    

    My .h file is:

      
    #ifndef _nROLL_H_   
    #define _nROLL_H_   
      
    enum   
    {   
         NROLLRADIUS    = 1000,   
         NROLLRADMIN    = 1001,   
         NROLLMODE   = 1003, # <- THIS IS THE COMBO BOX TRY   
              NROLLOFF = 5001,   
              NROLLWHEEL = 5002,   
              NROLLBALL = 5003,   
         NROLLHEIGHT       = 1002,   
         NROLLTRIM      = 1004,   
         NROLLSPINN      = 1005,   
         NROLLINITROT      = 1006,   
         NROLLFRAME      = 1007,   
         NROLLGROUP    = 2001   
    };   
      
    #endif   
    

    My .str file is:

      
    STRINGTABLE nROLL   
    {   
         nROLL "nROLL";   
      
         NROLLRADIUS      "Radius";   
         NROLLRADMIN      "RadMin";   
         NROLLMODE        "MODE";   
            NROLLOFF        "OFF";   
            NROLLWHEEL      "Wheel";   
            NROLLBALL       "Ball";   
         NROLLHEIGHT      "Height";   
         NROLLTRIM        "Trim";   
         NROLLSPINN        "Spinn";   
         NROLLINITROT      "Init Rot";   
         NROLLFRAME        "Frame";   
         NROLLGROUP   "nROLL";   
    }
    

    And .res file is:

      
    CONTAINER nROLL   
    {   
        NAME nROLL;   
        INCLUDE Texpression;   
      
        GROUP NROLLGROUP   
        { DEFAULT 1;   
            REAL NROLLRADIUS {UNIT METER; MIN 0.0; MAX 10000.0; CUSTOMGUI REALSLIDER; STEP 0.01; MINSLIDER 0.0; MAXSLIDER 1000.0;}   
            REAL NROLLRADMIN {UNIT METER; MIN 0.0; MAX 100.0; CUSTOMGUI REALSLIDER; STEP 0.1; MINSLIDER 0.0; MAXSLIDER 10.0;}   
      
      
            COMBOBOX NROLLMODE   
          {   
            CHILDS   
            {   
              NROLLOFF, NROLLOFF;   
              NROLLWHEEL, NROLLWHEEL;   
              NROLLBALL, NROLLBALL;   
            }   
          }   
        }   
    }
    

    Cheers
    Lennart



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/06/2011 at 10:28, xxxxxxxx wrote:

    There is no combobox for description elements. You can use a LONG value and set the GUI to a combobox.
    Please check out the C++ documentation and take a look at "LONG (description element)". It contains an example as well.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/06/2011 at 10:41, xxxxxxxx wrote:

    Will do, does it mean I can add the ComboBox "within" my other faders as above?
    (So the ComboBox can be placed anywhere).

    Cheers
    Lennart



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/06/2011 at 11:45, xxxxxxxx wrote:

    Thanks Sebastian, but it's to much (for me), I'll stick with Userdata for the
    time being.
    I'll try to study these "deeper" stuff but need to get my coffee tools
    over to py asap.

    IMHO, It would make sense to "collect" these basic things into
    a manageble overview somehow.
    i.e A Py Tag with all elements that are included in Python as
    a plugin example.
    Such as
    One real fader,
    One Linkfield,
    One InExlude field,
    One Vector gizmo etc.

    It would rocket start many of us into the Py world.
    Jumping between COFFEE, Py -and- C++ is a bit
    overkill for me at least, just to see if something is
    possible at all or not.

    My deepest respect to all that "get" this and still have time
    for a beer and/or family life! :)

    Cheers
    Lennart



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/06/2011 at 16:14, xxxxxxxx wrote:

    Ok, I check out which examples I can put in the next documentation version.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/06/2011 at 04:41, xxxxxxxx wrote:

    Sounds terrific Sebastian.

    Anything that can make doing the basic simple interfaces take -less-
    time than making the actual execute part is more than welcome.

    In the end, all we want is to move pixels, right? :)

    Thanks
    Lennart


Log in to reply