{"id":196,"date":"2013-06-10T23:48:54","date_gmt":"2013-06-10T14:48:54","guid":{"rendered":"http:\/\/humrevlife.com\/?p=196"},"modified":"2013-06-12T22:18:22","modified_gmt":"2013-06-12T13:18:22","slug":"mwp-motionbuilder-with-python%e3%80%80%e3%81%9d%e3%81%ae5%e3%80%80%e3%80%8c%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%81%ae%e8%a6%aa%e5%ad%90%e4%bb%98%e3%81%91%e3%80%8d","status":"publish","type":"post","link":"https:\/\/humrevlife.com\/?p=196","title":{"rendered":"MWP (Motionbuilder With Python)\u3000\u305d\u306e5\u3000\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89aa\u5b50\u4ed8\u3051\u300d"},"content":{"rendered":"<p>\u4eca\u56de\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89aa\u5b50\u4ed8\u3051\u3002<br \/>\n\u30b9\u30b1\u30de\u30c6\u30a3\u30c3\u30af\u30d3\u30e5\u30fc\u3067\u78ba\u8a8d\u3057\u305f\u3068\u304d\u306e\u30b3\u30ec\u3067\u3059\u3002<\/p>\n<div id=\"attachment_199\" style=\"width: 214px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/05_ParentChild.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-199\" class=\"size-full wp-image-199\" alt=\"\u5b9f\u884c\u7d50\u679c\" src=\"http:\/\/humrevlife.com\/wp-content\/uploads\/2013\/06\/05_ParentChild.jpg\" width=\"204\" height=\"190\" \/><\/a><p id=\"caption-attachment-199\" class=\"wp-caption-text\">\u5b9f\u884c\u7d50\u679c<\/p><\/div>\n<p>\u4eca\u56de\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u5b9f\u884c\u3059\u308b\u3068\u5b9f\u884c\u7d50\u679c\u306e\u753b\u50cf\u306e\u3088\u3046\u306a\u968e\u5c64\u69cb\u9020\u304c\u3067\u304d\u3042\u304c\u308a\u307e\u3059\u3002<br \/>\n\u30b3\u30f3\u30b9\u30c8\u30ec\u30a4\u30f3\u30c8\u306eParent\/Child\u3092\u671f\u5f85\u3057\u305f\u65b9\u306f\u3082\u3046\u5c11\u3057\u5f85\u3063\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nFBPropertyList\u3092\u4f7f\u3048\u308b\u7528\u306b\u306a\u3063\u3066\u304b\u3089\u52c9\u5f37\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><span style=\"font-size: 18px;\"><strong>\u25a0\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89aa\u5b50\u4ed8\u3051<\/strong><\/span><\/p>\n<p>[python]<br \/>\n#!\/usr\/bin\/env python<br \/>\n# -*- coding: utf-8 -*-<br \/>\nfrom pyfbsdk import FBModelCube<\/p>\n<p>lName = &quot;Cube_Parent&quot;<br \/>\nlParent = FBModelCube(lName)<br \/>\nlParent.Show = True<\/p>\n<p>lName = &quot;Cube_Child&quot;<br \/>\nlChildA = FBModelCube(lName)<br \/>\nlChildA.Show = True<\/p>\n<p>lChildB = FBModelCube(lName)        #\u540c\u4e00\u540d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3068\u300c 1\u300d\u304c\u540d\u524d\u306e\u8a9e\u5c3e\u306b\u4ed8\u52a0\u3055\u308c\u307e\u3059\u3002<br \/>\nlChildB.Show = True<\/p>\n<p>lChildA.Parent = lParent            #lChildA\u306e\u89aa\u3092lParent\u306b\u3057\u307e\u3059\u3002<br \/>\nlParent.Children.append(lChildB)    #lParent\u306e\u5b50\u968e\u5c64\u306blChildB\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>##lChildB.Parent = None                   #\u89aa\u5b50\u4ed8\u3051\u3092\u89e3\u9664\u3059\u308b<br \/>\n##lIdx = len(lParent.Children)-1          #\u6700\u5f8c\u306b\u8ffd\u52a0\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eindex\u756a\u53f7<br \/>\n##lParent.Children[lIdx].Parent = None    #\u89aa\u5b50\u4ed8\u3051\u3092\u89e3\u9664\u3059\u308b<br \/>\n[\/python]<\/p>\n<p>\u65b0\u3057\u3044\u30af\u30e9\u30b9\u306f\u51fa\u3066\u3053\u306a\u3044\u3082\u306e\u306eFBModel\u30af\u30e9\u30b9\u306b\u542b\u307e\u308c\u308b2\u3064\u306eAttribute\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>Parent<\/strong><br \/>\n<strong>Children<\/strong><\/p>\n<p>\u89aa\u5b50\u4ed8\u3051\u3092\u3059\u308b\u306b\u306f\u3069\u3061\u3089\u3092\u4f7f\u3063\u3066\u3082\u5927\u4e08\u592b\u3002<\/p>\n<p><span style=\"font-size: 16px; color: #ff0000;\"><strong>\u305f\u3060\u3057<\/strong><\/span>\u3001\u89aa\u5b50\u4ed8\u3051\u3092\u89e3\u9664\u3059\u308b\u5834\u5408\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3002<br \/>\n\u4e0b\u8a18\u306e\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u3092\u4f7f\u3063\u3066Children\u30ea\u30b9\u30c8\u304b\u3089\u524a\u9664\u3059\u308b\u5834\u5408\u3001<\/p>\n<p><strong><span style=\"color: #ff0000;\">FBDelete()\u3092\u4f7f\u3063\u3066Children\u30ea\u30b9\u30c8\u304b\u3089\u53d6\u308a\u9664\u3044\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u524a\u9664\u3057\u306a\u3044\u3068\u30b7\u30fc\u30f3\u304c\u58ca\u308c\u307e\u3059\u3002<\/span><\/strong><\/p>\n<p>pop()<br \/>\nremove()<br \/>\nremoveAll()<\/p>\n<p>2010\u3067\u306f\u305d\u3093\u306a\u3053\u3068\u306a\u304b\u3063\u305f\u6c17\u304c\u30fb\u30fb\u30fb<br \/>\n\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u203b\u8ffd\u8a18<\/p>\n<p>2010\u3067\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u3001\u30b7\u30fc\u30f3\u304c\u58ca\u308c\u308b\u3068\u307e\u3067\u306f\u3044\u304b\u306a\u304b\u3063\u305f\u3082\u306e\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6d88\u3059\u306e\u306b\u53f3\u30af\u30ea\u30c3\u30af\u2192delete\u3067\u3057\u304b\u6d88\u305b\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>2013\u3067\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u305f\u77ac\u9593\u843d\u3061\u307e\u3059\uff01<\/p>\n<p>\u539f\u56e0\u306f\u3088\u304f\u308f\u304b\u308a\u307e\u305b\u3093\uff01<em id=\"__mceDel\" style=\"font-size: 13.63636302947998px;\">\u3061\u3083\u3093\u3068\u8abf\u3079\u3066\u306a\u3044\u3067\u3059\uff08\u3041&#8230;<\/em><\/p>\n<p><em id=\"__mceDel\" style=\"font-size: 13.63636302947998px;\"><span style=\"font-size: 10px;\">\u61b6\u6e2c\u3067\u3082\u306e\u3092\u8a00\u3046\u3068<a translate=\"no\" href=\"http:\/\/docs.autodesk.com\/MB\/2014\/ENU\/MotionBuilder-SDK-Documentation\/py_ref\/class_f_b_property_list_model_template.html\">FBPropertyListModelTemplate<\/a>\u3067\u6271\u3046\u914d\u5217\u306f<\/span><\/em><em id=\"__mceDel\" style=\"font-size: 13.63636302947998px;\"><em id=\"__mceDel\" style=\"font-size: 13.63636302947998px;\"><span style=\"font-size: 10px;\">\u4e00\u822c\u7684\u306a\u914d\u5217\u3068\u306f\u6271\u3044\u304c\u9055\u3046\u304b\u3089\uff1f<\/span><\/em><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 13.63636302947998px;\">\u30c7\u30fc\u30bf\u304c\u58ca\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067<\/span><strong style=\"font-size: 13.63636302947998px;\"><span style=\"color: #ff0000;\">pop(),remove(),removeAll()\u306f\u4f7f\u308f\u306a\u3044<\/span><\/strong><span style=\"font-size: 13.63636302947998px;\">\u306e\u304c\u8ce2\u660e\u306a\u3088\u3046\u3067\u3059\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"\u4eca\u56de\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89aa\u5b50\u4ed8\u3051\u3002 \u30b9\u30b1\u30de\u30c6\u30a3\u30c3\u30af\u30d3\u30e5\u30fc\u3067\u78ba\u8a8d\u3057\u305f\u3068\u304d\u306e\u30b3\u30ec\u3067\u3059\u3002 \u4eca\u56de\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u5b9f\u884c\u3059\u308b\u3068\u5b9f\u884c\u7d50\u679c\u306e\u753b\u50cf\u306e\u3088\u3046\u306a\u968e\u5c64\u69cb\u9020\u304c\u3067\u304d\u3042\u304c\u308a\u307e\u3059\u3002 \u30b3\u30f3\u30b9\u30c8\u30ec\u30a4\u30f3\u30c8\u306eParent\/Child\u3092\u671f\u5f85\u3057\u305f\u65b9\u306f\u3082\u3046\u5c11 &#8230;","protected":false},"author":1,"featured_media":199,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[42,40,25,237,41,43,26,28,18,44,45],"class_list":["post-196","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-motionbuilder","category-python","tag-children","tag-fb","tag-mb","tag-motionbuilder","tag-parent","tag-pop","tag-py","tag-pyfbsdk","tag-python-2","tag-remove","tag-removeall"],"_links":{"self":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/196","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=196"}],"version-history":[{"count":5,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions"}],"predecessor-version":[{"id":202,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions\/202"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=\/wp\/v2\/media\/199"}],"wp:attachment":[{"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humrevlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}