Set to Isoparm



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

    On 09/02/2004 at 20:05, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.100 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi
    Can anyone tell me how to change the display mode in the display tag into isoparm.
    I have a code:
       BaseTag *tag = BaseTag::Alloc(Tdisplay);
       BaseContainer *con = tag->GetDataInstance();
       
       ObjGrid->InsertTag(tag, NULL);
    If i do like this, the display mode will be set to default as Gouraud Shading
    Thanks and regards



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

    On 10/02/2004 at 15:34, xxxxxxxx wrote:

    Please have a look in the Tdisplay.res file. (It's within your C4D directory somewhere; search for it!) There you'll find all the container values for the display tag. (Also have a look in the Tdisplay.h file for some additional constants.)



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

    On 10/02/2004 at 17:50, xxxxxxxx wrote:

    Hi all
    I have gone through the samples about this. Now I include the Tdisplay.h in my cpp file
       PluginTag *tag = PluginTag::Alloc(Tdisplay);
       tag->GetData().GetLong(DISPLAYTAG_DISPLAYMODE_ISOPARMS, 3);
       ObjGrid->InsertTag(tag, NULL);
    But i still could not the display mode as isoparm. Can anyone tell me what's the problem of this?
    Thanks and regards



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

    On 10/02/2004 at 18:30, xxxxxxxx wrote:

    1. You don't need to include Tdisplay.h since it's already included by c4d.h.
    2. GetData() returns a temporary. Use GetDataInstance() if you want to modify the returned container directly.


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

    On 10/02/2004 at 18:49, xxxxxxxx wrote:

    Thanks for the reply, now i have modified into this
       BaseObject *ObjGrid = BaseObject::Alloc(Oplane);
       PluginTag *tag = PluginTag::Alloc(Tdisplay);
       BaseContainer *con = tag->GetDataInstance();
       con->SetLong(DISPLAYTAG_DISPLAYMODE_ISOPARMS, 3);
       ObjGrid->InsertTag(tag, NULL);
    But i still could not get the isoparms mode, could you plz tell me what's wrong here?
    Thanks and regards



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

    On 19/02/2004 at 19:19, xxxxxxxx wrote:

    It seems that Tdisplay is one of those tags for which GetDataInstance() doesn't work. (I think it's because it doesn't use a container internally.)
    This code seems to work:

        
        
        BaseObject *Obj = BaseObject::Alloc(Oplane);
        
        
        
        
        PluginTag *tag = PluginTag::Alloc(Tdisplay);  
        BaseContainer con;  
        con.SetLong(DISPLAYTAG_DISPLAYMODE, DISPLAYTAG_DISPLAYMODE_ISOPARMS);  
        con.SetLong(DISPLAYTAG_AFFECT_DISPLAYMODE, TRUE);  
        tag->SetData(con);  
        Obj ->InsertTag(tag, NULL);
        
        
        
        
        doc->InsertObject(Obj, NULL, NULL);  
        EventAdd();
    

    Also, please note that DISPLAYTAG_DISPLAYMODE is the ID and is the value DISPLAYTAG_DISPLAYMODE_ISOPARMS=3.



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

    On 19/02/2004 at 19:33, xxxxxxxx wrote:

    Ok thanks Mikael, It is working very fine. It is because the getdatainstance does not work
    Regards
    Albert


Log in to reply