Tool plugin icon



  • On 19/06/2014 at 09:53, xxxxxxxx wrote:

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

    ---------
    I have a fully working ToolData plugin. YES!!!
    It has an icon that is loaded with AutoBitmap in the RegisterToolPlugin.
    This icon appears in the plugins menu and in the Attribute Manager while the tool is being used, but it does not appear in the list of the last 8 used tools (the list that is a folded icon list between the Position/Scale/Rotation tools and the X, Y and Z switches.
    Is there any way to associate an icon to the tool in order to make it appear there?



  • On 24/06/2014 at 12:03, xxxxxxxx wrote:

    I believe it has something to do with the registration of the icon but, how should I register it? With the ID of the plugin?



  • On 24/06/2014 at 12:31, xxxxxxxx wrote:

    The icons show up fine in my recent tools list using the basic registration code on a PC.
    Note: The image is in the "res" folder of the plugin.

    Bool RegisterPolygonTool()  
    {  
      return RegisterToolPlugin(PLUGIN_ID, GeLoadString(IDS_POLYGONTOOL), 0, AutoBitmap("icon.png"),"C++ Polygon Tool Example",gNew PolygonTool);  
    }
    

    The only time I've had trouble with icons not showing up at all (on my buttons) is when I made them too large.
    C4D doesn't throw any errors if the images are too large. They simply just don't show up. So it took me a while to find the problem. Not sure if that's what's happening to you or not.
    The size I use for my images is 34x34.

    -ScottA



  • On 24/06/2014 at 14:20, xxxxxxxx wrote:

    I'm using 24x24 icons. Could that be the problem?



  • On 24/06/2014 at 14:23, xxxxxxxx wrote:

    Yup! That was the problem. Shouldn't they be 32x32?



  • On 24/06/2014 at 14:57, xxxxxxxx wrote:

    I think it says in the docs somewhere that they recommend 32x32 and 64x64.
    But I've used other sizes and they seem to work fine for me.
    I've even used some weird sizes by accident like 33 x 35. And it doesn't seem to make any difference.

    I read about image sizes and Video Card memory usage a very long time ago. And they said the multiples of four in the sizes makes them easier to handle in memory. But that was a very long time ago. And the video cards we used back then were very basic. With only megabytes of RAM.
    Today's cards can probably handle non-squared sizes with no problems. But it's probably best to stick with 32x32 & 64x64 if possible.

    -ScottA



  • On 24/06/2014 at 15:18, xxxxxxxx wrote:

    Is that what that icon is??!?!!!

    In all the years i`ve used C4D that is the very first time i have actually clicked on that icon inbetween the tools and the axis buttons and saw that it was a dropdown of recent tools..

    Have also just noticed that my plugin icons aren`t showing up there either ( using 32x32 and AutoBitmap("Icon.tif") here also )..



  • On 24/06/2014 at 16:12, xxxxxxxx wrote:

    I think the most important thing is that the image is 24 bit.
    The actual size of the image seems to be able to be somewhat flexible (although if it's too large I've noticed it doesn't show up in some cases).

    I tend to use .png files which are 24 bits by default. But .tif images work fine too.
    You can always copy the "liquid.tif" image from the "res" folder in the "cinema4dsdk" and paste it into your tool plugin's "res" folder. And re-name it to "icon.tif".
    Then open it in a paint program and change it as desired.

    -ScottA



  • On 24/06/2014 at 16:43, xxxxxxxx wrote:

    Actually, I use 32 bit TIFFs.
    I mean, 24 bits + 8 bits of alpha channel.


Log in to reply