d5c2a1f8f4
remove context argument from EDBM_update_generic()
2012-12-12 15:22:54 +00:00
3e8b56b321
add destructive argument to bmesh.update_edit_mesh()
2012-12-12 06:57:41 +00:00
61da29996a
fix own mistake with recent commit to skip calculating tessface. If you were already in editmode the tessfaces wouldn't get recalculated.
...
also minor edits to bmesh rst.
2012-12-03 02:26:13 +00:00
07ccd3ee3f
fix [ #33029 ] Applying modifier leaks memory
...
Thanks for Sergey for finding the bug & patching, This fix works a bit differently.
Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
2012-11-29 16:26:39 +00:00
149b607141
py/bmesh api: add radial prev/next attributes to the loop
2012-11-29 05:54:35 +00:00
858149d7c7
bmesh py api: add bmesh.update_edit_mode(), there was no way to redraw the 3d view or re-calculate face tessellation from python.
...
add py template for editing meshes in editmode.
also remove double call to CTX_wm_region which does a string lookup.
2012-11-29 05:02:06 +00:00
ede703ab85
some minor edits
...
- script stub printed resource warning with py3.3 (not closing a file).
- bmesh customdata layer access had bad docstring.
- float/double conversion warnings in sequencer code (use doubles since result is double)
- remove unused var
2012-11-29 03:55:07 +00:00
c86045d7a2
bmesh py api: use generic checking macros to see if an object if from the same bmesh.
...
- was such a common operation so this saves having exceptions set inline all over the place.
2012-11-29 03:25:37 +00:00
078487e98e
bmesh py api: add BMeshFaceSeq.active attribute- bm.faces.active
2012-11-29 02:44:06 +00:00
96136d3d88
bmesh operator py api:
...
- fix for incorrect bmesh operator type-check for mapping slots.
- fix for python causing an assert when invalid args are given.
- fix memory leak with some exceptions.
2012-11-28 15:07:57 +00:00
c5a8bd498d
use radians for 'spin' bmesh operator (since the rest of the py api uses radians). also rename BMO_OP_SLOT_SUBTYPE_MAP_FLOAT -> BMO_OP_SLOT_SUBTYPE_MAP_FLT for consistency.
2012-11-28 00:47:33 +00:00
21db9ac0f4
replace and exception macro's for static functions and fix some bad assumptions.
2012-11-27 15:26:10 +00:00
c9d84ab5ed
split py->slot & slot->py into their own functions & fixed some mistakes with conversion.
2012-11-27 14:25:38 +00:00
492af7cc6b
move bmesh operator calling into its own file.
2012-11-27 13:54:34 +00:00
2d5b8172e9
add empty files (will move bmesh operator calling here)
2012-11-27 13:45:28 +00:00
a9855c227e
py/bmesh api - add support for single item buffers (odd feature but used quite a bit with bmesh operators).
...
also add utility functions BMO_slot_buffer_from_single(), BMO_slot_buffer_get_single()
2012-11-27 09:21:57 +00:00
f8bc346eff
bmesh/py operator api:
...
add type checking for element buffers, there was nothing stopping python from passing any element type into an argument when in some cases only verts/edges/faces were expected.
now operator args define which types they support.
2012-11-27 00:50:59 +00:00
42c54bcd93
py/bmesh api - support for converting from/to BMO_OP_SLOT_MAPPING type.
2012-11-26 08:44:37 +00:00
3fe8134d6d
add subtypes to bmesh operators (needed for python api to know how to convert return values).
2012-11-26 02:24:03 +00:00
3fd388fb06
py api cleanup, replace use...
...
- PyLong_FromSsize_t --> PyLong_FromLong
- PyLong_AsSsize_t --> PyLong_AsLong
In all places except for those where python api expects PySsize_t (index lookups mainly).
- use PyBool_FromLong in a few areas of the BGE.
- fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
2012-11-21 02:28:36 +00:00
f43e75c4d6
py api: BMesh.from_object() was using the derivedFinal, which isn't always available - or may not have UV data if in the wireframe view.
...
update the function to calculate the derived mesh with bmesh data-mask each time.
resolves bug [#33205 ] Bmesh "from_object" gives "no usable mesh data".
also found 'mesh_build_data' could run with non mesh objects and fail silently - add an assert.
2012-11-21 00:31:47 +00:00
2336bde2bf
py api: add mapping support to bmesh operator return values.
2012-11-20 06:11:15 +00:00
f792e288ea
py api: remove ".out" from the names of dict keys returned from bmesh operators.
2012-11-20 05:58:17 +00:00
e8667421ed
bmesh operator api edits, add macros and NULL the buffer if BMO_slot_buffer_alloc()'s len is zero.
2012-11-20 03:29:12 +00:00
050e220a98
bmesh py api: add support for return values from bmesh operators.
2012-11-20 02:56:42 +00:00
48639af5f8
use input and output slots for bmesh operators, needed for the python api to get return values.
2012-11-19 14:58:31 +00:00
cdc4037f0d
bmesh: BM_verts_in_face was using bmesh operator flag which is no longer ensured to be available,
...
use internal apiflag instead, Thanks to Nicholas Bishop for spotting.
also quiet some warnings.
2012-11-19 00:54:55 +00:00
9fc95bd7ee
use min/max inline functions where MIN2/MAX2 were doing type conversion.
2012-10-27 11:18:54 +00:00
7deb8d8a26
code cleanup: spelling
2012-10-20 20:36:51 +00:00
da9394f596
code cleanup: define sizes of vectors for function args and use C style comments
2012-10-15 09:11:17 +00:00
35ae7dae9e
fix for own bug in bmesh api, setting a byte string customdata layer assumed the input data was 256 length, assigning smaller values would read past the buffer.
2012-10-01 15:39:29 +00:00
c9c76a9a68
add compiler hints that failing to create a bmesh face is unlikely.
2012-10-01 11:12:49 +00:00
aa49ca25d5
incorrect spelling in comments
2012-09-26 20:05:38 +00:00
95002a98bf
fix for very bad bug with python list slicing which - in bmesh and bpy api for all? 2.5x + releases.
...
negative stop values when slicing was broken. eg.
bpy.data.objects[0:-2] != list(bpy.data.objects)[0:-2]
2012-09-25 23:41:32 +00:00
e75f5c8208
quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
...
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
ee96cde864
style cleanup: whitespace
2012-08-26 11:35:43 +00:00
1939baa47d
style cleanup
2012-08-22 16:44:32 +00:00
b96c622015
style cleanup
2012-08-11 22:12:32 +00:00
9ff4fa6671
style cleanup
2012-08-04 12:30:16 +00:00
df3f3dff3b
patch [ #31925 ] Add a BMElemSeq.sort() method
...
from Antonio Ospite (ao2)
wrap bmesh sort function for python api, eg:
bm.faces.sort(key=lambda f: f.material_index)
2012-07-22 21:13:32 +00:00
90d215535e
add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
...
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
32cf7fcdb1
code cleanup: spelling
2012-07-16 23:23:33 +00:00
98969c64ff
code cleanup: move sequencer timecode into its own func.
2012-07-09 10:55:41 +00:00
558721ab59
More spell checking.
2012-07-04 15:04:38 +00:00
2ed69a95f4
add bmesh/python operator support for vector and matrix args.
...
also rename BMO_OP_SLOT_PNT to BMO_OP_SLOT_PTR (matches RNA and sounds less like 'point')
2012-07-02 20:28:43 +00:00
39ca3146ff
fix for some build warnings.
2012-06-30 16:56:23 +00:00
e6d55c97dd
add support for passing lists of verts/edges/faces to bmesh operators
2012-06-30 12:58:04 +00:00
3e99ec8d3d
all bmesh operators can now be accessed from bmesh.ops.* using a generic wrapper,
...
argument parsing still needs to have support added for vector, matrix and element types.
2012-06-30 11:14:10 +00:00
7518654a51
add access to dissolve_limit from python.
2012-06-27 14:01:58 +00:00
3e305c1018
bmesh.ops module for bmesh operator access, only remove_doubles and convex_hull at the moment.
2012-06-26 21:40:01 +00:00