]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/patchmanip.cpp
new funny option: -samplessearchboxsize, tunes the size of the search box of -samples...
[xonotic/netradiant.git] / radiant / patchmanip.cpp
index af278f990b2975fac86d9eeeb03ff1bdd7f25c8e..b8bccee63d735ad3c8bb40279880f08ca13d4624 100644 (file)
@@ -474,6 +474,13 @@ void Patch_Bevel()
   Scene_PatchConstructPrefab(GlobalSceneGraph(), PatchCreator_getBounds(), TextureBrowser_GetSelectedShader(GlobalTextureBrowser()), eBevel, GlobalXYWnd_getCurrentViewType());
 }
 
+void Patch_Sphere()
+{
+  UndoableCommand undo("patchCreateSphere");
+
+  Scene_PatchConstructPrefab(GlobalSceneGraph(), PatchCreator_getBounds(), TextureBrowser_GetSelectedShader(GlobalTextureBrowser()), eSphere, GlobalXYWnd_getCurrentViewType());
+}
+
 void Patch_SquareBevel()
 {
 }
@@ -744,6 +751,7 @@ void Patch_registerCommands()
   GlobalCommands_insert("PatchSquareBevel", FreeCaller<Patch_SquareBevel>());
   GlobalCommands_insert("PatchSquareEndcap", FreeCaller<Patch_SquareEndcap>());
   GlobalCommands_insert("PatchCone", FreeCaller<Patch_Cone>());
+  GlobalCommands_insert("PatchSphere", FreeCaller<Patch_Sphere>());
   GlobalCommands_insert("SimplePatchMesh", FreeCaller<Patch_Plane>(), Accelerator('P', (GdkModifierType)GDK_SHIFT_MASK));
   GlobalCommands_insert("PatchInsertInsertColumn", FreeCaller<Patch_InsertInsertColumn>());
   GlobalCommands_insert("PatchInsertAddColumn", FreeCaller<Patch_InsertAddColumn>());
@@ -793,6 +801,7 @@ void Patch_constructMenu(GtkMenu* menu)
   }
   menu_separator (menu);
   create_menu_item_with_mnemonic(menu, "Cone", "PatchCone");
+  create_menu_item_with_mnemonic(menu, "Sphere", "PatchSphere");
   menu_separator (menu);
   create_menu_item_with_mnemonic(menu, "Simple Patch Mesh...", "SimplePatchMesh");
   menu_separator (menu);
@@ -900,6 +909,14 @@ void DoNewPatchDlg()
         gtk_combo_box_append_text(combo, "11");
         gtk_combo_box_append_text(combo, "13");
         gtk_combo_box_append_text(combo, "15");
+        gtk_combo_box_append_text(combo, "17");
+        gtk_combo_box_append_text(combo, "19");
+        gtk_combo_box_append_text(combo, "21");
+        gtk_combo_box_append_text(combo, "23");
+        gtk_combo_box_append_text(combo, "25");
+        gtk_combo_box_append_text(combo, "27");
+        gtk_combo_box_append_text(combo, "29");
+        gtk_combo_box_append_text(combo, "31"); // MAX_PATCH_SIZE is 32, so we should be able to do 31...
         gtk_widget_show(GTK_WIDGET(combo));
         gtk_table_attach(table, GTK_WIDGET(combo), 1, 2, 0, 1,
                           (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
@@ -916,6 +933,14 @@ void DoNewPatchDlg()
         gtk_combo_box_append_text(combo, "11");
         gtk_combo_box_append_text(combo, "13");
         gtk_combo_box_append_text(combo, "15");
+        gtk_combo_box_append_text(combo, "17");
+        gtk_combo_box_append_text(combo, "19");
+        gtk_combo_box_append_text(combo, "21");
+        gtk_combo_box_append_text(combo, "23");
+        gtk_combo_box_append_text(combo, "25");
+        gtk_combo_box_append_text(combo, "27");
+        gtk_combo_box_append_text(combo, "29");
+        gtk_combo_box_append_text(combo, "31"); // MAX_PATCH_SIZE is 32, so we should be able to do 31...
         gtk_widget_show(GTK_WIDGET(combo));
         gtk_table_attach(table, GTK_WIDGET(combo), 1, 2, 1, 2,
                           (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),