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

    ObjectData plugin opening files

    SDK Help
    0
    3
    275
    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 27/07/2007 at 17:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R10 
      Platform:      Mac OSX  ; 
      Language(s) :

      ---------
      Hi again,
      when Read(GeListNode* node, HyperFile* hf, LONG level){}
      is called I load my plugin params, then I try to get a reference to my polygon object like this:

        
      {  
                BaseObject *op = (BaseObject* )node;  
                BaseContainer *data = op->GetDataInstance();  
                if ( BaseObject* linkOp = data->GetObjectLink(INSTANCEOBJECT_LINK, op->GetDocument()) ) {  
                     polygonObjectRef = (PolygonObject* ) linkOp;  
                }  
           }  
      

      that works fine when I receive message MSG_MENUPREPARE or message type 1001090 which I have no idea what it is.

      so the question is which message type should I check for to get my references after I open the file?
      Is there any message sent to ObjectData after I read the file?

      thanks

      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 27/07/2007 at 20:46, xxxxxxxx wrote:

        The problem with doing this type of thing in Read() is that it is possible (probable even) that the reference has not been resolved as the file is still being read (the linked object may not exist yet).

        For this, listen for MSG_MULTI_DOCUMENTIMPORTED in ObjectData::Message(). This signals that the document has been loaded - completely.

        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 28/07/2007 at 08:20, xxxxxxxx wrote:

          yes! you're the master! 🙂
          thank you!

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