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

    Exporting Scene with XRef objects

    Scheduled Pinned Locked Moved SDK Help
    14 Posts 0 Posters 996 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 05/04/2008 at 12:36, xxxxxxxx wrote:

      Thanks for the quick reply. Your hint actually did polygonize the xref objects. However a few problems still exist:

      1. i am unable to access the materials of a xref object. after doc->Polygonize(), my material list is still empty.

      2. doc->Polygonize() removes the instances and i am unable to find out if an object is xref or not.

      what i am looking for is a way to polygonize a single BaseObject that is a XRef object and get a list of all Materials that belong to this object.

      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 07/04/2008 at 04:24, xxxxxxxx wrote:

        After some more research I am able to polygonize the XRef objects. However two points are still open and I can't find anything in the SDK documentation about this:

        1. How do I get the Materials of an XREF object?

        2. How do I get the filename of the C4D file that the XREF object is referencing to.

        With the above information I should be able to implement an export for XRef objects.

        Regards,
        Mark

        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 07/04/2008 at 07:03, xxxxxxxx wrote:

          The filename is stored in the objects container. YOu can access it with GetFilename/SetFilename(). The ID is SCENEINSTANCE_FILENAME. Note that you have to manually include the osceneinstance.h.

          I have to figure out myself how to access the materials.

          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 07/04/2008 at 09:19, xxxxxxxx wrote:

            BTW, has anyone here been able to use the R10.5 SDK Windows Help file? Or is it just known to be busted?  All I get are 404-type file not found errors when trying to access any content within it.   The HTML version seems to work fine though (except there's no mention of XRef or External Reference at all in there, as far as I can see).

            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 07/04/2008 at 09:25, xxxxxxxx wrote:

              Try downloading the Help file again, maybe a corrupt download.

              There is no special Xref functionality in the SDK.

              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 07/04/2008 at 09:30, xxxxxxxx wrote:

                I've downloaded that file 4-5 times now (again, just a minute ago).. no joy.

                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 07/04/2008 at 10:05, xxxxxxxx wrote:

                  Not sure if this helps, but...
                  "Make Editable" -> resolves (loads into the scene) materials
                  "Current State to Object" -> does not.
                  ...I assume the doc->Polygonize() is basically performing the Current State to Object operation.

                  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 09/04/2008 at 08:43, xxxxxxxx wrote:

                    Hello Matthias,

                    thansk for your assistance. I can finally get the filename of the XRef object. Here is the code

                    // BaseObject *op
                    if ( op->GetType() == 200000118 ) // xref?
                    {
                        BaseContainer bc = op->GetData();
                        Filename c4d_xref_filename = bc.GetFilename( SCENEINSTANCE_FILENAME , "" );
                    }

                    I still couldn't figure out, how to get to the material list of the XRef. This is the last point I need to finalize our exporter.

                    Do you have any more clues?

                    Regards,
                    Mark

                    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 10/04/2008 at 08:41, xxxxxxxx wrote:

                      The material list is a custom data type. Currently you can not access it through the plugin API. The only other way I see to access the materials is to load the referenced scene (you have the filename to it already).

                      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 16/04/2008 at 00:45, xxxxxxxx wrote:

                        Hello Matthias,

                        thank you for your reply. So as it is now, the XRef functionality is pretty useless for game development (at least for us), since before we can export a scene to our generic format, we have to convert all XRef's. This is a pretty time consuming way.

                        Please tell the C4D developers to improve or fix the SDK with respect to XRef export and handling of XRef's in general.

                        All we need is access to this material list.

                        Regards,
                        Mark

                        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 16/04/2008 at 14:28, xxxxxxxx wrote:

                          Mark, it looks like you should be able to do something like...

                              
                              
                                
                              // BaseObject *op  
                              if ( op->GetType() == 200000118 ) // xref?  
                              {  
                                  BaseContainer bc = op->GetData();  
                                  Filename c4d_xref_filename = bc.GetFilenam( SCENEINSTANCE_FILENAME , "" );  
                                  if( c4d_xref_filename )  
                                  {  
                                      BaseDocument *xrefDoc = LoadDocument( c4d_xref_filename, SCENEFILTER_MATERIALS, NULL); // loads only the materials  
                                      if( xrefDoc )  
                                      {  
                                          search_for_missing_materials_in( xrefDoc );  // insert your code here  
                                          BaseDocument::Free( xrefDoc ); // be sure to free it  
                                      }  
                                  }  
                              }  
                              
                          
                          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 20/04/2008 at 23:52, xxxxxxxx wrote:

                            Hello,

                            this sounds good. I will try it this week an let you
                            know if it works! Thanks for this information.

                            Regards,
                            Mark

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