Campbell Barton
fa2ba5fbf5
- use static vars and functions where possible.
...
- use NULL rather than 0 when used as pointers.
2011-08-28 05:06:30 +00:00
Campbell Barton
a9dea3afe9
correct missing bpy doc references.
2011-08-26 18:48:48 +00:00
Campbell Barton
8a619a3eee
fix for crash when running a python script in a non utf8 blend path, inspecting the exception for the path assumed utf8.
2011-08-26 17:55:03 +00:00
Campbell Barton
566da26173
file-selector: when converting operator arguments to the file selector, wasnt making paths absolute (abs paths are made relative when converting the other way).
2011-08-26 01:32:07 +00:00
Campbell Barton
291ae8822d
executing operators that changed the context from the console wasnt returning an operator set/flag.
2011-08-25 17:59:37 +00:00
Campbell Barton
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
Campbell Barton
166970f68e
bpy-rna - simplify enum string/set parsing.
2011-08-25 17:01:33 +00:00
Campbell Barton
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
Brecht Van Lommel
29bdf37f9d
Cycles: svn merge -r39457:39669 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2011-08-24 09:44:08 +00:00
Campbell Barton
a937729f38
properly escape chars for pythons bpy objects __repr__
2011-08-22 18:13:37 +00:00
Campbell Barton
a0a96a84fe
fix for crash when loading a file from a script, and executing user modules in the newly loaded file.
2011-08-20 13:29:42 +00:00
Campbell Barton
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
Campbell Barton
561b49e925
minor style change
2011-08-19 10:35:47 +00:00
Campbell Barton
2bd016fe3f
formatting edits, no functional changes.
2011-08-18 12:20:10 +00:00
Brecht Van Lommel
c7fce6be2e
Cycles: svn merge -r39132:39457 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2011-08-16 18:59:45 +00:00
Brecht Van Lommel
360fcd73fe
Cycles:
...
* add some (disabled) test code for using OpenImageIO in imbuf
* link cycles, openimageio and boost into blender instead of a shared library
* some cmakefile changes to simplify the code and follow conventions better
* this may solve running cycles problems on windows XP, or give a different
and hopefully more useful error message
2011-08-16 16:15:34 +00:00
Campbell Barton
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
Campbell Barton
a7663cc377
use ghash for operator and menu types, was doing string lookup in the operator list (containing over 1000 items) for each button draw.
...
gives small speedup for UI drawing and overall startup time.
2011-08-11 06:06:17 +00:00
Campbell Barton
4262bd2906
fix [ #28196 ] Unwrap tris in lightmap pack
2011-08-09 20:00:53 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
f77af0a8ce
change BLO_library_append_begin to take a main argument rather then a context, means the BGE doesnt need to make a new empty context just to pass as an arg.
...
added doxygen description too.
this quiets the print when the BGE does linking.
2011-08-05 05:26:19 +00:00
Campbell Barton
e5e6f91856
fix [ #28114 ] Render Crash
...
existing check for driver to use GIL was not thread safe and could cause, details in the report.
This bug was caused by a check to avoid hanging, a fix for [#27683 ] that worked in 2.4x because the UI didn't use python to draw while rendering.
Apply a different fix for [#27683 ], when calling an operator, call PyEval_SaveThread(), then PyEval_RestoreThread() so the GIL can be aquired by threads started by the operator - in this case bake starting a thread that evaluates drivers.
2011-08-04 01:56:36 +00:00
Campbell Barton
de0db6c8da
unit arg for FloatVectorProeprty
2011-08-02 10:56:09 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
35ce13562d
script to report deprecated functions of text and their age in days.
2011-07-18 09:49:26 +00:00
Campbell Barton
5792bd7cc7
cmake: cleanup include paths, some duplicates and going up some unneeded dirs.
2011-07-17 09:11:13 +00:00
Campbell Barton
410c5e3cd2
cmake source definitions:
...
remove missing includes and use more strict formatting.
2011-07-16 23:01:14 +00:00
Campbell Barton
3a6158a8bf
move mathutils into its own lib.
2011-07-15 04:01:47 +00:00
Campbell Barton
80eb1eae42
run WM_exit(C) when blender as a python module exits
2011-07-10 18:54:02 +00:00
Campbell Barton
7370ba1839
fix for NULL pointer usages
2011-07-09 19:59:32 +00:00
Campbell Barton
d5984b2d50
fix [ #27683 ] Blender hangs when baking a particle system when a driver is present
2011-07-09 17:41:39 +00:00
Campbell Barton
d29d3a89e4
fix for building WITH_PYTHON_MODULE
2011-07-03 19:15:46 +00:00
Guillermo S. Romero
a03707d408
SVN maintenance.
2011-06-24 23:14:26 +00:00
Campbell Barton
12e02fd474
own patch [ #27752 ] Python Callback (Scriptlink functionality)
...
Python:
* adds bpy.app.handlers which contains lists, each for an event type:
render_pre, render_post, load_pre, load_post, save_pre, save_post
* each list item needs to be a callable object which takes 1 argument (the ID).
* callbacks are cleared on file load.
Example:
def MyFunc(scene): print("Callback:", data)
bpy.app.handlers.render_post.append(MyFunc)
C:
* This patch adds a generic C callback api which is currently only used by python.
* Unlike python callbacks these are not cleared on file load.
2011-06-24 16:54:30 +00:00
Campbell Barton
2023db70a8
cmake option to build without an audio library.
2011-06-23 09:27:56 +00:00
Campbell Barton
eaae38551f
pep8 compliance
2011-06-21 17:17:51 +00:00
Campbell Barton
d33b63c5d8
update cmake checker to ignore file list and add some headers to the source list.
2011-06-21 17:00:34 +00:00
Campbell Barton
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
Guillermo S. Romero
31093223cd
SVN maintenance.
2011-06-18 23:22:55 +00:00
Campbell Barton
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
Campbell Barton
7cbc4c0dd7
IDProperty python module update
...
- add support for IDProp array slicing, but not resizing.
- rename array attribute type to typecode and use chars 'f', 'd', 'i' which match pythons array module. (was using int's which only have a meaning internally).
- rename function 'convert_to_pyobject' to 'to_dict' and 'to_list' for IDProp group and array types respectively.
- remove 'len' array attribute, calling len(array) is fine.
2011-06-17 05:45:46 +00:00
Campbell Barton
897b570c1a
ulti line formatting for PyErr_Format calls (no functional change)
2011-06-17 02:26:34 +00:00
Campbell Barton
1356082063
fix [ #27681 ] Python: crash assigning a 'set' to an array
2011-06-17 02:22:38 +00:00
Campbell Barton
e44ae2c2a9
disable the readonly state while rna property callbacks run.
2011-06-07 16:08:49 +00:00
Campbell Barton
9c8cc9fe60
rna option not to save certain properties for redoing later, currently only used by operator presets.
2011-06-07 10:54:57 +00:00
Campbell Barton
617a08162f
update ctest md5sums for import/export to match changes to the scripts, also some minor formatting change for bpy_props.c
2011-06-07 08:47:33 +00:00
Campbell Barton
8cee328546
Support for update callbacks in python defined RNA properties as discussed last meeting.
...
This means script authors can perform actions using these callbacks rather then on drawing which puts blender in a readonly state.
Simple example:
import bpy
def up_func(self, context):
print("test")
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=up_func)
bpy.context.scene.testprop = 11
# prints -> test
2011-06-06 17:50:20 +00:00
Campbell Barton
619df86fad
panel headers were not scaling with DPI properly
2011-06-05 12:47:17 +00:00