Guest User

Untitled

a guest
Jan 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. Index: scripts/io/b2cs/io/transform.py
  6. ===================================================================
  7. --- scripts/io/b2cs/io/transform.py (revision 3792)
  8. +++ scripts/io/b2cs/io/transform.py (working copy)
  9. @@ -16,11 +16,11 @@
  10.  
  11.  
  12. def MatrixAsCS(matrix, func, depth=0, noMove=False):
  13. - rot=matrix.rotation_part().to_euler().unique()
  14. + rot=matrix.to_3x3().to_euler()
  15. if not noMove:
  16. func(' '*depth +'<move>')
  17. # Flip Y and Z axis.
  18. - func(' '*depth +' <v x="%s" z="%s" y="%s" />' % tuple(matrix.translation_part()))
  19. + func(' '*depth +' <v x="%s" z="%s" y="%s" />' % tuple(matrix.to_translation()))
  20. if rot[0] or rot[1] or rot[2]:
  21. func(' '*depth +' <matrix>')
  22. # Order 'YZX' is important!
  23. Index: scripts/io/b2cs/io/util.py
  24. ===================================================================
  25. --- scripts/io/b2cs/io/util.py (revision 3792)
  26. +++ scripts/io/b2cs/io/util.py (working copy)
  27. @@ -65,7 +65,7 @@
  28. else:
  29. try:
  30. library = os.path.split(bpy.path.abspath(self.library.filepath))[0] if self.library else None
  31. - if self.filepath.startswith('//'):
  32. + if library != None and self.filepath.startswith('//'):
  33. src = os.path.join(library, self.filepath[2:])
  34. else:
  35. src = bpy.path.abspath(self.filepath)
  36. Index: scripts/io/b2cs/io/object.py
  37. ===================================================================
  38. --- scripts/io/b2cs/io/object.py (revision 3792)
  39. +++ scripts/io/b2cs/io/object.py (working copy)
  40. @@ -161,7 +161,7 @@
  41. elif self.type == 'LAMP':
  42. func(' '*depth +'<light name="%s">'%(name))
  43. # Flip Y and Z axis.
  44. - func(' '*depth +' <center x="%f" z="%f" y="%f" />'% tuple(self.relative_matrix.translation_part()))
  45. + func(' '*depth +' <center x="%f" z="%f" y="%f" />'% tuple(self.relative_matrix.to_translation()))
  46. func(' '*depth +' <color red="%f" green="%f" blue="%f" />'% tuple(self.data.color))
  47. func(' '*depth +' <radius brightness="%f">%f</radius>'%(self.data.energy, self.data.distance))
  48. func(' '*depth +' <attenuation>linear</attenuation>')
Add Comment
Please, Sign In to add comment