i want use output of textfield serve name newly created blenshape. when press button create shape consideres text has been defined me stock text should replaced. doesn't consider new letters typed in box :
def buildui(self, *args): self.widgets["bs"] = cmds.textfield (tx= "replace me", editable= true, ) self.widgets["blendshape_name"] = cmds.textfield(self.widgets['bs'], q=true, text=true) cmds.button(label="create blendshape ", w=295, h=30, al="center", c=self.blendshape) def blendshape (self, *args): cmds.blendshape ( cmds.ls(sl=true)[1], cmds.ls(sl=true)[0],frontofchain=true, n= self.widgets["blendshape_name"] )
you query blendshape_name when run buildui function. have read textfield @ every click. query blendshape_name inside function blendshape:
def blendshape(self, *args): blendshape_name = cmds.textfield(self.widgets['bs'], q=true, text=true) cmds.blendshape(cmds.ls(sl=true)[1], cmds.ls(sl=true)[0], frontofchain=true, n=blendshape_name)
Comments
Post a Comment