Add the notion of cpu, gpu, ram ressources requirements

This commit is contained in:
Fabien Castan 2017-10-26 14:21:42 +02:00
parent 6c8a2d06a1
commit c38c2d3407
5 changed files with 16 additions and 0 deletions

View file

@ -1,4 +1,5 @@
from meshroom.common import BaseObject, Property, Variant
from enum import Enum # available by default in python3. For python2: "pip install enum34"
class Attribute(BaseObject):
@ -105,10 +106,19 @@ class StringParam(Param):
super(StringParam, self).__init__(label=label, description=description, value=value, uid=uid, group=group)
class Level(Enum):
NONE = 0
NORMAL = 1
INTENSIVE = 2
class Node(object):
"""
"""
internalFolder = '{nodeType}/{uid0}/'
cpu = Level.NORMAL
gpu = Level.NONE
ram = Level.NORMAL
def __init__(self):
pass

View file

@ -3,6 +3,7 @@ from meshroom.core import desc
class DepthMap(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'CMPMVS {mvsConfigValue} --createDepthmap'
gpu = desc.Level.INTENSIVE
mvsConfig = desc.File(
label='MVS Configuration file',

View file

@ -3,6 +3,7 @@ from meshroom.core import desc
class DepthMapFilter(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'CMPMVS {mvsConfigValue} --filterDepthmap'
gpu = desc.Level.NORMAL
mvsConfig = desc.File(
label='MVS Configuration file',

View file

@ -3,6 +3,8 @@ from meshroom.core import desc
class Meshing(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'CMPMVS {mvsConfigValue} --meshing'
cpu = desc.Level.INTENSIVE
ram = desc.Level.INTENSIVE
mvsConfig = desc.File(
label='MVS Configuration file',

View file

@ -3,6 +3,8 @@ from meshroom.core import desc
class Texturing(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'CMPMVS {mvsConfigValue} --texturing'
cpu = desc.Level.INTENSIVE
ram = desc.Level.INTENSIVE
mvsConfig = desc.File(
label='MVS Configuration file',