{"id":2241,"date":"2016-10-20T19:02:13","date_gmt":"2016-10-20T18:02:13","guid":{"rendered":"http:\/\/www.puppygames.net\/blog\/?p=2241"},"modified":"2016-10-20T19:02:37","modified_gmt":"2016-10-20T18:02:37","slug":"import-unity-animation-timings-to-3dsmax","status":"publish","type":"post","link":"https:\/\/www.puppygames.net\/blog\/?p=2241","title":{"rendered":"Import Unity animation timings to 3dsMax"},"content":{"rendered":"<p><strong>The joys of Maxscript<\/strong>. <\/p>\n<p>Here&#8217;s a quick bit of code for grabbing the animation timings from a model that has been imported to Unity, and sticking them in an array. I&#8217;m using it to automatically fill in the multilistbox on the right, which lets me crop the timeline to the selected animations. <\/p>\n<div class=\"blogImg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2242\" src=\"https:\/\/www.puppygames.net\/blog\/wp-content\/uploads\/CATscript.jpg\" alt=\"catscript\" width=\"1141\" height=\"642\" srcset=\"https:\/\/www.puppygames.net\/blog\/wp-content\/uploads\/CATscript.jpg 1141w, https:\/\/www.puppygames.net\/blog\/wp-content\/uploads\/CATscript-300x169.jpg 300w, https:\/\/www.puppygames.net\/blog\/wp-content\/uploads\/CATscript-768x432.jpg 768w, https:\/\/www.puppygames.net\/blog\/wp-content\/uploads\/CATscript-1024x576.jpg 1024w\" sizes=\"(max-width: 1141px) 100vw, 1141px\" \/><\/div>\n<p><code><br \/>\nunityAnimList = #()<br \/>\ns = openFile (pathName+characterName+\".fbx.meta\")<br \/>\nskipToString s \"clipAnimations:\"<br \/>\nwhile ((skipToString s \"name: \")!=undefined) do (<br \/>\n&emsp;animName = readline s<br \/>\n&emsp;skipToString s \"firstFrame: \"<br \/>\n&emsp;firstFrame = readline s as integer<br \/>\n&emsp;skipToString s \"lastFrame: \"<br \/>\n&emsp;lastFrame = readline s as integer<br \/>\n&emsp;anim = #(animName,firstFrame,lastFrame)<br \/>\n&emsp;append unityAnimList anim<br \/>\n)<br \/>\nclose s<br \/>\n<\/code><\/p>\n<p>Normal postcard service will resume at some point in the future, <em>probably<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The joys of Maxscript. Here&#8217;s a quick bit of code for grabbing the animation timings from a model that has been imported to Unity, and sticking them in an array. I&#8217;m using it to automatically fill in the multilistbox on the right, which lets me crop the timeline to the selected animations. unityAnimList = #() [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[24],"class_list":["post-2241","post","type-post","status-publish","format-standard","hentry","category-diary","tag-basingstoke"],"_links":{"self":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2241"}],"collection":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2241"}],"version-history":[{"count":9,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2241\/revisions"}],"predecessor-version":[{"id":2251,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2241\/revisions\/2251"}],"wp:attachment":[{"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puppygames.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}