Add Blender USD export CLI#48
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds a complete CLI pipeline for exporting Blender materials to USD MaterialX/OpenPBR formats. The implementation extracts material node graphs from Blender scenes via headless execution, converts them into USD stages for each target renderer, and exposes the workflow through a command-line interface with runtime discovery and target selection. ChangesBlender Material Export CLI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
materials-processor-blender export-usdfor headless Blender material exportblender_material_graphs.jsonandexport_report.jsonalongside the USD outputsscripts/export_blender_materials_to_usd.pyReview Notes
Changed-code review found and fixed one CLI behavior bug before publishing:
--targetoriginally defaulted toalleven when a single explicit target was passed, so--target openpbrstill exported MaterialX. The PR now defaults only when no target is provided and has regression coverage for single-target aliases.Validation
uv --native-tls run pytest tests/test_blender_cli.py tests/test_blender_runtime.py tests/test_usd_json_conversion.pyuv --native-tls run ruff checkuv --native-tls run pytestuv --native-tls run materials-processor-blender export-usd "G:\Projects\AYON_PROJECTS\mo_ashraf\Mojar_01\sh_001\work\lighting\mo_sh_001_lighting_v005.blend" --out-dir <temp> --target openpbr --timeout 300Remaining Known Limitations
ShaderNodeGroupnodes forfelt_fabric_03andold_gold_04.Marble.012still references two missing external BlenderKit texture files underC:\PROJECT\BlenderKit\....Summary by CodeRabbit
Release Notes