-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from yantor3d/rporter/MDGModifier
Implement DGModifier
- Loading branch information
Showing
8 changed files
with
1,221 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
build/** | ||
tmp/* | ||
*.pyc | ||
MFn.Types.inl | ||
MFn.Types.inl | ||
devkit.tgz | ||
devkitBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Build locally for Linux on any platform, e.g. Windows | ||
FROM mottosso/maya:2022 | ||
|
||
RUN yum install centos-release-scl -y && \ | ||
yum install devtoolset-7 bc -y | ||
|
||
# Download devkit | ||
ENV DEVKIT_LOCATION=/root/devkitBase | ||
ENV DEVKIT "https://autodesk-adn-transfer.s3.us-west-2.amazonaws.com/ADN%20Extranet/M%26E/Maya/devkit%202022/Autodesk_Maya_2022_DEVKIT_Linux.tgz" | ||
RUN wget $DEVKIT -O "/root/devkit.tgz" && \ | ||
tar -xvf /root/devkit.tgz $pwd | ||
|
||
# Setup Test Environment | ||
RUN mayapy -m pip install --user \ | ||
nose==1.3.7 \ | ||
nose-exclude==0.5.0 \ | ||
coverage==5.5 \ | ||
flaky==3.7.0 \ | ||
six==1.16.0 \ | ||
sphinx==1.8.5 \ | ||
sphinxcontrib-napoleon==0.7 | ||
|
||
# Since 2019, this sucker throws an | ||
# unnecessary warning if not declared. | ||
RUN mkdir -p /var/tmp/runtime-root | ||
ENV XDG_RUNTIME_DIR /var/tmp/runtime-root | ||
ENV MAYA_DISABLE_ADP 1 | ||
|
||
# The local /build directory | ||
ENV PYTHONPATH=/workspace/build | ||
|
||
WORKDIR /workspace | ||
|
||
COPY docker_entrypoint.sh /usr/bin/entrypoint.sh | ||
RUN chmod +x /usr/bin/entrypoint.sh | ||
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace validate { | ||
inline void is_not_null(MObject &o, std::string error_message) { | ||
if (o.isNull()) { | ||
throw std::invalid_argument(error_message.c_str()); | ||
} | ||
} | ||
|
||
inline void has_fn(MObject &o, MFn::Type type, std::string error_message) { | ||
if (!o.hasFn(type)) { | ||
MString msg(error_message.c_str()); | ||
msg.format(msg, o.apiTypeStr()); | ||
|
||
throw pybind11::type_error(msg.asChar()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,36 @@ | ||
from maya import standalone, cmds | ||
|
||
|
||
import cmdc | ||
|
||
|
||
def setup(): | ||
standalone.initialize() | ||
|
||
|
||
|
||
def new_scene(): | ||
cmds.file(new=True, force=True) | ||
|
||
|
||
def teardown(): | ||
standalone.uninitialize() | ||
standalone.uninitialize() | ||
|
||
|
||
def assert_equals(expected, actual, error_message): | ||
if isinstance(expected, float): | ||
assert abs(expected - actual) <= 1e-5, error_message | ||
else: | ||
assert expected == actual, error_message | ||
|
||
|
||
def as_obj(arg): | ||
"""Return the Maya Object for the given node.""" | ||
|
||
return cmdc.SelectionList().add(arg).getDependNode(0) | ||
|
||
|
||
def as_plug(arg): | ||
"""Return the Maya Plug for the given plug.""" | ||
|
||
return cmdc.SelectionList().add(arg).getPlug(0) |
Oops, something went wrong.