-
Notifications
You must be signed in to change notification settings - Fork 8
/
sePushPullConstraintDoc.html
158 lines (158 loc) · 8.82 KB
/
sePushPullConstraintDoc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<html><body>
<h1 id="super">sePushPullConstraint</h1>
<p>This dependency graph node is a tranformation constraint which has one target transform and one constrained transform connected. This node will push or pull the constrained object at a fixed distance from the target object. It will give the effect of a trailer attached to a hitch on a vehicle or something similar. Due to the dynamic nature of calculating the position of the constraint, time is an input to this node with a start frame and start position to activate and reset the position.</p>
<p><b>Note:</b> The start frame is the frame where the constraint will be active and begin to push/pull. To reset the constrained transformed back to the "start position", you must go to a frame BEFORE the start frame. When the current frame is at or past the start frame, the constraint will begin to affect the constrained transform at it's current position. So in general, when playing back the result, begin playing at the frame before the start frame to be sure the constraint is reset.</p>
<p>Included in this plugin is a mel command to automatically setup the connections and attributes for the two objects you want to use. Note: you may have to scrub the timeline to refresh the evaluation of the node once connected. </p>
<p><strong>MEL command:</strong></p>
<p>sePushPullConstraint [flags] [target] [constrained] </p>
<p>If the target and constrained objects are not provided then the current selection is used.</p>
<table width="100%" border="0">
<tr>
<th bgcolor="#CCCCCC" width="16%">flag</th>
<th bgcolor="#CCCCCC" width="30%">description</th>
<th bgcolor="#CCCCCC" width="13%">type</th>
<th bgcolor="#CCCCCC" width="41%">default</th>
</tr>
<tr>
<th bgcolor="#EEEEEE"><div align="left"><b><code>-name (-n) </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>set name of the constraint node </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>string</code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>sePushPullConstraint#</code></b></div></th>
</tr>
<tr>
<th bgcolor="#EEEEEE"><div align="left"><b><code>-distance (-d) </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>set the distance between the target and the constrained objects </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>double</code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>distance calculated from the current positions from the target and the constrained </code></b></div></th>
</tr>
<tr>
<th bgcolor="#EEEEEE"><div align="left"><b><code>-startFrame (-sf) </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>set start frame constraint </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>double</code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><strong><code>current frame </code></strong></div></th>
</tr>
<tr>
<th bgcolor="#EEEEEE"><div align="left"><b><code>-startPosition (-sf) </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>set the start position of the constrained object </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>double</code></b> <b><code>double</code></b> <b><code>double</code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>the translation on the constrained object </code></b></div></th>
</tr>
<tr>
<th bgcolor="#EEEEEE"><div align="left"><b><code>-skip (-sk) </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>do not constrain a specfic axis. This flag can be used mulitple times and only one axis per flag. Valid axis are: x, y, z </code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>string</code></b></div></th>
<th bgcolor="#EEEEEE"><div align="left"><b><code>all translate axes will be constrained</code></b></div></th>
</tr>
</table>
<p><strong>Examples:</strong></p>
<p>// create a default constraint with the two selected objects. The first being the target, the second being the constrained.<br>
sePushPullConstraint;</p>
<p>// set the distance and start frame with pSphere1 pushing and pulling pCube1<br>
sePushPullConstraint -d 5 -sf 10 pSphere1 pCube1;</p>
<p>// Constrain using selection skip the x and y axes.<br>
sePushPullConstraint -sk x -sk y;</p>
<p>// get help on the command<br>
help sePushPullConstraint
</p>
<h2>Node Attributes (9)</h2>
<table border="0" width="100%">
<tr><th bgcolor="#CCCCCC" width="50%">Long name (short name)</th><th bgcolor="#CCCCCC" width="10%">Type</th><th bgcolor="#CCCCCC" width="20%">Default</th>
</tr>
<tr><td colspan="3"/></tr><tr bgcolor="#EEEEEE">
<td class="attrName" width="50%" valign="top"><b><code>targetWorldMatrix</code></b>
(<b><code>twm</code></b>) </td>
<td class="attrType" width="10%" valign="top">matrix</td>
<td class="attrType" width="20%" valign="top">identity</td>
</tr><tr><td class="attrComment" colspan="3"><table width="100%"><tr><td width="5%"/>
<td>input of the target transform world matrix (what will push or pull the constrained transform) </td>
</tr></table></td></tr>
<tr bgcolor="#EEEEEE">
<td class="attrName" valign="top"><b><code>constraintParentMatrix</code></b> (<b><code>cpm</code></b>) </td>
<td class="attrType" valign="top">matrix</td>
<td class="attrType" valign="top">identity</td>
</tr>
<tr>
<td class="attrComment" colspan="3"><table width="100%">
<tr>
<td width="5%"/>
<td>the parent matrix of the constrained transform</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#EEEEEE">
<td class="attrName" valign="top"><b><code>inTime</code></b> (<b><code>it</code></b>) </td>
<td class="attrType" valign="top">time</td>
<td class="attrType" valign="top">1.0</td>
</tr>
<tr>
<td class="attrComment" colspan="3"><table width="100%">
<tr>
<td width="5%"/>
<td>input time</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#EEEEEE">
<td class="attrName" valign="top"><b><code>distance</code></b> (<b><code>dist</code></b>) </td>
<td class="attrType" valign="top">double</td>
<td class="attrType" valign="top">0.0</td>
</tr>
<tr>
<td class="attrComment" colspan="3"><table width="100%">
<tr>
<td width="5%"/>
<td>the distance between the target and the constrained transforms </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#EEEEEE">
<td class="attrName" valign="top"><b><code>startFrame</code></b> (<b><code>stf</code></b>) </td>
<td class="attrType" valign="top">double</td>
<td class="attrType" valign="top">1.0</td>
</tr>
<tr>
<td class="attrComment" colspan="3"><table width="100%">
<tr>
<td width="5%"/>
<td>the start frame that the constraint is active </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#EEEEEE">
<td class="attrName" valign="top"><b><code>push</code></b> (<b><code>psh</code></b>) </td>
<td class="attrType" valign="top">bool</td>
<td class="attrType" valign="top">on</td>
</tr>
<tr>
<td class="attrComment" colspan="3"><table width="100%">
<tr>
<td width="5%"/>
<td>turn on or off the pushing effect on the constraint </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#EEEEEE">
<td class="attrName" valign="top"><b><code>pull</code></b> (<b><code>pll</code></b>) </td>
<td class="attrType" valign="top">bool</td>
<td class="attrType" valign="top">on</td>
</tr>
<tr>
<td class="attrComment" colspan="3"><table width="100%">
<tr>
<td width="5%"/>
<td>turn on or off the pulling effect on the constraint </td>
</tr>
</table></td>
</tr><tr><td colspan="3"/></tr><tr><td colspan="3"/></tr><tr><td colspan="3"/></tr><tr><td colspan="3"/></tr><tr><td colspan="3"/></tr><tr bgcolor="#EEEEEE"><td class="attrName" width="50%" valign="top"><b><code>constraintTranslate</code></b>
(<b><code>ct</code></b>)
</td><td class="attrType" width="10%" valign="top">double3</td><td class="attrType" width="20%" valign="top">0.0, 0.0, 0.0</td>
</tr>
<tr><td class="attrComment" colspan="3"><table width="100%"><tr><td width="5%"/><td><mayadoc-comment>
output point position
to the constrained transform </mayadoc-comment></td></tr></table></td></tr><tr><td colspan="3"/></tr><tr bgcolor="#EEEEEE">
<td class="attrName" width="50%" valign="top"><strong><code>start</code></strong><code><strong>Position</strong></code>(<b><code>sp</code></b>) </td><td class="attrType" width="10%" valign="top">double3</td><td class="attrType" width="20%" valign="top">0.0, 0.0, 0.0</td>
</tr>
<tr><td class="attrComment" colspan="3"><table width="100%"><tr><td width="5%"/>
<td>the start position of the constrained transform</td>
</tr></table></td></tr></table>
</body></html>