Created
April 14, 2019 04:06
-
-
Save scott-wilson/aeec017e55602fd6d64decc8fa81d422 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from maya import cmds | |
def get_new_name(prefix, suffixes): | |
names = [] | |
rand_value = random.randrange(10000, 20000) | |
for suffix in suffixes: | |
names.append("{}_{}_{}".format(prefix, rand_value, suffix)) | |
return names | |
result1 = get_new_name("FFS", ["high", "low"]) | |
result2 = get_new_name("FFS", ["high", "low"]) | |
result3 = get_new_name("abc", ["high", "mid", "low"]) | |
print result1 | |
print result2 | |
print result3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment