mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 02:08:25 +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
|
||||
Slot = None
|
||||
Signal = None
|
||||
Property = None
|
||||
BaseObject = None
|
||||
|
||||
if 1: # TODO: switch types according to something
|
||||
if meshroom.backend == meshroom.Backend.PYSIDE:
|
||||
# PySide types
|
||||
from .qt import Model, Slot, Signal, Property, BaseObject
|
||||
else:
|
||||
elif meshroom.backend == meshroom.Backend.STANDALONE:
|
||||
# Core types
|
||||
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