Blender Git Loki

Git Commits -> Revision 2c33a51

Revision 2c33a51 by Joseph Eagar (master)
March 4, 2009, 08:21 (GMT)
Printf-style method of calling operations now take a modified format string,
like so:

[opname] [slotname]=%[format code]

Before it was relying on the input format codes being in the same proper
order as the slots, which seemed like a potential maintainance nightmare to
me. Also the flags for creating buffers from bmop flags or header flags,
now support additional modifiers for combining vert/edge/face inputs.
E.g. %hfvef would accept all geometry with a header flag, and
%fef would accept edges and faces with a certain bmop flag set.

Example from the UI code:

if (!EDBM_CallOpf(em, op, "del geom=%hf context=%d", BM_SELECT, DEL_ONLYFACES))
return OPERATOR_CANCELLED;

(remember EDBM_CallOpf is the UI wrapper for this that does conversion,
error reporting, etc).

On todo is cleaning up/splitting bmesh_operators.h,
since it's kindof a mesh right now. I'm thinking of adding the slot
names in comments next to the slot ids, but I definitely would have to
clean up bmesh_operators.h first, or it'd just be too chaotic for me.
BTW, the operator API should now have enough meta info to wrap with
a scripting language, not that it matters since that's not happening till
much much later.

Also hopefully corrected some SConscripts, fix mostly provided by Elia Sarti,
though I also copied some SConscripts from 2.5 (not sure if doing
so was especially helpful).

Finally, I refactored a few places to use the new operator calling api,
as an example of how this is beneficial.

Commit Details:

Full Hash: 2c33a51e3f8019eb6edfbe23d05b0551984188a3
SVN Revision: 19183
Parent Commit: 1bc67f3
Lines Changed: +517, -114

12 Modified Paths:

/source/blender/bmesh/bmesh_operators.h (+11, -2) (Diff)
/source/blender/bmesh/intern/bmesh_mods.c (+11, -5) (Diff)
/source/blender/bmesh/intern/bmesh_opdefines.c (+30, -27) (Diff)
/source/blender/bmesh/intern/bmesh_operators.c (+100, -41) (Diff)
/source/blender/bmesh/intern/bmesh_polygon.c (+317, -15) (Diff)
/source/blender/bmesh/operators/extrudeops.c (+6, -3) (Diff)
/source/blender/bmesh/operators/subdivideop.c (+7, -11) (Diff)
/source/blender/editors/mesh/bmeshutils.c (+24, -4) (Diff)
/source/blender/editors/mesh/editmesh_tools.c (+3, -2) (Diff)
/source/blender/editors/mesh/mesh_intern.h (+6, -2) (Diff)
/source/blender/SConscript (+1, -1) (Diff)
/source/blender/windowmanager/SConscript (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021