Skip to content

Instantly share code, notes, and snippets.

@natowi
Last active November 8, 2019 18:43
Show Gist options
  • Save natowi/b42329c8104e88edc4357c9c1bd0a94d to your computer and use it in GitHub Desktop.
Save natowi/b42329c8104e88edc4357c9c1bd0a94d to your computer and use it in GitHub Desktop.
msimplify
__version__ = "3.0"
from meshroom.core import desc
class Meshsimply(desc.CommandLineNode):
commandLine = 'alicevision_msimplify {inputValue} {outputValue} {ratioValue} {agressValue}' ### HERE: change the command line
cpu = desc.Level.NORMAL
ram = desc.Level.NORMAL
inputs = [
desc.File(
name="input",
label='Input Mesh (OBJ file format).',
description='',
value='',
uid=[0],
),
desc.FloatParam(
name='ratio',
label='Ratio for Decimation',
description='A ratio of 0.2 will decimate 80% of triangles',
value=0.5,
range=(0.0, 1.0, 0.01),
uid=[0],
),
desc.FloatParam(
name='agress',
label='Agressiveness',
description='faster or better decimation, more iterations yield higher quality',
value=7.0,
range=(0.0, 100.0, 0.1),
uid=[0],
),
]
outputs = [
desc.File(
name="output",
label="Output mesh",
description="Output mesh (OBJ file format).",
value=desc.Node.internalFolder + 'mesh.obj',
uid=[],
),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment