Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: scripts/io/b2cs/io/transform.py
- ===================================================================
- --- scripts/io/b2cs/io/transform.py (revision 3792)
- +++ scripts/io/b2cs/io/transform.py (working copy)
- @@ -16,11 +16,11 @@
- def MatrixAsCS(matrix, func, depth=0, noMove=False):
- - rot=matrix.rotation_part().to_euler().unique()
- + rot=matrix.to_3x3().to_euler()
- if not noMove:
- func(' '*depth +'<move>')
- # Flip Y and Z axis.
- - func(' '*depth +' <v x="%s" z="%s" y="%s" />' % tuple(matrix.translation_part()))
- + func(' '*depth +' <v x="%s" z="%s" y="%s" />' % tuple(matrix.to_translation()))
- if rot[0] or rot[1] or rot[2]:
- func(' '*depth +' <matrix>')
- # Order 'YZX' is important!
- Index: scripts/io/b2cs/io/util.py
- ===================================================================
- --- scripts/io/b2cs/io/util.py (revision 3792)
- +++ scripts/io/b2cs/io/util.py (working copy)
- @@ -65,7 +65,7 @@
- else:
- try:
- library = os.path.split(bpy.path.abspath(self.library.filepath))[0] if self.library else None
- - if self.filepath.startswith('//'):
- + if library != None and self.filepath.startswith('//'):
- src = os.path.join(library, self.filepath[2:])
- else:
- src = bpy.path.abspath(self.filepath)
- Index: scripts/io/b2cs/io/object.py
- ===================================================================
- --- scripts/io/b2cs/io/object.py (revision 3792)
- +++ scripts/io/b2cs/io/object.py (working copy)
- @@ -161,7 +161,7 @@
- elif self.type == 'LAMP':
- func(' '*depth +'<light name="%s">'%(name))
- # Flip Y and Z axis.
- - func(' '*depth +' <center x="%f" z="%f" y="%f" />'% tuple(self.relative_matrix.translation_part()))
- + func(' '*depth +' <center x="%f" z="%f" y="%f" />'% tuple(self.relative_matrix.to_translation()))
- func(' '*depth +' <color red="%f" green="%f" blue="%f" />'% tuple(self.data.color))
- func(' '*depth +' <radius brightness="%f">%f</radius>'%(self.data.energy, self.data.distance))
- func(' '*depth +' <attenuation>linear</attenuation>')
Add Comment
Please, Sign In to add comment