forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PyUtil.cpp
29 lines (24 loc) · 984 Bytes
/
PyUtil.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
// All rights reserved. See LICENSE.txt for license.
//
#include <PyMaterialX/PyMaterialX.h>
#include <MaterialXCore/Node.h>
#include <MaterialXCore/Util.h>
#include <MaterialXFormat/File.h>
namespace py = pybind11;
namespace mx = MaterialX;
void bindPyUtil(py::module& mod)
{
mod.def("getVersionString", &mx::getVersionString);
mod.def("getVersionIntegers", &mx::getVersionIntegers);
mod.def("createValidName", &mx::createValidName, py::arg("name"), py::arg("replaceChar") = '_');
mod.def("isValidName", &mx::isValidName);
mod.def("incrementName", &mx::incrementName);
mod.def("splitString", &mx::splitString);
mod.def("replaceSubstrings", &mx::replaceSubstrings);
mod.def("stringEndsWith", &mx::stringEndsWith);
mod.def("splitNamePath", &mx::splitNamePath);
mod.def("createNamePath", &mx::createNamePath);
mod.def("parentNamePath", &mx::parentNamePath);
}