コード例 #1
0
ファイル: mesh.py プロジェクト: arubertoson/maya-mamtools
def vertex_normals_from_selection_center():
    bbox = BoundingBox()
    for component in mampy.complist():
        if not component.is_vert():
            component = component.to_vert()
        bbox.expand(component.bbox)
    set_vertex_normals_on_selected_from_vector(bbox.center)
コード例 #2
0
ファイル: components.py プロジェクト: arubertoson/maya-mampy
    def bbox(self):
        if self.space not in self._bbox:
            pmax = api.MPoint(map(max, itertools.izip(*self.points)))
            pmin = api.MPoint(map(min, itertools.izip(*self.points)))

            bbox = BoundingBox(pmax, pmin)
            if self._mtype == MFn.kMeshMapComponent:
                bbox.boxtype = '2D'
            self._bbox[self.space] = bbox
        return self._bbox[self.space]
コード例 #3
0
ファイル: components.py プロジェクト: arubertoson/mampy
    def bbox(self):
        if self.space not in self._bbox:
            pmax = api.MPoint(map(max, itertools.izip(*self.points)))
            pmin = api.MPoint(map(min, itertools.izip(*self.points)))

            bbox = BoundingBox(pmax, pmin)
            if self._mtype == MFn.kMeshMapComponent:
                bbox.boxtype = '2D'
            self._bbox[self.space] = bbox
        return self._bbox[self.space]