diff options
-rw-r--r-- | python/gras/GRAS_PyHierBlocks.i | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/gras/GRAS_PyHierBlocks.i b/python/gras/GRAS_PyHierBlocks.i index 9f01397..8251336 100644 --- a/python/gras/GRAS_PyHierBlocks.i +++ b/python/gras/GRAS_PyHierBlocks.i @@ -139,6 +139,14 @@ struct HierBlockPython : HierBlock def to_element(obj): try: + + #BEGIN basic block support: + if not hasattr(obj, 'to_element') and hasattr(obj, 'to_basic_block'): + elem = obj.to_basic_block().to_element() + set_weak_py_self(elem, obj) + return elem + #END basic block support. + elem = obj.to_element() set_weak_py_self(elem, obj) return elem |