GlobalSceneGraph().traverse( EntitySetClassnameSelected( classname ) );
}
-
void Entity_ungroupSelected(){
if ( GlobalSelectionSystem().countSelected() < 1 ) {
return;
}
}
+void Entity_ungroupSelectedPrimitives(){
+ if ( GlobalSelectionSystem().countSelected() < 1 ) {
+ return;
+ }
+
+ UndoableCommand undo( "ungroupSelectedPrimitives" );
+ Scene_parentSelectedBrushesToEntity( GlobalSceneGraph(), *Map_FindWorldspawn( g_map ));
+}
class EntityFindSelected : public scene::Graph::Walker
{
void Entity_constructMenu( GtkMenu* menu ){
create_menu_item_with_mnemonic( menu, "_Regroup", "GroupSelection" );
create_menu_item_with_mnemonic( menu, "_Ungroup", "UngroupSelection" );
+ create_menu_item_with_mnemonic( menu, "Re_move from Entity", "UngroupSelectedPrimitives" );
create_menu_item_with_mnemonic( menu, "_Connect", "ConnectSelection" );
create_menu_item_with_mnemonic( menu, "_KillConnect", "KillConnectSelection" );
create_menu_item_with_mnemonic( menu, "_Select Color...", "EntityColor" );
GlobalCommands_insert( "KillConnectSelection", FreeCaller<Entity_killconnectSelected>(), Accelerator( 'K', (GdkModifierType)( GDK_SHIFT_MASK ) ) );
GlobalCommands_insert( "GroupSelection", FreeCaller<Entity_groupSelected>() );
GlobalCommands_insert( "UngroupSelection", FreeCaller<Entity_ungroupSelected>() );
+ GlobalCommands_insert( "UngroupSelectedPrimitives", FreeCaller<Entity_ungroupSelectedPrimitives>() );
+
GlobalPreferenceSystem().registerPreference( "SI_Colors5", Vector3ImportStringCaller( g_entity_globals.color_entity ), Vector3ExportStringCaller( g_entity_globals.color_entity ) );
GlobalPreferenceSystem().registerPreference( "LastLightIntensity", IntImportStringCaller( g_iLastLightIntensity ), IntExportStringCaller( g_iLastLightIntensity ) );