https://github.com/duckboss/expastack
Extract, Pack, and Stack! [EPS] Extract 3d obj/gltf/dae mesh names into a JSON format with unique ids
https://github.com/duckboss/expastack
Last synced: 8 months ago
JSON representation
Extract, Pack, and Stack! [EPS] Extract 3d obj/gltf/dae mesh names into a JSON format with unique ids
- Host: GitHub
- URL: https://github.com/duckboss/expastack
- Owner: DuckBoss
- License: mit
- Created: 2019-07-15T06:53:43.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-30T20:42:26.000Z (almost 7 years ago)
- Last Synced: 2025-04-07T21:38:37.506Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 134 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExPaStack [EPS]
Extract, Pack, and Stack! Extract 3d obj/gltf/dae mesh names into a JSON format with unique ids.
[](https://github.com/DuckBoss/ExPaStack/blob/master/LICENSE)
[](https://github.com/DuckBoss/ExPaStack/releases)
## Usage
Basic Usage:
```
python3 expastack assets/cube.obj
```
Command-line parameters usage:
```
python3 expastack assets/cube.gltf --keywords "Cube1, Cube2" --filter-type "exclude"
```
## Command Line Parameters
```
--keywords "..."
--filter-type "include/exclude"
```
#### Keywords Parameter
```
--keywords "mesh_1, mesh_2" : Mesh names to filter in the output json
```
#### Filter Type Parameter
```
--filter-type "include/exclude" : Either filters out the keyword mesh names from the json output(exclude)
or it only includes the keyword mesh names in the json output.
```
## Configuration Python File
If you have many keywords to filter, then consider using the config.py file provided
in the root directory.
This will help avoid long command line parameters.
## Example Output
Generates a json file in the root directory.
```
Input: python3 expastack cube.obj
Output: cube.json
{
"Cube"
{
"name" = "Cube",
"uid" = "aisodjiasd092941298401928jf"
}
}
```
```
Input: python3 expastack complex_object.obj --filter-type "include" --keywords "mesh1, mesh2"
Output: complex_object.json
{
"mesh1" { "name"= "mesh1", "uid" = }
"mesh2" { "name"= "mesh2", "uid" = }
(includes only mesh names in the filtered keywords)
}
```
```
Input: python3 expastack complex_object.obj --filter-type "exclude" --keywords "mesh1, mesh2"
Output: complex_object.json
{
... { "name" = , "uid" = }
...
...
... (includes all mesh names except filtered keywords)
}
```