Beispiel #1
0
    def build(self):
        """builds it self
        """
        self.curve = curve(d=1, p=[(1, 0, 0), (-1, 0, 0)], k=(0, 1))
        self.corner1_locator = spaceLocator()
        self.corner2_locator = spaceLocator()
        select(self.curve)
        ClusterCurve()

        # try to find the clusterHandles
        curve_shape = curve.getShape()
        clusters = []
        handles = []
        for node in curve_shape.listHistroy():
            if isinstance(node, ClusterHandle):
                handles.append(node)
            elif isinstance(node, Cluster):
                clusters.append(node)

        self.cluster1 = clusters[0]
        self.cluster2 = clusters[0]

        self.cluster_handle1 = handles[0]
        self.cluster_handle2 = handles[1]

        # set clusters to absolute
        self.cluster1.setAttr('relative', 0)
        self.cluster2.setAttr('relative', 0)
Beispiel #2
0
    def build(self):
        """builds it self
        """
        self.curve = curve(d=1, p=[(1, 0, 0), (-1, 0, 0)], k=(0, 1))
        self.corner1_locator = spaceLocator()
        self.corner2_locator = spaceLocator()
        select(self.curve)
        ClusterCurve()

        # try to find the clusterHandles
        curve_shape = curve.getShape()
        clusters = []
        handles = []
        for node in curve_shape.listHistroy():
            if isinstance(node, ClusterHandle):
                handles.append(node)
            elif isinstance(node, Cluster):
                clusters.append(node)

        self.cluster1 = clusters[0]
        self.cluster2 = clusters[0]

        self.cluster_handle1 = handles[0]
        self.cluster_handle2 = handles[1]

        # set clusters to absolute
        self.cluster1.setAttr('relative', 0)
        self.cluster2.setAttr('relative', 0)