Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Get the icon for the primitive

    SDK Help
    0
    3
    263
    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

      On 21/10/2013 at 01:15, xxxxxxxx wrote:

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

      ---------
      Hi.

      Please tell me how to retrieve the icon image of the primitive objects.

      When you get the icon in the code below, and you will get a copy of the entire icon red circle

      BaseObject* op=doc->GetFirstObject();    
      IconData icon;
      GetIcon(op->GetType(), &icon;);
      DrawBitmap(icon.bmp,100,100,24,24,0, 0, icon.w, icon.h,BMP_ALLOWALPHA);

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

        On 21/10/2013 at 10:08, xxxxxxxx wrote:

        Almost all icons which are part of c4d are located in the main icon file. GetIcon() does return that
        whole bitmap. So your icon will almost never be just at (0,0), use the offset coords provided
        by the IconData.

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

          On 21/10/2013 at 18:23, xxxxxxxx wrote:

          I found the cause in this.
          Thank you for the advice.

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