parameters: (self)
docstring: sets the task box contents from self.material
docstring_summary: sets the task box contents from self.material
docstring_tokens: sets the task box contents from self . material
function: def setFields(self):
          "sets the task box contents from self.material"
          if 'Name' in self.material:
              self.form.FieldName.setText(self.material['Name'])
          elif self.obj:
              self.form.FieldName.setText(self.obj.Label)
          if 'Description' in self.material:
              self.form.FieldDescription.setText(self.material['Description'])
          if 'DiffuseColor' in self.material:
              self.form.ButtonColor.setIcon(self.getColorIcon(self.material["DiffuseColor"]))
          elif 'ViewColor' in self.material:
              self.form.ButtonColor.setIcon(self.getColorIcon(self.material["ViewColor"]))
          elif 'Color' in self.material:
              self.form.ButtonColor.setIcon(self.getColorIcon(self.material["Color"]))
          if 'SectionColor' in self.material:
              self.form.ButtonSectionColor.setIcon(self.getColorIcon(self.material["SectionColor"]))
          if 'StandardCode' in self.material:
              self.form.FieldCode.setText(self.material['StandardCode'])
          if 'ProductURL' in self.material:
              self.form.FieldUrl.setText(self.material['ProductURL'])
          if 'Transparency' in self.material:
              self.form.SpinBox_Transparency.setValue(int(self.material["Transparency"]))
          if "Father" in self.material:
              father = self.material["Father"]
          else:
              father = None
          found = False
          self.form.comboFather.addItem("None")
          for o in FreeCAD.ActiveDocument.Objects:
              if o.isDerivedFrom("App::MaterialObject"):
                  if o != self.obj:
                      self.form.comboFather.addItem(o.Label)
                      if o.Label == father:
                          self.form.comboFather.setCurrentIndex(self.form.comboFather.count()-1)
                          found = True
          if father and not found:
              self.form.comboFather.addItem(father)
              self.form.comboFather.setCurrentIndex(self.form.comboFather.count()-1)
function_tokens: def setFields ( self ) : if 'Name' in self . material : self . form . FieldName . setText ( self . material [ 'Name' ] ) elif self . obj : self . form . FieldName . setText ( self . obj . Label ) if 'Description' in self . material : self . form . FieldDescription . setText ( self . material [ 'Description' ] ) if 'DiffuseColor' in self . material : self . form . ButtonColor . setIcon ( self . getColorIcon ( self . material [ "DiffuseColor" ] ) ) elif 'ViewColor' in self . material : self . form . ButtonColor . setIcon ( self . getColorIcon ( self . material [ "ViewColor" ] ) ) elif 'Color' in self . material : self . form . ButtonColor . setIcon ( self . getColorIcon ( self . material [ "Color" ] ) ) if 'SectionColor' in self . material : self . form . ButtonSectionColor . setIcon ( self . getColorIcon ( self . material [ "SectionColor" ] ) ) if 'StandardCode' in self . material : self . form . FieldCode . setText ( self . material [ 'StandardCode' ] ) if 'ProductURL' in self . material : self . form . FieldUrl . setText ( self . material [ 'ProductURL' ] ) if 'Transparency' in self . material : self . form . SpinBox_Transparency . setValue ( int ( self . material [ "Transparency" ] ) ) if "Father" in self . material : father = self . material [ "Father" ] else : father = None found = False self . form . comboFather . addItem ( "None" ) for o in FreeCAD . ActiveDocument . Objects : if o . isDerivedFrom ( "App::MaterialObject" ) : if o != self . obj : self . form . comboFather . addItem ( o . Label ) if o . Label == father : self . form . comboFather . setCurrentIndex ( self . form . comboFather . count ( ) - 1 ) found = True if father and not found : self . form . comboFather . addItem ( father ) self . form . comboFather . setCurrentIndex ( self . form . comboFather . count ( ) - 1 )