SL-19753 PBR Some changes to the right-click menu

meow-7.2.2
Andrey Kleshchev 2023-05-23 20:44:31 +03:00
parent 0c7205e5f1
commit fa2c2a516c
3 changed files with 14 additions and 56 deletions

View File

@ -2831,18 +2831,6 @@ bool enable_object_edit_gltf_material()
return func.mCanModify && func.mMaterialId.notNull();
}
bool enable_object_save_gltf_material()
{
if (!LLMaterialEditor::capabilitiesAvailable())
{
return false;
}
LLSelectedTEGetmatIdAndPermissions func;
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
return func.mCanCopy && func.mMaterialId.notNull();
}
bool enable_object_open()
{
// Look for contents in root object, which is all the LLFloaterOpenObject
@ -2974,11 +2962,6 @@ void handle_object_edit_gltf_material()
LLMaterialEditor::loadLive();
}
void handle_object_save_gltf_material()
{
LLMaterialEditor::savePickedMaterialAs();
}
void handle_attachment_edit(const LLUUID& inv_item_id)
{
if (isAgentAvatarValid())
@ -9659,14 +9642,12 @@ void initialize_menus()
commit.add("Object.Edit", boost::bind(&handle_object_edit));
commit.add("Object.Edit", boost::bind(&handle_object_edit));
commit.add("Object.EditGLTFMaterial", boost::bind(&handle_object_edit_gltf_material));
commit.add("Object.SaveGLTFMaterial", boost::bind(&handle_object_save_gltf_material));
commit.add("Object.Inspect", boost::bind(&handle_object_inspect));
commit.add("Object.Open", boost::bind(&handle_object_open));
commit.add("Object.Take", boost::bind(&handle_take));
commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector));
enable.add("Object.EnableInspect", boost::bind(&enable_object_inspect));
enable.add("Object.EnableEditGLTFMaterial", boost::bind(&enable_object_edit_gltf_material));
enable.add("Object.EnableSaveGLTFMaterial", boost::bind(&enable_object_save_gltf_material));
enable.add("Object.EnableOpen", boost::bind(&enable_object_open));
enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1));
enable.add("Object.EnableDelete", boost::bind(&enable_object_delete));

View File

@ -13,21 +13,13 @@
function="EnableEdit" />
</menu_item_call>
<menu_item_call
label="Edit PBR Material"
label="Edit PBR material"
name="EditGLTFMaterial">
<menu_item_call.on_click
function="Object.EditGLTFMaterial" />
<menu_item_call.on_enable
function="Object.EnableEditGLTFMaterial"/>
</menu_item_call>
<menu_item_call
label="Save material to inventory"
name="SaveGLTFMaterial">
<menu_item_call.on_click
function="Object.SaveGLTFMaterial" />
<menu_item_call.on_enable
function="Object.EnableSaveGLTFMaterial"/>
</menu_item_call>
<menu_item_call
enabled="false"
label="Detach item"

View File

@ -22,29 +22,13 @@
function="EnableEdit"/>
</menu_item_call>
<menu_item_call
label="Edit PBR Material"
label="Edit PBR material"
name="EditGLTFMaterial">
<menu_item_call.on_click
function="Object.EditGLTFMaterial" />
<menu_item_call.on_enable
<menu_item_call.on_visible
function="Object.EnableEditGLTFMaterial"/>
</menu_item_call>
<menu_item_call
label="Save material to inventory"
name="SaveGLTFMaterial">
<menu_item_call.on_click
function="Object.SaveGLTFMaterial" />
<menu_item_call.on_enable
function="Object.EnableSaveGLTFMaterial"/>
</menu_item_call>
<menu_item_call
label="Build"
name="Build">
<menu_item_call.on_click
function="Object.Build" />
<menu_item_call.on_enable
function="EnableEdit"/>
</menu_item_call>
<menu_item_call
enabled="false"
label="Open"
@ -54,26 +38,27 @@
<menu_item_call.on_enable
function="Object.EnableOpen" />
</menu_item_call>
<menu_item_separator layout="topleft" />
<menu_item_call
enabled="false"
label="Sit Here"
label="Sit here"
name="Object Sit">
<menu_item_call.on_click
function="Object.SitOrStand" />
<menu_item_call.on_enable
<menu_item_call.on_visible
function="Object.EnableSit" />
</menu_item_call>
<menu_item_call
enabled="false"
label="Stand Up"
label="Stand up"
name="Object Stand Up">
<menu_item_call.on_click
function="Object.SitOrStand" />
<menu_item_call.on_enable
<menu_item_call.on_visible
function="Object.EnableStandUp" />
</menu_item_call>
<menu_item_call
label="Object Profile"
label="Object profile"
name="Object Inspect">
<menu_item_call.on_click
function="Object.Inspect" />
@ -81,13 +66,13 @@
function="Object.EnableInspect" />
</menu_item_call>
<menu_item_call
label="Zoom In"
label="Zoom in"
name="Zoom In">
<menu_item_call.on_click
function="Object.ZoomIn" />
</menu_item_call>
<menu_item_call
label="Show in linksets"
label="Show in Region Objects"
name="show_in_linksets">
<menu_item_call.on_click
function="Pathfinding.Linksets.Select" />
@ -108,7 +93,7 @@
</menu_item_call>
<menu_item_separator layout="topleft" />
<context_menu
label="Put On"
label="Put on"
name="Put On" >
<menu_item_call
enabled="false"
@ -185,7 +170,7 @@
</menu_item_call>
<menu_item_call
enabled="false"
label="Take Copy"
label="Take copy"
name="Take Copy">
<menu_item_call.on_click
function="Tools.TakeCopy" />
@ -223,7 +208,7 @@
layout="topleft" />
<menu_item_call
enabled="false"
label="Block Particle Owner"
label="Block particle owner"
name="Mute Particle">
<menu_item_call.on_click
function="Particle.Mute" />