Getting RenderData when project is in RenderQueue



  • On 08/01/2013 at 13:19, xxxxxxxx wrote:

    Hi,
    does any body know how to get render settings while project is being rendered in batch rendering and is not open? 😉

    I have C++ VideoPost plugin, which sends SpecialEventAdd() to my Python MessagePlugin when rendering starts and in MessagePlugin I am reading RenderSettings to perform some tasks.
    How to get Render Settings from the same project which sent SpecialEventAdd()? 😠

    Use case:
    I open project 'A.c4d' in cinema and add to Render Queue. Than in File menu select Close All and open new project 'B.c4d'.

    • Now I click to render active project (Shift+R) :
      • my message plugin gets CoreMessage() from my VideoPost plugin and code
    c4d.documents.GetActiveDocument().GetActiveRenderData()
    

    in my python part returns project 'B.c4d' project render settings - this is OK 🙂.

    • Now, I open Render Queue and start rendering it:
      • my message plugin gets CoreMessage() from my VideoPost plugin and code
    c4d.documents.GetActiveDocument().GetActiveRenderData()
    

    in my python part returns project 'B.c4d' project render settings - it is NOT ok 😄, because in Render Queue there is project 'A.c4d'  and I expect to get that project render settings and not 'B.c4d'.

    Any comments?

    Thank you in advance 🙂



  • On 08/01/2013 at 15:28, xxxxxxxx wrote:

    Hi,

    c4d.documents.GetActiveDocument() always refers to the document in the editor.
    Instead use "node.GetDocument()" to get the real document where the node is part of.

    Cheers, Seb



  • On 09/01/2013 at 05:58, xxxxxxxx wrote:

    Hi,

    what node should I look for in MessageData.CoreMessage(self, id, bc)?

    I'm not sure, but I think, that c4d.plugins.MessageData plugin does not have any information about project being rendered in Render Queue as well about some nodes in it. Am I missing something?

    Simonas


Log in to reply