Commit Graph

136 Commits

Author SHA1 Message Date
Campbell Barton 9fc95bd7ee use min/max inline functions where MIN2/MAX2 were doing type conversion. 2012-10-27 11:18:54 +00:00
Campbell Barton 7deb8d8a26 code cleanup: spelling 2012-10-20 20:36:51 +00:00
Campbell Barton da9394f596 code cleanup: define sizes of vectors for function args and use C style comments 2012-10-15 09:11:17 +00:00
Campbell Barton 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
Campbell Barton c9c76a9a68 add compiler hints that failing to create a bmesh face is unlikely. 2012-10-01 11:12:49 +00:00
Campbell Barton aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
Campbell Barton 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
Campbell Barton 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
Campbell Barton ee96cde864 style cleanup: whitespace 2012-08-26 11:35:43 +00:00
Campbell Barton 1939baa47d style cleanup 2012-08-22 16:44:32 +00:00
Campbell Barton b96c622015 style cleanup 2012-08-11 22:12:32 +00:00
Campbell Barton 9ff4fa6671 style cleanup 2012-08-04 12:30:16 +00:00
Campbell Barton 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
Campbell Barton 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
Campbell Barton 32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
Campbell Barton 98969c64ff code cleanup: move sequencer timecode into its own func. 2012-07-09 10:55:41 +00:00
Bastien Montagne 558721ab59 More spell checking. 2012-07-04 15:04:38 +00:00
Campbell Barton 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
Campbell Barton 39ca3146ff fix for some build warnings. 2012-06-30 16:56:23 +00:00
Campbell Barton e6d55c97dd add support for passing lists of verts/edges/faces to bmesh operators 2012-06-30 12:58:04 +00:00
Campbell Barton 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
Campbell Barton 7518654a51 add access to dissolve_limit from python. 2012-06-27 14:01:58 +00:00
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 56c5c63f57 code cleanup: doxy comment filename corrections 2012-06-08 23:43:11 +00:00
Campbell Barton 6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
Campbell Barton 3fc3c9f3b4 style cleanup: relating to skin modifier 2012-05-22 16:09:31 +00:00
Andrew Hale 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
Campbell Barton ea11bc980a debugging check for bmesh (commented since its very slow), but useful for debugging some scripts. 2012-05-21 12:30:06 +00:00
Campbell Barton 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
Andrew Hale 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
Campbell Barton 933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
Campbell Barton 9fe1fe0aa8 bmesh py api:
add mtexpoly image access
2012-05-01 06:50:43 +00:00
Campbell Barton 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
Campbell Barton 60c9addf79 - improve select grouped prefix/suffix from recent patch
- added select similar direction (Y axis)
2012-04-30 08:24:44 +00:00
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 80ff1984f8 bmesh py api: remove bmesh.loops.index_update(), it wasn't working, as joe noticed. 2012-04-19 23:23:29 +00:00
Campbell Barton 417117e207 bmesh py api: expose BMVert.calc_shell_factor() 2012-04-19 19:13:57 +00:00
Campbell Barton b40476455e code cleanup: remove unused BMesh args. 2012-04-19 14:38:09 +00:00
Campbell Barton 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
Campbell Barton 75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
Campbell Barton 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
Campbell Barton 6520aa97a9 add 'idprop' module so we can document idprop.types.*, currently doc generator has no access to ID Property types. 2012-04-15 14:54:15 +00:00
Campbell Barton db53faffa3 make ngon_perimeter into a public api function and expose to python. 2012-04-15 10:09:27 +00:00
Campbell Barton 8fa17c5362 code cleanup: no functional changes
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead.
- quiet warnings in editmesh_slide.c
- cleanup comments in bmesh and some other minor comment additions.
2012-04-07 12:37:15 +00:00