I got bored and put in the math functions from Imprudence.

We need something to show the list - Preferably a bit better than the popup that they use, I'm thinking maybe an expanding sidebar on the build menu?

Oh, minor changes - Texture repeats go up to 1000 now because it has numbers, and I tweaked the primitive params section so it doesn't fall off the window.

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-16 22:08:33 -04:00
parent 7f0af74e00
commit d49c92b6fe
9 changed files with 350 additions and 218 deletions

View File

@@ -143,6 +143,9 @@ BOOL LLPanelObject::postBuild()
// Top
//--------------------------------------------------------
// Build constant tipsheet
childSetAction("build_math_constants",onClickBuildConstants,this);
// Lock checkbox
mCheckLock = getChild<LLCheckBoxCtrl>("checkbox locked");
childSetCommitCallback("checkbox locked",onCommitLock,this);
@@ -473,6 +476,7 @@ void LLPanelObject::getState( )
BOOL enable_scale = objectp->permMove() && objectp->permModify();
BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_link = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
childSetEnabled("build_math_constants",true);
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
&& (selected_count == 1);
@@ -901,8 +905,8 @@ void LLPanelObject::getState( )
F32 end_t = volume_params.getEndT();
// Hollowness
F32 hollow = volume_params.getHollow();
mSpinHollow->set( 100.f * hollow );
F32 hollow = 100.f * volume_params.getHollow();
mSpinHollow->set( hollow );
calcp->setVar(LLCalc::HOLLOW, hollow);
// All hollow objects allow a shape to be selected.
if (hollow > 0.f)
@@ -2382,6 +2386,8 @@ void LLPanelObject::clearCtrls()
childSetEnabled("advanced_cut", FALSE);
childSetEnabled("advanced_dimple", FALSE);
childSetVisible("advanced_slice", FALSE);
childSetEnabled("build_math_constants",false);
}
//
@@ -2521,6 +2527,12 @@ void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata)
self->sendSculpt();
}
// static
void LLPanelObject::onClickBuildConstants(void *)
{
LLNotifications::instance().add("ClickBuildConstants");
}
std::string shortfloat(F32 in)
{
std::string out = llformat("%f", in);