fix for crash generating messages.txt, I wasn't getting this crash because I had 'WITH_PYTHON_SAFETY' enabled which was using different iterators (which dont crash), now there on by default.

made headless and no-python configurations work again and added --factory-startup to doc building command.
This commit is contained in:
Campbell Barton 2011-09-30 07:47:45 +00:00
parent ad8df4843e
commit 265c113820
6 changed files with 23 additions and 12 deletions

@ -164,7 +164,7 @@ package_archive:
# Other Targets
#
translations:
$(BUILD_DIR)/bin/blender --background --python po/update_msg.py
$(BUILD_DIR)/bin/blender --background --factory-startup --python po/update_msg.py
python3 po/update_pot.py
python3 po/update_po.py
python3 po/update_mo.py

@ -37,9 +37,10 @@ When translation was updated, remove line with '#, fuzzy' and it'll work.
If there's no message in .po file you want to translate, probably .po file should be updated.
Use the following steps for this:
- With newly compiled blender run `blender --background --python update_msg.py` to update
messages.txt file (this file contains strings collected automatically from RNA system and
python UI scripts)
- With newly compiled blender run:
`blender --background --factory-startup --python update_msg.py`
to update messages.txt file (this file contains strings collected
automatically from RNA system and python UI scripts)
- Run update_pot.py script which will update blender.pot file. This file contains all
strings which should be transated.
- Run update_po.py script to merge all .po files with blender.pot (so all .po files

@ -466,6 +466,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w
{
#ifdef WITH_HEADLESS
(void)rect;
(void)but;
#else
ImBuf *ibuf= (ImBuf *)but->poin;
//GLint scissor[4];

@ -44,9 +44,6 @@
/* support for inter references, currently only needed for corner case */
#define USE_PYRNA_STRUCT_REFERENCE
/* use real collection iterators rather than faking with a list */
#define USE_PYRNA_ITER
#else /* WITH_PYTHON_SAFETY */
/* default, no defines! */
@ -67,6 +64,11 @@
* so prefer the leak to the memory bloat for now. */
// #define PYRNA_FREE_SUPPORT
/* use real collection iterators rather than faking with a list
* this is needed so enums can be iterated over without crashing,
* since finishing the iteration frees temp allocated enums */
#define USE_PYRNA_ITER
/* --- end bpy build options --- */
struct ID;

@ -427,6 +427,8 @@ void WM_exit_ext(bContext *C, const short do_python)
* the pyDriver bug can be fixed if it happens again we can deal with it then */
BPY_python_end();
}
#else
(void)do_python;
#endif
GPU_global_buffer_pool_free();

@ -1208,9 +1208,6 @@ static int wm_resource_check_prev(void)
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(arg))
{
extern char datatoc_splash_png[];
extern int datatoc_splash_png_size;
uiBlock *block;
uiBut *but;
uiLayout *layout, *split, *col;
@ -1219,9 +1216,17 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
int i;
MenuType *mt= WM_menutype_find("USERPREF_MT_splash", TRUE);
char url[96];
/* hardcoded to splash, loading and freeing every draw, eek! */
#ifndef WITH_HEADLESS
extern char datatoc_splash_png[];
extern int datatoc_splash_png_size;
ImBuf *ibuf= IMB_ibImageFromMemory((unsigned char*)datatoc_splash_png, datatoc_splash_png_size, IB_rect);
#else
ImBuf *ibuf= NULL;
#endif
#ifdef WITH_BUILDINFO
int ver_width, rev_width;
char *version_str = NULL;