Commit Graph

289 Commits

Author SHA1 Message Date
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
200584e5c6 fix for a handful of memory leaks relating to parsing and allocating arbitrary sized vectors from python args.
Vector.dot() was always leaking memory, and would crash if args sizes didnt match.

These errors were introduced with n-dimensional vector support.

also fixed an error with bmesh py api allocation.
2012-06-26 16:58:58 +00:00
54156e2b82 option to disable feather, since its so slow - for interactively editing masks its useful to be able to disable.
also rename RNA to 'use_antialiasing'
2012-06-21 12:27:57 +00:00
56c5c63f57 code cleanup: doxy comment filename corrections 2012-06-08 23:43:11 +00:00
6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
3fc3c9f3b4 style cleanup: relating to skin modifier 2012-05-22 16:09:31 +00:00
c63602286c Fix for customdata layer copying. Issue was caused by mixing up of destination and source in copy function. Also fixed an error in Py API, check to see if layers were different should be check to see if they're the same. 2012-05-22 12:03:56 +00:00
ea11bc980a debugging check for bmesh (commented since its very slow), but useful for debugging some scripts. 2012-05-21 12:30:06 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
518ff6995d BMesh Py API Fix: hide attribute of BMesh elements was returning the select flag. Fixed for all elements including loops, although this is commented out anyway. Reported by Crouch in IRC. 2012-05-20 12:52:46 +00:00
933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
9fe1fe0aa8 bmesh py api:
add mtexpoly image access
2012-05-01 06:50:43 +00:00
1d743d11dc bmesh - python api
- bm.*.layers.*.verify()
- bm.*.layers.*.is_singleton
- bm.*.layers.*.copy_from(other)


also added api functons
- BM_data_layer_copy(...)
- CustomData_layertype_is_singleton(type)
2012-04-30 18:54:14 +00:00
60c9addf79 - improve select grouped prefix/suffix from recent patch
- added select similar direction (Y axis)
2012-04-30 08:24:44 +00:00
d3c1ece201 fix [#31113] bmesh.types.BMLayerCollection getter calculate key indices wrong (own fault)
also add check so layer.name won't crash incase the layer becomes invalid.
2012-04-26 16:32:30 +00:00
bfcdd45245 corrections from an article about using PVS-Studio static checker with blender - http://www.viva64.com/en/b/0145/ 2012-04-23 15:54:43 +00:00
4c873fec53 bmesh py api: functions to add/renmove customdata layers, eg.
bm.loops.layers.color.new("Testing")
2012-04-23 14:52:28 +00:00
16ff7e40e6 code cleanup: change C naming convention (so py and C api match), eg:
C: BM_face_calc_area(f), Py: BMFace.calc_area()
2012-04-23 01:19:50 +00:00
49ff0eeec4 bmesh py api: expose BM_face_split_n() to the python api;
face_fill(..., coords=(v1, v2, ...))

This is the same function the knife tool uses. should be handy for dicing up geometry in py.
2012-04-22 10:19:24 +00:00
80ff1984f8 bmesh py api: remove bmesh.loops.index_update(), it wasn't working, as joe noticed. 2012-04-19 23:23:29 +00:00
417117e207 bmesh py api: expose BMVert.calc_shell_factor() 2012-04-19 19:13:57 +00:00
b40476455e code cleanup: remove unused BMesh args. 2012-04-19 14:38:09 +00:00
475ecbb0ce remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases). 2012-04-19 13:47:58 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
db2edfcfde bmesh api function: BM_edge_face_tangent()
was used by inset but make into an api function since scripts can use this too.
2012-04-19 11:25:05 +00:00