Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JavaScript bindings to 1.38 #1181

Merged
merged 2 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (MATERIALX_BUILD_JS)

if (EMSDK_PATH)
# NOTE: Setting the CMAKE_TOOLCHAIN_FILE needs to happen before calling project()
set(CMAKE_TOOLCHAIN_FILE "${MATERIALX_EMSDK_PATH}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake")
set(CMAKE_TOOLCHAIN_FILE "${EMSDK_PATH}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake")
else()
message("The EMSDK path was not supplied, disabling MATERIALX_BUILD_JS")
set(MATERIALX_BUILD_JS OFF)
Expand Down
37 changes: 21 additions & 16 deletions source/JsMaterialX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,56 @@ set(CORE_DEPS ${OUTPUT_CORE}JsTypes.cpp
${OUTPUT_CORE}JsGeom.cpp
${OUTPUT_CORE}JsVariant.cpp
${OUTPUT_CORE}JsValue.cpp
${OUTPUT_CORE}JsMaterial.cpp
${OUTPUT_CORE}JsRegisteredVectors.cpp
${OUTPUT_CORE}JsTraversal.cpp)

set(FORMAT_DEPS ${OUTPUT_FORMAT}JsXmlIo.cpp)

set(LIB_DEPS ${OUTPUT_LIBS}MaterialXCore/libMaterialXCore.a ${OUTPUT_LIBS}MaterialXFormat/libMaterialXFormat.a)

# Include the source directory
set(JS_FLAGS "-I${SOURCE_FOLDER} ")
set(JS_LINK_FLAGS "-I${SOURCE_FOLDER} ")

# Add all of the required flags for emcc
string(APPEND JS_FLAGS "-s WASM=1 -s DISABLE_EXCEPTION_CATCHING=0 -s MODULARIZE=1 -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0 -s MEMORY_GROWTH_LINEAR_STEP=32MB -s ALLOW_MEMORY_GROWTH=1 ")
string(APPEND JS_LINK_FLAGS "-s WASM=1 -s DISABLE_EXCEPTION_CATCHING=0 -s MODULARIZE=1 -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0 -s MEMORY_GROWTH_LINEAR_STEP=32MB -s ALLOW_MEMORY_GROWTH=1 ")

# Add the post javascript core files
string(APPEND JS_FLAGS "--post-js ${OUTPUT_CORE}JsTypes.js --post-js ${OUTPUT_CORE}JsUnit.js --post-js ${OUTPUT_CORE}JsGeom.js --post-js ${OUTPUT_CORE}JsDefinition.js --post-js ${OUTPUT_CORE}JsDocument.js --post-js ${OUTPUT_CORE}JsElement.js --post-js ${OUTPUT_CORE}JsInterface.js --post-js ${OUTPUT_CORE}JsLook.js --post-js ${OUTPUT_CORE}JsMaterial.js --post-js ${OUTPUT_CORE}JsNode.js --post-js ${OUTPUT_CORE}JsProperty.js --post-js ${OUTPUT_CORE}JsTraversal.js --post-js ${OUTPUT_CORE}JsUtil.js --post-js ${OUTPUT_CORE}JsValue.js --post-js ${OUTPUT_CORE}JsVariant.js ")
string(APPEND JS_LINK_FLAGS "--post-js ${OUTPUT_CORE}JsTypes.js --post-js ${OUTPUT_CORE}JsUnit.js --post-js ${OUTPUT_CORE}JsGeom.js --post-js ${OUTPUT_CORE}JsDefinition.js --post-js ${OUTPUT_CORE}JsDocument.js --post-js ${OUTPUT_CORE}JsElement.js --post-js ${OUTPUT_CORE}JsInterface.js --post-js ${OUTPUT_CORE}JsLook.js --post-js ${OUTPUT_CORE}JsNode.js --post-js ${OUTPUT_CORE}JsProperty.js --post-js ${OUTPUT_CORE}JsTraversal.js --post-js ${OUTPUT_CORE}JsUtil.js --post-js ${OUTPUT_CORE}JsValue.js --post-js ${OUTPUT_CORE}JsVariant.js ")

# Add the post javascript format files
string(APPEND JS_FLAGS "--post-js ${OUTPUT_FORMAT}JsXmlIo.js --post-js ${CMAKE_CURRENT_SOURCE_DIR}/initMaterialX.js ")
string(APPEND JS_LINK_FLAGS "--post-js ${OUTPUT_FORMAT}JsXmlIo.js --post-js ${CMAKE_CURRENT_SOURCE_DIR}/initMaterialX.js ")

if (EXTERNAL_LINK_FLAGS)
string(APPEND JS_FLAGS "${EXTERNAL_LINK_FLAGS} ")
string(APPEND JS_LINK_FLAGS "${EXTERNAL_LINK_FLAGS} ")
endif()

set(JS_COMPILE_FLAGS "")
if (EXTERNAL_COMPILE_FLAGS)
string(APPEND JS_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} ")
endif()


if (CMAKE_BUILD_TYPE MATCHES Debug)
message("JS: Building Debug")
string(APPEND JS_FLAGS "--bind ")
string(APPEND JS_LINK_FLAGS "--bind ")
else()
message("JS: Building Release")
string(APPEND JS_FLAGS "-Os --bind ")
string(APPEND JS_LINK_FLAGS "-flto -Os --bind ")
string(APPEND JS_COMPILE_FLAGS "-flto -Os ")
endif()

add_executable(JsMaterialX MaterialXLib.cpp)
add_executable(JsMaterialX MaterialXLib.cpp
${CORE_DEPS}
${FORMAT_DEPS})

set_target_properties(JsMaterialX
PROPERTIES
OUTPUT_NAME JsMaterialX
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}"
LINK_FLAGS "${JS_FLAGS}"
COMPILE_FLAGS "${JS_COMPILE_FLAGS}"
LINK_FLAGS "${JS_LINK_FLAGS}"
SOVERSION "${MATERIALX_MAJOR_VERSION}")

target_link_libraries(JsMaterialX
PUBLIC ${CORE_DEPS}
PUBLIC ${FORMAT_DEPS}
PUBLIC ${LIB_DEPS}
PUBLIC MaterialXCore
PUBLIC MaterialXFormat
PRIVATE ${CMAKE_DL_LIBS})

# Install the JavaScript output
Expand Down
1 change: 0 additions & 1 deletion source/JsMaterialX/JsMaterialXCore/JsDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ extern "C"
.function("hasNodeGroup", &mx::NodeDef::hasNodeGroup)
.function("getNodeGroup", &mx::NodeDef::getNodeGroup)
.function("getImplementation", &mx::NodeDef::getImplementation)
.function("getInstantiatingShaderRefs", &mx::NodeDef::getInstantiatingShaderRefs)
.function("isVersionCompatible", &mx::NodeDef::isVersionCompatible)
.class_property("CATEGORY", &mx::NodeDef::CATEGORY)
.class_property("NODE_ATTRIBUTE", &mx::NodeDef::NODE_ATTRIBUTE)
Expand Down
4 changes: 2 additions & 2 deletions source/JsMaterialX/JsMaterialXCore/JsDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
addWrapper(function(Module, api) {
/** Setup the NodeDef class */
api.NodeDef = wrapperFactory(Module.NodeDef, {
getImplementation: ['', '']
getImplementation: [api.EMPTY_STRING]
});

/** Setup the Implementation class */
api.Implementation = wrapperFactory(Module.Implementation);

/** Setup the TypeDef class */
api.TypeDef = wrapperFactory(Module.TypeDef, {
addMember: ['']
addMember: [api.EMPTY_STRING]
});

/** Setup the Member class */
Expand Down
6 changes: 1 addition & 5 deletions source/JsMaterialX/JsMaterialXCore/JsDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ extern "C"
.function("getNodeGraphs", &mx::Document::getNodeGraphs)
.function("removeNodeGraph", &mx::Document::removeNodeGraph)
.function("getMatchingPorts", &mx::Document::getMatchingPorts)
.function("addMaterial", &mx::Document::addMaterial)
.function("getMaterial", &mx::Document::getMaterial)
.function("getMaterials", &mx::Document::getMaterials)
.function("removeMaterial", &mx::Document::removeMaterial)
.function("addGeomInfo", &mx::Document::addGeomInfo)
.function("getGeomInfo", &mx::Document::getGeomInfo)
.function("getGeomInfos", &mx::Document::getGeomInfos)
Expand Down Expand Up @@ -67,7 +63,7 @@ extern "C"
const std::string& version1 = version;
const std::string &nodeGroup1 = nodeGroup;
std::string &newGraphName1 = newGraphName;
return self.mx::Document::addNodeDefFromGraph(nodeGraph, nodeDefName1, node1,
return self.addNodeDefFromGraph(nodeGraph, nodeDefName1, node1,
version1, isDefaultVersion, nodeGroup1, newGraphName1);
}))
.function("getNodeDef", &mx::Document::getNodeDef)
Expand Down
25 changes: 12 additions & 13 deletions source/JsMaterialX/JsMaterialXCore/JsDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ addWrapper(function(Module, api) {
api.createDocument = wrapperFunction(Module.createDocument);

api.Document = wrapperFactory(Module.Document, {
addNodeGraph: [''],
addNodeGraph: [api.EMPTY_STRING],
getMatchingPorts: [REQUIRED],
addMaterial: [''],
addGeomInfo: ['', api.UNIVERSAL_GEOM_NAME],
getGeomAttrValue: [REQUIRED, api.UNIVERSAL_GEOM_NAME],
addLook: [''],
addLookGroup: [''],
addCollection: [''],
addGeomInfo: [api.EMPTY_STRING, api.UNIVERSAL_GEOM_NAME],
getGeomPropValue: [REQUIRED, api.UNIVERSAL_GEOM_NAME],
addLook: [api.EMPTY_STRING],
addLookGroup: [api.EMPTY_STRING],
addCollection: [api.EMPTY_STRING],
getMatchingImplementations: [REQUIRED],
addPropertySet: [''],
addVariantSet: [''],
addTypeDef: [''],
addNodeDef: ['', api.DEFAULT_TYPE_STRING, ''],
addPropertySet: [api.EMPTY_STRING],
addVariantSet: [api.EMPTY_STRING],
addTypeDef: [REQUIRED],
addNodeDef: [api.EMPTY_STRING, api.DEFAULT_TYPE_STRING, api.EMPTY_STRING],
getMatchingNodeDefs: [REQUIRED],
addImplementation: [''],
addImplementation: [api.EMPTY_STRING],
getGeomPropValue: [REQUIRED, api.UNIVERSAL_GEOM_NAME],
addNodeDefFromGraph: [REQUIRED, REQUIRED, REQUIRED, REQUIRED, '']
addNodeDefFromGraph: [REQUIRED, REQUIRED, REQUIRED, REQUIRED, REQUIRED, REQUIRED, REQUIRED, '']
});

});
25 changes: 0 additions & 25 deletions source/JsMaterialX/JsMaterialXCore/JsElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ extern "C"
.function("setFilePrefix", &mx::Element::setFilePrefix)
.function("setColorSpace", &mx::Element::setColorSpace)
.function("setGeomPrefix", &mx::Element::setGeomPrefix)
.function("setTarget", &mx::Element::setTarget)
.function("setInheritString", &mx::Element::setInheritString)
.function("setNamespace", &mx::Element::setNamespace)
.function("setVersionString", &mx::Element::setVersionString)
.function("setDefaultVersion", &mx::Element::setDefaultVersion)
.function("setDocString", &mx::Element::setDocString)
.function("addChildOfCategory", &mx::Element::addChildOfCategory)
.function("getActiveFilePrefix", &mx::Element::getActiveFilePrefix)
Expand All @@ -54,24 +51,13 @@ extern "C"
.function("hasFilePrefix", &mx::Element::hasFilePrefix)
.function("hasGeomPrefix", &mx::Element::hasGeomPrefix)
.function("hasColorSpace", &mx::Element::hasColorSpace)
.function("hasTarget", &mx::Element::hasTarget)
.function("hasInheritString", &mx::Element::hasInheritString)
.function("hasNamespace", &mx::Element::hasNamespace)
.function("hasVersionString", &mx::Element::hasVersionString)
.function("getFilePrefix", &mx::Element::getFilePrefix)
.function("getGeomPrefix", &mx::Element::getGeomPrefix)
.function("getColorSpace", &mx::Element::getColorSpace)
.function("getTarget", &mx::Element::getTarget)
.function("getInheritString", &mx::Element::getInheritString)
.function("getNamespace", &mx::Element::getNamespace)
.function("getVersionString", &mx::Element::getVersionString)
.function("getVersionIntegers", ems::optional_override([](mx::Element &self) {
// std::pair throws a unbound type error when envoving the function in javascript
// As a result, the std:pair will be converted into an array.
std::pair<int, int> versionInts = self.mx::Element::getVersionIntegers();
return arrayToVec((int *)&versionInts, 2);
}))
.function("getDefaultVersion", &mx::Element::getDefaultVersion)
.function("getDocString", &mx::Element::getDocString)

.function("getChild", &mx::Element::getChild)
Expand Down Expand Up @@ -122,35 +108,26 @@ extern "C"
.function("createStringResolver", &mx::Element::createStringResolver)
.function("asString", &mx::Element::asString)
.function("__str__", &mx::Element::asString)
BIND_ELEMENT_FUNC_INSTANCE(mx::BindParam)
BIND_ELEMENT_FUNC_INSTANCE(mx::BindInput)
BIND_ELEMENT_FUNC_INSTANCE(mx::BindToken)
BIND_ELEMENT_FUNC_INSTANCE(mx::Collection)
BIND_ELEMENT_FUNC_INSTANCE(mx::Document)
BIND_ELEMENT_FUNC_INSTANCE(mx::GeomInfo)
BIND_ELEMENT_FUNC_INSTANCE(mx::GeomProp)
BIND_ELEMENT_FUNC_INSTANCE(mx::Implementation)
BIND_ELEMENT_FUNC_INSTANCE(mx::Look)
BIND_ELEMENT_FUNC_INSTANCE(mx::Material)
BIND_ELEMENT_FUNC_INSTANCE(mx::MaterialAssign)
BIND_ELEMENT_FUNC_INSTANCE(mx::Node)
BIND_ELEMENT_FUNC_INSTANCE(mx::NodeDef)
BIND_ELEMENT_FUNC_INSTANCE(mx::NodeGraph)
BIND_ELEMENT_FUNC_INSTANCE(mx::Parameter)
BIND_ELEMENT_FUNC_INSTANCE(mx::Property)
BIND_ELEMENT_FUNC_INSTANCE(mx::PropertySet)
BIND_ELEMENT_FUNC_INSTANCE(mx::PropertySetAssign)
BIND_ELEMENT_FUNC_INSTANCE(mx::ShaderRef)
BIND_ELEMENT_FUNC_INSTANCE(mx::Token)
BIND_ELEMENT_FUNC_INSTANCE(mx::TypeDef)
BIND_ELEMENT_FUNC_INSTANCE(mx::Visibility)
.class_property("NAME_ATTRIBUTE", &mx::Element::NAME_ATTRIBUTE)
.class_property("FILE_PREFIX_ATTRIBUTE", &mx::Element::FILE_PREFIX_ATTRIBUTE)
.class_property("GEOM_PREFIX_ATTRIBUTE", &mx::Element::GEOM_PREFIX_ATTRIBUTE)
.class_property("COLOR_SPACE_ATTRIBUTE", &mx::Element::COLOR_SPACE_ATTRIBUTE)
.class_property("TARGET_ATTRIBUTE", &mx::Element::TARGET_ATTRIBUTE)
.class_property("VERSION_ATTRIBUTE", &mx::Element::VERSION_ATTRIBUTE)
.class_property("DEFAULT_VERSION_ATTRIBUTE", &mx::Element::DEFAULT_VERSION_ATTRIBUTE)
.class_property("INHERIT_ATTRIBUTE", &mx::Element::INHERIT_ATTRIBUTE)
.class_property("NAMESPACE_ATTRIBUTE", &mx::Element::NAMESPACE_ATTRIBUTE)
.class_property("DOC_ATTRIBUTE", &mx::Element::DOC_ATTRIBUTE);
Expand Down Expand Up @@ -179,7 +156,6 @@ extern "C"
.function("hasImplementationName", &mx::ValueElement::hasImplementationName)
.function("getImplementationName", &mx::ValueElement::getImplementationName)
.function("getValue", &mx::ValueElement::getValue)
.function("getBoundValue", &mx::ValueElement::getBoundValue)
.function("getDefaultValue", &mx::ValueElement::getDefaultValue)
.function("setUnit", &mx::ValueElement::setUnit)
.function("hasUnit", &mx::ValueElement::hasUnit)
Expand Down Expand Up @@ -208,7 +184,6 @@ extern "C"
BIND_VALUE_ELEMENT_FUNC_INSTANCE(integer, int)
BIND_VALUE_ELEMENT_FUNC_INSTANCE(boolean, bool)
BIND_VALUE_ELEMENT_FUNC_INSTANCE(float, float)
BIND_VALUE_ELEMENT_FUNC_INSTANCE(color2, mx::Color2)
BIND_VALUE_ELEMENT_FUNC_INSTANCE(color3, mx::Color3)
BIND_VALUE_ELEMENT_FUNC_INSTANCE(color4, mx::Color4)
BIND_VALUE_ELEMENT_FUNC_INSTANCE(vector2, mx::Vector2)
Expand Down
17 changes: 9 additions & 8 deletions source/JsMaterialX/JsMaterialXCore/JsElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ addWrapper(function (Module, api) {
/** Setup the Element class */
api.Element = wrapperFactory(Module.Element, {
getNamePath: [null],
addChildOfCategory: [REQUIRED, '', true],
copyContentFrom: [REQUIRED, null],
getUpstreamEdge: [null, 0],
getUpstreamElement: [null, 0],
addChildOfCategory: [REQUIRED, api.EMPTY_STRING],
copyContentFrom: [REQUIRED],
getUpstreamEdge: [0],
getUpstreamElement: [0],
validate: [''],
createStringResolver: ['', null, '', ''],
traverseGraph: [null],
createStringResolver: [api.EMPTY_STRING],
traverseGraph: [],
});

/** Setup the TypedElement class */
Expand All @@ -20,7 +20,6 @@ addWrapper(function (Module, api) {
'setValueinteger',
'setValueboolean',
'setValuefloat',
'setValuecolor2',
'setValuecolor3',
'setValuecolor4',
'setValuevector2',
Expand All @@ -41,7 +40,7 @@ addWrapper(function (Module, api) {

for (var i = 0; i < funcs.length; i++) {
var name = funcs[parseInt(i, 10)];
defaultArgs[String(name)] = [REQUIRED, ''];
defaultArgs[String(name)] = [REQUIRED, api.EMPTY_STRING];
}

/** Setup the ValueElement class */
Expand All @@ -52,4 +51,6 @@ addWrapper(function (Module, api) {

/** Setup the StringResolver class */
api.StringResolver = wrapperFactory(Module.StringResolver);

api.prettyPrint = Module.prettyPrint;
});
1 change: 0 additions & 1 deletion source/JsMaterialX/JsMaterialXCore/JsGeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ extern "C"
BIND_GEOMINFO_FUNC_INSTANCE(integer, int)
BIND_GEOMINFO_FUNC_INSTANCE(boolean, bool)
BIND_GEOMINFO_FUNC_INSTANCE(float, float)
BIND_GEOMINFO_FUNC_INSTANCE(color2, mx::Color2)
BIND_GEOMINFO_FUNC_INSTANCE(color3, mx::Color3)
BIND_GEOMINFO_FUNC_INSTANCE(color4, mx::Color4)
BIND_GEOMINFO_FUNC_INSTANCE(vector2, mx::Vector2)
Expand Down
27 changes: 24 additions & 3 deletions source/JsMaterialX/JsMaterialXCore/JsInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ extern "C"
.function("setChannels", &mx::PortElement::setChannels)
.function("getChannels", &mx::PortElement::getChannels)
.function("setConnectedNode", &mx::PortElement::setConnectedNode)
.function("getConnectedNode", &mx::PortElement::getConnectedNode);
.function("getConnectedNode", &mx::PortElement::getConnectedNode)
.function("hasOutputString", &mx::PortElement::hasOutputString)
.function("getOutputString", &mx::PortElement::getOutputString);

ems::class_<mx::Input, ems::base<mx::PortElement>>("Input")
.smart_ptr_constructor("Input", &std::make_shared<mx::Input, mx::ElementPtr, const std::string &>)
Expand All @@ -33,6 +35,7 @@ extern "C"
.function("hasDefaultGeomPropString", &mx::Input::hasDefaultGeomPropString)
.function("getDefaultGeomPropString", &mx::Input::getDefaultGeomPropString)
.function("getDefaultGeomProp", &mx::Input::getDefaultGeomProp)
.function("getConnectedOutput", &mx::Input::getConnectedOutput)
.class_property("CATEGORY", &mx::Input::CATEGORY);

ems::class_<mx::Output, ems::base<mx::PortElement>>("Output")
Expand Down Expand Up @@ -75,14 +78,29 @@ extern "C"
.function("getActiveValueElements", &mx::InterfaceElement::getActiveValueElements)
.function("getInputValue", &mx::InterfaceElement::getInputValue)

.function("setTarget", &mx::InterfaceElement::setTarget)
.function("getTarget", &mx::InterfaceElement::getTarget)
.function("hasTarget", &mx::InterfaceElement::hasTarget)

.function("setVersionString", &mx::InterfaceElement::setVersionString)
.function("getVersionString", &mx::InterfaceElement::getVersionString)
.function("hasVersionString", &mx::InterfaceElement::hasVersionString)
.function("setDefaultVersion", &mx::InterfaceElement::setDefaultVersion)
.function("getDefaultVersion", &mx::InterfaceElement::getDefaultVersion)
.function("getVersionIntegers", ems::optional_override([](mx::InterfaceElement &self) {
// std::pair throws a unbound type error when invoking the function in javascript
// As a result, the std:pair will be converted into an array.
std::pair<int, int> versionInts = self.getVersionIntegers();
return arrayToVec((int *)&versionInts, 2);
}))

.function("setTokenValue", &mx::InterfaceElement::setTokenValue)
.function("getTokenValue", &mx::InterfaceElement::getTokenValue)
.function("getDeclaration", &mx::InterfaceElement::getDeclaration)
.function("isTypeCompatible", &mx::InterfaceElement::isTypeCompatible)
BIND_INTERFACE_TYPE_INSTANCE(integer, int)
BIND_INTERFACE_TYPE_INSTANCE(boolean, bool)
BIND_INTERFACE_TYPE_INSTANCE(float, float)
BIND_INTERFACE_TYPE_INSTANCE(color2, mx::Color2)
BIND_INTERFACE_TYPE_INSTANCE(color3, mx::Color3)
BIND_INTERFACE_TYPE_INSTANCE(color4, mx::Color4)
BIND_INTERFACE_TYPE_INSTANCE(vector2, mx::Vector2)
Expand All @@ -96,6 +114,9 @@ extern "C"
BIND_INTERFACE_TYPE_INSTANCE(floatarray, mx::FloatVec)
BIND_INTERFACE_TYPE_INSTANCE(stringarray, mx::StringVec)

.class_property("NODE_DEF_ATTRIBUTE", &mx::InterfaceElement::NODE_DEF_ATTRIBUTE);
.class_property("NODE_DEF_ATTRIBUTE", &mx::InterfaceElement::NODE_DEF_ATTRIBUTE)
.class_property("TARGET_ATTRIBUTE", &mx::InterfaceElement::TARGET_ATTRIBUTE)
.class_property("VERSION_ATTRIBUTE", &mx::InterfaceElement::VERSION_ATTRIBUTE)
.class_property("DEFAULT_VERSION_ATTRIBUTE", &mx::InterfaceElement::DEFAULT_VERSION_ATTRIBUTE);
}
}
Loading