different behaviour in pictureviewer
-
On 06/09/2016 at 10:01, xxxxxxxx wrote:
Hi all,
my tag plugin is working fine when pressing the play button in the timeline. But the (particle) calculations of the plugin seem to be completely ignored (or at least the plugin behaves very different) when I start the "render in pictureviewer".
Do I have to consider anything in my code in respect to timeline vs. pictureviewer ?
thanks.
-
On 06/09/2016 at 11:00, xxxxxxxx wrote:
When starting the "render in pictureviewer" the "message" method issues an event type "MSG_MULTI_DOCUMENTCLONED" meaning that the document has been cloned. This explains that all variables of my classes that I prepared before rendering are unset.
Is there anything I can do to avoid that the document is cloned during render time ?
thanks.
-
On 06/09/2016 at 12:07, xxxxxxxx wrote:
Originally posted by xxxxxxxx
When starting the "render in pictureviewer" the "message" method issues
an event type "MSG_MULTI_DOCUMENTCLONED" meaning that the document has
been cloned. This explains that all variables of my classes that I
prepared before rendering are unset.Is there anything I can do to avoid that the document is cloned during render time ?thanks.No. That's the way Cinema works when you render to the PV. You need to make sure that any class-level variables are correctly copied to the clone by implementing CopyTo() in all such classes. If you do that it should work fine, but you also need to remember that with any dynamic system the variables in one frame depend on previous frames. In other words, if you play your animation to frame x and then render to PV, it may not be the same as rendering in the viewport. If that happens you must render from the start to frame x to ensure everything is in the correct state.
Steve
-
On 06/09/2016 at 13:26, xxxxxxxx wrote:
Hi Steve, I wasn't aware of the CopyTo() call.
It works perfectly !
Thanks a lot !
Jens -
On 07/09/2016 at 08:48, xxxxxxxx wrote:
Hi,
glad you two were already able to solve the issue.
For future readers, here some links relevant for this topic:
Python docs on NodeData (especially read the notes on Read(), Write and CopyTo())
In the C++ docs we already have some articles providing a bit more context and thus may be valuable for Python programmers as well:
General Plugin Functions
NodeData Read()/()Write
NodeData CopyTo()