{"id":90,"date":"2017-02-07T22:51:14","date_gmt":"2017-02-08T03:51:14","guid":{"rendered":"http:\/\/www.vicdebaie.com\/blog\/?p=90"},"modified":"2017-11-07T16:37:40","modified_gmt":"2017-11-07T21:37:40","slug":"creating-a-marker-or-helper","status":"publish","type":"post","link":"http:\/\/www.vicdebaie.com\/blog\/creating-a-marker-or-helper\/","title":{"rendered":"Creating A Marker or &#8220;Helper&#8221;"},"content":{"rendered":"<p><img data-attachment-id=\"97\" data-permalink=\"http:\/\/www.vicdebaie.com\/blog\/creating-a-marker-or-helper\/1d96d7e4-d9d3-4489-9424-5f373a051926-15581-00001fea536102c2_tmp\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/1D96D7E4-D9D3-4489-9424-5F373A051926-15581-00001FEA536102C2_tmp.png?fit=337%2C220\" data-orig-size=\"337,220\" 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=\"Nulls\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/1D96D7E4-D9D3-4489-9424-5F373A051926-15581-00001FEA536102C2_tmp.png?fit=300%2C196\" data-large-file=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/1D96D7E4-D9D3-4489-9424-5F373A051926-15581-00001FEA536102C2_tmp.png?fit=337%2C220\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-97 alignleft\" src=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/1D96D7E4-D9D3-4489-9424-5F373A051926-15581-00001FEA536102C2_tmp.png?resize=337%2C220\" alt=\"\" width=\"337\" height=\"220\" srcset=\"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/1D96D7E4-D9D3-4489-9424-5F373A051926-15581-00001FEA536102C2_tmp.png?w=337 337w, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/02\/1D96D7E4-D9D3-4489-9424-5F373A051926-15581-00001FEA536102C2_tmp.png?resize=300%2C196 300w\" sizes=\"(max-width: 337px) 100vw, 337px\" data-recalc-dims=\"1\" \/>Creating a simple marker in MotionBuilder using Python scripting.<\/p>\n<p>So here was a script that took some time for me.<br \/>\nChanging the Look of the marker through Python had me stumped (luckily I had a friend<br \/>\nwho could help).<\/p>\n<p>&nbsp;<\/p>\n<p>Changing the color of the null\/model was a long and exhausting process. There was a lot of google searching as well as tons of trial and error in trying to get Python to set the color. \u00a0Finally I solved it on my own and it felt great!<\/p>\n<p>The biggest thing I learned through this Python exercise was how to list out a model&#8217;s properties within the MotionBuilder Python Editor. This opened up a lot for me.\u00a0The bit of code to list a models properties starts on line 12.<\/p>\n<p>Another note is that below (in the codes comment) I added all the visuals for the Marker. You can read the &#8220;visual guide&#8221; and change the marker to visually fit your needs.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom pyfbsdk import *\r\n\r\n#Creat our &quot;marker&quot; and names it 'VicMarker'\r\nmarker = FBModelMarker('VicMarker')\r\n\r\n#Set our Marker to be visible\r\nmarker.Show = True\r\n\r\n#Set the size of the marker\r\nmarker.Size = 1000\r\n\r\n#List all poperties for &quot;marker&quot; so we can see what we want to set up\r\nfor property in marker.PropertyList:\r\n    # The following name can be used to obtain a property in FBComponent.PropertyList.Find(&lt;name&gt;)\r\n    print property.Name\r\n   \r\n#Set the &quot;Look&quot; property of the marker, the end # is the visual stle. See list below to find numeric values for each visual style\r\nmarker.PropertyList.Find('LookUI').Data=1\r\n# visual style values\r\n# 0 = Cube\r\n# 1 = Hard Cross\r\n# 2 = Light Cross\r\n# 3 = Sphere\r\n# 4 = Capsule\r\n# 5 = Box\r\n# 6 = Bone\r\n# 7 = Circle\r\n# 8 = Square\r\n# 9 = Stick\r\n# 10 = None\r\n# 11 = Rigid Goal\r\n# 12 = Rotation Goal\r\n# 13 = Aim\/Roll Goal\r\n\r\n\r\n#Set the color value for the marker\r\nmarker.Color = FBColor(0,1,1)\r\n<\/pre>\n<p>I hope this helps.<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Creating a simple marker in MotionBuilder using Python scripting. So here was a script that took some time for me. Changing the Look of the marker through Python had me stumped (luckily I had a friend who could help). &nbsp; Changing the color of the null\/model was a long and exhausting process. There was a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":97,"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":false,"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\/2017\/02\/1D96D7E4-D9D3-4489-9424-5F373A051926-15581-00001FEA536102C2_tmp.png?fit=337%2C220","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8pltq-1s","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":365,"url":"http:\/\/www.vicdebaie.com\/blog\/create-a-marker-with-a-random-generated-rgb-color\/","url_meta":{"origin":90,"position":0},"title":"Generate a random colored Marker through MotionBuilder Python Scripting","author":"admin","date":"June 12, 2017","format":false,"excerpt":"It's been awhile since I have posted, things have been really busy between working towards E3 and being a new dad. I thought I would do a really simple posting that was a lot of fun to figure out. :) Below is a script for creating a Marker\/Helper\/Null in Motionbuilder,\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\/06\/rainbow.jpg?fit=972%2C480&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/06\/rainbow.jpg?fit=972%2C480&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/06\/rainbow.jpg?fit=972%2C480&resize=700%2C400 2x"},"classes":[]},{"id":566,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-parent-constraint-tool\/","url_meta":{"origin":90,"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":645,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-a-better-way-to-create-constraints\/","url_meta":{"origin":90,"position":2},"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":175,"url":"http:\/\/www.vicdebaie.com\/blog\/%ef%bb%bfplotting-selected-properties-using-motionbuilders-python\/","url_meta":{"origin":90,"position":3},"title":"\ufeffPlotting selected properties using MotionBuilder&#8217;s Python.","author":"admin","date":"February 17, 2017","format":false,"excerpt":"I ran\u00a0the script I created in \"Animating and setting keys with MotionBuilder's Python Editor\"\u00a0and decided that I would use the scene it creates\u00a0to learn how to plot on selected properties in MotionBuilder's Python Editor. Update: I found a work around for the bug and it is covered in my \"lock-and-plot-selected-properties-using-motionbuilders-python\"\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":77,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-where-to-start\/","url_meta":{"origin":90,"position":4},"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":90,"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\/90"}],"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=90"}],"version-history":[{"count":11,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":451,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/90\/revisions\/451"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/media\/97"}],"wp:attachment":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}