{"id":150,"date":"2018-09-06T19:30:43","date_gmt":"2018-09-07T00:30:43","guid":{"rendered":"http:\/\/www.yarnot.com\/Zach\/?p=150"},"modified":"2020-01-24T16:40:22","modified_gmt":"2020-01-24T22:40:22","slug":"dv_clonemaster","status":"publish","type":"post","link":"https:\/\/zach.yarnot.com\/index.php\/2018\/09\/06\/dv_clonemaster\/","title":{"rendered":"DV Clone Master Script"},"content":{"rendered":"<p>This script for Maya 2016, Maya 2017, and Maya 2018 will grab objects parented to world or world oriented\/centered nodes.<\/p>\n<p><a href=\"https:\/\/1drv.ms\/u\/s!AsDsVHC0cFOjge4dHnm2xnebjuQWFw\" rel=\"OneDrive File\">Download the script here.<\/a><\/p>\n<p><code>\/*<br \/>\nLimitations<br \/>\nScript can only mirror objects parented to world or world oriented and centered objects<br \/>\nFor more concerns, please email me<br \/>\n*\/<br \/>\n{<br \/>\n\/\/Finds objects and lists them<br \/>\nstring $nodes0[] = `ls -selection`;<br \/>\n\/\/Clones and lists clones of selected objects<br \/>\nduplicate -rr ;<br \/>\nstring $nodes1[] = `ls -selection`;<br \/>\n\/\/Groups and lists group<br \/>\ndoGroup 0 1 1 ;<br \/>\nstring $group[] = `ls -selection`;<br \/>\nfor ($node in $group)<br \/>\n{<br \/>\n\/\/Loop through each object and obtain its node<br \/>\nstring $node[] = `listRelatives $node`;<br \/>\nfloat $dimension = `getAttr ($node[0] + \".scaleX\")` ;<br \/>\n\/\/Set the x-scale attribute of each shape node to its negative counterpart<br \/>\nsetAttr ($node[0] + \".scaleX\") (-1*$dimension) ;<br \/>\n}<br \/>\n\/\/Selects group<br \/>\nselect -r $group ;<br \/>\nFreezeTransformations ;<br \/>\n\/\/Parents objects to world<br \/>\nparent -world $nodes1 ;<br \/>\nselect -cl ;<br \/>\n\/\/Selects and deletes created groups<br \/>\nselect -r $group ;<br \/>\ndelete ;<br \/>\n\/\/Selects and freezes transforms on affected objects<br \/>\nselect -r $nodes0 ;<br \/>\nselect -tgl $nodes1 ;<br \/>\nFreezeTransformations ;<br \/>\n}<br \/>\n\/\/ Script by Zachary Yarnot the DualVission<br \/>\n\/\/ Script for non-commercial and personal use only<br \/>\n\/\/ https:\/\/yarnot.com\/Zach<br \/>\n\/\/ zach@yarnot.com<br \/>\nprint(\" Objects cloned and mirrored. Transforms frozen. ; \") ;<\/code><\/p>\n<p>Update 06\/09\/2018 21:27 US EDT: Fixes typo in release preventing script from functioning with more than one nodes selected.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This script for Maya 2016, Maya 2017, and Maya 2018 will grab objects parented to world or world oriented\/centered nodes. Download the script here. \/* Limitations Script can only mirror objects parented to world or world oriented and centered objects For more concerns, please email me *\/ { \/\/Finds objects and lists them string $nodes0[] &hellip; <a href=\"https:\/\/zach.yarnot.com\/index.php\/2018\/09\/06\/dv_clonemaster\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">DV Clone Master Script<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"link","meta":[],"categories":[25,24],"tags":[],"_links":{"self":[{"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/posts\/150"}],"collection":[{"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/comments?post=150"}],"version-history":[{"count":3,"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/posts\/150\/revisions\/152"}],"wp:attachment":[{"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zach.yarnot.com\/index.php\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}