[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52359] trunk/blender/source/blender: use input and output slots for bmesh operators, needed for the python api to get return values.
Campbell Barton
ideasman42 at gmail.com
Mon Nov 19 15:58:32 CET 2012
Revision: 52359
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52359
Author: campbellbarton
Date: 2012-11-19 14:58:31 +0000 (Mon, 19 Nov 2012)
Log Message:
-----------
use input and output slots for bmesh operators, needed for the python api to get return values.
Modified Paths:
--------------
trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c
trunk/blender/source/blender/bmesh/intern/bmesh_operator_api.h
trunk/blender/source/blender/bmesh/intern/bmesh_operator_api_inline.h
trunk/blender/source/blender/bmesh/intern/bmesh_operators.c
trunk/blender/source/blender/bmesh/operators/bmo_bevel.c
trunk/blender/source/blender/bmesh/operators/bmo_connect.c
trunk/blender/source/blender/bmesh/operators/bmo_create.c
trunk/blender/source/blender/bmesh/operators/bmo_dissolve.c
trunk/blender/source/blender/bmesh/operators/bmo_dupe.c
trunk/blender/source/blender/bmesh/operators/bmo_edgesplit.c
trunk/blender/source/blender/bmesh/operators/bmo_extrude.c
trunk/blender/source/blender/bmesh/operators/bmo_hull.c
trunk/blender/source/blender/bmesh/operators/bmo_inset.c
trunk/blender/source/blender/bmesh/operators/bmo_join_triangles.c
trunk/blender/source/blender/bmesh/operators/bmo_mesh_conv.c
trunk/blender/source/blender/bmesh/operators/bmo_mirror.c
trunk/blender/source/blender/bmesh/operators/bmo_primitive.c
trunk/blender/source/blender/bmesh/operators/bmo_removedoubles.c
trunk/blender/source/blender/bmesh/operators/bmo_similar.c
trunk/blender/source/blender/bmesh/operators/bmo_slide.c
trunk/blender/source/blender/bmesh/operators/bmo_smooth_laplacian.c
trunk/blender/source/blender/bmesh/operators/bmo_subdivide.c
trunk/blender/source/blender/bmesh/operators/bmo_symmetrize.c
trunk/blender/source/blender/bmesh/operators/bmo_triangulate.c
trunk/blender/source/blender/bmesh/operators/bmo_unsubdivide.c
trunk/blender/source/blender/bmesh/operators/bmo_utils.c
trunk/blender/source/blender/bmesh/operators/bmo_wireframe.c
trunk/blender/source/blender/editors/mesh/editmesh_select.c
trunk/blender/source/blender/editors/mesh/editmesh_slide.c
trunk/blender/source/blender/editors/mesh/editmesh_tools.c
trunk/blender/source/blender/editors/mesh/editmesh_utils.c
trunk/blender/source/blender/modifiers/intern/MOD_array.c
trunk/blender/source/blender/modifiers/intern/MOD_skin.c
trunk/blender/source/blender/python/bmesh/bmesh_py_ops.c
Modified: trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c 2012-11-19 14:54:35 UTC (rev 52358)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c 2012-11-19 14:58:31 UTC (rev 52359)
@@ -109,6 +109,7 @@
{BMO_OP_SLOT_BOOL, "use_axis_z"}, /* smooth vertices along Z axis */
{0} /* null-terminating sentinel */,
},
+ {{0}}, /* no output */
bmo_smooth_vert_exec,
0
};
@@ -129,6 +130,7 @@
{BMO_OP_SLOT_BOOL, "volume_preservation"}, //Apply volume preservation after smooth
{0} /* null-terminating sentinel */,
},
+ {{0}}, /* no output */
bmo_smooth_laplacian_vert_exec,
0
};
@@ -145,6 +147,7 @@
{BMO_OP_SLOT_BOOL, "do_flip"}, /* internal flag, used by bmesh_rationalize_normals */
{0} /* null-terminating sentinel */,
},
+ {{0}}, /* no output */
bmo_recalc_face_normals_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -162,11 +165,13 @@
static BMOpDefine bmo_region_extend_def = {
"region_extend",
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, /* input geometry */
- {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* output slot, computed boundary geometry. */
{BMO_OP_SLOT_BOOL, "constrict"}, /* find boundary inside the regions, not outside. */
{BMO_OP_SLOT_BOOL, "use_faces"}, /* extend from faces instead of edges */
{0} /* null-terminating sentinel */,
},
+ {{BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* output slot, computed boundary geometry. */
+ {0} /* null-terminating sentinel */,
+ },
bmo_region_extend_exec,
0
};
@@ -180,10 +185,12 @@
static BMOpDefine bmo_rotate_edges_def = {
"rotate_edges",
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */
- {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* newly spun edges */
{BMO_OP_SLOT_BOOL, "ccw"}, /* rotate edge counter-clockwise if true, othewise clockwise */
{0} /* null-terminating sentinel */,
},
+ {{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* newly spun edges */
+ {0} /* null-terminating sentinel */,
+ },
bmo_rotate_edges_exec,
BMO_OP_FLAG_UNTAN_MULTIRES
};
@@ -199,6 +206,7 @@
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
{0} /* null-terminating sentinel */,
},
+ {{0}}, /* no output */
bmo_reverse_faces_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -213,9 +221,11 @@
"bisect_edges",
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */
{BMO_OP_SLOT_INT, "numcuts"}, /* number of cuts */
- {BMO_OP_SLOT_ELEMENT_BUF, "outsplit"}, /* newly created vertices and edges */
{0} /* null-terminating sentinel */,
},
+ {{BMO_OP_SLOT_ELEMENT_BUF, "splitout"}, /* newly created vertices and edges */
+ {0} /* null-terminating sentinel */,
+ },
bmo_bisect_edges_exec,
BMO_OP_FLAG_UNTAN_MULTIRES
};
@@ -233,11 +243,14 @@
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, /* input geometry */
{BMO_OP_SLOT_MAT, "mat"}, /* matrix defining the mirror transformation */
{BMO_OP_SLOT_FLT, "mergedist"}, /* maximum distance for merging. does no merging if 0. */
- {BMO_OP_SLOT_ELEMENT_BUF, "newout"}, /* output geometry, mirrored */
{BMO_OP_SLOT_INT, "axis"}, /* the axis to use, 0, 1, or 2 for x, y, z */
{BMO_OP_SLOT_BOOL, "mirror_u"}, /* mirror UVs across the u axis */
{BMO_OP_SLOT_BOOL, "mirror_v"}, /* mirror UVs across the v axis */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_ELEMENT_BUF, "newout"}, /* output geometry, mirrored */
+ {0} /* null-terminating sentinel */,
+ },
bmo_mirror_exec,
0,
};
@@ -256,8 +269,11 @@
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertices */
{BMO_OP_SLOT_ELEMENT_BUF, "keep_verts"}, /* list of verts to keep */
{BMO_OP_SLOT_FLT, "dist"}, /* minimum distance */
- {BMO_OP_SLOT_MAPPING, "targetmapout"},
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_MAPPING, "targetmapout"},
+ {0} /* null-terminating sentinel */,
+ },
bmo_find_doubles_exec,
0,
};
@@ -272,7 +288,9 @@
"remove_doubles",
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input verts */
{BMO_OP_SLOT_FLT, "dist"}, /* minimum distance */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_remove_doubles_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -288,7 +306,9 @@
"automerge",
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input verts */
{BMO_OP_SLOT_FLT, "dist"}, /* minimum distance */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_automerge_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -301,7 +321,9 @@
static BMOpDefine bmo_collapse_def = {
"collapse",
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_collapse_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -316,7 +338,9 @@
"pointmerge_facedata",
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
{BMO_OP_SLOT_ELEMENT_BUF, "snapv"}, /* snap verte */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_pointmerge_facedata_exec,
0,
};
@@ -331,7 +355,9 @@
static BMOpDefine bmo_average_vert_facedata_def = {
"average_vert_facedata",
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_average_vert_facedata_exec,
0,
};
@@ -345,7 +371,9 @@
"pointmerge",
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
{BMO_OP_SLOT_VEC, "merge_co"},
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_pointmerge_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -358,7 +386,9 @@
static BMOpDefine bmo_collapse_uvs_def = {
"collapse_uvs",
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_collapse_uvs_exec,
0,
};
@@ -373,7 +403,9 @@
static BMOpDefine bmo_weld_verts_def = {
"weld_verts",
{{BMO_OP_SLOT_MAPPING, "targetmap"}, /* maps welded vertices to verts they should weld to */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{0}}, /* no output */
bmo_weld_verts_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -387,8 +419,11 @@
static BMOpDefine bmo_create_vert_def = {
"create_vert",
{{BMO_OP_SLOT_VEC, "co"}, /* the coordinate of the new vert */
- {BMO_OP_SLOT_ELEMENT_BUF, "newvertout"}, /* the new vert */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_ELEMENT_BUF, "newvertout"}, /* the new vert */
+ {0} /* null-terminating sentinel */,
+ },
bmo_create_vert_exec,
0,
};
@@ -402,13 +437,16 @@
static BMOpDefine bmo_join_triangles_def = {
"join_triangles",
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input geometry. */
- {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* joined faces */
{BMO_OP_SLOT_BOOL, "cmp_sharp"},
{BMO_OP_SLOT_BOOL, "cmp_uvs"},
{BMO_OP_SLOT_BOOL, "cmp_vcols"},
{BMO_OP_SLOT_BOOL, "cmp_materials"},
{BMO_OP_SLOT_FLT, "limit"},
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* joined faces */
+ {0} /* null-terminating sentinel */,
+ },
bmo_join_triangles_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -427,12 +465,15 @@
static BMOpDefine bmo_contextual_create_def = {
"contextual_create",
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, /* input geometry. */
- {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* newly-made face(s) */
+ {BMO_OP_SLOT_INT, "mat_nr"}, /* material to use */
+ {BMO_OP_SLOT_BOOL, "use_smooth"}, /* smooth to use */
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* newly-made face(s) */
/* note, this is for stand-alone edges only, not edges which are apart of newly created faces */
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* newly-made edge(s) */
- {BMO_OP_SLOT_INT, "mat_nr"}, /* material to use */
- {BMO_OP_SLOT_BOOL, "use_smooth"}, /* material to use */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
bmo_contextual_create_exec,
BMO_OP_FLAG_UNTAN_MULTIRES,
};
@@ -443,10 +484,13 @@
static BMOpDefine bmo_bridge_loops_def = {
"bridge_loops",
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
- {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */
{BMO_OP_SLOT_BOOL, "use_merge"},
{BMO_OP_SLOT_FLT, "merge_factor"},
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new faces */
+ {0} /* null-terminating sentinel */,
+ },
bmo_bridge_loops_exec,
0,
};
@@ -458,11 +502,14 @@
{BMO_OP_SLOT_BOOL, "use_restrict"},
{BMO_OP_SLOT_BOOL, "use_fill_check"},
{BMO_OP_SLOT_ELEMENT_BUF, "excludefaces"}, /* list of faces to ignore for manifold check */
- {BMO_OP_SLOT_MAPPING, "faceout_groupmap"}, /* maps new faces to the group numbers they came fro */
- {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */
{BMO_OP_SLOT_INT, "mat_nr"}, /* material to use */
{BMO_OP_SLOT_BOOL, "use_smooth"}, /* material to use */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_MAPPING, "face_groupmap_out"}, /* maps new faces to the group numbers they came fro */
+ {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */
+ {0} /* null-terminating sentinel */,
+ },
bmo_edgenet_fill_exec,
0,
};
@@ -480,8 +527,11 @@
static BMOpDefine bmo_edgenet_prepare_def = {
"edgenet_prepare",
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */
- {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* new edges */
- {0, /* null-terminating sentinel */}},
+ {0} /* null-terminating sentinel */,
+ },
+ {{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* new edges */
+ {0} /* null-terminating sentinel */,
+ },
bmo_edgenet_prepare,
0,
};
@@ -497,7 +547,9 @@
{{BMO_OP_SLOT_VEC, "cent"}, /* center of rotation */
{BMO_OP_SLOT_MAT, "mat"}, /* matrix defining rotation */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list