2.5: multiple small fixes

- wm draw method is now initialized correct when reading older
  files, but the SDNA bug causing the problem is still unsolved.
  is due to // char pad[8]; not being recognized as commented.
- triple buffer proxy texture test follows spec better now,
  was disabling triple buffer unnecessarily on some drivers.
- some cmake compile fixes related to sequencer pthread usage
  and removed bad level calls lib for player.
- show outliner header buttons in oops mode as well until that
  can be switched in the UI.
- fix region data free issue for tooltips
- warning fixes
This commit is contained in:
2009-01-23 20:36:47 +00:00
parent 4531e8e6a7
commit c86579b11e
17 changed files with 34 additions and 29 deletions

View File

@@ -39,6 +39,7 @@ struct ListBase;
struct MDeformVert; struct MDeformVert;
struct Mesh; struct Mesh;
struct MFace; struct MFace;
struct MEdge;
struct MVert; struct MVert;
struct MCol; struct MCol;
struct Object; struct Object;

View File

@@ -56,18 +56,12 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG) ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG) ENDIF(WITH_FFMPEG)
IF(WITH_PLAYER)
SUBDIRS(bad_level_call_stubs)
ENDIF(WITH_PLAYER)
IF(WITH_PYTHON) IF(WITH_PYTHON)
SET(INC ${INC} ../python ${PYTHON_INC}) SET(INC ${INC} ../python ${PYTHON_INC})
ELSE(WITH_PYTHON) ELSE(WITH_PYTHON)
ADD_DEFINITIONS(-DDISABLE_PYTHON) ADD_DEFINITIONS(-DDISABLE_PYTHON)
ENDIF(WITH_PYTHON) ENDIF(WITH_PYTHON)
BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")
IF(WITH_INTERNATIONAL) IF(WITH_INTERNATIONAL)
ADD_DEFINITIONS(-DWITH_FREETYPE2) ADD_DEFINITIONS(-DWITH_FREETYPE2)
ENDIF(WITH_INTERNATIONAL) ENDIF(WITH_INTERNATIONAL)
@@ -75,3 +69,10 @@ ENDIF(WITH_INTERNATIONAL)
IF(NOT WITH_ELBEEM) IF(NOT WITH_ELBEEM)
ADD_DEFINITIONS(-DDISABLE_ELBEEM) ADD_DEFINITIONS(-DDISABLE_ELBEEM)
ENDIF(NOT WITH_ELBEEM) ENDIF(NOT WITH_ELBEEM)
IF(WIN32)
SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")

View File

@@ -2387,7 +2387,7 @@ void write_stl(Scene *scene, char *str)
static void write_videoscape_mesh(Scene *scene, Object *ob, char *str) static void write_videoscape_mesh(Scene *scene, Object *ob, char *str)
{ {
Mesh *me; Mesh *me= ob->data;
EditMesh *em = me->edit_mesh; EditMesh *em = me->edit_mesh;
Material *ma; Material *ma;
MFace *mface; MFace *mface;

View File

@@ -215,7 +215,7 @@ void IDP_ResizeArray(IDProperty *prop, int newlen)
/*first check if the array buffer size has room*/ /*first check if the array buffer size has room*/
/*if newlen is 200 chars less then totallen, reallocate anyway*/ /*if newlen is 200 chars less then totallen, reallocate anyway*/
if (newlen <= prop->totallen && prop->totallen - newlen < 200) { if (newlen <= prop->totallen && prop->totallen - newlen < 200) {
idp_resize_group_array(prop, newlen, newarr); idp_resize_group_array(prop, newlen, prop->data.pointer);
prop->len = newlen; prop->len = newlen;
return; return;
} }

View File

@@ -428,7 +428,7 @@ void multiresModifier_del_levels(struct MultiresModifierData *mmd, struct Object
void multiresModifier_subdivide(MultiresModifierData *mmd, Object *ob, int distance, int updateblock, int simple) void multiresModifier_subdivide(MultiresModifierData *mmd, Object *ob, int distance, int updateblock, int simple)
{ {
DerivedMesh *final = NULL; DerivedMesh *final = NULL;
int totsubvert, totsubface, totsubedge; int totsubvert = 0, totsubface = 0, totsubedge = 0;
Mesh *me = get_mesh(ob); Mesh *me = get_mesh(ob);
MDisps *mdisps; MDisps *mdisps;
int i; int i;

View File

@@ -223,6 +223,9 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
if(art && art->free) if(art && art->free)
art->free(ar); art->free(ar);
} }
else if(ar->type && ar->type->free)
ar->type->free(ar);
if(ar) { if(ar) {
if(ar->regiondata) if(ar->regiondata)
printf("regiondata free error\n"); printf("regiondata free error\n");

View File

@@ -34,6 +34,7 @@
/* ************************ FUNKTIES **************************** */ /* ************************ FUNKTIES **************************** */
#include <stdlib.h>
#include <math.h> #include <math.h>
#include <sys/types.h> #include <sys/types.h>
#include <string.h> #include <string.h>
@@ -62,13 +63,13 @@
#define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; } #define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
#define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c) #define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c)
#ifndef M_PI
#if defined(WIN32) || defined(__APPLE__)
#include <stdlib.h>
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#define M_SQRT2 1.41421356237309504880 #endif
#endif /* defined(WIN32) || defined(__APPLE__) */ #ifndef M_SQRT2
#define M_SQRT2 1.41421356237309504880
#endif
float saacos(float fac) float saacos(float fac)

View File

@@ -279,7 +279,7 @@ void BLI_removeDoubleNodes(BGraph *graph, float limit)
BNode * BLI_FindNodeByPosition(BGraph *graph, float *p, float limit) BNode * BLI_FindNodeByPosition(BGraph *graph, float *p, float limit)
{ {
BNode *closest_node = NULL, *node; BNode *closest_node = NULL, *node;
float min_distance; float min_distance = 0.0f;
for(node = graph->nodes.first; node; node = node->next) for(node = graph->nodes.first; node; node = node->next)
{ {

View File

@@ -238,7 +238,6 @@ ARegion *ui_add_temporary_region(bScreen *sc)
void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar) void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar)
{ {
ar->regiondata= NULL;
wm_draw_region_clear(CTX_wm_window(C), ar); wm_draw_region_clear(CTX_wm_window(C), ar);
ED_region_exit(C, ar); ED_region_exit(C, ar);
BKE_area_region_free(NULL, ar); /* NULL: no spacetype */ BKE_area_region_free(NULL, ar); /* NULL: no spacetype */

View File

@@ -199,7 +199,7 @@ void outliner_header_buttons(const bContext *C, ARegion *ar)
uiBlockSetEmboss(block, UI_EMBOSS); uiBlockSetEmboss(block, UI_EMBOSS);
} }
if(soutliner->type==SO_OUTLINER) { if(1) { // XXX soutliner->type==SO_OUTLINER) {
if(G.main->library.first) if(G.main->library.first)
uiDefButS(block, MENU, B_REDR, "Outliner Display%t|Libraries %x7|All Scenes %x0|Current Scene %x1|Visible Layers %x2|Groups %x6|Same Types %x5|Selected %x3|Active %x4|Sequence %x10|Datablocks %x11|User Preferences %x12", xco, yco, 120, 20, &soutliner->outlinevis, 0, 0, 0, 0, ""); uiDefButS(block, MENU, B_REDR, "Outliner Display%t|Libraries %x7|All Scenes %x0|Current Scene %x1|Visible Layers %x2|Groups %x6|Same Types %x5|Selected %x3|Active %x4|Sequence %x10|Datablocks %x11|User Preferences %x12", xco, yco, 120, 20, &soutliner->outlinevis, 0, 0, 0, 0, "");
else else

View File

@@ -1499,7 +1499,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
EditFace *efa; EditFace *efa;
MTFace *tf; MTFace *tf;
NearestHit hit; NearestHit hit;
int a, i, select, selectmode, sticky, sync, hitv[4], nvert; int a, i, select = 1, selectmode, sticky, sync, hitv[4], nvert;
int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */ int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */
float limit[2], *hituv[4], penalty[2]; float limit[2], *hituv[4], penalty[2];

View File

@@ -42,6 +42,7 @@ struct MTFace;
struct Object; struct Object;
struct Scene; struct Scene;
struct View3D; struct View3D;
struct RegionView3D;
/* OpenGL drawing functions related to shading. These are also /* OpenGL drawing functions related to shading. These are also
* shared with the game engine, where there were previously * shared with the game engine, where there were previously

View File

@@ -195,7 +195,8 @@ typedef struct UserDef {
short tb_leftmouse, tb_rightmouse; short tb_leftmouse, tb_rightmouse;
struct SolidLight light[3]; struct SolidLight light[3];
short tw_hotspot, tw_flag, tw_handlesize, tw_size; short tw_hotspot, tw_flag, tw_handlesize, tw_size;
int textimeout, texcollectrate; short textimeout,texcollectrate;
short wmdrawmethod, wmpad;
int memcachelimit; int memcachelimit;
int prefetchframes; int prefetchframes;
short frameserverport; short frameserverport;
@@ -216,8 +217,6 @@ typedef struct UserDef {
short autokey_mode; /* autokeying mode */ short autokey_mode; /* autokeying mode */
short autokey_flag; /* flags for autokeying */ short autokey_flag; /* flags for autokeying */
int wmdrawmethod, pad;
struct ColorBand coba_weight; /* from texture.h */ struct ColorBand coba_weight; /* from texture.h */
} UserDef; } UserDef;

View File

@@ -794,11 +794,11 @@ static void rna_def_constraint_transform(BlenderRNA *brna)
{2, "SCALE", "Scale", ""}, {2, "SCALE", "Scale", ""},
{0, NULL, NULL, NULL}}; {0, NULL, NULL, NULL}};
static EnumPropertyItem axis_map_items[] = { /*static EnumPropertyItem axis_map_items[] = {
{0, "X", "X", ""}, {0, "X", "X", ""},
{1, "Y", "Y", ""}, {1, "Y", "Y", ""},
{2, "Z", "Z", ""}, {2, "Z", "Z", ""},
{0, NULL, NULL, NULL}}; {0, NULL, NULL, NULL}};*/
srna= RNA_def_struct(brna, "TransformConstraint", "Constraint"); srna= RNA_def_struct(brna, "TransformConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Transformation Constraint", "Maps transformations of the target to the object."); RNA_def_struct_ui_text(srna, "Transformation Constraint", "Maps transformations of the target to the object.");

View File

@@ -455,7 +455,7 @@ static PyObject *pyrna_prop_subscript( BPy_PropertyRNA * self, PyObject *key )
{ {
PyObject *ret; PyObject *ret;
PointerRNA newptr; PointerRNA newptr;
int keynum; int keynum = 0;
char *keyname = NULL; char *keyname = NULL;
if (PyUnicode_Check(key)) { if (PyUnicode_Check(key)) {
@@ -505,7 +505,7 @@ static PyObject *pyrna_prop_subscript( BPy_PropertyRNA * self, PyObject *key )
static int pyrna_prop_assign_subscript( BPy_PropertyRNA * self, PyObject *key, PyObject *value ) static int pyrna_prop_assign_subscript( BPy_PropertyRNA * self, PyObject *key, PyObject *value )
{ {
int ret = 0; int ret = 0;
int keynum; int keynum = 0;
char *keyname = NULL; char *keyname = NULL;
if (!RNA_property_editable(&self->ptr, self->prop)) { if (!RNA_property_editable(&self->ptr, self->prop)) {

View File

@@ -408,7 +408,7 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple)
glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGB8, triple->x[x], triple->y[y], 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGB8, triple->x[x], triple->y[y], 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format); glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format);
if(format != GL_RGB8) { if(format == 0) {
glBindTexture(triple->target, 0); glBindTexture(triple->target, 0);
printf("WM: failed to allocate texture for triple buffer drawing (GL_PROXY_TEXTURE_2D).\n"); printf("WM: failed to allocate texture for triple buffer drawing (GL_PROXY_TEXTURE_2D).\n");
return 0; return 0;

View File

@@ -96,9 +96,6 @@
/* patching UserDef struct and Themes */ /* patching UserDef struct and Themes */
static void init_userdef_themes(void) static void init_userdef_themes(void)
{ {
// sets themes, fonts, .. from userdef
UI_init_userdef();
// countall(); // countall();
/* the UserDef struct is not corrected with do_versions() .... ugh! */ /* the UserDef struct is not corrected with do_versions() .... ugh! */
@@ -366,6 +363,9 @@ static void init_userdef_themes(void)
MEM_CacheLimiter_set_maximum(U.memcachelimit * 1024 * 1024); MEM_CacheLimiter_set_maximum(U.memcachelimit * 1024 * 1024);
// sets themes, fonts, .. from userdef
UI_init_userdef();
/* funny name, but it is GE stuff, moves userdef stuff to engine */ /* funny name, but it is GE stuff, moves userdef stuff to engine */
// XXX space_set_commmandline_options(); // XXX space_set_commmandline_options();
/* this timer uses U */ /* this timer uses U */