Hi, guys! How to properly copy the dictionary with DescIDs?:thinking_face:
Here is example code:
import c4d
from copy import deepcopy
def main():
dId_one = c4d.DescID(c4d.DescLevel(10), c4d.DescLevel(20), c4d.DescLevel(30))
dId_two = c4d.DescID(c4d.DescLevel(50), c4d.DescLevel(200), c4d.DescLevel(1000))
dict1 = {'1':dId_one,'2':dId_two}
dict2 = deepcopy(dict1)
print 'dict1 ',dict1
print 'dict2 ',dict2
# dict1 {'1': ((10, 0, 0), (20, 0, 0), (30, 0, 0)), '2': ((50, 0, 0), (200, 0, 0), (1000, 0, 0))}
# dict2 {'1': ( ), '2': ( )} <--- WHY???
if __name__ == '__main__':
main()