Object Links during render?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/01/2003 at 02:01, xxxxxxxx wrote:

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

    ---------
    I've been trying to track down a problem where I get completely different results when rendering to the editor than I do when rendering to picture viewer.

    I'm using a custom shader which is dependent upon an external object (like the SLA proximal shader).

    My plugin includes the following in the 'Output()' method to access the object:

      
    BaseDocument *bd   = GetActiveDocument();  
    BaseContainer *data = chn->GetDataInstance();  
    obj = data->GetObjectLink(MY_REF, bd);  
    

    This correctly returns the object when it is rendering the view in the editor window, but returns a NULL link when rendering to the picture viewer...

    Am I doing something wrong, or is this a bug.
    How does proximal access the object data?

    Thanks for any help.

    Cheers - Steve



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/01/2003 at 02:42, xxxxxxxx wrote:

    When you render to the picture viewer the document is cloned (since it is running in a thread), the active document should never be used for anything other than a tool, a shader can find out which document it is rendering. As for the links, I'm not sure what happens to them when you clone a document, maybe someone else can tell you.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/01/2003 at 04:51, xxxxxxxx wrote:

    Hi David,
    Thanks for the info, I think I see the problem now. Instead of

      
    BaseDocument *bd = GetActiveDocument();  
    

    I should have

      
    BaseDocument *bd = irs->doc;  
    

    I guess that the link is failing because it's taken from the 'irs->doc' document, and I was trying to find it in the 'active' document.

    I'll try this tonight, but it sounds promising.

    Thank you!

    Cheers - Steve


Log in to reply