示例#1
0
    def __init__(self, *args, **kwargs):
        super(Simulation,self).__init__(*args, **kwargs)

        self._name = self.getMember('name')
        self._data = self.getMember(DataObject.getTypeName())
        self._robjs = self.getMember(RenderObject.getTypeName())
        self.instanced = False
        self.script     = self.getMember(Scriptable.getTypeName())
示例#2
0
    def _createDataGUI(self):
        pm.text( label='Data' ) 
        pm.attrEnumOptionMenuGrp( l='Type', 
                             at=self.node.name() +
                             '.'+CRSimulation_Node._dataTypeAttr,
                             ei=(0, DataObject.getTypeName()))

        pm.button(label="Add", w=128,
                c=pm.Callback(self.addChildEnumCB, CRDataObject,
                    self.datasrcs,
                    srcattr=CRSimulation_Node._dataTypeAttr))
示例#3
0
 def updateMembers(self):
     self.setMember('name', self._name)
     self.setMember(DataObject.getTypeName(), self._data)
     self.setMember(RenderObject.getTypeName(), self._robjs)
     self.setMember(Scriptable.getTypeName(), self.script)
示例#4
0
 def _initMembersDict(self):
     super(Simulation, self)._initMembersDict()
     self._members['name']   = [str, 'sim']
     self._members[DataObject.getTypeName()] = [DataObject, None]
     self._members[RenderObject.getTypeName()] = [RenderObject, []]
     self._members[Scriptable.getTypeName()] = [Scriptable, None]