Exemple #1
0
    def setPolyData(self, polyData):

        if polyData.GetNumberOfPoints():
            originPose = self.getProperty('Origin')
            pos, quat = originPose[:3], originPose[3:]
            t = transformUtils.transformFromPose(pos, quat)
            polyData = filterUtils.transformPolyData(polyData, t.GetLinearInverse())
        PolyDataItem.setPolyData(self, polyData)
Exemple #2
0
    def setPolyData(self, polyData):

        if polyData.GetNumberOfPoints():
            originPose = self.getProperty('Origin')
            pos, quat = originPose[:3], originPose[3:]
            t = transformUtils.transformFromPose(pos, quat)
            polyData = filterUtils.transformPolyData(polyData, t.GetLinearInverse())
        PolyDataItem.setPolyData(self, polyData)
Exemple #3
0
    def __init__(self, name, polyData, view):
        PolyDataItem.__init__(self, name, polyData, view)
        self.params = {}
        self.addProperty('uuid', newUUID(), attributes=om.PropertyAttributes(hidden=True))
        self.addProperty('Collision Enabled', True)
        self.addProperty('Origin', [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0], attributes=om.PropertyAttributes(hidden=True))
        self.addProperty('Camera Texture Enabled', False)

        self.properties.setPropertyIndex('Collision Enabled', 0)
        self.setProperty('Icon', om.Icons.Hammer)
Exemple #4
0
    def __init__(self, name, polyData, view):
        PolyDataItem.__init__(self, name, polyData, view)
        self.params = {}
        self.addProperty('uuid', newUUID(), attributes=om.PropertyAttributes(hidden=True))
        self.addProperty('Collision Enabled', True)
        self.addProperty('Origin', [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0], attributes=om.PropertyAttributes(hidden=True))
        self.addProperty('Camera Texture Enabled', False)

        self.properties.setPropertyIndex('Collision Enabled', 0)
        self.setProperty('Icon', om.Icons.Hammer)
Exemple #5
0
 def onRemoveFromObjectModel(self):
     PolyDataItem.onRemoveFromObjectModel(self)
Exemple #6
0
 def _onPropertyChanged(self, propertySet, propertyName):
     PolyDataItem._onPropertyChanged(self, propertySet, propertyName)
     if propertyName == 'Origin':
         self.updateGeometryFromProperties()
Exemple #7
0
 def onRemoveFromObjectModel(self):
     PolyDataItem.onRemoveFromObjectModel(self)
Exemple #8
0
 def _onPropertyChanged(self, propertySet, propertyName):
     PolyDataItem._onPropertyChanged(self, propertySet, propertyName)
     if propertyName == 'Origin':
         self.updateGeometryFromProperties()