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
    • Recent
    • Tags
    • Users
    • Login

    Plugin icon

    Scheduled Pinned Locked Moved SDK Help
    8 Posts 0 Posters 725 Views
    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 Offline
      Helper
      last edited by

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

      On 23/01/2010 at 03:27, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hello everyone!
      I have written a coffee plugin that is almost ready to be released. The only thing that I'm struggling with at the moment is, that the icon of the plug simply won't show up in R11.5. It works in R10 and R11 on Mac and PC, but with R11.5 I'm just out of luck.

      This is the source code I'm using to get the bitmap:

      SeqSort::GetIcon()
      {
      var icon=new(BaseBitmap,32,32);
      var iconFile=new(Filename);
      iconFile=GeGetRootFilename();
      iconFile->SetLastString("SeqSort.tif");
      icon->Load(iconFile);
      return icon;
      }

      I already checked, the path of iconFile is correctly set. I also tried different file formats.
      Please help me get this sorted out so I can share the plug with the world.

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

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

        On 23/01/2010 at 07:13, xxxxxxxx wrote:

        Try:

          
        SeqSort::GetIcon()   
        {   
        var bm = new(BaseBitmap,1,1);   
        var fn = new(Filename);   
            fn = GeGetRooFilename();   
            fn->RemoveLast();   
            fn->AddLast("SeqSort.tif");   
            bm->Load(fn);   
        }   
        

        Cheers
        Lennart

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

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

          On 24/01/2010 at 12:52, xxxxxxxx wrote:

          Thanks Lennart, I will try that! Really strange, that it worked before, but if your version does the trick it's fine with me 🙂

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

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

            On 25/01/2010 at 22:58, xxxxxxxx wrote:

            Unfortunately this didn't help. I think it is rather something thats different with the way R11.5 works.
            Well, I think if I don't get this figured out I'll just release the plug like it is. After all it's just cosmetics and all the other functions are fine.

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

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

              On 26/01/2010 at 00:28, xxxxxxxx wrote:

              The icon bitmap has to be created on the global scope. Check the following code.

                
              var icon;  
                
              class MyMenuPlugin : MenuPlugin  
              {  
                public:  
                MyMenuPlugin();  
                  
                GetID();  
                GetName();  
                GetHelp();  
                GetIcon();  
                GetIconState();  
                GetState();  
                Execute(doc);  
              };  
                
              MyMenuPlugin::MyMenuPlugin()   
              {  
                super();   
              }  
                
              MyMenuPlugin::GetID()   
              {  
                return 1000010;  
              }  
                
              MyMenuPlugin::GetName()  
              {  
                return "test";  
              }  
                
              MyMenuPlugin::GetHelp()  
              {  
                return "test";  
              }  
                
              MyMenuPlugin::GetIcon()  
              {  
                return icon;  
              }  
                
              MyMenuPlugin::GetIconState()  
              {  
                return TRUE;  
              }  
                
              MyMenuPlugin::GetState()  
              {  
                return CMD_ENABLED;  
              }  
                
              MyMenuPlugin::Execute(doc)  
              {  
              }  
                
                
              main()  
              {  
                icon = new(BaseBitmap,1,1);  
                  
                var fn = GeGetRootFilename();  
                fn->RemoveLast();  
                fn->AddLast("res");  
                fn->AddLast("icon.tif");  
                
                icon->Load(fn);  
                
                Register(MyMenuPlugin);  
              }  
              
              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

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

                On 26/01/2010 at 23:05, xxxxxxxx wrote:

                Sounds very plausible, but unfortunately it still doesn't work. There seems to be something different with R11.5.
                Any way I try I just get the default diamond shape and I tried your way with tif, psd and jpg, either with new(BaseBitmap, 1,1) or new(BaseBitmap, 32,32).
                Very strange!

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

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

                  On 27/01/2010 at 01:28, xxxxxxxx wrote:

                  I tested this with 11.5 and it's working fine there. Have you tried to run the test plugin code of my last post?

                  cheers,
                  Matthias

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

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

                    On 28/01/2010 at 08:01, xxxxxxxx wrote:

                    I just replaced the main() and GetIcon() procedures in my plugin code, but using your code as a whole might be a good test.
                    I'll try when I get home.

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