[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44109] branches/soc-2011-tomato: Merging r44070 through r44108 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Tue Feb 14 16:19:56 CET 2012
Revision: 44109
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44109
Author: nazgul
Date: 2012-02-14 15:19:49 +0000 (Tue, 14 Feb 2012)
Log Message:
-----------
Merging r44070 through r44108 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44070
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44108
Modified Paths:
--------------
branches/soc-2011-tomato/build_files/scons/config/darwin-config.py
branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh
branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp
branches/soc-2011-tomato/intern/boolop/CMakeLists.txt
branches/soc-2011-tomato/intern/boolop/intern/BOP_CarveInterface.cpp
branches/soc-2011-tomato/release/datafiles/blender_icons.png
branches/soc-2011-tomato/release/scripts/modules/rna_xml.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_render.py
branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/writeffmpeg.c
branches/soc-2011-tomato/source/blender/editors/armature/meshlaplacian.c
branches/soc-2011-tomato/source/blender/editors/datafiles/blender_icons.png.c
branches/soc-2011-tomato/source/blender/editors/include/UI_icons.h
branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
branches/soc-2011-tomato/source/blender/editors/object/object_edit.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_draw.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_edit.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2011-tomato/source/blender/gpu/intern/gpu_draw.c
branches/soc-2011-tomato/source/blender/imbuf/IMB_imbuf.h
branches/soc-2011-tomato/source/blender/imbuf/intern/divers.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_modifier.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
branches/soc-2011-tomato/source/blender/quicktime/apple/qtkit_export.m
branches/soc-2011-tomato/source/blender/quicktime/apple/qtkit_import.m
branches/soc-2011-tomato/source/blender/quicktime/apple/quicktime_export.c
branches/soc-2011-tomato/source/blender/quicktime/quicktime_export.h
branches/soc-2011-tomato/source/gameengine/Converter/BL_ShapeDeformer.cpp
Added Paths:
-----------
branches/soc-2011-tomato/release/scripts/presets/interface_theme/
branches/soc-2011-tomato/release/scripts/presets/interface_theme/back_to_black.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/blender_24x.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/elsyiun.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/hexagon.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/ubuntu_ambiance.xml
Removed Paths:
-------------
branches/soc-2011-tomato/release/scripts/presets/interface_theme/back_to_black.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/blender_24x.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/elsyiun.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/hexagon.xml
branches/soc-2011-tomato/release/scripts/presets/interface_theme/ubuntu_ambiance.xml
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /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-44069
+ /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-44108
Modified: branches/soc-2011-tomato/build_files/scons/config/darwin-config.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/darwin-config.py 2012-02-14 13:25:23 UTC (rev 44108)
+++ branches/soc-2011-tomato/build_files/scons/config/darwin-config.py 2012-02-14 15:19:49 UTC (rev 44109)
@@ -99,7 +99,7 @@
# enable ffmpeg support
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
-BF_FFMPEG = LIBDIR + '/ffmpeg'
+BF_FFMPEG = LIBDIR + '/ffmpeg_0.10'
BF_FFMPEG_INC = "${BF_FFMPEG}/include"
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
Modified: branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh
===================================================================
--- branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh 2012-02-14 13:25:23 UTC (rev 44108)
+++ branches/soc-2011-tomato/doc/python_api/sphinx_doc_gen.sh 2012-02-14 15:19:49 UTC (rev 44109)
@@ -63,6 +63,13 @@
cd $SPHINXBASE
sphinx-build -n -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
+ rm -rf sphinx-out/.doctrees
+
+ # incase we have a zip already
+ rm -f blender_python_reference_$BLENDER_VERSION.zip
+
# ------------------------------------------------------------------------
# ZIP the HTML dir for upload
Modified: branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp
===================================================================
--- branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp 2012-02-14 13:25:23 UTC (rev 44108)
+++ branches/soc-2011-tomato/intern/audaspace/intern/AUD_SequencerReader.cpp 2012-02-14 15:19:49 UTC (rev 44109)
@@ -176,6 +176,8 @@
}
m_factory->m_volume.read(frame, &volume);
+ if(m_factory->m_muted)
+ volume = 0.0f;
m_device.setVolume(volume);
m_factory->m_orientation.read(frame, q.get());
Modified: branches/soc-2011-tomato/intern/boolop/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/intern/boolop/CMakeLists.txt 2012-02-14 13:25:23 UTC (rev 44108)
+++ branches/soc-2011-tomato/intern/boolop/CMakeLists.txt 2012-02-14 15:19:49 UTC (rev 44109)
@@ -23,6 +23,8 @@
#
# ***** END GPL LICENSE BLOCK *****
+remove_strict_flags()
+
set(INC
.
extern
Modified: branches/soc-2011-tomato/intern/boolop/intern/BOP_CarveInterface.cpp
===================================================================
--- branches/soc-2011-tomato/intern/boolop/intern/BOP_CarveInterface.cpp 2012-02-14 13:25:23 UTC (rev 44108)
+++ branches/soc-2011-tomato/intern/boolop/intern/BOP_CarveInterface.cpp 2012-02-14 15:19:49 UTC (rev 44109)
@@ -46,24 +46,31 @@
#define MAX(x,y) ((x)>(y)?(x):(y))
#define MIN(x,y) ((x)<(y)?(x):(y))
-static int isFacePlanar(CSG_IFace &face, std::vector<carve::geom3d::Vector> &vertices)
+static bool isQuadPlanar(carve::geom3d::Vector &v1, carve::geom3d::Vector &v2,
+ carve::geom3d::Vector &v3, carve::geom3d::Vector &v4)
{
- carve::geom3d::Vector v1, v2, v3, cross;
+ carve::geom3d::Vector vec1, vec2, vec3, cross;
- if (face.vertex_number == 4) {
- v1 = vertices[face.vertex_index[1]] - vertices[face.vertex_index[0]];
- v2 = vertices[face.vertex_index[3]] - vertices[face.vertex_index[0]];
- v3 = vertices[face.vertex_index[2]] - vertices[face.vertex_index[0]];
+ vec1 = v2 - v1;
+ vec2 = v4 - v1;
+ vec3 = v3 - v1;
- cross = carve::geom::cross(v1, v2);
+ cross = carve::geom::cross(vec1, vec2);
- float production = carve::geom::dot(cross, v3);
- float magnitude = 1e-6 * cross.length();
+ float production = carve::geom::dot(cross, vec3);
+ float magnitude = 1e-6 * cross.length();
- return fabs(production) < magnitude;
+ return fabs(production) < magnitude;
+}
+
+static bool isFacePlanar(CSG_IFace &face, std::vector<carve::geom3d::Vector> &vertices)
+{
+ if (face.vertex_number == 4) {
+ return isQuadPlanar(vertices[face.vertex_index[0]], vertices[face.vertex_index[1]],
+ vertices[face.vertex_index[2]], vertices[face.vertex_index[3]]);
}
- return 1;
+ return true;
}
static void Carve_copyMeshes(std::vector<MeshSet<3>::mesh_t*> &meshes, std::vector<MeshSet<3>::mesh_t*> &new_meshes)
@@ -200,30 +207,35 @@
while(it != meshes.end()) {
MeshSet<3>::mesh_t *mesh = *it;
- bool isIntersect = false;
+ bool isAdded = false;
RTreeNode<3, Face<3> *> *rtree = RTreeNode<3, Face<3> *>::construct_STR(mesh->faces.begin(), mesh->faces.end(), 4, 4);
- std::vector<MeshSet<3>::mesh_t*>::iterator operand_it = operandMeshes.begin();
- std::vector<RTreeNode<3, Face<3> *> *>::iterator tree_it = meshRTree.begin();
- for(; operand_it!=operandMeshes.end(); operand_it++, tree_it++) {
- RTreeNode<3, Face<3> *> *operandRTree = *tree_it;
+ if (rtree->bbox.intersects(otherAABB)) {
+ bool isIntersect = false;
- if(operandRTree->bbox.intersects(otherAABB)) {
+ std::vector<MeshSet<3>::mesh_t*>::iterator operand_it = operandMeshes.begin();
+ std::vector<RTreeNode<3, Face<3> *> *>::iterator tree_it = meshRTree.begin();
+ for(; operand_it!=operandMeshes.end(); operand_it++, tree_it++) {
+ RTreeNode<3, Face<3> *> *operandRTree = *tree_it;
+
if(Carve_checkMeshSetInterseciton(rtree, operandRTree)) {
isIntersect = true;
break;
}
}
- }
- if(!isIntersect) {
- operandMeshes.push_back(mesh);
- meshRTree.push_back(rtree);
+ if(!isIntersect) {
+ operandMeshes.push_back(mesh);
+ meshRTree.push_back(rtree);
- it = meshes.erase(it);
+ it = meshes.erase(it);
+ isAdded = true;
+ }
}
- else {
+
+ if (!isAdded) {
+ delete rtree;
it++;
}
}
@@ -239,6 +251,9 @@
std::vector<MeshSet<3>::mesh_t*> operandMeshes;
Carve_getIntersectedOperandMeshes(meshes, otherAABB, operandMeshes);
+ if (operandMeshes.size() == 0)
+ return NULL;
+
return Carve_meshSetFromMeshes(operandMeshes);
}
@@ -259,9 +274,19 @@
MeshSet<3> *left = Carve_getIntersectedOperand(orig_meshes, otherAABB);
+ if (!left) {
+ /* no maniforlds which intersects another object at all */
+ return poly;
+ }
+
while(orig_meshes.size()) {
MeshSet<3> *right = Carve_getIntersectedOperand(orig_meshes, otherAABB);
+ if (!right) {
+ /* no more intersecting manifolds which intersects other object */
+ break;
+ }
+
try {
if(left->meshes.size()==0) {
delete left;
@@ -295,6 +320,15 @@
}
}
+ /* append all meshes which doesn't have intersection with another operand as-is */
+ if (orig_meshes.size()) {
+ MeshSet<3> *result = Carve_meshSetFromTwoMeshes(left->meshes, orig_meshes);
+
+ delete left;
+
+ return result;
+ }
+
return left;
}
@@ -396,8 +430,63 @@
return poly;
}
+static bool checkValidQuad(std::vector<MeshSet<3>::vertex_t> &vertex_storage, uint quad[4])
+{
+ carve::geom3d::Vector &v1 = vertex_storage[quad[0]].v;
+ carve::geom3d::Vector &v2 = vertex_storage[quad[1]].v;
+ carve::geom3d::Vector &v3 = vertex_storage[quad[2]].v;
+ carve::geom3d::Vector &v4 = vertex_storage[quad[3]].v;
+
+#if 0
+ /* disabled for now to prevent initially non-planar be triangulated
+ * in theory this might cause some artifacts if intersections happens by non-planar
+ * non-concave quad, but in practice it's acceptable */
+ if (!isQuadPlanar(v1, v2, v3, v4)) {
+ /* non-planar faces better not be merged because of possible differences in triangulation
+ * of non-planar faces in opengl and renderer */
+ return false;
+ }
+#endif
+
+ carve::geom3d::Vector edges[4];
+ carve::geom3d::Vector normal;
+ bool normal_set = false;
+
+ edges[0] = v2 - v1;
+ edges[1] = v3 - v2;
+ edges[2] = v4 - v3;
+ edges[3] = v1 - v4;
+
+ for (int i = 0; i < 4; i++) {
+ int n = i + 1;
+
+ if (n == 4)
+ n = 0;
+
+ carve::geom3d::Vector current_normal = carve::geom::cross(edges[i], edges[n]);
+
+ if (current_normal.length() > 1e-6) {
+ if (!normal_set) {
+ normal = current_normal;
+ normal_set = true;
+ }
+ else if (carve::geom::dot(normal, current_normal) < -1e-6) {
+ return false;
+ }
+ }
+ }
+
+ if (!normal_set) {
+ /* normal wasn't set means face is degraded and better merge it in such way */
+ return false;
+ }
+
+ return true;
+}
+
// check whether two faces share an edge, and if so merge them
static uint quadMerge(std::map<MeshSet<3>::vertex_t*, uint> *vertexToIndex_map,
+ std::vector<MeshSet<3>::vertex_t> &vertex_storage,
MeshSet<3>::face_t *f1, MeshSet<3>::face_t *f2,
uint v, uint quad[4])
{
@@ -432,7 +521,7 @@
quad[2] = v1[p1];
quad[3] = v2[p2];
- return 1;
+ return checkValidQuad(vertex_storage, quad);
}
else if (v1[n1] == v2[p2]) {
quad[0] = v1[current];
@@ -440,7 +529,7 @@
quad[2] = v1[n1];
quad[3] = v1[p1];
- return 1;
+ return checkValidQuad(vertex_storage, quad);
}
return 0;
@@ -539,7 +628,7 @@
if (other_index == fl.size()) continue;
// see if the faces share an edge
- result = quadMerge(&vertexToIndex_map, f, f2, v, quadverts);
+ result = quadMerge(&vertexToIndex_map, poly->vertex_storage, f, f2, v, quadverts);
// if faces can be merged, then remove the other face
// from the current set
if (result) {
Modified: branches/soc-2011-tomato/release/datafiles/blender_icons.png
===================================================================
(Binary files differ)
Modified: branches/soc-2011-tomato/release/scripts/modules/rna_xml.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/rna_xml.py 2012-02-14 13:25:23 UTC (rev 44108)
+++ branches/soc-2011-tomato/release/scripts/modules/rna_xml.py 2012-02-14 15:19:49 UTC (rev 44109)
@@ -150,13 +150,14 @@
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list