Difference between revisions of "Maya Mel"
Jump to navigation
Jump to search
(→Maxwell particles sequence - Force ABC file) |
|||
| Line 14: | Line 14: | ||
</pre> | </pre> | ||
| − | === Maxwell | + | === Maxwell Render - Particles sequence - Force .abc file === |
<pre> | <pre> | ||
//This expression force Maya to reload an Alembic particles file at each frame - there is no other way in Maxwell Render to read a particles sequence in .abc | //This expression force Maya to reload an Alembic particles file at each frame - there is no other way in Maxwell Render to read a particles sequence in .abc | ||
| Line 23: | Line 23: | ||
{ | { | ||
setAttr -type "string" maxwellRFRKParticles1.file ("/YOUR_PATH/YOUR_FILE" + $current_frame + ".abc"); | setAttr -type "string" maxwellRFRKParticles1.file ("/YOUR_PATH/YOUR_FILE" + $current_frame + ".abc"); | ||
| + | } | ||
| + | |||
| + | </pre> | ||
| + | |||
| + | === Maxwell Render - Specify object ID color === | ||
| + | <pre> | ||
| + | // Specify object ID color | ||
| + | |||
| + | for ( $object in `ls -sl -l` ) { | ||
| + | print($object+"\n"); | ||
| + | setAttr ($object + ".mxSpecifyObjIdColor") (1); | ||
| + | setAttr ($object + ".mxObjIdColor") -type "double3" 1 0 0; | ||
} | } | ||
</pre> | </pre> | ||
Revision as of 23:37, 7 June 2019
Contents
My mels
Octane Render Baking group id - Assign id to multiple objects shapes
// 0 is for Red, 2 for Green, 4 for Blue
// 3, 5 and 6 for Cyan, Magenta and Yellow
// Replace the number "0" by the number of your choice
// Baking group id is also avalaible in Attribute Spreadsheet Editor
for ( $object in `ls -sl -l` ) {
print($object+"\n");
setAttr ($object + ".octBakGrId") (0);
}
Maxwell Render - Particles sequence - Force .abc file
//This expression force Maya to reload an Alembic particles file at each frame - there is no other way in Maxwell Render to read a particles sequence in .abc
global int $current_frame;
$current_frame = `currentTime -query`;
print $current_frame;
{
setAttr -type "string" maxwellRFRKParticles1.file ("/YOUR_PATH/YOUR_FILE" + $current_frame + ".abc");
}
Maxwell Render - Specify object ID color
// Specify object ID color
for ( $object in `ls -sl -l` ) {
print($object+"\n");
setAttr ($object + ".mxSpecifyObjIdColor") (1);
setAttr ($object + ".mxObjIdColor") -type "double3" 1 0 0;
}