Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-04-05 14:55:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-05 14:55:18 +0400
commit0eb018919a193a4d868f90e21601eba383a82e60 (patch)
tree905967b27af0e4fb3d18940cbbb3a7cf32afe9c0 /release/scripts/wizard_curve2tree.py
parent8fdfd4cc4c6b74418bfd28720e2fe027c76a1aeb (diff)
fix for wrong rotation between branch joins
Diffstat (limited to 'release/scripts/wizard_curve2tree.py')
-rw-r--r--release/scripts/wizard_curve2tree.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/release/scripts/wizard_curve2tree.py b/release/scripts/wizard_curve2tree.py
index 27ddab5a807..4ff8f6a8c1e 100644
--- a/release/scripts/wizard_curve2tree.py
+++ b/release/scripts/wizard_curve2tree.py
@@ -46,6 +46,15 @@ from Blender.Noise import randuvec
GLOBALS = {}
GLOBALS['non_bez_error'] = 0
+'''
+def debugVec(v1,v2):
+ sce = bpy.data.scenes.active
+ me = bpy.data.meshes.new()
+ me.verts.extend( [v1,v2] )
+ me.edges.extend( [(0,1)] )
+ sce.objects.new(me)
+'''
+
def AngleBetweenVecsSafe(a1, a2):
try:
return AngleBetweenVecs(a1,a2)
@@ -1487,7 +1496,7 @@ class tree:
else:
# our roll was set from the branches parent and needs no changing
# set it to zero so the following functions know to interpolate.
- brch.bpoints[0].roll_angle = 45.0
+ brch.bpoints[0].roll_angle = 0.0
#brch.bpoints[1].roll_angle = 0.0
'''
@@ -2407,6 +2416,7 @@ class bpoint(object):
Roll the quad about its normal
use for aurienting the sides of a quad to meet a branch that stems from here...
'''
+ # debugVec(self.co, self.co + self.no)
mat = RotationMatrix(angle, 3, 'r', self.no)
for i in xrange(4):
@@ -2451,7 +2461,7 @@ class bpoint(object):
def calcVerts(self):
if self.prev == None:
if self.branch.parent_pt:
- cross = CrossVecs(self.no, self.branch.getParentFaceCent() - self.branch.parent_pt.getAbsVec( self.branch.getParentQuadIndex() ))
+ cross = CrossVecs(self.no, self.branch.parent_pt.no) * RotationMatrix(-45, 3, 'r', self.no)
else:
# parentless branch - for best results get a cross thats not the same as the normal, in rare cases this happens.