[core] Option to make chunks optional

This commit is contained in:
Fabien Castan 2020-02-05 11:45:33 +01:00
parent 5e5cc7ba80
commit 7f84097c24
3 changed files with 7 additions and 4 deletions

View file

@ -1,10 +1,11 @@
__version__ = "2019.2.0"
__version_name__ = __version__
from distutils import util
from enum import Enum
import logging
import os
import sys
import logging
from enum import Enum
# sys.frozen is initialized by cx_Freeze and identifies a release package
isFrozen = getattr(sys, "frozen", False)
@ -21,6 +22,8 @@ if not isFrozen:
# Allow override from env variable
__version_name__ = os.environ.get("REZ_MESHROOM_VERSION", __version_name__)
useMultiChunks = util.strtobool(os.environ.get("MESHROOM_USE_MULTI_CHUNKS", "True"))
class Backend(Enum):
STANDALONE = 1

View file

@ -429,7 +429,7 @@ class CommandLineNode(Node):
if not alreadyInEnv:
cmdPrefix = '{rez} {packageFullName} -- '.format(rez=os.environ.get('REZ_ENV'), packageFullName=chunk.node.packageFullName)
cmdSuffix = ''
if chunk.range:
if chunk.node.isParallelized:
cmdSuffix = ' ' + self.commandLineRange.format(**chunk.range.toDict())
return cmdPrefix + chunk.node.nodeDesc.commandLine.format(**chunk.node._cmdVars) + cmdSuffix

View file

@ -592,7 +592,7 @@ class BaseNode(BaseObject):
@property
def isParallelized(self):
return bool(self.nodeDesc.parallelization)
return bool(self.nodeDesc.parallelization) if meshroom.useMultiChunks else False
@property
def nbParallelizationBlocks(self):