Skip to content

Commit

Permalink
Object->Derender from Object UIs
Browse files Browse the repository at this point in the history
  • Loading branch information
LiruMouse committed Feb 28, 2020
1 parent be07df3 commit 9412f63
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
16 changes: 16 additions & 0 deletions indra/newview/llviewermenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9893,6 +9893,21 @@ class ListObjectCanEdit : public view_listener_t
}
};

class ListObjectDerender final : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) override
{
const std::string& unknown = LLTrans::getString("land_type_unknown");
for (const auto& id : LFIDBearer::getActiveSelectedIDs())
{
const auto& obj_data = get_obj_data(id); // Needed for object name
add_object_to_blacklist(id, obj_data ? obj_data->name : unknown);
}

return true;
}
};

class MediaCtrlCopyURL : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
Expand Down Expand Up @@ -10295,6 +10310,7 @@ void initialize_menus()
addMenu(new ListObjectEnableTouch, "List.Object.EnableTouch");
addMenu(new ListObjectEdit, "List.Object.Edit");
addMenu(new ListObjectCanEdit, "List.Object.CanEdit");
addMenu(new ListObjectDerender, "List.Object.Derender");
addMenu(new ListExperienceAllow, "List.Experience.Allow");
addMenu(new ListExperienceForget, "List.Experience.Forget");
addMenu(new ListExperienceBlock, "List.Experience.Block");
Expand Down
4 changes: 4 additions & 0 deletions indra/newview/skins/default/xui/en-us/menu_objects_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<on_visible function="List.Object.CanEdit" userdata=""/>
</menu_item_call>
<menu_item_separator/>
<menu_item_call label="Derender" name="Derender">
<on_click function="List.Object.Derender"/>
</menu_item_call>
<menu_item_separator/>
<menu_item_call label="Copy Key" name="Copy Key">
<on_click function="List.CopyUUIDs"/>
<on_visible function="List.EnableAnySelected"/>
Expand Down
4 changes: 4 additions & 0 deletions indra/newview/skins/default/xui/en-us/menu_url_objectim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<on_click function="List.Object.Edit" userdata=""/>
<on_visible function="List.Object.CanEdit" userdata=""/>
</menu_item_call>
<menu_item_separator/>
<menu_item_call label="Derender" name="Derender">
<on_click function="List.Object.Derender"/>
</menu_item_call>
<menu_item_separator
layout="topleft" />
<menu_item_call
Expand Down

0 comments on commit 9412f63

Please sign in to comment.