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
<palign=center>A fast subset of <ahref=http://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/CommandsPython/index.html><code>maya.cmds</code></a><br>For Maya 2017-2022</p>
3
+
<palign=center>A fast subset of <ahref=http://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/CommandsPython/index.html><code>maya.cmds</code></a><br>For Maya 2018-2024</p>
4
4
5
5
<br>
6
6
@@ -23,6 +23,7 @@ On average, `cmdx` is **140x faster** than [PyMEL](https://github.com/LumaPictur
23
23
24
24
| Date | Version | Event
25
25
|:---------|:----------|:----------
26
+
| Dec 2023 | 0.6.3 | Cloning of attributes
26
27
| Apr 2020 | 0.6.0 | Stable Undo/Redo, dropped support for Maya 2015-2016
27
28
| Mar 2020 | 0.5.1 | Support for Maya 2022
28
29
| Mar 2020 | 0.5.0 | Stable release
@@ -528,6 +529,50 @@ The reason for this limitation is because the functions `cmds`
528
529
529
530
<br>
530
531
532
+
### Path-like Syntax
533
+
534
+
Neatly traverse a hierarchy with the `|` syntax.
535
+
536
+
```py
537
+
# Before
538
+
group = cmdx.encode("|some_grp")
539
+
hand = cmdx.encode(group.path() +"|hand_ctl")
540
+
541
+
# After
542
+
hand = group |"hand_ctl"
543
+
```
544
+
545
+
It can be nested too.
546
+
547
+
```py
548
+
finger = group |"hand_ctl"|"finger_ctl"
549
+
```
550
+
551
+
<br>
552
+
553
+
### setAttr
554
+
555
+
Maya's `cmds.setAttr` depends on the UI settings for units.
556
+
557
+
```py
558
+
cmds.setAttr("hand_ctl.translateY", 5)
559
+
```
560
+
561
+
For a user with Maya set to `Centimeters`, this would set `translateY` to 5 centimeters. For any user with any other unit, like `Foot`, it would instead move it 5 feet. That is terrible behaviour for a script, how can you possibly define the length of something if you don't know the unit? A dog is 100 cm tall, not 100 "any unit" tall.
562
+
563
+
The `cmdx.setAttr` on the other hand does what Maya's API does, which is to treat all units consistently.
Maya boasts a library of classes that provide mathematical convenience functionality, such as rotating a vector, multiplying matrices or converting between Euler degrees and Quaternions.
0 commit comments