Esempio n. 1
0
    def __init__(self, name, parent):
        Node.__init__(self, name, parent)

        self._fileName = StringAttribute("fileName", self)
        self._leftSpectrum = NumericAttribute("leftSpectrum", self)
        self._rightSpectrum = NumericAttribute("rightSpectrum", self)
        self._time = NumericAttribute("time", self)
        self._play = False

        self.addInputAttribute(self._fileName)
        self.addOutputAttribute(self._time)
        self.addOutputAttribute(self._leftSpectrum)
        self.addOutputAttribute(self._rightSpectrum)

        self._setAttributeAffect(self._fileName, self._time)
        self._setAttributeAffect(self._fileName, self._leftSpectrum)
        self._setAttributeAffect(self._fileName, self._rightSpectrum)

        self._setAttributeAllowedSpecializations(self._time, ["Float"])
        self._setAttributeAllowedSpecializations(self._leftSpectrum, ["FloatArray"])
        self._setAttributeAllowedSpecializations(self._rightSpectrum, ["FloatArray"])

        self._setUpdateEnabled(False)

        self._leftSpectrum.outValue().resize(64)
        self._rightSpectrum.outValue().resize(64)

        SoundManager.init()
Esempio n. 2
0
    def __init__(self, name, parent):
        Node.__init__(self, name, parent)
        
        self._path = StringAttribute('filename', self)
        self._points = NumericAttribute('points', self)
        self._data = NumericAttribute('data', self)
        self._format = EnumAttribute('format', self)
        self._frame = NumericAttribute('frame', self)
        self._startFrame = NumericAttribute('startFrame', self)
        self._endFrame = NumericAttribute('endFrame', self)
        #self._geo = GeoAttribute('geo', self)
        
        self.addInputAttribute(self._path)
        self.addInputAttribute(self._points)
        self.addInputAttribute(self._data)
        self.addInputAttribute(self._format)
        self.addInputAttribute(self._frame)
        self.addInputAttribute(self._startFrame)
        self.addInputAttribute(self._endFrame)

        self._format.value().addEntry(0, 'pc2')
        self._format.value().addEntry(1, 'ascii')
        self._format.value().setCurrentIndex(0)
        
        self._setAttributeAllowedSpecializations(self._path, ['Path-write'])
        self._setAttributeAllowedSpecializations(self._points, ['Vec3Array'])
        self._setAttributeAllowedSpecializations(self._data, ['Float'])
        self._setAttributeAllowedSpecializations(self._frame, ['Float'])
        self._setAttributeAllowedSpecializations(self._startFrame, ['Float'])
        self._setAttributeAllowedSpecializations(self._endFrame, ['Float'])        
Esempio n. 3
0
 def __init__(self, name, parent):
     Node.__init__(self, name, parent)
     
     self.path = StringAttribute('filename', self)
     self.input = NumericAttribute('frame', self)
     self.output = NumericAttribute('points',self)
     
     self.addInputAttribute(self.input)
     self.addInputAttribute(self.path)
     self.addOutputAttribute(self.output)
     
     self._setAttributeAffect(self.input, self.output)
     self._setAttributeAffect(self.path, self.output)
     
     
     self._setAttributeAllowedSpecializations(self.input, ['Float'])
     self._setAttributeAllowedSpecializations(self.output, ['Vec3Array'])
Esempio n. 4
0
 def __init__(self, name, parent):
     Node.__init__(self, name, parent)
     
     self.input1 = NumericAttribute("input1", self)
     self.input2 = NumericAttribute("input2", self)
     self.output = NumericAttribute("output", self)
     
     self.addInputAttribute(self.input1)
     self.addInputAttribute(self.input2)
     self.addOutputAttribute(self.output)
     
     self._setAttributeAffect(self.input1, self.output)
     self._setAttributeAffect(self.input2, self.output)
     
     self._setAttributeAllowedSpecializations(self.input1, ["Float"])
     self._setAttributeAllowedSpecializations(self.input2, ["Float"])
     self._setAttributeAllowedSpecializations(self.output, ["Float"])
    def __init__(self, name, parent):
        Node.__init__(self, name, parent)
        
        self.setClassName("ViewportCamera")

        self._modelMatrix = NumericAttribute("modelMatrix", self)
        self._fov = NumericAttribute("fov", self)
        self._zNear = NumericAttribute("zNear", self)
        self._zFar = NumericAttribute("zFar", self)
        
        self.addOutputAttribute(self._modelMatrix)
        self.addOutputAttribute(self._fov)
        self.addOutputAttribute(self._zNear)
        self.addOutputAttribute(self._zFar)
        
        self._setAttributeAllowedSpecializations(self._modelMatrix, ["Matrix44"])
        self._setAttributeAllowedSpecializations(self._fov, ["Float"])
        self._setAttributeAllowedSpecializations(self._zNear, ["Float"])
        self._setAttributeAllowedSpecializations(self._zFar, ["Float"])

        viewport.addCameraNode(self)

        self._extractViewportInfo()
Esempio n. 6
0
    def __init__(self, name, parent):
        Node.__init__(self, name, parent)

        self.setClassName("ViewportCamera")

        self._modelMatrix = NumericAttribute("modelMatrix", self)
        self._fov = NumericAttribute("fov", self)
        self._zNear = NumericAttribute("zNear", self)
        self._zFar = NumericAttribute("zFar", self)

        self.addOutputAttribute(self._modelMatrix)
        self.addOutputAttribute(self._fov)
        self.addOutputAttribute(self._zNear)
        self.addOutputAttribute(self._zFar)

        self._setAttributeAllowedSpecializations(self._modelMatrix,
                                                 ["Matrix44"])
        self._setAttributeAllowedSpecializations(self._fov, ["Float"])
        self._setAttributeAllowedSpecializations(self._zNear, ["Float"])
        self._setAttributeAllowedSpecializations(self._zFar, ["Float"])

        viewport.addCameraNode(self)

        self._extractViewportInfo()