[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48277] branches/soc-2011-tomato: Merging r48264 through r48276 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Mon Jun 25 18:37:59 CEST 2012
Revision: 48277
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48277
Author: nazgul
Date: 2012-06-25 16:37:58 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
Merging r48264 through r48276 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48264
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48276
Modified Paths:
--------------
branches/soc-2011-tomato/intern/cycles/SConscript
branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp
branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp
branches/soc-2011-tomato/intern/cycles/blender/blender_util.h
branches/soc-2011-tomato/intern/cycles/kernel/kernel_triangle.h
branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
branches/soc-2011-tomato/source/blender/compositor/intern/COM_compositor.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_NormalizeOperation.cpp
branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_select.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_draw.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_view.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.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-48263
+ /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-48276
Modified: branches/soc-2011-tomato/intern/cycles/SConscript
===================================================================
--- branches/soc-2011-tomato/intern/cycles/SConscript 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/intern/cycles/SConscript 2012-06-25 16:37:58 UTC (rev 48277)
@@ -14,7 +14,7 @@
incs = []
defs = []
-cxxflags = []
+cxxflags = Split(env['CXXFLAGS'])
defs.append('CCL_NAMESPACE_BEGIN=namespace ccl {')
defs.append('CCL_NAMESPACE_END=}')
@@ -58,9 +58,9 @@
optim_sources = [path.join('kernel', 'kernel_optimized.cpp')]
cycles_optim = cycles.Clone()
- cycles_optim.BlenderLib('bf_intern_cycles_optimized', optim_sources, incs, optim_defs, libtype=['intern'], priority=[10], compileflags=[None], cxx_compileflags=optim_cxxflags)
+ cycles_optim.BlenderLib('bf_intern_cycles_optimized', optim_sources, incs, optim_defs, libtype=['intern'], priority=[10], cxx_compileflags=optim_cxxflags)
-cycles.BlenderLib('bf_intern_cycles', sources, incs, defs, libtype=['intern'], priority=[0], compileflags=[None], cxx_compileflags=cxxflags)
+cycles.BlenderLib('bf_intern_cycles', sources, incs, defs, libtype=['intern'], priority=[0], cxx_compileflags=cxxflags)
# cuda kernel binaries
if env['WITH_BF_CYCLES_CUDA_BINARIES']:
Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_object.cpp 2012-06-25 16:37:58 UTC (rev 48277)
@@ -305,7 +305,7 @@
for(; b_sce; b_sce = b_sce.background_set()) {
for(b_sce.objects.begin(b_ob); b_ob != b_sce.objects.end(); ++b_ob) {
bool hide = (render_layer.use_viewport_visibility)? b_ob->hide(): b_ob->hide_render();
- uint ob_layer = get_layer(b_ob->layers());
+ uint ob_layer = get_layer(b_ob->layers(), b_ob->layers_local_view(), object_is_light(*b_ob));
hide = hide || !(ob_layer & scene_layer);
if(!hide) {
Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp 2012-06-25 16:37:58 UTC (rev 48277)
@@ -219,7 +219,7 @@
layer = layername.c_str();
}
else {
- render_layer.scene_layer = get_layer(b_v3d.layers());
+ render_layer.scene_layer = get_layer(b_v3d.layers(), b_v3d.layers_local_view());
render_layer.layer = render_layer.scene_layer;
render_layer.holdout_layer = 0;
render_layer.material_override = PointerRNA_NULL;
Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_util.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_util.h 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_util.h 2012-06-25 16:37:58 UTC (rev 48277)
@@ -166,6 +166,28 @@
return layer;
}
+static inline uint get_layer(BL::Array<int, 20> array, BL::Array<int, 8> local_array, bool is_light = false)
+{
+ uint layer = 0;
+
+ for(uint i = 0; i < 20; i++)
+ if(array[i])
+ layer |= (1 << i);
+
+ if(is_light) {
+ /* consider lamps on all local view layers */
+ for(uint i = 0; i < 8; i++)
+ layer |= (1 << (20+i));
+ }
+ else {
+ for(uint i = 0; i < 8; i++)
+ if(local_array[i])
+ layer |= (1 << (20+i));
+ }
+
+ return layer;
+}
+
#if 0
static inline float3 get_float3(PointerRNA& ptr, const char *name)
{
Modified: branches/soc-2011-tomato/intern/cycles/kernel/kernel_triangle.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/kernel_triangle.h 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/intern/cycles/kernel/kernel_triangle.h 2012-06-25 16:37:58 UTC (rev 48277)
@@ -191,7 +191,7 @@
attr_map = kernel_tex_fetch(__attributes_map, ++attr_offset);
/* return result */
- return (attr_map.y == ATTR_ELEMENT_NONE)? ATTR_STD_NOT_FOUND: attr_map.z;
+ return (attr_map.y == ATTR_ELEMENT_NONE) ? (int)ATTR_STD_NOT_FOUND : attr_map.z;
}
__device float4 triangle_motion_vector(KernelGlobals *kg, ShaderData *sd)
Modified: branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h
===================================================================
--- branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h 2012-06-25 16:37:58 UTC (rev 48277)
@@ -176,13 +176,15 @@
return MEM_mallocN(num_bytes, _id); \
} \
void operator delete(void *mem) { \
- MEM_freeN(mem); \
+ if (mem) \
+ MEM_freeN(mem); \
} \
void *operator new[](size_t num_bytes) { \
return MEM_mallocN(num_bytes, _id "[]"); \
} \
void operator delete[](void *mem) { \
- MEM_freeN(mem); \
+ if (mem) \
+ MEM_freeN(mem); \
} \
#endif
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c 2012-06-25 16:37:58 UTC (rev 48277)
@@ -2551,7 +2551,8 @@
if ((marker->flag & MARKER_DISABLED) == 0) {
libmv_tracksInsert(tracks, marker->framenr, tracknr,
- marker->pos[0] * width, marker->pos[1] * height);
+ (marker->pos[0] + track->offset[0]) * width,
+ (marker->pos[1] + track->offset[1]) * height);
}
}
Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_compositor.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_compositor.cpp 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_compositor.cpp 2012-06-25 16:37:58 UTC (rev 48277)
@@ -33,11 +33,12 @@
#include "COM_WorkScheduler.h"
#include "OCL_opencl.h"
-static ThreadMutex compositorMutex = {{0}};
+static ThreadMutex compositorMutex;
static char is_compositorMutex_init = FALSE;
void COM_execute(RenderData *rd, bNodeTree *editingtree, int rendering)
{
if (is_compositorMutex_init == FALSE) { /// TODO: move to blender startup phase
+ memset(&compositorMutex, 0, sizeof(compositorMutex));
BLI_mutex_init(&compositorMutex);
OCL_init();
WorkScheduler::initialize(); ///TODO: call workscheduler.deinitialize somewhere
Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp 2012-06-25 16:36:22 UTC (rev 48276)
+++ branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp 2012-06-25 16:37:58 UTC (rev 48277)
@@ -101,8 +101,15 @@
else
tracksbase = BKE_tracking_get_active_tracks(tracking);
- sites_total = BLI_countlist(tracksbase);
+ /* count sites */
+ for (track = (MovieTrackingTrack *) tracksbase->first, sites_total = 0; track; track = track->next) {
+ MovieTrackingMarker *marker = BKE_tracking_marker_get(track, clip_frame);
+ if ((marker->flag & MARKER_DISABLED) == 0) {
+ sites_total++;
+ }
+ }
+
if (!sites_total)
return NULL;
@@ -117,11 +124,17 @@
sites = (VoronoiSite *) MEM_callocN(sizeof(VoronoiSite) * sites_total, "keyingscreen voronoi sites");
track = (MovieTrackingTrack *) tracksbase->first;
for (track = (MovieTrackingTrack *) tracksbase->first, i = 0; track; track = track->next, i++) {
- VoronoiSite *site = &sites[i];
MovieTrackingMarker *marker = BKE_tracking_marker_get(track, clip_frame);
- ImBuf *pattern_ibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, marker, TRUE, FALSE);
+ VoronoiSite *site;
+ ImBuf *pattern_ibuf;
int j;
+ if (marker->flag & MARKER_DISABLED)
+ continue;
+
+ site = &sites[i];
+ pattern_ibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, marker, TRUE, FALSE);
+
zero_v3(site->color);
for (j = 0; j < pattern_ibuf->x * pattern_ibuf->y; j++) {
if (pattern_ibuf->rect_float) {
Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_NormalizeOperation.cpp
===================================================================
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list