Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Bitmaps for PluginObjects

    SDK Help
    0
    3
    949
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

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

      On 09/11/2002 at 13:32, xxxxxxxx wrote:

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

      ---------
      I am making an object plugin and i want to show a bitmap in the AM.
      Very similar to the Lightobject with it's noise-preview.
      But i don't know how.
      An Explanation of the BitmapButton Customgui could help.  I wasn't able to find any information on this.
      Michael

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

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

        On 10/11/2002 at 07:28, xxxxxxxx wrote:

        Quote: Originally posted by Michael Welter on 09  November 2002
        >
        > * * *
        >
        > I am making an object plugin and i want to show a bitmap in the AM.
        >
        > An Explanation of the BitmapButton Customgui could help.  I wasn't able to find any information on this.
        Sorry, this part of the docs isn't finished yet. You need to add this code: (Example from AtomObject.)

            
            
            Bool GetDParameter(GeListNode *node, const DescID &id,GeData &t_data,LONG &flags)  
            {  
             switch(id[0].id)  
             {  
             case ATOMOBJECT_PREVIEW:   
              {  
               PluginMaterial *mat = (PluginMaterial* )node;
            
            
            
            
               LONG dirty = 0;  
               BitmapButtonStruct bbs(static_cast<PluginObject*>(node), id, dirty);   
               t_data = GeData(CUSTOMDATATYPE_BITMAPBUTTON,bbs);   
               flags |= DESCFLAGS_PARAM_GET;   
               break;   
              }  
             }  
                 
             return SUPER::GetDParameter(node, id, t_data, flags);  
            }
            
            
            
            
              
            Bool SetDParameter(GeListNode *node, const DescID &id, const GeData &t_data, LONG &flags)  
            {  
             switch(id[0].id)  
             {  
             case ATOMOBJECT_PREVIEW:   
              flags |= DESCFLAGS_PARAM_SET;   
              break;  
             }  
               
             return SUPER::SetDParameter(node, id, t_data, flags);  
            }
            
            
            
            
              static NodeData *Alloc(void) { return gNew AtomObject; }  
            };
            
            
            
            
            Bool Message(GeListNode *node, LONG type, void *t_data)  
            {  
             if (type==MSG_DESCRIPTION_VALIDATE)  
             {  
              BaseContainer *data = ((BaseObject* )node)->GetDataInstance();  
              CutReal(*data,ATOMOBJECT_CRAD,0.0,data->GetReal(ATOMOBJECT_SRAD));  
             }  
             if (type == MSG_DESCRIPTION_GETBITMAP)  
             {  
              DescriptionGetBitmap* dgb = static_cast<DescriptionGetBitmap*>(t_data);  
              if (dgb->id[0] == ATOMOBJECT_PREVIEW)  
              {  
               AutoAlloc<BaseBitmap> bm;  
               bm->Init(50, 50);  
               bm->SetPen(12, 34, 56);  
               bm->Line(0, 0, 49, 49);  
               dgb->bmp = bm.Release();  
              }  
             }  
             return TRUE;  
            }
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          On 11/11/2002 at 09:00, xxxxxxxx wrote:

          thanks Mikael

          1 Reply Last reply Reply Quote 0
          • First post
            Last post