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

    Object Links during render?

    SDK Help
    0
    3
    506
    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 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

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

        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/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

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