{"id":8793,"date":"2018-03-19T22:14:09","date_gmt":"2018-03-19T13:14:09","guid":{"rendered":"http:\/\/leavebehind.iobb.net\/wordpress\/?p=8793"},"modified":"2018-04-27T21:40:28","modified_gmt":"2018-04-27T12:40:28","slug":"maya-nparticle-age-initialstate","status":"publish","type":"post","link":"http:\/\/leavebehind.mydns.jp\/wordpress\/2018\/03\/19\/maya-nparticle-age-initialstate\/","title":{"rendered":"nParticle\u306e\u521d\u671f\u72b6\u614b\u306e\u4fdd\u5b58\u3068Age\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8"},"content":{"rendered":"<p>Maya\u306enParticle\u3067\u3001\u3042\u308b\u7a0b\u5ea6\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u521d\u671f\u72b6\u614b\u3092\u4f5c\u6210\u3059\u308b\u6642\u3001\u56f0\u3063\u305f\u3053\u3068\u304c\u8d77\u3053\u308a\u307e\u3059\u3002<\/p>\n<p>\u300cFields\/Solvers &gt; Initial State &gt; Set for Selected\u300d(\u65e5\u672c\u8a9e\u306e\u30e1\u30cb\u30e5\u30fc\u306f\u77e5\u3089\u3093\uff01)\u3092\u5b9f\u884c\u3057\u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u306e\u3061\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u958b\u59cb\u30d5\u30ec\u30fc\u30e0\u306b\u623b\u308b\u3068\u3001\u4f4d\u7f6e\u306a\u3069\u306f\u4fdd\u305f\u308c\u305f\u307e\u307e\u3067\u3059\u304c\u3001age\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u306b\u304a\u304b\u3057\u306a\u6570\u5024\u304c\u5165\u3063\u305f\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>2016.5\u30012017\u30012018\u3067\u78ba\u8a8d\u3057\u307e\u3057\u305f\u304c\u3069\u308c\u3082\u3053\u306e\u73fe\u8c61\u304c\u767a\u751f\u3057\u307e\u3059\u3002age\u3092\u6b63\u3057\u304f\u4fdd\u6301\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u4e8b\u306f\u521d\u671f\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u306b\u95a2\u3057\u3066\u3001LifeSpan\u3067\u6d88\u6ec5\u3055\u305b\u305f\u308a\u3001ArrayMapper\u306b\u3088\u308b\u8a55\u4fa1\u304c\u6b63\u3057\u304f\u3067\u304d\u307e\u305b\u3093\u3002\u50d5\u3060\u3051\u306e\u554f\u984c\uff1f\u30cd\u30c3\u30c8\u691c\u7d22\u3057\u3066\u3082\u5f15\u3063\u304b\u304b\u3089\u306a\u3044\u3093\u3067\u3059\u3051\u3069\u3002<\/p>\n<p>\u4ee5\u4e0b\u305d\u306e\u691c\u8a3c\u3068\u89e3\u6c7a\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>\u691c\u8a3c\u7528\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u30b7\u30b9\u30c6\u30e0\u4e00\u5f0f\u306e\u4f5c\u6210\u306f\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\">import pymel.core as pm\nmyemitter = pm.emitter(pos=(0,0,0),type=\"omni\",r=10,sro=0,nuv=0,cye=\"none\",cyi=1,spd=1,srn=0,nsp=1,tsp=0,mxd=0,mnd=0,dx=1,dy=0,dz=0,sp=0)\nnpList = pm.nParticle()\nnp = npList[1]\npm.connectDynamic(np,em=myemitter)\nnp.ignoreSolverWind.set(True)\nnp.ignoreSolverGravity.set(True)<\/pre>\n<p>\u6bce\u79d210\u500b\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3092\u767a\u751f\u3055\u305b\u308b\u5358\u7d14\u306a\u30a8\u30df\u30c3\u30bf\u3067\u3059\u3002\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u306f\u30bd\u30eb\u30d0\u306eWind\u3068Gravity\u306e\u5f71\u97ff\u3092\u53d7\u3051\u307e\u305b\u3093\u3002\u3053\u308c\u309230\u30d5\u30ec\u30fc\u30e0\u5206\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002\u3061\u306a\u307f\u306b\u30b7\u30fc\u30f3\u306e\u958b\u59cb\u30d5\u30ec\u30fc\u30e0\u306f1\u3001\u7d42\u4e86\u309230\u3068\u3057\u3066\u3044\u307e\u3059\u3001\u30d5\u30ec\u30fc\u30e0\u30ec\u30fc\u30c8\u306fntsc\u3001\u3064\u307e\u308a\u6bce\u79d230\u30d5\u30ec\u30fc\u30e0\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/00mayaNPIniState_sim30frame.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8791 size-full\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/00mayaNPIniState_sim30frame.jpg\" alt=\"\" width=\"1371\" height=\"842\" srcset=\"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/00mayaNPIniState_sim30frame.jpg 1371w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/00mayaNPIniState_sim30frame-300x184.jpg 300w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/00mayaNPIniState_sim30frame-768x472.jpg 768w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/00mayaNPIniState_sim30frame-1024x629.jpg 1024w\" sizes=\"auto, (max-width: 1371px) 100vw, 1371px\" \/><\/a><\/p>\n<p>age\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u3092\u8868\u793a\u3057\u305f\u72b6\u614b\u3067\u3059\u3002\u3053\u306e\u72b6\u614b(\u30bf\u30a4\u30e0\u30b9\u30e9\u30a4\u30c0\u304c30\u30d5\u30ec\u30fc\u30e0\u306e\u4f4d\u7f6e)\u3067initial state\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u958b\u59cb\u30d5\u30ec\u30fc\u30e0(1\u30d5\u30ec\u30fc\u30e0\u76ee)\u306b\u5dfb\u304d\u623b\u3059\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/01mayaNPIniState_setInitialAndRewind.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8792\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/01mayaNPIniState_setInitialAndRewind.jpg\" alt=\"\" width=\"1371\" height=\"842\" srcset=\"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/01mayaNPIniState_setInitialAndRewind.jpg 1371w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/01mayaNPIniState_setInitialAndRewind-300x184.jpg 300w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/01mayaNPIniState_setInitialAndRewind-768x472.jpg 768w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/01mayaNPIniState_setInitialAndRewind-1024x629.jpg 1024w\" sizes=\"auto, (max-width: 1371px) 100vw, 1371px\" \/><\/a>\u306a\u3093\u304bage\u304c\u5897\u3048\u307e\u3057\u305f\u3002\u671f\u5f85\u3059\u308b\u5024\u306f\u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u6642\u306e\u5024\u3067\u3059\u3002\u5909\u308f\u3063\u3066\u3082\u3089\u3063\u3066\u306f\u56f0\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\n<p>\u306a\u305c\u3053\u306e\u5024\u306b\u306a\u3063\u305f\u304b\u3001\u63a8\u6e2c\u3059\u308b\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5f0f\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002<!--more--><\/p>\n<p>1\u30d5\u30ec\u30fc\u30e0\u76ee\u306eage = \u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u6642\u70b9\u3067\u306eage\u5024 + \u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u6642\u523b(30\u30d5\u30ec\u30fc\u30e0) + 1\u30d5\u30ec\u30fc\u30e0\u79d2(1\/30\u79d2)<\/p>\n<p>\u5e0c\u671b\u3068\u3057\u3066\u306f\u3001<\/p>\n<p>1\u30d5\u30ec\u30fc\u30e0\u76ee\u306eage = \u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u6642\u70b9\u3067\u306eage\u5024<\/p>\n<p>\u3068\u306a\u3089\u306a\u3044\u3068\u56f0\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3082\u305d\u3082\u3001\u521d\u671f\u72b6\u614b\u306e\u4fdd\u5b58(Set for selected)\u306e\u6a5f\u80fd\u306f\u3001\u305d\u308c\u3092\u5b9f\u884c\u3057\u305f\u6642\u70b9\u3067\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u306e\u72b6\u614b\u3092\u4fdd\u5b58\u3059\u308b\u3060\u3051\u3067\u3001\u305d\u306e\u72b6\u614b\u3092\u300c\u4f55\u30d5\u30ec\u30fc\u30e0\u76ee\u304b\u3089\u52d5\u4f5c\u3055\u305b\u308b\u304b\u300d\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u8a2d\u5b9a\u304c\u3042\u308a\u307e\u305b\u3093\u3002600\u30d5\u30ec\u30fc\u30e0\u8a08\u7b97\u3055\u305b\u305f\u5f8c\u3001200\u30d5\u30ec\u30fc\u30e0\u76ee\u304b\u3089\u305d\u306e\u72b6\u614b\u3092\u30b9\u30bf\u30fc\u30c8\u3055\u305b\u305f\u3044\u3068\u304b\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3053\u306e\u300c\u958b\u59cb\u30d5\u30ec\u30fc\u30e0\u306e\u554f\u984c\u300d\u306f\u7f6e\u3044\u3066\u304a\u304d\u30011\u30d5\u30ec\u30fc\u30e0\u76ee\u3078\u5dfb\u304d\u623b\u3057\u305f\u6642\u306bage\u5024\u304c\u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u6642\u70b9\u3067\u306eage\u5024\u306b\u306a\u308b\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u8abf\u67fb\u3001\u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u30571\u30d5\u30ec\u30fc\u30e0\u76ee\u3078\u5dfb\u304d\u623b\u3057\u305f\u6642\u306eage\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u306e\u5024\u3092\u51fa\u529b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\">pm.Attribute(\"nParticleShape1.age\").get()<\/pre>\n<p>\u4e0a\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u7d50\u679c\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\"># Result: [1.8366603236886032,\n 1.7477682039101212,\n 1.6561824774511746,\n 1.549161676215631,\n 1.4460878421672738,\n 1.3663259335252194,\n 1.2370737699174363,\n 1.1459848316570038,\n 1.0489200562323446] #<\/pre>\n<p>\u307e\u3041\u304a\u304b\u3057\u3044\u3067\u3059\u3002\u30d3\u30e5\u30fc\u30dd\u30fc\u30c8\u4e0a\u306e\u8868\u793a\u3068\u7cbe\u5ea6\u306f\u9055\u3044\u307e\u3059\u304c\u3053\u306e\u7d50\u679c\u3068\u307b\u307c\u540c\u3058\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306bage0\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u306e\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3059\u308b\u3068\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u540d\u306b\u300c0\u300d\u304c\u4ed8\u52a0\u3055\u308c\u305f\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3001age\u306e\u521d\u671f\u5024\u306fage0\u3067\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\">pm.Attribute(\"nParticleShape1.age0\").get()\n\n# Result: [0.8699936570219364,\n 0.7811015372434543,\n 0.689515810784508,\n 0.5824950095489642,\n 0.4794211755006069,\n 0.39965926685855246,\n 0.27040710325076966,\n 0.17931816499033704,\n 0.08225338956567796] #<\/pre>\n<p>\u3053\u308c\u304c\u6b63\u89e3\u3067\u3059\u3002<\/p>\n<p>\u3058\u3083\u3042\u3001\u306a\u305cage\u5024\u304c\u304a\u304b\u3057\u304f\u306a\u308b\u306e\u304b\u3001age0\u3092\u53c2\u7167\u3057\u3066\u5fa9\u5143\u3057\u306a\u3044\u306e\u304b\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7d4c\u3066\u3082\u4fee\u6b63\u3055\u308c\u306a\u3044\u306e\u306f\u300c\u4ed5\u69d8\u300d\u3063\u3066\u3053\u3068\u306a\u306e\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u6c17\u3092\u53d6\u308a\u76f4\u3057\u3066age\u5024\u554f\u984c\u3001\u305d\u3082\u305d\u3082age\u306f\u8aad\u53d6\u308a\u5c02\u7528\u306e\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u3067\u3059\u3002\u3055\u3089\u306b\u8a00\u3046\u3068age\u5024\u306fbirthTime\u5024\u3068\u73fe\u5728\u6642\u523b\u3092\u53c2\u7167\u3057\u3066\u8a08\u7b97\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u300cage = \u73fe\u5728\u6642\u523b &#8211; birthTime\u300d\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u304c\u4fdd\u5b58\u3055\u308c\u305fbirthTime0\u3067\u3059\u3002\u306a\u3093\u3068\u306a\u304fage\u306b\u300c-1\u300d\u304b\u3051\u305f\u6570\u5024\u3067\u3059\u3002\u53b3\u5bc6\u306b\u306f1\/30\u5c11\u306a\u3044\u3067\u3059\u304c\u3001\u307e\u305f\u5f8c\u3067\u3002<\/p>\n<pre class=\"lang:python decode:true\">pm.Attribute(\"nParticleShape1.birthTime0\").get()\n\n# Result: [-1.8033269903552698,\n -1.7144348705767878,\n -1.6228491441178412,\n -1.5158283428822976,\n -1.4127545088339404,\n -1.332992600191886,\n -1.203740436584103,\n -1.1126514983236704,\n -1.0155867228990112] #<\/pre>\n<p>age\u304cbirthTime\u3068\u73fe\u5728\u6642\u523b\u304b\u3089\u8a08\u7b97\u3055\u308c\u3066\u3044\u308b\u306a\u3089\u3001\u958b\u59cb\u30d5\u30ec\u30fc\u30e0\u3067age\u304c\u300c0.5\u300d\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u306fbirthTime0\u306f\u300c\u958b\u59cb\u30d5\u30ec\u30fc\u30e0(\u79d2) &#8211; 0.5\u300d\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u4f8b\u3067\u4f7f\u7528\u3057\u3066\u3044\u308b\u756a\u53f70(index = 0)\u306e\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u306b\u3064\u3044\u3066\u3044\u3046\u3068\u3001age\u5024\u304c\u958b\u59cb\u30d5\u30ec\u30fc\u30e0\u3067\u300c0.8699936570219364\u300d\u3068\u306a\u308b\u306b\u306fbirthTime0\u306f\u300c-0.8699936570219364\u300d\u3067\u3042\u308b\u3068\u3053\u308d\u304c\u300c-1.8033269903552698\u300d\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u4e8b\u3067birthTime0\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\">newBirthTime = [(x * -1) for x in pm.Attribute(\"nParticleShape1.age0\").get()]\npm.Attribute(\"nParticleShape1.birthTime0\").set(newBirthTime)<\/pre>\n<p>age0\u306e\u5024\u306b\u300c-1\u300d\u3092\u4e57\u3058\u3066birthTime0\u3092\u8a08\u7b97\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002\u4e0a\u3092\u5b9f\u884c\u3057\u3066\u30bf\u30a4\u30e0\u30b9\u30e9\u30a4\u30c0\u3092\u9069\u5f53\u306b\u30b9\u30af\u30e9\u30d6\u30571\u30d5\u30ec\u30fc\u30e0\u76ee\u306b\u5dfb\u304d\u623b\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/02aCorrectedAge.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8795\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/02aCorrectedAge.jpg\" alt=\"\" width=\"1371\" height=\"842\" srcset=\"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02aCorrectedAge.jpg 1371w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02aCorrectedAge-300x184.jpg 300w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02aCorrectedAge-768x472.jpg 768w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02aCorrectedAge-1024x629.jpg 1024w\" sizes=\"auto, (max-width: 1371px) 100vw, 1371px\" \/><\/a><\/p>\n<p>\u671f\u5f85\u3057\u3066\u3044\u308b\u6570\u5024\u3068\u8fd1\u3044\u3067\u3059\u304c\u30010.033\u307b\u3069\u591a\u3044\u3067\u3059\u3002\u304a\u305d\u3089\u304f1\/30\u79d2(1\u30d5\u30ec\u30fc\u30e0)\u3067\u3059\u3002\u3053\u308c\u4f55\u3067\u3057\u3087\u3046\uff1f\u958b\u59cb\u304c1\u30d5\u30ec\u30fc\u30e0\u3060\u304b\u3089\uff1f<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3061\u3087\u3063\u3068\u4fee\u6b63\u3002<\/p>\n<pre class=\"lang:python decode:true\">deltaTime= 1.0 \/ pm.mel.currentTimeUnitToFPS()\nnewBirthTime = [(x * -1) + deltaTime for x in pm.Attribute(\"nParticleShape1.age0\").get()]\npm.Attribute(\"nParticleShape1.birthTime0\").set(newBirthTime)<\/pre>\n<p>\u3053\u308c\u3067\u30011\u30d5\u30ec\u30fc\u30e0\u76ee\u3067\u6b63\u3057\u3044age\u304c\u5fa9\u5143\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3061\u3083\u3093\u3068\u66f8\u304f\u306a\u3089\u3001<\/p>\n<pre class=\"lang:python decode:true\"># Correct particle age attribute, which has initial state.\nimport pymel.core as pm\n\ndef correctInitialAge(particleShape):\n    try:\n        deltaTime= 1.0 \/ pm.mel.currentTimeUnitToFPS()\n        newBirthTime = [(x * -1) + (deltaTime) for x in particleShape.age0.get()]\n        particleShape.birthTime0.set(newBirthTime)\n    except TypeError:\n        print \"Initial state not exist\"\n\ndef main():\n    selection = pm.selected()\n    if len(selection) &gt; 0:\n        if pm.nodeType(selection[0]) == \"nParticle\":\n            correctInitialAge(selection[0])\n        elif pm.nodeType(selection[0]) == \"transform\":\n            shapes = pm.listRelatives(selection[0],shapes=True)\n            ntList = [s for s in shapes if pm.nodeType(s) == \"nParticle\"]\n            if len(ntList) &gt; 0:\n                correctInitialAge(ntList[0])\n\nif __name__ == '__main__':\n    main()<\/pre>\n<p>\u300c\u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u300d\u3057\u305f\u5f8c\u3001\u4e0a\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001age\u5024\u306e\u88dc\u6b63\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/02CorrectedAge.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8790\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2018\/03\/02CorrectedAge.jpg\" alt=\"\" width=\"1371\" height=\"842\" srcset=\"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02CorrectedAge.jpg 1371w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02CorrectedAge-300x184.jpg 300w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02CorrectedAge-768x472.jpg 768w, http:\/\/leavebehind.mydns.jp\/wordpress\/wp-content\/uploads\/2018\/03\/02CorrectedAge-1024x629.jpg 1024w\" sizes=\"auto, (max-width: 1371px) 100vw, 1371px\" \/><\/a><\/p>\n<p>\u6b63\u3057\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307b\u3063\u305f\u3089\u304b\u3057\u306e\u300c\u958b\u59cb\u30d5\u30ec\u30fc\u30e0\u306e\u554f\u984c\u300d\u3067\u3059\u304c\u300130\u30d5\u30ec\u30fc\u30e0\u3067\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u3082\u306e\u309210\u30d5\u30ec\u30fc\u30e0\u76ee\u304b\u3089\u958b\u59cb\u3057\u305f\u3044\u5834\u5408\u3001birthTime\u306e\u88dc\u6b63\u3092\u3057\u305f\u5f8c\u3001\u6240\u5c5e\u3057\u3066\u3044\u308bnucleus\u306estartFrame\u309210.0\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002nucleus\u306f10\u30d5\u30ec\u30fc\u30e0\u76ee\u307e\u3067\u521d\u671f\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305f\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u306eage\u3092\u66f4\u65b0\u3057\u307e\u305b\u3093\u3001\u307e\u305f\u30a8\u30df\u30c3\u30bf\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3082\u6b62\u307e\u308a\u307e\u3059\u306e\u306710\u30d5\u30ec\u30fc\u30e0\u76ee\u307e\u3067\u65b0\u898f\u30d1\u30fc\u30c6\u30a3\u30af\u30eb\u3082\u767a\u751f\u3057\u307e\u305b\u3093\u3002\u53b3\u5bc6\u306b\u306fbirthTime\u306b\u77db\u76fe\u304c\u51fa\u307e\u3059\u3051\u3069\u306d\u3001\u3072\u3068\u307e\u305a\u3053\u308c\u3067\u89e3\u6c7a\u3057\u305f\u4e8b\u306b\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Maya\u306enParticle\u3067\u3001\u3042\u308b\u7a0b\u5ea6\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u521d\u671f\u72b6\u614b\u3092\u4f5c\u6210\u3059\u308b\u6642\u3001\u56f0\u3063\u305f\u3053\u3068\u304c\u8d77\u3053\u308a\u307e\u3059\u3002 \u300cFields\/Solvers &gt; Initial State &gt; Set for Selected [&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":"\u521d\u671f\u72b6\u614b\u304c\u4fdd\u5b58\u3055\u308c\u305fnParticle\u306eAge\u30a2\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u5024\u3092\u88dc\u6b63\u3059\u308b\u3002","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,328,229,330],"class_list":["post-8793","post","type-post","status-publish","format-standard","hentry","category-cg","tag-maya","tag-nparticles","tag-pymel","tag-script"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8YSE4-2hP","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/8793","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=8793"}],"version-history":[{"count":22,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/8793\/revisions"}],"predecessor-version":[{"id":8836,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/8793\/revisions\/8836"}],"wp:attachment":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=8793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=8793"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=8793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}