this is my first prman mel tool.
its helpful for fast & controlable prman rib instance.but just for polygon.
this is still a beta version.
and the final version will be soon.
u can test it. and send your bug or minds to me : kisoyo.n@gmail.com.
Overview:
1.Fast PRman Polygon Vertex RIB Replacement.
2.Controlable Replacement.
3.Singel or Multi RIB Replacement.
4.Visualization MEL Tool.
5.RIB Link Manager inside.
6.Prman Quick Rendering ENV inside.
7.Open sources.
8.Multi RIB to Singel/Multi Objs do not work yet.
9.Dynamic transition still working. Not work yet.
MEL Scripts:
//--------------------------------------------------//
// Project : Prman Polygon Vertex Instance
// Author : furn
// Version : 1.1beta
// Update : Render Attributes automagic set
// TestPack : Yes
// TestPart : Multi RIB Instance
// Contact : Email - m11ss@qq.com
// - kisoyo.n@gmail.com
// OICQ - 394705
//--------------------------------------------------//
if(window -ex prmanPolyInstance
) //auto delete previous window
{ deleteUI prmanPolyInstance; }
if(!pluginInfo -q -l RenderMan\_for\_Maya
) //auto load prman plugin
{ loadPlugin "RenderMan_for_Maya"; }
global proc addSlObj() { //add object selected to instanceObjList . Allow MultiSelection.
string $nodeNames[] = selectedNodes
; //get selected objs
string $symbol = "|"; //define token symbol
string $arr[]; //define a string for right nodeName
for ($nodeName in $nodeNames)
{
tokenize $nodeName $symbol $arr; //tokenize use symbol "|"
textScrollList -edit -append ($arr[0]) instanceObjList; //add obj
}
}
proc delSlObj() { //del objects selected in instanceObjList. Allow MultiSelection.
string $slEleNames[] = textScrollList -q -si instanceObjList
; //get selected elements' name
for ($slEle in $slEleNames)
textScrollList -edit -ri ($slEle) instanceObjList; //command line
}
proc delSlRib() { //del objects selected in multiRIBList. Allow MultiSelection.
string $slEleNames[] = textScrollList -q -si multiRIBList
; //get selected elements' name
for ($slEle in $slEleNames)
textScrollList -edit -ri ($slEle) multiRIBList; //command line
}
proc selectObj() { //instanceObjList select command. Allow MultiSelection.
string $slEleNames[] = textScrollList -q -si instanceObjList
; //get selected elements' name
int $selectNum = size($slEleNames);
if ($selectNum != 0)
{
select -cl;
for ($slEle in $slEleNames)
{
select -tgl $slEle; //command line
}
}
else
{
print "nothing select in list";
}
}
proc addRmanAtt() //create PRman Att for nodes
{
string $slEleNames[] = textScrollList -q -si instanceObjList
;
for ($slEleName in $slEleNames)
{
string $shapeName[] = ls -dag ($slEleName)
;
rmanAddAttr ($shapeName[1]) rmanGetAttrName "preShapeScript"
"";
rmanUpdateAE;
//vertexInstance($inputObjName,$ribFullPath); add rib path
}
}
proc delRmanAtt() //delete PRman Att for nodes
{
string $slEleNames[] = textScrollList -q -si instanceObjList
;
for ($slEleName in $slEleNames)
{
string $shapeName[] = ls -dag ($slEleName)
;
deleteAttr ($shapeName[1] + ".rman__torattr___preShapeScript"); //command line
rmanUpdateAE;
}
}
proc setRmanRIBproc(string $ribFullPath)
{
string $slEleNames[] = textScrollList -q -si instanceObjList
;
string $shapeNames[] = ls -sl -dag $slEleNames
;
int $numOfNodes = size($shapeNames)
;
for ($i=0;$i