mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-03 03:11:56 +02:00
[nodes] Add nodes MeshDenoising and MeshDecimate
This commit is contained in:
parent
c5d6b9b9e9
commit
36ed1a5236
2 changed files with 151 additions and 0 deletions
67
meshroom/nodes/aliceVision/MeshDecimate.py
Normal file
67
meshroom/nodes/aliceVision/MeshDecimate.py
Normal file
|
@ -0,0 +1,67 @@
|
|||
from meshroom.core import desc
|
||||
|
||||
class MeshDecimate(desc.CommandLineNode):
|
||||
internalFolder = '{cache}/{nodeType}/{uid0}/'
|
||||
commandLine = 'aliceVision_meshDecimate {allParams}'
|
||||
|
||||
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='simplificationFactor',
|
||||
label='Simplification factor',
|
||||
description='Simplification factor',
|
||||
value=0.5,
|
||||
range=(0.0, 1.0, 0.01),
|
||||
uid=[0],
|
||||
),
|
||||
desc.IntParam(
|
||||
name='nbVertices',
|
||||
label='Fixed Number of Vertices',
|
||||
description='Fixed number of output vertices.',
|
||||
value=0,
|
||||
range=(0, 1000000, 1),
|
||||
uid=[0],
|
||||
),
|
||||
desc.IntParam(
|
||||
name='minVertices',
|
||||
label='Min Vertices',
|
||||
description='Min number of output vertices.',
|
||||
value=0,
|
||||
range=(0, 1000000, 1),
|
||||
uid=[0],
|
||||
),
|
||||
desc.IntParam(
|
||||
name='maxVertices',
|
||||
label='Max Vertices',
|
||||
description='Max number of output vertices.',
|
||||
value=0,
|
||||
range=(0, 1000000, 1),
|
||||
uid=[0],
|
||||
),
|
||||
desc.BoolParam(
|
||||
name='flipNormals',
|
||||
label='Flip Normals',
|
||||
description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''',
|
||||
value=False,
|
||||
uid=[0],
|
||||
),
|
||||
]
|
||||
|
||||
outputs = [
|
||||
desc.File(
|
||||
name="output",
|
||||
label="Output mesh",
|
||||
description="Output mesh (OBJ file format).",
|
||||
value='{cache}/{nodeType}/{uid0}/mesh.obj',
|
||||
uid=[],
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue