bpy-vrm-format 4.7.4__py3-none-any.whl

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 (154) hide show
  1. bpy_vrm_format-4.7.4.dist-info/METADATA +118 -0
  2. bpy_vrm_format-4.7.4.dist-info/RECORD +154 -0
  3. bpy_vrm_format-4.7.4.dist-info/WHEEL +4 -0
  4. io_scene_vrm/README.txt +3 -0
  5. io_scene_vrm/__init__.py +41 -0
  6. io_scene_vrm/blender_manifest.toml +28 -0
  7. io_scene_vrm/common/__init__.py +1 -0
  8. io_scene_vrm/common/animation.py +58 -0
  9. io_scene_vrm/common/blender_manifest.py +82 -0
  10. io_scene_vrm/common/char.py +16 -0
  11. io_scene_vrm/common/convert.py +287 -0
  12. io_scene_vrm/common/convert_any.py +48 -0
  13. io_scene_vrm/common/debug.py +40 -0
  14. io_scene_vrm/common/deep.py +162 -0
  15. io_scene_vrm/common/error_dialog.py +274 -0
  16. io_scene_vrm/common/fs.py +71 -0
  17. io_scene_vrm/common/gl.py +20 -0
  18. io_scene_vrm/common/gltf.py +1121 -0
  19. io_scene_vrm/common/human_bone_mapper/__init__.py +1 -0
  20. io_scene_vrm/common/human_bone_mapper/biped_mapping.py +84 -0
  21. io_scene_vrm/common/human_bone_mapper/cats_blender_plugin_fix_model_mapping.py +63 -0
  22. io_scene_vrm/common/human_bone_mapper/human_bone_mapper.py +203 -0
  23. io_scene_vrm/common/human_bone_mapper/microsoft_rocketbox_mapping.py +69 -0
  24. io_scene_vrm/common/human_bone_mapper/mixamo_mapping.py +62 -0
  25. io_scene_vrm/common/human_bone_mapper/mmd_mapping.py +115 -0
  26. io_scene_vrm/common/human_bone_mapper/mpfb_mapping.py +120 -0
  27. io_scene_vrm/common/human_bone_mapper/ready_player_me_mapping.py +65 -0
  28. io_scene_vrm/common/human_bone_mapper/reallusion_mapping.py +94 -0
  29. io_scene_vrm/common/human_bone_mapper/rigify_meta_rig_mapping.py +65 -0
  30. io_scene_vrm/common/human_bone_mapper/structure_based_mapping.py +891 -0
  31. io_scene_vrm/common/human_bone_mapper/unreal_mapping.py +62 -0
  32. io_scene_vrm/common/human_bone_mapper/vrm_addon_mapping.py +112 -0
  33. io_scene_vrm/common/human_bone_mapper/vroid_mapping.py +89 -0
  34. io_scene_vrm/common/legacy_gltf.py +16 -0
  35. io_scene_vrm/common/logger.py +84 -0
  36. io_scene_vrm/common/mtoon0.blend +0 -0
  37. io_scene_vrm/common/mtoon1.blend +0 -0
  38. io_scene_vrm/common/mtoon1_outline.blend +0 -0
  39. io_scene_vrm/common/mtoon_auto_setup.blend +0 -0
  40. io_scene_vrm/common/mtoon_unversioned.py +62 -0
  41. io_scene_vrm/common/ops/__init__.py +10 -0
  42. io_scene_vrm/common/ops/export_scene.py +67 -0
  43. io_scene_vrm/common/ops/icyp.py +53 -0
  44. io_scene_vrm/common/ops/import_scene.py +57 -0
  45. io_scene_vrm/common/ops/vrm.py +2380 -0
  46. io_scene_vrm/common/ops/wm.py +167 -0
  47. io_scene_vrm/common/preferences.py +362 -0
  48. io_scene_vrm/common/progress.py +87 -0
  49. io_scene_vrm/common/rotation.py +89 -0
  50. io_scene_vrm/common/safe_removal.py +46 -0
  51. io_scene_vrm/common/scene_watcher.py +230 -0
  52. io_scene_vrm/common/shader.py +2243 -0
  53. io_scene_vrm/common/shape_key_mapper/__init__.py +1 -0
  54. io_scene_vrm/common/shape_key_mapper/arkit_mapping.py +168 -0
  55. io_scene_vrm/common/shape_key_mapper/mmd_mapping.py +62 -0
  56. io_scene_vrm/common/shape_key_mapper/ready_player_me_mapping.py +52 -0
  57. io_scene_vrm/common/shape_key_mapper/vrchat_mapping.py +17 -0
  58. io_scene_vrm/common/third_party_user_extension.py +214 -0
  59. io_scene_vrm/common/transparent_z_write.blend +0 -0
  60. io_scene_vrm/common/version.py +161 -0
  61. io_scene_vrm/common/vrm0/__init__.py +1 -0
  62. io_scene_vrm/common/vrm0/human_bone.py +662 -0
  63. io_scene_vrm/common/vrm0/material_property.py +346 -0
  64. io_scene_vrm/common/vrm1/__init__.py +1 -0
  65. io_scene_vrm/common/vrm1/expression_preset.py +207 -0
  66. io_scene_vrm/common/vrm1/human_bone.py +822 -0
  67. io_scene_vrm/common/workspace.py +227 -0
  68. io_scene_vrm/common/writable_context.py +77 -0
  69. io_scene_vrm/editor/__init__.py +1 -0
  70. io_scene_vrm/editor/extension.py +425 -0
  71. io_scene_vrm/editor/extension_accessor.py +75 -0
  72. io_scene_vrm/editor/handler.py +84 -0
  73. io_scene_vrm/editor/khr_character/__init__.py +1 -0
  74. io_scene_vrm/editor/khr_character/panel.py +69 -0
  75. io_scene_vrm/editor/khr_character/property_group.py +27 -0
  76. io_scene_vrm/editor/khr_xmp_json_ld/__init__.py +1 -0
  77. io_scene_vrm/editor/khr_xmp_json_ld/ops.py +464 -0
  78. io_scene_vrm/editor/khr_xmp_json_ld/panel.py +136 -0
  79. io_scene_vrm/editor/khr_xmp_json_ld/property_group.py +83 -0
  80. io_scene_vrm/editor/khr_xmp_json_ld/ui_list.py +198 -0
  81. io_scene_vrm/editor/make_armature.py +709 -0
  82. io_scene_vrm/editor/menu.py +147 -0
  83. io_scene_vrm/editor/migration.py +297 -0
  84. io_scene_vrm/editor/mtoon1/__init__.py +1 -0
  85. io_scene_vrm/editor/mtoon1/handler.py +20 -0
  86. io_scene_vrm/editor/mtoon1/migration.py +536 -0
  87. io_scene_vrm/editor/mtoon1/ops.py +304 -0
  88. io_scene_vrm/editor/mtoon1/panel.py +442 -0
  89. io_scene_vrm/editor/mtoon1/property_group.py +4977 -0
  90. io_scene_vrm/editor/mtoon1/scene_watcher.py +381 -0
  91. io_scene_vrm/editor/node_constraint1/__init__.py +1 -0
  92. io_scene_vrm/editor/node_constraint1/panel.py +317 -0
  93. io_scene_vrm/editor/node_constraint1/property_group.py +25 -0
  94. io_scene_vrm/editor/ops.py +471 -0
  95. io_scene_vrm/editor/panel.py +315 -0
  96. io_scene_vrm/editor/property_group.py +888 -0
  97. io_scene_vrm/editor/search.py +682 -0
  98. io_scene_vrm/editor/spring_bone1/__init__.py +1 -0
  99. io_scene_vrm/editor/spring_bone1/handler.py +862 -0
  100. io_scene_vrm/editor/spring_bone1/menu.py +246 -0
  101. io_scene_vrm/editor/spring_bone1/migration.py +86 -0
  102. io_scene_vrm/editor/spring_bone1/ops.py +1663 -0
  103. io_scene_vrm/editor/spring_bone1/panel.py +584 -0
  104. io_scene_vrm/editor/spring_bone1/property_group.py +1355 -0
  105. io_scene_vrm/editor/spring_bone1/ui_list.py +408 -0
  106. io_scene_vrm/editor/subscription.py +123 -0
  107. io_scene_vrm/editor/t_pose.py +713 -0
  108. io_scene_vrm/editor/validation.py +1271 -0
  109. io_scene_vrm/editor/vrm0/__init__.py +1 -0
  110. io_scene_vrm/editor/vrm0/gizmo_group.py +63 -0
  111. io_scene_vrm/editor/vrm0/handler.py +23 -0
  112. io_scene_vrm/editor/vrm0/menu.py +145 -0
  113. io_scene_vrm/editor/vrm0/migration.py +761 -0
  114. io_scene_vrm/editor/vrm0/ops.py +2145 -0
  115. io_scene_vrm/editor/vrm0/panel.py +1333 -0
  116. io_scene_vrm/editor/vrm0/property_group.py +1818 -0
  117. io_scene_vrm/editor/vrm0/ui_list.py +688 -0
  118. io_scene_vrm/editor/vrm1/__init__.py +1 -0
  119. io_scene_vrm/editor/vrm1/handler.py +28 -0
  120. io_scene_vrm/editor/vrm1/menu.py +76 -0
  121. io_scene_vrm/editor/vrm1/migration.py +321 -0
  122. io_scene_vrm/editor/vrm1/ops.py +2679 -0
  123. io_scene_vrm/editor/vrm1/panel.py +1243 -0
  124. io_scene_vrm/editor/vrm1/property_group.py +2087 -0
  125. io_scene_vrm/editor/vrm1/scene_watcher.py +90 -0
  126. io_scene_vrm/editor/vrm1/ui_list.py +533 -0
  127. io_scene_vrm/exporter/__init__.py +1 -0
  128. io_scene_vrm/exporter/abstract_base_vrm_exporter.py +628 -0
  129. io_scene_vrm/exporter/export_scene.py +930 -0
  130. io_scene_vrm/exporter/gltf2_export_user_extension.py +45 -0
  131. io_scene_vrm/exporter/khr_character_exporter.py +34 -0
  132. io_scene_vrm/exporter/vrm0_exporter.py +4030 -0
  133. io_scene_vrm/exporter/vrm1_exporter.py +3653 -0
  134. io_scene_vrm/exporter/vrm_animation_exporter.py +1035 -0
  135. io_scene_vrm/external/__init__.py +1 -0
  136. io_scene_vrm/external/auto_rig_pro_support.py +3 -0
  137. io_scene_vrm/external/io_scene_gltf2_support.py +418 -0
  138. io_scene_vrm/external/rigify_support.py +1 -0
  139. io_scene_vrm/importer/__init__.py +1 -0
  140. io_scene_vrm/importer/abstract_base_vrm_importer.py +1494 -0
  141. io_scene_vrm/importer/file_handler.py +34 -0
  142. io_scene_vrm/importer/gltf2_import_user_extension.py +268 -0
  143. io_scene_vrm/importer/import_scene.py +646 -0
  144. io_scene_vrm/importer/license_validation.py +198 -0
  145. io_scene_vrm/importer/vrm0_importer.py +1730 -0
  146. io_scene_vrm/importer/vrm1_importer.py +1924 -0
  147. io_scene_vrm/importer/vrm_animation_importer.py +763 -0
  148. io_scene_vrm/importer/vrm_diff.py +316 -0
  149. io_scene_vrm/locale/__init__.py +1 -0
  150. io_scene_vrm/locale/ja_jp.py +826 -0
  151. io_scene_vrm/locale/ruff.toml +8 -0
  152. io_scene_vrm/locale/translation_dictionary.py +10 -0
  153. io_scene_vrm/locale/zh_hans.py +928 -0
  154. io_scene_vrm/registration.py +669 -0
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.3
2
+ Name: bpy-vrm-format
3
+ Version: 4.7.4
4
+ Summary: VRM import, export, and editing capabilities
5
+ Author: Isamu Mogi, iCyP
6
+ License: SPDX-License-Identifier: MIT OR GPL-3.0-or-later
7
+ Requires-Dist: bpy==3.6.* ; python_full_version == '3.10.*' and platform_machine == 'AMD64' and sys_platform == 'win32'
8
+ Requires-Dist: bpy==3.6.* ; python_full_version == '3.10.*' and platform_machine == 'arm64' and sys_platform == 'darwin'
9
+ Requires-Dist: bpy==3.6.* ; python_full_version == '3.10.*' and platform_machine == 'x86_64' and sys_platform == 'darwin'
10
+ Requires-Dist: bpy==3.6.* ; python_full_version == '3.10.*' and platform_machine == 'x86_64' and sys_platform == 'linux'
11
+ Requires-Python: ==3.10.*
12
+ Description-Content-Type: text/markdown
13
+
14
+ # VRM Add-on for Blender [![CI status](https://github.com/saturday06/VRM-Addon-for-Blender/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/saturday06/VRM-Addon-for-Blender/actions) [![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/saturday06/VRM-Addon-for-Blender?utm_source=badge)
15
+
16
+ VRM Add-on for Blender adds VRM import, export, and editing capabilities to
17
+ Blender.
18
+
19
+ ## Sample Code for Generating VRM Files
20
+
21
+ Here is a sample code that generates the following 3D character model and saves
22
+ it as a `.vrm` file.
23
+
24
+ ![vrm preview](https://raw.githubusercontent.com/saturday06/VRM-Addon-for-Blender/refs/heads/main/docs/assets/images/humanoid.gif)
25
+
26
+ Before running the script, please run commands such as
27
+ `pip install bpy-vrm-format` or `uv add bpy-vrm-format` to make the package
28
+ available.
29
+
30
+ ```python
31
+ import bpy
32
+ from pathlib import Path
33
+
34
+ bpy.ops.preferences.addon_enable(module="io_scene_vrm")
35
+
36
+ bpy.ops.icyp.make_basic_armature()
37
+
38
+ context = bpy.context
39
+
40
+ armature = context.active_object
41
+ armature.data.vrm_addon_extension.spec_version = "1.0"
42
+
43
+ meta = armature.data.vrm_addon_extension.vrm1.meta
44
+ meta.vrm_name = "Your Model Name"
45
+ meta.version = "1.0.0"
46
+
47
+ humanoid = armature.data.vrm_addon_extension.vrm1.humanoid
48
+
49
+ bpy.ops.mesh.primitive_uv_sphere_add(radius=0.25)
50
+ head = context.active_object
51
+ head.parent = armature
52
+ head.parent_bone = humanoid.human_bones.head.node.bone_name
53
+ head.parent_type = "BONE"
54
+
55
+ bpy.ops.mesh.primitive_cube_add(size=0.4)
56
+ spine = context.active_object
57
+ spine.parent = armature
58
+ spine.parent_bone = humanoid.human_bones.spine.node.bone_name
59
+ spine.parent_type = "BONE"
60
+
61
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
62
+ left_upper_arm = context.active_object
63
+ left_upper_arm.parent = armature
64
+ left_upper_arm.parent_bone = humanoid.human_bones.left_upper_arm.node.bone_name
65
+ left_upper_arm.parent_type = "BONE"
66
+
67
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
68
+ left_hand = context.active_object
69
+ left_hand.parent = armature
70
+ left_hand.parent_bone = humanoid.human_bones.left_hand.node.bone_name
71
+ left_hand.parent_type = "BONE"
72
+
73
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
74
+ right_upper_arm = context.active_object
75
+ right_upper_arm.parent = armature
76
+ right_upper_arm.parent_bone = humanoid.human_bones.right_upper_arm.node.bone_name
77
+ right_upper_arm.parent_type = "BONE"
78
+
79
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
80
+ right_hand = context.active_object
81
+ right_hand.parent = armature
82
+ right_hand.parent_bone = humanoid.human_bones.right_hand.node.bone_name
83
+ right_hand.parent_type = "BONE"
84
+
85
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
86
+ left_upper_leg = context.active_object
87
+ left_upper_leg.parent = armature
88
+ left_upper_leg.parent_bone = humanoid.human_bones.left_upper_leg.node.bone_name
89
+ left_upper_leg.parent_type = "BONE"
90
+
91
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
92
+ right_upper_leg = context.active_object
93
+ right_upper_leg.parent = armature
94
+ right_upper_leg.parent_bone = humanoid.human_bones.right_upper_leg.node.bone_name
95
+ right_upper_leg.parent_type = "BONE"
96
+
97
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
98
+ left_lower_leg = context.active_object
99
+ left_lower_leg.parent = armature
100
+ left_lower_leg.parent_bone = humanoid.human_bones.left_lower_leg.node.bone_name
101
+ left_lower_leg.parent_type = "BONE"
102
+
103
+ bpy.ops.mesh.primitive_ico_sphere_add(radius=0.1)
104
+ right_lower_leg = context.active_object
105
+ right_lower_leg.parent = armature
106
+ right_lower_leg.parent_bone = humanoid.human_bones.right_lower_leg.node.bone_name
107
+ right_lower_leg.parent_type = "BONE"
108
+
109
+ output_filepath = str(Path(__file__).parent / "path_to_your_vrm_model.vrm")
110
+ result = bpy.ops.export_scene.vrm(filepath=output_filepath)
111
+ if result != {"FINISHED"}:
112
+ raise Exception(f"Failed to export vrm: {result}")
113
+
114
+ print(f"{output_filepath=}")
115
+ ```
116
+
117
+ For more information, visit
118
+ [https://vrm-addon-for-blender.info/scripting-api/](https://vrm-addon-for-blender.info/scripting-api/).
@@ -0,0 +1,154 @@
1
+ io_scene_vrm/README.txt,sha256=_g4aumc-otRQZ4uplx3OE10ebUTDePxCxMAHWyGfg_c,87
2
+ io_scene_vrm/__init__.py,sha256=_YKqxzRDPQ616z7k8NQpidiesmDxZhWFZIKZi5kkolg,1077
3
+ io_scene_vrm/blender_manifest.toml,sha256=CwrnZwRTWbMnSa48ESasesNKux_HCTX_8JL3XjSqdTk,548
4
+ io_scene_vrm/common/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
5
+ io_scene_vrm/common/animation.py,sha256=Vt9x6MuLw99SHx3Gh95ZxMqRLs2zSiwNq5AmuPtm_-I,1279
6
+ io_scene_vrm/common/blender_manifest.py,sha256=_Cl_p5MCogDATgYUKUvVxAwrSioJD2_BFWP429KnjP4,2851
7
+ io_scene_vrm/common/char.py,sha256=0Koi9anc0tb67TwL0Ibr-bPqn3KlqfkYJnIl_jYm6xU,571
8
+ io_scene_vrm/common/convert.py,sha256=S1FSWRKb3Bue5u519JMb4SoQY4NDcBAgTho5wpskiQg,8429
9
+ io_scene_vrm/common/convert_any.py,sha256=Xj7XaGqbk1100FGw9-Hwbot-z0OFNLFvrXS7oCs0pgE,1700
10
+ io_scene_vrm/common/debug.py,sha256=B5RwfSh1SgIkZple_chle0vU4tRuV9QzQkZCcocnQg8,1359
11
+ io_scene_vrm/common/deep.py,sha256=TzjWCU4DjztNXpat7JZ3mNentZYo1SU_FfVHEFVmnyw,5464
12
+ io_scene_vrm/common/error_dialog.py,sha256=ixUs0U8zn1AhDZZaL1W8KhxDT5fL9wYDHZGTEJV5H1Q,9036
13
+ io_scene_vrm/common/fs.py,sha256=q-xt7J8fRvL8_CctayMiYUwyvVL7YyUYrOj5zM0Rrac,2361
14
+ io_scene_vrm/common/gl.py,sha256=GMAgIbUIC8dOdvQ45tRUv1QoI1d_kKLDr-68C6NHdS4,613
15
+ io_scene_vrm/common/gltf.py,sha256=Ov_9skPcNEIz1vg9_GEKBdPEwpSj7wiYWE8okWTTtfE,36299
16
+ io_scene_vrm/common/human_bone_mapper/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
17
+ io_scene_vrm/common/human_bone_mapper/biped_mapping.py,sha256=AtzVuXO652w2iEV2ehGgswmlR6LFLkinQ4G8QAzUkF0,4283
18
+ io_scene_vrm/common/human_bone_mapper/cats_blender_plugin_fix_model_mapping.py,sha256=ejPRC8gAGgS2gP7lSlkb1unEp95ZGPLSYgSbPkiROv0,3536
19
+ io_scene_vrm/common/human_bone_mapper/human_bone_mapper.py,sha256=YjxgqKG6OB9gR-pFZoIgmt1z-q_Wr8zCudFC0AJiF70,7108
20
+ io_scene_vrm/common/human_bone_mapper/microsoft_rocketbox_mapping.py,sha256=_S1okpWRJXXBqXYbFdcDMtECWzGzNXN38gtxmKvqsN0,3666
21
+ io_scene_vrm/common/human_bone_mapper/mixamo_mapping.py,sha256=jWqZ58ZS2FSPz_laqJXDITIG88lyu6wh99ssGRu2b0E,4034
22
+ io_scene_vrm/common/human_bone_mapper/mmd_mapping.py,sha256=UCeD9S9Ejh11yzqo5cLmLpT17jsN32LOuLnn0dyikj8,5810
23
+ io_scene_vrm/common/human_bone_mapper/mpfb_mapping.py,sha256=YGuWm7u_hSuSQiJNFSrGAknU-G2QzgBLZtGFKpRnpwU,6705
24
+ io_scene_vrm/common/human_bone_mapper/ready_player_me_mapping.py,sha256=J2oNrFia4Sk2O1JzxlEkn8G1W3l5Ir56eGmPTHDfhdc,3624
25
+ io_scene_vrm/common/human_bone_mapper/reallusion_mapping.py,sha256=t4ulo9Rxe4d2w-BoiKH3nUcNAKjc2--zQcxnTqG6yYo,5996
26
+ io_scene_vrm/common/human_bone_mapper/rigify_meta_rig_mapping.py,sha256=Ms_862v5j22_mkPs9j0YZhoR2sKUrdbWe2LseqOxsM0,3558
27
+ io_scene_vrm/common/human_bone_mapper/structure_based_mapping.py,sha256=27Uq96KwkErchcHtB9AeGTgKLvtfX2HHSv9vYzUwJRw,29503
28
+ io_scene_vrm/common/human_bone_mapper/unreal_mapping.py,sha256=x0PMGbI9C4Dyg-av_Q8UwCs9TSnTh2letAgcaJpPJY8,3359
29
+ io_scene_vrm/common/human_bone_mapper/vrm_addon_mapping.py,sha256=fmyXkMTuCSXsYnYMpkTz0UfaFuVlS5ZspiWgh1jNCUY,6787
30
+ io_scene_vrm/common/human_bone_mapper/vroid_mapping.py,sha256=IXhWVTqLJXb8ng75izsLgL77G3EVsG9CCbeAjxi_9gY,4376
31
+ io_scene_vrm/common/legacy_gltf.py,sha256=0w2XZcSRhIEULFvlO1L89v0YtCnYzMPt5Dk0fn4v1HU,441
32
+ io_scene_vrm/common/logger.py,sha256=yhZ3JBFTcd2PsMx49uU1zO5dHL57MtcwA6n77NtrWP8,2896
33
+ io_scene_vrm/common/mtoon0.blend,sha256=BsFfZIU0BDcENDHv8q-NgDfT6uI14ykAiC5FiupV-h0,179720
34
+ io_scene_vrm/common/mtoon1.blend,sha256=DII3ERliJOA6fgsgpmVcf2eWSKPrXXMicBLfmm_-hdc,334486
35
+ io_scene_vrm/common/mtoon1_outline.blend,sha256=wZ3qUs3YY67tgFaB6cssvR7hFj5w43HhbHRAndA_djk,478512
36
+ io_scene_vrm/common/mtoon_auto_setup.blend,sha256=7vSPAo4JiZUGE7iGY5XXAgqyOAoX1rhCBlkusEsJE6Y,116081
37
+ io_scene_vrm/common/mtoon_unversioned.py,sha256=MrXwI_bJlb7ZTBWiCJfYlSUaI1YM6RZvIAtNS28g1xc,2455
38
+ io_scene_vrm/common/ops/__init__.py,sha256=Rs2twe1SHmoxinUd3drPRGl1wQj82jxYxi6GpnqnDL4,195
39
+ io_scene_vrm/common/ops/export_scene.py,sha256=vFsooR8N94aREJF7rBAGDBb-zpmU6BVBfYbpWZl-NJg,2290
40
+ io_scene_vrm/common/ops/icyp.py,sha256=exp9cmUUoxjvEnkkBhxl-BWbPT2H4GnCHuudcZBU1QI,1753
41
+ io_scene_vrm/common/ops/import_scene.py,sha256=7fO7uIdpAGLBjOXvmL4X1iMfQg7QDrQDJ-5LHGnnCoI,2135
42
+ io_scene_vrm/common/ops/vrm.py,sha256=7TZsLPkcrlhoYpwOrmVTW7R2E5urrLRw-YEV6NNto0A,77313
43
+ io_scene_vrm/common/ops/wm.py,sha256=bt5XArgnEnAvUOlPOb-JyR85VgKop9yhThEvTbkfSYI,5983
44
+ io_scene_vrm/common/preferences.py,sha256=viGipkCOY6_ds3k_EIYeKKLDXPZSI4NPqTZTqyw4tZg,13275
45
+ io_scene_vrm/common/progress.py,sha256=ARv6jwjxaURuJbUwjQqYpJeE4hNwy1rf8TNg8ukmN-o,3141
46
+ io_scene_vrm/common/rotation.py,sha256=InoGjokjMlTPNuinKQ1JYaujkFKsdIsYHZp3GoVZFgA,3060
47
+ io_scene_vrm/common/safe_removal.py,sha256=b1aB0MCFdnDwED-cCz6Sf1EywyM2WA51sjyssrPO2zw,1553
48
+ io_scene_vrm/common/scene_watcher.py,sha256=RVQPKcNa63dDhXfJBF6r66_D3XpIRro0mgUPTyVFPXs,8181
49
+ io_scene_vrm/common/shader.py,sha256=K51NfcKwPzIt3Nzs7tEgKEJl5sZPy6PeDOjTM-wz0dQ,84008
50
+ io_scene_vrm/common/shape_key_mapper/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
51
+ io_scene_vrm/common/shape_key_mapper/arkit_mapping.py,sha256=B7Di6SPKL0NUXIYAyhK1GmlHP-w1XxgiQ7XY-hpGgK4,3631
52
+ io_scene_vrm/common/shape_key_mapper/mmd_mapping.py,sha256=jp1_oglCAg2MufGNCkvznbbD-Zu5YHM628qsrJJNQ6Y,1467
53
+ io_scene_vrm/common/shape_key_mapper/ready_player_me_mapping.py,sha256=J6RiKYYbU7XdAGYFTQ2kwEM_68CnjxM9ZsSyc6NyDmQ,1396
54
+ io_scene_vrm/common/shape_key_mapper/vrchat_mapping.py,sha256=WCnHsK0E9TP4GKjYvVNsWCUT-j1vorcwoWSar_nAHd0,690
55
+ io_scene_vrm/common/third_party_user_extension.py,sha256=-SyU6vfcIToKgVhOHMeR3yQ5_LPsFXHq_a0_oWQkUdo,7444
56
+ io_scene_vrm/common/transparent_z_write.blend,sha256=lUluSFhqDouj1Z4Mk2a6gOvfApeVqiG1n4ZCpsZDZ00,134583
57
+ io_scene_vrm/common/version.py,sha256=EVSaQJTYlPiFlW8OYhlLyqlMbiFQnkAPVriiOvSP5NA,5068
58
+ io_scene_vrm/common/vrm0/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
59
+ io_scene_vrm/common/vrm0/human_bone.py,sha256=G8S_56Us5-0TJLcizLpjYLD01HbCXjPi509n8l3TY_k,23407
60
+ io_scene_vrm/common/vrm0/material_property.py,sha256=h8e-6tnXHR44DEMfz41cwdSFDCVygQMEXyZnNlD1kqE,10004
61
+ io_scene_vrm/common/vrm1/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
62
+ io_scene_vrm/common/vrm1/expression_preset.py,sha256=Jxu_SPJqA05f97HUnywQp1xFsjVaHktwuxNqkmrSNRU,5519
63
+ io_scene_vrm/common/vrm1/human_bone.py,sha256=UlTg-r9-SVeTmp8bGLYSxQkbMS-1kSkHdOpT2wXdnsg,30051
64
+ io_scene_vrm/common/workspace.py,sha256=QBWDajqwuzW_QtCkm-MjPfYwn7kAQGtCqg3rWvXxnaE,9152
65
+ io_scene_vrm/common/writable_context.py,sha256=qnAUDUim9-kRTIufz9P-0MBc-mp2BpG6wkuRWMgy3lE,2592
66
+ io_scene_vrm/editor/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
67
+ io_scene_vrm/editor/extension.py,sha256=zv5m34czmpudL6gxd5i1wvckH8BTIGqFqf6JgMudTX8,15864
68
+ io_scene_vrm/editor/extension_accessor.py,sha256=vgPYEiBYT-OY9ohGPbyeQ7ZO80ujbU8bKun6eDBM7x8,2413
69
+ io_scene_vrm/editor/handler.py,sha256=83Jz4sY8CDx-H9nEieL12b8_0cId4nOgXvepMT5oGx4,2764
70
+ io_scene_vrm/editor/khr_character/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
71
+ io_scene_vrm/editor/khr_character/panel.py,sha256=90rT9h50cC8WhU3JuxyLO13fgHE2iGsijbCwfCxMMr4,2288
72
+ io_scene_vrm/editor/khr_character/property_group.py,sha256=lWogZZk5KTGhuFLvxKXD2gxhKZkglb2ka4YrZDV0HAw,782
73
+ io_scene_vrm/editor/khr_xmp_json_ld/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
74
+ io_scene_vrm/editor/khr_xmp_json_ld/ops.py,sha256=F16-252QRkR38tPJBzpua6CFrjw-BdShInLSb2pCa3Q,17366
75
+ io_scene_vrm/editor/khr_xmp_json_ld/panel.py,sha256=buPxmsVjR1m5cciW6QgZQmckohn44cX1jb5A-44IGBc,4992
76
+ io_scene_vrm/editor/khr_xmp_json_ld/property_group.py,sha256=bayK9f8diygvFGfzSssN3pB_JR2tUhAjQE-KS7lGc10,2834
77
+ io_scene_vrm/editor/khr_xmp_json_ld/ui_list.py,sha256=roVxN8GEi1AAFPSwMJQBVVi2uU_ZJMF_Tvs7qc8TrFE,5972
78
+ io_scene_vrm/editor/make_armature.py,sha256=llBH8hwhLM6cmcPltmr76mIPSHNUK0XztsPq1mENx6g,25070
79
+ io_scene_vrm/editor/menu.py,sha256=C02MNokTFNzhXt6GJXXW53wZo2-ht3pqFCpnuhc5z7w,5034
80
+ io_scene_vrm/editor/migration.py,sha256=ZOO74b3Vt_C-CW0jSCFBMxLioXepOMdX1-tW1jJDimA,10155
81
+ io_scene_vrm/editor/mtoon1/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
82
+ io_scene_vrm/editor/mtoon1/handler.py,sha256=HikeDvsnn7hUlX5Een0PQE4utc65AaKQFxvF7bkmJ5k,592
83
+ io_scene_vrm/editor/mtoon1/migration.py,sha256=Ad9SoVZ5vz-ckKhfsXk9EaiM2LHMigVtyF09ygKzQX0,22022
84
+ io_scene_vrm/editor/mtoon1/ops.py,sha256=RKPILzoI0LGJkJeZF5fSHaDroYFMw2WYJrLyVWIHGzQ,11323
85
+ io_scene_vrm/editor/mtoon1/panel.py,sha256=UjzsXrVnGVTi78oCTLD10kCXudJ57gVgOQxuggpgcQY,15717
86
+ io_scene_vrm/editor/mtoon1/property_group.py,sha256=XedyTwxAm09dDnPQjWSGpD957m5UZMvzzyJjETZneLU,180309
87
+ io_scene_vrm/editor/mtoon1/scene_watcher.py,sha256=TZpskwfaF15DGoMvZTbYWaBeFP9kJAHGXmE3-TudkC8,15150
88
+ io_scene_vrm/editor/node_constraint1/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
89
+ io_scene_vrm/editor/node_constraint1/panel.py,sha256=7r0ZdUN1BfJoAjEzfAsZAF9R74iY6VtN7uxFq578Tvk,11107
90
+ io_scene_vrm/editor/node_constraint1/property_group.py,sha256=nXttACk2yBHYT5Ak4mkUxTkXvUZrU0m08ANuymV-j4Y,1105
91
+ io_scene_vrm/editor/ops.py,sha256=D_w0OZiXfJpRRYVL_PP0VFHxFzxo51RqH-04RBFYFbA,17068
92
+ io_scene_vrm/editor/panel.py,sha256=Uj2TVT17m73ckAMhnGztrtNbTAfSCCPIYO2CXXBF-ew,10178
93
+ io_scene_vrm/editor/property_group.py,sha256=FUHlWH8RAzWRfU2MI_ry_cXj0HQRzFrtQFQIyYIqwBQ,34094
94
+ io_scene_vrm/editor/search.py,sha256=sNKwokkttd2SWiCv5IcXFjEQUse3lL1BkKWpaCL0O_I,22259
95
+ io_scene_vrm/editor/spring_bone1/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
96
+ io_scene_vrm/editor/spring_bone1/handler.py,sha256=htYfdBwmwPV-MELk9jtnQAknx0ZeGlRpid4RtS3YA70,31740
97
+ io_scene_vrm/editor/spring_bone1/menu.py,sha256=7lolB7qO-xl_MOg0da-B3XPsubdqX06PTIaAiMmffWk,8595
98
+ io_scene_vrm/editor/spring_bone1/migration.py,sha256=ViGk87rYgrZiF--9pwjvTMXCcWqWrD_SRJr44Q3oNhs,2795
99
+ io_scene_vrm/editor/spring_bone1/ops.py,sha256=IcFL9WLqiH0hBIijdMMK-V5tgQejsUQKSpHO_m76Ydk,64806
100
+ io_scene_vrm/editor/spring_bone1/panel.py,sha256=ibKNs_8jCCnz2u4hiHRqrMf1tsjRMqxMkl4c8ysjsws,20678
101
+ io_scene_vrm/editor/spring_bone1/property_group.py,sha256=RfR5QFye6TMp6e0JKfub9LZAkpSU0VORJhcaky4RkxU,52068
102
+ io_scene_vrm/editor/spring_bone1/ui_list.py,sha256=5BkLfHNgJmYQe6ACFCV9dOdcG01QGVrXSIMxoO75ZEA,11878
103
+ io_scene_vrm/editor/subscription.py,sha256=-gFuhloIt8BaXMwXzpU1XXvbFyFLrw9AsuK6LyQr5-A,4005
104
+ io_scene_vrm/editor/t_pose.py,sha256=McQOhFV4uA8foxeF1a0cDZHGmYzxmD_tGdQsxDeb_FA,25666
105
+ io_scene_vrm/editor/validation.py,sha256=iIrwH07WkTFvcRY8ZdLEl2-RPrdm9W8HCz_0eGTn0vc,50979
106
+ io_scene_vrm/editor/vrm0/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
107
+ io_scene_vrm/editor/vrm0/gizmo_group.py,sha256=wZQcN67AquwkHjaUkyrKbUaS1FNSspmOMpqKbB8KzXw,2288
108
+ io_scene_vrm/editor/vrm0/handler.py,sha256=MVmlTlgoPTbjh0N05D_mtrkwS6C13MD_723vfdSROuo,721
109
+ io_scene_vrm/editor/vrm0/menu.py,sha256=0BXI06bT9TC-hwvkkRf9efh-yE3kI9ku2Rc6ghmLzk0,5032
110
+ io_scene_vrm/editor/vrm0/migration.py,sha256=IAf81D5VNCEYsvRxMzUAFrHsea5nWgOZap2ib4w4BtE,27734
111
+ io_scene_vrm/editor/vrm0/ops.py,sha256=YK7CtxbB31viClATh1aAFJslpIhRxnmgBhiNLGv1Fc0,83635
112
+ io_scene_vrm/editor/vrm0/panel.py,sha256=hCecQ023vjjmFjOC4c4I0PD5WqNwl3r8VRKoXPXpLFA,47555
113
+ io_scene_vrm/editor/vrm0/property_group.py,sha256=Mjt60oXkNu75p78SEbKimnKGrVQW0CnbnwOdclACRhQ,69700
114
+ io_scene_vrm/editor/vrm0/ui_list.py,sha256=f9DUexK9E7GN8EtzMOiDm33_3xrNLbJXOgOpAlmPt8Y,20575
115
+ io_scene_vrm/editor/vrm1/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
116
+ io_scene_vrm/editor/vrm1/handler.py,sha256=y8Me43zL3Mc-xE3pHbw32w2NQ3iux4UjZzwiwXDBYmk,848
117
+ io_scene_vrm/editor/vrm1/menu.py,sha256=9PzDbjfDGB0eLgWYFJqRSOlpAoXZtAB7DA6IIrcRDUs,2721
118
+ io_scene_vrm/editor/vrm1/migration.py,sha256=Rj6YXBfK7Iyqnme1-S63jwrVHDSybrVigjh12E_4ieo,12296
119
+ io_scene_vrm/editor/vrm1/ops.py,sha256=giTBiv5Bqk677TxiAcjS9ZvOb9J_x2GnnmLiQ0MivV8,106062
120
+ io_scene_vrm/editor/vrm1/panel.py,sha256=9SSodgJG4Te2SEsR2ugJ_0GMoE44qcAdP1yj9dfMjMw,43553
121
+ io_scene_vrm/editor/vrm1/property_group.py,sha256=4YpVlAnwvhDO6uJT6Y16q_RJP4VrsRr3HbAkkqtN7go,85438
122
+ io_scene_vrm/editor/vrm1/scene_watcher.py,sha256=WqD1uusdALtqn59tRihzCDdgfzzErc9uQqk74wu2KbI,3195
123
+ io_scene_vrm/editor/vrm1/ui_list.py,sha256=rdE_Sq8nTx_cx3UrgoZ-vc3qua3Z5vknB6UniXARHOQ,16133
124
+ io_scene_vrm/exporter/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
125
+ io_scene_vrm/exporter/abstract_base_vrm_exporter.py,sha256=EG3U8FuT29JS6F_sUYDW0XD9SwXg99ie3JriVg4BOsM,23888
126
+ io_scene_vrm/exporter/export_scene.py,sha256=G8r8UDq8sA7KmW5PkJf9s2zwVIE_oUH6Vq0QDKYCMP8,34232
127
+ io_scene_vrm/exporter/gltf2_export_user_extension.py,sha256=T3u85mxy2Zzq7yYTN9BCdJiZuTsDWPotRC87EdnAb8g,1462
128
+ io_scene_vrm/exporter/khr_character_exporter.py,sha256=42ky-UL8-H6AZa_gyrwYYgjh6a-4ALKkubG6dK75Pow,830
129
+ io_scene_vrm/exporter/vrm0_exporter.py,sha256=GwIdaiCeeCjgduvTj3Q92DZdfKR_kkZt11WSw9GsmH0,154237
130
+ io_scene_vrm/exporter/vrm1_exporter.py,sha256=qx13nX12b9_QxGGqr0PFkoaQHkjqmiRMHNDR1HMFpSo,142908
131
+ io_scene_vrm/exporter/vrm_animation_exporter.py,sha256=Kh4RquJrJmIs48njQNVniDxV-VrRpFmRottGZHrA_lo,34403
132
+ io_scene_vrm/external/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
133
+ io_scene_vrm/external/auto_rig_pro_support.py,sha256=8z10hzJVfqG564LqiW3qg_BU4UnzUhs9UjztOgWxdxc,130
134
+ io_scene_vrm/external/io_scene_gltf2_support.py,sha256=nY4fYfIgGgYGrvDqMTqGuUoWt3ruqii-AGdHrPrxQx8,19255
135
+ io_scene_vrm/external/rigify_support.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
136
+ io_scene_vrm/importer/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
137
+ io_scene_vrm/importer/abstract_base_vrm_importer.py,sha256=4scar_1l_guOw3oG9lz003SXSDDV95Jd9Ai-lkgEDC4,61149
138
+ io_scene_vrm/importer/file_handler.py,sha256=6Gt9ODXXkUSFW7QiNFjZ9CxpyHhQQ2ElsMXzXxPF4z0,929
139
+ io_scene_vrm/importer/gltf2_import_user_extension.py,sha256=ZAOLvBjzB4lImRqxSLQUFGWK3Tn32BaVxycWJVPkMKg,9333
140
+ io_scene_vrm/importer/import_scene.py,sha256=VAQyoqiShSTmaqeKSq2mwZZUIL0-aDTLOqHGg3NyBOI,23456
141
+ io_scene_vrm/importer/license_validation.py,sha256=saPnhgU6yKQDWoFHOf0kOBsBdK4XfDMG-d7eHobJKbI,6169
142
+ io_scene_vrm/importer/vrm0_importer.py,sha256=TKV2pTLsi1LDq1AAwBRpLR9xOt2WjfE4mt40_BcMBxE,67415
143
+ io_scene_vrm/importer/vrm1_importer.py,sha256=_cuwz1D3VKLk-ZyfrWKvID2VwGXp2COqzf0dVvB4WDQ,78056
144
+ io_scene_vrm/importer/vrm_animation_importer.py,sha256=ngm1uKRekf6EEMMoizWlSpexI_F81T-JAhqTHgFHI8Q,30527
145
+ io_scene_vrm/importer/vrm_diff.py,sha256=RSRU7Qv69AG5J2mWBKrTMN26fkXkm35ZRyy02ohuR-g,12859
146
+ io_scene_vrm/locale/__init__.py,sha256=k9nKtClHotGD_M1HNN1p9GgR3SlU2cM7Wwks44-T3F0,51
147
+ io_scene_vrm/locale/ja_jp.py,sha256=Hmdjcjdy5Ub-pp5_qKOYXXeZmmJ8A9kHNu_Df4RysIw,38463
148
+ io_scene_vrm/locale/ruff.toml,sha256=VwperuTM-J-IU-Q6U1GN29kTHSOwkKDzr1UOC7lsf3I,165
149
+ io_scene_vrm/locale/translation_dictionary.py,sha256=RT31DNDfkzrO2vcgXHeuNKko3BWQp00ntB7kXhsuJMA,307
150
+ io_scene_vrm/locale/zh_hans.py,sha256=sDBcbLaHN-a1QW0fJqgy3NhUqIgCAe1F9N6ATf9Ct5U,29491
151
+ io_scene_vrm/registration.py,sha256=JZjwGGpeAtIdd3FbWTa1MllbUTAWOh-lR6Tnq0JDYKI,33687
152
+ bpy_vrm_format-4.7.4.dist-info/WHEEL,sha256=e4_1dyBeezi8ZjfxrZ3bnVOxFDa3ksqVqH0jTHkUZ3k,81
153
+ bpy_vrm_format-4.7.4.dist-info/METADATA,sha256=3eJUYNPJqgdQI2j15-0XQpBaJHjh-YKf-CfW4DXXNw0,4676
154
+ bpy_vrm_format-4.7.4.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.12.19
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ # VRM Add-on for Blender
2
+
3
+ See https://vrm-addon-for-blender.info for more information.
@@ -0,0 +1,41 @@
1
+ # SPDX-License-Identifier: MIT OR GPL-3.0-or-later
2
+ # SPDX-FileCopyrightText: 2018 iCyP
3
+
4
+ from . import registration
5
+ from .exporter import gltf2_export_user_extension
6
+ from .importer import gltf2_import_user_extension
7
+
8
+ bl_info = {
9
+ "name": "VRM format",
10
+ "author": "saturday06, iCyP",
11
+ "version": (
12
+ 4, # x-release-please-major
13
+ 7, # x-release-please-minor
14
+ 4, # x-release-please-patch
15
+ ),
16
+ "location": "File > Import-Export",
17
+ "description": "Import-Edit-Export VRM",
18
+ "blender": (2, 93, 0),
19
+ "warning": "",
20
+ "support": "COMMUNITY",
21
+ "wiki_url": "",
22
+ "doc_url": "https://vrm-addon-for-blender.info",
23
+ "tracker_url": "https://github.com/saturday06/VRM-Addon-for-Blender/issues",
24
+ "category": "Import-Export",
25
+ }
26
+
27
+
28
+ def register() -> None:
29
+ registration.register()
30
+
31
+
32
+ def unregister() -> None:
33
+ registration.unregister()
34
+
35
+
36
+ class glTF2ImportUserExtension(gltf2_import_user_extension.glTF2ImportUserExtension):
37
+ pass
38
+
39
+
40
+ class glTF2ExportUserExtension(gltf2_export_user_extension.glTF2ExportUserExtension):
41
+ pass
@@ -0,0 +1,28 @@
1
+ schema_version = "1.0.0"
2
+ id = "vrm"
3
+ version = "4.7.4"
4
+ name = "VRM format"
5
+ tagline = "VRM import, export and editing capabilities"
6
+ maintainer = "Isamu Mogi <dyob@lunaport.net>"
7
+ type = "add-on"
8
+ website = "https://vrm-addon-for-blender.info"
9
+ tags = [
10
+ "Animation",
11
+ "Import-Export",
12
+ "Material",
13
+ "Modeling",
14
+ "Physics",
15
+ ]
16
+ blender_version_min = "4.2.0"
17
+ blender_version_max = "5.3.0"
18
+ license = [
19
+ "SPDX:MIT",
20
+ "SPDX:GPL-3.0-or-later",
21
+ ]
22
+ copyright = [
23
+ "2020 Isamu Mogi",
24
+ "2018 iCyP",
25
+ ]
26
+
27
+ [permissions]
28
+ files = "Import/export VRM from/to disk"
@@ -0,0 +1 @@
1
+ # SPDX-License-Identifier: MIT OR GPL-3.0-or-later
@@ -0,0 +1,58 @@
1
+ # SPDX-License-Identifier: MIT OR GPL-3.0-or-later
2
+
3
+ from dataclasses import dataclass
4
+ from typing import Final
5
+
6
+ from bpy.app.handlers import persistent
7
+ from bpy.types import Context
8
+
9
+ from .logger import get_logger
10
+
11
+ _logger = get_logger(__name__)
12
+
13
+
14
+ @dataclass
15
+ class State:
16
+ during_animation_playback: bool = False
17
+ during_frame_change: bool = False
18
+
19
+
20
+ _state: Final = State()
21
+
22
+
23
+ def _is_animation_playing(context: Context) -> bool:
24
+ if _state.during_animation_playback:
25
+ return True
26
+ screen = context.screen
27
+ if not screen:
28
+ return False
29
+ return screen.is_animation_playing
30
+
31
+
32
+ def defer_shape_key_update(context: Context) -> bool:
33
+ return _is_animation_playing(context) or _state.during_frame_change
34
+
35
+
36
+ @persistent
37
+ def animation_playback_pre(_unused: object) -> None:
38
+ _state.during_animation_playback = True
39
+
40
+
41
+ @persistent
42
+ def animation_playback_post(_unused: object) -> None:
43
+ _state.during_animation_playback = False
44
+
45
+
46
+ @persistent
47
+ def frame_change_pre(_unused: object) -> None:
48
+ _state.during_frame_change = True
49
+
50
+
51
+ @persistent
52
+ def frame_change_post(_unused: object) -> None:
53
+ _state.during_frame_change = False
54
+
55
+
56
+ def clear_global_variables() -> None:
57
+ _state.during_animation_playback = False
58
+ _state.during_frame_change = False
@@ -0,0 +1,82 @@
1
+ # SPDX-License-Identifier: MIT OR GPL-3.0-or-later
2
+ import re
3
+ from dataclasses import dataclass
4
+ from pathlib import Path
5
+ from typing import Optional
6
+
7
+
8
+ @dataclass(frozen=True)
9
+ class BlenderManifest:
10
+ id: str
11
+ version: tuple[int, int, int]
12
+ blender_version_min: tuple[int, int, int]
13
+ blender_version_max: Optional[tuple[int, int, int]]
14
+
15
+ @classmethod
16
+ def default_blender_manifest_path(cls) -> Path:
17
+ return Path(__file__).parent.parent / "blender_manifest.toml"
18
+
19
+ @classmethod
20
+ def _read_str(cls, blender_manifest: str, key: str) -> Optional[str]:
21
+ # When the version of Python used by the minimum supported version of Blender
22
+ # exceeds 3.11, it is rewritten in the tomllib library.
23
+ lines = [line.strip() for line in blender_manifest.splitlines()]
24
+
25
+ pattern = key + r' = "([^"]+)"'
26
+ for line in lines:
27
+ match = re.fullmatch(pattern, line)
28
+ if not match:
29
+ continue
30
+ return match[1]
31
+
32
+ return None
33
+
34
+ @classmethod
35
+ def _read_3_tuple_version(
36
+ cls, blender_manifest: str, key: str
37
+ ) -> Optional[tuple[int, int, int]]:
38
+ # When the version of Python used by the minimum supported version of Blender
39
+ # exceeds 3.11, it is rewritten in the tomli library.
40
+ lines = [line.strip() for line in blender_manifest.splitlines()]
41
+
42
+ pattern = key + r' = "(\d+)\.(\d+)\.(\d+)"'
43
+ for line in lines:
44
+ match = re.fullmatch(pattern, line)
45
+ if not match:
46
+ continue
47
+ return (int(match[1]), int(match[2]), int(match[3]))
48
+
49
+ return None
50
+
51
+ @classmethod
52
+ def read(cls, blender_manifest: Optional[str] = None) -> "BlenderManifest":
53
+ if blender_manifest is None:
54
+ blender_manifest = cls.default_blender_manifest_path().read_text(
55
+ encoding="UTF-8"
56
+ )
57
+
58
+ addon_id = cls._read_str(blender_manifest, "id")
59
+ if addon_id is None:
60
+ message = "'id' was not found in blender manifest"
61
+ raise ValueError(message)
62
+
63
+ version = cls._read_3_tuple_version(blender_manifest, "version")
64
+ if version is None:
65
+ message = "'version' was not found in blender manifest"
66
+ raise ValueError(message)
67
+
68
+ blender_version_min = cls._read_3_tuple_version(
69
+ blender_manifest, "blender_version_min"
70
+ )
71
+ if blender_version_min is None:
72
+ message = "'blender_version_min' was not found in blender manifest"
73
+ raise ValueError(message)
74
+
75
+ return BlenderManifest(
76
+ id=addon_id,
77
+ version=version,
78
+ blender_version_min=blender_version_min,
79
+ blender_version_max=cls._read_3_tuple_version(
80
+ blender_manifest, "blender_version_max"
81
+ ),
82
+ )
@@ -0,0 +1,16 @@
1
+ # SPDX-License-Identifier: MIT OR GPL-3.0-or-later
2
+ from collections.abc import Mapping
3
+ from typing import Final
4
+
5
+ INTERNAL_NAME_PREFIX: Final = "\N{FULLWIDTH BROKEN BAR}"
6
+ """
7
+ The letter to be prefixed when naming internal invisible objects. It was chosen so that
8
+ the sort order would be backward and also so that it would be easy to identify the
9
+ object as internal.
10
+ """
11
+
12
+ DISABLE_TRANSLATION: Final = "\N{ZERO WIDTH SPACE}"
13
+
14
+ FULLWIDTH_ASCII_TO_ASCII_MAP: Final[Mapping[str, str]] = {
15
+ chr(ascii_char + 0x0000_FEE0): chr(ascii_char) for ascii_char in range(0x21, 0x7E)
16
+ }