-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmakeUnique.py
More file actions
28 lines (23 loc) · 632 Bytes
/
makeUnique.py
File metadata and controls
28 lines (23 loc) · 632 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import general
import uuid
def makeUnique(obj):
#init our list
retlist = list()
for x in obj:
unid = str(uuid.uuid4())[:10]
general.rename_object(x,unid)
retlist.append(unid)
return retlist
# function to get all the objects in the level into one list
def getAllObjects():
# define our list of objects to search through
objects = list()
#get all the layers
layers = general.get_all_layers()
#for every layer get all the objects in it
for x in layers:
objects.extend(general.get_all_objects_of_layer(x))
#send the compiled list back
return objects
test = getAllObjects()
print test