{"id":518,"date":"2018-04-23T13:09:53","date_gmt":"2018-04-23T17:09:53","guid":{"rendered":"http:\/\/www.vicdebaie.com\/blog\/?p=518"},"modified":"2018-04-23T17:04:31","modified_gmt":"2018-04-23T21:04:31","slug":"motionbuilder-python-fbdelete","status":"publish","type":"post","link":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-fbdelete\/","title":{"rendered":"MotionBuilder Python FBDelete"},"content":{"rendered":"<p><img data-attachment-id=\"522\" data-permalink=\"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-fbdelete\/fbdelete\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/04\/fbdelete.png?fit=420%2C294\" data-orig-size=\"420,294\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/04\/fbdelete.png?fit=300%2C210\" data-large-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/04\/fbdelete.png?fit=420%2C294\" decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-522\" src=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/04\/fbdelete.png?resize=420%2C294\" alt=\"\" width=\"420\" height=\"294\" srcset=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/04\/fbdelete.png?w=420 420w, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/04\/fbdelete.png?resize=300%2C210 300w\" sizes=\"(max-width: 420px) 100vw, 420px\" data-recalc-dims=\"1\" \/><\/p>\n<p>I&#8217;ve been asked a few times now on how to delete objects, files, takes, layers, etc. from MotionBuilder&#8217;s Scenes. I thought I would take a few moments to go through the basics of FBDelete(). All examples below share pretty much the exact same structure with there scripts, we create an empty list, we set up condition and if those condition are met than we add to our list, once done we take that list and we perform FBDelete() on it. This is a great little exercise to get familiar with lists.\u00a0 Each example I have provided will demonstrate performing the script through &#8220;user defined name&#8221;, &#8220;user selected&#8221;, &#8220;all occurrences within scene&#8221; and for some &#8220;by file extension&#8221;.<\/p>\n<p><strong id=\"index\">I created an index as to make it easier for people to jump to sections.<\/strong><\/p>\n<ol>\n<li><a href=\"#folders\">Folders<\/a><\/li>\n<li><a href=\"#layers\">Layers<\/a><\/li>\n<li><a href=\"#cameras\">Cameras<\/a><\/li>\n<li><a href=\"#groups\">Groups<\/a><\/li>\n<li><a href=\"#sets\">Sets<\/a><\/li>\n<li><a href=\"#lights\">Lights<\/a><\/li>\n<li><a href=\"#materials\">Materials<\/a><\/li>\n<li><a href=\"#poses\">Poses<\/a><\/li>\n<li><a href=\"#shaders\">Shaders<\/a><\/li>\n<li><a href=\"#takes\">Takes<\/a><\/li>\n<li><a href=\"#textures\">Textures<\/a><\/li>\n<li><a href=\"#videos\">Videos<\/a><\/li>\n<\/ol>\n<h3 id=\"folders\">FBDelete() Folders<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Folder By Name\r\n================================================================\r\n'''\r\n##Define The Folder We Are Looking For - Change This Variable To Match Your Desired Folder You Wish To Delete\r\nlFolderDel = &quot;Materials Folder&quot;\r\n##Go Through Every Folder Within The Scene\r\nfor item in fb.FBSystem().Scene.Folders:\r\n    ##If The Folder Name Is The Same As The Folder We Are Looking For\r\n    if item.Name == lFolderDel:\r\n        ##Delte Folder\r\n        item.FBDelete()\r\n    ##Skip All Other Folders\r\n    else:\r\n        pass\r\n##Clean Up        \r\ndel lFolderDel\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"layers\">FBDelete() Layers<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Layers By Name, Selected And All Layers Within The Scene\r\n================================================================\r\n'''\r\n##Create 10 Layers To Help Testing\r\nfor i in range (1,10):\r\n    ##Create The Layer\r\n    fb.FBSystem().CurrentTake.CreateNewLayer()\r\n\r\n'''\r\nDelete All Layers\r\n'''    \r\n##Get A Layer Count\r\nlCount = fb.FBSystem().CurrentTake.GetLayerCount()\r\n##Create An Empty Layers List\r\nlLayerLst = &#x5B;]\r\n##We Want To Omit The Base Layer Which Is Why Our Range Starts At 1 (Base Layer == 0)\r\nfor layer in range(1 ,lCount):\r\n    lLayerLst.extend(&#x5B;fb.FBSystem().CurrentTake.GetLayer(layer)])\r\n##Delete All Layer That Are In The Layers List\r\nfor layer in lLayerLst:\r\n    layer.FBDelete()\r\n##Clean Up\r\ndel lCount, lLayerLst\r\n    \r\n'''\r\nDelete Layer By Name\r\n'''\r\n##Define The Layer We Are Looking For - Change This Variable To Match Your Desired Layer You Wish To Delete\r\nlDelLayerName = &quot;AnimLayer8&quot;\r\n##Delte Layer By Name\r\nfb.FBSystem().CurrentTake.GetLayerByName(lDelLayerName).FBDelete()\r\n##Clean Up\r\ndel lDelLayerName\r\n\r\n'''\r\nDelete Selected Layers\r\n'''\r\nlCount = fb.FBSystem().CurrentTake.GetLayerCount()\r\n##Create An Empty Layers List\r\nlLayerLst = &#x5B;]\r\n##Check All Layers On Current Take And If They Are Selected Than Store The Layer's Name To The Layers List\r\nfor layer in range(lCount):\r\n    if fb.FBSystem().CurrentTake.GetLayer(layer).Selected == True:\r\n        lLayerLst.extend(&#x5B;fb.FBSystem().CurrentTake.GetLayer(layer).Name])\r\n    else: pass\r\n##Delete Layer That Are Found in Layer List\r\nfor layer in lLayerLst:\r\n    fb.FBSystem().CurrentTake.GetLayerByName(layer).FBDelete()\r\n##Clean Up\r\ndel lCount, lLayerLst\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"cameras\">FBDelete() Cameras<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Camera By Name, Selected And All Cameras Within The Scene\r\n================================================================\r\n'''\r\n\r\n'''\r\nDelete All Cameras That Are Not Orthographic\r\n'''\r\n##Create A Variable To Protect Our &quot;Producer&quot; Cameras Which Are Used In Orthographic Views\r\nlCamOrth = &quot;Producer&quot;\r\n##Create An Empty Camera List\r\nlCamLst = &#x5B;]\r\n##Go Throuh All Cameras Within The Scene\r\nfor camera in fb.FBSystem().Scene.Cameras:\r\n    ##If &quot;Producer&quot; Is Found Within The Name Then Skip The Camera\r\n    if lCamOrth in camera.Name: pass\r\n    ##Store Camera To Camera List\r\n    else: lCamLst.extend(&#x5B;camera])\r\n##Delete Cameras Within The Camera List    \r\nfor camera in lCamLst:\r\n    camera.FBDelete()\r\n##Clean Up    \r\ndel lCamOrth, lCamLst\r\n\r\n'''\r\nDelete All Selected Cameras That Are Not Orthographic\r\n'''\r\n##Create A Variable To Protect Our &quot;Producer&quot; Cameras Which Are Used In Orthographic Views\r\nlCamOrth = &quot;Producer&quot;\r\n##Create An Empty Camera List\r\nlCamLst = &#x5B;]\r\n##Go Throuh All Cameras Within The Scene\r\nfor camera in fb.FBSystem().Scene.Cameras:\r\n    ##Selected Cameras\r\n    if camera.Selected == True:\r\n        ##If &quot;Producer&quot; Is Found Within The Name Then Skip The Camera \r\n        if lCamOrth in camera.Name: pass ##!!This Condition Can Be Removed If The User Does Not Wish To Protect The Orthographic Views\r\n        ##Store Camera To Camera List\r\n        else: lCamLst.extend(&#x5B;camera])\r\n    ##Skip Any Un Selected Cameras    \r\n    else: pass\r\n##Delete Cameras Within The Camera List  \r\nfor camera in lCamLst:\r\n    camera.FBDelete()\r\n##Clean Up      \r\ndel lCamOrth, lCamLst\r\n\r\n'''\r\nDelete Camera By Name\r\n'''\r\n##Define The CAmera We Are Looking For - Change This Variable To Match The Desired Camera You Wish To Delete\r\nlDelCameName = &quot;Camera 2&quot;\r\n##Go Through Every Camera Within The Scene\r\nfor camera in fb.FBSystem().Scene.Cameras:\r\n    ##If A Camera's Name Matched Our Desired Camera Name\r\n    if camera.Name == lDelCameName:\r\n        ##Delte Camera\r\n        camera.FBDelete()\r\n    ##Skip All Other Cameras    \r\n    else: pass\r\n##Clean Up    \r\ndel lDelCameName  \r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"groups\">FBDelete() Groups<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Groups By Name, Selected And All Groups Within The Scene\r\n================================================================\r\n'''\r\n##Create 10 Groups\r\nfor i in range(1, 10):\r\n    lGroupName = &quot;Group &quot; + str(i)\r\n    fb.FBGroup( lGroupName )\r\n##Clean Up\r\ndel lGroupName\r\n\r\n'''\r\nDelete All Groups\r\n'''\r\n##Create An Empty Group List\r\nlGroupLst = &#x5B;]\r\n##Go Through All Groups Within Our Scene And Add Them To Oue Group List    \r\nfor group in fb.FBSystem().Scene.Groups:\r\n    lGroupLst.extend (&#x5B;group])\r\n##Delete All Groups That Are In Our Group List\r\nfor group in lGroupLst:\r\n    group.FBDelete()\r\n##Clean Up    \r\ndel lGroupLst\r\n\r\n'''\r\nDelete Selected Groups\r\n'''\r\n##Create An Empty Group List\r\nlGroupLst = &#x5B;]\r\n##Go Through All Groups Within Our Scene And If They Are Seleced Then Add Them To Oue Group List    \r\nfor group in fb.FBSystem().Scene.Groups:\r\n    if group.Selected == True:\r\n        lGroupLst.extend (&#x5B;group])\r\n    else: pass\r\n##Delete All Groups That Are In Our Group List\r\nfor group in lGroupLst:\r\n    group.FBDelete()\r\n##Clean Up    \r\ndel lGroupLst\r\n\r\n'''\r\nDelete Group By Name\r\n'''\r\n##Define The Group We Are Looking For - Change This Variable To Match Your Desired Group You Wish To Delete\r\nlDelGroupName = &quot;Group 2&quot;\r\n##Go Through All Groups Within Our Scene And If They Are Seleced Then Add Them To Oue Group List    \r\nfor group in fb.FBSystem().Scene.Groups:\r\n    if group.Name == lDelGroupName:\r\n        group.FBDelete()\r\n    else: pass\r\n##Clean Up\r\ndel lDelGroupName\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"sets\">FBDelete() Sets<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Sets By Name, Selected And All Sets Within The Scene\r\n================================================================\r\n'''\r\nfor i in range(1, 10):\r\n    setname = &quot;Set &quot; + str(i)\r\n    fb.FBSet( setname )\r\n    \r\n'''\r\nDelete All Sets\r\n'''\r\n##Create An Empty Group List\r\nlSetLst = &#x5B;]\r\n##Go Through All Sets Within Our Scene And Add Them To Oue Group List    \r\nfor item in fb.FBSystem().Scene.Sets:\r\n    lSetLst.extend (&#x5B;item])\r\n##Delete All Sets That Are In Our Group List\r\nfor item in lSetLst:\r\n    item.FBDelete()\r\n##Clean Up    \r\ndel lSetLst\r\n\r\n'''\r\nDelete Selected Sets\r\n'''\r\n##Create An Empty Group List\r\nlSetLst = &#x5B;]\r\n##Go Through All Sets Within Our Scene And If They Are Seleced Then Add Them To Oue Group List    \r\nfor item in fb.FBSystem().Scene.Sets:\r\n    if item.Selected == True:\r\n        lSetLst.extend (&#x5B;item])\r\n    else: pass\r\n##Delete All Sets That Are In Our Group List\r\nfor item in lSetLst:\r\n    item.FBDelete()\r\n##Clean Up    \r\ndel lSetLst\r\n\r\n'''\r\nDelete Set By Name\r\n'''\r\n##Define The Group We Are Looking For - Change This Variable To Match Your Desired Group You Wish To Delete\r\nlDelSetName = &quot;Set 6&quot;\r\n##Go Through All Sets Within Our Scene And If They Are Seleced Then Add Them To Oue Group List    \r\nfor group in fb.FBSystem().Scene.Sets:\r\n    if group.Name == lDelSetName:\r\n        group.FBDelete()\r\n    else: pass\r\n##Clean Up    \r\ndel lDelSetName\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"lights\">FBDelete() Lights<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Lights By Name, Selected And All Lights Within The Scene\r\n================================================================\r\n'''\r\n\r\n'''\r\nDelete All Lights In The Scene\r\n'''\r\n##Create An Empty Light List\r\nlLightLst = &#x5B;]\r\n##Go Throuh All Lights Within The Scene\r\nfor light in fb.FBSystem().Scene.Lights:\r\n    ##Add Each Light To The Light List\r\n    lLightLst.extend(&#x5B;light])\r\n##Delete Lighst Within The Lights List    \r\nfor light in lLightLst:\r\n    light.FBDelete()\r\n##Clean Up    \r\ndel lLightLst\r\n\r\n'''\r\nDelete All Selected Lights\r\n'''\r\n##Create An Empty Light List\r\nlLightLst = &#x5B;]\r\n##Go Throuh All Light Within The Scene\r\nfor light in fb.FBSystem().Scene.Lights:\r\n    ##Selected Light\r\n    if light.Selected == True:\r\n        ##Add Each Light To The Light List\r\n        lLightLst.extend(&#x5B;light])\r\n    ##Skip Any Un Selected Light    \r\n    else: pass\r\n##Delete Light Within The Camera List  \r\nfor light in lLightLst:\r\n    light.FBDelete()\r\n##Clean Up      \r\ndel lLightLst\r\n\r\n'''\r\nDelete Light By Name\r\n'''\r\n##Define The Light We Are Looking For - Change This Variable To Match The Desired Light You Wish To Delete\r\nlDelLightName = &quot;Light 2&quot;\r\n##Go Through Every Light Within The Scene\r\nfor light in fb.FBSystem().Scene.Lights:\r\n    ##If A Light's Name Matched Our Desired Light Name\r\n    if light.Name == lDelLightName:\r\n        ##Delte Light\r\n        light.FBDelete()\r\n    ##Skip All Other Cameras    \r\n    else: pass\r\n##Clean Up    \r\ndel lDelLightName   \r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"materials\">FBDelete() Material<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Materials By Name, Selected And All Materials Within The Scene\r\n================================================================\r\n'''\r\n\r\n'''\r\nDelete All Materials\r\n'''\r\n##Create An Empty Material List\r\nlMatLst = &#x5B;]\r\n##Serach All Materials Within The Scene    \r\nfor material in fb.FBSystem().Scene.Materials:\r\n    ##Skip The DefaultMaterial\r\n    if material.Name == &quot;DefaultMaterial&quot;: pass\r\n    ##Add Material To Our Material List\r\n    else: lMatLst.extend (&#x5B;material])\r\n##Go Through Each Material In Our Materail List    \r\nfor material in lMatLst:\r\n    ##Delete Material\r\n    material.FBDelete()\r\n##Clean Up\r\ndel lMatLst\r\n\r\n'''\r\nDelete Selected Materials\r\n'''\r\n##Create An Empty Material List\r\nlMatLst = &#x5B;]\r\n##Serach All Materials Within The Scene    \r\nfor material in fb.FBSystem().Scene.Materials:\r\n    ##Materials That Are Selected\r\n    if material.Selected == True:\r\n        ##Skip The DefaultMaterial\r\n        if material.Name == &quot;DefaultMaterial&quot;: pass\r\n        ##Add Material To Our Material List\r\n        else: lMatLst.extend (&#x5B;material])\r\n    ##Skip Materials That Are Not Selected    \r\n    else: pass\r\n##Go Through Each Material In Our Materail List    \r\nfor material in lMatLst:\r\n    ##Delete Material\r\n    material.FBDelete()\r\n##Clean Up\r\ndel lMatLst\r\n\r\n'''\r\nDelete Materials By Name\r\n'''\r\n##Define The Material We Are Looking For - Change This Variable To Match The Desired Material You Wish To Delete\r\nlMaterialDel = &quot;Material 2&quot;\r\n##Serach All Materials Within The Scene    \r\nfor material in fb.FBSystem().Scene.Materials:\r\n    ##Look At The Name To See If It Matches The Desired Material You Wish To Delete\r\n    if material.Name == lMaterialDel:\r\n        ##Delete Material\r\n        material.FBDelete()\r\n    ##Skip All Materials That Do Not Match The Desired Material You Wish To Delete   \r\n    else:\r\n        pass\r\n##Clean Up\r\ndel lMaterialDel\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"poses\">FBDelete() Poses<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Pose By Name, Selected And All Poses Within The Scene\r\n================================================================\r\n'''\r\n\r\n'''\r\nDelete All Poses\r\n'''\r\n##Create An Empty Pose List\r\nlPoseLst = &#x5B;]\r\n##Serach All Pose Within The Scene    \r\nfor pose in fb.FBSystem().Scene.CharacterPoses:\r\n    lPoseLst.extend (&#x5B;pose])\r\n##Go Through Each Pose In Our Pose List    \r\nfor pose in lPoseLst:\r\n    ##Delte Pose\r\n    pose.FBDelete()\r\n##Clean Up\r\ndel lPoseLst\r\n\r\n'''\r\nDelete Selected Poses\r\n'''\r\n##Create An Empty Pose List\r\nlPoseLst = &#x5B;]\r\n##Serach All Poses Within The Scene    \r\nfor pose in fb.FBSystem().Scene.CharacterPoses:\r\n    ##Poses That Are Selected\r\n    if pose.Selected == True:\r\n        ##Skip The DefaultMaterial\r\n        if pose.Name == &quot;DefaultMaterial&quot;: pass\r\n        ##Add Pose To Our Pose List\r\n        else: lPoseLst.extend (&#x5B;pose])\r\n    ##Skip Poses That Are Not Selected    \r\n    else: pass\r\n##Go Through Each Pose In Our Materail List    \r\nfor pose in lPoseLst:\r\n    ##Delte Pose\r\n    pose.FBDelete()\r\n##Clean Up\r\ndel lPoseLst\r\n\r\n'''\r\nDelete Poses By Name\r\n'''\r\n##Define The Pose We Are Looking For - Change This Variable To Match The Desired Pose You Wish To Delete\r\nlPoseDel = &quot;Character Pose 2&quot;\r\n##Serach All Poses Within The Scene    \r\nfor pose in fb.FBSystem().Scene.CharacterPoses:\r\n    ##Look At The Name To See If It Matches The Desired Pose You Wish To Delete\r\n    if pose.Name == lPoseDel:\r\n        ##Delte Pose\r\n        pose.FBDelete()\r\n    ##Skip All Poses That Do Not Match The Desired Pose You Wish To Delete   \r\n    else:\r\n        pass\r\n##Clean Up\r\ndel lPoseDel\r\n\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"shaders\">FBDelete() Shaders<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Shader By Name, Selected And All Shaders Within The Scene\r\n================================================================\r\n'''\r\n\r\n'''\r\nDelete All Shader\r\n'''\r\n##Create An Empty Shader List\r\nlShaderLst = &#x5B;]\r\n##Serach All Shaders Within The Scene    \r\nfor shader in fb.FBSystem().Scene.Shaders:\r\n    ##Skip The Default Shader\r\n    if shader.Name == &quot;Default Shader&quot;: pass\r\n    ##Add Shader To Our Shader List\r\n    else: lShaderLst.extend (&#x5B;shader])\r\n##Go Through Each Shader In Our Shader List    \r\nfor shader in lShaderLst:\r\n    ##Delete Shader\r\n    shader.FBDelete()\r\n##Clean Up\r\ndel lShaderLst\r\n\r\n'''\r\nDelete Selected Shaders\r\n'''\r\n##Create An Empty Shader List\r\nlShaderLst = &#x5B;]\r\n##Serach All Shaders Within The Scene    \r\nfor shader in fb.FBSystem().Scene.Shaders:\r\n    ##Shaders That Are Selected\r\n    if shader.Selected == True:\r\n        ##Skip The Default Shader\r\n        if shader.Name == &quot;Default Shader&quot;: pass\r\n        ##Add Shader To Our Shader List\r\n        else: lShaderLst.extend (&#x5B;shader])\r\n    ##Skip Shaders That Are Not Selected    \r\n    else: pass\r\n##Go Through Each Shader In Our Shader List    \r\nfor shader in lShaderLst:\r\n    ##Delete Shader\r\n    shader.FBDelete()\r\n##Clean Up\r\ndel lShaderLst\r\n\r\n'''\r\nDelete Shaders By Name\r\n'''\r\n##Define The Shader We Are Looking For - Change This Variable To Match The Desired Shader You Wish To Delete\r\nlShaderDel = &quot;BumpShader 1&quot;\r\n##Serach All Shaders Within The Scene    \r\nfor shader in fb.FBSystem().Scene.Shaders:\r\n    ##Look At The Name To See If It Matches The Desired Shader You Wish To Delete\r\n    if shader.Name == lShaderDel:\r\n        ##Delete Shader\r\n        shader.FBDelete()\r\n    ##Skip All Shaders That Do Not Match The Desired Shader You Wish To Delete   \r\n    else:\r\n        pass\r\n##Clean Up\r\ndel lShaderDel\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"takes\">FBDelete() Takes<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Takes By Name, Selected And All Takes Within The Scene\r\n================================================================\r\n'''\r\n##Create 10 Takes To Help Testing\r\nfor i in range (1,10):\r\n    lTakeName = 'Take Name' + ' 00' + str(i)\r\n    newtake = fb.FBSystem().CurrentTake.CopyTake(lTakeName)\r\n    fb.FBPlayerControl().GotoStart()\r\n    newtake.ClearAllProperties(False)\r\n    newtake.LocalTimeSpan = fb.FBTimeSpan( fb.FBTime(0), fb.FBTime(0, 0, 0, 150) )\r\n##Clean Up    \r\ndel lTakeName\r\n\r\n'''\r\nDelete Take By Name\r\n'''\r\n##Define The Take We Are Looking For - Change This Variable To Match Your Desired Take You Wish To Delete\r\nlDelTakeName = &quot;Take Name 005&quot;\r\nfor i in fb.FBSystem().Scene.Takes:\r\n    if i.Name == lDelTakeName:\r\n        i.FBDelete()\r\n    else: pass\r\n##Clean Up    \r\ndel lDelTakeName\r\n'''\r\nDelete Selected Takes\r\n'''\r\n##Create An Empty Take List\r\nlTakeLst = &#x5B;]\r\n##Add Every Selected Take Within Our Scene To Our Take List\r\nfor i in range( len(fb.FBSystem().Scene.Takes) ):\r\n    if fb.FBSystem().Scene.Takes&#x5B;i].Selected == True:\r\n        lTakeLst.extend(&#x5B;fb.FBSystem().Scene.Takes&#x5B;i]])\r\n    else: pass\r\n##Delete Every Take Within Our Take List    \r\nfor take in lTakeLst:\r\n    take.FBDelete()\r\n##Clean Up    \r\ndel lTakeLst     \r\n    \r\n'''\r\nDelete All Takes - No Idea Why You Would Want To Do This\r\n'''\r\n##Create An Empty Take List\r\nlTakeLst = &#x5B;]\r\n##Add Every Selected Take Within Our Scene To Our Take List\r\nfor i in range( len(fb.FBSystem().Scene.Takes) ):\r\n    lTakeLst.extend(&#x5B;fb.FBSystem().Scene.Takes&#x5B;i]])\r\n##Delete Every Take Within Our Take List    \r\nfor take in lTakeLst:\r\n    take.FBDelete()      \r\n##Clean Up    \r\ndel lTakeLst\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"textures\">FBDelete() Textures<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Textures By Name, File Extention Selected And All Textures Within The Scene\r\n================================================================\r\n'''\r\n\r\n'''\r\nDelete All Textures\r\n'''\r\n##Create An Empty Texture List\r\nlTextureLst = &#x5B;]\r\n##Serach All Textures Within The Scene    \r\nfor texture in fb.FBSystem().Scene.Textures:\r\n    ##Skip The Default Texture\r\n    if texture.Name == &quot;Default Shader&quot;: pass\r\n    ##Add Texture To Our Texture List\r\n    else: lTextureLst.extend (&#x5B;texture])\r\n##Go Through Each Texture In Our Texture List    \r\nfor texture in lTextureLst:\r\n    ##Delete Texture\r\n    texture.FBDelete()\r\n##Clean Up\r\ndel lTextureLst\r\n\r\n'''\r\nDelete Selected Textures\r\n'''\r\n##Create An Empty Texture List\r\nlTextureLst = &#x5B;]\r\n##Serach All Textures Within The Scene    \r\nfor texture in fb.FBSystem().Scene.Textures:\r\n    ##Textures That Are Selected\r\n    if texture.Selected == True:\r\n        ##Skip The Default Texture\r\n        if texture.Name == &quot;Default Shader&quot;: pass\r\n        ##Add Texture To Our Texture List\r\n        else: lTextureLst.extend (&#x5B;texture])\r\n    ##Skip Textures That Are Not Selected    \r\n    else: pass\r\n##Go Through Each Texture In Our Texture List    \r\nfor texture in lTextureLst:\r\n    ##Delete Texture\r\n    texture.FBDelete()\r\n##Clean Up\r\ndel lTextureLst\r\n\r\n'''\r\nDelete Textures By Name\r\n'''\r\n##Define The Texture We Are Looking For - Change This Variable To Match The Desired Texture You Wish To Delete\r\nlTextureDel = &quot;BlackScreen.png&quot;\r\n##Serach All Textures Within The Scene    \r\nfor texture in fb.FBSystem().Scene.Textures:\r\n    ##Look At The Name To See If It Matches The Desired Texture You Wish To Delete\r\n    if texture.Name == lTextureDel:\r\n        ##Delete Texture\r\n        texture.FBDelete()\r\n    ##Skip All Textures That Do Not Match The Desired Texture You Wish To Delete   \r\n    else:\r\n        pass\r\n##Clean Up\r\ndel lTextureDel\r\n\r\n'''\r\nDelete Textures By File Type\r\n'''\r\n##Define The Texture We Are Looking For - Change This Variable To Match The Desired Texture You Wish To Delete\r\nlTextureExtDel = &quot;.jpg&quot;\r\n##Create An Empty Texture List\r\nlTextureLst = &#x5B;]\r\n##Serach All Textures Within The Scene    \r\nfor texture in fb.FBSystem().Scene.Textures:\r\n    ##Look At The Name To See If It Matches The Desired Texture You Wish To Delete\r\n    if lTextureExtDel in texture.Name:\r\n        ##Add Texture To Texture List\r\n        lTextureLst.extend(&#x5B;texture])\r\n    ##Skip All Textures That Do Not Match The Desired Texture You Wish To Delete   \r\n    else:\r\n        pass\r\nfor texture in lTextureLst:\r\n    texture.FBDelete()\r\n##Clean Up\r\ndel lTextureExtDel, lTextureLst\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<h3 id=\"videos\">FBDelete() Video<\/h3>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n'''\r\n================================================================\r\nFBDelete Videos By Name, File Extention Selected And All Videos Within The Scene\r\n================================================================\r\n'''\r\n\r\n'''\r\nDelete All Videos\r\n'''\r\n##Create An Empty Video List\r\nlVideoLst = &#x5B;]\r\n##Serach All Videos Within The Scene    \r\nfor media in fb.FBSystem().Scene.VideoClips:\r\n    ##Skip The Default Video\r\n    if media.Name == &quot;Default Shader&quot;: pass\r\n    ##Add Video To Our Video List\r\n    else: lVideoLst.extend (&#x5B;media])\r\n##Go Through Each Video In Our Video List    \r\nfor media in lVideoLst:\r\n    ##Delete Video\r\n    media.FBDelete()\r\n##Clean Up\r\ndel lVideoLst\r\n\r\n'''\r\nDelete Selected Videos\r\n'''\r\n##Create An Empty Video List\r\nlVideoLst = &#x5B;]\r\n##Serach All Videos Within The Scene    \r\nfor media in fb.FBSystem().Scene.VideoClips:\r\n    ##Videos That Are Selected\r\n    if media.Selected == True:\r\n        ##Skip The Default Video\r\n        if media.Name == &quot;Default Shader&quot;: pass\r\n        ##Add Video To Our Video List\r\n        else: lVideoLst.extend (&#x5B;media])\r\n    ##Skip Videos That Are Not Selected    \r\n    else: pass\r\n##Go Through Each Video In Our Video List    \r\nfor media in lVideoLst:\r\n    ##Delete Video\r\n    media.FBDelete()\r\n##Clean Up\r\ndel lVideoLst\r\n\r\n'''\r\nDelete Videos By Name\r\n'''\r\n##Define The Video We Are Looking For - Change This Variable To Match The Desired Video You Wish To Delete\r\nlVideoDel = &quot;BlackScreen.png&quot;\r\n##Serach All Videos Within The Scene    \r\nfor media in fb.FBSystem().Scene.VideoClips:\r\n    ##Look At The Name To See If It Matches The Desired Video You Wish To Delete\r\n    if media.Name == lVideoDel:\r\n        ##Delete Video\r\n        media.FBDelete()\r\n    ##Skip All Videos That Do Not Match The Desired Video You Wish To Delete   \r\n    else:\r\n        pass\r\n##Clean Up\r\ndel lVideoDel\r\n\r\n'''\r\nDelete Videos By File Type\r\n'''\r\n##Define The Video We Are Looking For - Change This Variable To Match The Desired Video You Wish To Delete\r\nlVideoExtDel = &quot;.jpg&quot;\r\n##Create An Empty Video List\r\nlVideoLst = &#x5B;]\r\n##Serach All Videos Within The Scene    \r\nfor media in fb.FBSystem().Scene.VideoClips:\r\n    ##Look At The Name To See If It Matches The Desired Video You Wish To Delete\r\n    if lVideoExtDel in media.Name:\r\n        ##Add Video To Video List\r\n        lVideoLst.extend(&#x5B;media])\r\n    ##Skip All Videos That Do Not Match The Desired Video You Wish To Delete   \r\n    else:\r\n        pass\r\nfor media in lVideoLst:\r\n    media.FBDelete()\r\n##Clean Up\r\ndel lVideoExtDel, lVideoLst\r\n<\/pre>\n<p style=\"text-align: right;\"><a href=\"#index\">Return to index<\/a><\/p>\n<p>Like I mentioned the scripts are pretty repetitive, we search the scene, than create a list with all that is found and once done we take all that is on the list and delete them using the &#8220;.FBDelete()&#8221;.<\/p>\n<p>My next post will cover pretty much the same topic but in the next example we will be creating a list of scene components, and then processing that list to create a list of thing I wish to delete. You will be able to find it <a href=\"http:\/\/www.vicdebaie.com\/blog\/?p=528&amp;preview=true\">here<\/a>.<\/p>\n<p>I hope this helps.<\/p>\n<p><\/p><noscript class=\"ninja-forms-noscript-message\">\n\tNotice: JavaScript is required for this content.<\/noscript>\n<div id=\"nf-form-1-cont\" class=\"nf-form-cont\" aria-live=\"polite\" aria-labelledby=\"nf-form-title-1\" aria-describedby=\"nf-form-errors-1\" role=\"form\">\n\n    <div class=\"nf-loading-spinner\"><\/div>\n\n<\/div>\n        <!-- That data is being printed as a workaround to page builders reordering the order of the scripts loaded-->\n        <script>var formDisplay=1;var nfForms=nfForms||[];var form=[];form.id='1';form.settings={\"objectType\":\"Form Setting\",\"editActive\":\"\",\"title\":\"Contact Me\",\"key\":\"\",\"created_at\":\"2016-08-24 16:39:20\",\"default_label_pos\":\"above\",\"conditions\":[],\"show_title\":\"1\",\"clear_complete\":\"1\",\"hide_complete\":\"1\",\"wrapper_class\":\"\",\"element_class\":\"\",\"add_submit\":\"1\",\"logged_in\":\"\",\"not_logged_in_msg\":\"\",\"sub_limit_number\":\"\",\"sub_limit_msg\":\"\",\"calculations\":[],\"formContentData\":[\"name\",\"message\",\"submit\"],\"container_styles_background-color\":\"\",\"container_styles_border\":\"\",\"container_styles_border-style\":\"\",\"container_styles_border-color\":\"\",\"container_styles_color\":\"\",\"container_styles_height\":\"\",\"container_styles_width\":\"\",\"container_styles_font-size\":\"\",\"container_styles_margin\":\"\",\"container_styles_padding\":\"\",\"container_styles_display\":\"\",\"container_styles_float\":\"\",\"container_styles_show_advanced_css\":\"0\",\"container_styles_advanced\":\"\",\"title_styles_background-color\":\"\",\"title_styles_border\":\"\",\"title_styles_border-style\":\"\",\"title_styles_border-color\":\"\",\"title_styles_color\":\"\",\"title_styles_height\":\"\",\"title_styles_width\":\"\",\"title_styles_font-size\":\"\",\"title_styles_margin\":\"\",\"title_styles_padding\":\"\",\"title_styles_display\":\"\",\"title_styles_float\":\"\",\"title_styles_show_advanced_css\":\"0\",\"title_styles_advanced\":\"\",\"row_styles_background-color\":\"\",\"row_styles_border\":\"\",\"row_styles_border-style\":\"\",\"row_styles_border-color\":\"\",\"row_styles_color\":\"\",\"row_styles_height\":\"\",\"row_styles_width\":\"\",\"row_styles_font-size\":\"\",\"row_styles_margin\":\"\",\"row_styles_padding\":\"\",\"row_styles_display\":\"\",\"row_styles_show_advanced_css\":\"0\",\"row_styles_advanced\":\"\",\"row-odd_styles_background-color\":\"\",\"row-odd_styles_border\":\"\",\"row-odd_styles_border-style\":\"\",\"row-odd_styles_border-color\":\"\",\"row-odd_styles_color\":\"\",\"row-odd_styles_height\":\"\",\"row-odd_styles_width\":\"\",\"row-odd_styles_font-size\":\"\",\"row-odd_styles_margin\":\"\",\"row-odd_styles_padding\":\"\",\"row-odd_styles_display\":\"\",\"row-odd_styles_show_advanced_css\":\"0\",\"row-odd_styles_advanced\":\"\",\"success-msg_styles_background-color\":\"\",\"success-msg_styles_border\":\"\",\"success-msg_styles_border-style\":\"\",\"success-msg_styles_border-color\":\"\",\"success-msg_styles_color\":\"\",\"success-msg_styles_height\":\"\",\"success-msg_styles_width\":\"\",\"success-msg_styles_font-size\":\"\",\"success-msg_styles_margin\":\"\",\"success-msg_styles_padding\":\"\",\"success-msg_styles_display\":\"\",\"success-msg_styles_show_advanced_css\":\"0\",\"success-msg_styles_advanced\":\"\",\"error_msg_styles_background-color\":\"\",\"error_msg_styles_border\":\"\",\"error_msg_styles_border-style\":\"\",\"error_msg_styles_border-color\":\"\",\"error_msg_styles_color\":\"\",\"error_msg_styles_height\":\"\",\"error_msg_styles_width\":\"\",\"error_msg_styles_font-size\":\"\",\"error_msg_styles_margin\":\"\",\"error_msg_styles_padding\":\"\",\"error_msg_styles_display\":\"\",\"error_msg_styles_show_advanced_css\":\"0\",\"error_msg_styles_advanced\":\"\",\"currency\":\"\",\"unique_field_error\":\"A form with this value has already been submitted.\",\"ninjaForms\":\"Ninja Forms\",\"changeEmailErrorMsg\":\"Please enter a valid email address!\",\"changeDateErrorMsg\":\"Please enter a valid date!\",\"confirmFieldErrorMsg\":\"These fields must match!\",\"fieldNumberNumMinError\":\"Number Min Error\",\"fieldNumberNumMaxError\":\"Number Max Error\",\"fieldNumberIncrementBy\":\"Please increment by \",\"fieldTextareaRTEInsertLink\":\"Insert Link\",\"fieldTextareaRTEInsertMedia\":\"Insert Media\",\"fieldTextareaRTESelectAFile\":\"Select a file\",\"formErrorsCorrectErrors\":\"Please correct errors before submitting this form.\",\"formHoneypot\":\"If you are a human seeing this field, please leave it empty.\",\"validateRequiredField\":\"This is a required field.\",\"honeypotHoneypotError\":\"Honeypot Error\",\"fileUploadOldCodeFileUploadInProgress\":\"File Upload in Progress.\",\"fileUploadOldCodeFileUpload\":\"FILE UPLOAD\",\"currencySymbol\":\"$\",\"fieldsMarkedRequired\":\"Fields marked with an <span class=\\\"ninja-forms-req-symbol\\\">*<\\\/span> are required\",\"thousands_sep\":\",\",\"decimal_point\":\".\",\"siteLocale\":\"en\",\"dateFormat\":\"d\\\/m\\\/Y\",\"startOfWeek\":\"0\",\"of\":\"of\",\"previousMonth\":\"Previous Month\",\"nextMonth\":\"Next Month\",\"months\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],\"monthsShort\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],\"weekdays\":[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],\"weekdaysShort\":[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],\"weekdaysMin\":[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],\"recaptchaConsentMissing\":\"reCaptcha validation couldn&#039;t load.\",\"recaptchaMissingCookie\":\"reCaptcha v3 validation couldn&#039;t load the cookie needed to submit the form.\",\"recaptchaConsentEvent\":\"Accept reCaptcha cookies before sending the form.\",\"embed_form\":\"\",\"currency_symbol\":\"\",\"beforeForm\":\"\",\"beforeFields\":\"\",\"afterFields\":\"\",\"afterForm\":\"\"};form.fields=[{\"objectType\":\"Field\",\"objectDomain\":\"fields\",\"editActive\":\"\",\"order\":1,\"label\":\"Name\",\"key\":\"name\",\"type\":\"textbox\",\"created_at\":\"2016-08-24 16:39:20\",\"label_pos\":\"above\",\"required\":1,\"placeholder\":\"\",\"default\":\"\",\"wrapper_class\":\"\",\"element_class\":\"\",\"container_class\":\"\",\"input_limit\":\"\",\"input_limit_type\":\"characters\",\"input_limit_msg\":\"Character(s) left\",\"manual_key\":\"\",\"disable_input\":\"\",\"admin_label\":\"\",\"help_text\":\"\",\"desc_text\":\"\",\"disable_browser_autocomplete\":\"\",\"mask\":\"\",\"custom_mask\":\"\",\"wrap_styles_background-color\":\"\",\"wrap_styles_border\":\"\",\"wrap_styles_border-style\":\"\",\"wrap_styles_border-color\":\"\",\"wrap_styles_color\":\"\",\"wrap_styles_height\":\"\",\"wrap_styles_width\":\"\",\"wrap_styles_font-size\":\"\",\"wrap_styles_margin\":\"\",\"wrap_styles_padding\":\"\",\"wrap_styles_display\":\"\",\"wrap_styles_float\":\"\",\"wrap_styles_show_advanced_css\":0,\"wrap_styles_advanced\":\"\",\"label_styles_background-color\":\"\",\"label_styles_border\":\"\",\"label_styles_border-style\":\"\",\"label_styles_border-color\":\"\",\"label_styles_color\":\"\",\"label_styles_height\":\"\",\"label_styles_width\":\"\",\"label_styles_font-size\":\"\",\"label_styles_margin\":\"\",\"label_styles_padding\":\"\",\"label_styles_display\":\"\",\"label_styles_float\":\"\",\"label_styles_show_advanced_css\":0,\"label_styles_advanced\":\"\",\"element_styles_background-color\":\"\",\"element_styles_border\":\"\",\"element_styles_border-style\":\"\",\"element_styles_border-color\":\"\",\"element_styles_color\":\"\",\"element_styles_height\":\"\",\"element_styles_width\":\"\",\"element_styles_font-size\":\"\",\"element_styles_margin\":\"\",\"element_styles_padding\":\"\",\"element_styles_display\":\"\",\"element_styles_float\":\"\",\"element_styles_show_advanced_css\":0,\"element_styles_advanced\":\"\",\"cellcid\":\"c3277\",\"id\":1,\"beforeField\":\"\",\"afterField\":\"\",\"value\":\"\",\"parentType\":\"textbox\",\"element_templates\":[\"textbox\",\"input\"],\"old_classname\":\"\",\"wrap_template\":\"wrap\"},{\"objectType\":\"Field\",\"objectDomain\":\"fields\",\"editActive\":\"\",\"order\":3,\"label\":\"Message\",\"key\":\"message\",\"type\":\"textarea\",\"created_at\":\"2016-08-24 16:39:20\",\"label_pos\":\"above\",\"required\":1,\"placeholder\":\"\",\"default\":\"\",\"wrapper_class\":\"\",\"element_class\":\"\",\"container_class\":\"\",\"input_limit\":\"\",\"input_limit_type\":\"characters\",\"input_limit_msg\":\"Character(s) left\",\"manual_key\":\"\",\"disable_input\":\"\",\"admin_label\":\"\",\"help_text\":\"\",\"desc_text\":\"\",\"disable_browser_autocomplete\":\"\",\"textarea_rte\":\"\",\"disable_rte_mobile\":\"\",\"textarea_media\":\"\",\"wrap_styles_background-color\":\"\",\"wrap_styles_border\":\"\",\"wrap_styles_border-style\":\"\",\"wrap_styles_border-color\":\"\",\"wrap_styles_color\":\"\",\"wrap_styles_height\":\"\",\"wrap_styles_width\":\"\",\"wrap_styles_font-size\":\"\",\"wrap_styles_margin\":\"\",\"wrap_styles_padding\":\"\",\"wrap_styles_display\":\"\",\"wrap_styles_float\":\"\",\"wrap_styles_show_advanced_css\":0,\"wrap_styles_advanced\":\"\",\"label_styles_background-color\":\"\",\"label_styles_border\":\"\",\"label_styles_border-style\":\"\",\"label_styles_border-color\":\"\",\"label_styles_color\":\"\",\"label_styles_height\":\"\",\"label_styles_width\":\"\",\"label_styles_font-size\":\"\",\"label_styles_margin\":\"\",\"label_styles_padding\":\"\",\"label_styles_display\":\"\",\"label_styles_float\":\"\",\"label_styles_show_advanced_css\":0,\"label_styles_advanced\":\"\",\"element_styles_background-color\":\"\",\"element_styles_border\":\"\",\"element_styles_border-style\":\"\",\"element_styles_border-color\":\"\",\"element_styles_color\":\"\",\"element_styles_height\":\"\",\"element_styles_width\":\"\",\"element_styles_font-size\":\"\",\"element_styles_margin\":\"\",\"element_styles_padding\":\"\",\"element_styles_display\":\"\",\"element_styles_float\":\"\",\"element_styles_show_advanced_css\":0,\"element_styles_advanced\":\"\",\"cellcid\":\"c3284\",\"id\":3,\"beforeField\":\"\",\"afterField\":\"\",\"value\":\"\",\"parentType\":\"textarea\",\"element_templates\":[\"textarea\",\"input\"],\"old_classname\":\"\",\"wrap_template\":\"wrap\"},{\"objectType\":\"Field\",\"objectDomain\":\"fields\",\"editActive\":\"\",\"order\":5,\"label\":\"Submit\",\"key\":\"submit\",\"type\":\"submit\",\"created_at\":\"2016-08-24 16:39:20\",\"processing_label\":\"Processing\",\"container_class\":\"\",\"element_class\":\"\",\"wrap_styles_background-color\":\"\",\"wrap_styles_border\":\"\",\"wrap_styles_border-style\":\"\",\"wrap_styles_border-color\":\"\",\"wrap_styles_color\":\"\",\"wrap_styles_height\":\"\",\"wrap_styles_width\":\"\",\"wrap_styles_font-size\":\"\",\"wrap_styles_margin\":\"\",\"wrap_styles_padding\":\"\",\"wrap_styles_display\":\"\",\"wrap_styles_float\":\"\",\"wrap_styles_show_advanced_css\":0,\"wrap_styles_advanced\":\"\",\"label_styles_background-color\":\"\",\"label_styles_border\":\"\",\"label_styles_border-style\":\"\",\"label_styles_border-color\":\"\",\"label_styles_color\":\"\",\"label_styles_height\":\"\",\"label_styles_width\":\"\",\"label_styles_font-size\":\"\",\"label_styles_margin\":\"\",\"label_styles_padding\":\"\",\"label_styles_display\":\"\",\"label_styles_float\":\"\",\"label_styles_show_advanced_css\":0,\"label_styles_advanced\":\"\",\"element_styles_background-color\":\"\",\"element_styles_border\":\"\",\"element_styles_border-style\":\"\",\"element_styles_border-color\":\"\",\"element_styles_color\":\"\",\"element_styles_height\":\"\",\"element_styles_width\":\"\",\"element_styles_font-size\":\"\",\"element_styles_margin\":\"\",\"element_styles_padding\":\"\",\"element_styles_display\":\"\",\"element_styles_float\":\"\",\"element_styles_show_advanced_css\":0,\"element_styles_advanced\":\"\",\"submit_element_hover_styles_background-color\":\"\",\"submit_element_hover_styles_border\":\"\",\"submit_element_hover_styles_border-style\":\"\",\"submit_element_hover_styles_border-color\":\"\",\"submit_element_hover_styles_color\":\"\",\"submit_element_hover_styles_height\":\"\",\"submit_element_hover_styles_width\":\"\",\"submit_element_hover_styles_font-size\":\"\",\"submit_element_hover_styles_margin\":\"\",\"submit_element_hover_styles_padding\":\"\",\"submit_element_hover_styles_display\":\"\",\"submit_element_hover_styles_float\":\"\",\"submit_element_hover_styles_show_advanced_css\":0,\"submit_element_hover_styles_advanced\":\"\",\"cellcid\":\"c3287\",\"id\":4,\"beforeField\":\"\",\"afterField\":\"\",\"value\":\"\",\"label_pos\":\"above\",\"parentType\":\"textbox\",\"element_templates\":[\"submit\",\"button\",\"input\"],\"old_classname\":\"\",\"wrap_template\":\"wrap-no-label\"}];nfForms.push(form);<\/script>\n        ","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been asked a few times now on how to delete objects, files, takes, layers, etc. from MotionBuilder&#8217;s Scenes. I thought I would take a few moments to go through the basics of FBDelete(). All examples below share pretty much the exact same structure with there scripts, we create an empty list, we set up [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":522,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[4],"tags":[5,7],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/04\/fbdelete.png?fit=420%2C294","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8pltq-8m","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":77,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-where-to-start\/","url_meta":{"origin":518,"position":0},"title":"MotionBuilder Python &#8211; Where to start","author":"admin","date":"February 6, 2017","format":false,"excerpt":"Finding information for Python scripting in MotionBuilder can be an uphill battle. Here is a list of some of the resources that I have been able to find (thanks google). A lot of the listed links have valuable scripts in which one can hack through and decipher what each line\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"http:\/\/www.vicdebaie.com\/blog\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/16697171583_7c33584c4b.jpg?fit=500%2C333&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":83,"url":"http:\/\/www.vicdebaie.com\/blog\/using-python-to-create-a-layer-on-the-current-selected-take-in-motionbuilder\/","url_meta":{"origin":518,"position":1},"title":"Using Python to Create a layer on the Current Selected Take in MotionBuilder.\u00a0","author":"admin","date":"February 9, 2017","format":false,"excerpt":"In MotionBuilder using animation layers are great for edits, blending, additives and in general adding quality passes to your animations. So below I'm going to demo how I learned to add layers\u00a0using Python. To create an Animation Layer on the Current Take script: [code language=\"python\"] from pyfbsdk import * lSystem\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"http:\/\/www.vicdebaie.com\/blog\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":620,"url":"http:\/\/www.vicdebaie.com\/blog\/using-your-currently-selected-character-to-generate-a-list-of-all-fk-and-ik-models-with-motionbuilder-python\/","url_meta":{"origin":518,"position":2},"title":"Using Your Currently Selected Character To Generate A List Of All FK And IK Models With MotionBuilder Python","author":"admin","date":"September 7, 2018","format":false,"excerpt":"Here is a quick post that will help use your currently selected character to generate lists of all FK and IK models. When ever possible I like to use these funcitons as opposed to generating the list by hand and storing that as a variable. I can't remember where I\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"http:\/\/www.vicdebaie.com\/blog\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/09\/fkiklist.jpg?fit=522%2C397&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":627,"url":"http:\/\/www.vicdebaie.com\/blog\/pivot-tool-v1-motionbuilder-python\/","url_meta":{"origin":518,"position":3},"title":"Pivot Tool v1 &#8211; MotionBuilder Python","author":"admin","date":"October 19, 2018","format":false,"excerpt":"\u00a0 Updated: Pivot Tool\u00a0 now supports MotionBuilder 2018! :) and in the post below under \"Versions\". 2018 version can be found here and in the post below under \"Versions\". Versions: PivotTool v1.0 for MotionBuilder 2018 PivotTool v1.0 for MotionBuilder 2015 Here is a tool that will help you quickly create\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"http:\/\/www.vicdebaie.com\/blog\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/10\/pivot.gif?fit=498%2C284&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":566,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-parent-constraint-tool\/","url_meta":{"origin":518,"position":4},"title":"MotionBuilder Python Parent Constraint Tool","author":"admin","date":"June 18, 2018","format":false,"excerpt":"Here is a quick post to share a tool I created a little while back. It is designed to help to quickly create Parent Constraints between two objects as well as easily allow the user to bake that constraint down. The script can be found HERE and there are a\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"http:\/\/www.vicdebaie.com\/blog\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/img_3937.jpg?fit=443%2C364&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":127,"url":"http:\/\/www.vicdebaie.com\/blog\/running-a-python-script-on-all-takes\/","url_meta":{"origin":518,"position":5},"title":"Running A Python Script On All Takes.\u00a0\ufeff","author":"admin","date":"February 18, 2017","format":false,"excerpt":"Being able to run a Python script on all takes within a MotionBuilder scene is a powerful time saver. Below I'm going to show how I learned to create a layer on every take within a MotionBuilder scene using Python. We are going to\u00a0use Python to create an Animation Layer\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"http:\/\/www.vicdebaie.com\/blog\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/518"}],"collection":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/comments?post=518"}],"version-history":[{"count":6,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/518\/revisions"}],"predecessor-version":[{"id":531,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/518\/revisions\/531"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/media\/522"}],"wp:attachment":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/media?parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/categories?post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/tags?post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}