[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47785] branches/soc-2011-tomato: Merging r47740 through r47782 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Tue Jun 12 13:41:07 CEST 2012
Revision: 47785
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47785
Author: nazgul
Date: 2012-06-12 11:41:06 +0000 (Tue, 12 Jun 2012)
Log Message:
-----------
Merging r47740 through r47782 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47740
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47782
Modified Paths:
--------------
branches/soc-2011-tomato/CMakeLists.txt
branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh
branches/soc-2011-tomato/extern/eltopo/eltopo3d/dynamicsurface.h
branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.cc
branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.h
branches/soc-2011-tomato/extern/libmv/libmv-capi.cpp
branches/soc-2011-tomato/extern/libmv/libmv-capi.h
branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/collections_port.h
branches/soc-2011-tomato/intern/cycles/blender/blender_shader.cpp
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_object_constraint.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref.py
branches/soc-2011-tomato/release/scripts/templates/operator_node.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h
branches/soc-2011-tomato/source/blender/blenkernel/BKE_tracking.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/anim_sys.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/constraint.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
branches/soc-2011-tomato/source/blender/compositor/COM_defines.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_Node.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_Node.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeOperation.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_OutputSocket.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_GroupNode.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MuteNode.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_ViewerNode.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_BokehImageOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_CompositorOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_PreviewOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ReadBufferOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_RotateOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_RotateOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_SetVectorOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_TranslateOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_TranslateOperation.h
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/include/ED_clip.h
branches/soc-2011-tomato/source/blender/editors/interface/interface_draw.c
branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_intern.h
branches/soc-2011-tomato/source/blender/editors/space_node/node_ops.c
branches/soc-2011-tomato/source/blender/editors/space_node/space_node.c
branches/soc-2011-tomato/source/blender/gpu/GPU_draw.h
branches/soc-2011-tomato/source/blender/gpu/intern/gpu_draw.c
branches/soc-2011-tomato/source/blender/imbuf/intern/divers.c
branches/soc-2011-tomato/source/blender/imbuf/intern/jp2.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_constraint_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_movieclip_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_tracking_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_userdef_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_constraint.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
branches/soc-2011-tomato/source/blender/nodes/intern/node_common.c
branches/soc-2011-tomato/source/blender/nodes/intern/node_common.h
branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Vector.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_init_exit.c
Added Paths:
-----------
branches/soc-2011-tomato/extern/libmv/third_party/ceres/patches/collections_port.h.mingw.patch
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-47739
+ /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-47782
Modified: branches/soc-2011-tomato/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/CMakeLists.txt 2012-06-12 11:35:46 UTC (rev 47784)
+++ branches/soc-2011-tomato/CMakeLists.txt 2012-06-12 11:41:06 UTC (rev 47785)
@@ -1605,6 +1605,20 @@
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
endif()
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS C_WARN_ALL -Wall)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_OVERLOADED_VIRTUAL -Wno-overloaded-virtual) # we get a lot of these, if its a problem a dev needs to look into it.
+ ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
+
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
Modified: branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh
===================================================================
--- branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh 2012-06-12 11:35:46 UTC (rev 47784)
+++ branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh 2012-06-12 11:41:06 UTC (rev 47785)
@@ -61,7 +61,7 @@
# annoying bug in sphinx makes it very slow unless we do this. should report.
cd $SPHINXBASE
- sphinx-build -n -b html sphinx-in sphinx-out
+ sphinx-build -b html sphinx-in sphinx-out
# XXX, saves space on upload and zip, should move HTML outside
# and zip up there, for now this is OK
Modified: branches/soc-2011-tomato/extern/eltopo/eltopo3d/dynamicsurface.h
===================================================================
--- branches/soc-2011-tomato/extern/eltopo/eltopo3d/dynamicsurface.h 2012-06-12 11:35:46 UTC (rev 47784)
+++ branches/soc-2011-tomato/extern/eltopo/eltopo3d/dynamicsurface.h 2012-06-12 11:41:06 UTC (rev 47785)
@@ -759,7 +759,7 @@
inline bool DynamicSurface::edge_is_solid( size_t e ) const
{
const Vec2st& edge = m_mesh.m_edges[e];
- return ( vertex_is_solid(edge[0]) && vertex_is_solid(edge[1]) );
+ return ( vertex_is_solid(edge[0]) || vertex_is_solid(edge[1]) );
}
// --------------------------------------------------------
@@ -771,7 +771,7 @@
inline bool DynamicSurface::triangle_is_solid( size_t t ) const
{
const Vec3st& tri = m_mesh.get_triangle(t);
- return ( vertex_is_solid(tri[0]) && vertex_is_solid(tri[1]) && vertex_is_solid(tri[2]) );
+ return ( vertex_is_solid(tri[0]) || vertex_is_solid(tri[1]) || vertex_is_solid(tri[2]) );
}
Modified: branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.cc 2012-06-12 11:35:46 UTC (rev 47784)
+++ branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.cc 2012-06-12 11:41:06 UTC (rev 47785)
@@ -1351,7 +1351,7 @@
bool SamplePlanarPatch(const FloatImage &image,
const double *xs, const double *ys,
int num_samples_x, int num_samples_y,
- FloatImage *patch,
+ FloatImage *mask, FloatImage *patch,
double *warped_position_x, double *warped_position_y) {
// Bail early if the points are outside the image.
if (!AllInBounds(image, xs, ys)) {
@@ -1376,6 +1376,13 @@
SampleLinear(image, image_position(1),
image_position(0),
&(*patch)(r, c, 0));
+ if (mask) {
+ float maskValue = SampleLinear(*mask, image_position(1),
+ image_position(0), 0);
+
+ for (int d = 0; d < image.Depth(); d++)
+ (*patch)(r, c, d) *= maskValue;
+ }
}
}
Modified: branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.h
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.h 2012-06-12 11:35:46 UTC (rev 47784)
+++ branches/soc-2011-tomato/extern/libmv/libmv/tracking/track_region.h 2012-06-12 11:41:06 UTC (rev 47785)
@@ -135,10 +135,14 @@
// pixels of border around them. (so e.g. a corner of the patch cannot lie
// directly on the edge of the image). Four corners are always required. All
// channels are interpolated.
+// When mask is not null it'll be used as a pattern mask. Ot should match
+// the size of image.
+// Warped coordinates of marker's position would be returned in
+// warped_position_x and warped_position_y
bool SamplePlanarPatch(const FloatImage &image,
const double *xs, const double *ys,
int num_samples_x, int num_samples_y,
- FloatImage *patch,
+ FloatImage *mask, FloatImage *patch,
double *warped_position_x, double *warped_position_y);
} // namespace libmv
Modified: branches/soc-2011-tomato/extern/libmv/libmv-capi.cpp
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv-capi.cpp 2012-06-12 11:35:46 UTC (rev 47784)
+++ branches/soc-2011-tomato/extern/libmv/libmv-capi.cpp 2012-06-12 11:41:06 UTC (rev 47785)
@@ -243,7 +243,7 @@
fclose(fp);
}
-static void saveImage(char *prefix, libmv::FloatImage image, int x0, int y0)
+static void saveImage(const char *prefix, libmv::FloatImage image, int x0, int y0)
{
int x, y;
png_bytep *row_pointers;
@@ -283,7 +283,7 @@
free(row_pointers);
}
-static void saveBytesImage(char *prefix, unsigned char *data, int width, int height)
+static void saveBytesImage(const char *prefix, unsigned char *data, int width, int height)
{
int x, y;
png_bytep *row_pointers;
@@ -376,6 +376,8 @@
}
libmv::TrackRegionOptions track_region_options;
+ libmv::FloatImage image1_mask;
+
switch (options->motion_model) {
#define LIBMV_CONVERT(the_model) \
case libmv::TrackRegionOptions::the_model: \
@@ -398,6 +400,12 @@
track_region_options.use_brute_initialization = options->use_brute;
track_region_options.use_normalized_intensities = options->use_normalization;
+ if (options->image1_mask) {
+ floatBufToImage(options->image1_mask, image1_width, image1_height, 1, &image1_mask);
+
+ track_region_options.image1_mask = &image1_mask;
+ }
+
/* Convert from raw float buffers to libmv's FloatImage. */
libmv::FloatImage old_patch, new_patch;
floatBufToImage(image1, image1_width, image1_height, 1, &old_patch);
@@ -437,15 +445,24 @@
void libmv_samplePlanarPatch(const float *image, int width, int height,
int channels, const double *xs, const double *ys,
- int num_samples_x, int num_samples_y, float *patch,
+ int num_samples_x, int num_samples_y,
+ const float *mask, float *patch,
double *warped_position_x, double *warped_position_y)
{
- libmv::FloatImage libmv_image, libmv_patch;
+ libmv::FloatImage libmv_image, libmv_patch, libmv_mask;
+ libmv::FloatImage *libmv_mask_for_sample = NULL;
floatBufToImage(image, width, height, channels, &libmv_image);
+ if (mask) {
+ floatBufToImage(mask, width, height, 1, &libmv_mask);
+
+ libmv_mask_for_sample = &libmv_mask;
+ }
+
libmv::SamplePlanarPatch(libmv_image, xs, ys, num_samples_x, num_samples_y,
- &libmv_patch, warped_position_x, warped_position_y);
+ libmv_mask_for_sample, &libmv_patch,
+ warped_position_x, warped_position_y);
imageToFloatBuf(&libmv_patch, channels, patch);
}
Modified: branches/soc-2011-tomato/extern/libmv/libmv-capi.h
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv-capi.h 2012-06-12 11:35:46 UTC (rev 47784)
+++ branches/soc-2011-tomato/extern/libmv/libmv-capi.h 2012-06-12 11:41:06 UTC (rev 47785)
@@ -52,18 +52,21 @@
/* TrackRegion (new planar tracker) */
struct libmv_trackRegionOptions {
- int motion_model;
- int num_iterations;
- int use_brute;
- int use_normalization;
- double minimum_correlation;
- double sigma;
+ int motion_model;
+ int num_iterations;
+ int use_brute;
+ int use_normalization;
+ double minimum_correlation;
+ double sigma;
+ float *image1_mask;
};
+
struct libmv_trackRegionResult {
- int termination;
- const char *termination_reason;
- double correlation;
+ int termination;
+ const char *termination_reason;
+ double correlation;
};
+
int libmv_trackRegion(const struct libmv_trackRegionOptions *options,
const float *image1, int image1_width, int image1_height,
const float *image2, int image2_width, int image2_height,
@@ -73,7 +76,8 @@
void libmv_samplePlanarPatch(const float *image, int width, int height,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list