-
Notifications
You must be signed in to change notification settings - Fork 7
/
MeshFileConversion
71 lines (56 loc) · 2.42 KB
/
MeshFileConversion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# MeshSmith
# https://github.com/Smithsonian/dpo-meshsmith
# MeshSmith node plugin for Meshroom [draft]
#
# Pre-compiled binaries for MeshSmith can be downloaded from https://github.com/Smithsonian/dpo-meshsmith
# MeshSmith, created by Smithsonian
# Meshroom plugin by natowi (https://github.com/natowi) 11.2019
# Meshroom plugin license: Mozilla Public License Version 2.0
# Plugin folder: meshroom\nodes\aliceVision
# Requires MeshSmith.exe and assimp-vc142-mt.dll in aliceVision\bin
# Requires uncompiled Meshroom and pre-compiled alicevision
# http://assimp.sourceforge.net/main_features_formats.html
# http://assimp.sourceforge.net/main_features_export.html
# -i, --input arg Input file name
# -o, --output arg Output file name
# -f, --format arg Output file format
# -j, --joinvertices Join identical vertices
# -n, --stripnormals Strip normals
# -u, --striptexcoords Strip texture coords
# -z, --swizzle arg Swizzle coordinates
# -s, --scale arg Scale scene by given factor
# --flipuv Flip UV y coordinate
# -a, --diffusemap arg Diffuse map to be included (gltfx/glbx only)
# -b, --occlusionmap arg Occlusion map to be included (gltfx/glbx only)
# -m, --normalmap arg Normal map to be included (gltfx/glbx only)
# -e, --embedmaps Embed maps (gltfx/glbx only)
# -t, --objectspacenormals Use object space normals (gltfx/glbx only)
# -p, --compress Compress mesh data using Draco (gltfx/glbx only)
# -v, --verbose Print log messages to std out
# MeshSmith.exe -i input.obj -o output.ply -f plyb
# MeshSmith.exe -i mesh.obj -a diffuse.jpg -f gltfx
# MeshSmith.exe -i mesh.obj -a diffuse.jpg -b occlusion.jpg -m normals.jpg --compress --embedmaps -f glbx
__version__ = "3.0"
from meshroom.core import desc
class MeshFileConversion(desc.CommandLineNode):
commandLine = 'MeshSmith -i {inputValue} -o {outputValue}'
cpu = desc.Level.NORMAL
ram = desc.Level.NORMAL
inputs = [
desc.File(
name="input",
label='Input Mesh (OBJ file format).',
description='',
value='',
uid=[0],
),
]
outputs = [
desc.File(
name="output",
label="Output mesh",
description="Output mesh (OBJ file format).",
value=desc.Node.internalFolder + 'mesh_fixed.stl',
uid=[],
),
]