From 141e279d708c80b5187898035d0d50181cbb6dca Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 1 Dec 2007 22:00:09 +0000 Subject: wizard_curve2tree.py - bounding twig mesh didnt work if it had some transformation. buttons_shading.c - premul button was overlapping movie buttons --- release/scripts/wizard_curve2tree.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'release') diff --git a/release/scripts/wizard_curve2tree.py b/release/scripts/wizard_curve2tree.py index b600d4284cf..312c5336411 100644 --- a/release/scripts/wizard_curve2tree.py +++ b/release/scripts/wizard_curve2tree.py @@ -170,6 +170,7 @@ class tree: self.objectTwigBounds = None # use for twigs only at the moment. self.objectTwigBoundsIMat = None + self.objectTwigBoundsMat = None self.objectTwigBoundsMesh = None self.objectLeafBounds = None @@ -276,7 +277,8 @@ class tree: def setTwigBounds(self, objectMesh): self.objectTwigBounds = objectMesh self.objectTwigBoundsMesh = objectMesh.getData(mesh=1) - self.objectTwigBoundsIMat = objectMesh.matrixWorld.copy().invert() + self.objectTwigBoundsMat = objectMesh.matrixWorld.copy() + self.objectTwigBoundsIMat = self.objectTwigBoundsMat.copy().invert() for brch in self.branches_all: brch.calcTwigBounds(self) @@ -1006,7 +1008,11 @@ class tree: vert_segment_mapping[i] = len(segments_all) v.sel = True seg = segment(0) - seg.tailCo = v.co.copy() # headCo undefined atm. + # seg.tailCo = v.co.copy() # headCo undefined atm. + seg.tailCo = v.co.copy() * self_tree.objectTwigBoundsMat * self_tree.objectCurveIMat + + # self_tree.objectCurveMat + seg.no = v.no # Build connectivity -- cgit v1.2.3