Example #1
0
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)
Example #2
0
    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]
Example #3
0
    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]