{"id":3265,"date":"2014-01-12T16:13:02","date_gmt":"2014-01-12T07:13:02","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=3265"},"modified":"2014-01-12T16:54:40","modified_gmt":"2014-01-12T07:54:40","slug":"%e9%81%b8%e6%8a%9e%e3%81%97%e3%81%9f%e8%a4%87%e6%95%b0%e3%81%ae%e9%a0%82%e7%82%b9%e3%81%ae%e3%83%9c%e3%83%bc%e3%83%b3%e3%82%a6%e3%82%a7%e3%82%a4%e3%83%88%e3%82%92%e5%89%8a%e9%99%a4%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/peta.okechan.net\/blog\/archives\/3265","title":{"rendered":"\u9078\u629e\u3057\u305f\u8907\u6570\u306e\u9802\u70b9\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u3092\u524a\u9664\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>\u4f8b\u3048\u3070blender\u3067\u300c\u4f53\u306b\u786c\u3044\u3082\u306e\u3092\u8eab\u306b\u3064\u3051\u305f\u4eba\u300d\u3092\u30e2\u30c7\u30ea\u30f3\u30b0\u3057\u3066\u3001\u81ea\u52d5\u3067\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u3092\u8a2d\u5b9a\u3057\u305f\u5834\u5408\u3001\u786c\u3044\u306f\u305a\u306e\u90e8\u5206\u306b\u8907\u6570\u306e\u30dc\u30fc\u30f3\u306e\u30a6\u30a7\u30a4\u30c8\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3057\u307e\u3063\u3066\u3001\u30dc\u30fc\u30f3\u3092\u52d5\u304b\u3059\u3068\u305d\u306e\u786c\u3044\u306f\u305a\u306e\u90e8\u5206\u304c\u30b0\u30cd\u30b0\u30cd\u66f2\u304c\u3063\u3066\u5168\u7136\u786c\u305d\u3046\u306b\u898b\u3048\u306a\u3044\u3063\u3066\u4e8b\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u3001\u786c\u304f\u898b\u305b\u305f\u3044\u90e8\u5206\u306b\u8907\u6570\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u308b\u72b6\u6cc1\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29-300x122.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-12 14.57.29\" width=\"300\" height=\"122\" class=\"aligncenter size-medium wp-image-3266\" srcset=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29-300x122.jpg 300w, https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29.jpg 586w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u3053\u306e\u5834\u5408\u3001\u786c\u304f\u898b\u305b\u305f\u3044\u90e8\u5206\u306e\u9802\u70b9\u306b\u3001\u9069\u5f53\u306a\u30dc\u30fc\u30f3\uff08\u4e00\u756a\u8fd1\u3044\u7269\u3068\u304b\uff09\u304b\u3089\u306e\u30a6\u30a7\u30a4\u30c8\u3092\u3072\u3068\u3064\u3060\u3051\u8a2d\u5b9a\u3059\u308b\u3068\u826f\u3044\u306e\u3067\u3001<\/p>\n<ol>\n<li>\u786c\u304f\u898b\u305b\u305f\u3044\u90e8\u5206\u306e\u9802\u70b9\u90e1\u3092\u9078\u629e<\/li>\n<li>\u9078\u629e\u3057\u305f\u9802\u70b9\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306e\u307f\u3092\u5168\u3066\u524a\u9664\uff08\u9802\u70b9\u30a6\u30a7\u30a4\u30c8\u306b\u306f\u30dc\u30fc\u30f3\u4ee5\u5916\u306e\u3082\u306e\u3082\u3042\u308a\u5f97\u308b\u306e\u3067\u305d\u308c\u306f\u524a\u9664\u3057\u306a\u3044\uff09<\/li>\n<li>\u30d7\u30ed\u30d1\u30c6\u30a3\u2192\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30c7\u30fc\u30bf\u2192\u9802\u70b9\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u9069\u5f53\u306a\u30dc\u30fc\u30f3\u306e\u3082\u306e\u3092\u3072\u3068\u3064\u9078\u3093\u3067\u30a6\u30a7\u30a4\u30c81.0\u3092\u9069\u7528<\/li>\n<\/ol>\n<p>\u3068\u3084\u308b\u3068\u76ee\u7684\u304c\u9054\u6210\u3067\u304d\u305d\u3046\u306a\u3093\u3067\u3059\u304c\u3001blender\u306b\u306f\u3069\u3046\u3082\u4e0a\u8a182\u3092\u5b9f\u884c\u3059\u308bUI\u304c\u306a\u3044\u307f\u305f\u3044\u3067\u3059\u3002<br \/>\n\u9802\u70b9\u4e00\u3064\u4e00\u3064\u9078\u629e\u3057\u306a\u304c\u3089\u5168\u90e8\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306e\u00d7\u30dc\u30bf\u30f3\uff08\u4e0a\u306e\u753b\u50cf\u53c2\u7167\uff09\u3092\u4e00\u3064\u4e00\u3064\u62bc\u305b\u3070\u3044\u3044\u3093\u3067\u3059\u304c\u3001\u9802\u70b9\u6570\u304c\u591a\u3044\u3068\u3084\u3063\u3066\u3089\u308c\u307e\u305b\u3093\u3002<br \/>\n\u306a\u306e\u3067\u3001\u4e0a\u306e\u624b\u98062\u306e\u90e8\u5206\u3092\u81ea\u52d5\u3067\u884c\u3046Python\u306e\u95a2\u6570\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\nblender\u306ePython\u30b3\u30f3\u30bd\u30fc\u30eb\uff08\u5bfe\u8a71\u30e2\u30fc\u30c9\uff09\u306b\u8cbc\u308a\u3064\u3051\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u308b\u306e\u3067\u3061\u3087\u3063\u3068\u30b3\u30e1\u30f3\u30c8\u306e\u66f8\u304d\u65b9\u304c\u5909\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<br \/>\n\uff08\u5bfe\u8a71\u30e2\u30fc\u30c9\u3067\u306f\u95a2\u6570\u4e2d\u306b\u7a7a\u884c\u304c\u3042\u308b\u3068\u305d\u3053\u3067\u95a2\u6570\u304c\u7d42\u308f\u308a\u3060\u3068\u8a8d\u8b58\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u7a7a\u884c\u304c\u7121\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\ndef clear_deform_weights():\r\n    #  \u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\r\n    obj = bpy.context.active_object\r\n    if not obj:\r\n        return\r\n    bpy.ops.object.mode_set(mode='OBJECT')\r\n    #\r\n    # \u30dc\u30fc\u30f3\u540d\u3092\u5f97\u308b\r\n    bnames = &#x5B;b.name for b in obj.parent.pose.bones]\r\n    #\r\n    # bmesh\u306e\u751f\u6210\r\n    import bmesh\r\n    bm = bmesh.new()\r\n    bm.from_mesh(obj.data)\r\n    #\r\n    # \u9802\u70b9\u30a6\u30a7\u30a4\u30c8\uff08\u5909\u5f62\uff09\u306e\u30ec\u30a4\u30e4\u30fc\u3092\u53d6\u5f97\r\n    dflay = bm.verts.layers.deform.active\r\n    if not dflay:\r\n        return\r\n    #\r\n    # \u9078\u629e\u4e2d\u306e\u9802\u70b9\u30a6\u30a7\u30a4\u30c8\uff08\u5909\u5f62\uff09\u524a\u9664\u3059\u308b\r\n    for v in bm.verts:\r\n        if v.select:\r\n            for dvk, dvv in v&#x5B;dflay].items():\r\n                if obj.vertex_groups&#x5B;dvk].name in bnames:\r\n                    del v&#x5B;dflay]&#x5B;dvk]\r\n    #\r\n    # \u53cd\u6620\r\n    bm.to_mesh(obj.data)\r\n    bpy.ops.object.mode_set(mode='EDIT')\r\n<\/pre>\n<p>blender v2.69 \u306eMac\u7248\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u307e\u3059\u3002<br \/>\n\u7de8\u96c6\u30e2\u30fc\u30c9\u3067\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u3092\u524a\u9664\u3057\u305f\u3044\u9802\u70b9\u3092\u9078\u3093\u3067\u304b\u3089\u3001\u4e0a\u8a18\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4f7f\u3044\u65b9\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30a2\u30fc\u30de\u30c1\u30e5\u30a2\u304c\u5bfe\u8c61\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89aa\u306b\u306a\u3063\u3066\u3066\uff08\u4e0b\u8a18\u753b\u50cf\u306e\u3088\u3046\u306a\u72b6\u614b\uff09\u3001\u30dc\u30fc\u30f3\u540d\u3068\u5bfe\u5fdc\u3059\u308b\u9802\u70b9\u30b0\u30eb\u30fc\u30d7\u306e\u540d\u524d\u304c\u540c\u3058\u3067\u3042\u308b\u3068\u3044\u3046\u524d\u63d0\u3067\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u3067\u3059\u306e\u3067\u3001\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u3067\u306f\u6b63\u3057\u304f\u52d5\u304b\u306a\u3044\u3068\u601d\u308f\u308c\u307e\u3059\u304c\u3001\u307e\u3041\u666e\u901a\u306b\u4f5c\u3063\u3066\u305f\u3089\u591a\u5206\u3053\u306e\u524d\u63d0\u306f\u6e80\u305f\u3059\u306f\u305a\u3058\u3083\u306a\u3044\u304b\u306a\u3068\u3046\u3063\u3059\u3089\u3068\u4f55\u3068\u306a\u304f\u601d\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001blender\u306e\u5185\u90e8\u306e\u4ed5\u7d44\u307f\u3068\u304b\u5168\u7136\u77e5\u3089\u305a\u306b\u66f8\u3044\u305f\u306e\u3067\u3082\u3057\u304b\u3057\u305f\u3089\u526f\u4f5c\u7528\u304c\u3042\u3063\u305f\u308aUI\u306e\u72b6\u614b\u306b\u3088\u3063\u3066\u306f\u304a\u304b\u3057\u306a\u4e8b\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n<a href=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.29.08.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.29.08.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-12 15.29.08\" width=\"256\" height=\"195\" class=\"aligncenter size-full wp-image-3269\" \/><\/a><\/p>\n<h4>\u4f59\u8ac7<\/h4>\n<p>\u5404\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306e\u53f3\u306b\u3042\u308b\u00d7\u30dc\u30bf\u30f3\uff08\u6700\u521d\u306e\u753b\u50cf\u53c2\u7167\uff09\u306b\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u3092\u306e\u305b\u308b\u3068\u5206\u304b\u308b\u3093\u3067\u3059\u304c\u3001<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">bpy.ops.object.vertex_weight_delete(weight_group = \u9802\u70b9\u30b0\u30eb\u30fc\u30d7\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9)<\/pre>\n<p>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3067\u30821\u3064\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u30921\u3064\u306e\u9802\u70b9\u304b\u3089\u524a\u9664\u51fa\u6765\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001\u3053\u308c\u30921\u3064\u306e\u9802\u70b9\u306e\u5168\u3066\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306b\u5bfe\u3057\u3066\u547c\u3073\u51fa\u3059\u3001\u3063\u3066\u306e\u3092\u3055\u3089\u306b\u9078\u629e\u3055\u308c\u305f\u8907\u6570\u306e\u9802\u70b9\u306b\u5bfe\u3057\u3066\u884c\u3046\u3001\u3068\u3044\u3046\u65b9\u6cd5\u304c\u4f7f\u3048\u308b\u306a\u3089\u540c\u3058\u3053\u3068\u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3061\u3089\u306e\u65b9\u6cd5\u3092\u6700\u521d\u8003\u3048\u3066\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3093\u3067\u3059\u304c\u3001\u3053\u306e\u65b9\u6cd5\u3067\u306f\u9802\u70b9\u3092\u8907\u6570\u9078\u3093\u3067\u3066\u30821\u3064\u5206\u3057\u304b\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u304c\u524a\u9664\u3055\u308c\u305a\u30c0\u30e1\u3067\u3057\u305f\u3002<\/p>\n<p>blender\u306b\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3084\u9762\u3084\u8fba\u3084\u9802\u70b9\u306e\u9078\u629e\u306b\u95a2\u3057\u3066\u3001select\u3068active\u3068\u3044\u3046\u8003\u3048\u65b9\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u79c1\u304cUI\u3084API\u3092\u3056\u3063\u3068\u898b\u305f\u611f\u60f3\u3067\u3059\u304c\uff09<br \/>\nselect\u72b6\u614b\u306b\u95a2\u3057\u3066\u306f\u8907\u6570\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306a\u308a\u9802\u70b9\u306a\u308a\u304c\u540c\u6642\u306b\u306a\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u304c\u3001active\u72b6\u614b\u306b\u95a2\u3057\u3066\u306f\u540c\u6642\u306b1\u3064\u306e\u3082\u306e\u3057\u304b\u306a\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u305b\u3093\u3002<br \/>\n<a href=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35-300x252.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-12 15.47.35\" width=\"300\" height=\"252\" class=\"aligncenter size-medium wp-image-3272\" srcset=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35-300x252.jpg 300w, https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35.jpg 434w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u3053\u306e\u753b\u50cf\u306f\u9802\u70b9\u306e\u5834\u5408\u306b\u3064\u3044\u3066\u306e\u4f8b\u3067\u3059\u3002<br \/>\n3\u9802\u70b9\u304cselect\u72b6\u614b\u306b\u3042\u308a\u307e\u3059\u304c\u3001active\u72b6\u614b\u306a\u306e\u306f1\u3064\u3060\u3051\uff08\u767d\u8272\u306e\u3084\u3064\uff09\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u57fa\u672c\u3001\u6700\u5f8c\u306b\u9078\u629e\u3057\u305f\u3082\u306e\u304cactive\u306b\u306a\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3067\u3001vertex_weight_delete\u30e1\u30bd\u30c3\u30c9\u306factive\u306a\u9802\u70b9\u306b\u3064\u3044\u3066\u3057\u304b\u51e6\u7406\u51fa\u6765\u306a\u3044\u4e0a\u306b\u3001blender\u306ePython API\u306b\u306f\u9802\u70b9\u3092active\u72b6\u614b\u306b\u3059\u308b\u3082\u306e\u304c\u7121\u3044\u307f\u305f\u3044\u306a\u306e\u3067\u3001\u3053\u3061\u3089\u306e\u65b9\u6cd5\u306f\u8ae6\u3081\u307e\u3057\u305f\u3002<br \/>\nAPI\u304b\u3089select\u3059\u308b\u3068\u6700\u5f8c\u306e\u304c\u81ea\u52d5\u7684\u306bactive\u306b\u306a\u308b\u304b\u3068\u3044\u3046\u3068\u305d\u3046\u3044\u3046\u4e8b\u3082\u7121\u3044\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u524d\u3001blender\u306e\u30bd\u30fc\u30b9\u306f\u72ec\u7279\u306a\u66f8\u304d\u65b9\u304c\u3055\u308c\u3066\u3044\u308b\u3088\u3068\u3044\u3046\u8a71\u306f\u805e\u3044\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u304c\u3001\u4eca\u56dePython API\u3092\u4f7f\u3063\u3066\u307f\u3066\u305d\u306e\u72ec\u7279\u5177\u5408\u306e\u7247\u9c57\u3092\u898b\u305f\u6c17\u304c\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f8b\u3048\u3070blender\u3067\u300c\u4f53\u306b\u786c\u3044\u3082\u306e\u3092\u8eab\u306b\u3064\u3051\u305f\u4eba\u300d\u3092\u30e2\u30c7\u30ea\u30f3\u30b0\u3057\u3066\u3001\u81ea\u52d5\u3067\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u3092\u8a2d\u5b9a\u3057\u305f\u5834\u5408\u3001\u786c\u3044\u306f\u305a\u306e\u90e8\u5206\u306b\u8907\u6570\u306e\u30dc\u30fc\u30f3\u306e\u30a6\u30a7\u30a4\u30c8\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3057\u307e\u3063\u3066\u3001\u30dc\u30fc\u30f3\u3092\u52d5\u304b\u3059\u3068\u305d\u306e\u786c\u3044\u306f\u305a\u306e\u90e8\u5206\u304c\u30b0\u30cd\u30b0\u30cd\u66f2\u304c\u3063\u3066\u5168\u7136\u786c\u305d\u3046\u306b\u898b\u3048\u306a\u3044\u3063\u3066\u4e8b\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u3001\u786c\u304f\u898b\u305b\u305f\u3044\u90e8\u5206\u306b\u8907\u6570\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u308b\u72b6\u6cc1\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29-300x122.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-12 14.57.29\" width=\"300\" height=\"122\" class=\"aligncenter size-medium wp-image-3266\" srcset=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29-300x122.jpg 300w, https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-14.57.29.jpg 586w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u3053\u306e\u5834\u5408\u3001\u786c\u304f\u898b\u305b\u305f\u3044\u90e8\u5206\u306e\u9802\u70b9\u306b\u3001\u9069\u5f53\u306a\u30dc\u30fc\u30f3\uff08\u4e00\u756a\u8fd1\u3044\u7269\u3068\u304b\uff09\u304b\u3089\u306e\u30a6\u30a7\u30a4\u30c8\u3092\u3072\u3068\u3064\u3060\u3051\u8a2d\u5b9a\u3059\u308b\u3068\u826f\u3044\u306e\u3067\u3001<\/p>\n<ol>\n<li>\u786c\u304f\u898b\u305b\u305f\u3044\u90e8\u5206\u306e\u9802\u70b9\u90e1\u3092\u9078\u629e<\/li>\n<li>\u9078\u629e\u3057\u305f\u9802\u70b9\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306e\u307f\u3092\u5168\u3066\u524a\u9664\uff08\u9802\u70b9\u30a6\u30a7\u30a4\u30c8\u306b\u306f\u30dc\u30fc\u30f3\u4ee5\u5916\u306e\u3082\u306e\u3082\u3042\u308a\u5f97\u308b\u306e\u3067\u305d\u308c\u306f\u524a\u9664\u3057\u306a\u3044\uff09<\/li>\n<li>\u30d7\u30ed\u30d1\u30c6\u30a3\u2192\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30c7\u30fc\u30bf\u2192\u9802\u70b9\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u9069\u5f53\u306a\u30dc\u30fc\u30f3\u306e\u3082\u306e\u3092\u3072\u3068\u3064\u9078\u3093\u3067\u30a6\u30a7\u30a4\u30c81.0\u3092\u9069\u7528<\/li>\n<\/ol>\n<p>\u3068\u3084\u308b\u3068\u76ee\u7684\u304c\u9054\u6210\u3067\u304d\u305d\u3046\u306a\u3093\u3067\u3059\u304c\u3001blender\u306b\u306f\u3069\u3046\u3082\u4e0a\u8a182\u3092\u5b9f\u884c\u3059\u308bUI\u304c\u306a\u3044\u307f\u305f\u3044\u3067\u3059\u3002<br \/>\n\u9802\u70b9\u4e00\u3064\u4e00\u3064\u9078\u629e\u3057\u306a\u304c\u3089\u5168\u90e8\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306e\u00d7\u30dc\u30bf\u30f3\uff08\u4e0a\u306e\u753b\u50cf\u53c2\u7167\uff09\u3092\u4e00\u3064\u4e00\u3064\u62bc\u305b\u3070\u3044\u3044\u3093\u3067\u3059\u304c\u3001\u9802\u70b9\u6570\u304c\u591a\u3044\u3068\u3084\u3063\u3066\u3089\u308c\u307e\u305b\u3093\u3002<br \/>\n\u306a\u306e\u3067\u3001\u4e0a\u306e\u624b\u98062\u306e\u90e8\u5206\u3092\u81ea\u52d5\u3067\u884c\u3046Python\u306e\u95a2\u6570\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\nblender\u306ePython\u30b3\u30f3\u30bd\u30fc\u30eb\uff08\u5bfe\u8a71\u30e2\u30fc\u30c9\uff09\u306b\u8cbc\u308a\u3064\u3051\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u308b\u306e\u3067\u3061\u3087\u3063\u3068\u30b3\u30e1\u30f3\u30c8\u306e\u66f8\u304d\u65b9\u304c\u5909\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<br \/>\n\uff08\u5bfe\u8a71\u30e2\u30fc\u30c9\u3067\u306f\u95a2\u6570\u4e2d\u306b\u7a7a\u884c\u304c\u3042\u308b\u3068\u305d\u3053\u3067\u95a2\u6570\u304c\u7d42\u308f\u308a\u3060\u3068\u8a8d\u8b58\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u7a7a\u884c\u304c\u7121\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\ndef clear_deform_weights():\r\n    #  \u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\r\n    obj = bpy.context.active_object\r\n    if not obj:\r\n        return\r\n    bpy.ops.object.mode_set(mode='OBJECT')\r\n    #\r\n    # \u30dc\u30fc\u30f3\u540d\u3092\u5f97\u308b\r\n    bnames = &#x5B;b.name for b in obj.parent.pose.bones]\r\n    #\r\n    # bmesh\u306e\u751f\u6210\r\n    import bmesh\r\n    bm = bmesh.new()\r\n    bm.from_mesh(obj.data)\r\n    #\r\n    # \u9802\u70b9\u30a6\u30a7\u30a4\u30c8\uff08\u5909\u5f62\uff09\u306e\u30ec\u30a4\u30e4\u30fc\u3092\u53d6\u5f97\r\n    dflay = bm.verts.layers.deform.active\r\n    if not dflay:\r\n        return\r\n    #\r\n    # \u9078\u629e\u4e2d\u306e\u9802\u70b9\u30a6\u30a7\u30a4\u30c8\uff08\u5909\u5f62\uff09\u524a\u9664\u3059\u308b\r\n    for v in bm.verts:\r\n        if v.select:\r\n            for dvk, dvv in v&#x5B;dflay].items():\r\n                if obj.vertex_groups&#x5B;dvk].name in bnames:\r\n                    del v&#x5B;dflay]&#x5B;dvk]\r\n    #\r\n    # \u53cd\u6620\r\n    bm.to_mesh(obj.data)\r\n    bpy.ops.object.mode_set(mode='EDIT')\r\n<\/pre>\n<p>blender v2.69 \u306eMac\u7248\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u307e\u3059\u3002<br \/>\n\u7de8\u96c6\u30e2\u30fc\u30c9\u3067\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u3092\u524a\u9664\u3057\u305f\u3044\u9802\u70b9\u3092\u9078\u3093\u3067\u304b\u3089\u3001\u4e0a\u8a18\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4f7f\u3044\u65b9\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30a2\u30fc\u30de\u30c1\u30e5\u30a2\u304c\u5bfe\u8c61\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89aa\u306b\u306a\u3063\u3066\u3066\uff08\u4e0b\u8a18\u753b\u50cf\u306e\u3088\u3046\u306a\u72b6\u614b\uff09\u3001\u30dc\u30fc\u30f3\u540d\u3068\u5bfe\u5fdc\u3059\u308b\u9802\u70b9\u30b0\u30eb\u30fc\u30d7\u306e\u540d\u524d\u304c\u540c\u3058\u3067\u3042\u308b\u3068\u3044\u3046\u524d\u63d0\u3067\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u3067\u3059\u306e\u3067\u3001\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u3067\u306f\u6b63\u3057\u304f\u52d5\u304b\u306a\u3044\u3068\u601d\u308f\u308c\u307e\u3059\u304c\u3001\u307e\u3041\u666e\u901a\u306b\u4f5c\u3063\u3066\u305f\u3089\u591a\u5206\u3053\u306e\u524d\u63d0\u306f\u6e80\u305f\u3059\u306f\u305a\u3058\u3083\u306a\u3044\u304b\u306a\u3068\u3046\u3063\u3059\u3089\u3068\u4f55\u3068\u306a\u304f\u601d\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001blender\u306e\u5185\u90e8\u306e\u4ed5\u7d44\u307f\u3068\u304b\u5168\u7136\u77e5\u3089\u305a\u306b\u66f8\u3044\u305f\u306e\u3067\u3082\u3057\u304b\u3057\u305f\u3089\u526f\u4f5c\u7528\u304c\u3042\u3063\u305f\u308aUI\u306e\u72b6\u614b\u306b\u3088\u3063\u3066\u306f\u304a\u304b\u3057\u306a\u4e8b\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n<a href=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.29.08.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.29.08.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-12 15.29.08\" width=\"256\" height=\"195\" class=\"aligncenter size-full wp-image-3269\" \/><\/a><\/p>\n<h4>\u4f59\u8ac7<\/h4>\n<p>\u5404\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306e\u53f3\u306b\u3042\u308b\u00d7\u30dc\u30bf\u30f3\uff08\u6700\u521d\u306e\u753b\u50cf\u53c2\u7167\uff09\u306b\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u3092\u306e\u305b\u308b\u3068\u5206\u304b\u308b\u3093\u3067\u3059\u304c\u3001<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">bpy.ops.object.vertex_weight_delete(weight_group = \u9802\u70b9\u30b0\u30eb\u30fc\u30d7\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9)<\/pre>\n<p>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3067\u30821\u3064\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u30921\u3064\u306e\u9802\u70b9\u304b\u3089\u524a\u9664\u51fa\u6765\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001\u3053\u308c\u30921\u3064\u306e\u9802\u70b9\u306e\u5168\u3066\u306e\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u306b\u5bfe\u3057\u3066\u547c\u3073\u51fa\u3059\u3001\u3063\u3066\u306e\u3092\u3055\u3089\u306b\u9078\u629e\u3055\u308c\u305f\u8907\u6570\u306e\u9802\u70b9\u306b\u5bfe\u3057\u3066\u884c\u3046\u3001\u3068\u3044\u3046\u65b9\u6cd5\u304c\u4f7f\u3048\u308b\u306a\u3089\u540c\u3058\u3053\u3068\u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3061\u3089\u306e\u65b9\u6cd5\u3092\u6700\u521d\u8003\u3048\u3066\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3093\u3067\u3059\u304c\u3001\u3053\u306e\u65b9\u6cd5\u3067\u306f\u9802\u70b9\u3092\u8907\u6570\u9078\u3093\u3067\u3066\u30821\u3064\u5206\u3057\u304b\u30dc\u30fc\u30f3\u30a6\u30a7\u30a4\u30c8\u304c\u524a\u9664\u3055\u308c\u305a\u30c0\u30e1\u3067\u3057\u305f\u3002<\/p>\n<p>blender\u306b\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3084\u9762\u3084\u8fba\u3084\u9802\u70b9\u306e\u9078\u629e\u306b\u95a2\u3057\u3066\u3001select\u3068active\u3068\u3044\u3046\u8003\u3048\u65b9\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u79c1\u304cUI\u3084API\u3092\u3056\u3063\u3068\u898b\u305f\u611f\u60f3\u3067\u3059\u304c\uff09<br \/>\nselect\u72b6\u614b\u306b\u95a2\u3057\u3066\u306f\u8907\u6570\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306a\u308a\u9802\u70b9\u306a\u308a\u304c\u540c\u6642\u306b\u306a\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u304c\u3001active\u72b6\u614b\u306b\u95a2\u3057\u3066\u306f\u540c\u6642\u306b1\u3064\u306e\u3082\u306e\u3057\u304b\u306a\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u305b\u3093\u3002<br \/>\n<a href=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35-300x252.jpg\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-12 15.47.35\" width=\"300\" height=\"252\" class=\"aligncenter size-medium wp-image-3272\" srcset=\"https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35-300x252.jpg 300w, https:\/\/peta.okechan.net\/blog\/wp-content\/uploads\/2014\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2014-01-12-15.47.35.jpg 434w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u3053\u306e\u753b\u50cf\u306f\u9802\u70b9\u306e\u5834\u5408\u306b\u3064\u3044\u3066\u306e\u4f8b\u3067\u3059\u3002<br \/>\n3\u9802\u70b9\u304cselect\u72b6\u614b\u306b\u3042\u308a\u307e\u3059\u304c\u3001active\u72b6\u614b\u306a\u306e\u306f1\u3064\u3060\u3051\uff08\u767d\u8272\u306e\u3084\u3064\uff09\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u57fa\u672c\u3001\u6700\u5f8c\u306b\u9078\u629e\u3057\u305f\u3082\u306e\u304cactive\u306b\u306a\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3067\u3001vertex_weight_delete\u30e1\u30bd\u30c3\u30c9\u306factive\u306a\u9802\u70b9\u306b\u3064\u3044\u3066\u3057\u304b\u51e6\u7406\u51fa\u6765\u306a\u3044\u4e0a\u306b\u3001blender\u306ePython API\u306b\u306f\u9802\u70b9\u3092active\u72b6\u614b\u306b\u3059\u308b\u3082\u306e\u304c\u7121\u3044\u307f\u305f\u3044\u306a\u306e\u3067\u3001\u3053\u3061\u3089\u306e\u65b9\u6cd5\u306f\u8ae6\u3081\u307e\u3057\u305f\u3002<br \/>\nAPI\u304b\u3089select\u3059\u308b\u3068\u6700\u5f8c\u306e\u304c\u81ea\u52d5\u7684\u306bactive\u306b\u306a\u308b\u304b\u3068\u3044\u3046\u3068\u305d\u3046\u3044\u3046\u4e8b\u3082\u7121\u3044\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u524d\u3001blender\u306e\u30bd\u30fc\u30b9\u306f\u72ec\u7279\u306a\u66f8\u304d\u65b9\u304c\u3055\u308c\u3066\u3044\u308b\u3088\u3068\u3044\u3046\u8a71\u306f\u805e\u3044\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u304c\u3001\u4eca\u56dePython API\u3092\u4f7f\u3063\u3066\u307f\u3066\u305d\u306e\u72ec\u7279\u5177\u5408\u306e\u7247\u9c57\u3092\u898b\u305f\u6c17\u304c\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[438,60],"class_list":["post-3265","post","type-post","status-publish","format-standard","hentry","category-tech","tag-blender","tag-python"],"_links":{"self":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/3265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/comments?post=3265"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/3265\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=3265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=3265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=3265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}