{"id":11554,"date":"2021-06-08T21:29:34","date_gmt":"2021-06-08T12:29:34","guid":{"rendered":"http:\/\/leavebehind.iobb.net\/wordpress\/?p=11554"},"modified":"2021-06-08T21:30:42","modified_gmt":"2021-06-08T12:30:42","slug":"maya-shelf-cleaning","status":"publish","type":"post","link":"http:\/\/leavebehind.mydns.jp\/wordpress\/2021\/06\/08\/maya-shelf-cleaning\/","title":{"rendered":"Maya Shelf\u306e\u6574\u7406"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1436\" height=\"206\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2021\/06\/maya_shelf_cleaning.jpg\" alt=\"\" class=\"wp-image-11559\" srcset=\"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/06\/maya_shelf_cleaning.jpg 1436w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/06\/maya_shelf_cleaning-960x138.jpg 960w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/06\/maya_shelf_cleaning-700x100.jpg 700w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/06\/maya_shelf_cleaning-768x110.jpg 768w\" sizes=\"auto, (max-width: 1436px) 100vw, 1436px\" \/><\/figure><\/div>\n\n\n\n<p>Maya\u306eShelf\u306e\u6574\u7406\u3067\u3059\u3002\u3088\u304f\u4f7f\u3046\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u30e1\u30cb\u30e5\u30fc\u5316\u3057\u3066\u3044\u307e\u3059\u306e\u3067Shelf\u306b\u306f\u4f55\u304b\u306b\u4f7f\u3063\u305f\u3051\u3069\u3082\u306f\u3084\u4f55\u306b\u4f7f\u3046\u306e\u304b\u3088\u304f\u308f\u304b\u3089\u3093\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u30b4\u30ed\u30b4\u30ed\u3057\u3066\u307e\u3059\u3002\u3069\u3093\u3069\u3093\u524a\u9664\u3057\u3066\u3082\u3044\u3044\u3051\u3069\u3082\u3057\u304b\u3057\u305f\u3089\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308b\u304b\u3082\u3063\u3066\u4e8b\u3067\u30d6\u30ed\u30b0\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u52d5\u304f\u304b\u3069\u3046\u304b\u306f\u4fdd\u8a3c\u3057\u307e\u305b\u3093\uff01(The scripts below was written by me a long time ago. I can&#8217;t promise that it will work properly!)<\/p>\n\n\n\n<p>\u6a5f\u80fd\u306e\u5206\u304b\u3089\u3093\u30e2\u30ce\u304c\u305f\u304f\u3055\u3093\u3042\u308b\u306e\u3067\u307e\u305f\u6b21\u306e\u6a5f\u4f1a\u306b\u8f09\u305b\u308b\u3068\u3057\u3066\u4eca\u65e5\u306e\u3068\u3053\u308d\u306f3\u3064\u3002\u307e\u305a1\u3064\u76ee\u306f\u30b7\u30fc\u30f3\u304b\u3089\u30b9\u30e0\u30fc\u30b9\u30e1\u30c3\u30b7\u30e5\u304c\u304b\u304b\u3063\u305f\u30e1\u30c3\u30b7\u30e5\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u9078\u629e\u3059\u308b\u3082\u306e\u3002\u306a\u3093\u306e\u305f\u3081\u306b\uff1f<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#Select smooth meshes\nimport pymel.core as pm \n\nmesh_shapes = pm.ls(type='mesh') \nsmooth_meshes = [] \nfor s in mesh_shapes: \n\tpm.select(s) \n\tr = pm.displaySmoothness(query=True, polygonObject=True) \n\tif r != None and r[0] >= 3: \n\t\tsmooth_meshes.append(s) \npm.select(smooth_meshes) <\/pre>\n\n\n\n<p>2\u3064\u76ee\u3001\u30ec\u30ac\u30b7\u30fc\u306a\u30ec\u30f3\u30c0\u30fc\u30ec\u30a4\u30e4\u30fc\u306e\u524a\u9664\u304b\u306a\uff1f<\/p>\n\n\n\n<!--more-->\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#Removing legacy render layers\nimport pymel.core as pm\n\ndefault = pm.nodetypes.RenderLayer.defaultRenderLayer()\nrender_layers = pm.ls(type='renderLayer')\nwith pm.UndoChunk():\n    for rlayer in render_layers:\n        if rlayer != default:\n            pm.delete(rlayer)<\/pre>\n\n\n\n<p>3\u3064\u76ee\u3001\u30dd\u30ea\u30b4\u30f3\u306e\u9802\u70b9\u3092\u9078\u629e\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u3001\u5ea7\u6a19\u304c\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002\u4f55\u304b\u306e\u30c6\u30b9\u30c8\uff1f<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#Print selected vertex position\nimport pymel.core as pm\n \nsels = pm.ls(sl=True,flatten=True)\nfor sel in sels:\n\tprint sel,pm.xform(sel,q=True,a=True,t=True)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Maya\u306eShelf\u306e\u6574\u7406\u3067\u3059\u3002\u3088\u304f\u4f7f\u3046\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u30e1\u30cb\u30e5\u30fc\u5316\u3057\u3066\u3044\u307e\u3059\u306e\u3067Shelf\u306b\u306f\u4f55\u304b\u306b\u4f7f\u3063\u305f\u3051\u3069\u3082\u306f\u3084\u4f55\u306b\u4f7f\u3046\u306e\u304b\u3088\u304f\u308f\u304b\u3089\u3093\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u30b4\u30ed\u30b4\u30ed\u3057\u3066\u307e\u3059\u3002\u3069\u3093\u3069\u3093\u524a\u9664\u3057\u3066\u3082\u3044\u3044\u3051\u3069\u3082\u3057\u304b\u3057\u305f\u3089\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[175,230],"class_list":["post-11554","post","type-post","status-publish","format-standard","hentry","category-cg","tag-maya","tag-python"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8YSE4-30m","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/11554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/comments?post=11554"}],"version-history":[{"count":10,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/11554\/revisions"}],"predecessor-version":[{"id":11565,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/11554\/revisions\/11565"}],"wp:attachment":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=11554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=11554"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=11554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}