On 13/10/2016 at 05:17, xxxxxxxx wrote:
Hi there,
comparing the safeframe aspect with the renderaspect by using the BaseDraw( ).GetSafeFrame() function in the way described later , always gives me wrong results.
How should we calculate the resulting resolution from e.g. mouse recognition data; or the other way round,
which calculation/values uses the "copy from IRR" button??
Can anybody help me solving it, please?
best wishes
Martin
import c4d,math
def main() :
# compare BaseDrawResolution and RenderResolution
doc = c4d.documents.GetActiveDocument()
bd = doc.GetActiveBaseDraw()
if bd is None:
return
rd = doc.GetActiveRenderData()
rdata = rd.GetData()
xren = rdata[c4d.RDATA_XRES]
yren = rdata[c4d.RDATA_YRES]
rendersafe = bd.GetSafeFrame()#safe frame
xsafe = float(rendersafe["cr"]) - float(rendersafe["cl"])
ysafe = float(rendersafe["cb"]) - float(rendersafe["ct"])
print xsafe, "xsafe"
print ysafe, "ysafe"
print xsafe/ysafe, "aspectSAFE"
print rdata[c4d.RDATA_FILMASPECT], "aspectRENDER"
print xren/xsafe, yren/ysafe,"SAFEtoREN"
if __name__=='__main__':
main()