[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48640] branches/soc-2011-tomato: svn merge ^/trunk/blender -r48604:48638
Campbell Barton
ideasman42 at gmail.com
Thu Jul 5 13:40:48 CEST 2012
Revision: 48640
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48640
Author: campbellbarton
Date: 2012-07-05 11:40:48 +0000 (Thu, 05 Jul 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r48604:48638
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48604
Modified Paths:
--------------
branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.cpp
branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.h
branches/soc-2011-tomato/intern/ghost/GHOST_C-api.h
branches/soc-2011-tomato/intern/raskter/raskter.c
branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/settings.py
branches/soc-2011-tomato/release/scripts/modules/console_shell.py
branches/soc-2011-tomato/release/scripts/presets/tracking_settings/blurry_footage.py
branches/soc-2011-tomato/release/scripts/presets/tracking_settings/blurry_movie.py
branches/soc-2011-tomato/release/scripts/presets/tracking_settings/default.py
branches/soc-2011-tomato/release/scripts/presets/tracking_settings/fast_motion.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/clip.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/presets.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_smart_project.py
branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_game.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_object.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_particle.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_console.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_image.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2011-tomato/release/scripts/templates/addon_add_object.py
branches/soc-2011-tomato/release/scripts/templates/gamelogic.py
branches/soc-2011-tomato/release/scripts/templates/ui_panel_simple.py
branches/soc-2011-tomato/source/blender/blenkernel/CMakeLists.txt
branches/soc-2011-tomato/source/blender/blenkernel/SConscript
branches/soc-2011-tomato/source/blender/blenlib/BLI_args.h
branches/soc-2011-tomato/source/blender/blenlib/BLI_math_geom.h
branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_args.c
branches/soc-2011-tomato/source/blender/blenlib/intern/math_geom.c
branches/soc-2011-tomato/source/blender/blenlib/intern/pbvh.c
branches/soc-2011-tomato/source/blender/collada/GeometryExporter.h
branches/soc-2011-tomato/source/blender/collada/ImageExporter.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_WorkScheduler.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_WriteBufferOperation.h
branches/soc-2011-tomato/source/blender/editors/object/object_relations.c
branches/soc-2011-tomato/source/blender/editors/space_time/space_time.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/drawarmature.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/drawvolume.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_view.c
branches/soc-2011-tomato/source/blender/editors/transform/transform.c
branches/soc-2011-tomato/source/blender/editors/transform/transform_snap.c
branches/soc-2011-tomato/source/blender/imbuf/intern/readimage.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
branches/soc-2011-tomato/source/blender/nodes/texture/nodes/node_texture_viewer.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_gesture.c
branches/soc-2011-tomato/source/gameengine/Ketsji/KX_SoundActuator.cpp
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/
branches/soc-2011-tomato/release/scripts/templates/operator_modal_view3d_raycast.py
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-48604
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-48638
Modified: branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.cpp
===================================================================
--- branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.cpp 2012-07-05 11:39:11 UTC (rev 48639)
+++ branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.cpp 2012-07-05 11:40:48 UTC (rev 48640)
@@ -244,7 +244,7 @@
return module;
}
-PyObject* AUD_getPythonFactory(AUD_Sound* sound)
+void* AUD_getPythonFactory(AUD_Sound* sound)
{
if(sound)
{
@@ -259,9 +259,9 @@
return NULL;
}
-AUD_Sound* AUD_getPythonSound(PyObject* sound)
+AUD_Sound* AUD_getPythonSound(void* sound)
{
- Factory* factory = checkFactory(sound);
+ Factory* factory = checkFactory((PyObject *)sound);
if(!factory)
return NULL;
Modified: branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.h
===================================================================
--- branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.h 2012-07-05 11:39:11 UTC (rev 48639)
+++ branches/soc-2011-tomato/intern/audaspace/intern/AUD_C-API.h 2012-07-05 11:40:48 UTC (rev 48640)
@@ -29,10 +29,6 @@
#ifndef __AUD_C_API_H__
#define __AUD_C_API_H__
-#ifdef WITH_PYTHON
-#include "Python.h"
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -740,14 +736,14 @@
* \param sound The sound factory.
* \return The python factory.
*/
-extern PyObject* AUD_getPythonFactory(AUD_Sound* sound);
+extern void* AUD_getPythonFactory(AUD_Sound* sound);
/**
* Retrieves the sound factory of a python factory.
* \param sound The python factory.
* \return The sound factory.
*/
-extern AUD_Sound* AUD_getPythonSound(PyObject* sound);
+extern AUD_Sound* AUD_getPythonSound(void* sound);
#endif
#ifdef __cplusplus
Modified: branches/soc-2011-tomato/intern/ghost/GHOST_C-api.h
===================================================================
--- branches/soc-2011-tomato/intern/ghost/GHOST_C-api.h 2012-07-05 11:39:11 UTC (rev 48639)
+++ branches/soc-2011-tomato/intern/ghost/GHOST_C-api.h 2012-07-05 11:40:48 UTC (rev 48640)
@@ -328,7 +328,8 @@
* @param windowhandle The handle to the window
* @param bitmap The bitmap data for the cursor.
* @param mask The mask data for the cursor.
- * @parm sizex, sizey The size of the cursor
+ * @param sizex The width of the cursor
+ * @param sizey The height of the cursor
* @param hotX The X coordinate of the cursor hotspot.
* @param hotY The Y coordinate of the cursor hotspot.
* @param fg_color, bg_color Colors of the cursor
Modified: branches/soc-2011-tomato/intern/raskter/raskter.c
===================================================================
--- branches/soc-2011-tomato/intern/raskter/raskter.c 2012-07-05 11:39:11 UTC (rev 48639)
+++ branches/soc-2011-tomato/intern/raskter/raskter.c 2012-07-05 11:40:48 UTC (rev 48640)
@@ -34,8 +34,8 @@
#define __PLX__FAKE_AA__
/* from BLI_utildefines.h */
-#define MIN2(x, y) ( (x) < (y) ? (x) : (y) )
-#define MAX2(x, y) ( (x) > (y) ? (x) : (y) )
+#define MIN2(x, y) ( (x) < (y) ? (x) : (y) )
+#define MAX2(x, y) ( (x) > (y) ? (x) : (y) )
#define ABS(a) ( (a) < 0 ? (-(a)) : (a) )
struct e_status {
@@ -96,7 +96,8 @@
/* we're not at the last vert, so end of the edge is the previous vertex */
xend = v[i - 1].x;
yend = v[i - 1].y;
- } else {
+ }
+ else {
/* we're at the first vertex, so the "end" of this edge is the last vertex */
xend = v[num_verts - 1].x;
yend = v[num_verts - 1].y;
@@ -125,7 +126,8 @@
if (dx > 0) {
e_new->xdir = 1;
xdist = dx;
- } else {
+ }
+ else {
e_new->xdir = -1;
xdist = -dx;
}
@@ -138,13 +140,15 @@
/* calculate deltas for incremental drawing */
if (dx >= 0) {
e_new->drift = 0;
- } else {
+ }
+ else {
e_new->drift = -dy + 1;
}
if (dy >= xdist) {
e_new->drift_inc = xdist;
e_new->xshift = 0;
- } else {
+ }
+ else {
e_new->drift_inc = xdist % dy;
e_new->xshift = (xdist / dy) * e_new->xdir;
}
@@ -187,7 +191,7 @@
* If the number of verts specified to render as a polygon is less than 3,
* return immediately. Obviously we cant render a poly with sides < 3. The
* return for this we set to 1, simply so it can be distinguished from the
- * next place we could return, /home/guest/blender-svn/soc-2011-tomato/intern/raskter/raskter.
+ * next place we could return.
* which is a failure to allocate memory.
*/
if (num_verts < 3) {
@@ -211,6 +215,12 @@
*/
preprocess_all_edges(ctx, verts, num_verts, edgbuf);
+ /* can happen with a zero area mask */
+ if (ctx->all_edges == NULL) {
+ free(edgbuf);
+ return(0);
+ }
+
/*
* Set the pointer for tracking the edges currently in processing to NULL to make sure
* we don't get some crazy value after initialization.
@@ -258,7 +268,8 @@
edgec = &ctx->all_edges->e_next; /* Set our list to the next edge's location in memory. */
ctx->all_edges = e_temp; /* Skip the NULL or bad X edge, set pointer to next edge. */
break; /* Stop looping edges (since we ran out or hit empty X span. */
- } else {
+ }
+ else {
edgec = &e_curr->e_next; /* Set the pointer to the edge list the "next" edge. */
}
}
@@ -320,7 +331,8 @@
for (edgec = &ctx->possible_edges; (e_curr = *edgec); ) {
if (!(--(e_curr->num))) {
*edgec = e_curr->e_next;
- } else {
+ }
+ else {
e_curr->x += e_curr->xshift;
if ((e_curr->drift += e_curr->drift_inc) > 0) {
e_curr->x += e_curr->xdir;
@@ -379,8 +391,9 @@
}
int PLX_raskterize(float (*base_verts)[2], int num_base_verts,
- float *buf, int buf_x, int buf_y, int do_mask_AA) {
- int subdiv_AA = (do_mask_AA != 0)? 8:0;
+ float *buf, int buf_x, int buf_y, int do_mask_AA)
+{
+ int subdiv_AA = (do_mask_AA != 0) ? 8 : 0;
int i; /* i: Loop counter. */
int sAx;
int sAy;
@@ -388,7 +401,7 @@
struct r_fill_context ctx = {0};
const float buf_x_f = (float)(buf_x);
const float buf_y_f = (float)(buf_y);
- float div_offset=(1.0f / (float)(subdiv_AA));
+ float div_offset = (1.0f / (float)(subdiv_AA));
float div_offset_static = 0.5f * (float)(subdiv_AA) * div_offset;
/*
* Allocate enough memory for our poly_vert list. It'll be the size of the poly_vert
@@ -413,21 +426,22 @@
* drawn will be 1.0f in value, there is no anti-aliasing.
*/
- if(!subdiv_AA) {
- for (i = 0; i < num_base_verts; i++) { /* Loop over all base_verts. */
- ply[i].x = (int)((base_verts[i][0] * buf_x_f) + 0.5f); /* Range expand normalized X to integer buffer-space X. */
+ if (!subdiv_AA) {
+ for (i = 0; i < num_base_verts; i++) { /* Loop over all base_verts. */
+ ply[i].x = (int)((base_verts[i][0] * buf_x_f) + 0.5f); /* Range expand normalized X to integer buffer-space X. */
ply[i].y = (int)((base_verts[i][1] * buf_y_f) + 0.5f); /* Range expand normalized Y to integer buffer-space Y. */
+ }
+
+ i = rast_scan_fill(&ctx, ply, num_base_verts, 1.0f); /* Call our rasterizer, passing in the integer coords for each vert. */
}
-
- i = rast_scan_fill(&ctx, ply, num_base_verts,1.0f); /* Call our rasterizer, passing in the integer coords for each vert. */
- } else {
- for(sAx=0; sAx < subdiv_AA; sAx++) {
- for(sAy=0; sAy < subdiv_AA; sAy++) {
- for(i=0; i < num_base_verts; i++) {
- ply[i].x = (int)((base_verts[i][0]*buf_x_f)+0.5f - div_offset_static + (div_offset*(float)(sAx)));
- ply[i].y = (int)((base_verts[i][1]*buf_y_f)+0.5f - div_offset_static + (div_offset*(float)(sAy)));
+ else {
+ for (sAx = 0; sAx < subdiv_AA; sAx++) {
+ for (sAy = 0; sAy < subdiv_AA; sAy++) {
+ for (i = 0; i < num_base_verts; i++) {
+ ply[i].x = (int)((base_verts[i][0] * buf_x_f) + 0.5f - div_offset_static + (div_offset * (float)(sAx)));
+ ply[i].y = (int)((base_verts[i][1] * buf_y_f) + 0.5f - div_offset_static + (div_offset * (float)(sAy)));
}
- i = rast_scan_fill(&ctx, ply, num_base_verts,(1.0f / (float)(subdiv_AA*subdiv_AA)));
+ i = rast_scan_fill(&ctx, ply, num_base_verts, (1.0f / (float)(subdiv_AA * subdiv_AA)));
}
}
}
@@ -442,7 +456,8 @@
*/
static int rast_scan_feather(struct r_fill_context *ctx,
float (*base_verts_f)[2], int num_base_verts,
- struct poly_vert *feather_verts, float(*feather_verts_f)[2], int num_feather_verts) {
+ struct poly_vert *feather_verts, float(*feather_verts_f)[2], int num_feather_verts)
+{
int x_curr; /* current pixel position in X */
int y_curr; /* current scan line being drawn */
int yp; /* y-pixel's position in frame buffer */
@@ -495,6 +510,12 @@
return(0);
}
+ /* can happen with a zero area mask */
+ if (ctx->all_edges == NULL) {
+ free(edgbuf);
+ return(0);
+ }
+
/*
* Do some preprocessing on all edges. This constructs a table structure in memory of all
* the edge properties and can "flip" some edges so sorting works correctly.
@@ -548,7 +569,8 @@
edgec = &ctx->all_edges->e_next; /* Set our list to the next edge's location in memory. */
ctx->all_edges = e_temp; /* Skip the NULL or bad X edge, set pointer to next edge. */
break; /* Stop looping edges (since we ran out or hit empty X span. */
- } else {
+ }
+ else {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list