[Aqsis-commits] [SCM] RIBMosaic Experimental branch master updated. 63737b07a1859d2ccdfce34d72b1a19
Brought to you by:
ltatkinson,
pgregory
From: <gi...@aq...> - 2011-05-12 01:37:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "RIBMosaic Experimental". The branch, master has been updated via 63737b07a1859d2ccdfce34d72b1a190e8b14f40 (commit) from d8830240366803717b39cacb2803684b6403169c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 63737b07a1859d2ccdfce34d72b1a190e8b14f40 Author: Jeff Doyle (nfz) <she...@ea...> Date: Wed May 11 22:38:14 2011 -0300 Bug Fix: pass resolution is now exported if not a BEAUTY pass non BEAUTY passes can have a different resolution than the scene. This fixes #23 issue on GitHub repo: https://github.com/nfz/RIBMosaic-exp/issues/23 diff --git a/render_ribmosaic/rm_export.py b/render_ribmosaic/rm_export.py index fd53ab3..0c789c4 100644 --- a/render_ribmosaic/rm_export.py +++ b/render_ribmosaic/rm_export.py @@ -186,30 +186,6 @@ def create_mesh(scene, ob, matrix=None): return mesh -def render_get_resolution(r): - xres = int(r.resolution_x * r.resolution_percentage * 0.01) - yres = int(r.resolution_y * r.resolution_percentage * 0.01) - return xres, yres - - -def render_get_aspect(r): - xres, yres = render_get_resolution(r) - - xratio = xres * r.pixel_aspect_x / 200.0 - yratio = yres * r.pixel_aspect_y / 200.0 - - if xratio > yratio: - aspectratio = xratio / yratio - xaspect = aspectratio - yaspect = 1.0 - else: - aspectratio = yratio / xratio - xaspect = 1.0 - yaspect = aspectratio - - return xaspect, yaspect, aspectratio - - # The dummy pass class is used to provide default render pass settings # if the scene does not provide one. # During menu/panel draw/ and rendering context, it is not possible to @@ -818,6 +794,11 @@ class ExporterManager(): ec.pointer_render = render_object ec.current_pass = i + 1 ec.current_frame = f + if p.pass_type != 'BEAUTY': + if p.pass_res_x > 0: + x = p.pass_res_x + if p.pass_res_y > 0: + y = p.pass_res_y ec.dims_resx = x ec.dims_resy = y target_name = ec._resolve_links("P@[EVAL:.current_pass:#####]@" @@ -2047,7 +2028,17 @@ class ExportObject(ExporterArchive): r = scene.render camera = ob.data - xaspect, yaspect, aspectratio = render_get_aspect(r) + xratio = self.dims_resx * r.pixel_aspect_x / 200.0 + yratio = self.dims_resy * r.pixel_aspect_y / 200.0 + + if xratio > yratio: + aspectratio = xratio / yratio + xaspect = aspectratio + yaspect = 1.0 + else: + aspectratio = yratio / xratio + xaspect = 1.0 + yaspect = aspectratio if camera.ribmosaic_dof: # allow an object to be used for dof distance diff --git a/render_ribmosaic/rm_panel.py b/render_ribmosaic/rm_panel.py index 6e50509..46892a0 100644 --- a/render_ribmosaic/rm_panel.py +++ b/render_ribmosaic/rm_panel.py @@ -937,10 +937,11 @@ class RENDER_PT_ribmosaic_passes(RibmosaicPropertiesPanel, bpy.types.Panel): col.prop(active_pass, "pass_seq_width") col.prop(active_pass, "pass_seq_index") sub = split.column() - sub.label(text="Resolution:") - col = sub.column(align=True) - col.prop(active_pass, "pass_res_x") - col.prop(active_pass, "pass_res_y") + if active_pass.pass_type != 'BEAUTY': + sub.label(text="Resolution:") + col = sub.column(align=True) + col.prop(active_pass, "pass_res_x") + col.prop(active_pass, "pass_res_y") sub.label(text="Aspect Ratio:") col = sub.column(align=True) col.prop(active_pass, "pass_aspect_x") ----------------------------------------------------------------------- Summary of changes: render_ribmosaic/rm_export.py | 41 ++++++++++++++++------------------------- render_ribmosaic/rm_panel.py | 9 +++++---- 2 files changed, 21 insertions(+), 29 deletions(-) hooks/post-receive -- RIBMosaic Experimental |