{"id":11639,"date":"2021-07-17T15:43:02","date_gmt":"2021-07-17T06:43:02","guid":{"rendered":"http:\/\/leavebehind.iobb.net\/wordpress\/?p=11639"},"modified":"2021-07-17T15:57:20","modified_gmt":"2021-07-17T06:57:20","slug":"pyside2-on-python2-7","status":"publish","type":"post","link":"http:\/\/leavebehind.mydns.jp\/wordpress\/2021\/07\/17\/pyside2-on-python2-7\/","title":{"rendered":"PySide2 on Python2.7"},"content":{"rendered":"\n<p>\u4e45\u3057\u3076\u308a\u306bMaya2020\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4e45\u3057\u3076\u308a\u306b\u66f8\u304f\u6a5f\u4f1a\u304c\u3042\u3063\u3066\u3001Python\u81ea\u4f53\u306f\u7279\u306b\u899a\u3048\u306a\u304a\u3059\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001UI\u5468\u308a\u3001PySide2\u306e\u3053\u3068\u3092\u3059\u3063\u304b\u308a\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u5fa9\u7fd2\u3092\u59cb\u3081\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>Maya\u3092\u3044\u3061\u3044\u3061\u8d77\u52d5\u3059\u308b\u306e\u306f\u30e1\u30f3\u30c9\u30af\u30b5\u30a4\u3001\u304b\u3068\u3044\u3063\u3066Windows\u306ePython2.7\u3078\u306fPySide2\u306f\u914d\u5e03\u3055\u308c\u3066\u3044\u306a\u3044\u3002\u3067\u601d\u3044\u3064\u3044\u305f\u306e\u306fMaya\u306ePython\u74b0\u5883\u3092\u4f7f\u3063\u3066\u3057\u307e\u304a\u3046\u3063\u3066\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>Visual Stuido Code\u3067.py\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3068\u3001\u5de6\u4e0b\u306b\u4f7f\u7528\u3059\u308bPython\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"853\" height=\"313\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2021\/07\/vscode-python-env.jpg\" alt=\"\" class=\"wp-image-11640\" srcset=\"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/vscode-python-env.jpg 853w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/vscode-python-env-700x257.jpg 700w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/vscode-python-env-768x282.jpg 768w\" sizes=\"auto, (max-width: 853px) 100vw, 853px\" \/><\/figure><\/div>\n\n\n\n<p>\u4e0a\u306e\u753b\u50cf\u3067\u306f\u300cPython 3.9.6 64-bit\u300d\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u3053\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30b3\u30de\u30f3\u30c9\u30d1\u30ec\u30c3\u30c8\u304c\u8868\u793a\u3055\u308c\u300cEnter Interpreter parh&#8230;\u300d\u305d\u3057\u3066\u300c find&#8230;\u300d\u3068\u9032\u3093\u3067\u30d5\u30a1\u30a4\u30eb\u9078\u629e\u304b\u3089\u4ee5\u4e0b\u306b\u3042\u308bPython\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">C:\\Program Files\\Autodesk\\Maya2020\\bin\\mayapy.exe<\/pre>\n\n\n\n<p>Maya2022\u306fPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u9078\u3079\u308b\u3089\u3057\u3044\u306e\u30672\u3064\u306emayapy.exe\u304c\u3042\u308b\u3093\u3067\u3057\u3087\u3046\u304b\uff1f\u3068\u3082\u3042\u308c\u3053\u308c\u3067Python2.7.11+ PySide2\u306e\u74b0\u5883\u306b\u306a\u308a\u307e\u3059\u3002\u300cimport pymel.core as pm\u300d\u3068\u304b\u5b9f\u884c\u3059\u308b\u3068Maya\u306e\u6a5f\u80fd\u3082\u4f7f\u3046\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3001UI\u304c\u7121\u3044\u3068\u306f\u8a00\u3048Maya\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u306b\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u304c\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1610\" height=\"904\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2021\/07\/ma-file-parser-1.jpg\" alt=\"\" class=\"wp-image-11643\" srcset=\"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/ma-file-parser-1.jpg 1610w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/ma-file-parser-1-960x539.jpg 960w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/ma-file-parser-1-700x393.jpg 700w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/ma-file-parser-1-768x431.jpg 768w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2021\/07\/ma-file-parser-1-1536x862.jpg 1536w\" sizes=\"auto, (max-width: 1610px) 100vw, 1610px\" \/><\/figure><\/div>\n\n\n\n<p>Maya\u306e\u30b9\u30bf\u30a4\u30eb\u306f\u9069\u7528\u3055\u308c\u307e\u305b\u3093\u304c\u904e\u53bb\u4f5c\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u7121\u4e8b\u5b9f\u884c\u3067\u304d\u307e\u3057\u305f\u3068\u3055\u3002<\/p>\n\n\n\n<p>\u4ee3\u308f\u3063\u3066Javascript\u5fd8\u308c\u308b\u3093\u3084\u308d\u306a\uff5e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e45\u3057\u3076\u308a\u306bMaya2020\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4e45\u3057\u3076\u308a\u306b\u66f8\u304f\u6a5f\u4f1a\u304c\u3042\u3063\u3066\u3001Python\u81ea\u4f53\u306f\u7279\u306b\u899a\u3048\u306a\u304a\u3059\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001UI\u5468\u308a\u3001PySide2\u306e\u3053\u3068\u3092\u3059\u3063\u304b\u308a\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u5fa9\u7fd2\u3092\u59cb\u3081\u307e\u3057\u305f\u3002 Maya\u3092\u3044\u3061\u3044 [&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":[456],"tags":[548,549],"class_list":["post-11639","post","type-post","status-publish","format-standard","hentry","category-programming","tag-pyside2","tag-python2-7"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8YSE4-31J","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/11639","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=11639"}],"version-history":[{"count":6,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/11639\/revisions"}],"predecessor-version":[{"id":11649,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/11639\/revisions\/11649"}],"wp:attachment":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=11639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=11639"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=11639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}