manually copy more changes from trunk.

This commit is contained in:
Campbell Barton 2011-05-12 09:02:39 +00:00
parent 191ad54599
commit 33bfcb26b8
20 changed files with 41 additions and 65 deletions

View File

@ -52,6 +52,9 @@
#ifndef RID_INPUT
#define RID_INPUT 0x10000003
#endif
#ifndef RIM_INPUTSINK
#define RIM_INPUTSINK 0x1
#endif
#ifndef RI_KEY_BREAK
#define RI_KEY_BREAK 0x1
#endif

View File

@ -44,20 +44,16 @@
#include "RNA_access.h"
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "PIL_time.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#ifndef DISABLE_PYTHON
#ifdef WITH_PYTHON
#include "BPY_extern.h"
#endif
#endif
/* struct */

View File

@ -404,6 +404,7 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
case TH_DOPESHEET_CHANNELSUBOB:
cp= ts->ds_subchannel;
break;
case TH_PREVIEW_BACK:
cp= ts->preview_back;
break;
@ -638,9 +639,6 @@ void ui_theme_init_default(void)
SETCOL(btheme->tv3d.bone_solid, 200, 200, 200, 255);
SETCOL(btheme->tv3d.bone_pose, 80, 200, 255, 80); // alpha 80 is not meant editable, used for wire+action draw
SETCOL(btheme->tv3d.pin, 115, 171, 209, 255);
btheme->tv3d.pin_opac = 40;
/* space buttons */

View File

@ -1240,7 +1240,7 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[][4
Base *base;
Lamp *la;
int count;
float position[4], direction[4], energy[4], power;
float position[4], direction[4], energy[4];
/* disable all lights */
for(count=0; count<8; count++)
@ -1281,8 +1281,8 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[][4
glLightfv(GL_LIGHT0+count, GL_POSITION, position);
glLightf(GL_LIGHT0+count, GL_CONSTANT_ATTENUATION, 1.0);
glLightf(GL_LIGHT0+count, GL_LINEAR_ATTENUATION, 0.0f/la->dist);
glLightf(GL_LIGHT0+count, GL_QUADRATIC_ATTENUATION, 1.0f/(la->dist*la->dist));
glLightf(GL_LIGHT0+count, GL_LINEAR_ATTENUATION, la->att1/la->dist);
glLightf(GL_LIGHT0+count, GL_QUADRATIC_ATTENUATION, la->att2/(la->dist*la->dist));
if(la->type==LA_SPOT) {
/* spot lamp */
@ -1294,8 +1294,6 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[][4
else
glLightf(GL_LIGHT0+count, GL_SPOT_CUTOFF, 180.0);
}
power= (ELEM(la->type, LA_SUN, LA_HEMI))? la->energy*M_PI: la->energy*M_PI; //XXX la->power
/* setup energy */
mul_v3_v3fl(energy, &la->r, la->energy);

View File

@ -1751,6 +1751,11 @@ void test_shadowbuf(vec3 rco, sampler2DShadow shadowmap, mat4 shadowpersmat, flo
}
}
void shade_exposure_correct(vec3 col, float linfac, float logfac, out vec3 outcol)
{
outcol = linfac*(1.0 - exp(col*logfac));
}
void shade_mist_factor(vec3 co, float miststa, float mistdist, float misttype, float misi, out float outfac)
{
float fac, zcor;

View File

@ -51,8 +51,6 @@ typedef struct CurveMapPoint {
#define CUMA_SELECT 1
#define CUMA_VECTOR 2
struct CurveMapPoint;
typedef struct CurveMap {
short totpoint, flag;

View File

@ -76,20 +76,20 @@ typedef struct CustomData {
#define CD_MFACE 4
#define CD_MTFACE 5
#define CD_MCOL 6
#define CD_ORIGINDEX 7
#define CD_ORIGINDEX 7
#define CD_NORMAL 8
#define CD_FLAGS 9
#define CD_PROP_FLT 10
#define CD_PROP_INT 11
#define CD_PROP_STR 12
#define CD_ORIGSPACE 13 /* for modifier stack face location mapping */
#define CD_ORIGSPACE 13 /* for modifier stack face location mapping */
#define CD_ORCO 14
#define CD_MTEXPOLY 15
#define CD_MLOOPUV 16
#define CD_MLOOPCOL 17
#define CD_TANGENT 18
#define CD_MDISPS 19
#define CD_WEIGHT_MCOL 20 /* for displaying weightpaint colors */
#define CD_WEIGHT_MCOL 20 /* for displaying weightpaint colors */
#define CD_MPOLY 21
#define CD_MLOOP 22
#define CD_CLOTH_ORCO 23

View File

@ -45,7 +45,7 @@ typedef struct KeyBlock {
float pos;
float curval;
short type, adrcode, relative, flag; /* relative == 0 means first key is reference */
int totelem, pad;
int totelem, pad2;
void *data;
float *weights;
@ -55,7 +55,7 @@ typedef struct KeyBlock {
float slidermin;
float slidermax;
int uid, pad2;
int uid, pad3;
} KeyBlock;

View File

@ -131,7 +131,7 @@ typedef struct Object {
/* materials */
struct Material **mat; /* material slots */
char *matbits; /* a boolean field, with each byte 1 if corrusponding material is linked to object */
char *matbits; /* a boolean field, with each byte 1 if corrusponding material is linked to object */
int totcol; /* copy of mesh or curve or meta */
int actcol; /* currently selected material in the UI */
@ -413,7 +413,6 @@ extern Object workob;
#define OB_BOUND_POLYT 5
/* #define OB_BOUND_DYN_MESH 6 */ /*UNUSED*/
#define OB_BOUND_CAPSULE 7
#define OB_BOUND_CAPSULE 7
/* **************** BASE ********************* */
@ -434,7 +433,7 @@ extern Object workob;
/* an initial attempt as making selection more specific! */
#define BA_DESELECT 0
#define BA_DESELECT 0
#define BA_SELECT 1

View File

@ -236,9 +236,6 @@ typedef struct ThemeSpace {
char hpad[7];
char preview_back[4];
char pin[4];
int pin_opac;
} ThemeSpace;

View File

@ -194,7 +194,6 @@ typedef struct wmWindow {
ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */
ListBase gesture; /* gesture stuff */
double lasttime;
} wmWindow;
/* should be somthing like DNA_EXCLUDE

View File

@ -30,6 +30,7 @@
* \ingroup RNA
*/
#include <stdlib.h>
#include "RNA_define.h"
@ -42,6 +43,8 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "WM_types.h"
#ifdef RNA_RUNTIME
#include "DNA_scene_types.h"
@ -55,18 +58,18 @@
#include "BKE_mesh.h"
#include "BKE_tessmesh.h"
#include "ED_mesh.h" /* XXX Bad level call */
#include "WM_api.h"
#include "WM_types.h"
#include "ED_mesh.h"
static void rna_Mesh_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
/* cheating way for importers to avoid slow updates */
if(id->us > 0) {
DAG_id_tag_update(id, OB_RECALC_DATA);
DAG_id_tag_update(id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
}
}
@ -1312,7 +1315,7 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_twoside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TWOSIDE);
RNA_def_property_ui_text(prop, "Twoside", "Render face twosided");
RNA_def_property_ui_text(prop, "Two-side", "Render face two-sided");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "use_object_color", PROP_BOOLEAN, PROP_NONE);
@ -1420,7 +1423,6 @@ static void rna_def_mloopcol(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_render_get", "rna_MeshColorLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
@ -1573,7 +1575,7 @@ static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "ED_mesh_vertices_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
}
/* mesh.edges */
@ -1583,7 +1585,7 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop)
// PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
// PropertyRNA *parm;
RNA_def_property_srna(cprop, "MeshEdges");
srna= RNA_def_struct(brna, "MeshEdges", NULL);
@ -1592,7 +1594,7 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "ED_mesh_edges_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
}
/* mesh.faces */
@ -1635,7 +1637,7 @@ static void rna_def_vertex_colors(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Mesh_vertex_color_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh.");
parm= RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
RNA_def_string(func, "name", "Col", 0, "", "Vertex color name.");
parm= RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer.");
RNA_def_function_return(func, parm);
@ -1676,7 +1678,7 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Mesh_uv_texture_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a UV texture layer to Mesh.");
parm= RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
parm= RNA_def_pointer(func, "layer", "MeshTextureFaceLayer", "", "The newly created layer.");
RNA_def_function_return(func, parm);
@ -1846,6 +1848,7 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "show_all_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_ALLEDGES);
RNA_def_property_ui_text(prop, "All Edges", "Displays all edges for wireframe in all view modes in the 3D view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
@ -1881,7 +1884,7 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSHARP);
RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "show_extra_edge_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEXTRA_EDGELEN);
RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths, Using global values when set in the transform panel");
@ -1889,7 +1892,7 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "show_extra_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEXTRA_FACEANG);
RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees, Using global values when set in the transform panel");
RNA_def_property_ui_text(prop, "Faces Angles", "Displays the angles in the selected edges in degrees, Using global values when set in the transform panel");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "show_extra_face_area", PROP_BOOLEAN, PROP_NONE);

View File

@ -978,16 +978,6 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "pin", PROP_INT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Pin", "");
RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "pin_opac", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Pin Face Opacity", "");
RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "outline_width", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 5);
RNA_def_property_ui_text(prop, "Outline Width", "");
@ -2685,10 +2675,6 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag");
RNA_def_property_enum_items(prop, view_zoom_axes);
RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on");
prop= RNA_def_property(srna, "loopcut_finish_on_release", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "loopcut_finish_on_release", 1);
RNA_def_property_ui_text(prop, "End Loopcut Slide On Release", "End Loopcut Slide On Mouse Release, a 'click-drag-and-hold' workflow");
prop= RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT);

View File

@ -362,7 +362,7 @@ typedef struct wmEvent {
short customdatafree;
int pad2;
void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
double delay;
} wmEvent;
/* ************** custom wmEvent data ************** */

View File

@ -1759,9 +1759,6 @@ void wm_event_do_handlers(bContext *C)
}
}
if (win->lasttime == 0.0)
win->lasttime = PIL_check_seconds_timer();
while( (event= win->queue.first) ) {
int action = WM_HANDLER_CONTINUE;
@ -1901,7 +1898,6 @@ void wm_event_do_handlers(bContext *C)
BLI_remlink(&win->queue, event);
wm_event_free(event);
win->lasttime = PIL_check_seconds_timer();
}
/* only add mousemove when queue was read entirely */

View File

@ -74,7 +74,7 @@
#include "GPU_extensions.h"
/* the global to talk to ghost */
GHOST_SystemHandle g_system= NULL;
static GHOST_SystemHandle g_system= NULL;
/* set by commandline */
static int prefsizx= 0, prefsizy= 0, prefstax= 0, prefstay= 0, initialstate= GHOST_kWindowStateNormal;

View File

@ -56,5 +56,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_FREETYPE2)
endif()
add_definitions(-DBUILDING_GAMEPLAYER)
blender_add_lib_nolist(blenkernel_blc "${SRC}" "${INC}")

View File

@ -8,9 +8,9 @@ incs += ' #/source/blender/makesdna'
incs += ' #/source/blender/makesrna'
incs += ' #/source/blender/blenloader'
defs = 'BUILDING_GAMEPLAYER'
defs = ''
if env['WITH_BF_INTERNATIONAL']:
defs += ' WITH_FREETYPE2'
defs += 'WITH_FREETYPE2'
if env['WITH_BF_GAMEENGINE']:
defs += ' WITH_GAMEENGINE'

View File

@ -42,7 +42,6 @@ blender_include_dirs(
../blender/makesdna
../blender/gpu
../blender/windowmanager
../blender/bmesh
)
if(WITH_CODEC_QUICKTIME)

View File

@ -358,11 +358,11 @@ void segmentation_handler(int UNUSED(sig))
char fname[256];
if (!G.main->name[0]) {
char str[FILE_MAXDIR+FILE_MAXFILE];
BLI_make_file_string("/", fname, btempdir, "crash.blend");
} else
}
else {
sprintf(fname, "%s.crash.blend", G.main->name);
}
BKE_undo_save(fname);