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

    Open a Scene file.

    Scheduled Pinned Locked Moved SDK Help
    10 Posts 0 Posters 838 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 12/02/2011 at 10:37, xxxxxxxx wrote:

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

      ---------
      Could someone point me toward a sample scene or a class in the SDK that would help me open a scene file through my plugin.  I want my plugin to be able to open precreated .c4d scene files.  How would I go about doing this?

      Thanks,

      Shawn

      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 12/02/2011 at 11:41, xxxxxxxx wrote:

        LoadDocument(), LoadFile(), MergeDocument().  The first doesn't attach the loaded document to the document scene list so you can use it without it being available to the user.  The second does attach and the last will merge the loaded document with the specified document.

        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 12/02/2011 at 13:10, xxxxxxxx wrote:

          Thanks Robert.  That helps me load a scene.  Now how do I open up an "Open" dialogue box so the user can pick a file?

          Thanks,

          Shawn

          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 12/02/2011 at 13:33, xxxxxxxx wrote:

            Nevermind I fifgured it out 🙂

              
            Filename file;  
              
                          file.FileSelect(FILESELECTTYPE_SCENES, FILESELECT_LOAD, "Choose a Preset");  
                          LoadFile(file);  
            
            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 12/02/2011 at 13:36, xxxxxxxx wrote:

              Is there a way to choose the default directory when the dialog opens?

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

                LOL.. figured that one out too..  LOL

                  
                              Filename file;  
                              Filename dir = GeGetPluginPath() + "presets";  
                  
                              file.SetDirectory(dir);  
                              file.FileSelect(FILESELECTTYPE_SCENES, FILESELECT_LOAD, "Choose a Preset");  
                                
                              LoadFile(file);  
                
                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 12/02/2011 at 14:09, xxxxxxxx wrote:

                  Need any more 'help'? lol 😉

                  Looks like you have it figured out!

                  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 12/02/2011 at 14:13, xxxxxxxx wrote:

                    LOL.. actually I do..  HAHA  I need to declare and initilize a BaseThread for MergeDocument.   How do I do that from scratch?  I have always just used the one that was initialized in the arguments but I am doing all of this in the Message() which doesn't have  a BaseThread  in it's arguments.

                    Thanks,

                    Shawn

                    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 12/02/2011 at 17:09, xxxxxxxx wrote:

                      You can just use NULL so that the main thread is used by default.  You would only need to specify the BaseThread if there was one in which this was being run.

                      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 13/02/2011 at 05:12, xxxxxxxx wrote:

                        Thanks Robert.  I appreciate it.

                        ~Shawn

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