ObjectData plugin opening files



  • 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



  • 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.



  • 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!


Log in to reply