This is the changelog for developers, != changelog for the end user
that we distribute with the binaries. (see changelog)
+28/06/2007 (dunkfordyce@gmail.com)
+- fixed mnemonics for MRU list
+- fixed find functionality
+- added option to always use caulk texture for new brushes
+- fixed(?) a small bug in install.py that was trying to copy msvc files on linux
+
28/06/2007
- Added material-support to brushexport-plugin (Shaderman)
BUILD
Use debug/release to select build settings
- ex: BUILD="release" - default is debug
+ ex: BUILD="release" - default is release
"""
)
libmhash = os.path.normpath(os.path.join(thisDir, "../mhash-0.9/win32/libmhash/Release/libmhash.dll"))
copyFileIfExists(libmhash, installRoot)
-copySvn("../msvc_redist", installRoot)
-
if sys.platform[:3] == "win" :
- dbghelp = os.path.normpath(os.path.join(thisDir, "../msvc_redist/dbghelp.dll"))
- copyFileIfExists(dbghelp, installRoot)
+ copySvn("../msvc_redist", installRoot)
+ dbghelp = os.path.normpath(os.path.join(thisDir, "../msvc_redist/dbghelp.dll"))
+ copyFileIfExists(dbghelp, installRoot)
# create version files
version = open(os.path.join(thisDir, "include/version.default"), "rt").readline().split(".")
return functor;
}
+// d1223m
+template<typename Functor>
+inline const Functor& Scene_ForEachBrush_ForEachFaceInstance(scene::Graph& graph, const Functor& functor)
+{
+ Scene_forEachBrush(graph, BrushForEachFace(FaceInstanceVisitAll<Functor>(functor)));
+ return functor;
+}
+
template<typename Functor>
inline const Functor& Scene_ForEachSelectedBrush_ForEachFace(scene::Graph& graph, const Functor& functor)
{
}
};
+class FaceFindShader
+{
+ const char* m_find;
+ const char* m_replace;
+public:
+ FaceFindShader(const char* find) : m_find(find)
+ {
+ }
+ void operator()(FaceInstance& faceinst) const
+ {
+ if(shader_equal(faceinst.getFace().GetShader(), m_find))
+ {
+ faceinst.setSelected(SelectionSystem::eFace, true);
+ }
+ }
+};
+
+bool DoingSearch(const char *repl)
+{
+ return (repl == NULL || (strcmp("textures/", repl)==0));
+}
+
void Scene_BrushFindReplaceShader(scene::Graph& graph, const char* find, const char* replace)
{
- Scene_ForEachBrush_ForEachFace(graph, FaceFindReplaceShader(find, replace));
+ if (DoingSearch(replace))
+ {
+ Scene_ForEachBrush_ForEachFaceInstance(graph, FaceFindShader(find));
+ }
+ else
+ {
+ Scene_ForEachBrush_ForEachFace(graph, FaceFindReplaceShader(find, replace));
+ }
}
void Scene_BrushFindReplaceShader_Selected(scene::Graph& graph, const char* find, const char* replace)
{
- Scene_ForEachSelectedBrush_ForEachFace(graph, FaceFindReplaceShader(find, replace));
+ if (DoingSearch(replace))
+ {
+ Scene_ForEachSelectedBrush_ForEachFaceInstance(graph,
+ FaceFindShader(find));
+ }
+ else
+ {
+ Scene_ForEachSelectedBrush_ForEachFace(graph,
+ FaceFindReplaceShader(find, replace));
+ }
}
+// TODO: find for components
+// d1223m: dont even know what they are...
void Scene_BrushFindReplaceShader_Component_Selected(scene::Graph& graph, const char* find, const char* replace)
{
- Scene_ForEachSelectedBrushFace(graph, FaceFindReplaceShader(find, replace));
+ if (DoingSearch(replace))
+ {
+
+ }
+ else
+ {
+ Scene_ForEachSelectedBrushFace(graph, FaceFindReplaceShader(find, replace));
+ }
}
}
void operator()(FaceInstance& face) const
{
+ printf("checking %s = %s\n", face.getFace().GetShader(), m_name);
if(shader_equal(face.getFace().GetShader(), m_name))
{
face.setSelected(SelectionSystem::eFace, true);
LatchedBool g_useAlternativeTextureProjection(false, "Use alternative texture-projection");
bool g_showAlternativeTextureProjectionOption = false;
+bool g_brush_always_caulk;
bool getTextureLockEnabled()
{
BoolExportCaller(g_useAlternativeTextureProjection.m_latched)
);
}
+ // d1223m
+ page.appendCheckBox("",
+ "Always use caulk for new brushes",
+ g_brush_always_caulk
+ );
}
void Brush_constructPage(PreferenceGroup& group)
{
{
type = eBrushTypeQuake3BP;
}
+
+ // d1223m
+ GlobalPreferenceSystem().registerPreference(
+ "BrushAlwaysCaulk",
+ BoolImportStringCaller(g_brush_always_caulk),
+ BoolExportStringCaller(g_brush_always_caulk));
}
Brush_registerCommands();
void FindTextureDialog_apply()
{
StringOutputStream find(256);
- find << "textures/" << g_FindTextureDialog.m_strFind.c_str();
StringOutputStream replace(256);
+
+ find << "textures/" << g_FindTextureDialog.m_strFind.c_str();
replace << "textures/" << g_FindTextureDialog.m_strReplace.c_str();
FindReplaceTextures(find.c_str(), replace.c_str(), g_FindTextureDialog.m_bSelectedOnly);
}
void MRU_updateWidget(std::size_t index, const char *filename)
{
EscapedMnemonic mnemonic(64);
- mnemonic.push_back('_');
mnemonic << Unsigned(index + 1) << "- " << ConvertLocaleToUTF8(filename);
gtk_label_set_text_with_mnemonic(GTK_LABEL(gtk_bin_get_child(GTK_BIN(MRU_items[index]))), mnemonic.c_str());
}
void MRU_constructMenu(GtkMenu* menu)
{
{
- GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "Recent Files", LoadMRUCaller(g_load_mru1));
+ GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "_1", LoadMRUCaller(g_load_mru1));
gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE);
MRU_AddWidget(item, 0);
}
{
- GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "2", LoadMRUCaller(g_load_mru2));
+ GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "_2", LoadMRUCaller(g_load_mru2));
gtk_widget_hide(GTK_WIDGET(item));
MRU_AddWidget(item, 1);
}
{
- GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "3", LoadMRUCaller(g_load_mru3));
+ GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "_3", LoadMRUCaller(g_load_mru3));
gtk_widget_hide(GTK_WIDGET(item));
MRU_AddWidget(item, 2);
}
{
- GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "4", LoadMRUCaller(g_load_mru4));
+ GtkMenuItem* item = create_menu_item_with_mnemonic(menu, "_4", LoadMRUCaller(g_load_mru4));
gtk_widget_hide(GTK_WIDGET(item));
MRU_AddWidget(item, 3);
}
#include "windowobservers.h"
-
+// d1223m
+extern bool g_brush_always_caulk;
//!\todo Rewrite.
class ClipPoint
m_NewBrushDrag = node.get_pointer();
}
- Scene_BrushResize_Selected(GlobalSceneGraph(), aabb_for_minmax(mins, maxs), TextureBrowser_GetSelectedShader(GlobalTextureBrowser()));
+ // d1223m
+ //Scene_BrushResize_Selected(GlobalSceneGraph(), aabb_for_minmax(mins, maxs), TextureBrowser_GetSelectedShader(GlobalTextureBrowser()));
+ Scene_BrushResize_Selected(GlobalSceneGraph(), aabb_for_minmax(mins, maxs),
+ g_brush_always_caulk ?
+ "textures/common/caulk" : TextureBrowser_GetSelectedShader(GlobalTextureBrowser()));
}
void entitycreate_activated(GtkWidget* item)