-
Notifications
You must be signed in to change notification settings - Fork 23
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
Full JS bindings for MaterialX Core #1203
Full JS bindings for MaterialX Core #1203
Conversation
- Substitute some instances of optional_override by select_overload - Use ems::Constants for exposing Constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good already. I think we should streamline some things in a clean-up pass, like consistent typedefs, macro interfaces (including documented usage, e.g. with respect to closing semicolons), and indentation.
How did you organize the bindings so far, regarding their order? Are they defined in the same order as in the C++ headers? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have the bindings for stuff in material.h
Yes, we try to have the same order in cpp and js binding to make it easier to compare both |
…incorrect use of BIND_MEMBER_FUNC_RAW_PTR, remove newlines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
The nitpick comments I've left for merge time.
@@ -1,13 +1,16 @@ | |||
|
|||
#include "../vectorHelper.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: To prep for merging we should stick with an CamelCase.h naming convention for file names for both of these.
#include <MaterialXCore/Geom.h> | ||
|
||
#include <emscripten.h> | ||
#include <emscripten/bind.h> | ||
|
||
namespace ems = emscripten; | ||
namespace mx = MaterialX; | ||
|
||
#define BIND_GEOMINFO_FUNC_INSTANCE(NAME, T) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a note. "#define" aren't really used for the library and "using" is used instead. I'm not sure if it applies to hear bit a merge head-up.
This PR completes the set of bindings for the MaterialXCore package. Additional tests will follow.
Update: #1184