{"id":208,"date":"2013-06-14T00:31:08","date_gmt":"2013-06-13T15:31:08","guid":{"rendered":"http:\/\/humrevlife.com\/?p=208"},"modified":"2013-06-14T00:33:10","modified_gmt":"2013-06-13T15:33:10","slug":"mwp-motionbuilder-with-python%e3%80%80%e3%81%9d%e3%81%ae6%e3%80%80%e3%80%8cfbpropertylist%e3%81%a3%e3%81%a6%e4%bd%95%ef%bc%9f%e3%80%8d","status":"publish","type":"post","link":"https:\/\/humrevlife.com\/?p=208","title":{"rendered":"MWP (Motionbuilder With Python)\u3000\u305d\u306e6\u3000\u300cFBPropertyList\u3063\u3066\u4f55\uff1f\u300d"},"content":{"rendered":"<p>\u4eca\u56de\u306f<a title=\"MWP (Motionbuilder With Python)\u3000\u305d\u306e5\u3000\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89aa\u5b50\u4ed8\u3051\u300d\" href=\"http:\/\/humrevlife.com\/?p=196\">\u305d\u306e\uff15<\/a>\u3067\u3082\u3061\u3089\u3063\u3068\u7d39\u4ecb\u3057\u305fFBPropertyList\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>FBPropertyList\u304c\u4f55\u304b\u3068\u3044\u3048\u3070\u3053\u306eproperty\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Cube.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-231\" alt=\"06_PropertyList_Cube\" src=\"http:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Cube-300x141.jpg\" width=\"300\" height=\"141\" srcset=\"https:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Cube-300x141.jpg 300w, https:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Cube-500x236.jpg 500w, https:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Cube.jpg 749w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u9805\u76ee\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002\u30ab\u30e1\u30e9\u306a\u3089\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Camera.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-233\" alt=\"06_PropertyList_Camera\" src=\"http:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Camera-191x300.jpg\" width=\"191\" height=\"300\" srcset=\"https:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Camera-191x300.jpg 191w, https:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Camera-319x500.jpg 319w, https:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/06_PropertyList_Camera.jpg 442w\" sizes=\"auto, (max-width: 191px) 100vw, 191px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5168\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u77e5\u308a\u305f\u3044\u6642\u306b\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u8abf\u3079\u308c\u307e\u3059\u3002<\/p>\n<p><span style=\"font-size: 18px;\"><strong>\u25a0\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8abf\u3079\u308b(\u30b7\u30fc\u30f3\u5185\u306b&#8221;Camera&#8221;\u304c\u5b58\u5728\u3059\u308b\u3068\u304d)<\/strong><\/span><\/p>\n<p>[python]<br \/>\nfrom pyfbsdk import FBFindModelByLabelName<\/p>\n<p>lCam = FBFindModelByLabelName(&quot;Camera&quot;)<br \/>\nfor lProper in lCam.PropertyList:<br \/>\n    print lProper.Name<br \/>\n[\/python]<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u30d7\u30ed\u30d1\u30c6\u30a3\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u9805\u76ee\u306f\u5168\u3066\u64cd\u4f5c\u53ef\u80fd\u306a\u306e\u3067<a title=\"MWP (Motionbuilder With Python)\u3000\u305d\u306e4\u3000\u300cTranslation,Rotation,Scaling\u5024\u306e\u53d6\u5f97,\u8a2d\u5b9a\u300d\" href=\"http:\/\/humrevlife.com\/?p=169\">\u305d\u306e4<\/a>\u3067\u53d6\u308a\u6271\u3063\u305fTRS\u3082\u6271\u3048\u307e\u3059\u3002<\/p>\n<p><span style=\"font-size: 18px;\"><strong>\u25a0\u30d7\u30ed\u30d1\u30c6\u30a3\u30ea\u30b9\u30c8\u3092\u4f7f\u3063\u3066Translation\u3092\u52d5\u304b\u3059<\/strong><\/span><\/p>\n<p>[python]<br \/>\nfrom pyfbsdk import FBFindModelByLabelName,FBVector3d<\/p>\n<p>lCam = FBFindModelByLabelName(&quot;Camera&quot;)<br \/>\nlTrans = lCam.PropertyList.Find(&quot;Translation (Lcl)&quot;)<br \/>\nprint lTrans.Data<\/p>\n<p>#lTrans.Data[0] -= 20    #\u3053\u306e\u66f8\u304d\u65b9\u3067\u306f\u8a2d\u5b9a\u3067\u304d\u306a\u3044<br \/>\nlVec = lTrans.Data<br \/>\nlVec[0] -= 20<br \/>\nlTrans.Data = lVec<br \/>\nprint lTrans.Data<br \/>\n[\/python]<\/p>\n<p>&nbsp;<\/p>\n<p>FBPropetyList\u306eData\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p><span style=\"font-size: 13.63636302947998px;\">\u3053\u306e\u4f8b\u3067\u306f\u3001lTrans\u5909\u6570\u304c\u53d7\u3051\u53d6\u3063\u3066\u3044\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306fFBVector3d\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-size: 13.63636302947998px;\">\u6545\u306b\u8981\u7d20\u3054\u3068\u306b\u5024\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u306f\u305a\u306a\u306e\u3067\u3059\u304c<\/span><\/p>\n<p>lTrans.Data[0] -= 20<\/p>\n<p>\u3092\u5b9f\u884c\u3057\u3066\u3082\u4f55\u3082\u5909\u5316\u304c\u8d77\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3002\u3002<span style=\"font-size: 10px;\">\u3082\u3057\u304b\u3057\u3066AnimationKey\u3092\u6253\u3066\u3070\u3046\u307e\u304f\u3044\u304f\u306e\u304b\uff1f<\/span><\/p>\n<p>\u9762\u5012\u3067\u3059\u304clTrans.Data = FBVector3d()\u306e\u5f62\u5f0f\u3067\u8a2d\u5b9a\u3059\u308b\u306e\u304c\u5409\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong><span style=\"font-size: 16px;\">\u305f\u3060\u3057\u3001<\/span><\/strong><\/span>\u30d7\u30ed\u30d1\u30c6\u30a3\u30ea\u30b9\u30c8\u304b\u3089\u306e\u5024\u306e\u5909\u66f4\u3067\u304d\u308b\u9805\u76ee\u306f<span style=\"color: #ff0000; font-size: 16px;\">Local\u5024\uff01<\/span><\/p>\n<p>\u306a\u306e\u3067Global\u5024\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306fSetVector\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4eca\u56de\u306f\u305d\u306e\uff15\u3067\u3082\u3061\u3089\u3063\u3068\u7d39\u4ecb\u3057\u305fFBPropertyList\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u8aac\u660e\u3057\u307e\u3059\u3002 FBPropertyList\u304c\u4f55\u304b\u3068\u3044\u3048\u3070\u3053\u306eproperty\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u3053\u3068\u3067\u3059\u3002 &nbsp; \u3053\u306e\u30d7 &#8230;","protected":false},"author":1,"featured_media":231,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-motionbuilder","category-python"],"_links":{"self":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/208","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=208"}],"version-history":[{"count":9,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":240,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/208\/revisions\/240"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/media\/231"}],"wp:attachment":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}