Campbell Barton
950fb66c38
replace TypeError with Value error for matrix operations where the type is right but it can't succeed because of a property of the instance (normally the wrong col/row size).
2012-12-16 04:10:57 +00:00
Campbell Barton
1886ae38b4
add Matrix.normalized(), handy for transforming normals.
2012-12-16 04:05:16 +00:00
Campbell Barton
21a9fa9089
move bpath module from BLI to BKE, it was making many bad level calls into BKE.
2012-12-15 15:31:50 +00:00
Campbell Barton
d5c2a1f8f4
remove context argument from EDBM_update_generic()
2012-12-12 15:22:54 +00:00
Campbell Barton
3e8b56b321
add destructive argument to bmesh.update_edit_mesh()
2012-12-12 06:57:41 +00:00
Campbell Barton
adf7bfa8bb
ifdef out dynstr so mathutils can be compiled as an external module again.
2012-12-08 01:16:59 +00:00
Campbell Barton
a864259d50
bump python requirement to 3.3
2012-12-06 02:42:42 +00:00
Campbell Barton
5b9f30980a
update parse_syntax_error() from python3.3 - this is an internal python function that isn't exposed to the api.
2012-12-04 20:09:07 +00:00
Campbell Barton
d0667c70dd
fix for python button evaluation not restoring the __main__ module.
2012-12-04 19:58:13 +00:00
Campbell Barton
60cd5ee412
fix for typo when overwriting pythons stdout/stderr, also print errors if they happen here now.
2012-12-04 11:21:33 +00:00
Campbell Barton
4302cde8ff
re-apply a workaround for [ #31555 ] Username with special chars in Windows 7
...
this time keep the stderr/stdout so there FD's are not closed (causing [#32720 ]).
This workaround is ugly but saves us from using a patched python.
2012-12-03 10:01:09 +00:00
Campbell Barton
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
Campbell Barton
f7f4148b40
change uiButGetStrInfo() to use a trailing NULL arg rather then passing the number of args as an arg.
2012-12-02 04:51:15 +00:00
Campbell Barton
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
Campbell Barton
149b607141
py/bmesh api: add radial prev/next attributes to the loop
2012-11-29 05:54:35 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
078487e98e
bmesh py api: add BMeshFaceSeq.active attribute- bm.faces.active
2012-11-29 02:44:06 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
21db9ac0f4
replace and exception macro's for static functions and fix some bad assumptions.
2012-11-27 15:26:10 +00:00
Campbell Barton
c9d84ab5ed
split py->slot & slot->py into their own functions & fixed some mistakes with conversion.
2012-11-27 14:25:38 +00:00
Campbell Barton
492af7cc6b
move bmesh operator calling into its own file.
2012-11-27 13:54:34 +00:00
Campbell Barton
2d5b8172e9
add empty files (will move bmesh operator calling here)
2012-11-27 13:45:28 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
42c54bcd93
py/bmesh api - support for converting from/to BMO_OP_SLOT_MAPPING type.
2012-11-26 08:44:37 +00:00
Campbell Barton
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
Campbell Barton
93ad97c131
avoid string -> unicode conversion when registering classes, also avoid unlikely but possible crash if the py-class returns new instances of PyObjects it doesnt own when registering the class.
2012-11-22 08:45:32 +00:00
Campbell Barton
9d0334bc74
add missing bgl and gpu api docstrings (found using docstring completeness checker)
2012-11-22 05:15:52 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
2336bde2bf
py api: add mapping support to bmesh operator return values.
2012-11-20 06:11:15 +00:00
Campbell Barton
f792e288ea
py api: remove ".out" from the names of dict keys returned from bmesh operators.
2012-11-20 05:58:17 +00:00
Campbell Barton
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
Campbell Barton
050e220a98
bmesh py api: add support for return values from bmesh operators.
2012-11-20 02:56:42 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
b867f9f17e
style cleanup: comments & spelling
2012-11-18 01:22:31 +00:00
Campbell Barton
cf6994b910
code cleanup: spelling,
...
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
2012-11-12 07:33:01 +00:00
Campbell Barton
2bb174cfa4
style cleanup: indentation
2012-11-09 09:33:28 +00:00
Campbell Barton
41bfb62b0f
was trying to make py import follow pythons own code more but broke py32 compat. this should fix
2012-11-06 13:29:00 +00:00
Campbell Barton
92bb31c10e
fix for imp.reload() with Python3.3, function was recursively calling its self.
2012-11-06 11:43:19 +00:00
Campbell Barton
ea61c74262
hopefully fixes building on msvc, also some minor header edits
2012-11-05 14:58:12 +00:00
Campbell Barton
004f8d78ed
default to Python3.3 on Linux for SCons and CMake, warn when building with python 3.2x or older.
...
also remove casts to keep Python3.2 warning quiet.
2012-11-05 13:48:42 +00:00
Campbell Barton
fae6c35ca7
code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places.
2012-11-04 07:18:29 +00:00
Campbell Barton
9b948717b0
code cleanup: float <> double conversion.
2012-11-03 18:23:30 +00:00
Campbell Barton
25591e958d
style cleanup: tabs & whitespace
2012-11-03 15:35:03 +00:00
Brecht Van Lommel
47cd3cf225
BPY/RNA: determine callback functions that are allowed to write data by a flag
...
on the function instead of checking the name.
2012-11-03 14:31:38 +00:00