Created
June 6, 2013 05:39
-
-
Save hmasato/5719544 to your computer and use it in GitHub Desktop.
[Maya, Realflow, Win] _showRealflowNodeInfo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proc float _r(float $v){ | |
| float $dec=10000.0; | |
| return( int($dec*$v+0.5)/$dec ); | |
| } | |
| proc _showRealflowNodeInfo() | |
| { | |
| string $dir = getenv("TEMP"); | |
| string $fn = `file -q -sn`; | |
| $fn = $dir+"/"+basenameEx($fn)+"_rfnote.txt"; | |
| int $fd=fopen($fn, "w"); | |
| int $nRF = 0; | |
| string $RFs[]=`ls -type "RealflowMesh"`; | |
| for($i = 0; $i < size($RFs); $i++){ | |
| if($i == 0) fprint($fd, "type [RealflowMesh] ===========================\r\n"); | |
| string $rf = $RFs[$i]; | |
| string $rfn = getAttr($rf+".Path"); | |
| int $of = getAttr($rf+".Offset"); | |
| $rfn = substituteAllString($rfn, "/", "\\"); | |
| fprint($fd, "-------------------------\r\n"); | |
| fprint($fd, "["+($i+1)+"] "+$rf+"\r\n"); | |
| fprint($fd, " Path: "+$rfn+"\r\n"); | |
| fprint($fd, " Offset: "+$of+"\r\n"); | |
| fprint($fd, "\r\n"); | |
| $nRF ++; | |
| } | |
| string $RFs[]=`ls -type "RealflowEmitter"`; | |
| for($i = 0; $i < size($RFs); $i++){ | |
| if($i == 0) fprint($fd, "type [RealflowEmitter] ===========================\r\n"); | |
| string $rf = $RFs[$i]; | |
| float $lod = getAttr($rf+".LevelOfDetail"); | |
| float $mblur = getAttr($rf+".motionBlurMult"); | |
| fprint($fd, "-------------------------\r\n"); | |
| fprint($fd, "["+($i+1)+"] "+$rf+"\r\n"); | |
| fprint($fd, " LevelOfDetail: "+_r($lod)+"\r\n"); | |
| fprint($fd, " motionBlurMult: "+_r($mblur)+"\r\n"); | |
| fprint($fd, "\r\n"); | |
| int $n = `getAttr -s ($rf+".Paths")`; | |
| for($j = 0; $j < $n; $j++){ | |
| string $rfn = getAttr($rf+".Paths["+$j+"]"); | |
| string $rfp = getAttr($rf+".Prefixes["+$j+"]"); | |
| int $of = getAttr($rf+".Offsets["+$j+"]"); | |
| int $rng = getAttr($rf+".UseRanges["+$j+"]"); | |
| int $rngS = getAttr($rf+".MinRanges["+$j+"]"); | |
| int $rngE = getAttr($rf+".MaxRanges["+$j+"]"); | |
| int $rngC = getAttr($rf+".ClipRanges["+$j+"]"); | |
| $rfn = substituteAllString($rfn, "/", "\\"); | |
| fprint($fd, "-------------------------\r\n"); | |
| fprint($fd, " "+($j+1)+": "+"[Prefixes] "+$rfp+"\r\n"); | |
| fprint($fd, " "+($j+1)+": "+"[Paths] "+$rfn+"\r\n"); | |
| fprint($fd, " "+($j+1)+": "+"[Offsets] "+$of+"\r\n"); | |
| if($rng){ | |
| fprint($fd, " "+($j+1)+": "+"[MinRanges] "+$rngS+"\r\n"); | |
| fprint($fd, " "+($j+1)+": "+"[MaxRanges] "+$rngE+"\r\n"); | |
| fprint($fd, " "+($j+1)+": "+"[ClipRanges] "+$rngC+"\r\n"); | |
| } | |
| fprint($fd, "\r\n"); | |
| } | |
| $nRF ++; | |
| } | |
| fclose($fd); | |
| if($nRF > 0){ | |
| system( "shell "+substituteAllString($fn, "/", "\\") ); | |
| } | |
| } | |
| _showRealflowNodeInfo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment