change define INTERNATIONAL --> WITH_INTERNATIONAL

also rename backface_culling --> use_backface_culling (which is used elsewhere in rna)
This commit is contained in:
Campbell Barton 2011-09-26 10:35:47 +00:00
parent fc8a7aba55
commit 573ed73be8
28 changed files with 45 additions and 45 deletions

@ -625,7 +625,7 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel):
game = context.material.game_settings # dont use node material
row = layout.row()
row.prop(game, "backface_culling")
row.prop(game, "use_backface_culling")
row.prop(game, "invisible")
row.prop(game, "text")

@ -37,7 +37,7 @@
/* blf_translation.c */
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
unsigned char *BLF_get_unifont(int *unifont_size);
void BLF_free_unifont(void);
#endif

@ -55,7 +55,7 @@ if(WITH_INTERNATIONAL)
list(APPEND INC_SYS
${GETTEXT_INC}
)
add_definitions(-DINTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")

@ -15,6 +15,6 @@ if sys.platform == 'win32' or env['OURPLATFORM'] == 'linuxcross':
defs.append('_WIN32')
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
defs.append('WITH_INTERNATIONAL')
env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[210,210] )

@ -36,7 +36,7 @@
#include "BLF_api.h"
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
#include <locale.h>
@ -209,7 +209,7 @@ void BLF_lang_encoding(const char *str)
/* bind_textdomain_codeset(DOMAIN_NAME, encoding_name); */
}
#else /* ! INTERNATIONAL */
#else /* ! WITH_INTERNATIONAL */
void BLF_lang_init(void)
{
@ -228,4 +228,4 @@ void BLF_lang_set(const char *str)
return;
}
#endif /* INTERNATIONAL */
#endif /* WITH_INTERNATIONAL */

@ -32,7 +32,7 @@
#include <stdlib.h>
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
#include <libintl.h>
#endif
@ -45,7 +45,7 @@
#include "BLF_translation.h"
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
const char unifont_filename[]="droidsans.ttf.gz";
static unsigned char *unifont_ttf= NULL;
static int unifont_size= 0;
@ -76,7 +76,7 @@ void BLF_free_unifont(void)
const char* BLF_gettext(const char *msgid)
{
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if( msgid[0] )
return gettext( msgid );
return "";

@ -60,7 +60,7 @@ set(SRC
)
if(WITH_INTERNATIONAL)
add_definitions(-DINTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
if(WITH_HEADLESS)

@ -14,7 +14,7 @@ incs += ' ../../python/' # python button eval
defs = []
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
defs.append('WITH_INTERNATIONAL')
if env['WITH_BF_PYTHON']:
defs.append('WITH_PYTHON')

@ -96,7 +96,7 @@ static void ui_free_but(const bContext *C, uiBut *but);
int UI_translate_iface(void)
{
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE);
#else
return 0;
@ -105,7 +105,7 @@ int UI_translate_iface(void)
int UI_translate_tooltips(void)
{
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS);
#else
return 0;
@ -114,7 +114,7 @@ int UI_translate_tooltips(void)
const char *UI_translate_do_iface(const char *msgid)
{
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if(UI_translate_iface())
return BLF_gettext(msgid);
else
@ -126,7 +126,7 @@ const char *UI_translate_do_iface(const char *msgid)
const char *UI_translate_do_tooltip(const char *msgid)
{
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if(UI_translate_tooltips())
return BLF_gettext(msgid);
else
@ -2741,7 +2741,7 @@ static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname,
if ((!tip || tip[0]=='\0') && ot && ot->description) {
tip= ot->description;
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if(UI_translate_tooltips())
tip= BLF_gettext(tip);
#endif

@ -500,7 +500,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w
}
#if 0
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
static void ui_draw_but_CHARTAB(uiBut *but)
{
/* XXX 2.50 bad global access */
@ -670,7 +670,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
}
}
#endif // INTERNATIONAL
#endif // WITH_INTERNATIONAL
#endif
static void draw_scope_end(rctf *rect, GLint *scissor)

@ -631,7 +631,7 @@ static void ui_apply_but_IDPOIN(bContext *C, uiBut *but, uiHandleButtonData *dat
data->applied= 1;
}
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
static void ui_apply_but_CHARTAB(bContext *C, uiBut *but, uiHandleButtonData *data)
{
ui_apply_but_func(C, but);
@ -1023,7 +1023,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
case IDPOIN:
ui_apply_but_IDPOIN(C, but, data);
break;
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
case CHARTAB:
ui_apply_but_CHARTAB(C, but, data);
break;
@ -3924,7 +3924,7 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand
return WM_UI_HANDLER_CONTINUE;
}
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut *UNUSED(but), uiHandleButtonData *UNUSED(data), wmEvent *UNUSED(event))
{
/* XXX 2.50 bad global and state access */
@ -4584,7 +4584,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
case HSVCIRCLE:
retval= ui_do_but_HSVCIRCLE(C, block, but, data, event);
break;
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
case CHARTAB:
retval= ui_do_but_CHARTAB(C, block, but, data, event);
break;

@ -639,7 +639,7 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *opname, const char *name, i
if(!name) {
name= ot->name;
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
name= UI_translate_do_iface(name);
#endif
}
@ -1432,7 +1432,7 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const
if(!name) {
name= mt->label;
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
name= UI_translate_do_iface(name);
#endif
}

@ -444,7 +444,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
int pnl_icons;
const char *activename= panel->drawname[0]?panel->drawname:panel->panelname;
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
activename= UI_translate_do_iface(activename);
#endif

@ -322,7 +322,7 @@ void uiStyleInit(void)
for(font= U.uifonts.first; font; font= font->next) {
if(font->uifont_id==UIFONT_DEFAULT) {
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
int font_size= datatoc_bfont_ttf_size;
unsigned char *font_ttf= (unsigned char*)datatoc_bfont_ttf;
static int last_font_size = 0;

@ -63,6 +63,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
defs.append('WITH_INTERNATIONAL')
env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )

@ -220,7 +220,7 @@ if(WITH_OPENCOLLADA)
endif()
if(WITH_INTERNATIONAL)
add_definitions(-DINTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
# Build makesrna executable

@ -99,7 +99,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
defs.append('WITH_INTERNATIONAL')
makesrna_tool.Append(CPPDEFINES=defs)

@ -470,7 +470,7 @@ static const char *rna_ensure_property_description(PropertyRNA *prop)
description= ((IDProperty*)prop)->name; /* XXX - not correct */
}
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_TOOLTIPS))
description= BLF_gettext(description);
#endif
@ -487,7 +487,7 @@ static const char *rna_ensure_property_name(PropertyRNA *prop)
else
name= ((IDProperty*)prop)->name;
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE))
name= BLF_gettext(name);
#endif
@ -1160,7 +1160,7 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA
{
RNA_property_enum_items(C, ptr, prop, item, totitem, free);
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) {
int i;
EnumPropertyItem *nitem;

@ -767,7 +767,7 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Game Settings", "Game Engine settings for a Material datablock");
prop= RNA_def_property(srna, "backface_culling", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "use_backface_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_BACKCULL); /* use bitflags */
RNA_def_property_ui_text(prop, "Backface Culling", "Hide Back of the face in Game Engine ");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");

@ -41,7 +41,7 @@ if env['BF_BUILDINFO']:
defs.append('BUILD_DATE')
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
defs.append('WITH_INTERNATIONAL')
sources = env.Glob('intern/*.c')
env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [361])

@ -96,7 +96,7 @@ if(WITH_AUDASPACE)
endif()
if(WITH_INTERNATIONAL)
add_definitions(-DINTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}")

@ -73,7 +73,7 @@
#include "../generic/IDProp.h" /* for IDprop lookups */
#include "../generic/py_capi_utils.h"
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
#include "UI_interface.h" /* bad level call into editors */
#endif
@ -1523,11 +1523,11 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
}
else {
param= _PyUnicode_AsString(value);
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
if(subtype == PROP_TRANSLATE) {
param= UI_translate_do_iface(param);
}
#endif // INTERNATIONAL
#endif // WITH_INTERNATIONAL
}
#else // USE_STRING_COERCE

@ -82,7 +82,7 @@ set(SRC
add_definitions(-DGLEW_STATIC)
if(WITH_INTERNATIONAL)
add_definitions(-DINTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
if(WITH_OPENCOLLADA)

@ -40,6 +40,6 @@ if env['BF_BUILDINFO']:
defs.append('WITH_BUILDINFO')
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
defs.append('WITH_INTERNATIONAL')
env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defines=defs, libtype=['core'], priority=[5] )

@ -403,7 +403,7 @@ void WM_exit_ext(bContext *C, const short do_python)
BLF_exit();
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
BLF_free_unifont();
#endif

@ -79,7 +79,7 @@ if(WITH_CODEC_FFMPEG)
endif()
if(WITH_INTERNATIONAL)
add_definitions(-DINTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
blender_add_lib_nolist(ge_player_ghost "${SRC}" "${INC}" "${INC_SYS}")

@ -999,7 +999,7 @@ int main(int argc, char** argv)
RNA_exit();
BLF_exit();
#ifdef INTERNATIONAL
#ifdef WITH_INTERNATIONAL
BLF_free_unifont();
#endif

@ -52,6 +52,6 @@ if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
defs.append('WITH_INTERNATIONAL')
env.BlenderLib (libname='ge_player_ghost', sources=source_files, includes = incs, defines = defs, libtype=['player'],priority=[0], cxx_compileflags=env['BGE_CXXFLAGS'])