Beauty Salon α-BET (alphabet)

space001
Blender3d Collada dae modeling Use Papervision3d on Progression3 and 4 http://a-bet.secret.jp/#/access
more whaison works.
whaison space
space002
http://whaison.jugem.jp/ https://jp.pinterest.com/whaison/ https://www.instagram.com/whaison/ https://whaison.amebaownd.com/
https://suzuri.jp/whaison
http://whaison.blogspot.com/
http://whaison.tumblr.com/ http://qiita.com/users/whaison http://www.behance.net/whaison https://github.com/whaison/ https://bitbucket.org/whaison http://serato.com/user/whaison http://whaison.hatenablog.jp/

typo memo
http://d.hatena.ne.jp/whaison/


dayNote
http://www.myspace.com/whaison http://ameblo.jp/whaison/ http://blog.crooz.jp/whaison/ http://blog.crooz.jp/whaisoncafe/ http://nenpyo.org/whaison

fulldisk
http://full.shin-gen.jp/
http://whaison.client.jp/
http://www.dclog.jp/whaison/
featured forums.
space004
forum.unity3d.com/

forums.unrealengine.com.

Progression Forum.

FlashDevelop Forum.

Papervision3D Forum.

FlexUserGroup Forum.

SparkProjectForum.





Twitter







Mobile
qrcode
Calendar
SunMonTueWedThuFriSat
  12345
6789101112
13141516171819
20212223242526
27282930   
<< September 2020 >>
New Entries
Archives
Categories
Recent comment
  • FlashDevelopでフォント埋め込み
    感謝!! (12/24)
  • cocos2d-x-3.0rc0 ,c++ ,cpp でTexturePacker で 吐き出した、plist と png でパラパラアニメーションのコード例
    whaison (04/17)
  • Blender2.67にbvh(web上に2500個以上ころがってる)入れてそのBoneオブジェクトをUnity4.0のmecanimで使う
    whaison (08/19)
  • Apple Dev Center 「Certificates, Identifiers & Profiles」で Adhoc をつくってXCode4.6.1でArchiveしてipaを書き出し
    whaison (04/30)
  • Flash CS6でプロパティーパネルで物理演算のジャンプの高さを設定できるCitrus Engine
    whaison (03/01)
  • 「Flash以外、例えばKinectとか」ON TOKYO (会場:高田馬場4-11-8 Floor 6階 ) 短縮URL http://bit.ly/dI0Bfx
    uka (03/02)
  • App Store Review Guidelines アップル社のアプリ審査基準ガイドライン和訳 Apple が 開発者を悩ませ ユーザーをハッピーにしたいガイドライン。w
    whaison (01/25)
  • Unity3d では ADOBE JAPAN OSAKIで行われたFITC 2010 TOKYOでは、 「iOS用にパブリッシュするためには、フリー版ではなくて、有料版を買ってください。さらに追加のパッケージである、"iOS Package (for Development)"を買ってください」とのことだった。
    whaison (01/25)
  • enjoy Adidas-Futsal-Park
    whaison (01/16)
  • MacBookAir にFlashPlayer入れたらなった。Mac Flash Player 10.1/10.2でUstream などでカメラが認識されないバグそんなときはUstreamProducer!でもなくiPhoneだと直ぐにライブ配信できた
    whaison (01/14)
simple sintax high lighter2.0
space003
SyntaxHighlighter2.0用 の貼り付けコード作成する!
ブログパーツ-BLOG PARTS.
Profile
Links
Recommend
Admin
無料ブログ作成サービス JUGEM
Seach this site
            
2015.06.26 Friday
PolyPlane _ plane の全部の枚数から各ポイントの position (x,y,z)を引っ張ってさらにwidth heightを計測するmelスクリプト
PolyPlane _ plane の全部の枚数から各ポイントの position (x,y,z)を引っ張ってさらにwidth heightを計測するmelスクリプト



照会モード 
-query
http://shikatanaku.blogspot.jp/2010/01/blog-post_02.html

lsコマンドと-slフラグ
http://shikatanaku.blogspot.jp/2009/05/select.html


float $pos[] = `xform -query -worldSpace -translation ($ObjectRef + ".vtx[0]")`;
http://simplymaya.com/forum/showthread.php?t=26685

http://me.autodesk.jp/wam/maya/docs/Maya2010/Commands/xform.html


//-----------------------------------
//plane -p 1 1 1 -s 10 -n "plane001";
//pointPosition plane001.vtx[2];
//getAttr plane001.vtx[2]
//string $a[];

//string $curPolyName="polyPlane";

//polyPlane -n ($curPolyName+"_plane") -w 1-h 1 -sw 1 -sh 1 -cuv 1 ;
//setAttr ($curPolyName+"_plane.translateY") (1);
//setAttr ($curPolyName+"_plane.translateX") ((2));
//setAttr ($curPolyName+"_plane.translateZ") ((3));

select -all;
//string $name[] = `ls`;

int $_planeNum=0;
string $name[] = `ls -sl`;
$size = size($name);
int $size_minus=0;
for ($i=0;$i<$size;$i++) 
{
string $ObjectRef=$name[$i];

switch ($ObjectRef) {
 case "uiConfigurationScriptNode":
 $size_minus =$size_minus +1;
 break;
 case "sceneConfigurationScriptNode":
  $size_minus =$size_minus +1;
 break;
  case "ikSCsolver":
  $size_minus =$size_minus +1;
 break;
  case "polyPlane1":
  $size_minus =$size_minus +1;
 break;
 default:
     string $ObjectRefArr[];
   tokenize $ObjectRef "_" $ObjectRefArr;
   $ObjectRefArrLength = size($ObjectRefArr);
  // print ("$ObjectRefArrLength= "+$ObjectRefArrLength+"¥n");
    //print ("$ObjectRefArr[$ObjectRefArrLength-1]= "+$ObjectRefArr[$ObjectRefArrLength-1]+"¥n");
    
 if($ObjectRefArr[$ObjectRefArrLength-1]=="plane"){
     
    print ("$ObjectRef= "+$ObjectRef+"--------------------¥n");

   
       float $pos0[] = `xform -query -worldSpace -translation ($ObjectRef + ".vtx[0]")`;
       float $pos1[] = `xform -query -worldSpace -translation ($ObjectRef + ".vtx[1]")`;
       float $pos2[] = `xform -query -worldSpace -translation ($ObjectRef + ".vtx[2]")`;
       float $pos3[] = `xform -query -worldSpace -translation ($ObjectRef + ".vtx[3]")`;
    // float $scale[]=`xform -query -worldSpace -scale( ($ObjectRef + ".vtx[0]")`;
    //now you can use the array to access the postions:
    
    
    print("pos0: " + $pos0[0] + " " + $pos0[1] + " " + $pos0[2]+"¥n");
    print("pos1: " + $pos1[0] + " " + $pos1[1] + " " + $pos1[2]+"¥n");
    print("pos2: " + $pos2[0] + " " + $pos2[1] + " " + $pos2[2]+"¥n");
    print("pos3: " + $pos3[0] + " " + $pos3[1] + " " + $pos3[2]+"¥n");
    float $width;
    $width=abs($pos0[0]-$pos1[0]);
    float $height;
    $height=abs($pos1[2]-$pos2[2]);
    print (" ---------------------------------$width = "+$width+"¥n");
    print (" ---------------------------------$height= "+$height+"¥n");
    
    //print("scale: " + $scale[0] + " " + $scale[1] + " " + $scale[2]+"¥n");
   select $ObjectRef;
    float $width;
    //polyPlane -query -width "ch_cn__face1_plane";
   //$width = `polyPlane -query -width $ObjectRef`;
   // print (" ----------$width= "+$width+"¥n");
    
    string $buildStr;
    $buildStr="";
    for ($j=0;$j<$ObjectRefArrLength-1;$j++) 
    {
        $buildStr=$buildStr+"_"+$ObjectRefArr[$j];
    }
    string $charaName=$buildStr;
    print("--------charaName="+$charaName+"¥n");
    string $jointName1=$charaName+"_joint";
    string $jointName2=$charaName+"_joint2";
     print("--------jointName1="+$jointName1+"¥n");
     print("--------jointName2="+$jointName2+"¥n");
     select -d;
     //joint -position $pos[0] $pos[1] $pos[2] -name $jointName1;
     //joint -position ($pos[0]) $pos[1] ($pos[2]+100) -name $jointName2;
    // joint -e -zso -oj xyz $jointName1;
      
      
   $_planeNum=$_planeNum+1;
     print ("$ObjectRef= "+$ObjectRef+"----------end------¥n");
   }
 break;
}


}
$size =$size-$size_minus;
print ("_plane total Number = " + $_planeNum + "¥n");
//-------------------------
//http://shikatanaku.blogspot.jp/2009/12/fieldfloatfield_26.html
//http://me.autodesk.jp/wam/maya/docs/Maya2009/index.html?url=Syntax_Command_syntax.htm,topicNumber=d0e164912
//---------------------------
sphere -name "mySphere";
sphere -edit -radius 5 "mySphere";
sphere -query -radius "mySphere";
if (`sphere -query -radius "mySphere"` == 5)
{
	print("This sphere has a radius of 5!"+"¥n");
}	
float $radius=`sphere -query -radius "mySphere"`;
print("$radius= "+$radius+"¥n");

polyPlane -name "polyPlane001";
 float $width;
    //polyPlane -query -width "ch_cn__face1_plane";
 $width = `polyPlane -query -width "polyPlane001"`;
    print (" ----------$width= "+$width+"¥n");
    string $type = `nodeType polyPlane001`;
  print (" ----------$type= "+$type+"¥n");
 string $type = `nodeType ch_cn__face1_plane`;
  print (" ----------$type= "+$type+"¥n");
    // $width = `polyPlane -query -width "ch_cn__face1_plane"`;
  //  print (" ----------$width= "+$width+"¥n");
 $width= `getAttr polyPlane1.width`;
 print (" ----------$width= "+$width+"¥n");




 
| whaison | MEL(Maya Embedded Language) | 16:22 | comments(0) | - | pookmark |
Comment




whaisonStudyNoteBook をFaceBookで いいね!





Share |