Hi @blastframe, while the code provided by @zipit will work for most of the symbols
There will be some symbols missing, some are not uppercase (like Ocube), some are made from other types, like c4d.ID_USERDATA
which return a DescID).
So the safest way to process is to retrieve everything that is not a module, a class, a type object, a method or a function.
import c4d
import types
def GetAllSymbols():
def IsSymbol(x):
isSymbols = False
obj = getattr(c4d, x)
return not isinstance(obj, (types.FunctionType,
types.BuiltinFunctionType,
types.BuiltinMethodType,
types.MethodType,
types.UnboundMethodType,
types.ClassType,
types.TypeType,
types.ModuleType))
dirC4D = filter(lambda objStr: IsSymbol(objStr), dir(c4d))
values = {"c4d.{0}".format(objStr): getattr(c4d, objStr) for objStr in dirC4D}
return values
def main():
allSymbol = GetAllSymbols()
for symbol, value in allSymbol.items():
print symbol, value
# Execute main()
if __name__=='__main__':
main()
Cheers,
Maxime.