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

    Icon in toolbar

    SDK Help
    0
    8
    652
    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 13/02/2004 at 22:00, xxxxxxxx wrote:

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

      ---------
      Hi there.
      I want to create an image to the toolbar. I noticed that I have to uwe LoadFile(). Can anyone tell me how and where to call this function?
      Thanks and regards

      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 13/02/2004 at 23:19, xxxxxxxx wrote:

        Now I am trying to do this to create the icon.
        Bool RegisterdlgGrid(void)
        {
         Filename file = GeGetPluginPath();// + Filename("mytagplugin.tif");
         Bool RegisterIcon(ID_ICON);
         // decide by name if the plugin shall be registered - just for user convenience
         String name=GeLoadString(IDS_CREATEGRID); if (!name.Content()) return TRUE;
         return RegisterCommandPlugin(ID_CREATEGRID,name,0,NULL,"",gNew CreateGridTest);
        }
        But i can't seem get the correct way. One more thing, I found in the documentation for RegisterIcon needs 7 parameters. But when i do like this:
         Bool RegisterIcon(ID_ICON, file, 0, 0, -1, -1,0);

        It it saying that too many initializers.
        Can anyone tell me what's the correct way to create icon in toolbar, and call the function upon clicking the icon.
        Thanks and regards

        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 14/02/2004 at 02:20, xxxxxxxx wrote:

          You don´t need the RegisterIcon function. The Register function of all plugins do have an icon flag. For example:
          RegisterCommandPlugin(YOUR_ID,name,0, "icon.tif" , "",gNew YourClass);
          This icon.tif has to be in your plugins /res/ folder to be found.

          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 14/02/2004 at 02:23, xxxxxxxx wrote:

            Upps, sorry, completely misunderstood it 🙂 Afaik you cannot create a toolbar from within your code. You need to create it in Cinema 4D and save it to your HD. Then you can use LoadFile to load the toolbar.
            LoadFile() needs to be called from within your Execute function of the command plugin.

            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 14/02/2004 at 08:28, xxxxxxxx wrote:

              Hi Samir
              Can you plz give me sample the way how to create it in cinema 4d. And where to call the LoadFile? Is it in my plugin code?
              Thanks and regards

              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 15/02/2004 at 16:14, xxxxxxxx wrote:

                As Samir says, you have to make a CommandData plugin. Then the rest is easy. (Just see the examples in the SDK.)

                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 15/02/2004 at 19:35, xxxxxxxx wrote:

                  Does it mean that I have to create a toolbar using C4D then call by using this kind of method?
                  Bool RegisterMyPlugin(void) {
                    String name = "Plugin_Name";
                    return RegisterToolPlugin(ID, name, 0, "pluginicon.tif", "Description of plugin", gNew plugin);
                  }

                  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 16/02/2004 at 20:39, xxxxxxxx wrote:

                    Do you mean creating the actual icon in the toolbar? That's not possible from plugin code. The usual workaround, for plugins that need it, is to create the toolbar manually and then save it as an .l4d file. The file can be loaded from the plugin with LoadFile(). The user then only has to dock the toolbar himself.

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