[Bf-extensions-cvs] [6159a7f] master: Fix: filepath for windows. Thanks Campbell.
Eugenio Pignataro
noreply at git.blender.org
Wed Feb 5 21:14:35 CET 2014
Commit: 6159a7fd76978b1ea5d3d67f6161e3ce88fcd066
Author: Eugenio Pignataro
Date: Wed Feb 5 17:14:22 2014 -0300
https://developer.blender.org/rBAC6159a7fd76978b1ea5d3d67f6161e3ce88fcd066
Fix: filepath for windows. Thanks Campbell.
===================================================================
M oscurart_tools/oscurart_meshes.py
===================================================================
diff --git a/oscurart_tools/oscurart_meshes.py b/oscurart_tools/oscurart_meshes.py
index 2cd87cc..0060110 100644
--- a/oscurart_tools/oscurart_meshes.py
+++ b/oscurart_tools/oscurart_meshes.py
@@ -335,13 +335,13 @@ class OscOverlapUv(bpy.types.Operator):
## ------------------------------- IO VERTEX COLORS --------------------
def DefOscExportVC():
- with open("%s/%s.vc" % (os.path.dirname(bpy.data.filepath),bpy.context.object.name), mode="w") as file:
+ with open(os.path.join(os.path.dirname(bpy.data.filepath),bpy.context.object.name) + ".vc", mode="w") as file:
ob = bpy.context.object
di = { loopind : ob.data.vertex_colors.active.data[loopind].color[:] for face in ob.data.polygons for loopind in face.loop_indices[:] }
file.write(str(di))
def DefOscImportVC():
- with open("%s/%s.vc" % (os.path.dirname(bpy.data.filepath),bpy.context.object.name), mode="r") as file:
+ with open(os.path.join(os.path.dirname(bpy.data.filepath),bpy.context.object.name) + ".vc", mode="r") as file:
di = eval(file.read())
for loopind in di:
bpy.context.object.data.vertex_colors.active.data[loopind].color = di[loopind]
More information about the Bf-extensions-cvs
mailing list