Raise character limits and document optional Blender MCP
This commit is contained in:
1 parent
50a48d2256
commit
aec1fb7b69
20 files changed
+303
-96
No files matched your search
@@ -9,11 +9,10 @@ class CatalogueTests(unittest.TestCase):
|
||||
def test_contract_matches_npc_pipeline(self):
|
||||
self.assertEqual(ba.SLOTS, npc_pipeline.SLOTS)
|
||||
self.assertEqual(sorted(ba.BONES), sorted(npc_pipeline.BONES))
|
||||
# The base mesh keeps the frozen 6000/4000 contract; the eight library
|
||||
# variants have their own 8000/8000 detail budget (documented in
|
||||
# blender-assets.md and covered by smoke_npc_budget.gd).
|
||||
self.assertLessEqual(ba.CHAR_MAX_TRIS, 8000)
|
||||
self.assertLessEqual(ba.CHAR_MAX_VERTS, 8000)
|
||||
# The character cap was raised to 16000/16000 for the head/face/hand
|
||||
# overhaul; the 13 core bones stay required and extra bones are optional.
|
||||
self.assertLessEqual(ba.CHAR_MAX_TRIS, 16000)
|
||||
self.assertLessEqual(ba.CHAR_MAX_VERTS, 16000)
|
||||
|
||||
def test_gear_uses_known_attach_points(self):
|
||||
for name, attach in ba.GEAR.items():
|
||||
@@ -188,10 +187,17 @@ class InspectionTests(unittest.TestCase):
|
||||
self.assertEqual(result["bones_missing"], [])
|
||||
self.assertEqual(result["budget"]["max_triangles"], ba.CHAR_MAX_TRIS)
|
||||
|
||||
def test_extra_optional_bones_are_allowed(self):
|
||||
stats = self.stats(bones=list(ba.BONES) + ["Hips", "Spine", "Neck",
|
||||
"FingerL", "FingerR"])
|
||||
result = ba.analyse_inspection(stats)
|
||||
self.assertTrue(result["ok"], result["issues"])
|
||||
self.assertEqual(result["bones_missing"], [])
|
||||
|
||||
def test_character_contract_failures_are_listed(self):
|
||||
stats = self.stats(mesh_nodes=["Armature"], skinned=False, unskinned=["Armature"],
|
||||
materials=["cloth"], bones=["Head"], meshes_without_uv=1,
|
||||
triangles=9000, split_vertices=9000,
|
||||
triangles=17000, split_vertices=17000,
|
||||
world_bounds={"min": [-0.3, -0.4, -0.2], "max": [0.3, 1.2, 0.2]})
|
||||
issues = "\n".join(ba.analyse_inspection(stats)["issues"])
|
||||
self.assertIn("no mesh node named npc_base", issues)
|
||||
@@ -199,8 +205,8 @@ class InspectionTests(unittest.TestCase):
|
||||
self.assertIn("missing material slot skin", issues)
|
||||
self.assertIn("mesh not skinned", issues)
|
||||
self.assertIn("mesh(es) without UVs", issues)
|
||||
self.assertIn(f"triangles 9000 > {ba.CHAR_MAX_TRIS}", issues)
|
||||
self.assertIn(f"glTF vertices 9000 > {ba.CHAR_MAX_VERTS}", issues)
|
||||
self.assertIn(f"triangles 17000 > {ba.CHAR_MAX_TRIS}", issues)
|
||||
self.assertIn(f"glTF vertices 17000 > {ba.CHAR_MAX_VERTS}", issues)
|
||||
self.assertIn("feet not on the ground", issues)
|
||||
self.assertIn("unexpected height", issues)
|
||||
|
||||
|
||||
Reference in new issue
Block a user