Example #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)
Example #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)
Example #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)
Example #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)
Example #5
0
 def onRemoveFromObjectModel(self):
     PolyDataItem.onRemoveFromObjectModel(self)
Example #6
0
 def _onPropertyChanged(self, propertySet, propertyName):
     PolyDataItem._onPropertyChanged(self, propertySet, propertyName)
     if propertyName == 'Origin':
         self.updateGeometryFromProperties()
Example #7
0
 def onRemoveFromObjectModel(self):
     PolyDataItem.onRemoveFromObjectModel(self)
Example #8
0
 def _onPropertyChanged(self, propertySet, propertyName):
     PolyDataItem._onPropertyChanged(self, propertySet, propertyName)
     if propertyName == 'Origin':
         self.updateGeometryFromProperties()