Campbell Barton
0e6f8e3e25
fix for crash when a python operator or render engine was freed in the C code and then referenced from python.
...
now further access in python gives an exception at the line when the freed data is accessed.
2012-10-26 10:33:57 +00:00
Campbell Barton
d599b643b7
style cleanup: bge, switch statements mostly.
...
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
Campbell Barton
f3ece5a108
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
2012-10-21 05:46:41 +00:00
Campbell Barton
c56a911cd9
style cleanup: comments
2012-10-20 20:20:02 +00:00
Campbell Barton
589ada7f0c
code cleanup: correct spelling
2012-09-28 06:45:20 +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
71d1b09708
minor code cleanup
2012-08-25 12:55:14 +00:00
Campbell Barton
e9d73dbba5
use -FLT_MAX where FLT_MIN was misused
2012-08-07 19:49:38 +00:00
Lukas Toenne
dee1d86e65
Fix for RNA struct registration: the bpy_class_validate function would only check the immediate functions/properties of the pointer struct type, but not potential base structs. Now it first validates the base struct recursively before the actual properties of the registered class.
...
Does not have any effect for current registerable types (Operator, Menu, Panel, etc.), since none of those actually have a base struct, but will be required for future types with an actual hierarchy (custom nodes).
2012-07-24 12:00:02 +00:00
Campbell Barton
32cf7fcdb1
code cleanup: spelling
2012-07-16 23:23:33 +00:00
Campbell Barton
84bf3e48c0
style cleanup: use c style comments in C code
2012-07-06 23:56:59 +00:00
Campbell Barton
314a275850
fix (actually nasty workaround), for groups incorrectly drawing in the object panel when the blend file has naming collisions with library data.
...
also minor style cleanup in bpy_rna.c
2012-07-03 10:32:10 +00:00
Campbell Barton
f6e21881f5
change RNA_struct_find_function to accept a type rather then a PointerRNA, add a check duplicate functions are not defined.
2012-06-10 13:34:59 +00:00
Campbell Barton
1931aac1f7
style cleanup: (indentation)
2012-06-06 14:48:39 +00:00
Campbell Barton
032d83ecc4
style cleanup: defines with braces
2012-05-27 20:13:59 +00:00
Campbell Barton
dab1d8e487
style cleanup
2012-05-22 22:03:41 +00:00
Campbell Barton
3896ad4cbb
code cleanup: spelling
2012-05-20 21:23:26 +00:00
Campbell Barton
c0bd076bfd
style cleanup: and add missing files to cmake
2012-05-17 23:12:15 +00:00
Nicholas Bishop
ed33320e3f
Code cleanup: simplify standard GHash creation.
...
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.
GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);
Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
Campbell Barton
b667f29a84
no need to clamp python values twice when assigning.
2012-05-11 10:25:12 +00:00
Brecht Van Lommel
d9ce1cda94
Python/context: python could get invalid bpy.data in scene update handler after
...
undo.
The way this got updated from the context is a bit unreliable, and for handlers
the update couldn't happen because there is no context passed in. Now it's
updated from setup_app_data, which is where the change actually happens. I left
in the other updates to be sure but they should not be needed anymore.
2012-05-08 22:07:06 +00:00
Campbell Barton
9fe1fe0aa8
bmesh py api:
...
add mtexpoly image access
2012-05-01 06:50:43 +00:00
Campbell Barton
a5af5e8f50
style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros
2012-04-30 16:22:40 +00:00
Campbell Barton
ef054e165c
style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros.
2012-04-28 15:14:16 +00:00
Campbell Barton
1add07821b
fix [ #30925 ] successful import of keyconfig dependant on current object context?
...
revert r34885,
The hack was to fix poselib UI but is REALLY BAD - don't modify properties when accessing them.
This bug must be fixed some other way.
2012-04-13 09:25:50 +00:00
Campbell Barton
9e663017d8
py rna/api: fix for error running RNA_property_collection_type_get on non collection property types.
2012-04-11 10:35:09 +00:00
Brecht Van Lommel
63e2763842
Fix #30698 : python console nodetree paths were not accurate, now show ... like
...
in some other cases to at least show these are not accurate.
2012-04-10 16:37:05 +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
Campbell Barton
c563eb71b7
wrap RNA's RNA_property_collection_clear from python.
2012-04-02 11:28:26 +00:00
Campbell Barton
5b88712ff9
move debug flag into its own global var (G.debug), split up debug options.
...
--debug
--debug-ffmpeg
--debug-python
--debug-events
--debug-wm
This makes debug output easier to read - event debug prints would flood output too much before.
For convenience:
--debug-all turns all debug flags on (works as --debug did before).
also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
Campbell Barton
abf551b1a5
style cleanup: py api
2012-03-26 20:41:54 +00:00
Campbell Barton
5a90ea77bc
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
2012-03-24 06:24:53 +00:00
Campbell Barton
3b9b53d876
fix [ #30589 ] RNA function descriptions not showing in Python console on autocomplete
...
show rna function description and arguments now.
2012-03-20 07:41:47 +00:00
Campbell Barton
b163e19b8d
py api:
...
fix for collection functions not showing up in __dir__,
eg, console autocomplete didnt show up bpy.data.libraries.load
also fix refcounting leak with returning attributes from collections.
2012-03-20 03:13:25 +00:00
Campbell Barton
4f19c1a995
spelling cleanup
2012-03-18 07:38:51 +00:00
Campbell Barton
02f707e9da
minor mathutils code cleanup - use mathutils callbacks as unsigned chars everywhere.
2012-03-17 10:46:02 +00:00
Campbell Barton
70d3d1aca6
style cleanup: py/capi
2012-03-16 21:39:56 +00:00
Campbell Barton
ebec111618
bmesh py api:
...
Wrap customdata, so far you can access the data layers in a pythonic way but not manipulate the customdata yet.
provides dictionary like access to customdata layers, eg:
texpoly = bm.faces.tex["UVMap"]
print(bm.verts.shape.keys()) # un-intended pun, keys() works on all layers.
print("MyInt" in bm.edges.int) # __contains__
layer = bm.faces.get("CheckForLayer")
2012-03-16 05:03:13 +00:00
Campbell Barton
2fbb5ce833
bmesh py api: more comprehensive intro page, also fix some spelling errors.
2012-03-13 06:22:43 +00:00
Campbell Barton
4f7bdc59d3
style cleanup: spelling.
...
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
Campbell Barton
79d97ca509
style cleanup - spelling.
2012-03-08 04:12:11 +00:00
Campbell Barton
3590076193
style cleanup - comment formatting
2012-03-03 20:36:09 +00:00
Campbell Barton
95bba22af0
fix for error report in property registration, it wasnt printing the error.
2012-03-03 00:20:05 +00:00
Campbell Barton
ea13ec1699
Spelling Cleanup
2012-03-01 12:20:18 +00:00
Campbell Barton
47c373c7a9
style cleanup (mostly whitespace)
2012-02-27 10:35:39 +00:00
Campbell Barton
74e9563b8a
* bmesh py api BMEdge.verts was using 2 v1's
...
* bmesh pu api __repr__ functions for mesh data.
* correct py hash defines.
2012-02-26 17:20:36 +00:00
Campbell Barton
3fc2fbc333
style cleanup, use { on newline after function definition.
...
spelling 'impliment' -> 'implement'
2012-02-25 16:49:59 +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
1f40f01435
correct exception - was using a TypeError when should be a ValueError.
2012-02-22 09:13:29 +00:00