primitives_sockets.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. from .mantis_dataclasses import MantisSocketTemplate as SockTemplate
  2. from dataclasses import replace
  3. LatticeSockets = [
  4. Name := SockTemplate(name="Name", blender_property="name", default_value='Lattice',
  5. is_input=True, bl_idname="StringSocket"),
  6. ResolutionU := SockTemplate(name = "Resolution U", bl_idname="UnsignedIntSocket",
  7. blender_property="points_u", is_input=True, default_value=2),
  8. ResolutionV := SockTemplate(name = "Resolution V", bl_idname="UnsignedIntSocket",
  9. blender_property="points_v", is_input=True, default_value=2),
  10. ResolutionW := SockTemplate(name = "Resolution W", bl_idname="UnsignedIntSocket",
  11. blender_property="points_w", is_input=True, default_value=2),
  12. InterpolationTypeU := SockTemplate(name = "Interpolation Type U",
  13. bl_idname="EnumLatticeInterpolationTypeSocket",
  14. blender_property="interpolation_type_u",
  15. is_input=True, default_value='KEY_BSPLINE'),
  16. InterpolationTypeV := SockTemplate(name = "Interpolation Type V",
  17. bl_idname="EnumLatticeInterpolationTypeSocket",
  18. blender_property="interpolation_type_v",
  19. is_input=True, default_value='KEY_BSPLINE'),
  20. InterpolationTypeW := SockTemplate(name = "Interpolation Type W",
  21. bl_idname="EnumLatticeInterpolationTypeSocket",
  22. blender_property="interpolation_type_w",
  23. is_input=True, default_value='KEY_BSPLINE'),
  24. GeometryOutput := SockTemplate(name="Lattice Geometry", bl_idname="GeometrySocket")
  25. ]
  26. CirclePrimitiveSockets = [
  27. replace(Name, default_value='Circle',),
  28. Radius :=SockTemplate(name = "Radius", bl_idname="FloatPositiveSocket",
  29. is_input=True, default_value=1.0),
  30. # TODO: this should be an UnsignedIntSocket
  31. NumberOfPoints :=SockTemplate(name = "Number of Points", bl_idname="IntSocket",
  32. is_input=True, default_value=32),
  33. GeometryOutput := SockTemplate(name="Circle", bl_idname="GeometrySocket"),
  34. ]