-
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.
- Loading branch information
Showing
13 changed files
with
1,220 additions
and
26 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
*.dist-info | ||
*.pyd | ||
*.py[id] | ||
build/** | ||
tmp/* | ||
*.pyc | ||
*.pyc |
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,17 @@ | ||
"""Generate stubs for cmdc | ||
For the script to run it needs the following: | ||
1. `pybind11-stubgen` has been installed in mayapy. | ||
`mayapy -m pip install pybind11-stubgen` | ||
2. All the generated Types and functions to be declared | ||
before any of them are implemented. Or at least before being used as type arguments | ||
3. cmdc to be in the PYTHONPATH | ||
""" | ||
import pybind11_stubgen | ||
|
||
module = pybind11_stubgen.ModuleStubsGenerator("cmdc") | ||
|
||
module.parse() # this throws a bunch of warning and then freezes after some point. | ||
|
||
with open("build/cmdc.pyi", "w") as handle: | ||
handle.write("\n".join(module.to_lines())) |
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,23 @@ | ||
py::class_<MAngle> Angle(m, "Angle"); | ||
py::class_<MDAGDrawOverrideInfo> DAGDrawOverrideInfo(m, "DAGDrawOverrideInfo"); | ||
py::class_<MDagPath> DagPath(m, "DagPath"); | ||
py::class_<MDataBlock> DataBlock(m, "DataBlock"); | ||
py::class_<MDataHandle> DataHandle(m, "DataHandle"); | ||
py::class_<MDistance> Distance(m, "Distance"); | ||
py::class_<MFn> Fn(m, "Fn"); | ||
py::class_<MFnDependencyNode> FnDependencyNode(m, "FnDependencyNode"); | ||
py::class_<MMatrix> Matrix(m, "Matrix"); | ||
py::class_<MObject> Object(m, "Object"); | ||
py::class_<MObjectHandle> ObjectHandle(m, "ObjectHandle"); | ||
py::class_<MPlug> plug(m, "Plug"); | ||
py::class_<MPoint> Point(m, "Point"); | ||
py::class_<MPxData> PxData(m, "PxData"); | ||
py::class_<MQuaternion> Quaternion(m, "Quaternion"); | ||
py::class_<MSelectionList> SelectionList(m, "SelectionList"); | ||
py::class_<MStatus> Status(m, "Status"); | ||
py::class_<MString> String(m, "String"); | ||
py::class_<MTime> Time(m, "Time"); | ||
py::class_<MTypeId> TypeId(m, "TypeId"); | ||
py::class_<MVector> Vector(m, "Vector"); | ||
py::enum_<MFn::Type> fn_type(Fn, "Type"); | ||
py::class_<MUuid> Uuid(m, "Uuid"); |
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,4 +1,4 @@ | ||
py::class_<MDagPath>(m, "DagPath") | ||
DagPath | ||
.def(py::init<>()) | ||
|
||
.def(py::self == MDagPath()) | ||
|
Oops, something went wrong.