コード例 #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()
コード例 #2
0
ファイル: writer.py プロジェクト: svenni/coral_plugins
    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'])        
コード例 #3
0
ファイル: pcReader.py プロジェクト: svenni/coral_plugins
 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'])
コード例 #4
0
ファイル: simplePyNode.py プロジェクト: ljkart/coraline
 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"])
コード例 #5
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()
コード例 #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()