d7257a983f
bugfix [ #26454 ] WITH_PYTHON_SAFETY crash.
2011-03-11 02:43:30 +00:00
e5ee4faad3
update for blender as a py module & python 3.2
2011-03-09 04:58:44 +00:00
65273cf82f
- correct python3.1 warning message.
...
- for new shadow only enum, use humanly readable RNA enum values.
- update cmake unix example for custom python.
2011-03-08 22:11:15 +00:00
471c0c1afb
py-api utf8/filepaths:
...
in function PyC_UnicodeAsByte(), replace code copied from python with PyUnicode_EncodeFSDefault(), new in py3.2.
2011-03-08 01:28:10 +00:00
e713d76f0e
patch [ #26404 ] UnicodeDecodeError
...
from user: perfection cat (sindra1961)
2011-03-08 01:23:42 +00:00
cfd9d6d190
Drop support for python 3.1.
...
for building py3.2 on *nix see:
http://wiki.blender.org/index.php?title=Dev:2.5/Doc/Building_Blender/Linux/Troubleshooting#Python
also fixed possible buffer overrun with getting the fake filepath for a blender textblock.
2011-03-07 11:53:40 +00:00
91f4a4d7e1
fix [ #26323 ] Crash when adding to a vertex group with a raw in
2011-03-05 05:02:37 +00:00
Nathan Letwory
5b6223fdeb
Py_hash_t is new typedef in Python 3.2, typedeffing Py_ssize_t. Changing to that to keep "slow adaptors" happy ;)
2011-03-04 11:08:22 +00:00
Nathan Letwory
292f633698
long hash caused stack corruption in _PySet_NextEntry. This wanted a Py_hash_t, so made hash into such.
2011-03-04 10:37:49 +00:00
e197cc95e6
fix crash from own recent changes [ #26271 ] Crash when accessing bpy.data.node_groups
2011-03-03 13:55:15 +00:00
e8c322ee85
Py/RNA API: WITH_PYTHON_SAFETY
...
compile time option which enables extra safety checks.
since this is noticeably slower I rather not enable by default yet.
2011-03-03 12:00:35 +00:00
b6b77b8426
Py/RNA api:
...
fix for crash when iterating over a collection which allocates the collection and frees on when finished.
The ability for BPy_StructRNA to hold a reference to other PyObject's was added to support this.
2011-03-03 09:16:06 +00:00
57436f3013
fix for own error made r35267.
2011-03-03 08:01:11 +00:00
3a2ce2be83
Py/RNA api - real collection iterator
...
Previously the api just converted the collection to a list and got the iterator from the list to return.
This has the advantage that it uses minimal memory on large collections where before it would make an array.
Though the main reason for this change is to support a bugfix for collections which free memory when they are done, this currently crashes the python api since once the list is built, the data is freed which is used by the list items in some cases (dynamic enums for eg).
2011-03-03 07:41:09 +00:00
b535c738d9
further reading, need to untrack tracked PyObjects before clearing their trackable vars.
2011-03-03 06:14:55 +00:00
c42f3b4e59
support for mathutils GC wasn't complete since PyObject_GC_Track is supposed to be called once the fields are filled in.
2011-03-03 06:01:31 +00:00
5f5fb5061b
formatting edits. (no functional changes)
2011-03-03 05:42:16 +00:00
9c45fed287
Change RNA weakref code to use a ghash rather then a PyList, removing items from the list was far too slow.
2011-03-02 18:59:43 +00:00
415e8df10e
simplify rna internal weakref use.
2011-03-02 16:56:13 +00:00
0abffe22c2
align weakref list for rna (properties were using wrong pointer)
2011-03-02 16:22:04 +00:00
7159bc0b1c
minor fixes to weakref validation before making bigger changes
2011-03-02 06:56:21 +00:00
54b654c18f
fixed compile problem intruduced in r35295
...
one import was missing, another one used twice.
2011-03-02 06:47:08 +00:00
58eb5ffc28
SVN maintenance.
2011-03-02 05:06:43 +00:00
e2304a4dbb
move anim functions out of bpy_rna.c, its getting too big.
2011-03-02 04:51:43 +00:00
623822626a
Py/RNA Stability: don't allow python to reference freed ID's and crash.
...
Second method for not having python crash blender on invalid access (ifdef'd out ATM, so no functional change).
This uses a weakref list per ID, and invalidates all members of that list when the ID is freed.
the list is not stores in the ID pointer but using a hash table since storing python in DNA data is not acceptable.
This is more correct then the previous method but shows down execution of scripts significantly since its always adding and removing from lists when data is created and freed.
2011-03-01 14:53:26 +00:00
c9ee017fb5
Py/RNA API test code to prevent crashing blender when python references freed ID's.
...
This uses pythons GC so its no overhead during runtime but makes removing ID's slower.
Commented definition 'USE_PYRNA_INVALIDATE_GC' for now, so no functional change.
2011-03-01 09:02:54 +00:00
7b636c717d
bpy/rna support for invalidating objects.
...
access will raise an error.
2011-02-28 22:56:29 +00:00
55268331f6
missed these last commit.
2011-02-28 21:06:09 +00:00
7348a50d79
change return values from mathutils callbacks to match pythons (-1 is error), so error macro's can be used in both.
2011-02-28 18:42:41 +00:00
Nathan Letwory
5a760e22fc
doxygen: blender/python tagged.
2011-02-27 20:10:08 +00:00
2e5eb41522
pedantic warning cleanup, also remove texspace_edit() since its been added using a different method.
2011-02-27 08:31:10 +00:00
61235fcc8a
fix for 'live edit', running python scripts as you type
...
- errors would jump to the line which gets in the way.
- the window wouldn't always redraw.
2011-02-26 15:30:38 +00:00
457aba9d1b
fix [ #26227 ] "Sequence must have 2 items total, not -2"
2011-02-26 12:26:01 +00:00
18c7354bd2
remove warning left in by mistake and comment unused function.
2011-02-25 02:27:54 +00:00
cd615f6fcc
found moving verts in pythons 2.5 api is approx 10x slower because the multi-dimensional array assignment reads the array 3 times (typecheck, length-check & for-real).
...
the length check was running sequence checks on every number which would fail, small speedup by avoiding this.
should eventually get this working faster by reading once into an allocated array.
2011-02-24 08:47:58 +00:00
31c7d694e0
remove 2 unnecessary checks for array type before assignment.
2011-02-24 07:25:47 +00:00
fbd9364944
revert part of own commit r35117 which modified mathutils initialization functions, found this could be done in a better way which doesnt have to deal with partly initialize instances being freed.
2011-02-24 05:46:57 +00:00
b1639dc118
support pythons cyclic garbage collector for mathutils types.
2011-02-24 04:58:51 +00:00
Nathan Letwory
9aa9ade42a
doxygen: some more license block fixes.
2011-02-23 23:22:25 +00:00
65bb4ff8d1
py/rna api:
...
ifdef'd out weakref for blender/py api, worth testing to see if it adds much overhead.
2011-02-23 13:43:45 +00:00
Nathan Letwory
5b607701a7
doxygen: prevent GPL license block from being parsed as doxygen comment.
2011-02-23 10:52:22 +00:00
9416daf97e
remove unused functions,
...
note: BPY_class_validate() could come in handy later if we need to check classes for properties/functions but for now there is no point in keeping it in.
2011-02-23 09:12:55 +00:00
692b711bf4
SVN maintenance.
2011-02-22 20:47:17 +00:00
bde2f96257
blender as module - workaround for not knowing __file__ when the module is initialized.
2011-02-22 14:19:09 +00:00
d60a5cfc55
feature back from 2.4x where a python error moves the cursor to the error line, added moving to exact column for syntax errors too.
2011-02-22 11:32:29 +00:00
8186ba15ab
last commit used py3.2 function, inline for py3.1
2011-02-22 08:29:25 +00:00
1e120098fc
pyapi, use direct access to the frame rather then python attributes.
2011-02-22 07:57:18 +00:00
dd8383e469
make doc generation close files (py3.2 complains about this),
...
minor formatting changes for C docstrings.
2011-02-22 05:23:20 +00:00
9ef0eed4b6
build python module without binreloc, add dummy argv[0] to initialize bprogname.
2011-02-21 13:13:08 +00:00
Nathan Letwory
cff782e5f1
Missed this in battle against BLO vs MEM storm.
2011-02-21 12:54:40 +00:00