Metadata-Version: 2.4
Name: extapps
Version: 0.12.1
Summary: Standalone Qt tools for content pipelines: texture map compositing and conversion, photogrammetry, Substance Painter and Marmoset Toolbag automation, Unity and WebXR hand-off, and mesh conversion.
Author-email: Ryan Simpson <m3trik@outlook.com>
License-Expression: LGPL-3.0-or-later
Project-URL: Homepage, https://github.com/m3trik/extapps
Project-URL: Repository, https://github.com/m3trik/extapps
Project-URL: Changelog, https://github.com/m3trik/extapps/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/m3trik/extapps/issues
Keywords: m3trik,photogrammetry,pbr,substance-painter,gltf,technical-art,pyside6
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: COPYING
License-File: COPYING.LESSER
Requires-Dist: pythontk>=0.27.1
Requires-Dist: uitk>=1.13.0
Requires-Dist: qtpy
Provides-Extra: mesh
Requires-Dist: pythontk[mesh]; extra == "mesh"
Dynamic: license-file

[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0.en.html)
![Platform](https://img.shields.io/badge/Platform-Windows%2C%20Linux-lightgrey.svg)
[![Tests](https://img.shields.io/badge/Tests-863%20passed-brightgreen.svg)](tests/)

# extapps

**Standalone apps for the work around a DCC:** texture maps, photogrammetry, mesh conversion, scripted jobs in Substance 3D Painter, Marmoset Toolbag and Unity, a live WebXR preview and look matching. Each one runs on its own from the `extapps` command, and [tentacle](https://github.com/m3trik/tentacle)'s Maya and Blender menus open the same apps by name.

<!-- diagram:ecosystem/extapps -->
<!-- Generated by m3trik/scripts/generate_readme_diagrams.py from the workspace's declarations: change those and re-run it, never this block. -->
<p align="center">
<a href="https://github.com/m3trik/m3trik#readme"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/m3trik/m3trik/main/docs/diagrams/ecosystem-extapps-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/m3trik/m3trik/main/docs/diagrams/ecosystem-extapps-light.svg"><img alt="extapps (highlighted) in the ecosystem: uitk requires pythontk; unitytk requires pythontk; mayatk requires uitk; blendertk requires uitk; tentacle requires uitk; extapps requires uitk; tentacle installs mayatk as its [maya] extra; tentacle installs blendertk as its [blender] extra; tentacle opens extapps by name (its [apps] extra) and never imports it; mayatk and blendertk share a mirrored API. tentacle and extapps are products, which nothing imports." src="https://raw.githubusercontent.com/m3trik/m3trik/main/docs/diagrams/ecosystem-extapps-light.svg" width="781"></picture></a>
</p>
<!-- /diagram:ecosystem/extapps -->

## Design

| Principle | In practice |
|:--|:--|
| **Host-free, opened by name** | Each app is built on [pythontk](https://github.com/m3trik/pythontk) and [uitk](https://github.com/m3trik/uitk) alone, so it runs with no DCC installed. It is registered as an entry point, which a host opens by name. |
| **The engine is a library call** | The texture, mesh, preview and lighting apps are panels over engines in pythontk (`MapCompositor`, `ImgUtils.swap_colors`, `MeshConvert`), so a script runs the same job with no window. |
| **A script brings its own panel** | In Substance, Marmoset and Unity Scripts, a script declares its settings in its header and the panel draws them as rows. Adding a script adds its controls, with no panel code. |
| **Runs in the app already open** | A script sent to Unity runs in the project you are working in, and one sent to Painter can run in your own session. A job starts only when you press Run and is one undo step there. |
| **Test-driven** | Every bug is reproduced as a failing test before it is fixed, and the test stays in the suite. More than 800 tests run the panels and their engines offscreen. |

The reasoning behind each rule is in the [code standard](https://github.com/m3trik/m3trik/blob/main/docs/CODE_STANDARD.md).

## The apps

A name in code is what `extapps <name>` opens; a linked name opens that app's guide.

**Texture maps**

- **[Map Compositor](https://github.com/m3trik/extapps/blob/main/docs/map_compositor.md)** (`compositor`) merges several texture sets that share a UV layout into one, map type by map type. A map that shows no island edges, such as a flat normal, is cut with a mask found from that set's other maps.
- **Map Converter** (`converter`) converts in batches: DirectX and OpenGL normals, spec/gloss to metal/rough, bump to normal, smoothness and roughness.
- **[Color Swap](https://github.com/m3trik/extapps/blob/main/docs/color_swap.md)** (`color_swap`) recolors a base color map by color pairs picked on the map: a green handle becomes the orange you choose and keeps its wear, grain and shading, and grays stay as they are.
- **Map Packer** (`packer`) packs single-channel maps into one texture, or unpacks one, from templates for ORM, MRAO, MSAO, Metallic Smoothness and glTF.

**Photogrammetry**

- **[Metashape](https://github.com/m3trik/extapps/blob/main/docs/metashape_workflow.md)** and **RealityScan workflows** (`metashape_workflow`, `realityscan_workflow`) take a capture to a textured mesh in one run: frames pulled from video and curated, then alignment, meshing and texturing, from presets tuned per engine.
- **Gaussian Splat workflow** (`gaussian_splat_workflow`) trains a splat from a COLMAP dataset, and can publish it for Unity (`.spz`) and for the web (`.sog`, with a viewer page).

**Scripts in other applications**

- **[Substance Scripts](https://github.com/m3trik/extapps/blob/main/docs/substance_scripts.md)** and **Marmoset Scripts** (`substance_scripts`, `marmoset_scripts`) run Python scripts in Painter or Toolbag on a mesh file: the bundled ones and your own.
- **[Unity Scripts](https://github.com/m3trik/extapps/blob/main/docs/unity_scripts.md)** (`unity_scripts`) runs C# editor scripts and returns the Console's output to the panel. Opened from Maya or Blender, it can send the current scene, exported by that host's Scene Exporter.

**Preview and delivery**

- **[WebXR Preview](https://github.com/m3trik/extapps/blob/main/docs/webxr_preview.md)** (`webxr_preview`) shows a scene, or an FBX or GLB file, in a browser or an XR headset; a tab left open shows each new push without a reload.
- **[Look Match](https://github.com/m3trik/extapps/blob/main/docs/look_match.md)** (`look_match`) lights a baked scene to match a reference image.
- **Mesh Converter** (`mesh_convert`) converts FBX files to GLB in batches.

## Install and run

```bash
pip install extapps
extapps                             # a browser listing every app
extapps compositor                  # one app (python -m extapps compositor works too)
extapps --shortcut desktop          # a desktop shortcut (start_menu: the Start menu)
```

From a uitk host: `sb.handlers.external_app.launch("compositor")`. Launching, shortcuts and what to check when nothing opens are in the [usage guide](https://github.com/m3trik/extapps/blob/main/docs/README.md).

See also: [changelog](https://github.com/m3trik/extapps/blob/main/CHANGELOG.md) · [tests](https://github.com/m3trik/extapps/tree/main/tests) · [contributing](https://github.com/m3trik/extapps/blob/main/AGENTS.md) · [issues](https://github.com/m3trik/extapps/issues).

## License

LGPL-3.0-or-later — see [COPYING.LESSER](https://github.com/m3trik/extapps/blob/main/COPYING.LESSER) and [COPYING](https://github.com/m3trik/extapps/blob/main/COPYING).
