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

    Selection problem

    SDK Help
    0
    11
    867
    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 05/12/2006 at 09:10, xxxxxxxx wrote:

      A second question how can i load an image of the surface of my 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 05/12/2006 at 13:47, xxxxxxxx wrote:

        Use GetActiveObject s () instead and do this:

        if ((atomarray->GetCount()==1) && atomarray->GetIndex(0)) ((BaseObject* )atomarray->GetIndex(0))->DelBit(BIT_ACTIVE);

        That'll deselect the first selected object.

        Not sure that I understand the second question. How do you load an image into a Bitmap?

        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 05/12/2006 at 14:44, xxxxxxxx wrote:

          No problem. I am a devoloper but i have never been programmed a plugin for cinema 4d and so i think i oversee a lot of facts that would be clear after a longer time of work. I am devoloping a meshoptimizing tool for two weeks now and only two things are not complet yet. Our enterprise logo on the GUI "Userinferace or window which represent the plugin" and the delete method.

          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 05/12/2006 at 15:50, xxxxxxxx wrote:

            I do something like this for my plugin's logo. This is done in the GeDialog's CreateLayout() method.

            BaseContainer          tbc;  
            tbc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_BITMAPBUTTON);  
            tbc.SetLong(BITMAPBUTTON_BORDER, BORDER_NONE);  
            tbc.SetBool(BITMAPBUTTON_BUTTON, FALSE);  
            // BitMap Button  
            bmbutton =               (BitmapButtonCustomGui* )AddCustomGui(IP_ABOUT, CUSTOMGUI_BITMAPBUTTON, String(), flags, SizePix(256), SizePix(40), tbc);  
            if (!bmbutton)          return ErrorException::Throw(EE_DIALOG, GeLoadString(IPPERR_MEMORY_TEXT), "IPPDialog.CreateBannerGroup.bmbutton");  
            Filename bg =          GeGetPluginPath()+Filename("res")+Filename("banner.tif");  
            if (GeFExist(bg))     bmbutton->SetImage(bg, FALSE);  
            

            Hope that helps! 🙂

            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 05/12/2006 at 16:48, xxxxxxxx wrote:

              Thanks, through your help it is working perfekt know. I have tested it on a current projekt at our company and now the time of rendering one frame is from over one hour to only a half minute. If you are interessted of the data:

              Memory 78945KBytes; Objects 78870 (Before optimizing)

              to

              Memory 26668KBytes; Objects 24 (After optimizing)

              and only 24 objects are very fast to work with^^

              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 06/12/2006 at 03:29, xxxxxxxx wrote:

                But i dont get the code for the logo to work. For example what is bmbutton or IP_About. In the SDK i couldn't find anythings what would be fitting

                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 06/12/2006 at 04:20, xxxxxxxx wrote:

                  this is some COFFEE code to count the active objects
                  maybe it helps you also for C++
                  in coffee you can do this with obj->GetBit(BIT_AOBJ),
                  and probably obj->SetBit(BIT_AOBJ,0) to deselect

                  var obj=GetActiveDocument()->GetFirstObject(), active_objects;
                  if(obj->GetBit(BIT_AOBJ)) { active_objects=0; } else { active_objects=-1; }
                  while(obj) { active_objects++; obj=obj->SearchNext(BIT_AOBJ); }
                  println(active_objects, " active objects");

                  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 06/12/2006 at 05:30, xxxxxxxx wrote:

                    Thx but the first solution is working perfekt, now i only need the thing with the logo and it is ready for realese after it has been tested.

                    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 06/12/2006 at 14:03, xxxxxxxx wrote:

                      Murakami,

                      BaseContainer          tbc;  
                      tbc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_BITMAPBUTTON);  
                      tbc.SetLong(BITMAPBUTTON_BORDER, BORDER_NONE);  
                      tbc.SetBool(BITMAPBUTTON_BUTTON, FALSE);  
                      // BitMap Button  
                      BitmapButtonCustomGui* bmbutton =               (BitmapButtonCustomGui* )AddCustomGui(0, CUSTOMGUI_BITMAPBUTTON, String(), flags, SizePix(256), SizePix(40), tbc);  
                      if (!bmbutton)          return FALSE;  
                      Filename bg =          GeGetPluginPath()+Filename("res")+Filename("banner.tif");  
                      if (GeFExist(bg))     bmbutton->SetImage(bg, FALSE);
                      

                      IP_ABOUT is my gadget ID. If you don't need to later reference the logo, this can be 0.

                      SizePix(256) and SizePix(40) are the pixel dimensions (width and height) of my logo. Replace the numbers with the dimensions of your logo.

                      Note that my logo image is "banner.tif" and is placed in the plugin's res folder. You'll have to adjust this for location and name.

                      The ErrorException::Throw(...) is my own fake exception for error handling. Replace that with your own error handling.

                      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 07/12/2006 at 07:18, xxxxxxxx wrote:

                        thx kuroyume0161 and all the other
                        Now it is complet and will be tested in the next days.
                        When the final tests are over it will be releasod on www.ia-renderfarm.de

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