[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50133] branches/soc-2011-tomato: Merging r50119 through r50132 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Wed Aug 22 19:23:02 CEST 2012
Revision: 50133
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50133
Author: nazgul
Date: 2012-08-22 17:23:02 +0000 (Wed, 22 Aug 2012)
Log Message:
-----------
Merging r50119 through r50132 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50119
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50132
Modified Paths:
--------------
branches/soc-2011-tomato/doc/python_api/rst/info_gotcha.rst
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_connect.c
branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_utils.c
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/render/render_preview.c
branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_ops.c
branches/soc-2011-tomato/source/blender/editors/space_logic/space_logic.c
branches/soc-2011-tomato/source/blender/editors/space_node/drawnode.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_add.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_draw.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_relationships.c
branches/soc-2011-tomato/source/blender/editors/transform/transform.c
branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_ops.c
branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2011-tomato/source/blender/python/bmesh/bmesh_py_types.c
branches/soc-2011-tomato/source/blender/python/intern/bpy_operator.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-50118
+ /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-50132
Modified: branches/soc-2011-tomato/doc/python_api/rst/info_gotcha.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/info_gotcha.rst 2012-08-22 17:22:04 UTC (rev 50132)
+++ branches/soc-2011-tomato/doc/python_api/rst/info_gotcha.rst 2012-08-22 17:23:02 UTC (rev 50133)
@@ -137,11 +137,11 @@
NGons and Tessellation Faces
============================
-Since 2.63 NGons are supported, this adds some complexity since in some cases you need to access triangles still (some exporters for example).
+Since 2.63 NGons are supported, this adds some complexity since in some cases you need to access triangles/quads still (some exporters for example).
There are now 3 ways to access faces:
-* :class:`bpy.types.MeshPolygon` - this is the data stricture which now stores faces in object mode (access as ``mesh.polygons`` rather then ``mesh.faces``).
+* :class:`bpy.types.MeshPolygon` - this is the data structure which now stores faces in object mode (access as ``mesh.polygons`` rather then ``mesh.faces``).
* :class:`bpy.types.MeshTessFace` - the result of triangulating (tessellated) polygons, the main method of face access in 2.62 or older (access as ``mesh.tessfaces``).
* :class:`bmesh.types.BMFace` - the polygons as used in editmode.
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-08-22 17:22:04 UTC (rev 50132)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-08-22 17:23:02 UTC (rev 50133)
@@ -1182,7 +1182,7 @@
layout = self.layout
layout.operator_context = 'EXEC_AREA'
layout.operator("object.hook_add_newob")
- layout.operator("object.hook_add_selob")
+ layout.operator("object.hook_add_selob").use_bone = False
layout.operator("object.hook_add_selob", text="Hook to Selected Object Bone").use_bone = True
if [mod.type == 'HOOK' for mod in context.active_object.modifiers]:
Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h 2012-08-22 17:22:04 UTC (rev 50132)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h 2012-08-22 17:23:02 UTC (rev 50133)
@@ -48,6 +48,7 @@
void init_def_material(void);
void BKE_material_free(struct Material *sc);
+void BKE_material_free_ex(struct Material *ma, int do_id_user);
void test_object_materials(struct ID *id);
void resize_object_material(struct Object *ob, const short totcol);
void init_material(struct Material *ma);
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c 2012-08-22 17:22:04 UTC (rev 50132)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c 2012-08-22 17:23:02 UTC (rev 50133)
@@ -80,12 +80,18 @@
/* not material itself */
void BKE_material_free(Material *ma)
{
+ BKE_material_free_ex(ma, TRUE);
+}
+
+/* not material itself */
+void BKE_material_free_ex(Material *ma, int do_id_user)
+{
MTex *mtex;
int a;
for (a = 0; a < MAX_MTEX; a++) {
mtex = ma->mtex[a];
- if (mtex && mtex->tex) mtex->tex->id.us--;
+ if (do_id_user && mtex && mtex->tex) mtex->tex->id.us--;
if (mtex) MEM_freeN(mtex);
}
@@ -101,7 +107,7 @@
/* is no lib link block, but material extension */
if (ma->nodetree) {
- ntreeFreeTree(ma->nodetree);
+ ntreeFreeTree_ex(ma->nodetree, do_id_user);
MEM_freeN(ma->nodetree);
}
Modified: branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_connect.c
===================================================================
--- branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_connect.c 2012-08-22 17:22:04 UTC (rev 50132)
+++ branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_connect.c 2012-08-22 17:23:02 UTC (rev 50133)
@@ -370,39 +370,36 @@
}
}
- /* Find the shortest distance from a vert in vv1 to vv2[0]. Use that
- * vertex in vv1 as a starting point in the first loop, while starting
- * from vv2[0] in the second loop. This is a simplistic attempt to get
- * a better edge-to-edge match between the two loops. */
+ /* Find the smallest sum of distances from verts in vv1 to verts in vv2,
+ * finding a starting point in the first loop, to start with vv2[0] in the
+ * second loop. This is a simplistic attempt to get a better edge-to-edge
+ * match between two loops. */
if (cl1) {
- int previ, nexti;
float min = 1e32;
- /* BMESH_TODO: Would be nice to do a more thorough analysis of all
- * the vertices in both loops to find a more accurate match for the
- * starting point and winding direction of the bridge generation. */
-
- for (i = 0; i < BLI_array_count(vv1); i++) {
- if (len_v3v3(vv1[i]->co, vv2[0]->co) < min) {
- min = len_v3v3(vv1[i]->co, vv2[0]->co);
+ for (i = 0; i < lenv1; i++) {
+ float len;
+
+ /* compute summed length between vertices in forward direction */
+ len = 0.0f;
+ for (j = 0; j < lenv2; j++)
+ len += len_v3v3(vv1[clamp_index(i+j, lenv1)]->co, vv2[j]->co);
+
+ if (len < min) {
+ min = len;
starti = i;
}
- }
- /* Reverse iteration order for the first loop if the distance of
- * the (starti - 1) vert from vv1 is a better match for vv2[1] than
- * the (starti + 1) vert.
- *
- * This is not always going to be right, but it will work better in
- * the average case.
- */
- previ = clamp_index(starti - 1, lenv1);
- nexti = clamp_index(starti + 1, lenv1);
+ /* compute summed length between vertices in backward direction */
+ len = 0.0f;
+ for (j = 0; j < lenv2; j++)
+ len += len_v3v3(vv1[clamp_index(i-j, lenv1)]->co, vv2[j]->co);
- /* avoid sqrt for comparison */
- if (len_squared_v3v3(vv1[nexti]->co, vv2[1]->co) > len_squared_v3v3(vv1[previ]->co, vv2[1]->co)) {
- /* reverse direction for reading vv1 (1 is forward, -1 is backward) */
- dir1 = -1;
+ if (len < min) {
+ min = len;
+ starti = i;
+ dir1 = -1;
+ }
}
}
Modified: branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_utils.c
===================================================================
--- branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_utils.c 2012-08-22 17:22:04 UTC (rev 50132)
+++ branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_utils.c 2012-08-22 17:23:02 UTC (rev 50133)
@@ -182,14 +182,17 @@
if (!usefaces) {
BMO_ITER (v, &siter, bm, op, "geom", BM_VERT) {
BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) {
- if (!BMO_elem_flag_test(bm, e, SEL_ORIG))
- break;
+ if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN))
+ if (!BMO_elem_flag_test(bm, e, SEL_ORIG))
+ break;
}
if (e) {
BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) {
- BMO_elem_flag_enable(bm, e, SEL_FLAG);
- BMO_elem_flag_enable(bm, BM_edge_other_vert(e, v), SEL_FLAG);
+ if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
+ BMO_elem_flag_enable(bm, e, SEL_FLAG);
+ BMO_elem_flag_enable(bm, BM_edge_other_vert(e, v), SEL_FLAG);
+ }
}
}
}
@@ -202,8 +205,10 @@
BMO_ITER (f, &siter, bm, op, "geom", BM_FACE) {
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
BM_ITER_ELEM (f2, &fiter, l->e, BM_FACES_OF_EDGE) {
- if (!BMO_elem_flag_test(bm, f2, SEL_ORIG)) {
- BMO_elem_flag_enable(bm, f2, SEL_FLAG);
+ if (!BM_elem_flag_test(f2, BM_ELEM_HIDDEN)) {
+ if (!BMO_elem_flag_test(bm, f2, SEL_ORIG)) {
+ BMO_elem_flag_enable(bm, f2, SEL_FLAG);
+ }
}
}
}
@@ -221,15 +226,18 @@
if (!usefaces) {
BMO_ITER (v, &siter, bm, op, "geom", BM_VERT) {
BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) {
- if (!BMO_elem_flag_test(bm, e, SEL_ORIG))
- break;
+ if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN))
+ if (!BMO_elem_flag_test(bm, e, SEL_ORIG))
+ break;
}
if (e) {
BMO_elem_flag_enable(bm, v, SEL_FLAG);
BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) {
- BMO_elem_flag_enable(bm, e, SEL_FLAG);
+ if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
+ BMO_elem_flag_enable(bm, e, SEL_FLAG);
+ }
}
}
@@ -243,9 +251,11 @@
BMO_ITER (f, &siter, bm, op, "geom", BM_FACE) {
BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
BM_ITER_ELEM (f2, &fiter, l->e, BM_FACES_OF_EDGE) {
- if (!BMO_elem_flag_test(bm, f2, SEL_ORIG)) {
- BMO_elem_flag_enable(bm, f, SEL_FLAG);
- break;
+ if (!BM_elem_flag_test(f2, BM_ELEM_HIDDEN)) {
+ if (!BMO_elem_flag_test(bm, f2, SEL_ORIG)) {
+ BMO_elem_flag_enable(bm, f, SEL_FLAG);
+ break;
+ }
}
}
}
Modified: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/interface/interface.c 2012-08-22 17:22:04 UTC (rev 50132)
+++ branches/soc-2011-tomato/source/blender/editors/interface/interface.c 2012-08-22 17:23:02 UTC (rev 50133)
@@ -3814,7 +3814,9 @@
if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
buf, sizeof(buf)))
+ {
tmp = BLI_strdup(buf);
+ }
}
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list