def __new__(cls, name=None, create=False, *args, **kwargs): if create: import windows kwargs.pop('bl', None) kwargs['buttonLabel'] = 'Browse' kwargs.pop('bc', None) kwargs.pop('buttonCommand', None) name = cmds.textFieldButtonGrp(name, *args, **kwargs) promptFunction = getattr(windows, cls.PROMPT_FUNCTION) def setPathCB(name): f = promptFunction() if f: cmds.textFieldButtonGrp(name, e=1, text=f, forceChangeCommand=True) import windows cb = windows.Callback(setPathCB, name) cmds.textFieldButtonGrp(name, e=1, buttonCommand=cb) return super(PathButtonGrp, cls).__new__(cls, name, create=False, *args, **kwargs)
def setPathCB(name): f = promptFunction() if f: cmds.textFieldButtonGrp(name, e=1, text=f, forceChangeCommand=True)
def __new__(cls, name=None, create=False, *args, **kwargs): if create: import windows kwargs.pop("bl", None) kwargs["buttonLabel"] = "Browse" kwargs.pop("bc", None) kwargs.pop("buttonCommand", None) name = cmds.textFieldButtonGrp(name, *args, **kwargs) promptFunction = getattr(windows, cls.PROMPT_FUNCTION) def setPathCB(name): f = promptFunction() if f: cmds.textFieldButtonGrp(name, e=1, text=f, forceChangeCommand=True) import windows cb = windows.Callback(setPathCB, name) cmds.textFieldButtonGrp(name, e=1, buttonCommand=cb) return super(PathButtonGrp, cls).__new__(cls, name, create=False, *args, **kwargs)
def pathButtonGrp(name=None, *args, **kwargs): if name is None or not cmds.textFieldButtonGrp(name, ex=1): create = True else: create = False return _uitypes.PathButtonGrp(name=name, create=create, *args, **kwargs)
def folderButtonGrp( name=None, *args, **kwargs ): import uitypes if name is None or not cmds.textFieldButtonGrp( name, ex=1 ): create = True else: create = False return uitypes.FolderButtonGrp( name=name, create=create, *args, **kwargs )
def folderButtonGrp(name=None, *args, **kwargs): import uitypes if name is None or not cmds.textFieldButtonGrp(name, ex=1): create = True else: create = False return uitypes.FolderButtonGrp(name=name, create=create, *args, **kwargs)
def __new__(cls, name=None, create=False, *args, **kwargs): if create: kwargs.pop('bl', None) kwargs['buttonLabel'] = 'Browse' kwargs.pop('bc', None) kwargs.pop('buttonCommand', None) name = cmds.textFieldButtonGrp( name, *args, **kwargs) def setPathCB(name): import windows f = windows.promptForPath() if f: cmds.textFieldButtonGrp( name, e=1, text=f, forceChangeCommand=True) import windows cb = windows.Callback( setPathCB, name ) cmds.textFieldButtonGrp( name, e=1, buttonCommand=cb ) return dynModule.TextFieldButtonGrp.__new__( cls, name, create=False, *args, **kwargs )
def __new__(cls, name=None, create=False, *args, **kwargs): if create: kwargs.pop("bl", None) kwargs["buttonLabel"] = "Browse" kwargs.pop("bl", None) kwargs["buttonLabel"] = "Browse" kwargs.pop("bc", None) kwargs.pop("buttonCommand", None) name = cmds.textFieldButtonGrp(name, *args, **kwargs) def setPathCB(name): f = promptForPath() if f: cmds.textFieldButtonGrp(name, e=1, text=f) import windows cb = windows.Callback(setPathCB, name) cmds.textFieldButtonGrp(name, e=1, buttonCommand=cb) return dynModule.TextFieldButtonGrp.__new__(cls, name, create=False, *args, **kwargs)
def setPathCB(name): import windows f = windows.promptForPath() if f: cmds.textFieldButtonGrp( name, e=1, text=f, forceChangeCommand=True)
def setPathCB(name): f = promptForPath() if f: cmds.textFieldButtonGrp( name, e=1, text=f)
def setPathCB(name): import windows f = windows.promptForPath() if f: cmds.textFieldButtonGrp( name, e=1, text=f)