{"id":169,"date":"2013-06-09T09:55:03","date_gmt":"2013-06-09T00:55:03","guid":{"rendered":"http:\/\/humrevlife.com\/?p=169"},"modified":"2013-06-09T11:46:09","modified_gmt":"2013-06-09T02:46:09","slug":"mwp-motionbuilder-with-python%e3%80%80%e3%81%9d%e3%81%ae4%e3%80%80%e3%80%8ctranslationrotationscaling%e5%80%a4%e3%81%ae%e5%8f%96%e5%be%97%e8%a8%ad%e5%ae%9a%e3%80%8d","status":"publish","type":"post","link":"https:\/\/humrevlife.com\/?p=169","title":{"rendered":"MWP (Motionbuilder With Python)\u3000\u305d\u306e4\u3000\u300cTranslation,Rotation,Scaling\u5024\u306e\u53d6\u5f97,\u8a2d\u5b9a\u300d"},"content":{"rendered":"<p>\u4eca\u56de\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eTRS\u306e\u5024\u3092\u5f97\u305f\u3044\u6642\u306e\u8a18\u8ff0\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p><span style=\"font-size: 18px;\"><strong>\u25a0TRS\u306e\u53d6\u5f97\u65b9\u6cd5<\/strong><\/span><\/p>\n<p>[python]<br \/>\n#!\/usr\/bin\/env python<br \/>\n# -*- coding: utf-8 -*-<br \/>\nfrom pyfbsdk import FBModelCube,FBVector3d,FBModelTransformationType<\/p>\n<p>lName = &quot;Cube&quot;<br \/>\nlMdl = FBModelCube(lName)<br \/>\nlMdl.Show = True<br \/>\nIS_GLOBAL = True<br \/>\nlTransform = FBModelTransformationType.kModelTranslation<br \/>\nlVec = FBVector3d()<\/p>\n<p>lMdl.GetVector( lVec, lTransform, IS_GLOBAL )<br \/>\nlMdl.SetVector( lVec, lTransform, IS_GLOBAL )<br \/>\n[\/python]<\/p>\n<p>IS_GLOBAL=False\u306b\u3059\u308b\u3068\u30ed\u30fc\u30ab\u30eb\u5024\u3092\u53d6\u5f97\u3001\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u306b\u3084\u3089\u77e5\u3089\u306a\u3044\u30af\u30e9\u30b9\u304c\u4e8c\u3064\u307b\u3069\u3042\u308b\u3068\u601d\u3046\u306e\u3067\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 18px;\"><strong>\u25a0FBVector3d( list = [0,0,0] )<\/strong><\/span><\/p>\n<p>\u5f15\u6570\u306b\u306f\u8981\u7d20\u304c3\u3064\u306efloat\u3067\u69cb\u6210\u3055\u308c\u305flist\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6e21\u3057\u307e\u3059\u3002<br \/>\n\u5f15\u6570\u306b\u4f55\u3082\u6e21\u3055\u306a\u3044\u3068\u304d\u306f\u81ea\u52d5\u7684\u306b[0,0,0]\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><strong>\u25a0\u4f7f\u7528\u65b9\u6cd5<\/strong><\/p>\n<p>[python]<br \/>\nlVec = FBVector3d()<br \/>\nlVec = FBVector3d(1,2,3)<br \/>\n[\/python]<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 18px;\"><strong>\u25a0FBModelTransformationType<\/strong><\/span><\/p>\n<p>vector,matrix\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eTransformationType\u3092\u9078\u3076\u305f\u3081\u306e\u30af\u30e9\u30b9\u3067\u3059\u3002<br \/>\n\u8a18\u8ff0\u3059\u308b\u3068\u304d\u306f\u3000<strong>FBModelTransformationType.Attribute<\/strong>\u3000\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070Translation\u3092\u6307\u5b9a\u3059\u308b\u3068\u304d\u306f\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059<\/p>\n<p><strong>\u25a0\u4f7f\u7528\u65b9\u6cd5<\/strong><\/p>\n<p>[python]<br \/>\nFBModelTransformationType.kModelTransformation<br \/>\n[\/python]<\/p>\n<p>&nbsp;<\/p>\n<p>A<em id=\"__mceDel\" style=\"font-size: 13.63636302947998px;\">ttribute\u306e\u90e8\u5206\u306f\u4e00\u89a7\u3068\u5165\u308c\u66ff\u3048\u308b\u3053\u3068\u3067\u64cd\u4f5c\u3059\u308bTransformationType\u3092\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/em><\/p>\n<p><strong>\u25a0Attribute\u4e00\u89a7<\/strong><\/p>\n<p>[python]<br \/>\nkModelTransformation<br \/>\nkModelRotation<br \/>\nkModelTranslation<br \/>\nkModelScaling<br \/>\nkModelTransformation_Geometry<br \/>\nkModelInverse_Transformation<br \/>\nkModelInverse_Rotation<br \/>\nkModelInverse_Translation<br \/>\nkModelInverse_Scaling<br \/>\nkModelInverse_Transformation_Geometry<br \/>\n[\/python]<\/p>\n","protected":false},"excerpt":{"rendered":"\u4eca\u56de\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eTRS\u306e\u5024\u3092\u5f97\u305f\u3044\u6642\u306e\u8a18\u8ff0\u65b9\u6cd5\u3067\u3059\u3002 \u25a0TRS\u306e\u53d6\u5f97\u65b9\u6cd5 [python] #!\/usr\/bin\/env python # -*- coding: utf-8 -*- from pyfbsdk imp &#8230;","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[27,25,237,26,28,18,38],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-motionbuilder","category-python","tag-get","tag-mb","tag-motionbuilder","tag-py","tag-pyfbsdk","tag-python-2","tag-set"],"_links":{"self":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169"}],"version-history":[{"count":16,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":179,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions\/179"}],"wp:attachment":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}