Get the icon for the primitive

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

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


    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);

  • 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.

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

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

Log in to reply