def lockUnlockAttr(obj, attr, lockState, useLockHide): try: cmd.setAttr('%s.%s' % (obj, attr), edit=True, lock=lockState) except RuntimeError as err: if useLockHide: cmd._lock_n_hide(obj, attribute=attr, lock=lockState, I_know_what_Im_doing_and_wont_complain_if_I_fuck_shit_up=1) else: raise err
def lockUnlockAttr(obj, attr, lockState, useLockHide): try: cmd.setAttr('%s.%s' % (obj, attr), edit=True, lock=lockState) except RuntimeError as err: if useLockHide: cmd._lock_n_hide( obj, attribute=attr, lock=lockState, I_know_what_Im_doing_and_wont_complain_if_I_fuck_shit_up=1) else: raise err
def callLockHideCommand(node, attribute, lock=-1, hide=-1): '''A simple wrapper for the lock_n_hide command. Want to call this on your own? READ THE ENTIRE DOCUMENTATION. This method is useful because lock_n_hide has some obfuscation to help prevent users from accidentally calling it (or developers who haven't read the documentation)''' kwargs = {'attribute': attribute, 'I_know_what_Im_doing_and_wont_complain_if_I_fuck_shit_up': 1} if lock != -1: kwargs['lock'] = lock if hide != -1: kwargs['hide'] = hide cmd._lock_n_hide(node, **kwargs)
def callLockHideCommand(node, attribute, lock=-1, hide=-1): '''A simple wrapper for the lock_n_hide command. Want to call this on your own? READ THE ENTIRE DOCUMENTATION. This method is useful because lock_n_hide has some obfuscation to help prevent users from accidentally calling it (or developers who haven't read the documentation)''' kwargs = { 'attribute': attribute, 'I_know_what_Im_doing_and_wont_complain_if_I_fuck_shit_up': 1 } if lock != -1: kwargs['lock'] = lock if hide != -1: kwargs['hide'] = hide cmd._lock_n_hide(node, **kwargs)