socket_filler_operators.py 722 B

12345678910111213141516
  1. # This file is for defining socket-filler operators by name
  2. # These operators are defined by name in Socket Templates and used by
  3. # the Socket Filler system in the Property-Socket Map to transform
  4. # Mantis data to Blender-ready data
  5. # Primarily, this will involve type-casting and enum handling
  6. # Probably I will need to expand this system to take arbitrary arguments
  7. # but for now we'll take the Mantis Node and the data as arguments
  8. def cast_to_bool(*args, **kwargs):
  9. return bool(args[1]) # args[1] is the data
  10. def invert_cast_to_bool(*args, **kwargs):
  11. return bool( not args[1]) # args[1] is the data
  12. def resolve_rotation_mode_auto(*args, **kwargs):
  13. return 'XYZ' # for now this is hardcoded lmao