You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike PyMEL and cmds, `cmdx` is designed to be distributed alongside your tool. That means multiple copies of `cmdx` can coincide within the same Maya/Python session. But because the way [Undo/Redo](#undo) is handled, the `cmdx.py` module is also loaded as a Maya command plug-in.
74
+
75
+
You can either ignore this, things to look out for is errors during undo coming from another tool or global module directory, even though the command came from your tool. Alternatively, you can follow this recommendation.
76
+
77
+
```bash
78
+
mytool/
79
+
vendor/
80
+
__init__.py
81
+
cmdx_mytool.py
82
+
```
83
+
84
+
From here, you can either `from .vendor import cmdx_mytool as cmdx` or you can put the following into the `__init__.py` of the `vendor/` package.
85
+
86
+
```py
87
+
from . import cmdx_mytool as cmdx
88
+
```
89
+
90
+
This would then allow your users to call..
91
+
92
+
```py
93
+
from mytool.vendor import cmdx
94
+
```
95
+
96
+
..as though the module was called just `cmdx.py`.
97
+
98
+
<br>
99
+
69
100
### What is novel?
70
101
71
102
With [so many options](#comparison) for interacting with Maya, when or why should you choose `cmdx`?
@@ -1093,6 +1124,20 @@ v = Vector(1, 2, 3)
1093
1124
assertisinstance(q * v, Vector)
1094
1125
```
1095
1126
1127
+
##### Conversions
1128
+
1129
+
Python's `math` library provides a few convenience functions for converting `math.degrees` to `math.radians`. `cmdx` extends this with `cmdx.time` and `cmdx.frame`.
0 commit comments