{"id":419,"date":"2017-10-15T19:06:01","date_gmt":"2017-10-15T23:06:01","guid":{"rendered":"http:\/\/www.vicdebaie.com\/blog\/?p=419"},"modified":"2018-03-06T12:40:46","modified_gmt":"2018-03-06T17:40:46","slug":"re-visting-motionbuilders-python-dir","status":"publish","type":"post","link":"http:\/\/www.vicdebaie.com\/blog\/re-visting-motionbuilders-python-dir\/","title":{"rendered":"Re-visting MotionBuilder&#8217;s Python Dir()"},"content":{"rendered":"<p>In a <a href=\"http:\/\/www.vicdebaie.com\/blog\/getting-information-on-motionbuilders-python-with-dir\/\">previous post<\/a> I briefly talked about the dir() command within python. The dir() command is an invaluable tool when trying to discover valid attributes.<\/p>\n<p>This is going to be a very quick post on how I have been using the print dir() command to list out attribute with a vertical read out instead of a horizontal read out.<\/p>\n<p>here is an example for both horizontal and vertical to better illustrate:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n## Horizontal Read out\r\nprint dir(FBApplication())\r\n\r\n## Vertical Read out\r\nfor items in dir(FBApplication()):\r\n    print items\r\n<\/pre>\n<p>I personally prefer the vertical read out, I find it easier to read and search through.<\/p>\n<p>As always, I hope this helps. \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>In a previous post I briefly talked about the dir() command within python. The dir() command is an invaluable tool when trying to discover valid attributes. This is going to be a very quick post on how I have been using the print dir() command to list out attribute with a vertical read out instead [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"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":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8pltq-6L","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":288,"url":"http:\/\/www.vicdebaie.com\/blog\/getting-information-on-motionbuilders-python-with-dir\/","url_meta":{"origin":419,"position":0},"title":"Getting information on MotionBuilder&#8217;s Python with dir","author":"admin","date":"March 13, 2017","format":false,"excerpt":"Trying to figure how things work in MotionBuilder's Python editor is tough. Google and the SDK Help that comes along with MotionBuilder are great, but there is still more help out there - the \"dir\"! :) What does \"dir\" do? The definition I was able to find is \"It gives\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":596,"url":"http:\/\/www.vicdebaie.com\/blog\/motionbuilder-python-my-fav-story-functions\/","url_meta":{"origin":419,"position":1},"title":"MotionBuilder Python My Fav Story Functions","author":"admin","date":"July 17, 2018","format":false,"excerpt":"After posting \"MotionBuilder Python Library aka. My Fav Functions\" I thought I would follow up with some breakdown on manipulating Story Tracks, Clips and Folders with MotionBuilder's Python modules. I briefly covered this a while ago here but that was really just an example of how to put characters into\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\/07\/Storycheatsheet.jpg?fit=782%2C474&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/07\/Storycheatsheet.jpg?fit=782%2C474&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/07\/Storycheatsheet.jpg?fit=782%2C474&resize=700%2C400 2x"},"classes":[]},{"id":469,"url":"http:\/\/www.vicdebaie.com\/blog\/running-a-python-script-on-every-motionbuilder-file-within-a-directory\/","url_meta":{"origin":419,"position":2},"title":"Running a Python Script On Every MotionBuilder File Within A Directory","author":"admin","date":"March 6, 2018","format":false,"excerpt":"It's been awhile since I have posted, We are approaching launch of my next game tittle and now that I have a free moment I thought I would demonstrate how to run a python script on multiple \".fbx\" files. All the \".fbx\" files for this demo will exist within 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\/03\/Possibility.jpg?fit=960%2C627&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/03\/Possibility.jpg?fit=960%2C627&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/03\/Possibility.jpg?fit=960%2C627&resize=700%2C400 2x"},"classes":[]},{"id":492,"url":"http:\/\/www.vicdebaie.com\/blog\/returning-a-specific-word-from-motionbuilders-python-dir\/","url_meta":{"origin":419,"position":3},"title":"Returning A Specific Word From MotionBuilder&#8217;s Python Dir()","author":"admin","date":"March 8, 2018","format":false,"excerpt":"I'm not sure why I did not think of this before, here is a little function that will search a user specified module using dir(), but it will also search the components and only return the ones that match the user's specified filtered word. Let me explain with an example.\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\/03\/simplepath.jpg?fit=1024%2C683&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/03\/simplepath.jpg?fit=1024%2C683&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2018\/03\/simplepath.jpg?fit=1024%2C683&resize=700%2C400 2x"},"classes":[]},{"id":274,"url":"http:\/\/www.vicdebaie.com\/blog\/using-python-to-import-motionbuilder-characters-into-story\/","url_meta":{"origin":419,"position":4},"title":"Using Python to import MotionBuilder Characters into story.\u00a0","author":"admin","date":"April 6, 2017","format":false,"excerpt":"\u00a0 MotionBuilder comes with a great script that will place your selected character into a Character Track within the Story, I wanted to write one that would put all of the scene's Characters into the story. Once again I will use the \"Mia_Rigged.fbx\" file to test my script. I created\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\/04\/MobuPython_StoryScript.jpg?fit=1011%2C224&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/04\/MobuPython_StoryScript.jpg?fit=1011%2C224&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.vicdebaie.com\/blog\/wp-content\/uploads\/2017\/04\/MobuPython_StoryScript.jpg?fit=1011%2C224&resize=700%2C400 2x"},"classes":[]},{"id":292,"url":"http:\/\/www.vicdebaie.com\/blog\/mirroring-motionbuilder-character-animation-with-python\/","url_meta":{"origin":419,"position":5},"title":"Mirroring MotionBuilder Character Animation with Python","author":"admin","date":"March 13, 2017","format":false,"excerpt":"In a previous post I went over \"Plotting and Plot Options\" as well as \"dir\" where we exposed the \"MirrorMode\" of a Character. Now with all that information exposed I will show you how I created a simple script that will mirror a\u00a0Character's animation, first by setting the \"MirrorMode\" to\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_4039-1.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/419"}],"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=419"}],"version-history":[{"count":4,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":423,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/posts\/419\/revisions\/423"}],"wp:attachment":[{"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.vicdebaie.com\/blog\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}