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
53840c7db5
Merged changes in the trunk up to revision 52546.
...
Conflicts resolved:
release/datafiles/startup.blend
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/intern/idcode.c
2012-11-26 02:32:34 +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
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
9d0334bc74
add missing bgl and gpu api docstrings (found using docstring completeness checker)
2012-11-22 05:15:52 +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
b7cd9ec3ad
Merged changes in the trunk up to revision 52340.
...
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
2012-11-19 00:41:11 +00:00
b867f9f17e
style cleanup: comments & spelling
2012-11-18 01:22:31 +00:00
6cee7bb2b7
Merged changes in the trunk up to revision 52191.
...
Conflicts resolved:
source/blender/makesdna/DNA_scene_types.h
2012-11-14 02:01:02 +00:00
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
7fa096261a
Merged changes in the trunk up to revision 52118.
...
Conflicts resolved:
source/blender/makesrna/intern/rna_scene.c
2012-11-12 00:30:55 +00:00
2bb174cfa4
style cleanup: indentation
2012-11-09 09:33:28 +00:00
a8a2782d34
Merged changes in the trunk up to revision 51985.
2012-11-07 22:12:19 +00:00
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
92bb31c10e
fix for imp.reload() with Python3.3, function was recursively calling its self.
2012-11-06 11:43:19 +00:00
ea61c74262
hopefully fixes building on msvc, also some minor header edits
2012-11-05 14:58:12 +00:00
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
9bdfa2f9e7
Merged changes in the trunk up to revision 51863.
2012-11-04 12:46:48 +00:00
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
dd8e836067
Merged changes in the trunk up to revision 51853.
...
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/bmesh/operators/bmo_utils.c
This commit also includes a fix of a bug identified during the merge and committed in revision 51853.
Thanks Thomas (dingto) for the timely fix!
2012-11-04 02:22:56 +00:00
9b948717b0
code cleanup: float <> double conversion.
2012-11-03 18:23:30 +00:00
25591e958d
style cleanup: tabs & whitespace
2012-11-03 15:35:03 +00:00
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
9a82b47b4f
all library data now gets the PointerRNA's invalidated on removal.
2012-11-01 17:16:24 +00:00
f4e5404e4a
fix for long standing problem with blender 2.5x py api.
...
Removing data then accessing would allow invalid memory access and often crash.
Example:
import bpy
image = bpy.data.images.new(name="a", width=5, height=5)
bpy.data.images.remove(image)
print(image.name)
Now access to the removed data raises an error:
ReferenceError: StructRNA of type Image has been removed
This is the same level of error checking that was done in blender 2.4x but was made difficult by RNA functions not having access to the PyObject's.
2012-11-01 15:56:42 +00:00
1bcadda46b
fix [ #30910 ] Problems: Add Shortcut(s) for "Ctrl Tab" menu
...
comparing keymaps was too sloppy or too strict, now sloppy keymap comparison works by setting all the operator
properties to their default values if they are not already set, then compare this with the keymap item (ignoring values missing from either one).
... this way any non default keymap setting wont match with an operator menu item which doesnt set this operator at all (a problem sighted in this bug report).
developer notes:
- IDP_EqualsProperties_ex() function adds an argument to treat missing members of either group to act as if there is a match.
- WM_operator_properties_default() function to reset RNA values to their defaults.
- add IDP_spit(), debug only function to print out ID properties.
2012-10-31 20:29:32 +00:00
c7fbeded4c
add IDP_MergeGroup(dst, src, overwrite) function,
...
like PyDict_Merge()
2012-10-31 19:07:25 +00:00
e8a70d4b90
fix for crash in python matrix utility functions .inverted/adjugated/transposed if the matrix has a read callback and fails.
...
also replace DM_get_poly_data_layer with dm->getPolyDataArray() since this is the convention in subsurf code and the functions now added.
2012-10-31 03:21:13 +00:00
f4dea6d829
when an invalid subtype is passed to a property, a list of valid subtypes is now included in the exception message.
...
from bug report [#33018 ], this avoids common mistakes.
2012-10-30 12:45:42 +00:00
900fa1bfb9
rename subtype FILENAME --> FILE_NAME to match FILE_PATH, DIR_PATH
2012-10-30 12:36:54 +00:00
8c9e1b3c16
Disallow collection add/remove/clear/move when drawing. - similar to how writing to attributes is disabled.
2012-10-30 03:05:45 +00:00
dbb40e805d
py api: add mathutils.Matrix adjugate(d) methods, also add adjoint_m2_m2() to BLI_math_matrix
2012-10-29 03:36:55 +00:00
15ed834343
Merged changes in the trunk up to revision 51718.
...
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/makesrna/intern/rna_scene.c
release/datafiles/startup.blend
2012-10-29 01:09:12 +00:00
c9e5b1e6ee
add --debug-handlers so --debug-events isnt so noisy.
2012-10-27 15:05:12 +00:00
9fc95bd7ee
use min/max inline functions where MIN2/MAX2 were doing type conversion.
2012-10-27 11:18:54 +00:00
818710f082
* Windows compile fix for __func__ (r51642)
2012-10-26 18:06:14 +00:00
c9dade4fe0
Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()...
2012-10-26 17:32:50 +00:00