Wednesday 18 May 2011

soFar;

For the most part this works, the "set" button which sets a new position for emitters only works if one pSet is present in a scene, thats an issue im trying to sort out, the emitter panal needs some formating and tidying up, but it works and will hopefully help me correct the set button issue.

Friday 13 May 2011

pRigger - procedure pRiggerCreate

Finished my first alpha procedure for the partical rigger, in short what it does when placed in the master script, is create locators, emitters and particals along with a root control for the rig, which it then parents them all up every creation cycle (cc).

emitters & particals >>>> locators >>>> rootControl >>>> pSet(group)>>>>root(group)

only one "pSet" and "rootControl" is created per cc and only one "root" is created per scene but the number of emitters attached to to a rootControl is currently unlimited.
Some minor tweaks need to the code itself, mostly renaming variables and such, formating and ive probably missed a couple of random variables that need deleting, its only an alpha code at the moment so it shouldnt matter too much, enjoy;
 

Thursday 5 May 2011

here brian

proc sc_pRigger_GUI()
{
if (`window -exists "sc_pRig_gui"`) deleteUI "sc_pRig_gui";
window -w 150 -h 300 -t "pRigger" -maximizeButton false -minimizeButton false sc_pRig_gui;
string $layout = `formLayout`;
string $layoutTabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5`;
formLayout -edit
-attachForm $layoutTabs "top" 0
-attachForm $layoutTabs"left" 0
-attachForm $layoutTabs "bottom" 0
-attachForm $layoutTabs "right" 0
$layout;
string $base = `rowColumnLayout -numberOfColumns 3
-columnWidth 1 5
-columnWidth 2 200
-columnWidth 3 5`;
button -vis 0;
textFieldGrp -l "Number of Emitters: " -cw2 100 100 -tx 1 numOfEmits;
button -vis 0;
button -vis 0;
textFieldGrp -l "Rig Type: " -cw2 100 100 rigType;
button -vis 0;
button -vis 0;
button -l "Create" -c sc_pRigger_cube;
button -vis 0;
setParent..;
string $geo = `rowColumnLayout -numberOfColumns 5`;
setParent..;
string $forces = `rowColumnLayout -numberOfColumns 5`;
setParent..;
tabLayout -edit
-tabLabel $base "Emitters" -tabLabel $geo "Geometry" -tabLabel $forces "Forces" $layoutTabs;
showWindow sc_pRig_gui;
}
proc sc_pRigger_cube()
{
int $counter = (`textFieldGrp -q -tx numOfEmits`);
print ("numberOfEmitters:" + " " + $counter + "\n");
int $cubeSubCounter = $counter + 1;
print ("subDivisions:" + " " + $cubeSubCounter + "\n");
if ($counter>0)
{
polyCube -sy $cubeSubCounter -sx 2;
rename pRigCube;
move -r -os -wd 0 0.5 0 ;
int $vertCount = $counter;
while ($counter>0)
{
$vertCount = (($counter - 1)*3+13);
//this now equals the assumption that there is atleast one emitter being rigged.
emitter -pos 0 0 0 -type omni -r 100 -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 ;
rename pRigEmit;
move -r -os -wd 0 0 -0.5 ;
string $pRigEmit[] = (`ls -sl`);
//creates renames moves and contains the emitter in a variable.
particle;
rename pRigPart;
string $pRigPart[] = (`ls -sl`);
connectDynamic -em $pRigEmit $pRigPart;
//creates renames moves and contains and links the emitter to the emitter whilst containing the partical in a variable.
$counter = ($counter-1);
//deducts the values for the while loop, prevents infinite loops.
print ("startingVert:" + " " + $vertCount + "\n");
}
}
}
sc_pRigger_GUI()

Wednesday 4 May 2011

script dump

proc sc_pRigger_GUI()
{
if (`window -exists "sc_pRig_gui"`) deleteUI "sc_pRig_gui";
window -w 150 -h 300 -t "Locator Randomiser" -maximizeButton false -minimizeButton false sc_pRig_gui;
string $layout = `formLayout`;
string $layoutTabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5`;
formLayout -edit
    -attachForm $layoutTabs "top"    0
     -attachForm $layoutTabs"left"   0
     -attachForm $layoutTabs "bottom" 0
     -attachForm $layoutTabs "right"  0
     $layout;


string $base = `rowColumnLayout -numberOfColumns 3
                -columnWidth 1 5
                -columnWidth 2 200
                -columnWidth 3 5`;
button -vis 0;
textFieldGrp -l "Number of Emitters: " -cw2 100 100 -tx 1 numOfEmits;
button -vis 0;

button -vis 0;
textFieldGrp -l "Rig Type: " -cw2 100 100 rigType;
button -vis 0;

button -vis 0;
button -l "Create" -c sc_pRigger_cube;
button -vis 0;

setParent..;

string $geo = `rowColumnLayout -numberOfColumns 5`;

setParent..;

string $forces = `rowColumnLayout -numberOfColumns 5`;

setParent..;

tabLayout -edit
          -tabLabel $base "Emitters" -tabLabel $geo "Geometry" -tabLabel $forces "Forces" $layoutTabs;


showWindow sc_pRig_gui;
}


proc sc_pRigger_cube()

{
int $counter = (`textFieldGrp -q -tx numOfEmits`);

    if ($counter>0)
    {
    polyCube -sx $counter;
    rename pRigCube;

    emitter -pos 0 0 0 -type omni -r 100 -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 ;
        rename pRigEmit;
        particle;
        rename pRigPart;


    }
}
sc_pRigger_GUI()