Add 'Select all of model type" to the Edit menu.
This commit is contained in:
parent
9df6ec6305
commit
00f967f070
3 changed files with 28 additions and 0 deletions
|
@ -1970,6 +1970,8 @@ ui::MenuItem create_edit_menu()
|
|||
}*/
|
||||
create_menu_item_with_mnemonic(convert_menu, "To Whole _Entities", "ExpandSelectionToEntities");
|
||||
|
||||
create_menu_item_with_mnemonic(menu, "Select all of model type", "SelectAllOfModel");
|
||||
|
||||
menu_separator(menu);
|
||||
create_menu_item_with_mnemonic(menu, "Pre_ferences...", "Preferences");
|
||||
|
||||
|
@ -3271,6 +3273,8 @@ void MainFrame_Construct()
|
|||
GlobalCommands_insert("SelectAllOfType", makeCallbackF(Select_AllOfType),
|
||||
Accelerator('A', (GdkModifierType) GDK_SHIFT_MASK));
|
||||
|
||||
GlobalCommands_insert("SelectAllOfModel", makeCallbackF(Select_AllOfModel));
|
||||
|
||||
GlobalCommands_insert("TexRotateClock", makeCallbackF(Texdef_RotateClockwise),
|
||||
Accelerator(GDK_KEY_Next, (GdkModifierType) GDK_SHIFT_MASK));
|
||||
GlobalCommands_insert("TexRotateCounter", makeCallbackF(Texdef_RotateAntiClockwise),
|
||||
|
|
|
@ -751,6 +751,28 @@ void Select_AllOfType()
|
|||
}
|
||||
}
|
||||
|
||||
void Select_AllOfModel()
|
||||
{
|
||||
if (GlobalSelectionSystem().Mode() == SelectionSystem::eComponent) {
|
||||
if (GlobalSelectionSystem().ComponentMode() == SelectionSystem::eFace) {
|
||||
GlobalSelectionSystem().setSelectedAllComponents(false);
|
||||
Scene_BrushSelectByShader_Component(GlobalSceneGraph(),
|
||||
TextureBrowser_GetSelectedShader(GlobalTextureBrowser()));
|
||||
}
|
||||
} else {
|
||||
PropertyValues propertyvalues;
|
||||
const char *prop = EntityInspector_getCurrentKey();
|
||||
if (!prop || !*prop) {
|
||||
prop = "model";
|
||||
}
|
||||
Scene_EntityGetPropertyValues(GlobalSceneGraph(), prop, propertyvalues);
|
||||
GlobalSelectionSystem().setSelectedAll(false);
|
||||
if (!propertyvalues.empty()) {
|
||||
Scene_EntitySelectByPropertyValues(GlobalSceneGraph(), prop, propertyvalues);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Select_Inside(void)
|
||||
{
|
||||
SelectByBounds<SelectionPolicy_Inside>::DoSelection();
|
||||
|
|
|
@ -57,6 +57,8 @@ void Selection_MoveUp();
|
|||
|
||||
void Select_AllOfType();
|
||||
|
||||
void Select_AllOfModel();
|
||||
|
||||
void DoRotateDlg();
|
||||
|
||||
void DoScaleDlg();
|
||||
|
|
Loading…
Reference in a new issue