mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-30 18:57:53 +02:00
First version of retrocompatibility, allowing to load files referencing removed or type-incompatible attributes. * add node_factory to centralize node instantiation * discard invalid attributes (i.e. not part of the node description anymore or with incompatible value type) when loading a file * raise on unknown nodes * add 'core.exception' module to declare Meshroom's exception types
22 lines
512 B
Python
22 lines
512 B
Python
#!/usr/bin/env python
|
|
# coding:utf-8
|
|
|
|
|
|
class MeshroomException(Exception):
|
|
""" Base class for Meshroom exceptions """
|
|
pass
|
|
|
|
|
|
class GraphException(MeshroomException):
|
|
""" Base class for Graph exceptions """
|
|
pass
|
|
|
|
|
|
class UnknownNodeTypeError(GraphException):
|
|
"""
|
|
Raised when asked to create a unknown node type.
|
|
"""
|
|
def __init__(self, nodeType):
|
|
msg = "Unknown Node Type: " + nodeType
|
|
super(UnknownNodeTypeError, self).__init__(msg)
|
|
self.nodeType = nodeType
|