{"id":62,"date":"2013-05-11T11:50:59","date_gmt":"2013-05-11T01:50:59","guid":{"rendered":"http:\/\/alrichardson.com\/?p=62"},"modified":"2013-08-05T19:45:21","modified_gmt":"2013-08-05T09:45:21","slug":"naming-and-renaming","status":"publish","type":"post","link":"https:\/\/alrichardson.com\/?p=62","title":{"rendered":"Naming and renaming"},"content":{"rendered":"<p>During the last job I was on, we were receiving rigs from another company.<br \/>\nThese rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves.<br \/>\nWe would receive them with naming conventions along the lines of &#8216;*_Ctrl_01&#8217;, &#8216;*_Ctrl_02&#8217; and so on.<br \/>\nRenaming every control in the rig is neigh on impossible, so I wrote a script to do so!<br \/>\nThe script I wrote was smashed together with no time for optimization but now with a little time on my hands I have rewritten it to be user friendly and fast.<br \/>\nHere it is, have a look!<\/p>\n<pre class=\"lang:python decode:true  crayon-selected\">import maya.cmds as cmds\r\n\r\nselection = cmds.ls( sl = True)\r\n\r\nfor i in selection:\r\n    shape = cmds.listRelatives( i, shapes = True )\r\n    if shape == None:\r\n        print 'No shape for ' + i + ', aborting.'\r\n    else:\r\n        try:\r\n            a,b = i.split('_Ctrl')\r\n            cmds.rename( i, a + b + '_Ctrl' )\r\n        except:\r\n            print 'No Ctrl in name of ' + i<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3,5,7],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-coding","category-maya","category-python","category-tools"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Alastair\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/alrichardson.com\/?p=62\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Alastair R | Technical Artist \/ Technical Animator \/ Problem Solver \/ Workflow Builder\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Naming and renaming | Alastair R\" \/>\n\t\t<meta property=\"og:description\" content=\"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/alrichardson.com\/?p=62\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2013-05-11T01:50:59+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-08-05T09:45:21+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Naming and renaming | Alastair R\" \/>\n\t\t<meta name=\"twitter:description\" content=\"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#article\",\"name\":\"Naming and renaming | Alastair R\",\"headline\":\"Naming and renaming\",\"author\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/#organization\"},\"datePublished\":\"2013-05-11T11:50:59+10:00\",\"dateModified\":\"2013-08-05T19:45:21+10:00\",\"inLanguage\":\"en\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#webpage\"},\"articleSection\":\"Coding, Maya, Python, Tools\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/alrichardson.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=3#listItem\",\"name\":\"Maya\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=3#listItem\",\"position\":2,\"name\":\"Maya\",\"item\":\"https:\\\/\\\/alrichardson.com\\\/?cat=3\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=5#listItem\",\"name\":\"Python\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=5#listItem\",\"position\":3,\"name\":\"Python\",\"item\":\"https:\\\/\\\/alrichardson.com\\\/?cat=5\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=6#listItem\",\"name\":\"Coding\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=3#listItem\",\"name\":\"Maya\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=6#listItem\",\"position\":4,\"name\":\"Coding\",\"item\":\"https:\\\/\\\/alrichardson.com\\\/?cat=6\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#listItem\",\"name\":\"Naming and renaming\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=5#listItem\",\"name\":\"Python\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#listItem\",\"position\":5,\"name\":\"Naming and renaming\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?cat=6#listItem\",\"name\":\"Coding\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/#organization\",\"name\":\"Alastair R\",\"description\":\"Technical Artist \\\/ Technical Animator \\\/ Problem Solver \\\/ Workflow Builder\",\"url\":\"https:\\\/\\\/alrichardson.com\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?author=2#author\",\"url\":\"https:\\\/\\\/alrichardson.com\\\/?author=2\",\"name\":\"Alastair\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/686377a6142e92739b67c0dce993cfd6876af9d2f22fbd49f75483da7fe629d9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Alastair\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#webpage\",\"url\":\"https:\\\/\\\/alrichardson.com\\\/?p=62\",\"name\":\"Naming and renaming | Alastair R\",\"description\":\"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive\",\"inLanguage\":\"en\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?p=62#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/?author=2#author\"},\"datePublished\":\"2013-05-11T11:50:59+10:00\",\"dateModified\":\"2013-08-05T19:45:21+10:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/alrichardson.com\\\/#website\",\"url\":\"https:\\\/\\\/alrichardson.com\\\/\",\"name\":\"Alastair R\",\"description\":\"Technical Artist \\\/ Technical Animator \\\/ Problem Solver \\\/ Workflow Builder\",\"inLanguage\":\"en\",\"publisher\":{\"@id\":\"https:\\\/\\\/alrichardson.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Naming and renaming | Alastair R","description":"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive","canonical_url":"https:\/\/alrichardson.com\/?p=62","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/alrichardson.com\/?p=62#article","name":"Naming and renaming | Alastair R","headline":"Naming and renaming","author":{"@id":"https:\/\/alrichardson.com\/?author=2#author"},"publisher":{"@id":"https:\/\/alrichardson.com\/#organization"},"datePublished":"2013-05-11T11:50:59+10:00","dateModified":"2013-08-05T19:45:21+10:00","inLanguage":"en","mainEntityOfPage":{"@id":"https:\/\/alrichardson.com\/?p=62#webpage"},"isPartOf":{"@id":"https:\/\/alrichardson.com\/?p=62#webpage"},"articleSection":"Coding, Maya, Python, Tools"},{"@type":"BreadcrumbList","@id":"https:\/\/alrichardson.com\/?p=62#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/alrichardson.com#listItem","position":1,"name":"Home","item":"https:\/\/alrichardson.com","nextItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=3#listItem","name":"Maya"}},{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=3#listItem","position":2,"name":"Maya","item":"https:\/\/alrichardson.com\/?cat=3","nextItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=5#listItem","name":"Python"},"previousItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=5#listItem","position":3,"name":"Python","item":"https:\/\/alrichardson.com\/?cat=5","nextItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=6#listItem","name":"Coding"},"previousItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=3#listItem","name":"Maya"}},{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=6#listItem","position":4,"name":"Coding","item":"https:\/\/alrichardson.com\/?cat=6","nextItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?p=62#listItem","name":"Naming and renaming"},"previousItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=5#listItem","name":"Python"}},{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?p=62#listItem","position":5,"name":"Naming and renaming","previousItem":{"@type":"ListItem","@id":"https:\/\/alrichardson.com\/?cat=6#listItem","name":"Coding"}}]},{"@type":"Organization","@id":"https:\/\/alrichardson.com\/#organization","name":"Alastair R","description":"Technical Artist \/ Technical Animator \/ Problem Solver \/ Workflow Builder","url":"https:\/\/alrichardson.com\/"},{"@type":"Person","@id":"https:\/\/alrichardson.com\/?author=2#author","url":"https:\/\/alrichardson.com\/?author=2","name":"Alastair","image":{"@type":"ImageObject","@id":"https:\/\/alrichardson.com\/?p=62#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/686377a6142e92739b67c0dce993cfd6876af9d2f22fbd49f75483da7fe629d9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Alastair"}},{"@type":"WebPage","@id":"https:\/\/alrichardson.com\/?p=62#webpage","url":"https:\/\/alrichardson.com\/?p=62","name":"Naming and renaming | Alastair R","description":"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive","inLanguage":"en","isPartOf":{"@id":"https:\/\/alrichardson.com\/#website"},"breadcrumb":{"@id":"https:\/\/alrichardson.com\/?p=62#breadcrumblist"},"author":{"@id":"https:\/\/alrichardson.com\/?author=2#author"},"creator":{"@id":"https:\/\/alrichardson.com\/?author=2#author"},"datePublished":"2013-05-11T11:50:59+10:00","dateModified":"2013-08-05T19:45:21+10:00"},{"@type":"WebSite","@id":"https:\/\/alrichardson.com\/#website","url":"https:\/\/alrichardson.com\/","name":"Alastair R","description":"Technical Artist \/ Technical Animator \/ Problem Solver \/ Workflow Builder","inLanguage":"en","publisher":{"@id":"https:\/\/alrichardson.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"Alastair R | Technical Artist \/ Technical Animator \/ Problem Solver \/ Workflow Builder","og:type":"article","og:title":"Naming and renaming | Alastair R","og:description":"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive","og:url":"https:\/\/alrichardson.com\/?p=62","article:published_time":"2013-05-11T01:50:59+00:00","article:modified_time":"2013-08-05T09:45:21+00:00","twitter:card":"summary","twitter:title":"Naming and renaming | Alastair R","twitter:description":"During the last job I was on, we were receiving rigs from another company. These rigs did not always match our hierarchy and naming conventions, so, part of my job was to recompile these rigs to match our conventions. One common and potentially time consuming job was the renaming of control curves. We would receive"},"aioseo_meta_data":{"post_id":"62","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 05:24:41","updated":"2025-06-04 06:08:13","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/alrichardson.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/alrichardson.com\/?cat=3\" title=\"Maya\">Maya<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/alrichardson.com\/?cat=5\" title=\"Python\">Python<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/alrichardson.com\/?cat=6\" title=\"Coding\">Coding<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tNaming and renaming\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/alrichardson.com"},{"label":"Maya","link":"https:\/\/alrichardson.com\/?cat=3"},{"label":"Python","link":"https:\/\/alrichardson.com\/?cat=5"},{"label":"Coding","link":"https:\/\/alrichardson.com\/?cat=6"},{"label":"Naming and renaming","link":"https:\/\/alrichardson.com\/?p=62"}],"_links":{"self":[{"href":"https:\/\/alrichardson.com\/index.php?rest_route=\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alrichardson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alrichardson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alrichardson.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alrichardson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=62"}],"version-history":[{"count":3,"href":"https:\/\/alrichardson.com\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":64,"href":"https:\/\/alrichardson.com\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions\/64"}],"wp:attachment":[{"href":"https:\/\/alrichardson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alrichardson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alrichardson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}