Skip to content

Commit

Permalink
readme: add completion and type checking examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Muream committed Jun 14, 2021
1 parent 3b4ccd4 commit 390edd9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ An alternative set of bindings for the C++ API of Maya 2018-2022.
- What if you could address bugs in the bindings yourself?
- What if you could *add* missing members yourself?
- What if there were bindings for Maya that made it impossible to crash Maya from Python?
- What if setting up code completion and type checking was easy?

That's what this repository is for.

Expand Down Expand Up @@ -54,6 +55,14 @@ print(fn.name())
print("Success")
```

Code completion working in Visual Studio Code with Pylance:

https://user-images.githubusercontent.com/3117205/121938610-50b24100-cd4c-11eb-9325-28c35e00f4d7.mp4

Type Checking working in Visual Studio Code with Pylance:

https://user-images.githubusercontent.com/3117205/121938610-50b24100-cd4c-11eb-9325-28c35e00f4d7.mp4

<br>

### Goal
Expand All @@ -67,8 +76,8 @@ print("Success")
- Object attributes are preferred over rather than set/get methods. For example you can now write array.sizeIncrement=64.
- There are more types of exceptions used when methods fail. Not everything is a RuntimeError, as was the case in the old API.
- `cmdc` should be faster or as fast as API 2.0

> [Reference](https://help.autodesk.com/view/MAYAUL/2020/ENU/?guid=__py_ref_index_html)
> [Reference](https://help.autodesk.com/view/MAYAUL/2020/ENU/?guid=__py_ref_index_html)
- `cmdc` comes with fully type annotated stubs, making it easy to set up code completion as well as type checking.

<br>

Expand Down

0 comments on commit 390edd9

Please sign in to comment.