mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-01 10:21:59 +02:00
[core] Option to make chunks optional
This commit is contained in:
parent
5e5cc7ba80
commit
7f84097c24
3 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue