Exemple #1
0
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		self.btext = '' # button text
		self.type = 'control'
		self.code = ''
		NodeParam.__init__ ( self, xml_param, isRibParam )

		if DEBUG_MODE : print ( '>> ControlParam ( %s ).__init__ btext = "%s"' % ( self.label, self.btext ) )
    def __init__(self, xml_param=None, isRibParam=False):
        #
        self.btext = ''  # button text
        self.type = 'control'
        self.code = ''
        NodeParam.__init__(self, xml_param, isRibParam)

        if DEBUG_MODE:
            print('>> ControlParam ( %s ).__init__ btext = "%s"' %
                  (self.label, self.btext))
Exemple #3
0
	def parseFromXML ( self, xml_param ) :
		#
		if DEBUG_MODE : print ( '>> ControlParam ( %s ).parseFromXML' % self.label )
		NodeParam.parseFromXML ( self, xml_param )

		control_code_tag = xml_param.namedItem ( 'code' )
		if not control_code_tag.isNull () :
			self.code = str ( control_code_tag.toElement ().text () )
		else :
			# for temp. backward compatibility check 'control_code' also
			control_code_tag = xml_param.namedItem ( 'control_code' )
			if not control_code_tag.isNull () :
				code_str = str ( control_code_tag.toElement ().text () ).lstrip ()
				if code_str == '' : code_str = None
				self.code = code_str
			
		self.btext = str ( xml_param.attributes ().namedItem ( 'btext' ).nodeValue () )
    def parseFromXML(self, xml_param):
        #
        if DEBUG_MODE:
            print('>> ControlParam ( %s ).parseFromXML' % self.label)
        NodeParam.parseFromXML(self, xml_param)

        control_code_tag = xml_param.namedItem('code')
        if not control_code_tag.isNull():
            self.code = str(control_code_tag.toElement().text())
        else:
            # for temp. backward compatibility check 'control_code' also
            control_code_tag = xml_param.namedItem('control_code')
            if not control_code_tag.isNull():
                code_str = str(control_code_tag.toElement().text()).lstrip()
                if code_str == '': code_str = None
                self.code = code_str

        self.btext = str(xml_param.attributes().namedItem('btext').nodeValue())
Exemple #5
0
	def parseToXML ( self, dom ) :
		#
		if DEBUG_MODE : print ( '>> ControlParam ( %s ).parseToXML' % self.label )
		xmlnode = NodeParam.parseToXML ( self, dom )

		if self.code is not None :
			code_tag = dom.createElement ( 'code' )
			code_text = dom.createTextNode ( self.code )
			code_tag.appendChild ( code_text )
			xmlnode.appendChild ( code_tag )
		
		if self.btext != '' : xmlnode.setAttribute ( 'btext', self.btext )

		return xmlnode
    def parseToXML(self, dom):
        #
        if DEBUG_MODE: print('>> ControlParam ( %s ).parseToXML' % self.label)
        xmlnode = NodeParam.parseToXML(self, dom)

        if self.code is not None:
            code_tag = dom.createElement('code')
            code_text = dom.createTextNode(self.code)
            code_tag.appendChild(code_text)
            xmlnode.appendChild(code_tag)

        if self.btext != '': xmlnode.setAttribute('btext', self.btext)

        return xmlnode
Exemple #7
0
	def copySetup ( self, newParam ) :
		#
		if DEBUG_MODE : print ( '>> ControlParam ( %s ).copySetup' % self.label )
		NodeParam.copySetup ( self, newParam )
		newParam.code = self.code
		newParam.btext = self.btext
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		self.type = 'volume'
Exemple #9
0
 def __init__ ( self, xml_param = None, isRibParam = False ) :
   NodeParam.__init__ ( self, xml_param, isRibParam )
   self.type = 'matrix'
 def __init__(self, xml_param=None, isRibParam=False):
     #
     NodeParam.__init__(self, xml_param, isRibParam)
     #super ( FloatNodeParam, self ).__init__ ( xml_param, isRibParam )
     self.type = 'float'
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		#super ( FloatNodeParam, self ).__init__ ( xml_param, isRibParam )
		self.type = 'float'
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		self.type = 'displacement'
Exemple #13
0
 def __init__(self, xml_param=None, isRibParam=False):
     #
     NodeParam.__init__(self, xml_param, isRibParam)
     self.type = 'displacement'
 def copySetup(self, newParam):
     #
     if DEBUG_MODE: print('>> ControlParam ( %s ).copySetup' % self.label)
     NodeParam.copySetup(self, newParam)
     newParam.code = self.code
     newParam.btext = self.btext
	def __init__ ( self, xml_param = None, isRibParam = True ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		self.type = 'transform'
 def __init__(self, xml_param=None, isRibParam=False):
     #
     NodeParam.__init__(self, xml_param, isRibParam)
     self.type = 'vector'
Exemple #17
0
 def __init__(self, xml_param=None, isRibParam=False):
     NodeParam.__init__(self, xml_param, isRibParam)
     self.type = 'matrix'