cgmath 3.0.3__tar.gz → 3.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. {cgmath-3.0.3/cgmath.egg-info → cgmath-3.1.0}/PKG-INFO +1 -1
  2. {cgmath-3.0.3 → cgmath-3.1.0}/__init__.py +1 -1
  3. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/_examples_geometry.py +1 -0
  4. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/_examples_hierarchy.py +2 -0
  5. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/_examples_render.py +1 -0
  6. cgmath-3.1.0/_tests/_fbx_import_files.py +196 -0
  7. cgmath-3.1.0/_tests/test_assets/fbx_maya_import.npz +0 -0
  8. cgmath-3.1.0/_tests/test_assets/maya_shear.npz +0 -0
  9. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_clip.py +152 -123
  10. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_fbx_export.py +161 -7
  11. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_fbx_labels.py +72 -18
  12. cgmath-3.1.0/_tests/test_fbx_maya_import.py +1245 -0
  13. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_hierarchy.py +29 -18
  14. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_hierarchy_io.py +1 -1
  15. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_parent_lookups.py +2 -0
  16. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_roundtrip.py +2 -2
  17. cgmath-3.1.0/_tests/test_shear.py +3330 -0
  18. cgmath-3.1.0/_tests/test_shear_maya.py +271 -0
  19. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_short_names.py +17 -7
  20. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_skin_deform.py +1 -0
  21. {cgmath-3.0.3 → cgmath-3.1.0/cgmath.egg-info}/PKG-INFO +1 -1
  22. {cgmath-3.0.3 → cgmath-3.1.0}/cgmath.egg-info/SOURCES.txt +12 -0
  23. {cgmath-3.0.3 → cgmath-3.1.0}/formats/fbx.py +10 -1
  24. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/mesh.py +3 -2
  25. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/sdf.py +18 -3
  26. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/skin_weights.py +1 -1
  27. {cgmath-3.0.3 → cgmath-3.1.0}/hierarchy/hierarchy.py +2746 -564
  28. {cgmath-3.0.3 → cgmath-3.1.0}/pyproject.toml +2 -2
  29. {cgmath-3.0.3 → cgmath-3.1.0}/render/scene.py +7 -5
  30. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_numba/_euler.py +36 -8
  31. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/main.py +8 -5
  32. {cgmath-3.0.3 → cgmath-3.1.0}/LICENSE +0 -0
  33. {cgmath-3.0.3 → cgmath-3.1.0}/README.md +0 -0
  34. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/__init__.py +0 -0
  35. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/_examples_curves.py +0 -0
  36. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/_examples_deform.py +0 -0
  37. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/_maya_rotate_order.py +0 -0
  38. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/maya_euler.npz +0 -0
  39. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/mikktspace_deformed_data.json +0 -0
  40. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/mikktspace_test_data.json +0 -0
  41. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_data_module.curve.pkl +0 -0
  42. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_data_module.mesh.pkl +0 -0
  43. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_data_module.patch.pkl +0 -0
  44. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_data_module.saved_by_2_0_0.zip +0 -0
  45. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_geometry.bspline_best_fit_params.npz +0 -0
  46. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_geometry.bspline_maya_curves.json +0 -0
  47. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_hierarchy.legacy_parent_node.json +0 -0
  48. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_hierarchy.legacy_parent_node.npz +0 -0
  49. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_hierarchy.legacy_parent_node.pkl +0 -0
  50. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_hierarchy.legacy_parent_node_clip.json +0 -0
  51. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_hierarchy.results.npz +0 -0
  52. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_hierarchy.skeleton.json +0 -0
  53. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.bitmap_buffer.npz +0 -0
  54. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.source_mesh_data.json +0 -0
  55. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.source_uv_list.json +0 -0
  56. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_mesh_data.npz +0 -0
  57. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_mesh_data_ngons_only.npz +0 -0
  58. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_mesh_data_preserve_order.npz +0 -0
  59. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_mesh_data_preserve_order_ngons_only.npz +0 -0
  60. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_uv_list.npz +0 -0
  61. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_uv_list_ngons_only.npz +0 -0
  62. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_uv_list_preserve_order.npz +0 -0
  63. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_ngon.triangulate_uv_list_preserve_order_ngons_only.npz +0 -0
  64. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.dst_bs_data.npz +0 -0
  65. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.dst_mesh_data.npz +0 -0
  66. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.dst_skin_data.npz +0 -0
  67. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.dst_uv_data.npz +0 -0
  68. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.overlap.pkl +0 -0
  69. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.src_bs_data.npz +0 -0
  70. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.src_mesh_data.npz +0 -0
  71. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.src_skin_data.npz +0 -0
  72. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_resample.src_uv_data.npz +0 -0
  73. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_assets/test_sdf.igloo.npz +0 -0
  74. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_base.py +0 -0
  75. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_base_setattr.py +0 -0
  76. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_bspline_kernels.py +0 -0
  77. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_constraints.py +0 -0
  78. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_curves_empty.py +0 -0
  79. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_curves_types.py +0 -0
  80. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_data_module.py +0 -0
  81. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_deform_files.py +0 -0
  82. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_deform_utils.py +0 -0
  83. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_delta_mush.py +0 -0
  84. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_euler_maya.py +0 -0
  85. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_fbx_import.py +0 -0
  86. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_fbx_lifetime.py +0 -0
  87. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_ffd.py +0 -0
  88. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_file_routes.py +0 -0
  89. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_geometry.py +0 -0
  90. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_geometry_io.py +0 -0
  91. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_geometry_utils.py +0 -0
  92. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_glb.py +0 -0
  93. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_glb_materials.py +0 -0
  94. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_import_order.py +0 -0
  95. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_imports.py +0 -0
  96. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_list_item_class.py +0 -0
  97. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_map.py +0 -0
  98. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_mesh_usd.py +0 -0
  99. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_morph_target.py +0 -0
  100. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_namespaces.py +0 -0
  101. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_ngon.py +0 -0
  102. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_normals_quadmatch_utils.py +0 -0
  103. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_object_skin.py +0 -0
  104. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_pack.py +0 -0
  105. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_patch_relax.py +0 -0
  106. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_procrustes_rotation.py +0 -0
  107. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_quadrangulate.py +0 -0
  108. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_raycast.py +0 -0
  109. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_raycast_bvh.py +0 -0
  110. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_rbf.py +0 -0
  111. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_render_cache.py +0 -0
  112. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_render_fit_padding.py +0 -0
  113. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_render_roundtrip_extra.py +0 -0
  114. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_render_serialization.py +0 -0
  115. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_render_threads.py +0 -0
  116. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_resample.py +0 -0
  117. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_resample_bezier.py +0 -0
  118. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_robust_skinweights_transfer_bilinear.py +0 -0
  119. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_saddle_surface.py +0 -0
  120. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_scene.py +0 -0
  121. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_scene_animate.py +0 -0
  122. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_sdf.py +0 -0
  123. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_skin_fbx.py +0 -0
  124. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_skin_glb.py +0 -0
  125. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_skin_kernels.py +0 -0
  126. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_skin_weights.py +0 -0
  127. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_symmetry.py +0 -0
  128. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_triangulation.py +0 -0
  129. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_usd_prim.py +0 -0
  130. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_utils.py +0 -0
  131. {cgmath-3.0.3 → cgmath-3.1.0}/_tests/test_wrap.py +0 -0
  132. {cgmath-3.0.3 → cgmath-3.1.0}/cgmath.egg-info/dependency_links.txt +0 -0
  133. {cgmath-3.0.3 → cgmath-3.1.0}/cgmath.egg-info/requires.txt +0 -0
  134. {cgmath-3.0.3 → cgmath-3.1.0}/cgmath.egg-info/top_level.txt +0 -0
  135. {cgmath-3.0.3 → cgmath-3.1.0}/constraints/__init__.py +0 -0
  136. {cgmath-3.0.3 → cgmath-3.1.0}/constraints/procrustes.py +0 -0
  137. {cgmath-3.0.3 → cgmath-3.1.0}/data.py +0 -0
  138. {cgmath-3.0.3 → cgmath-3.1.0}/formats/__init__.py +0 -0
  139. {cgmath-3.0.3 → cgmath-3.1.0}/formats/_fbx_io.py +0 -0
  140. {cgmath-3.0.3 → cgmath-3.1.0}/formats/glb.py +0 -0
  141. {cgmath-3.0.3 → cgmath-3.1.0}/formats/usd/__init__.py +0 -0
  142. {cgmath-3.0.3 → cgmath-3.1.0}/formats/usd/prim.py +0 -0
  143. {cgmath-3.0.3 → cgmath-3.1.0}/formats/usd/stage.py +0 -0
  144. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/__init__.py +0 -0
  145. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/_cdt.py +0 -0
  146. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/_saddle_surface.py +0 -0
  147. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/bspline.py +0 -0
  148. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/bspline_patch.py +0 -0
  149. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/deform/__init__.py +0 -0
  150. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/deform/delta_mush.py +0 -0
  151. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/deform/ffd.py +0 -0
  152. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/deform/patch_relax.py +0 -0
  153. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/deform/skin_deform.py +0 -0
  154. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/deform/wrap.py +0 -0
  155. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/map.py +0 -0
  156. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/morph_target.py +0 -0
  157. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/pack.py +0 -0
  158. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/resample.py +0 -0
  159. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/robust_skinweights_transfer_bilinear.py +0 -0
  160. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/__init__.py +0 -0
  161. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/__init__.py +0 -0
  162. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_bilinear.py +0 -0
  163. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_blur.py +0 -0
  164. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_bspline.py +0 -0
  165. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_bvh.py +0 -0
  166. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_cdt.py +0 -0
  167. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_connectivity.py +0 -0
  168. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_delta_mush.py +0 -0
  169. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_ffd.py +0 -0
  170. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_main.py +0 -0
  171. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_normals.py +0 -0
  172. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_pack.py +0 -0
  173. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_patch_relax.py +0 -0
  174. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_rasterize.py +0 -0
  175. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_sdf.py +0 -0
  176. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_skin_deform.py +0 -0
  177. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_skin_weights.py +0 -0
  178. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_subdivide.py +0 -0
  179. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_subdivision.py +0 -0
  180. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_tangent_space.py +0 -0
  181. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_topology.py +0 -0
  182. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/_numba/_wrap.py +0 -0
  183. {cgmath-3.0.3 → cgmath-3.1.0}/geometry/utils/main.py +0 -0
  184. {cgmath-3.0.3 → cgmath-3.1.0}/hierarchy/__init__.py +0 -0
  185. {cgmath-3.0.3 → cgmath-3.1.0}/rbf/__init__.py +0 -0
  186. {cgmath-3.0.3 → cgmath-3.1.0}/rbf/_kernels.py +0 -0
  187. {cgmath-3.0.3 → cgmath-3.1.0}/rbf/_numba/__init__.py +0 -0
  188. {cgmath-3.0.3 → cgmath-3.1.0}/rbf/_numba/_kernels.py +0 -0
  189. {cgmath-3.0.3 → cgmath-3.1.0}/rbf/_numba/_lu.py +0 -0
  190. {cgmath-3.0.3 → cgmath-3.1.0}/render/__init__.py +0 -0
  191. {cgmath-3.0.3 → cgmath-3.1.0}/render/_numba/__init__.py +0 -0
  192. {cgmath-3.0.3 → cgmath-3.1.0}/render/_numba/_texture.py +0 -0
  193. {cgmath-3.0.3 → cgmath-3.1.0}/render/_tiles.py +0 -0
  194. {cgmath-3.0.3 → cgmath-3.1.0}/render/camera.py +0 -0
  195. {cgmath-3.0.3 → cgmath-3.1.0}/render/frame.py +0 -0
  196. {cgmath-3.0.3 → cgmath-3.1.0}/render/raytracer.py +0 -0
  197. {cgmath-3.0.3 → cgmath-3.1.0}/render/texture.py +0 -0
  198. {cgmath-3.0.3 → cgmath-3.1.0}/setup.cfg +0 -0
  199. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/__init__.py +0 -0
  200. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_numba/__init__.py +0 -0
  201. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_numba/_axis.py +0 -0
  202. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_numba/_matrix.py +0 -0
  203. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_numba/_quaternion.py +0 -0
  204. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_numba/_vector.py +0 -0
  205. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/__init__.py +0 -0
  206. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_axis.py +0 -0
  207. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_broadcasting.py +0 -0
  208. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_euler.py +0 -0
  209. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_exports.py +0 -0
  210. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_matrix.py +0 -0
  211. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_quaternion.py +0 -0
  212. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_rotation_conversions.py +0 -0
  213. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_slerp.py +0 -0
  214. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_threads.py +0 -0
  215. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/_tests/test_vector.py +0 -0
  216. {cgmath-3.0.3 → cgmath-3.1.0}/transforms/utils.py +0 -0
  217. {cgmath-3.0.3 → cgmath-3.1.0}/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgmath
3
- Version: 3.0.3
3
+ Version: 3.1.0
4
4
  Summary: A DCC-agnostic CG math library: batched matrix, quaternion and euler math, mesh topology, deformers, resampling, skeletal hierarchies, SDFs, a software raytracer and asset IO, all numpy-native.
5
5
  Author-email: Eric Vignola <eric.vignola@gmail.com>
6
6
  License: ## License
@@ -4,4 +4,4 @@ The underlying matrix, quaternion, euler and vector math lives in
4
4
  :mod:`cgmath.transforms`.
5
5
  """
6
6
 
7
- __version__ = "3.0.3"
7
+ __version__ = "3.1.0"
@@ -305,6 +305,7 @@ def _place_in_scene(node, uuid: str) -> None:
305
305
  node.parent_uuid = _SDF_GROUP
306
306
  node.rotate_order = 2 # zxy
307
307
  node.rotate_axis = [0.0, 0.0, 10.0]
308
+ node.shear = [0.125, 0.0, -0.25]
308
309
  node.visibility = False
309
310
  node.add_user_attribute("blend", 0.25)
310
311
  node.add_user_attribute("material", "rubber")
@@ -134,6 +134,7 @@ def transform_data() -> TransformData:
134
134
  segment_scale_compensate=True,
135
135
  radius=2.5,
136
136
  draw_style=2,
137
+ shear=[0.125, -0.25, 0.5],
137
138
  )
138
139
  add_every_user_attribute(node)
139
140
  return node
@@ -253,6 +254,7 @@ def clip_data() -> ClipData:
253
254
  frames.scale = frames.scale * (1.0 + ramp * [0.0, 0.125, 0.0])
254
255
  frames.rotate_axis = frames.rotate_axis + ramp * [0.5, 0.0, 0.0]
255
256
  frames.joint_orient = frames.joint_orient + ramp * [0.0, 0.0, 2.0]
257
+ frames.shear = frames.shear + ramp * [0.125, 0.0, -0.25]
256
258
 
257
259
  # one node over every frame reads (F, 1), and writes the same shape
258
260
  clip.frames["VLR:root"].translate_y = np.array([[95.0], [96.5], [98.0], [99.5]])
@@ -124,6 +124,7 @@ def _every_channel(node: TransformData, rotate_order: int) -> None:
124
124
  node.rotate_order = rotate_order
125
125
  node.rotate_axis = [0.0, 5.0, 0.0]
126
126
  node.joint_orient = [0.0, 0.0, 15.0]
127
+ node.shear = [0.125, 0.0, -0.25]
127
128
  node.visibility = False
128
129
  node.segment_scale_compensate = True
129
130
  node.radius = 0.25
@@ -0,0 +1,196 @@
1
+ """Writes the fbx files of test_fbx_maya_import.py from their layouts.
2
+
3
+ Maya's import of these files is recorded in test_assets/fbx_maya_import.npz by
4
+ tools/make_fbx_maya_import_fixture.py, which holds the layouts and writes each
5
+ file with this one function before Maya imports it; the test writes them
6
+ again from the layouts the archive holds, so no fbx file ships. It needs the
7
+ Autodesk FBX SDK and nothing of cgmath: the code under test has no hand in
8
+ its own reference.
9
+
10
+ A layout is a dict: ``nodes``, a list of node dicts, parents first, ``axes``
11
+ ("yup", "zup" or "xup"), ``span`` (the take's first and last frame) and
12
+ optionally ``fps`` (24 by default), ``cubic`` (bezier keys, linear by
13
+ default) and ``layers``, more animation layers as ``[mode, {node: keys}]``,
14
+ a third entry True on a muted one, ``keys`` as a node's own and optionally
15
+ ``ckeys`` among them, one axis each.
16
+
17
+ A node dict holds ``name``, ``kind`` ("joint", "group", "locator", "mesh",
18
+ "camera", "light", "lod" or "none", no node attribute), ``parent`` (a name or
19
+ None), ``t``, ``r``, ``s``, ``order``, ``pre``, ``post``, ``inherit`` ("RSrs",
20
+ "RrSs" or "Rrs"), ``piv`` (rotate pivot, scale pivot, rotate offset, scale
21
+ offset, or None), ``keys`` (``{channel: [frames, values]}``, all three axes),
22
+ ``ckeys`` (``[channel, axis, frames, values]``, one axis), ``points`` (a
23
+ mesh's points) and optionally ``skin``, the joint a mesh is skinned to,
24
+ ``skin_empty``, its skin left with no cluster, ``repeats``, channels whose
25
+ curves repeat before their keys, with the count Maya's export writes, and
26
+ ``active`` False, its rotation inactive.
27
+ """
28
+ import numpy as np
29
+
30
+ try:
31
+ import fbx as FBX
32
+ except ImportError:
33
+ FBX = None
34
+
35
+
36
+ def _axes(name: str):
37
+ if name == "zup":
38
+ return FBX.FbxAxisSystem.MayaZUp
39
+ if name == "xup":
40
+ axes = FBX.FbxAxisSystem
41
+ return axes(axes.EUpVector.eXAxis, axes.EFrontVector.eParityOdd, axes.ECoordSystem.eRightHanded)
42
+ return FBX.FbxAxisSystem.MayaYUp
43
+
44
+
45
+ def add_curve(layer, prop, axis: int, frames, values, fps: float = 24, cubic: bool = False) -> None:
46
+ """keys ``values`` on ``frames`` on one axis of ``prop``, in ``layer``"""
47
+ kinds = FBX.FbxAnimCurveDef
48
+ prop.GetCurveNode(layer, True)
49
+ curve = prop.GetCurve(layer, "XYZ"[axis], True)
50
+ curve.KeyModifyBegin()
51
+ for frame, value in zip(frames, values):
52
+ time = FBX.FbxTime()
53
+ time.SetSecondDouble(frame / float(fps))
54
+ key = curve.KeyAdd(time)[0]
55
+ curve.KeySetValue(key, float(value))
56
+ curve.KeySetInterpolation(
57
+ key, kinds.EInterpolationType.eInterpolationCubic if cubic else kinds.EInterpolationType.eInterpolationLinear
58
+ )
59
+ if cubic:
60
+ curve.KeySetTangentMode(key, kinds.ETangentMode.eTangentAuto)
61
+ curve.KeyModifyEnd()
62
+
63
+
64
+ def _add_keys(layer, node, keys: dict, fps: float, cubic: bool) -> None:
65
+ props = {"t": node.LclTranslation, "r": node.LclRotation, "s": node.LclScaling}
66
+ for channel, (frames, values) in keys.items():
67
+ values = np.asarray(values, dtype=float)
68
+ for axis in range(3):
69
+ add_curve(layer, props[channel], axis, frames, values[:, axis], fps, cubic)
70
+
71
+
72
+ def _attribute(scene, spec: dict):
73
+ """the node attribute of a node dict, None for kind "none" """
74
+ name, kind = spec["name"], spec["kind"]
75
+ if kind == "joint":
76
+ skeleton = FBX.FbxSkeleton.Create(scene, name)
77
+ skeleton.SetSkeletonType(FBX.FbxSkeleton.EType.eLimbNode)
78
+ return skeleton
79
+ if kind in ("group", "locator"):
80
+ null = FBX.FbxNull.Create(scene, name)
81
+ null.Look.Set((FBX.FbxNull.ELook.eCross if kind == "locator" else FBX.FbxNull.ELook.eNone).value)
82
+ return null
83
+ if kind == "camera":
84
+ return FBX.FbxCamera.Create(scene, name)
85
+ if kind == "light":
86
+ return FBX.FbxLight.Create(scene, name)
87
+ if kind == "lod":
88
+ return FBX.FbxLODGroup.Create(scene, name)
89
+ if kind == "none":
90
+ return None
91
+
92
+ mesh = FBX.FbxMesh.Create(scene, name)
93
+ points = spec["points"]
94
+ mesh.InitControlPoints(len(points))
95
+ for index, point in enumerate(points):
96
+ mesh.SetControlPointAt(FBX.FbxVector4(*point, 1.0), index)
97
+ for triangle in ((0, 1, 2), (0, 2, 3), (0, 3, 1)):
98
+ mesh.BeginPolygon()
99
+ for index in triangle:
100
+ mesh.AddPolygon(index)
101
+ mesh.EndPolygon()
102
+ return mesh
103
+
104
+
105
+ def _skin(scene, node, spec: dict, joint) -> None:
106
+ mesh = node.GetNodeAttribute()
107
+ skin = FBX.FbxSkin.Create(scene, spec["name"] + "_skin")
108
+ mesh.AddDeformer(skin)
109
+ if spec.get("skin_empty"):
110
+ return
111
+ cluster = FBX.FbxCluster.Create(scene, spec["name"] + "_cl")
112
+ cluster.SetLink(joint)
113
+ cluster.SetLinkMode(FBX.FbxCluster.ELinkMode.eNormalize)
114
+ for index in range(mesh.GetControlPointsCount()):
115
+ cluster.AddControlPointIndex(index, 1.0)
116
+ cluster.SetTransformMatrix(node.EvaluateGlobalTransform())
117
+ cluster.SetTransformLinkMatrix(joint.EvaluateGlobalTransform())
118
+ skin.AddCluster(cluster)
119
+
120
+
121
+ def write_layout(path: str, layout: dict) -> None:
122
+ """writes the fbx file of ``layout`` to ``path``"""
123
+ source = FBX.FbxNode.EPivotSet.eSourcePivot
124
+ inherit = FBX.FbxTransform.EInheritType
125
+ types = {"RrSs": inherit.eInheritRrSs, "RSrs": inherit.eInheritRSrs, "Rrs": inherit.eInheritRrs}
126
+ rates = {24: FBX.FbxTime.EMode.eFrames24, 30: FBX.FbxTime.EMode.eFrames30, 60: FBX.FbxTime.EMode.eFrames60}
127
+ manager = FBX.FbxManager.Create()
128
+ manager.SetIOSettings(FBX.FbxIOSettings.Create(manager, FBX.IOSROOT))
129
+ scene = FBX.FbxScene.Create(manager, "scene")
130
+ fps = layout.get("fps", 24)
131
+ cubic = layout.get("cubic", False)
132
+ scene.GetGlobalSettings().SetAxisSystem(_axes(layout["axes"]))
133
+ scene.GetGlobalSettings().SetTimeMode(rates[fps])
134
+ stack = FBX.FbxAnimStack.Create(scene, "Take 001")
135
+ layer = FBX.FbxAnimLayer.Create(scene, "Base Layer")
136
+ stack.AddMember(layer)
137
+
138
+ made = {}
139
+ for spec in layout["nodes"]:
140
+ name = spec["name"]
141
+ node = FBX.FbxNode.Create(scene, name)
142
+ attribute = _attribute(scene, spec)
143
+ if attribute is not None:
144
+ node.SetNodeAttribute(attribute)
145
+ node.LclTranslation.Set(FBX.FbxDouble3(*spec["t"]))
146
+ node.LclRotation.Set(FBX.FbxDouble3(*spec["r"]))
147
+ node.LclScaling.Set(FBX.FbxDouble3(*spec["s"]))
148
+ node.SetRotationActive(spec.get("active", True))
149
+ node.SetRotationOrder(source, getattr(FBX.EFbxRotationOrder, "eEuler" + spec["order"].upper()))
150
+ if spec["pre"] is not None:
151
+ node.SetPreRotation(source, FBX.FbxVector4(*spec["pre"], 1.0))
152
+ if spec["post"] is not None:
153
+ node.SetPostRotation(source, FBX.FbxVector4(*spec["post"], 1.0))
154
+ if spec["piv"] is not None:
155
+ rotate, scale, rotate_offset, scale_offset = spec["piv"]
156
+ node.SetRotationPivot(source, FBX.FbxVector4(*rotate, 1.0))
157
+ node.SetScalingPivot(source, FBX.FbxVector4(*scale, 1.0))
158
+ node.SetRotationOffset(source, FBX.FbxVector4(*rotate_offset, 1.0))
159
+ node.SetScalingOffset(source, FBX.FbxVector4(*scale_offset, 1.0))
160
+ node.SetTransformationInheritType(types[spec["inherit"]])
161
+ (made[spec["parent"]] if spec["parent"] else scene.GetRootNode()).AddChild(node)
162
+ _add_keys(layer, node, spec["keys"], fps, cubic)
163
+ props = {"t": node.LclTranslation, "r": node.LclRotation, "s": node.LclScaling}
164
+ for channel, axis, frames, values in spec["ckeys"]:
165
+ add_curve(layer, props[channel], axis, frames, values, fps, cubic)
166
+ for channel in spec.get("repeats", ()):
167
+ for axis in "XYZ":
168
+ curve = props[channel].GetCurve(layer, axis, False)
169
+ curve.SetPreExtrapolation(FBX.FbxAnimCurveBase.EExtrapolationType.eRepetition)
170
+ curve.SetPreExtrapolationCount(2**32 - 1)
171
+ if spec.get("skin"):
172
+ _skin(scene, node, spec, made[spec["skin"]])
173
+ made[name] = node
174
+
175
+ for mode, keyed, *muted in layout.get("layers", ()):
176
+ extra = FBX.FbxAnimLayer.Create(scene, "Layer " + mode)
177
+ stack.AddMember(extra)
178
+ extra.BlendMode.Set({"additive": 0, "override": 1}[mode])
179
+ extra.Mute.Set(bool(muted))
180
+ for name, keys in keyed.items():
181
+ keys = dict(keys)
182
+ props = {"t": made[name].LclTranslation, "r": made[name].LclRotation, "s": made[name].LclScaling}
183
+ for channel, axis, frames, values in keys.pop("ckeys", ()):
184
+ add_curve(extra, props[channel], axis, frames, values, fps, cubic)
185
+ _add_keys(extra, made[name], keys, fps, cubic)
186
+
187
+ first, last = FBX.FbxTime(), FBX.FbxTime()
188
+ first.SetSecondDouble(layout["span"][0] / float(fps))
189
+ last.SetSecondDouble(layout["span"][1] / float(fps))
190
+ stack.SetLocalTimeSpan(FBX.FbxTimeSpan(first, last))
191
+
192
+ exporter = FBX.FbxExporter.Create(manager, "")
193
+ exporter.Initialize(path, -1, manager.GetIOSettings())
194
+ exporter.Export(scene)
195
+ exporter.Destroy()
196
+ manager.Destroy()