Hello !
I've wrote a simple function to store some constants in a list, from a string ( because I'm lazy) :
def geoTypeList():
geo_constants = "tube,cube,plane" # not the full list
geo_types = [("c4d.O" + i) for i in geo_constants.split(",")]
return geo_types # return the list
I was happy with my solution until I've tried to use it :
for i in objs:
if i.GetType() in geoTypeList():
print(i.GetName(), "is a", i.GetTypeName(), i.GetRealType())
else:
print("Not a geometry object")
I've tried many times and many variant until I've realized that I'm trying to check a constant against some strings, so it can't work. But I'm stuck here, I don't know how to pass the list items as constants and not as string.
Also before you ask, why I'm not just using ID integers ? Because I would like to keep the code easily readable, and the docs use the constants and symbols.
Thank you,