I got the GuiObjectView to appear on the MainMenuGui by using canvas::setContent, i've disabled mouse interactions, and i also got setOrbitDist and setCameraRot working via scheduling
exec("./ui/MM_Blockhead.gui");
MainMenuGui.add(MM_BlockheadDisplay);
MM_BlockheadDisplay.setEmpty();
MM_BlockheadDisplay.dynamicObject = "MM_Blockhead_Object";
MM_BlockheadDisplay.setObject(MM_BlockheadDisplay.dynamicObject, "base/data/shapes/player/m.dts", "", 0);
MM_BlockheadDisplay.setMouse(0, 0);
function MM_BlockheadDisplay::adjustCamera(%gui)
{
%gui.setOrbitDist(7.5);
%gui.setCameraRot(0.2, 0, 3);
}
MM_BlockheadDisplay.schedule(100,adjustCamera);
function MM_BlockheadDisplay::animateAvatar(%gui)
{
%gui.setSequence(MM_BlockheadDisplay.dynamicObject, 0, "headup", 0);
%gui.setSequence(MM_BlockheadDisplay.dynamicObject, 1, "run", 1);
}
function MM_BlockheadDisplay::adjustAvatar(%gui)
{
if(MM_BlockheadDisplay.parts > 0)
{
%gui.hideAllNodes();
%gui.adjustAvatarNodes();
%gui.adjustAvatarColors();
}
else
{
%gui.applyDefaultPrefs();
}
}
function MM_BlockheadDisplay::adjustAvatarColors(%gui)
{
if(MM_BlockheadDisplay.parts > 0)
{
MM_BlockheadDisplay.setNodeColor(MM_BlockheadDisplay.dynamicObject, "headskin", $pref::Avatar::HeadColor);
for(%i = 0; %i < MM_BlockheadDisplay.parts; %i++)
{
%color = MM_BlockheadDisplay.color[%i];
if(%color $= "skin")
{
%color = $pref::Avatar::HeadColor;
}
MM_BlockheadDisplay.setNodeColor(MM_BlockheadDisplay.dynamicObject, MM_BlockheadDisplay.part[%i], %color);
}
}
}
function MM_BlockheadDisplay::adjustAvatarNodes(%gui)
{
MM_BlockheadDisplay.unHideNode(MM_BlockheadDisplay.dynamicObject, "headskin");
if(MM_BlockheadDisplay.parts > 0)
{
for(%i = 0; %i < MM_BlockheadDisplay.parts; %i++)
{
MM_BlockheadDisplay.unHideNode(MM_BlockheadDisplay.dynamicObject, MM_BlockheadDisplay.part[%i]);
}
}
MM_BlockheadDisplay.setIflFrame(MM_BlockheadDisplay.dynamicObject, "face", getIflFrame("face", $Pref::Avatar::FaceName));
MM_BlockheadDisplay.setIflFrame(MM_BlockheadDisplay.dynamicObject, "decal", getIflFrame("decal", MM_BlockheadDisplay.decal));
}
function MM_BlockheadDisplay::applyDefaultPrefs(%gui)
{
%gui.hideAllNodes();
%nodeCount = 0;
%node[%nodeCount++] = "headSkin" TAB "1 1 0 1";
%node[%nodeCount++] = "chest" TAB "1 1 1 1";
%node[%nodeCount++] = "LArm" TAB "1 1 1 1";
%node[%nodeCount++] = "RArm" TAB "1 1 1 1";
%node[%nodeCount++] = "LHand" TAB "1 1 0 1";
%node[%nodeCount++] = "RHand" TAB "1 1 0 1";
%node[%nodeCount++] = "pants" TAB "0 0 0.8 1";
%node[%nodeCount++] = "LShoe" TAB "0.2 0.2 0.2 1";
%node[%nodeCount++] = "RShoe" TAB "0.2 0.2 0.2 1";
for(%i = 1; %i <= %nodeCount; %i++)
{
MM_BlockheadDisplay.unHideNode(MM_BlockheadDisplay.dynamicObject, getField(%node[%i], 0));
MM_BlockheadDisplay.setNodeColor(MM_BlockheadDisplay.dynamicObject, getField(%node[%i], 0), getField(%node[%i], 1));
}
MM_BlockheadDisplay.setIflFrame(MM_BlockheadDisplay.dynamicObject, "face", 0);
MM_BlockheadDisplay.setIflFrame(MM_BlockheadDisplay.dynamicObject, "decal", 0);
}
function MM_BlockheadDisplay::hideAllNodes(%gui)
{
%nodeCount = 0;
%node[%nodeCount++] = "plume";
%node[%nodeCount++] = "triPlume";
%node[%nodeCount++] = "septPlume";
%node[%nodeCount++] = "Visor";
%node[%nodeCount++] = "helmet";
%node[%nodeCount++] = "pointyHelmet";
%node[%nodeCount++] = "flareHelmet";
%node[%nodeCount++] = "scoutHat";
%node[%nodeCount++] = "bicorn";
%node[%nodeCount++] = "copHat";
%node[%nodeCount++] = "knitHat";
%node[%nodeCount++] = "chest";
%node[%nodeCount++] = "femchest";
%node[%nodeCount++] = "pants";
%node[%nodeCount++] = "skirtHip";
%node[%nodeCount++] = "armor";
%node[%nodeCount++] = "bucket";
%node[%nodeCount++] = "cape";
%node[%nodeCount++] = "pack";
%node[%nodeCount++] = "quiver";
%node[%nodeCount++] = "tank";
%node[%nodeCount++] = "epaulets";
%node[%nodeCount++] = "epauletsRankA";
%node[%nodeCount++] = "epauletsRankB";
%node[%nodeCount++] = "epauletsRankC";
%node[%nodeCount++] = "epauletsRankD";
%node[%nodeCount++] = "ShoulderPads";
%node[%nodeCount++] = "LArm";
%node[%nodeCount++] = "LArmSlim";
%node[%nodeCount++] = "LHand";
%node[%nodeCount++] = "LHook";
%node[%nodeCount++] = "RArm";
%node[%nodeCount++] = "RArmSlim";
%node[%nodeCount++] = "RHand";
%node[%nodeCount++] = "RHook";
%node[%nodeCount++] = "pants";
%node[%nodeCount++] = "skirtHip";
%node[%nodeCount++] = "LShoe";
%node[%nodeCount++] = "LPeg";
%node[%nodeCount++] = "RShoe";
%node[%nodeCount++] = "RPeg";
%node[%nodeCount++] = "SkirtTrimLeft";
%node[%nodeCount++] = "SkirtTrimRight";
%node[%nodeCount++] = "LSki";
%node[%nodeCount++] = "RSki";
for(%i = 1; %i <= %nodeCount; %i++)
{
MM_BlockheadDisplay.hideNode(MM_BlockheadDisplay.dynamicObject, %node[%i]);
}
}
function getIflFrame(%node, %name)
{
%file = "base/data/shapes/player/" @ %node @ ".ifl";
if(isFile(%file))
{
%name = stripTrailingSpaces(fileBase(%name));
if(%name !$= "")
{
%fo = new FileObject() {};
%fo.openForRead(%file);
%hasFound = false;
%lineNum = 0;
while(!%fo.isEOF())
{
%line = %fo.readLine();
%thisDecal = stripTrailingSpaces(fileBase(%line));
if(%thisDecal $= %name)
{
%hasFound = true;
break;
}
else
{
%lineNum++;
}
}
%fo.close();
%fo.delete();
if(%hasFound)
{
return %lineNum;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
echo("\c2getIflFrame(\"" @ %node @ "\", \"" @ %name @ "\") : You did not supply a proper IFL file name to read from.");
return 0;
}
}
package MMBlockheadDisplay
{
function canvas::setContent(%this,%content)
{
if(%content $= "MainMenuGui")
{
MainMenuGui.pushToBack(MM_BlockheadDisplay);
MainMenuGui.pushToBack(MM_AuthBar);
MM_BlockheadDisplay.adjustAvatar();
MM_BlockheadDisplay.schedule(500,setSequence, MM_BlockheadDisplay.dynamicObject, 0, headup, 1);
MM_BlockheadDisplay.schedule(500,setSequence, MM_BlockheadDisplay.dynamicObject, 1, run, 1);
}
Parent::setContent(%this,%content);
}
function AvatarGui::onSleep(%this)
{
MM_BlockheadDisplay.adjustAvatar();
MM_BlockheadDisplay.animateAvatar();
Parent::onSleep(%this);
}
};
activatePackage(MMBlockheadDisplay);
However, setSequence, animateAvatar();, or either one of those put into a schedule, refuse to work from within the setContent block, it only works when it's entered via console, when you exit out of the AvatarGui or exit from the game back to the main menu
This is the last problem i need to solve before i move onto setting the Blockhead's appearance