mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
Add explicit backend between standalone and pyside
This commit is contained in:
parent
aacdf32915
commit
931ad23f50
3 changed files with 20 additions and 2 deletions
|
@ -0,0 +1,12 @@
|
||||||
|
from enum import Enum # available by default in python3. For python2: "pip install enum34"
|
||||||
|
|
||||||
|
class Backend(Enum):
|
||||||
|
STANDALONE = 1
|
||||||
|
PYSIDE = 2
|
||||||
|
|
||||||
|
backend = Backend.STANDALONE
|
||||||
|
|
||||||
|
def useUI():
|
||||||
|
global backend
|
||||||
|
backend = Backend.PYSIDE
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
|
import meshroom
|
||||||
|
|
||||||
Model = None
|
Model = None
|
||||||
Slot = None
|
Slot = None
|
||||||
Signal = None
|
Signal = None
|
||||||
Property = None
|
Property = None
|
||||||
BaseObject = None
|
BaseObject = None
|
||||||
|
|
||||||
if 1: # TODO: switch types according to something
|
if meshroom.backend == meshroom.Backend.PYSIDE:
|
||||||
# PySide types
|
# PySide types
|
||||||
from .qt import Model, Slot, Signal, Property, BaseObject
|
from .qt import Model, Slot, Signal, Property, BaseObject
|
||||||
else:
|
elif meshroom.backend == meshroom.Backend.STANDALONE:
|
||||||
# Core types
|
# Core types
|
||||||
from .core import Model, Slot, Signal, Property, BaseObject
|
from .core import Model, Slot, Signal, Property, BaseObject
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
import meshroom
|
||||||
|
meshroom.useUI()
|
||||||
|
|
||||||
|
__version__ = '0.1.0'
|
Loading…
Add table
Add a link
Reference in a new issue