Skip to content

Commit

Permalink
improve stubs for FnDagNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Muream committed Jun 9, 2021
1 parent 931f8c6 commit 3a3ea23
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/MFnDagNode.inl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ FnDagNode
}

return std::unique_ptr<MFnDagNode>(new MFnDagNode(object));
}))
}), py::arg("object"))

.def(py::init([](MDagPath& dagPath) {
MStatus status;
Expand All @@ -111,7 +111,7 @@ FnDagNode
}

return std::unique_ptr<MFnDagNode>(new MFnDagNode(dagPath));
}))
}), py::arg("dagPath"))

.def("__repr__", [](const MObject &a) {
return "<cmdc.FnDagNode()>";
Expand Down Expand Up @@ -163,7 +163,8 @@ FnDagNode

.def("child", [](MFnDagNode& self, unsigned int i) -> MObject {
return self.child(i);
}, _doc_child)
}, py::arg("child"),
_doc_child)

.def("childCount", [](MFnDagNode& self) -> int {
return self.childCount();
Expand Down Expand Up @@ -240,7 +241,9 @@ FnDagNode



}, _doc_getConnectedSetsAndMembers)
}, py::arg("instanceNumber"),
py::arg("renderableSetsOnly"),
_doc_getConnectedSetsAndMembers)

.def("getPath", [](MFnDagNode& self) -> MDagPath {
MDagPath path;
Expand Down Expand Up @@ -309,7 +312,8 @@ FnDagNode

.def("parent", [](MFnDagNode& self, unsigned int i) -> MObject {
return self.parent(i);
}, _doc_parent)
}, py::arg("i"),
_doc_parent)

.def("parentCount", [](MFnDagNode& self) -> int {
return self.parentCount();
Expand Down Expand Up @@ -342,7 +346,8 @@ FnDagNode
);
}

}, _doc_removeChild)
}, py::arg("child"),
_doc_removeChild)

.def("removeChildAt", [](MFnDagNode& self, unsigned int index) {
return self.removeChildAt(index);
Expand All @@ -355,7 +360,8 @@ FnDagNode
"Node does not exist or "
"no valid pointer to Node"
);
}, _doc_setObject)
}, py::arg("object"),
_doc_setObject)

.def("setObject", [](MFnDagNode& self, MDagPath path) {
if (!self.setObject(path)) throw std::runtime_error(
Expand Down

0 comments on commit 3a3ea23

Please sign in to comment.