unitytk 0.0.6__tar.gz → 0.0.7__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 (49) hide show
  1. {unitytk-0.0.6/unitytk.egg-info → unitytk-0.0.7}/PKG-INFO +1 -1
  2. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_audio_events_integration.py +14 -5
  3. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/__init__.py +1 -1
  4. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/AudioEventController.cs +9 -0
  5. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/EmissiveGroupController.cs +1 -1
  6. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/README.md +3 -2
  7. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/ShotMetadataController.cs +10 -2
  8. {unitytk-0.0.6 → unitytk-0.0.7/unitytk.egg-info}/PKG-INFO +1 -1
  9. {unitytk-0.0.6 → unitytk-0.0.7}/LICENSE +0 -0
  10. {unitytk-0.0.6 → unitytk-0.0.7}/MANIFEST.in +0 -0
  11. {unitytk-0.0.6 → unitytk-0.0.7}/docs/README.md +0 -0
  12. {unitytk-0.0.6 → unitytk-0.0.7}/pyproject.toml +0 -0
  13. {unitytk-0.0.6 → unitytk-0.0.7}/setup.cfg +0 -0
  14. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_asset_delivery.py +0 -0
  15. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_bool_to_fade_curve.py +0 -0
  16. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_c130_fcr_integration.py +0 -0
  17. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_c5m_visibility.py +0 -0
  18. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_clip_name_contract_integration.py +0 -0
  19. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_controller_runtime_integration.py +0 -0
  20. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_deploy_templates.py +0 -0
  21. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_emissive_groups_integration.py +0 -0
  22. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_fade_window_preservation.py +0 -0
  23. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_launcher.py +0 -0
  24. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_lightmap_metadata_integration.py +0 -0
  25. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_render_opacity_controller.py +0 -0
  26. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_render_opacity_e2e.py +0 -0
  27. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_render_opacity_integration.py +0 -0
  28. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_scene_builder.py +0 -0
  29. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_shadow_plane_integration.py +0 -0
  30. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_shared_material_standalone.py +0 -0
  31. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_shot_metadata_integration.py +0 -0
  32. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_shots_audio_sidebyside_integration.py +0 -0
  33. {unitytk-0.0.6 → unitytk-0.0.7}/test/test_standalone_enduser.py +0 -0
  34. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/asset_delivery.py +0 -0
  35. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/launcher.py +0 -0
  36. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/scene_builder.py +0 -0
  37. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/template_deployer.py +0 -0
  38. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/EmissiveGroups.hlsl +0 -0
  39. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/EmissiveGroupsLit.shader +0 -0
  40. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/LightmapMetadataController.cs +0 -0
  41. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/M3trik.Unitytk.asmdef +0 -0
  42. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/RenderOpacityController.cs +0 -0
  43. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/ShadowPlaneController.cs +0 -0
  44. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/UnitytkSettings.cs +0 -0
  45. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk/templates/__init__.py +0 -0
  46. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk.egg-info/SOURCES.txt +0 -0
  47. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk.egg-info/dependency_links.txt +0 -0
  48. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk.egg-info/requires.txt +0 -0
  49. {unitytk-0.0.6 → unitytk-0.0.7}/unitytk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitytk
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: A modular Python toolkit for Unity interaction.
5
5
  Author-email: Ryan Simpson <m3trik@outlook.com>
6
6
  License: MIT
@@ -14,8 +14,9 @@ Validates the new single-carrier audio events pipeline end-to-end:
14
14
  ``AudioEventController.cs`` deployed. Verify:
15
15
  a. the ``audio_manifest`` string arrives on the ``data_export``
16
16
  GameObject (raw user-property),
17
- b. the importer auto-attaches an ``AudioEventController`` to
18
- ``data_export``,
17
+ b. the importer auto-attaches an ``AudioEventController`` to the
18
+ prefab **root** (and explicitly NOT to the ``data_export``
19
+ carrier — runtime dispatch finds it via the root),
19
20
  c. ``AnimationEvent`` callbacks are injected on the imported
20
21
  ``AnimationClip`` at the right frames with the right names.
21
22
 
@@ -547,12 +548,20 @@ class TestAudioEventsIntegration(unittest.TestCase):
547
548
  if not fbx_path or not os.path.exists(fbx_path):
548
549
  self.skipTest("FBX not available — test_01 must run first")
549
550
 
550
- launcher = UnityLauncher()
551
+ # Default to the newest installed editor; allow overriding to a
552
+ # specific (licensed) version via UNITYTK_TEST_EDITOR — same contract
553
+ # as the sibling integration tests.
554
+ editor = os.environ.get("UNITYTK_TEST_EDITOR")
555
+ launcher = UnityLauncher(editor) if editor else UnityLauncher()
551
556
  project_path = os.path.join(self.temp_dir, "UnityProject")
552
557
 
553
558
  logger.info(f"Creating Unity project: {project_path}")
554
- created = launcher.create_project(project_path, batch_mode=True)
555
- self.assertTrue(created, "Failed to create Unity project")
559
+ if not launcher.create_project(project_path, batch_mode=True):
560
+ self.skipTest(
561
+ "Unity batch project creation failed — typically no batch-mode "
562
+ "license on this machine (see Unity Editor.log). The Maya export "
563
+ "half (test_01) still validates the FBX contents."
564
+ )
556
565
 
557
566
  assets_path = os.path.join(project_path, "Assets")
558
567
  # create_project reports success on directory existence but may not have
@@ -1,4 +1,4 @@
1
- __version__ = "0.0.6"
1
+ __version__ = "0.0.7"
2
2
 
3
3
  from .launcher import UnityLauncher, UnityFinder
4
4
  from .scene_builder import SceneBuilder
@@ -423,6 +423,15 @@ public class AudioEventImporter : AssetPostprocessor
423
423
  try
424
424
  {
425
425
  var payload = JsonUtility.FromJson<AudioManifestPayload>(manifest);
426
+ if (payload == null)
427
+ {
428
+ // FromJson returns null for e.g. the literal "null" — without
429
+ // this guard the version read below NREs inside the catch and
430
+ // surfaces as a misleading "Failed to parse" warning.
431
+ Debug.LogWarning($"[AudioEvent] Empty/invalid audio_manifest " +
432
+ $"JSON on '{assetPath}'.");
433
+ return result;
434
+ }
426
435
  CarrierImport.WarnIfNewer(payload.version,
427
436
  SUPPORTED_MANIFEST_VERSION, "AudioEvent", assetPath);
428
437
  if (payload.events != null)
@@ -391,7 +391,7 @@ public class EmissiveGroupImporter : AssetPostprocessor
391
391
  }
392
392
 
393
393
  CarrierImport.WarnIfNewer(
394
- payload.schema, SUPPORTED_SCHEMA_VERSION, ATTR_MANIFEST, assetPath);
394
+ payload.schema, SUPPORTED_SCHEMA_VERSION, "EmissiveGroups", assetPath);
395
395
 
396
396
  var controller = existing ?? root.AddComponent<EmissiveGroupController>();
397
397
 
@@ -21,6 +21,7 @@ controller here is an `AssetPostprocessor` that reads its channel via
21
21
  | `audio_manifest` | JSON `{version: 2, events:[{clip, frame, name}]}` (legacy v1 wire string `"12:Footstep 24:Jump"` still accepted) | `AudioEventController` |
22
22
  | `opacity` (per-object animated attr, not on the carrier) | float curve 0–1 | `RenderOpacityController` |
23
23
  | `shadow_metadata` | JSON `{version, planes:[{name, texture, intensity}]}` | `ShadowPlaneController` |
24
+ | `emissive_groups` | JSON `{schema, encoding, mask, groups:[{name, weight, …}]}` (+ per-group keyable `emissiveGroup_<name>` floats on the carrier) | `EmissiveGroupController` |
24
25
 
25
26
  The authoritative producer-side spec is
26
27
  [mayatk's data_nodes.md](https://github.com/m3trik/mayatk/blob/main/docs/data_nodes.md) (channel registry +
@@ -28,8 +29,8 @@ how to add a channel) and
28
29
  [shot_export_unity.md](https://github.com/m3trik/mayatk/blob/main/docs/shot_export_unity.md) (the Shots →
29
30
  clip-name join contract). Blender uses the same carrier mechanism through
30
31
  [blendertk's DataNodes mirror](https://github.com/m3trik/blendertk/blob/main/docs/data_nodes.md) — today it
31
- ships `lightmap_metadata` only (the Shots, Audio, and opacity producers are
32
- Maya-only until ported).
32
+ ships `lightmap_metadata`, `shadow_metadata`, and `emissive_groups` (the Shots,
33
+ Audio, and opacity producers are Maya-only until ported).
33
34
 
34
35
  > **Important:** the carrier only ships when the exporter includes it — the DCC-side
35
36
  > Scene Exporter's default-on *"Export Scene Data Node"* option guarantees that. A
@@ -62,8 +62,16 @@ public class ShotMetadataController : MonoBehaviour
62
62
  System.StringComparer.OrdinalIgnoreCase);
63
63
  foreach (var s in shots)
64
64
  {
65
- if (s != null && !string.IsNullOrEmpty(s.clip) && !_byClip.ContainsKey(s.clip))
66
- _byClip[s.clip] = s;
65
+ if (s == null || string.IsNullOrEmpty(s.clip)) continue;
66
+ if (_byClip.ContainsKey(s.clip))
67
+ {
68
+ // First record wins (the DCC side resolves take/clip names in
69
+ // one pass, so duplicates indicate a producer bug upstream).
70
+ Debug.LogWarning($"[ShotMetadata] Duplicate clip name '{s.clip}' " +
71
+ "in shot metadata; keeping the first record.");
72
+ continue;
73
+ }
74
+ _byClip[s.clip] = s;
67
75
  }
68
76
  }
69
77
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitytk
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: A modular Python toolkit for Unity interaction.
5
5
  Author-email: Ryan Simpson <m3trik@outlook.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes