[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45329] branches/asset-browser: merge from trunk: rev.

Andrea Weikert elubie at gmx.net
Mon Apr 2 08:14:43 CEST 2012


Revision: 45329
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45329
Author:   elubie
Date:     2012-04-02 06:14:27 +0000 (Mon, 02 Apr 2012)
Log Message:
-----------
merge from trunk: rev. 45322-45326

Modified Paths:
--------------
    branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.c
    branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.h
    branches/asset-browser/source/blender/bmesh/operators/bmo_dupe.c
    branches/asset-browser/source/blender/bmesh/operators/bmo_extrude.c
    branches/asset-browser/source/blender/bmesh/operators/bmo_inset.c
    branches/asset-browser/source/blender/bmesh/operators/bmo_subdivide.c
    branches/asset-browser/source/blender/editors/animation/anim_filter.c
    branches/asset-browser/source/blender/editors/mesh/editmesh_tools.c
    branches/asset-browser/source/blender/editors/mesh/editmesh_utils.c
    branches/asset-browser/source/blender/editors/space_graph/graph_draw.c
    branches/asset-browser/source/blender/editors/space_view3d/view3d_fly.c
    branches/asset-browser/source/blender/editors/transform/transform_conversions.c
    branches/asset-browser/source/blender/editors/transform/transform_manipulator.c
    branches/asset-browser/source/blender/editors/transform/transform_orientations.c
    branches/asset-browser/source/blender/imbuf/intern/anim_movie.c
    branches/asset-browser/source/blender/makesrna/intern/makesrna.c
    branches/asset-browser/source/blender/makesrna/intern/rna_test.c
    branches/asset-browser/source/blender/modifiers/intern/MOD_array.c
    branches/asset-browser/source/blender/modifiers/intern/MOD_explode.c
    branches/asset-browser/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
    branches/asset-browser/source/blender/render/intern/source/convertblender.c
    branches/asset-browser/source/blender/render/intern/source/volumetric.c

Property Changed:
----------------
    branches/asset-browser/
    branches/asset-browser/source/blender/editors/space_outliner/


Property changes on: branches/asset-browser
___________________________________________________________________
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/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
/trunk/blender:43077-44985,44987-45321
   + /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
/trunk/blender:43077-44985,44987-45326

Modified: branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.c
===================================================================
--- branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.c	2012-04-02 06:07:07 UTC (rev 45328)
+++ branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.c	2012-04-02 06:14:27 UTC (rev 45329)
@@ -762,7 +762,7 @@
 	}
 }
 
-void BM_mesh_elem_flag_disable_all(BMesh *bm, const char htype, const char hflag)
+void BM_mesh_elem_flag_disable_all(BMesh *bm, const char htype, const char hflag, int respecthide)
 {
 	const char iter_types[3] = {BM_VERTS_OF_MESH,
 	                            BM_EDGES_OF_MESH,
@@ -778,7 +778,10 @@
 		BM_select_history_clear(bm);
 	}
 
-	if (htype == (BM_VERT | BM_EDGE | BM_FACE) && (hflag == BM_ELEM_SELECT)) {
+	if ((htype == (BM_VERT | BM_EDGE | BM_FACE)) &&
+	    (hflag == BM_ELEM_SELECT) &&
+	    (respecthide == FALSE))
+	{
 		/* fast path for deselect all, avoid topology loops
 		 * since we know all will be de-selected anyway. */
 		for (i = 0; i < 3; i++) {
@@ -794,6 +797,11 @@
 			if (htype & flag_types[i]) {
 				ele = BM_iter_new(&iter, bm, iter_types[i], NULL);
 				for ( ; ele; ele = BM_iter_step(&iter)) {
+
+					if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) {
+						continue;
+					}
+
 					if (hflag & BM_ELEM_SELECT) {
 						BM_elem_select_set(bm, ele, FALSE);
 					}
@@ -804,7 +812,7 @@
 	}
 }
 
-void BM_mesh_elem_flag_enable_all(BMesh *bm, const char htype, const char hflag)
+void BM_mesh_elem_flag_enable_all(BMesh *bm, const char htype, const char hflag, int respecthide)
 {
 	const char iter_types[3] = {BM_VERTS_OF_MESH,
 	                            BM_EDGES_OF_MESH,
@@ -812,6 +820,11 @@
 
 	const char flag_types[3] = {BM_VERT, BM_EDGE, BM_FACE};
 
+	/* use the nosel version when setting so under no
+	 * condition may a hidden face become selected.
+	 * Applying other flags to hidden faces is OK. */
+	const char hflag_nosel = hflag & ~BM_ELEM_SELECT;
+
 	BMIter iter;
 	BMElem *ele;
 	int i;
@@ -828,10 +841,15 @@
 		if (htype & flag_types[i]) {
 			ele = BM_iter_new(&iter, bm, iter_types[i], NULL);
 			for ( ; ele; ele = BM_iter_step(&iter)) {
+
+				if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) {
+					continue;
+				}
+
 				if (hflag & BM_ELEM_SELECT) {
 					BM_elem_select_set(bm, ele, TRUE);
 				}
-				BM_elem_flag_enable(ele, hflag);
+				BM_elem_flag_enable(ele, hflag_nosel);
 			}
 		}
 	}

Modified: branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.h
===================================================================
--- branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.h	2012-04-02 06:07:07 UTC (rev 45328)
+++ branches/asset-browser/source/blender/bmesh/intern/bmesh_marking.h	2012-04-02 06:14:27 UTC (rev 45329)
@@ -45,8 +45,8 @@
 #define BM_elem_select_set(bm, ele, hide) _bm_elem_select_set(bm, &(ele)->head, hide)
 void _bm_elem_select_set(BMesh *bm, BMHeader *ele, int select);
 
-void BM_mesh_elem_flag_enable_all(BMesh *bm, const char htype, const char hflag);
-void BM_mesh_elem_flag_disable_all(BMesh *bm, const char htype, const char hflag);
+void BM_mesh_elem_flag_enable_all(BMesh *bm, const char htype, const char hflag, int respecthide);
+void BM_mesh_elem_flag_disable_all(BMesh *bm, const char htype, const char hflag, int respecthide);
 
 /* individual element select functions, BM_elem_select_set is a shortcut for these
  * that automatically detects which one to use*/

Modified: branches/asset-browser/source/blender/bmesh/operators/bmo_dupe.c
===================================================================
--- branches/asset-browser/source/blender/bmesh/operators/bmo_dupe.c	2012-04-02 06:07:07 UTC (rev 45328)
+++ branches/asset-browser/source/blender/bmesh/operators/bmo_dupe.c	2012-04-02 06:14:27 UTC (rev 45329)
@@ -29,23 +29,22 @@
 #include "bmesh.h"
 
 /* local flag define */
-#define DUPE_INPUT		1 /* input from operator */
-#define DUPE_NEW		2
-#define DUPE_DONE		4
-#define DUPE_MAPPED		8
+#define DUPE_INPUT      1 /* input from operator */
+#define DUPE_NEW        2
+#define DUPE_DONE       4
+#define DUPE_MAPPED     8
 
-/*
- *  COPY VERTEX
+/**
+ * COPY VERTEX
  *
- *   Copy an existing vertex from one bmesh to another.
- *
+ * Copy an existing vertex from one bmesh to another.
  */
 static BMVert *copy_vertex(BMesh *source_mesh, BMVert *source_vertex, BMesh *target_mesh, GHash *vhash)
 {
 	BMVert *target_vertex = NULL;
 
 	/* Create a new vertex */
-	target_vertex = BM_vert_create(target_mesh, source_vertex->co,  NULL);
+	target_vertex = BM_vert_create(target_mesh, source_vertex->co, NULL);
 	
 	/* Insert new vertex into the vert hash */
 	BLI_ghash_insert(vhash, source_vertex, target_vertex);
@@ -59,11 +58,10 @@
 	return target_vertex;
 }
 
-/*
+/**
  * COPY EDGE
  *
  * Copy an existing edge from one bmesh to another.
- *
  */
 static BMEdge *copy_edge(BMOperator *op, BMesh *source_mesh,
                          BMEdge *source_edge, BMesh *target_mesh,
@@ -115,10 +113,10 @@
 	return target_edge;
 }
 
-/*
+/**
  * COPY FACE
  *
- *  Copy an existing face from one bmesh to another.
+ * Copy an existing face from one bmesh to another.
  */
 
 static BMFace *copy_face(BMOperator *op, BMesh *source_mesh,
@@ -151,10 +149,8 @@
 	
 	/* create new face */
 	target_face = BM_face_create(target_mesh, vtar, edar, source_face->len, FALSE);
-	BMO_slot_map_ptr_insert(source_mesh, op,
-	                        "facemap", source_face, target_face);
-	BMO_slot_map_ptr_insert(source_mesh, op,
-	                        "facemap", target_face, source_face);
+	BMO_slot_map_ptr_insert(source_mesh, op, "facemap", source_face, target_face);
+	BMO_slot_map_ptr_insert(source_mesh, op, "facemap", target_face, source_face);
 
 	BM_elem_attrs_copy(source_mesh, target_mesh, source_face, target_face);
 
@@ -174,11 +170,12 @@
 	return target_face;
 }
 
-/*
+/**
  * COPY MESH
  *
  * Internal Copy function.
  */
+
 static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
 {
 
@@ -201,7 +198,7 @@
 	/* duplicate flagged vertices */
 	BM_ITER(v, &viter, source, BM_VERTS_OF_MESH, source) {
 		if (BMO_elem_flag_test(source, v, DUPE_INPUT) &&
-			!BMO_elem_flag_test(source, v, DUPE_DONE))
+		    !BMO_elem_flag_test(source, v, DUPE_DONE))
 		{
 			BMIter iter;
 			int isolated = 1;
@@ -235,7 +232,7 @@
 	/* now we dupe all the edges */
 	BM_ITER(e, &eiter, source, BM_EDGES_OF_MESH, source) {
 		if (BMO_elem_flag_test(source, e, DUPE_INPUT) &&
-			!BMO_elem_flag_test(source, e, DUPE_DONE))
+		    !BMO_elem_flag_test(source, e, DUPE_DONE))
 		{
 			/* make sure that verts are copied */
 			if (!BMO_elem_flag_test(source, e->v1, DUPE_DONE)) {
@@ -247,7 +244,7 @@
 				BMO_elem_flag_enable(source, e->v2, DUPE_DONE);
 			}
 			/* now copy the actual edge */
-			copy_edge(op, source, e, target,  vhash,  ehash);
+			copy_edge(op, source, e, target, vhash, ehash);
 			BMO_elem_flag_enable(source, e, DUPE_DONE);
 		}
 	}
@@ -266,7 +263,7 @@
 			/* edge pass */
 			BM_ITER(e, &eiter, source, BM_EDGES_OF_FACE, f) {
 				if (!BMO_elem_flag_test(source, e, DUPE_DONE)) {
-					copy_edge(op, source, e, target,  vhash,  ehash);
+					copy_edge(op, source, e, target, vhash, ehash);
 					BMO_elem_flag_enable(source, e, DUPE_DONE);
 				}
 			}
@@ -291,7 +288,7 @@
 	BLI_array_free(edar); /* free edge pointer array */
 }
 
-/*
+/**
  * Duplicate Operator
  *
  * Duplicates verts, edges and faces of a mesh.
@@ -310,7 +307,6 @@
  * BMOP_DUPE_VNEW: Buffer containing pointers to the new mesh vertices
  * BMOP_DUPE_ENEW: Buffer containing pointers to the new mesh edges
  * BMOP_DUPE_FNEW: Buffer containing pointers to the new mesh faces
- *
  */
 
 void bmo_dupe_exec(BMesh *bm, BMOperator *op)
@@ -352,7 +348,7 @@
 }
 #endif
 
-/*
+/**
  * Split Operator
  *
  * Duplicates verts, edges and faces of a mesh but also deletes the originals.
@@ -370,7 +366,8 @@
  * BMOP_DUPE_FOUTPUT: Buffer containing pointers to the split mesh faces
  */
 
-#define SPLIT_INPUT	1
+#define SPLIT_INPUT 1
+
 void bmo_split_exec(BMesh *bm, BMOperator *op)
 {
 	BMOperator *splitop = op;
@@ -432,10 +429,8 @@
 
 	/* now we make our outputs by copying the dupe output */
 	BMO_slot_copy(&dupeop, splitop, "newout", "geomout");
-	BMO_slot_copy(&dupeop, splitop, "boundarymap",
-	              "boundarymap");
-	BMO_slot_copy(&dupeop, splitop, "isovertmap",
-	              "isovertmap");
+	BMO_slot_copy(&dupeop, splitop, "boundarymap", "boundarymap");
+	BMO_slot_copy(&dupeop, splitop, "isovertmap", "isovertmap");
 	
 	/* cleanup */
 	BMO_op_finish(bm, &delop);
@@ -457,7 +452,7 @@
 #undef DEL_INPUT
 }
 
-/*
+/**
  * Spin Operator
  *
  * Extrude or duplicate geometry a number of times,

Modified: branches/asset-browser/source/blender/bmesh/operators/bmo_extrude.c
===================================================================
--- branches/asset-browser/source/blender/bmesh/operators/bmo_extrude.c	2012-04-02 06:07:07 UTC (rev 45328)
+++ branches/asset-browser/source/blender/bmesh/operators/bmo_extrude.c	2012-04-02 06:14:27 UTC (rev 45329)
@@ -116,46 +116,46 @@
 static void bm_extrude_copy_face_loop_attributes(BMesh *bm, BMFace *f, BMEdge *e, BMEdge *newedge)
 {
 	BMIter iter;
-	BMLoop *l, *l2;
+	BMLoop *l, *l_other;
 
-	/* copy attribute */
-	l = BM_iter_new(&iter, bm, BM_LOOPS_OF_FACE, f);
-	for ( ; l; l = BM_iter_step(&iter)) {
-
+	/* copy attributes */
+	BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) {
 		if (l->e != e && l->e != newedge) {
 			continue;
 		}
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list