On 27/12/2016 at 02:52, xxxxxxxx wrote:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
I have an issue while rendering with IRR.
Inside VideoPost's Execute, I use vps->render->GetRenderData() to get the container from which I read resolution X and Y using RDATA_XRES and RDATA_YRES.
The problem is that these 2 values differ from the actual Width and Height of the editor resolution.
I get 693 and 238 reading from vps->render->GetRenderData().
On the other hand, if I go Render Settings > Output and click Editor Resolution in preset list, I get 1260 and 434.
How can I get these 2 values code-wise in Execute method of VideoPostData plugin ?
Thank you very much for your time!
On 28/12/2016 at 05:45, xxxxxxxx wrote:
Hi Peterakos, thanks for writing us.
To retrieve the width and height values of the rendering framebuffer as set in the editor, you should access the RenderData from the BaseDocument object referenced in the VideoPostStruct using BaseDocument::GetActiveRenderData(). Then by querying the values using the RDATA_XRES and RDATA_YRES ids you'll be provided with the expected values.On the contrary, by accessing the RenderData object provided by the Render object referenced in the VideoPostStruct and looking for the resolution data you'll be provided with those values actually referred to the current rendering scenario (IRR or Render View or Render to Picture Viewer).
Last but not least, please note that the detail factor available in the IRR region might cause, when lower than 100%, framebuffer resolution actually smaller than the real size, in terms of pixel, of the render region.