Current frame being rendered?
-
On 02/04/2018 at 09:15, xxxxxxxx wrote:
Anyone?
-
On 04/04/2018 at 14:40, xxxxxxxx wrote:
Still no information on the subject?
-
On 05/04/2018 at 01:56, xxxxxxxx wrote:
Hi Rui Batista,
First of all sorry for the delay, after searching, it's seems there is no way to get the current frame currently rendered.
There is a tricky stuff which can work for still image but not for animation, which is the use of MSG_MULTI_RENDERNOTIFICATION.
So you can basically catch this message from an object / Tag which is within the scene currently rendered, then send a core message from this Node to your GeDialog.But again it's working only for a still picture since MSG_MULTI_RENDERNOTIFICATION is sent at the end of the rendering (for picture viewer).
In another way, is not because you bump a thread each day that you will get a speeder answers, once a week if you didn't get an answer is more than enough.
Cheers,
Maxime -
On 05/04/2018 at 04:22, xxxxxxxx wrote:
Got it, Maxime.
Both the impossibility of getting the current rendered frame in an animation render and the "thread bump" issue.
It is really a shame that it is impossible to know the current frame being rendered
It is a piece of information that should be made available.
Thank you for you reply, Maxime. -
On 08/04/2018 at 22:15, xxxxxxxx wrote:
you could implement a small VideoPost plugin that sends a message to your Dialog. Just use the PLUGINFLAG_VIDEOPOST_INHERENT flag and it will be auto-added to all scenes
-
On 09/04/2018 at 02:11, xxxxxxxx wrote:
Hi,
just before some Python developers rip their hair out, affa's suggestion is currently not implementable with Python, because VideoPostData is missing.
And secondly, one should be aware, that this approach may also cause quite a lot of "false positives". For example this mechanism would trigger for every material preview, that's being rendered, too. -
On 09/04/2018 at 02:22, xxxxxxxx wrote:
yes you're right, was not aware of the forum this was posted in
material previews could be filtered through the render flags, but yes this is a workaround that needs some tweaking -
On 09/04/2018 at 03:25, xxxxxxxx wrote:
So, definitely, it is official: there is no way to get to know what frame is being currently rendered?
Not even inside a Material?
-
On 09/04/2018 at 22:14, xxxxxxxx wrote:
with c++ sure, you can get the current time from VolumeData in CalcSurface for example. don't know about Python though
-
On 10/04/2018 at 02:01, xxxxxxxx wrote:
Hi Rui Batista,
Sorry for the delay, material (at least ShaderData since you can't register a new material in python) approach is pretty good and can give you the information you need!
The key is to use c4d.modules.render.InitRenderStruct instead of VolumeData, since you can get the thread and the doc.
Here a quick example without the communication with UI, if you need help to achieve this part please let me know.import c4d class FrameShader(c4d.plugins.ShaderData) : def InitRender(self, sh, irs) : frame = irs.time.GetFrame(irs.fps) threadType = c4d.threading.IdentifyThread(irs.thread) if threadType == c4d.THREADTYPE_RENDEREDITOR: print "EDITOR: "+ str(frame) + " - "+ str(irs.docpath) elif threadType == c4d.THREADTYPE_RENDEREXTERNAL: print "PICTURE VIEWER: "+ str(frame) + " - "+ str(irs.docpath) return c4d.INITRENDERRESULT_OK def Output(self, sh, cd) : return c4d.Vector() if __name__=='__main__': c4d.plugins.RegisterShaderPlugin(1000010, "GetFrame", 0, FrameShader, None)
Let me know if this method can be a workaround for you.
Cheers,
Maxime -
On 12/04/2018 at 05:48, xxxxxxxx wrote:
YES!!! Made it work with your suggestion (and a few adjustments), Maxime.
Thank you so much.