Commit 4a7dc165 authored by T.J. Corona's avatar T.J. Corona

adhcommon: updates for pybind11 compatibility

parent a8598fe1
......@@ -16,6 +16,12 @@ import imp
import os
import sys
import smtk
if smtk.wrappingProtocol() == 'pybind11':
import smtk.attribute
import smtk.io
import smtk.mesh
import smtk.model
import smtk.simulation
# so devs don't complain about pyc files in source
sys.dont_write_bytecode = True
......
......@@ -19,7 +19,12 @@ Common functions for all ADH exporters
import os
import smtk
reload(smtk)
if smtk.wrappingProtocol() == 'pybind11':
import smtk.attribute
import smtk.io
import smtk.mesh
import smtk.model
import smtk.simulation
# Mapping from VTK's tet face ordering to ADH's tet face
# ordering. Note that it also includes the c to fortran indexing.
......@@ -934,7 +939,10 @@ def assign_model_entity_ids(model, dimension, property_name='id', first=1):
print 'Unrecognized dimension', dimension
return first
entity_list = model.entitiesMatchingFlags(celltype, True)
if smtk.wrappingProtocol() == 'pybind11':
entity_list = model.entitiesMatchingFlags(int(celltype), True)
else:
entity_list = model.entitiesMatchingFlags(celltype, True)
entity_id = first
for entity in entity_list:
model.setIntegerProperty(entity, property_name, entity_id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment