mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-10 14:51:54 +02:00
fix import paths
This commit is contained in:
parent
f54c765b30
commit
889e0298eb
5 changed files with 9 additions and 10 deletions
2
meshroom/compute.py
Normal file → Executable file
2
meshroom/compute.py
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from meshroom import processGraph as pg
|
from meshroom.processGraph import graph as pg
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Execute a Graph of processes.')
|
parser = argparse.ArgumentParser(description='Execute a Graph of processes.')
|
||||||
parser.add_argument('graphFile', metavar='GRAPHFILE.mg', type=str,
|
parser.add_argument('graphFile', metavar='GRAPHFILE.mg', type=str,
|
||||||
|
|
2
meshroom/newNodeType.py
Normal file → Executable file
2
meshroom/newNodeType.py
Normal file → Executable file
|
@ -63,7 +63,7 @@ if sys.stdin.isatty():
|
||||||
inputCmdLineDoc = ''.join([line for line in sys.stdin])
|
inputCmdLineDoc = ''.join([line for line in sys.stdin])
|
||||||
|
|
||||||
outputNodeStr = '''
|
outputNodeStr = '''
|
||||||
from processGraph import desc
|
from meshroom.processGraph import desc
|
||||||
|
|
||||||
class __COMMANDNAME__(desc.CommandLineNode):
|
class __COMMANDNAME__(desc.CommandLineNode):
|
||||||
internalFolder = '{cache}/{nodeType}/{uid0}/'
|
internalFolder = '{cache}/{nodeType}/{uid0}/'
|
||||||
|
|
|
@ -6,7 +6,6 @@ import tempfile
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
from . import desc
|
from . import desc
|
||||||
from .graph import * # TODO: remove this
|
|
||||||
|
|
||||||
cacheFolder = os.path.join(tempfile.gettempdir(), 'processGraphCache')
|
cacheFolder = os.path.join(tempfile.gettempdir(), 'processGraphCache')
|
||||||
nodesDesc = {}
|
nodesDesc = {}
|
||||||
|
|
|
@ -357,13 +357,13 @@ class Node:
|
||||||
self.saveStatusFile()
|
self.saveStatusFile()
|
||||||
|
|
||||||
def submit(self):
|
def submit(self):
|
||||||
self.upgradeStatusTo(pg.Status.SUBMITTED_EXTERN)
|
self.upgradeStatusTo(Status.SUBMITTED_EXTERN)
|
||||||
|
|
||||||
def beginSequence(self):
|
def beginSequence(self):
|
||||||
self.upgradeStatusTo(pg.Status.SUBMITTED_LOCAL)
|
self.upgradeStatusTo(Status.SUBMITTED_LOCAL)
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
self.upgradeStatusTo(pg.Status.RUNNING)
|
self.upgradeStatusTo(Status.RUNNING)
|
||||||
statThread = StatisticsThread(self)
|
statThread = StatisticsThread(self)
|
||||||
statThread.start()
|
statThread.start()
|
||||||
try:
|
try:
|
||||||
|
@ -377,15 +377,15 @@ class Node:
|
||||||
logContent = ''
|
logContent = ''
|
||||||
with open(self.logFile(), 'r') as logF:
|
with open(self.logFile(), 'r') as logF:
|
||||||
logContent = ''.join(logF.readlines())
|
logContent = ''.join(logF.readlines())
|
||||||
self.upgradeStatusTo(pg.Status.ERROR)
|
self.upgradeStatusTo(Status.ERROR)
|
||||||
raise RuntimeError('Error on node "{}":\nLog:\n{}'.format(self.name, logContent))
|
raise RuntimeError('Error on node "{}":\nLog:\n{}'.format(self.name, logContent))
|
||||||
except:
|
except:
|
||||||
self.upgradeStatusTo(pg.Status.ERROR)
|
self.upgradeStatusTo(Status.ERROR)
|
||||||
raise
|
raise
|
||||||
statThread.running = False
|
statThread.running = False
|
||||||
statThread.join()
|
statThread.join()
|
||||||
|
|
||||||
self.upgradeStatusTo(pg.Status.SUCCESS)
|
self.upgradeStatusTo(Status.SUCCESS)
|
||||||
|
|
||||||
def endSequence(self):
|
def endSequence(self):
|
||||||
pass
|
pass
|
||||||
|
|
2
meshroom/status.py
Normal file → Executable file
2
meshroom/status.py
Normal file → Executable file
|
@ -3,7 +3,7 @@ import argparse
|
||||||
import os
|
import os
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
from meshroom import processGraph as pg
|
from meshroom.processGraph import graph as pg
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Query the status of nodes in a Graph of processes.')
|
parser = argparse.ArgumentParser(description='Query the status of nodes in a Graph of processes.')
|
||||||
parser.add_argument('graphFile', metavar='GRAPHFILE.mg', type=str,
|
parser.add_argument('graphFile', metavar='GRAPHFILE.mg', type=str,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue