{"id":542,"date":"2018-06-08T12:50:05","date_gmt":"2018-06-08T16:50:05","guid":{"rendered":"http:\/\/www.vicdebaie.com\/blog\/?p=542"},"modified":"2018-06-08T12:50:05","modified_gmt":"2018-06-08T16:50:05","slug":"using-motionbuilder-pythons-fbvector3d-to-create-an-animated-align-tool","status":"publish","type":"post","link":"http:\/\/www.vicdebaie.com\/blog\/using-motionbuilder-pythons-fbvector3d-to-create-an-animated-align-tool\/","title":{"rendered":"Using MotionBuilder Python&#8217;s FBVector3d() To Create An Animated Align Tool"},"content":{"rendered":"<p><img data-attachment-id=\"543\" data-permalink=\"http:\/\/www.vicdebaie.com\/blog\/using-motionbuilder-pythons-fbvector3d-to-create-an-animated-align-tool\/2018-06-08_11-33-47\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?fit=789%2C431\" data-orig-size=\"789,431\" 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\/06\/2018-06-08_11-33-47.jpg?fit=300%2C164\" data-large-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?fit=678%2C370\" decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-543\" src=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?resize=678%2C370\" alt=\"\" width=\"678\" height=\"370\" srcset=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?w=789 789w, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?resize=300%2C164 300w, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?resize=768%2C420 768w, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?resize=732%2C400 732w\" sizes=\"(max-width: 678px) 100vw, 678px\" data-recalc-dims=\"1\" \/><\/p>\n<p>While exploring\u00a0MotionBuilder Python&#8217;s FBVector3d() I decided I would create an exercise for myself that would be the creation of an Animated Align Tool. Using a constraint and animating the weights will do give similar results, but I thought an Animated Align Tool in MotionBuilder would be a fun little exercise.<\/p>\n<p>Below I will post the script and break down some key areas. If you want to down load the script you can find it <a href=\"https:\/\/drive.google.com\/open?id=1g1GyFgledvH_4mHkTG3_vffuEP4tSG-0\">here<\/a>.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/exfTwhsySF0\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><br \/>\nA video demo of the Tool can be found <a href=\"https:\/\/youtu.be\/exfTwhsySF0\">here as well<\/a>.<\/p>\n<p>Now let us get started. \ud83d\ude42<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport pyfbsdk as fb\r\nimport pyfbsdk_additions as fba\r\nfrom random import *\r\n\r\n##Get Current Frame\r\ndef GetCurrentFrame():\r\nreturn fb.FBSystem().LocalTime.GetFrame()\r\n\r\n##Goto User Specified Frame ie. GotoFrame(15) Will Place The Time Slider\/Play Head On Frame 15\r\ndef GotoFrame(frame):\r\nt = fb.FBTime(0, 0, 0, frame, 0)\r\nfb.FBPlayerControl().Goto(t)\r\n\r\n##Returns A List Of All Selected Models\r\ndef GetSelModels():\r\nlSelModels = &#x5B;]\r\nmodelList = fb.FBModelList ()\r\nfb.FBGetSelectedModels (modelList, None, True)\r\nfor model in modelList:\r\nif model.Selected == True:\r\nlSelModels.extend(&#x5B;model])\r\nelse:\r\npass\r\nif len(lSelModels) != 1:\r\nfb.FBMessageBox( &quot;Object Select Error&quot;, &quot;Please Pick 1 Object&quot;, &quot;OK&quot; )\r\npass\r\nelse:\r\nreturn lSelModels\r\n\r\n##Clear Selection Of All Models\r\ndef ClearSelected():\r\nmodelList = fb.FBModelList()\r\nfb.FBGetSelectedModels ( modelList, None, True )\r\nfor model in modelList:\r\nmodel.Selected = False\r\n\r\n##Get Model By Long Name ie. GetModel('Character_01:Ctrl:HipsEffector') Will Return The HipEffector Of The Character Within Your Scene That Has The NameSpace &quot;Character_01&quot;\r\ndef GetModel(longname):\r\nlModel = fb.FBFindModelByLabelName(longname)\r\nreturn lModel\r\n\r\n##Animated Align: &quot;obj&quot; = Object You Want To Align, &quot;source&quot; = Object You Want To Align To, &quot;start&quot; = Frame You Wish To Start On And &quot;end&quot; = The Frame You Wish To Stop At\r\ndef AnimatedAlign(obj, source, start, end):\r\norgFrame = GetCurrentFrame()\r\nGotoFrame(start)\r\n##Create a loop for our time range\r\nfor t in range (start, (end+1)):\r\nf = GetCurrentFrame()\r\n##Get Our Source's Translation And Rotation\r\nsourceTrans = fb.FBVector3d()\r\nsourceRot = fb.FBVector3d()\r\nsource.GetVector (sourceTrans, fb.FBModelTransformationMatrix.kModelTranslation, False)\r\nsource.GetVector (sourceRot, fb.FBModelTransformationMatrix.kModelRotation, False)\r\n##Match Our Object's Translation And Rotation To Match That Of Our Source\r\nobj.Translation = sourceTrans\r\nobj.Translation.Key()\r\nobj.Rotation = sourceRot\r\nobj.Rotation.Key()\r\n##Goto Next Frame\r\nGotoFrame( (t+1) )\r\n##Clean Up\r\ndel f, sourceTrans, sourceRot\r\n##Go Back To The Original Frame That The User Was On When They Ran The Script - This Creates A Better User Experience\r\nGotoFrame(orgFrame)\r\n\r\n##UI Get Target Object Button Function\r\ndef bGetTargetCallBack(control, event):\r\ntargetObj = GetSelModels()\r\nif targetObj == None:\r\npass\r\nelse:\r\neTarget.Text = targetObj&#x5B;0].LongName\r\n\r\n##UI Get Source Object Button Function\r\ndef bGetSourceCallBack(control, event):\r\ntargetObj = GetSelModels()\r\nif targetObj == None:\r\npass\r\nelse:\r\neSource.Text = targetObj&#x5B;0].LongName\r\n\r\n##UI Get Start Frame Button Function\r\ndef bGetStartCallBack(control, event):\r\nstartFrame = GetCurrentFrame()\r\neStart.Text = str(startFrame)\r\n\r\n##UI Get End Frame Button Function\r\ndef bGetEndCallBack(control, event):\r\nendFrame = GetCurrentFrame()\r\neEnd.Text = str(endFrame)\r\n\r\n##UI Add A Marker Button Function\r\ndef AddMarkerCallBack(control, event):\r\nClearSelected()\r\nlR = random()\r\nlG = random()\r\nlB = random()\r\nlHelper = fb.FBModelMarker(eMarker.Text)\r\nlHelper.Show = True\r\nlHelper.Size = 1000\r\nlHelper.PropertyList.Find('LookUi').Data = 2\r\nlHelper.Color = fb.FBColor(lR,lG,lB)\r\nlHelper.Selected = True\r\n\r\n##UI Execute Animated Align Button Function\r\ndef bExecuteCallBack(control, event):\r\nobj = GetModel(eTarget.Text)\r\nsource = GetModel(eSource.Text)\r\nstart = int(eStart.Text)\r\nend = int(eEnd.Text)\r\nif start &amp;gt;= end:\r\nfb.FBMessageBox( &quot;Frame Input Error&quot;, &quot;Start Frame Can Not Be Less Than End Frame&quot;, &quot;OK&quot; )\r\npass\r\nif obj == source:\r\nfb.FBMessageBox( &quot;Object Input Error&quot;, &quot;Source Object And Target Object Can Not Be The Same Objects&quot;, &quot;OK&quot; )\r\npass\r\nelse:\r\nAnimatedAlign(obj, source, start, end)\r\n\r\nfb.FBSystem().Scene.Evaluate()\r\n\r\n##UI Button Variables\r\nlTarget = fb.FBLabel()\r\neTarget = fb.FBEdit()\r\nbGetTarget = fb.FBButton()\r\nlSource = fb.FBLabel()\r\neSource = fb.FBEdit()\r\nbGetSource = fb.FBButton()\r\nlStart = fb.FBLabel()\r\neStart = fb.FBEdit()\r\nbGetStart = fb.FBButton()\r\nlEnd = fb.FBLabel()\r\neEnd = fb.FBEdit()\r\nbGetEnd = fb.FBButton()\r\nhMarTitle = fb.FBLabel()\r\nhMarker = fb.FBLabel()\r\neMarker = fb.FBEdit()\r\nbMarker = fb.FBButton()\r\nbExecute = fb.FBButton()\r\n\r\n##Create UI Layout\r\ndef PopulateTool(t):\r\n#populate regions here\r\n\r\nx = fb.FBAddRegionParam(25,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(15,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(270,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(20,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;lTarget&quot;,&quot;lTarget&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;lTarget&quot;, lTarget)\r\nlTarget.Visible = True\r\nlTarget.ReadOnly = False\r\nlTarget.Enabled = True\r\nlTarget.Hint = &quot;&quot;\r\nlTarget.Caption = &quot;Target Object:&quot;\r\nlTarget.Style = fb.FBTextStyle.kFBTextStyleNone\r\nlTarget.Justify = fb.FBTextJustify.kFBTextJustifyLeft\r\nlTarget.WordWrap = True\r\n\r\nx = fb.FBAddRegionParam(25,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(35,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(270,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(35,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;eTarget&quot;,&quot;eTarget&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;eTarget&quot;, eTarget)\r\neTarget.Visible = True\r\neTarget.ReadOnly = False\r\neTarget.Enabled = True\r\neTarget.Hint = &quot;&quot;\r\neTarget.Text = &quot;&quot;\r\neTarget.PasswordMode = False\r\n\r\nx = fb.FBAddRegionParam(305,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(40,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;bGetTarget&quot;,&quot;bGetTarget&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;bGetTarget&quot;, bGetTarget)\r\nbGetTarget.Visible = True\r\nbGetTarget.ReadOnly = False\r\nbGetTarget.Enabled = True\r\nbGetTarget.Hint = &quot;&quot;\r\nbGetTarget.Caption = &quot;{]&quot;\r\nbGetTarget.State = 0\r\nbGetTarget.Style = fb.FBButtonStyle.kFBPushButton\r\nbGetTarget.Justify = fb.FBTextJustify.kFBTextJustifyCenter\r\nbGetTarget.Look = fb.FBButtonLook.kFBLookNormal\r\nbGetTarget.OnClick.Add(bGetTargetCallBack)\r\n\r\nx = fb.FBAddRegionParam(25,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(85,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(270,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(20,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;lSource&quot;,&quot;lSource&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;lSource&quot;, lSource)\r\nlSource.Visible = True\r\nlSource.ReadOnly = False\r\nlSource.Enabled = True\r\nlSource.Hint = &quot;&quot;\r\nlSource.Caption = &quot;Source Object:&quot;\r\nlSource.Style = fb.FBTextStyle.kFBTextStyleNone\r\nlSource.Justify = fb.FBTextJustify.kFBTextJustifyLeft\r\nlSource.WordWrap = True\r\n\r\nx = fb.FBAddRegionParam(25,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(105,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(270,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(35,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;eSource&quot;,&quot;eSource&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;eSource&quot;, eSource)\r\neSource.Visible = True\r\neSource.ReadOnly = False\r\neSource.Enabled = True\r\neSource.Hint = &quot;&quot;\r\neSource.Text = &quot;&quot;\r\neSource.PasswordMode = False\r\n\r\nx = fb.FBAddRegionParam(305,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(110,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;bGetSource&quot;,&quot;bGetSource&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;bGetSource&quot;, bGetSource)\r\nbGetSource.Visible = True\r\nbGetSource.ReadOnly = False\r\nbGetSource.Enabled = True\r\nbGetSource.Hint = &quot;&quot;\r\nbGetSource.Caption = &quot;{]&quot;\r\nbGetSource.State = 0\r\nbGetSource.Style = fb.FBButtonStyle.kFBPushButton\r\nbGetSource.Justify = fb.FBTextJustify.kFBTextJustifyCenter\r\nbGetSource.Look = fb.FBButtonLook.kFBLookNormal\r\nbGetSource.OnClick.Add(bGetSourceCallBack)\r\n\r\nx = fb.FBAddRegionParam(25,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(160,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(65,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(20,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;lStart&quot;,&quot;lStart&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;lStart&quot;, lStart)\r\nlStart.Visible = True\r\nlStart.ReadOnly = False\r\nlStart.Enabled = True\r\nlStart.Hint = &quot;&quot;\r\nlStart.Caption = &quot;Start Frame:&quot;\r\nlStart.Style = fb.FBTextStyle.kFBTextStyleNone\r\nlStart.Justify = fb.FBTextJustify.kFBTextJustifyLeft\r\nlStart.WordWrap = True\r\n\r\nx = fb.FBAddRegionParam(25,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(180,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(60,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(35,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;eStart&quot;,&quot;eStart&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;eStart&quot;, eStart)\r\neStart.Visible = True\r\neStart.ReadOnly = False\r\neStart.Enabled = True\r\neStart.Hint = &quot;&quot;\r\neStart.Text = &quot;&quot;\r\neStart.PasswordMode = False\r\n\r\nx = fb.FBAddRegionParam(95,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(185,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;bGetStart&quot;,&quot;bGetStart&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;bGetStart&quot;, bGetStart)\r\nbGetStart.Visible = True\r\nbGetStart.ReadOnly = False\r\nbGetStart.Enabled = True\r\nbGetStart.Hint = &quot;&quot;\r\nbGetStart.Caption = &quot;{]&quot;\r\nbGetStart.State = 0\r\nbGetStart.Style = fb.FBButtonStyle.kFBPushButton\r\nbGetStart.Justify = fb.FBTextJustify.kFBTextJustifyCenter\r\nbGetStart.Look = fb.FBButtonLook.kFBLookNormal\r\nbGetStart.OnClick.Add(bGetStartCallBack)\r\n\r\nx = fb.FBAddRegionParam(235,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(160,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(60,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(20,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;lEnd&quot;,&quot;lEnd&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;lEnd&quot;, lEnd)\r\nlEnd.Visible = True\r\nlEnd.ReadOnly = False\r\nlEnd.Enabled = True\r\nlEnd.Hint = &quot;&quot;\r\nlEnd.Caption = &quot;End Frame:&quot;\r\nlEnd.Style = fb.FBTextStyle.kFBTextStyleNone\r\nlEnd.Justify = fb.FBTextJustify.kFBTextJustifyLeft\r\nlEnd.WordWrap = True\r\n\r\nx = fb.FBAddRegionParam(235,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(180,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(60,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(35,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;eEnd&quot;,&quot;eEnd&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;eEnd&quot;, eEnd)\r\neEnd.Visible = True\r\neEnd.ReadOnly = False\r\neEnd.Enabled = True\r\neEnd.Hint = &quot;&quot;\r\neEnd.Text = &quot;&quot;\r\neEnd.PasswordMode = False\r\n\r\nx = fb.FBAddRegionParam(305,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(185,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(30,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;bGetEnd&quot;,&quot;bGetEnd&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;bGetEnd&quot;, bGetEnd)\r\nbGetEnd.Visible = True\r\nbGetEnd.ReadOnly = False\r\nbGetEnd.Enabled = True\r\nbGetEnd.Hint = &quot;&quot;\r\nbGetEnd.Caption = &quot;{]&quot;\r\nbGetEnd.State = 0\r\nbGetEnd.Style = fb.FBButtonStyle.kFBPushButton\r\nbGetEnd.Justify = fb.FBTextJustify.kFBTextJustifyCenter\r\nbGetEnd.Look = fb.FBButtonLook.kFBLookNormal\r\nbGetEnd.OnClick.Add(bGetEndCallBack)\r\n\r\nx = fb.FBAddRegionParam(0,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(235,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(400,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(15,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;hMarTitle&quot;,&quot;hMarTitle&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;hMarTitle&quot;, hMarTitle)\r\nhMarTitle.Visible = True\r\nhMarTitle.ReadOnly = False\r\nhMarTitle.Enabled = True\r\nhMarTitle.Hint = &quot;&quot;\r\nhMarTitle.Caption = &quot;Create A Marker&quot;\r\nhMarTitle.Style = fb.FBTextStyle.kFBTextStyleNone\r\nhMarTitle.Justify = fb.FBTextJustify.kFBTextJustifyCenter\r\nhMarTitle.WordWrap = False\r\n\r\nx = fb.FBAddRegionParam(10,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(260,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(180,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(15,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;hMarker&quot;,&quot;hMarker&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;hMarker&quot;, hMarker)\r\nhMarker.Visible = True\r\nhMarker.ReadOnly = False\r\nhMarker.Enabled = True\r\nhMarker.Hint = &quot;&quot;\r\nhMarker.Caption = &quot;Marker Name:&quot;\r\nhMarker.Style = fb.FBTextStyle.kFBTextStyleNone\r\nhMarker.Justify = fb.FBTextJustify.kFBTextJustifyLeft\r\nhMarker.WordWrap = True\r\n\r\nx = fb.FBAddRegionParam(90,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(255,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(200,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(20,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;eMarker&quot;,&quot;eMarker&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;eMarker&quot;, eMarker)\r\neMarker.Visible = True\r\neMarker.ReadOnly = False\r\neMarker.Enabled = True\r\neMarker.Hint = &quot;&quot;\r\neMarker.Text = &quot;Marker&quot;\r\neMarker.Style = fb.FBTextStyle.kFBTextStyleNone\r\neMarker.Justify = fb.FBTextJustify.kFBTextJustifyLeft\r\neMarker.WordWrap = True\r\n\r\nx = fb.FBAddRegionParam(300,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(255,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(20,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(20,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;bMarker&quot;,&quot;bMarker&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;bMarker&quot;, bMarker)\r\nbMarker.Visible = True\r\nbMarker.ReadOnly = False\r\nbMarker.Enabled = True\r\nbMarker.Hint = &quot;&quot;\r\nbMarker.Caption = &quot;+&quot;\r\nbMarker.State = 0\r\nbMarker.Style = fb.FBButtonStyle.kFBPushButton\r\nbMarker.Justify = fb.FBTextJustify.kFBTextJustifyCenter\r\nbMarker.Look = fb.FBButtonLook.kFBLookNormal\r\nbMarker.OnClick.Add(AddMarkerCallBack)\r\n\r\nx = fb.FBAddRegionParam(85,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\ny = fb.FBAddRegionParam(300,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nw = fb.FBAddRegionParam(210,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nh = fb.FBAddRegionParam(55,fb.FBAttachType.kFBAttachNone,&quot;&quot;)\r\nt.AddRegion(&quot;bExecute&quot;,&quot;bExecute&quot;, x, y, w, h)\r\n\r\nt.SetControl(&quot;bExecute&quot;, bExecute)\r\nbExecute.Visible = True\r\nbExecute.ReadOnly = False\r\nbExecute.Enabled = True\r\nbExecute.Hint = &quot;&quot;\r\nbExecute.Caption = &quot;Execute&quot;\r\nbExecute.State = 0\r\nbExecute.Style = fb.FBButtonStyle.kFBPushButton\r\nbExecute.Justify = fb.FBTextJustify.kFBTextJustifyCenter\r\nbExecute.Look = fb.FBButtonLook.kFBLookNormal\r\nbExecute.OnClick.Add(bExecuteCallBack)\r\n\r\n##Creat Tool Window\r\ndef CreateTool():\r\nt = fba.FBCreateUniqueTool(&quot;Animated Align Tool v1.0&quot;)\r\nt.StartSizeX = 400\r\nt.StartSizeY = 420\r\nPopulateTool(t)\r\nfb.ShowTool(t)\r\nCreateTool()\r\n<\/pre>\n<p>&nbsp;<\/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>While exploring\u00a0MotionBuilder Python&#8217;s FBVector3d() I decided I would create an exercise for myself that would be the creation of an Animated Align Tool. Using a constraint and animating the weights will do give similar results, but I thought an Animated Align Tool in MotionBuilder would be a fun little exercise. Below I will post the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":543,"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,8],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/06\/2018-06-08_11-33-47.jpg?fit=789%2C431","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8pltq-8K","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":739,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-choose-interaction-mode-tool\/","url_meta":{"origin":542,"position":0},"title":"MotionBuilder Python -Choose Interaction Mode Tool","author":"admin","date":"November 18, 2019","format":false,"excerpt":"A quick script that allows the user to change Motionbuilder's Interaction Mode with a single click","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\/2019\/11\/GUID-1F064D55-DE9A-4005-9179-80AAAAD4B3AA.png?fit=356%2C202&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":566,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-parent-constraint-tool\/","url_meta":{"origin":542,"position":1},"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":63,"url":"http:\/\/www.vicdebaie.com\/blog\/hello-world-a-k-a-let-us-begin\/","url_meta":{"origin":542,"position":2},"title":"Hello World! &#8211; A.k.a &#8220;Let us begin&#8221;","author":"admin","date":"February 6, 2017","format":false,"excerpt":"Here is my first posting for this experiment - \"the blog\". For the last two weeks I have been mucking around with Python scripting within MotionBuilder. It has been an uphill battle. With the limited resources out there all I can really do is hack away at bits and pieces\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_3934.jpg?fit=526%2C492&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":190,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-tool-saveit\/","url_meta":{"origin":542,"position":3},"title":"MotionBuilder Python Tool &#8220;SaveIt&#8221;","author":"admin","date":"February 12, 2017","format":false,"excerpt":"Here is a script\/tool I created for MotionBuilder using Python. \u00a0This tool will\u00a0do an incremental save of your scene. Why? Incremental saves are amazingly useful, I thought a tool that automates the process down to one click would be fun. A big thanks goes out to my college Raphael Lappiere\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\/SaveIt_tool.jpg?fit=600%2C220&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":645,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-a-better-way-to-create-constraints\/","url_meta":{"origin":542,"position":4},"title":"MotionBuilder Python &#8211; A Better Way To Create Constraints","author":"admin","date":"November 14, 2018","format":false,"excerpt":"Update Thanks to\u00a0kilianeczka\u00a0for the heads up, there is even an EASIER easy way to create a constraint using MotionBuilder and Python [code language=\"python\"] import pyfbsdk as fb fb.FBConstraintManager().TypeCreateConstraint('Parent\/Child') [\/code] This omits the need to find the number of constraints and then search all the constraints for one that has the\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\/11\/Think^_Is_There_a_Better_Way_to_Do_it^_-_NARA_-_534256.jpg?fit=400%2C204&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":542,"position":5},"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":[]}],"_links":{"self":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/542"}],"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=542"}],"version-history":[{"count":5,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/542\/revisions"}],"predecessor-version":[{"id":548,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/542\/revisions\/548"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/media\/543"}],"wp:attachment":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/media?parent=542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/categories?post=542"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/tags?post=542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}