Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-12 13:02:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-12 13:02:39 +0400
commit33bfcb26b8997d68adbfbf5931e2157a6ba9fbce (patch)
treefb18a347b2426faa9d2a487363f1d048ddbd6807 /source/blender
parent191ad54599b2d8c8677f56870ee1800e62c50137 (diff)
manually copy more changes from trunk.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/context.c4
-rw-r--r--source/blender/editors/interface/resources.c4
-rw-r--r--source/blender/gpu/intern/gpu_draw.c8
-rw-r--r--source/blender/gpu/intern/gpu_shader_material.glsl5
-rw-r--r--source/blender/makesdna/DNA_color_types.h2
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h6
-rw-r--r--source/blender/makesdna/DNA_key_types.h4
-rw-r--r--source/blender/makesdna/DNA_object_types.h5
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c27
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c14
-rw-r--r--source/blender/windowmanager/WM_types.h2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
15 files changed, 33 insertions, 58 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index d4f001242f3..2aeb726f623 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -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 */
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index def3340a81f..1a2a2906f1a 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -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 */
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index bae323f132d..0e7df43bd34 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -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);
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl b/source/blender/gpu/intern/gpu_shader_material.glsl
index 9c9fa7f945f..feb0a84fa87 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl
@@ -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;
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h
index 8a556c4b87a..3b5a1865832 100644
--- a/source/blender/makesdna/DNA_color_types.h
+++ b/source/blender/makesdna/DNA_color_types.h
@@ -51,8 +51,6 @@ typedef struct CurveMapPoint {
#define CUMA_SELECT 1
#define CUMA_VECTOR 2
-struct CurveMapPoint;
-
typedef struct CurveMap {
short totpoint, flag;
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index eec2c8259ef..0760ba0542f 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -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
diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h
index 71b631e3d5e..6bdd63f8483 100644
--- a/source/blender/makesdna/DNA_key_types.h
+++ b/source/blender/makesdna/DNA_key_types.h
@@ -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;
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 90eafe82395..e4b37feb7ca 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -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
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index b36ae468f6a..1d4ee2a30b3 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -236,9 +236,6 @@ typedef struct ThemeSpace {
char hpad[7];
char preview_back[4];
-
- char pin[4];
- int pin_opac;
} ThemeSpace;
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 623a0fc1038..31e59f18626 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -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
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 6dc0d38e8a4..7951f1dcc2c 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 6f728674ff5..a914d875490 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -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);
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index c0d9c192ab2..8748703ad8e 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -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 ************** */
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index c4d7e6e6454..feff0393b88 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -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 */
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 4caaf62617c..5cf2f8932f5 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -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;