[Aqsis-commits] [SCM] RIBMosaic Experimental branch master updated. d232a3b75845ab8b189fb1748b23630
Brought to you by:
ltatkinson,
pgregory
From: <gi...@aq...> - 2011-05-17 05:42:12
|
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 d232a3b75845ab8b189fb1748b23630efe930ba8 (commit) from f3b8a75abec6073fad32829715956e8f17e9ea90 (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 d232a3b75845ab8b189fb1748b23630efe930ba8 Author: Jeff Doyle (nfz) <she...@ea...> Date: Tue May 17 02:43:01 2011 -0300 Bug Fixes: materials, meshes, and archive mode: The 2 sides property of a mesh is now exported properly. Materials are now within the attribute block of an object so that they don't effect other objects. This fixes #27 issue on GitHub Repo: https://github.com/nfz/RIBMosaic-exp/issues/27. Don't assume a world will always have a rib_archive property. Preview scenes will not. So we now use getattr() function to attempt reading the property. diff --git a/render_ribmosaic/rm_export.py b/render_ribmosaic/rm_export.py index 7d272d0..1d76c34 100644 --- a/render_ribmosaic/rm_export.py +++ b/render_ribmosaic/rm_export.py @@ -1388,7 +1388,8 @@ class ExporterArchive(rm_context.ExportContext): """ # determine what type of export to do - archive_mode = self.pointer_datablock.ribmosaic_rib_archive + archive_mode = getattr(self.pointer_datablock, "ribmosaic_rib_archive", + 'DEFUALT') # for now just testing inline and readarchive if archive_mode == 'DEFAULT': if self.data_type in ['MESH']: @@ -1507,6 +1508,9 @@ class ExporterArchive(rm_context.ExportContext): def riTransform(self, mat): self.write_text('Transform %s\n' % rib_mat_str(mat)) + def riSides(self, useTwoSides=True): + self.write_text('Sides %s\n' % (2 if useTwoSides else 1)) + # #### Pipeline panel sub classes (all derived from ExporterArchive) @@ -1929,8 +1933,6 @@ class ExportPass(ExporterArchive): raise rm_error.RibmosaicError("Failed to build camera " + sys.exc_info()) - self.write_text("Sides 1\n") - world = ExportWorld(self, datablock.world) world.export_rib() del world @@ -2200,6 +2202,7 @@ class ExportObject(ExporterArchive): self._export_camera_rib() else: + self.riAttributeBegin() # TODO # need to group mesh data with associated material # if the mesh uses more than one material then mesh has to be @@ -2227,7 +2230,6 @@ class ExportObject(ExporterArchive): mat = ob.matrix_world #print(mat) - self.riAttributeBegin() self.write_text('Attribute "identifier" "name" [ "%s" ]\n' % self.data_name) self.riTransform(mat) @@ -2532,6 +2534,9 @@ class ExportObjdata(ExporterArchive): # determine what type of object data needs to be exported if self.blender_object.type in ('MESH', 'EMPTY'): + if self.get_scene().ribmosaic_use_sides: + self.riSides(self.pointer_datablock.show_double_sided) + self. _export_geometry() self.close_archive() ----------------------------------------------------------------------- Summary of changes: render_ribmosaic/rm_export.py | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) hooks/post-receive -- RIBMosaic Experimental |