[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58067] branches/soc-2013-cycles_mblur: Merged trunk into branch.
Gavin Howard
gavin.d.howard at gmail.com
Mon Jul 8 07:27:50 CEST 2013
Revision: 58067
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58067
Author: gdh
Date: 2013-07-08 05:27:50 +0000 (Mon, 08 Jul 2013)
Log Message:
-----------
Merged trunk into branch. Includes r58052 to r58066.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58052
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58066
Modified Paths:
--------------
branches/soc-2013-cycles_mblur/intern/cycles/CMakeLists.txt
branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
branches/soc-2013-cycles_mblur/release/scripts/freestyle/style_modules/parameter_editor.py
branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_utils.c
branches/soc-2013-cycles_mblur/source/blender/editors/include/UI_interface.h
branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface.c
branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface_regions.c
branches/soc-2013-cycles_mblur/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
branches/soc-2013-cycles_mblur/source/blender/freestyle/intern/stroke/Canvas.h
branches/soc-2013-cycles_mblur/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
branches/soc-2013-cycles_mblur/source/blender/freestyle/intern/stroke/ContextFunctions.h
branches/soc-2013-cycles_mblur/source/blender/python/intern/bpy_rna_array.c
branches/soc-2013-cycles_mblur/source/blender/render/intern/source/pipeline.c
Property Changed:
----------------
branches/soc-2013-cycles_mblur/
branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface.c
Property changes on: branches/soc-2013-cycles_mblur
___________________________________________________________________
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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-58051
+ /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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-58066
Modified: branches/soc-2013-cycles_mblur/intern/cycles/CMakeLists.txt
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/CMakeLists.txt 2013-07-08 01:28:43 UTC (rev 58066)
+++ branches/soc-2013-cycles_mblur/intern/cycles/CMakeLists.txt 2013-07-08 05:27:50 UTC (rev 58067)
@@ -25,6 +25,10 @@
set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2 -mfpmath=sse")
set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3 -mfpmath=sse")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2")
+ set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
endif()
# for OSL
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-07-08 01:28:43 UTC (rev 58066)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-07-08 05:27:50 UTC (rev 58067)
@@ -334,7 +334,7 @@
}
if (b_dupli_ob) {
- object->dupli_generated = get_float3(b_dupli_ob.orco());
+ object->dupli_generated = 0.5f*get_float3(b_dupli_ob.orco()) - make_float3(0.5f, 0.5f, 0.5f);
object->dupli_uv = get_float2(b_dupli_ob.uv());
}
else {
Modified: branches/soc-2013-cycles_mblur/release/scripts/freestyle/style_modules/parameter_editor.py
===================================================================
--- branches/soc-2013-cycles_mblur/release/scripts/freestyle/style_modules/parameter_editor.py 2013-07-08 01:28:43 UTC (rev 58066)
+++ branches/soc-2013-cycles_mblur/release/scripts/freestyle/style_modules/parameter_editor.py 2013-07-08 05:27:50 UTC (rev 58067)
@@ -32,7 +32,7 @@
FalseBP1D, FalseUP1D, GuidingLinesShader, Interface0DIterator, Nature, Noise, Normal2DF0D, Operators, \
PolygonalizationShader, QuantitativeInvisibilityF1D, QuantitativeInvisibilityUP1D, SamplingShader, \
SpatialNoiseShader, StrokeAttribute, StrokeShader, TipRemoverShader, TrueBP1D, TrueUP1D, UnaryPredicate0D, \
- UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D
+ UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D, ContextFunctions
from Functions0D import CurveMaterialF0D
from PredicatesU1D import pyNatureUP1D
from logical_operators import AndUP1D, NotUP1D, OrUP1D
@@ -1046,17 +1046,7 @@
selection_criteria.append(upred)
# prepare selection criteria by image border
if lineset.select_by_image_border:
- fac = scene.render.resolution_percentage / 100.0
- w = scene.render.resolution_x * fac
- h = scene.render.resolution_y * fac
- if scene.render.use_border:
- xmin = scene.render.border_min_x * w
- xmax = scene.render.border_max_x * w
- ymin = scene.render.border_min_y * h
- ymax = scene.render.border_max_y * h
- else:
- xmin, xmax = 0.0, float(w)
- ymin, ymax = 0.0, float(h)
+ xmin, ymin, xmax, ymax = ContextFunctions.get_border()
upred = WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax)
selection_criteria.append(upred)
# select feature edges
Modified: branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_utils.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_utils.c 2013-07-08 01:28:43 UTC (rev 58066)
+++ branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_utils.c 2013-07-08 05:27:50 UTC (rev 58067)
@@ -282,125 +282,121 @@
#define FACE_VIS 1
#define FACE_FLAG 2
-// #define FACE_MARK 4 /* UNUSED */
#define FACE_FLIP 8
-/* NOTE: these are the original recalc_face_normals comment in editmesh_mods.c,
- * copied here for reference. */
-
-/* based at a select-connected to witness loose objects */
-
-/* count per edge the amount of faces
- * find the ultimate left, front, upper face (not manhattan dist!!)
- * also evaluate both triangle cases in quad, since these can be non-flat
- *
+/*
* put normal to the outside, and set the first direction flags in edges
*
* then check the object, and set directions / direction-flags: but only for edges with 1 or 2 faces
* this is in fact the 'select connected'
*
- * in case (selected) faces were not done: start over with 'find the ultimate ...' */
+ * in case all faces were not done: start over with 'find the ultimate ...' */
-/* NOTE: this function uses recursion, which is a little unusual for a bmop
- * function, but acceptable I think. */
-
/* NOTE: BM_ELEM_TAG is used on faces to tell if they are flipped. */
void bmo_recalc_face_normals_exec(BMesh *bm, BMOperator *op)
{
- BMIter liter, liter2;
- BMOIter siter;
- BMFace *f, *startf;
BMFace **fstack;
STACK_DECLARE(fstack);
- BMLoop *l, *l2;
- float maxx, maxx_test, cent[3];
- const bool use_flip = BMO_slot_bool_get(op->slots_in, "use_face_tag");
-
- startf = NULL;
- maxx = -1.0e10;
+ const bool use_face_tag = BMO_slot_bool_get(op->slots_in, "use_face_tag");
+ const unsigned int tot_faces = BMO_slot_buffer_count(op->slots_in, "faces");
+ unsigned int tot_touch = 0;
BMO_slot_buffer_flag_enable(bm, op->slots_in, "faces", BM_FACE, FACE_FLAG);
- /* find a starting face */
- BMO_ITER (f, &siter, op->slots_in, "faces", BM_FACE) {
+ fstack = MEM_mallocN(sizeof(*fstack) * tot_faces, __func__);
- /* clear dirty flag */
- BM_elem_flag_disable(f, BM_ELEM_TAG);
+ while (tot_touch != tot_faces) {
+ BMOIter siter;
+ float f_len_best = -FLT_MAX;
+ BMFace *f, *f_start = NULL;
+ float f_start_cent[3];
- if (BMO_elem_flag_test(bm, f, FACE_VIS))
- continue;
+ /* find a starting face */
+ BMO_ITER (f, &siter, op->slots_in, "faces", BM_FACE) {
+ float f_cent[3];
+ float f_len_test;
- if (!startf) startf = f;
+ /* clear dirty flag */
+ BM_elem_flag_disable(f, BM_ELEM_TAG);
- BM_face_calc_center_bounds(f, cent);
+ if (BMO_elem_flag_test(bm, f, FACE_VIS))
+ continue;
- if ((maxx_test = dot_v3v3(cent, cent)) > maxx) {
- maxx = maxx_test;
- startf = f;
+ if (!f_start) f_start = f;
+
+ BM_face_calc_center_bounds(f, f_cent);
+
+ if ((f_len_test = len_squared_v3(f_cent)) > f_len_best) {
+ f_len_best = f_len_test;
+ f_start = f;
+ copy_v3_v3(f_start_cent, f_cent);
+ }
}
- }
- if (!startf) return;
+ /* check sanity (while loop ensures) */
+ BLI_assert(f_start != NULL);
- BM_face_calc_center_bounds(startf, cent);
+ /* make sure the starting face has the correct winding */
+ if (dot_v3v3(f_start_cent, f_start->no) < 0.0f) {
+ BM_face_normal_flip(bm, f_start);
+ BMO_elem_flag_toggle(bm, f_start, FACE_FLIP);
- /* make sure the starting face has the correct winding */
- if (dot_v3v3(cent, startf->no) < 0.0f) {
- BM_face_normal_flip(bm, startf);
- BMO_elem_flag_toggle(bm, startf, FACE_FLIP);
+ if (use_face_tag) {
+ BM_elem_flag_toggle(f_start, BM_ELEM_TAG);
+ }
+ }
- if (use_flip)
- BM_elem_flag_toggle(startf, BM_ELEM_TAG);
- }
-
- /* now that we've found our starting face, make all connected faces
- * have the same winding. this is done recursively, using a manual
- * stack (if we use simple function recursion, we'd end up overloading
- * the stack on large meshes). */
- fstack = MEM_mallocN(sizeof(*fstack) * BMO_slot_buffer_count(op->slots_in, "faces"), __func__);
- STACK_INIT(fstack);
- STACK_PUSH(fstack, startf);
- BMO_elem_flag_enable(bm, startf, FACE_VIS);
+ /* now that we've found our starting face, make all connected faces
+ * have the same winding. this is done recursively, using a manual
+ * stack (if we use simple function recursion, we'd end up overloading
+ * the stack on large meshes). */
+ STACK_INIT(fstack);
- while ((f = STACK_POP(fstack))) {
- BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
- BM_ITER_ELEM (l2, &liter2, l, BM_LOOPS_OF_LOOP) {
- if (!BMO_elem_flag_test(bm, l2->f, FACE_FLAG) || l2 == l)
+ STACK_PUSH(fstack, f_start);
+ BMO_elem_flag_enable(bm, f_start, FACE_VIS);
+ tot_touch++;
+
+ while ((f = STACK_POP(fstack))) {
+ BMIter liter;
+ BMLoop *l;
+
+ BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
+ BMLoop *l_other = l->radial_next;
+
+ if ((l_other == l) || l_other->radial_next != l) {
continue;
+ }
- if (!BMO_elem_flag_test(bm, l2->f, FACE_VIS)) {
- BMO_elem_flag_enable(bm, l2->f, FACE_VIS);
+ if (BMO_elem_flag_test(bm, l_other->f, FACE_FLAG)) {
+ if (!BMO_elem_flag_test(bm, l_other->f, FACE_VIS)) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list