Commit Graph

466 Commits

Author SHA1 Message Date
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
6b3f5ecd18 change to fcurve keyframe coords broke simplify addon since the property
was no longer wrapped by python as a vector. now fixed size float arrays
with PROP_NONE subtype are wrapped as vectors since its convenient to
have x/y access.
2011-04-08 01:40:54 +00:00
371a7b477d Fix register method order. Was broken when Campbell moved it to the C implementation.
register has to be called AFTER the type is registered while unregister has to be called BEFORE it's unregistered.
2011-04-02 14:58:58 +00:00
66a1259153 fix for crash when running blender with define WITH_PYTHON_SAFETY & no startup.blend was found.
was calling python function when python was not initialized.
2011-03-31 04:43:26 +00:00
bf1e2ce41e color gamma (such as theme colors), were not being wrapped by python as 'mathutils.Color' types 2011-03-28 13:47:39 +00:00
587bbc4213 fix [#26616] Line of code make Blender crash 2011-03-27 06:56:37 +00:00
f87b37b3ef allow unregistered rna classes to have rna properties assigned before registration.
this is useful for the register() class method which is called before the class gets structRNA assigned.

eg:

class MyClass(bpy.types.PropertyGroup):
    @classmethod
    def register(cls):
        cls.name = StringProperty()  # assigned but registration is delayed.
2011-03-23 12:44:22 +00:00
1b80538fea fix [#25688] undocumted functions in pyapi
expose collection function docs.
2011-03-22 04:28:51 +00:00
f3686b5885 py/api registration:
move calls to the classes register/unregister function into register_class() / unregister_class() and add docs.

also other minor changes:
- remove face sorting keybinding, was Ctrl+Alt+F, this is quite and obscure feature and face order normally doesn't matter, so access from Face menu is enough.
- add commented out call to mesh.validate() in addon template since its useful to correct incomplete meshes during development.
2011-03-22 01:38:26 +00:00
cadc1218c8 C, style changes (mostly white space edits), no functional change. 2011-03-19 11:12:48 +00:00
3ac925b7d1 fix own error - missing NULL check [#26523] Crash when load factory settings ( linked to rigify add-on ? ) 2011-03-16 22:25:31 +00:00
dc5a78ac25 fix own error [#26522] Api autocomplete return many errors
collections were getting __call__ attribute from the StructRNA, now ignore all starting with '_'
2011-03-16 21:58:45 +00:00
f2b1645a75 fix/disallow [#26502] segmentationfault on pressing button to browse existing images for UV window
creating RNA within draw functions can free existing RNA, crashing blender when this is already used in the UI.
disallowing this so it raises a python exception.

This was being used to dynamically generate addon categories so for now they are hard coded and we need proper enum-functions for python to do this.
2011-03-14 23:02:47 +00:00
4a747bebf4 fix [#26489] Auto completion in console broken
own mistake in r35492.
2011-03-14 05:39:07 +00:00