Advertisement
gr4ph0s

Untitled

Dec 11th, 2017
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.16 KB | None | 0 0
  1.     def create_combobox_rig(self, redraw=False):
  2.         if redraw:
  3.             self.LayoutFlushGroup(const.RIG)
  4.         else:
  5.             self.GroupBegin(const.RIG, c4d.BFH_SCALEFIT | c4d.BFV_TOP, 3, title=txt.RIG)
  6.             self.GroupBorder(c4d.BORDER_GROUP_IN)
  7.             self.GroupBorderSpace(10, 10, 10, 10)
  8.  
  9.         #Creation du combobox
  10.         buffer_all_rigs    = self.rig.get_all_rigs()
  11.         buffer_active_rig  = self.rig.get_active_rig()
  12.  
  13.         #On créer le combo general
  14.         self.AddComboBox(const.RIG_COMBOBOX, c4d.BFH_SCALEFIT)
  15.  
  16.         #On liste tout les groups et on ajoute
  17.         for i in xrange(0, len(buffer_all_rigs)):
  18.             self.AddChild(const.RIG_COMBOBOX, i, str(buffer_all_rigs[i]["name"]))
  19.  
  20.         self.SetLong(const.RIG_COMBOBOX, buffer_active_rig["id"])
  21.  
  22.         #Création des boutton ajout + delete rig
  23.         self.AddButton(const.RIG_ADD_BUTTON_COMBO, c4d.BFH_CENTER,10, 10, name=txt.RIG_ADD_BUTTON_COMBO)
  24.         self.AddButton(const.RIG_REMOVE_BUTTON_COMBO, c4d.BFH_CENTER,10, 10, name=txt.RIG_REMOVE_BUTTON_COMBO)
  25.  
  26.         self.GroupEnd()
  27.  
  28.         if redraw:
  29.             self.LayoutChanged(const.RIG)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement