Revision: 38053
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38053
Author: kjym3
Date: 2011-07-03 07:48:19 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Fixed a bug introduced in the last commit to address the issue
of cap shaders.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
Modified:
branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
===================================================================
---
branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
2011-07-03 07:37:33 UTC (rev 38052)
+++
branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
2011-07-03 07:48:19 UTC (rev 38053)
@@ -351,7 +351,8 @@
buffer = []
for sv in iter_stroke_vertices(stroke):
buffer.append((sv.getPoint(), sv.attribute()))
- if len(buffer) < 2:
+ nverts = len(buffer)
+ if nverts < 2:
return
# calculate the number of additional vertices to form caps
R, L = stroke[0].attribute().getThicknessRL()
@@ -360,8 +361,7 @@
R, L = stroke[-1].attribute().getThicknessRL()
caplen_end = (R + L) / 2.0
nverts_end = max(5, int(R + L))
- # increase the total number of stroke vertices
- nverts = stroke.strokeVerticesSize()
+ # adjust the total number of stroke vertices
stroke.Resample(nverts + nverts_beg + nverts_end)
# restore the location and attribute of the original vertices
for i in range(nverts):
@@ -401,7 +401,8 @@
buffer = []
for sv in iter_stroke_vertices(stroke):
buffer.append((sv.getPoint(), sv.attribute()))
- if len(buffer) < 2:
+ nverts = len(buffer)
+ if nverts < 2:
return
# calculate the number of additional vertices to form caps
R, L = stroke[0].attribute().getThicknessRL()
@@ -410,8 +411,7 @@
R, L = stroke[-1].attribute().getThicknessRL()
caplen_end = (R + L) / 2.0
nverts_end = 1
- # increase the total number of stroke vertices
- nverts = stroke.strokeVerticesSize()
+ # adjust the total number of stroke vertices
stroke.Resample(nverts + nverts_beg + nverts_end)
# restore the location and attribute of the original vertices
for i in range(nverts):
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs