Campbell Barton
2fd226abe7
bmesh py api, added: bmesh.utils.edge_rotate(edge, ccw=False)
...
also improved docstrings.
2012-02-23 14:15:26 +00:00
Campbell Barton
7bc306c947
bmesh py api, new elements now take optional 'example' arguments, so the new data copies from the existing.
2012-02-23 11:27:22 +00:00
Campbell Barton
3034971520
bmesh py api functions:
...
bmesh.utils.vert_collapse_edge, vert_collapse_faces, vert_dissolve, face_split
2012-02-23 10:29:04 +00:00
Campbell Barton
0dc50a0e07
bmesh py api, new submodules
...
* bmesh.types, just allows access to BMVert, BMEdge etc.
* bmesh.utils, so far only added edge_split() function, this module will give access to mesh editing functions.
2012-02-23 05:20:09 +00:00
Campbell Barton
38f546a614
swap arg order for BM_edge_split(), makes sense to have edge as first
...
arg.
2012-02-23 05:17:07 +00:00
Campbell Barton
d232815481
- swap arg order for BM_face_copy() boolean options.
...
- use edge example for BM_face_split().
2012-02-23 04:26:24 +00:00
Campbell Barton
ecb6f13618
bmesh py api, more wrapped funcs:
...
* BMFace.copy(verts=True, faces=Trur)
* BMEdge.other_vert(vert)
2012-02-23 04:19:25 +00:00
Campbell Barton
30c62d9699
bmesh py api: functions for getting the area/angle/center of BMesh elements.
2012-02-23 03:39:39 +00:00
Campbell Barton
92c47145fd
bmesh python api change in internal behavior.
...
* Only have 1 python object per bmesh, vertex, edge, loop, face.
* Store pointers back to the python data in a custom data layer so as not to use more memory for normal editing operations (when pythons not running).
* Currently this data is created and freed along with the BMesh PyObject.
* Incidentally - this fixes comparisons for bmesh elements which wasnt working before.
2012-02-22 16:08:30 +00:00
Campbell Barton
ccfcc70c8c
add slice access to bmesh sequences.
...
eg:
verts = bm.verts[1:-7]
2012-02-22 12:54:53 +00:00
Campbell Barton
5123238f7d
BMesh-py attributes (readonly):
...
* is_valid (all types)
* is_wire (verts/edges)
* is_boundry (edge only)
* is_manifold (verts/edges)
also corrected own error, missed updating BMesh operator formatting char (broke erase only-faces)
2012-02-22 12:28:32 +00:00
Campbell Barton
0ca14d9558
bmesh py api add connectivity attributes - to access adjacent data.
2012-02-22 12:04:44 +00:00
Campbell Barton
361de47cf5
bmesh py api - function to remove vert/edge/faces
2012-02-22 11:52:56 +00:00
Campbell Barton
91353bc716
bmesh python api - add BMEdge.verts, also had to add VERTS_OF_EDGE iterator in bmesh's api.
2012-02-22 11:31:07 +00:00
Campbell Barton
e0a6d273d0
bmesh py api - generalize bmesg sequences to use the iterator type and optionally another bmesh element.
...
This allows BMFace.verts to be added without defining a new sequence type.
2012-02-22 10:41:07 +00:00
Campbell Barton
e7d98179ea
initial bmesh python api.
...
corrently allows to create and loop over verts/edges/faces, access selection and selection modes.
this is still WIP, access to face, edge verts is still missing, no access to UV's, no access to editing operations yet.
When the api is ready it will be documented by sphinx like mathutils, blf, aud.
2012-02-22 09:19:53 +00:00
Campbell Barton
3788adb8cb
utility functions to convert between flags / sets, without depending on RNA API.
2012-02-22 09:15:46 +00:00
Campbell Barton
1f40f01435
correct exception - was using a TypeError when should be a ValueError.
2012-02-22 09:13:29 +00:00
Tamito Kajiyama
9f243d531c
Merged changes in the trunk up to revision 44288.
...
Conflicts resolved:
source/blender/blenkernel/intern/cdderivedmesh.c
2012-02-21 02:19:54 +00:00
Campbell Barton
c4e7cc3287
fix for leak in gpu.export_shader(), wasnt freeing the function.
...
also change the bmesh iterator so its possible to initialize without stepping.
2012-02-20 22:04:29 +00:00
Tamito Kajiyama
910f04ca63
Merged changes in the trunk up to revision 44221.
...
Conflicts resolved:
release/datafiles/blender_icons.png
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenloader/intern/readfile.c
2012-02-18 11:26:11 +00:00
Campbell Barton
61596d5bb3
patch [ #30227 ] Various MSVC (32-bit) Warning and Typo Fixes
...
made some small edits
- removed changes to AVI reading since the data types are apart of the format spec.
- absf -> abs for a double value in render code.
2012-02-17 19:21:47 +00:00
Campbell Barton
2b7ca2304a
unify include guard defines, __$FILENAME__
...
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Tamito Kajiyama
5c5685f6c5
Merged changes in the trunk up to revision 44039.
2012-02-12 00:09:48 +00:00
Campbell Barton
b81bfd86b4
use ValueError when vector/matrix multiplications sizes are not supported, was using TypeError for mat*vec and ValueError for vec*mat.
2012-02-11 14:27:36 +00:00
Campbell Barton
5a42ff381c
correct 2 sphinx warnings.
2012-02-08 16:36:04 +00:00
Campbell Barton
1f74789d12
Correct mathutils documentation, also correct some python spelling errors and add makefile target check_spelling
2012-02-08 04:37:37 +00:00
Campbell Barton
4acab3eb33
Code Cleanup: line length and use Py_ssize_t for PyC_AsArray utility function.
2012-02-05 02:04:26 +00:00
Tamito Kajiyama
8160829303
Merged changes in the trunk up to revision 43881.
2012-02-04 14:22:05 +00:00
Campbell Barton
e3958015db
Code Cleanup: check is / is not when comparing singletons.
2012-02-02 21:07:56 +00:00
Campbell Barton
697e77a494
fix [ #29666 ] Duplicate entries in bpy.types
...
Python operator subclasses and operator types each get their own SRNA, causing double ups for bpy.types.__dir__()
From the operator type - these share names.
* ot->ext.srna
* ot->srna
Note that this conflict is still there, this only disables 'ot->ext.srna' from being included in dir(bpy.types).
2012-02-02 04:43:35 +00:00
Andrew Hale
5a221dd0de
Fix for possible memory leak on creation of a vector using Vector.Range.
...
It was possible to allocate an array of size<2 which would then raise an error on vector creation without freeing.
Fix to ensure the behaviour of Vector.Range was the same as for builtin range() function. When specifying 3 arguments, the step argument wasn't being used to correctly calculate the vector size.
Minor formatting edits for error messages.
2012-02-02 01:07:04 +00:00
Andrew Hale
40f1686f47
Fixes to Python matrices str function.
...
1) The width of columns was incorrectly determined on windows, fixed by increasing the size of the dummy buf.
2) Added additional brackets to string for consistent formatting
2012-02-01 01:42:36 +00:00
Campbell Barton
54dc5f1654
apply back changes made since moving this file.
2012-01-31 05:02:24 +00:00
Campbell Barton
427cde6f16
svn cp \
...
https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/python/generic/noise_py_api.c@r42248 \
https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/python/mathutils/mathutils_noise.c
2012-01-31 04:59:57 +00:00
Campbell Barton
b42feff554
previous move lost history on this file, restoring next commit.
2012-01-31 04:58:06 +00:00
Tamito Kajiyama
831f339980
Merged changes in the trunk up to revision 43748.
...
Conflicts resolved:
source/blender/editors/include/UI_resources.h
2012-01-29 12:00:04 +00:00
Andrew Hale
e634cb2607
Add the .Identity() classmethod to mathutils matrices. This allows the user
...
to create an identity matrix of a specific size without having to specify
all the values in the matrix and then use the .identity() method.
2012-01-24 01:56:44 +00:00
Tamito Kajiyama
68ae82bb47
Merged changes in the trunk up to revision 43585.
...
Conflicts resolved:
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/resources.c
source/blender/makesrna/intern/rna_scene.c
2012-01-21 23:01:25 +00:00
Campbell Barton
c5d7f8e416
formatting edits (<120 line length), remove invalid 'defaults' keyword arg from docs.
2012-01-21 10:27:24 +00:00
Campbell Barton
57ad3b85d8
fix [ #27589 ] Random crash with python UI
...
This script was defining an operator within the panels draw function, while its possible to support this its really asking for trouble.
the fix is to raise an error when this happens.
also fix crash passing non classes to register_class/unregister_class
2012-01-18 19:50:44 +00:00
Campbell Barton
af6f753400
fix for segfault with bpy compiled as python module (dont register atexit)
...
update `make lite` built target to remove some newly added features.
2012-01-17 15:19:11 +00:00
Campbell Barton
3123ad12a3
middle mouse jump scrolling for text window.
2012-01-16 10:48:52 +00:00
Andrew Hale
3cad3521a9
Change function for nb_invert so that ~matrix returns the inverted matrix rather than inverting inplace.
2012-01-16 09:01:11 +00:00
Tamito Kajiyama
e0df491d1e
Merged changes in the trunk up to revision 43404.
...
Conflicts resolved:
source/blender/python/SConscript
2012-01-15 23:13:12 +00:00
Campbell Barton
8c9c018c90
note on compating RNA pointers and compare RNA types for RNA-Properties too.
2012-01-15 12:35:40 +00:00
Campbell Barton
0f34ce27cf
fix for error comparing py-struct members
...
if 2 pyrna structs used the same pointer they could incorrectly compare as true, this caused an error in theme saving because an item could match its parent and stop writing (to prevent recursive writing of same data).
eg:
context.user_preferences.themes[0].user_interface.wcol_regular == context.user_preferences.themes[0].user_interface
2012-01-13 11:36:32 +00:00
Campbell Barton
309f3f31e7
remove redundant trailing slashes
2012-01-12 06:11:08 +00:00
Campbell Barton
02560d748f
add RNA_property_is_set function, use for WM_menu_invoke to avoid double lookup and py api to de-duplicate some checks
2012-01-11 16:48:22 +00:00
Campbell Barton
f66f33cefc
rename RNA_property_is_set() --> RNA_struct_property_is_set() in preperation to add a second version of the function which takes the property rather then its name.
2012-01-11 16:32:12 +00:00