summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
committerRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
commitc6d752b880cacca8fb8f10f28790a50161fcb9ab (patch)
tree14910a69597962134f2e78e864a2f05962a16356 /indra/newview/llpanelvolume.cpp
parent76101843c0d390c25a783f212eb1ea75e508ada4 (diff)
parent7d87e41bbd5d4761b1eb17e49b7a00b948d84213 (diff)
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into gltf-dev-maint-a-merge
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r--indra/newview/llpanelvolume.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 8d8263448d..9e8091aac5 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -90,7 +90,7 @@ const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f;
const F32 DEFAULT_DENSITY = 1000.f;
// "Features" Tab
-BOOL LLPanelVolume::postBuild()
+bool LLPanelVolume::postBuild()
{
// Flexible Objects Parameters
{
@@ -213,14 +213,14 @@ BOOL LLPanelVolume::postBuild()
// Start with everyone disabled
clearCtrls();
- return TRUE;
+ return true;
}
LLPanelVolume::LLPanelVolume()
: LLPanel(),
mComboMaterialItemCount(0)
{
- setMouseOpaque(FALSE);
+ setMouseOpaque(false);
mCommitCallbackRegistrar.add("PanelVolume.menuDoToSelected", boost::bind(&LLPanelVolume::menuDoToSelected, this, _2));
mEnableCallbackRegistrar.add("PanelVolume.menuEnable", boost::bind(&LLPanelVolume::menuEnableItem, this, _2));
@@ -285,10 +285,10 @@ void LLPanelVolume::getState( )
LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
// BUG? Check for all objects being editable?
- BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced();
- BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )
+ bool editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced();
+ bool single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )
&& LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1;
- BOOL single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) &&
+ bool single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) &&
LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1;
// Select Single Message
@@ -306,26 +306,26 @@ void LLPanelVolume::getState( )
}
// Light properties
- BOOL is_light = volobjp && volobjp->getIsLight();
+ bool is_light = volobjp && volobjp->getIsLight();
getChild<LLUICtrl>("Light Checkbox Ctrl")->setValue(is_light);
getChildView("Light Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp);
if (is_light && editable && single_volume)
{
- //mLabelColor ->setEnabled( TRUE );
+ //mLabelColor ->setEnabled( true );
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
- LightColorSwatch->setEnabled( TRUE );
- LightColorSwatch->setValid( TRUE );
+ LightColorSwatch->setEnabled( true );
+ LightColorSwatch->setValid( true );
LightColorSwatch->set(volobjp->getLightSRGBBaseColor());
}
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if (LightTextureCtrl)
{
- LightTextureCtrl->setEnabled(TRUE);
- LightTextureCtrl->setValid(TRUE);
+ LightTextureCtrl->setEnabled(true);
+ LightTextureCtrl->setValid(true);
LightTextureCtrl->setImageAssetID(volobjp->getLightTextureID());
}
@@ -357,14 +357,14 @@ void LLPanelVolume::getState( )
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
- LightColorSwatch->setEnabled( FALSE );
- LightColorSwatch->setValid( FALSE );
+ LightColorSwatch->setEnabled( false );
+ LightColorSwatch->setValid( false );
}
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if (LightTextureCtrl)
{
- LightTextureCtrl->setEnabled(FALSE);
- LightTextureCtrl->setValid(FALSE);
+ LightTextureCtrl->setEnabled(false);
+ LightTextureCtrl->setValid(false);
if (objectp->isAttachment())
{
@@ -386,7 +386,7 @@ void LLPanelVolume::getState( )
}
// Reflection Probe
- BOOL is_probe = volobjp && volobjp->isReflectionProbe();
+ bool is_probe = volobjp && volobjp->isReflectionProbe();
getChild<LLUICtrl>("Reflection Probe")->setValue(is_probe);
getChildView("Reflection Probe")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh());
@@ -449,9 +449,9 @@ void LLPanelVolume::getState( )
}
// Animated Mesh
- BOOL is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject();
+ bool is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject();
getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh);
- BOOL enabled_animated_object_box = FALSE;
+ bool enabled_animated_object_box = false;
if (root_volobjp && root_volobjp == volobjp)
{
enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable;
@@ -499,7 +499,7 @@ void LLPanelVolume::getState( )
}
// Flexible properties
- BOOL is_flexible = volobjp && volobjp->isFlexible();
+ bool is_flexible = volobjp && volobjp->isFlexible();
getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(is_flexible);
if (is_flexible || (volobjp && volobjp->canBeFlexible()))
{
@@ -577,7 +577,7 @@ void LLPanelVolume::getState( )
std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
if (editable && single_volume && material_same)
{
- mComboMaterial->setEnabled( TRUE );
+ mComboMaterial->setEnabled( true );
if (material_code == LL_MCODE_LIGHT)
{
if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
@@ -598,7 +598,7 @@ void LLPanelVolume::getState( )
}
else
{
- mComboMaterial->setEnabled( FALSE );
+ mComboMaterial->setEnabled( false );
}
// Physics properties
@@ -619,7 +619,7 @@ void LLPanelVolume::getState( )
mComboPhysicsShapeType->removeall();
mComboPhysicsShapeType->add(getString("None"), LLSD(1));
- BOOL isMesh = FALSE;
+ bool isMesh = false;
LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
{
@@ -660,7 +660,7 @@ void LLPanelVolume::getState( )
bool LLPanelVolume::precommitValidate( const LLSD& data )
{
// TODO: Richard will fill this in later.
- return TRUE; // FALSE means that validation failed and new value should not be commited.
+ return true; // false means that validation failed and new value should not be commited.
}
@@ -716,14 +716,14 @@ void LLPanelVolume::clearCtrls()
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
- LightColorSwatch->setEnabled( FALSE );
- LightColorSwatch->setValid( FALSE );
+ LightColorSwatch->setEnabled( false );
+ LightColorSwatch->setValid( false );
}
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if(LightTextureCtrl)
{
- LightTextureCtrl->setEnabled( FALSE );
- LightTextureCtrl->setValid( FALSE );
+ LightTextureCtrl->setEnabled( false );
+ LightTextureCtrl->setValid( false );
}
getChildView("Light Intensity")->setEnabled(false);
@@ -746,12 +746,12 @@ void LLPanelVolume::clearCtrls()
getChildView("FlexForceY")->setEnabled(false);
getChildView("FlexForceZ")->setEnabled(false);
- mSpinPhysicsGravity->setEnabled(FALSE);
- mSpinPhysicsFriction->setEnabled(FALSE);
- mSpinPhysicsDensity->setEnabled(FALSE);
- mSpinPhysicsRestitution->setEnabled(FALSE);
+ mSpinPhysicsGravity->setEnabled(false);
+ mSpinPhysicsFriction->setEnabled(false);
+ mSpinPhysicsDensity->setEnabled(false);
+ mSpinPhysicsRestitution->setEnabled(false);
- mComboMaterial->setEnabled( FALSE );
+ mComboMaterial->setEnabled( false );
}
//
@@ -767,7 +767,7 @@ void LLPanelVolume::sendIsLight()
}
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL value = getChild<LLUICtrl>("Light Checkbox Ctrl")->getValue();
+ bool value = getChild<LLUICtrl>("Light Checkbox Ctrl")->getValue();
volobjp->setIsLight(value);
LL_INFOS() << "update light sent" << LL_ENDL;
}
@@ -789,8 +789,8 @@ void LLPanelVolume::sendIsReflectionProbe()
}
LLVOVolume* volobjp = (LLVOVolume*)objectp;
- BOOL value = getChild<LLUICtrl>("Reflection Probe")->getValue();
- BOOL old_value = volobjp->isReflectionProbe();
+ bool value = getChild<LLUICtrl>("Reflection Probe")->getValue();
+ bool old_value = volobjp->isReflectionProbe();
if (value && value != old_value)
{ // defer to notification util as to whether or not we *really* make this object a reflection probe
@@ -809,7 +809,7 @@ void LLPanelVolume::sendIsReflectionProbe()
if (in_linkeset)
{
// In linkset with a phantom flag
- objectp->setFlags(FLAGS_PHANTOM, FALSE);
+ objectp->setFlags(FLAGS_PHANTOM, false);
}
}
volobjp->setIsReflectionProbe(value);
@@ -862,8 +862,8 @@ void LLPanelVolume::sendIsFlexible()
}
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL is_flexible = getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->getValue();
- //BOOL is_flexible = mCheckFlexible1D->get();
+ bool is_flexible = getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->getValue();
+ //bool is_flexible = mCheckFlexible1D->get();
if (is_flexible)
{
@@ -1081,10 +1081,10 @@ void LLPanelVolume::onPasteFeatures()
bool is_root = objectp->isRoot();
// Not sure if phantom should go under physics, but doesn't fit elsewhere
- BOOL is_phantom = clipboard["is_phantom"].asBoolean() && is_root;
+ bool is_phantom = clipboard["is_phantom"].asBoolean() && is_root;
LLSelectMgr::getInstance()->selectionUpdatePhantom(is_phantom);
- BOOL is_physical = clipboard["is_physical"].asBoolean() && is_root;
+ bool is_physical = clipboard["is_physical"].asBoolean() && is_root;
LLSelectMgr::getInstance()->selectionUpdatePhysics(is_physical);
if (clipboard.has("physics"))
@@ -1099,7 +1099,7 @@ void LLPanelVolume::onPasteFeatures()
objectp->setPhysicsFriction(clipboard["physics"]["friction"].asReal());
objectp->setPhysicsDensity(clipboard["physics"]["density"].asReal());
objectp->setPhysicsRestitution(clipboard["physics"]["restitution"].asReal());
- objectp->updateFlags(TRUE);
+ objectp->updateFlags(true);
}
// Flexible
@@ -1107,7 +1107,7 @@ void LLPanelVolume::onPasteFeatures()
if (is_flexible && volobjp->canBeFlexible())
{
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL update_shape = FALSE;
+ bool update_shape = false;
// do before setParameterEntry or it will think that it is already flexi
update_shape = volobjp->setIsFlexible(is_flexible);
@@ -1226,7 +1226,7 @@ void LLPanelVolume::onPasteLight()
{
if (clipboard.has("light"))
{
- volobjp->setIsLight(TRUE);
+ volobjp->setIsLight(true);
volobjp->setLightIntensity((F32)clipboard["light"]["intensity"].asReal());
volobjp->setLightRadius((F32)clipboard["light"]["radius"].asReal());
volobjp->setLightFalloff((F32)clipboard["light"]["falloff"].asReal());
@@ -1237,7 +1237,7 @@ void LLPanelVolume::onPasteLight()
}
else
{
- volobjp->setIsLight(FALSE);
+ volobjp->setIsLight(false);
}
if (clipboard.has("spot"))
@@ -1252,7 +1252,7 @@ void LLPanelVolume::onPasteLight()
if (clipboard.has("reflection_probe"))
{
- volobjp->setIsReflectionProbe(TRUE);
+ volobjp->setIsReflectionProbe(true);
volobjp->setReflectionProbeIsBox(clipboard["reflection_probe"]["is_box"].asBoolean());
volobjp->setReflectionProbeAmbiance((F32)clipboard["reflection_probe"]["ambiance"].asReal());
volobjp->setReflectionProbeNearClip((F32)clipboard["reflection_probe"]["near_clip"].asReal());
@@ -1267,7 +1267,7 @@ void LLPanelVolume::onPasteLight()
if (in_linkeset)
{
// In linkset with a phantom flag
- objectp->setFlags(FLAGS_PHANTOM, FALSE);
+ objectp->setFlags(FLAGS_PHANTOM, false);
}
}
@@ -1403,9 +1403,9 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
else if (volobjp->isLightSpotlight())
{ //no longer a spot light
setLightTextureID(id, item_id, volobjp);
- //self->getChildView("Light FOV")->setEnabled(FALSE);
- //self->getChildView("Light Focus")->setEnabled(FALSE);
- //self->getChildView("Light Ambiance")->setEnabled(FALSE);
+ //self->getChildView("Light FOV")->setEnabled(false);
+ //self->getChildView("Light Focus")->setEnabled(false);
+ //self->getChildView("Light Ambiance")->setEnabled(false);
}
}
@@ -1455,7 +1455,7 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
path = LL_PCODE_PATH_CIRCLE;
F32 scale = volobjp->getScale().mV[0];
- volobjp->setScale(LLVector3(scale, scale, scale), FALSE);
+ volobjp->setScale(LLVector3(scale, scale, scale), false);
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_ROTATION | UPD_POSITION | UPD_SCALE);
}
else
@@ -1489,7 +1489,7 @@ void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item
if (item && volobjp->isAttachment())
{
const LLPermissions& perm = item->getPermissions();
- BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
+ bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
if (!unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -1559,7 +1559,7 @@ void LLPanelVolume::onCommitAnimatedMeshCheckbox(LLUICtrl *, void*)
return;
}
LLVOVolume *volobjp = (LLVOVolume *)objectp;
- BOOL animated_mesh = getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->getValue();
+ bool animated_mesh = getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->getValue();
U32 flags = volobjp->getExtendedMeshFlags();
U32 new_flags = flags;
if (animated_mesh)
@@ -1618,6 +1618,6 @@ void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, co
}
else
{
- getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(FALSE);
+ getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(false);
}
}