[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49645] branches/soc-2011-tomato: svn merge ^/trunk/blender -r49638:49644
Campbell Barton
ideasman42 at gmail.com
Tue Aug 7 12:06:31 CEST 2012
Revision: 49645
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49645
Author: campbellbarton
Date: 2012-08-07 10:06:31 +0000 (Tue, 07 Aug 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r49638:49644
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49638
Modified Paths:
--------------
branches/soc-2011-tomato/CMakeLists.txt
branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.h
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
branches/soc-2011-tomato/source/blender/python/intern/bpy_props.c
Property Changed:
----------------
branches/soc-2011-tomato/
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-49638
+ /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-49644
Modified: branches/soc-2011-tomato/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/CMakeLists.txt 2012-08-07 10:03:14 UTC (rev 49644)
+++ branches/soc-2011-tomato/CMakeLists.txt 2012-08-07 10:06:31 UTC (rev 49645)
@@ -272,7 +272,9 @@
endif()
execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version
- if (${MAC_SYS} MATCHES 11)
+ if (${MAC_SYS} MATCHES 12)
+ set(OSX_SYSTEM 10.8)
+ elseif (${MAC_SYS} MATCHES 11)
set(OSX_SYSTEM 10.7)
elseif(${MAC_SYS} MATCHES 10)
set(OSX_SYSTEM 10.6)
@@ -1521,7 +1523,7 @@
# set the endian define
-if(MSVC)
+if(MSVC OR ${XCODE_VERSION} VERSION_GREATER 4.3) # no more ppc support in xcode > 4.3
# for some reason this fails on msvc
add_definitions(-D__LITTLE_ENDIAN__)
else()
Modified: branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h 2012-08-07 10:03:14 UTC (rev 49644)
+++ branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h 2012-08-07 10:06:31 UTC (rev 49645)
@@ -61,12 +61,12 @@
#endif
#ifdef __KERNEL_OPENCL_APPLE__
-//#define __SVM__
-//#define __EMISSION__
-//#define __IMAGE_TEXTURES__
-//#define __HOLDOUT__
-//#define __PROCEDURAL_TEXTURES__
-//#define __EXTRA_NODES__
+#define __SVM__
+#define __EMISSION__
+#define __IMAGE_TEXTURES__
+#define __HOLDOUT__
+#define __PROCEDURAL_TEXTURES__
+#define __EXTRA_NODES__
#endif
#ifdef __KERNEL_OPENCL_AMD__
Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.cpp 2012-08-07 10:03:14 UTC (rev 49644)
+++ branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.cpp 2012-08-07 10:06:31 UTC (rev 49645)
@@ -77,28 +77,17 @@
}
}
-float InpaintSimpleOperation::get(int x, int y, int component)
+float *InpaintSimpleOperation::get_pixel(int x, int y)
{
int width = this->getWidth();
ASSERT_XY_RANGE(x, y);
- return this->m_cached_buffer[
+ return &this->m_cached_buffer[
y * width * COM_NUMBER_OF_CHANNELS
- + x * COM_NUMBER_OF_CHANNELS + component];
+ + x * COM_NUMBER_OF_CHANNELS];
}
-void InpaintSimpleOperation::set(int x, int y, int component, float v)
-{
- int width = this->getWidth();
-
- ASSERT_XY_RANGE(x, y);
-
- this->m_cached_buffer[
- y * width * COM_NUMBER_OF_CHANNELS
- + x * COM_NUMBER_OF_CHANNELS + component] = v;
-}
-
int InpaintSimpleOperation::mdist(int x, int y)
{
int width = this->getWidth();
@@ -141,7 +130,7 @@
for (int i = 0; i < width; i++) {
int r = 0;
/* no need to clamp here */
- if (get(i, j, 3) < 1.0f) {
+ if (this->get_pixel(i, j)[3] < 1.0f) {
r = width + height;
if (i > 0)
r = mini(r, m[j * width + i - 1] + 1);
@@ -197,10 +186,11 @@
for (int dy = -1; dy <= 1; dy++) {
if (dx != 0 && dy != 0) {
- int x_ofs = x + dx;
+ int x_ofs = x + dx;
int y_ofs = y + dy;
- clamp_xy(x_ofs, y_ofs);
+ this->clamp_xy(x_ofs, y_ofs);
+
if (this->mdist(x_ofs, y_ofs) < d) {
float weight;
@@ -212,20 +202,14 @@
weight = M_SQRT1_2; /* 1.0f / sqrt(2) */
}
- for (int c = 0; c < 3; c++) {
- float fk = this->get(x_ofs, y_ofs, c);
-
- pix[c] += fk * weight;
- }
+ madd_v3_v3fl(pix, this->get_pixel(x_ofs, y_ofs), weight);
n += weight;
}
}
}
}
- for (int c = 0; c < 3; c++) {
- this->set(x, y, c, pix[c] / n);
- }
+ mul_v3_v3fl(this->get_pixel(x, y), pix, 1.0f / n);
}
void *InpaintSimpleOperation::initializeTileData(rcti *rect)
@@ -258,10 +242,8 @@
void InpaintSimpleOperation::executePixel(float *color, int x, int y, void *data)
{
- clamp_xy(x, y);
- for (int c = 0; c < 3; c++) {
- color[c] = get(x, y, c);
- }
+ this->clamp_xy(x, y);
+ copy_v3_v3(color, this->get_pixel(x, y));
color[3] = 1.0f;
}
Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.h
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.h 2012-08-07 10:03:14 UTC (rev 49644)
+++ branches/soc-2011-tomato/source/blender/compositor/operations/COM_InpaintOperation.h 2012-08-07 10:06:31 UTC (rev 49645)
@@ -64,11 +64,10 @@
private:
void calc_manhatten_distance();
- void clamp_xy(int & x, int & y);
- float get(int x, int y, int component);
- void set(int x, int y, int component, float v);
+ void clamp_xy(int &x, int &y);
+ float *get_pixel(int x, int y);
int mdist(int x, int y);
- bool next_pixel(int & x, int & y, int & curr, int iters);
+ bool next_pixel(int &x, int &y, int &curr, int iters);
void pix_step(int x, int y);
};
Property changes on: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-49638
+ /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-49644
Property changes on: branches/soc-2011-tomato/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-49638
+ /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-49644
Modified: branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c 2012-08-07 10:03:14 UTC (rev 49644)
+++ branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c 2012-08-07 10:06:31 UTC (rev 49645)
@@ -2509,8 +2509,8 @@
if ((td->flag & TD_SKIP) || (!td->loc))
continue;
- td->loc[0] = MIN2(MAX2(0.0f, td->loc[0]), aspx);
- td->loc[1] = MIN2(MAX2(0.0f, td->loc[1]), aspy);
+ td->loc[0] = minf(maxf(0.0f, td->loc[0]), aspx);
+ td->loc[1] = minf(maxf(0.0f, td->loc[1]), aspy);
}
}
@@ -4258,7 +4258,7 @@
for (a = 0; a < t->total; a++, td++) {
seq = ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
- minframe = MIN2(minframe, seq->startdisp);
+ minframe = mini(minframe, seq->startdisp);
}
}
Modified: branches/soc-2011-tomato/source/blender/python/intern/bpy_props.c
===================================================================
--- branches/soc-2011-tomato/source/blender/python/intern/bpy_props.c 2012-08-07 10:03:14 UTC (rev 49644)
+++ branches/soc-2011-tomato/source/blender/python/intern/bpy_props.c 2012-08-07 10:06:31 UTC (rev 49645)
@@ -1298,9 +1298,8 @@
eitems = enum_items_from_py(items_fast, def, &defvalue,
(opts & PROP_ENUM_FLAG) != 0);
- Py_DECREF(items_fast);
-
if (!eitems) {
+ Py_DECREF(items_fast);
return NULL;
}
}
@@ -1327,6 +1326,10 @@
RNA_def_property_duplicate_pointers(srna, prop);
if (is_itemf == FALSE) {
+ /* note: this must be postponed until after #RNA_def_property_duplicate_pointers
+ * otherwise if this is a generator it may free the strings before we get copy them */
+ Py_DECREF(items_fast);
+
MEM_freeN(eitems);
}
}
More information about the Bf-blender-cvs
mailing list