Scene_forEachVisibleSelectedPatch(PatchRedisperse(major));
}
+class PatchSmooth
+{
+ EMatrixMajor m_major;
+public:
+ PatchSmooth(EMatrixMajor major) : m_major(major)
+ {
+ }
+ void operator()(Patch& patch) const
+ {
+ patch.Smooth(m_major);
+ }
+};
+
+void Scene_PatchSmooth_Selected(scene::Graph& graph, EMatrixMajor major)
+{
+ Scene_forEachVisibleSelectedPatch(PatchSmooth(major));
+}
+
class PatchTransposeMatrix
{
public:
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()
{
}
{
UndoableCommand undo("patchRedisperseRows");
- Scene_PatchRedisperse_Selected(GlobalSceneGraph(), COL);
+ Scene_PatchRedisperse_Selected(GlobalSceneGraph(), ROW);
}
void Patch_RedisperseCols()
Scene_PatchRedisperse_Selected(GlobalSceneGraph(), COL);
}
+void Patch_SmoothRows()
+{
+ UndoableCommand undo("patchSmoothRows");
+
+ Scene_PatchSmooth_Selected(GlobalSceneGraph(), ROW);
+}
+
+void Patch_SmoothCols()
+{
+ UndoableCommand undo("patchSmoothColumns");
+
+ Scene_PatchSmooth_Selected(GlobalSceneGraph(), COL);
+}
+
void Patch_Transpose()
{
UndoableCommand undo("patchTranspose");
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>());
GlobalCommands_insert("InvertCurve", FreeCaller<Patch_Invert>(), Accelerator('I', (GdkModifierType)GDK_CONTROL_MASK));
GlobalCommands_insert("RedisperseRows", FreeCaller<Patch_RedisperseRows>(), Accelerator('E', (GdkModifierType)GDK_CONTROL_MASK));
GlobalCommands_insert("RedisperseCols", FreeCaller<Patch_RedisperseCols>(), Accelerator('E', (GdkModifierType)(GDK_SHIFT_MASK|GDK_CONTROL_MASK)));
+ GlobalCommands_insert("SmoothRows", FreeCaller<Patch_SmoothRows>(), Accelerator('W', (GdkModifierType)GDK_CONTROL_MASK));
+ GlobalCommands_insert("SmoothCols", FreeCaller<Patch_SmoothCols>(), Accelerator('W', (GdkModifierType)(GDK_SHIFT_MASK|GDK_CONTROL_MASK)));
GlobalCommands_insert("MatrixTranspose", FreeCaller<Patch_Transpose>(), Accelerator('M', (GdkModifierType)(GDK_SHIFT_MASK|GDK_CONTROL_MASK)));
GlobalCommands_insert("CapCurrentCurve", FreeCaller<Patch_Cap>(), Accelerator('C', (GdkModifierType)GDK_SHIFT_MASK));
GlobalCommands_insert("CycleCapTexturePatch", FreeCaller<Patch_CycleProjection>(), Accelerator('N', (GdkModifierType)(GDK_SHIFT_MASK|GDK_CONTROL_MASK)));
}
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);
menu_tearoff (menu_3);
create_menu_item_with_mnemonic(menu_3, "Rows", "RedisperseRows");
create_menu_item_with_mnemonic(menu_3, "Columns", "RedisperseCols");
+ GtkMenu* menu_4 = create_sub_menu_with_mnemonic (menu_in_menu, "Smooth");
+ if (g_Layout_enableDetachableMenus.m_value)
+ menu_tearoff (menu_4);
+ create_menu_item_with_mnemonic(menu_4, "Rows", "SmoothRows");
+ create_menu_item_with_mnemonic(menu_4, "Columns", "SmoothCols");
create_menu_item_with_mnemonic(menu_in_menu, "Transpose", "MatrixTranspose");
}
menu_separator (menu);
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),
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),