{"id":3259,"date":"2024-03-01T18:38:50","date_gmt":"2024-03-01T09:38:50","guid":{"rendered":"https:\/\/furcraea.verse.jp\/wp\/?p=3259"},"modified":"2024-03-02T11:39:18","modified_gmt":"2024-03-02T02:39:18","slug":"mayapythonround-protrusion-sphere-thorns-sphere-3d-model","status":"publish","type":"post","link":"https:\/\/furcraea.verse.jp\/wp\/2024\/03\/01\/mayapythonround-protrusion-sphere-thorns-sphere-3d-model\/","title":{"rendered":"[Maya][Python]round protrusion sphere Thorns sphere 3d model \u4e38\u3044\u7a81\u8d77\u306e\u3064\u3044\u305f\u7403\u3002"},"content":{"rendered":"\n<p>round protrusion sphere Thorns sphere 3d model<\/p>\n\n\n\n<p>\u3064\u3076\u3064\u3076\u306e\u3064\u3044\u305f\u7403\u3092\u63a2\u3057\u305f\u3051\u3069\u306a\u304f\u3066python\u3067\u4f5c\u3063\u305f\u3088<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>#sphire_vertex_position_shpire.py\nBaseSphere=cmds.polySphere(sx=25, sy=12, r=6,axis=[0,0,0])\nBaseSphere=BaseSphere[0]\nprint(&quot;BaseSphere= &quot;+str(BaseSphere))\n\nimport maya.cmds as cmds\n\ndef get_vertex_positions(obj_name):\n    vertex_positions = []\n    vertices = cmds.ls(obj_name + &#39;.vtx[*]&#39;, fl=True)\n    for vertex in vertices:\n        pos = cmds.xform(vertex, q=True, ws=True, t=True)\n        vertex_positions.append(pos)\n    return vertex_positions\n\nvertex_positions = get_vertex_positions(BaseSphere)\nprint(vertex_positions)\n\nfor v_pos in vertex_positions:\n    mySphere=cmds.polySphere(sx=15, sy=10, r=1)\n    cmds.xform(mySphere, translation=(v_pos[0],v_pos[1],v_pos[2]) ,absolute=1,worldSpace=1)\n<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"522\" src=\"https:\/\/furcraea.verse.jp\/wp\/wp-content\/uploads\/2024\/03\/image.png\" alt=\"\" class=\"wp-image-3260\" srcset=\"https:\/\/furcraea.verse.jp\/wp\/wp-content\/uploads\/2024\/03\/image.png 497w, https:\/\/furcraea.verse.jp\/wp\/wp-content\/uploads\/2024\/03\/image-286x300.png 286w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>round protrusion sphere Thorns sphere 3d model \u3064\u3076\u3064\u3076\u306e\u3064\u3044\u305f\u7403\u3092\u63a2\u3057\u305f\u3051\u3069\u306a\u304f\u3066python\u3067\u4f5c\u3063\u305f\u3088<\/p>\n","protected":false},"author":1,"featured_media":3260,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,89],"tags":[],"class_list":["post-3259","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-maya","category-python-maya"],"_links":{"self":[{"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/posts\/3259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/comments?post=3259"}],"version-history":[{"count":2,"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/posts\/3259\/revisions"}],"predecessor-version":[{"id":3263,"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/posts\/3259\/revisions\/3263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/media\/3260"}],"wp:attachment":[{"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/media?parent=3259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/categories?post=3259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/furcraea.verse.jp\/wp\/wp-json\/wp\/v2\/tags?post=3259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}