Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 13/02/2017 at 08:30, xxxxxxxx wrote:
Hey guys,
Id like to change the output size of renderData with custom controller. The output fields and the visual safeframe are well influenced by that change, but doc.GetBaseDraw(0).GetSafeFrame() doesnt return updated values. What do I have to do to fix it?
import c4d #Welcome to the world of Python prev_data = 0 def main() : global prev_data obj = op.GetObject() if prev_data != obj[c4d.ID_USERDATA,1]: rd = c4d.documents.GetActiveDocument().GetActiveRenderData() rd[c4d.RDATA_XRES] = rd[c4d.RDATA_XRES_VIRTUAL] = prev_data = obj[c4d.ID_USERDATA,1] #rd.Message(c4d.MSG_CHANGE) #rd.Message(c4d.MSG_BASECONTAINER) #c4d.EventAdd() bd = doc.GetBaseDraw(0) print bd.GetSafeFrame()
Thx and greetings rownn
On 13/02/2017 at 09:31, xxxxxxxx wrote:
Ah ok, I got it. GetSafeFrame() is calculated from the aspect, so Ive to set rd[c4d.RDATA_FILMASPECT], too.
obj = op.GetObject() rd = c4d.documents.GetActiveDocument().GetActiveRenderData() rd[c4d.RDATA_XRES] = rd[c4d.RDATA_XRES_VIRTUAL] = prev_data = obj[c4d.ID_USERDATA,1] rd[c4d.RDATA_FILMASPECT] = rd[c4d.RDATA_XRES]/rd[c4d.RDATA_YRES] bd = doc.GetBaseDraw(0) print bd.GetSafeFrame()