9a88524f68
support for object data material assignment in python
...
eg:
bpy.context.object.data.materials[0] = bpy.data.materials["SomeMaterial"]
2011-10-01 17:54:33 +00:00
975c4e7177
fix for msvc, I thought this was only needed for mingw.
2011-10-01 15:54:36 +00:00
7b398f271e
fix for mingw
2011-10-01 15:02:55 +00:00
bfbfe16570
take 2 at fixing the crash...
2011-09-29 09:29:46 +00:00
e5078f196f
Attempt to fix error reported by yafaray devs from my commit r40660
2011-09-29 09:19:15 +00:00
b88776ba5a
fix for crash with demo mode addon, modal operator loading a blend file would free all window data which was then accessed, causing a crash.
2011-09-28 15:42:55 +00:00
018fa1540e
whitespace edits, make formatting for functions consustent at least within the file.
2011-09-28 05:53:40 +00:00
928e2784c6
py api
...
- use Py_ssize_t when dealing with python sequence sizes
- dont call PySequence_Size(py_b) in a loop (its slow).
- use faster sequence/float parsing in aud.Factory.filter
2011-09-27 05:28:06 +00:00
573ed73be8
change define INTERNATIONAL --> WITH_INTERNATIONAL
...
also rename backface_culling --> use_backface_culling (which is used elsewhere in rna)
2011-09-26 10:35:47 +00:00
943a026c60
py/rna string subtypes for strings which should be automatically translated:
...
layout.prop("blah", text="Translate Me!")
2011-09-21 13:53:35 +00:00
264c63ef03
New C/Py api utility function PyC_Err_Format_Prefix() which raises an error with the existing error as a suffix.
...
Use this to raise errors when assigning a string property fails even though the value to assign *is* a string.
Before:
TypeError: bpy_struct: item.attr= val: Object.name expected a string type, not str
After:
TypeError: bpy_struct: item.attr= val: Object.name error assigning string, UnicodeEncodeError('utf-8' codec can't encode character '\udce9' in position 23: surrogates not allowed)
2011-09-15 10:43:55 +00:00
a59ba9a519
- turn RNA_warning into a macro which includes the function name (was being written in manually but had incorrect func names in places).
...
- add __func__ define to BLI_utildefines.h for MSVC.
2011-09-09 01:29:53 +00:00
9161d3ce4b
use Py_ssize_t rather than int when dealing with list sizes (original patch from Fedora but applied changes elsewhere too), also replace PyList_Size with PyList_GET_SIZE where typechecking is already done.
2011-09-06 23:46:20 +00:00
0cd5dce245
whitespace edits
2011-09-03 02:15:49 +00:00
a8e49cd55a
use a fixed 32byte buffer for getting an rna string from python. gives a slight speedup when drawing heavy UI's
2011-09-01 09:47:21 +00:00
b3704f45c4
Fixes for snprintf usage:
...
* replace by BLI_snprintf in various places, note _snprintf on windows
does not properly null terminate the string.
* fix overflow in sequencer proxy code due to buffer being smaller than
specified size.
* fix some usage of snprintf as strcpy, this is will go wrong if the
string contains % characters.
* remove BLI_dynstr_printf function in gpu module, use BLI_dynstr_appendf
2011-08-30 10:07:50 +00:00
a9dea3afe9
correct missing bpy doc references.
2011-08-26 18:48:48 +00:00
291ae8822d
executing operators that changed the context from the console wasnt returning an operator set/flag.
2011-08-25 17:59:37 +00:00
9436769cd4
error when a python operator gave an incorrect return value was near useless, re-raise a more comprehensive error which includes the operator name.
2011-08-25 17:54:30 +00:00
166970f68e
bpy-rna - simplify enum string/set parsing.
2011-08-25 17:01:33 +00:00
82e622f158
fix [ #28356 ] Import export STL files, problem in script in version r39307
...
& correct some bad comments.
2011-08-24 14:22:41 +00:00
a937729f38
properly escape chars for pythons bpy objects __repr__
2011-08-22 18:13:37 +00:00
2c1182664c
minor speedup to python/rna api keyword argument lookups.
...
- dont use hash lookups in this case because converting the string to unicode and doing a hash lookup is slower then looping over the keys and comparing (which avoids creating and throwning away a unicode string).
2011-08-19 10:38:34 +00:00
561b49e925
minor style change
2011-08-19 10:35:47 +00:00
2bd016fe3f
formatting edits, no functional changes.
2011-08-18 12:20:10 +00:00
540f0c64b5
add in asserts for when array/non array RNA funcions are used incorrectly, would have made previous fix a lot easier to find.
...
also remove unused argument from RNA_property_array_check.
2011-08-14 10:28:18 +00:00
3a82a690ab
ifdef out support for for python owning and freeing BPy_StructRNA because this is only used for doc generation and it makes _every_ blender/python instance 4 bytes bigger - vertex/bezier point/object/scene/group etc.
2011-08-05 16:29:38 +00:00
85fe36ab61
pyrna - add own callable function type rather then using a standard python method, gives small speedup drawing buttons since every layout.prop/col/operator/menu etc creates and throws away one of these.
2011-08-05 16:21:37 +00:00
f4293067c1
py api: sphinx doc corrections, pep8 cleanup and style edits, also added __all__ to some modules which were missing it.
2011-07-31 03:15:37 +00:00
d163ce5595
bpy fix for crash/assert on running dir() on a non collection property + some other minor corrections.
2011-07-30 13:18:04 +00:00
35ce13562d
script to report deprecated functions of text and their age in days.
2011-07-18 09:49:26 +00:00
3a6158a8bf
move mathutils into its own lib.
2011-07-15 04:01:47 +00:00
7370ba1839
fix for NULL pointer usages
2011-07-09 19:59:32 +00:00
d33b63c5d8
update cmake checker to ignore file list and add some headers to the source list.
2011-06-21 17:00:34 +00:00
a50aa13fac
py api: make all classes __init__ functions in a readonly state, except for operators.
...
In bug [#27701 ], the panels __init__ function (which runs on every draw), was adding new rna properties.
2011-06-21 08:09:42 +00:00
82216030e9
py-api: store frequently used strings as unicode PyObject's to avoid creating/distroying every time.
...
also fix for cmake warning
2011-06-18 08:45:45 +00:00
1356082063
fix [ #27681 ] Python: crash assigning a 'set' to an array
2011-06-17 02:22:38 +00:00
e44ae2c2a9
disable the readonly state while rna property callbacks run.
2011-06-07 16:08:49 +00:00
d46da5a09d
mathutils support for color arithmetic, also some minor whitespace edits.
2011-06-02 08:29:16 +00:00
11014aa34b
access pythons code object directly rather than attribute access.
2011-05-29 11:05:52 +00:00
9b5800bcd7
fixed "rather then" -> "rather than" typos all over the place
2011-05-28 13:11:24 +00:00
78d41d061b
sphinx docstrng formatting (some lines were getting really long)
2011-05-26 19:13:01 +00:00
15289c6048
use PyDoc_STRVAR macro, so its possible to build without docstrings.
2011-05-24 16:05:51 +00:00
66f51ba5d1
RNA: make mechanism used by operators to keep python instance alive more generic, to be used by render engine later.
2011-05-18 11:21:10 +00:00
178ba76b09
RNA: pass Main rather than Context to register/unregister callbacks.
2011-05-18 10:56:26 +00:00
ba5d18b41f
py/rna debugging option (defaults to off), which quickly exposes errors with RNA functions holding string pointers by making a temp copy of the string and freeing after the function is called.
2011-05-06 03:29:55 +00:00
f86565c90e
whitespace edits for bpy api, split some really long lines.
2011-04-30 13:58:31 +00:00
f9f771cd01
converted more mixed tab/space indentations to tabs. only whitespace changes.
2011-04-21 15:53:30 +00:00
6bb626f253
minor changes
...
- remove some warnings
- fix typos
- cmake allow in-source build (when WITH_IN_SOURCE_BUILD is defined)
- cmake, use an explicit list of rna files (don't glob)
2011-04-21 05:49:47 +00:00
70cd0803ab
add new subtype PROP_COORDS, for generic coordinates that are not to be changed by units.
2011-04-08 13:32:56 +00:00