Campbell Barton
89c617a116
remove nan-makefiles
2011-01-30 15:29:22 +00:00
Campbell Barton
45fc590835
internal changes, script writers won't notice.
...
disable getattr metaclass forwarding attributes from the python class, eg:
bpy.types.Scene.foo != bpy.types.Scene.bl_rna.properties['foo']
... This was convenient but too tricky to properly maintain with attribute assignment and attributes defined within the class.
avoid doubles in dir() by converting to a set and then back to a list.
2011-01-27 06:48:14 +00:00
Campbell Barton
dc30caab61
fix for crash when assigning unsupported type to collection properties.
2011-01-26 12:44:09 +00:00
Campbell Barton
1bd0db59f4
use cmake defined names for jpeg, png, zlib and python libs, building on *nix with non-standard libjpeg/png/zlib locations was broken.
...
in the case of python this makes it easier to move to find_package(PythonLibs) when 3.x is supported.
2011-01-25 14:43:13 +00:00
Campbell Barton
57289044ca
improve unregister error check not to loop over parent classes properties (would check the same property multiple times)
2011-01-25 07:31:11 +00:00
Campbell Barton
c0e74f9dce
fix [ #25748 ] Addons register parameters/functions more than once
...
- values were added to both the classes __dict__ as well as the internal StructRNA.
- made properties available from the type since this is where the python api assigns them:
>>> bpy.types.Scene.frame_start
<bpy_struct, IntProperty("frame_start")>
- rename RNA_struct_type_properties() -> RNA_struct_type_properties(), added RNA_struct_type_find_property()
2011-01-25 06:54:57 +00:00
Campbell Barton
27cb6218a3
fix [ #25778 ] Memoryblock Data from SCR: end corrupt
...
+ other minor changes.
2011-01-25 01:51:28 +00:00
Campbell Barton
c0f161f811
fix [ #25776 ] Crash when operator's bl_idname has more than one dot
2011-01-24 05:15:14 +00:00
Campbell Barton
daa09a4a60
Raise an exception when registering classes with ID names which are too long. (related to bug ), found while looking into bug [ #25776 ].
2011-01-24 03:38:34 +00:00
Tamito Kajiyama
50ced6b017
Merged changes in the trunk up to revision 34459.
2011-01-22 23:38:28 +00:00
Campbell Barton
161cbed9b5
new command line option '--factory-startup' to skip reading startup.blend. useful for testing with a predictable environment.
...
also commented python benchmark prints on exit, can enable when profiling later.
2011-01-19 09:13:24 +00:00
Campbell Barton
3b0c2accc6
support building with python3.2
2011-01-18 21:39:50 +00:00
Campbell Barton
08dc18fda0
rename fcurve.keyframe_points.add() --> insert()
...
add new add function which allocates a number of points instead.
2011-01-18 11:27:52 +00:00
Campbell Barton
8cf1184c04
bad spelling; 'indicies' --> 'indices'
2011-01-18 01:58:19 +00:00
Campbell Barton
86baf7c937
option for the path iterator to loop over packed files so their dir separator can be switched on file load.
2011-01-18 00:10:11 +00:00
Campbell Barton
ba96f02d4a
use fast sequence functions for python's bpy.props.EnumProperty() arg parsing.
2011-01-16 10:36:27 +00:00
Campbell Barton
4dd92a988a
Defining bpy.props.EnumProperty(... , options={'ENUM_FLAG'}) wasnt working right with default values.
2011-01-16 10:08:20 +00:00
Tamito Kajiyama
c7a122aa27
Merged changes in the trunk up to revision 34335.
2011-01-15 23:09:52 +00:00
Campbell Barton
c8df192de6
misc python api improvements
...
- rna array parsing was using PySequence_Size() in a loop, this can be slow to run so only call once.
- assigning a single value to a multi-dimensional array was missing type check.
- improve exception messages for rna array type errors.
- simplify vector slice assignment by using mathutils_array_parse(...)
2011-01-13 21:44:18 +00:00
Campbell Barton
665648a40b
bugfix [ #25578 ] assigning to multi-dimensional arrays fails
2011-01-13 16:00:14 +00:00
Campbell Barton
8227b3d463
remove/comment unused vars
...
also removed unnecessary NULL checks (where the pointer was used later without checking).
2011-01-13 04:53:55 +00:00
Campbell Barton
35e68e9785
- bpy.data.lamps.new() now takes a type argument since lamp type also sets class type this avoids needing to use ugly lamp.type_recast() after changing type.
...
- default vertex color layer name was UTTex when added from python.
2011-01-11 02:30:01 +00:00
Tamito Kajiyama
e6f92e2b91
Merged changes in the trunk up to revision 34201.
2011-01-09 17:56:26 +00:00
Campbell Barton
00b8c9e7ea
rename BKE_assert() --> BLI_assert().
2011-01-09 15:12:08 +00:00
Tamito Kajiyama
0ec378f3fe
Merged changes in the trunk up to revision 34193.
...
Conflicts resolved:
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_nla/nla_channels.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c
API changes resolved:
source/blender/freestyle/intern/system/PythonInterpreter.h
2011-01-09 15:07:14 +00:00
Campbell Barton
c9f353956c
use PySequence_Size() rather then PySequence_Length(), this is only kept in python for backwards compatibility.
2011-01-09 14:53:18 +00:00
Campbell Barton
02aab4977f
quiet zombie python class warning. bug remains but its not useful to print out so many errors when this wont be fixed for a while.
2011-01-09 11:54:12 +00:00
Campbell Barton
89c9aaaa25
remove references to BKE_utildefines where its not needed.
...
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
Campbell Barton
8f21a43535
split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
...
no functional changes.
2011-01-07 18:36:47 +00:00
Campbell Barton
0f2089afa1
py/rna api speedup for collection slicing in all cases, rather then having an exception for [:].
...
- avoid looping over the entire collection unless a negative index is used.
- dont use the get index function for building the slice list, instead loop over the collection until the stop value.
2011-01-07 05:33:30 +00:00
Campbell Barton
68b931b03f
py/rna optimizations, will help for faster exporting.
...
Speedup for getting collection indices, avoid getting the collection length unless a negative index is given. This avoids a loop over the entire collection in many cases.
Speedup for getting collection slices by detecting collection[:] and internally calling collection.values(), this gives a big speedup with some collections because each slice item would loop over the list until that index was found.
Rough test with 336 objects.
- getting index of listbase collection ~ 5.0x faster
- getting index of array collection ~ 1.15x faster
- getting slices of listbase collections ~ 34.0x faster
- getting slices of array collections ~ 1.5x faster
2011-01-06 04:01:06 +00:00
Campbell Barton
978bc0d8ac
fix for py/rna mesh.materials[:] where empty materials exist, would raise a runtime exception.
...
problem was there was no way to tell the difference between getting an empty item from a collection or the item not being found.
2011-01-05 14:49:08 +00:00
Campbell Barton
96b646c68d
edits for BPY_extern.h functions, no functional changes
...
- remove unused code.
- BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec
- renamed funcs.
2011-01-05 02:08:54 +00:00
Campbell Barton
6b82aa8d01
fix for crash when some classes didnt register properly (this included loading sintel.blend).
2011-01-03 18:15:15 +00:00
Campbell Barton
33a5a69d25
fix for own error with mathutils.geometry argument parsing.
...
also raise ValueError when the vector size is incorrect rather then type error.
2011-01-03 12:11:05 +00:00
Tamito Kajiyama
ddcb91fc21
Merged changes in the trunk up to revision 34010.
2011-01-02 18:34:32 +00:00
Campbell Barton
a7ceeafd71
- correct typos in comments.
...
- move boxpack struct out of the public header.
2011-01-02 11:06:50 +00:00
Campbell Barton
f101e59e09
python api: rna array slices now return tuples rather then lists (fits with recent change made to mathutils).
...
minor improvements/cleanup to exporters.
2011-01-02 09:54:44 +00:00
Campbell Barton
cdefce51f5
update python api with changes from Joshua's commit r33917. translate reports into python errors.
2010-12-31 05:40:30 +00:00
Campbell Barton
6fdfa97edb
CMake: use blender_include_dirs("${OPENGL_INCLUDE_DIR}") rather then blender_include_dirs(${OPENGL_INCLUDE_DIR})
...
Apparently this is needed for MSVC in some cases, reported by Tamito Kajiyama r33895.
2010-12-31 04:29:11 +00:00
Joshua Leung
71da1e96d1
Drivers Code Cleanups and UI Tweaks:
...
- Adding drivers from the UI (not from py-scripts though) will now
automatically add a "Transform Channel" driver variable to the newly
created drivers. This makes setting up drivers a bit more convenient
for the most commonly used case.
- Drivers now report their errors using the Reports system instead of
writing these directly to the console.
- Clarified some comments to be more insightful about the "why's" of
some design decisions, and related formatting/cleanup tweaks
- Reduced scope of "path" vars to just the scope they're required in
- Removed some unused defines from a failed experiment in the original
Keying Sets code ("templates" and "template flags") which was
superseeded by the more flexible + nicer "Builtin KeyingSets"
2010-12-28 05:45:15 +00:00
Tamito Kajiyama
3ead3c4ff3
Merged changes in the trunk up to revision 33894.
...
A note for branch users: CMake 2.8 on 64-bit Windows Vista raised
an error in line 948 of soc-2008-mxcurioni/CMakeLists.txt due to
an invalid argument for the blender_include_dirs macro:
blender_include_dirs(${OPENGL_INCLUDE_DIR})
The command above should be:
blender_include_dirs("${OPENGL_INCLUDE_DIR}")
2010-12-27 01:38:23 +00:00
Campbell Barton
5e382eb8e5
rename blenderlib to blender_add_lib
2010-12-22 23:09:30 +00:00
Campbell Barton
54343b79e6
remove reload() from builtins since python3 no longer uses this.
...
use imp.reload now.
Should use import hooks but for now replace imp.reload with our own reload as the builtin reload was replaced before.
2010-12-22 21:39:48 +00:00
Tamito Kajiyama
3368a595da
Merged changes in the trunk up to revision 33765.
2010-12-18 11:49:12 +00:00
Campbell Barton
77c17d332d
fix [ #25262 ] Keyboard shortcut presets can't be made because of wrong folder
...
New create option when getting a user resource for creating paths.
bpy.utils.user_resource(type, path, create=False)
2010-12-18 07:22:52 +00:00
Campbell Barton
35fa581403
BKE_assert(), only prints the error unless cmake define WITH_ASSERT_ABORT is enabled and it will call abort().
...
made this option advanced so people don't enable along with other features.
2010-12-15 10:22:26 +00:00
Campbell Barton
97aa2287fa
access bpy.app.debug_value, G.rt internally
2010-12-15 06:03:45 +00:00
Campbell Barton
a4b410af3d
Expose access to PROP_ENUM_FLAG from bpy.props.EnumProperty(), this is exposed as a python set(). The default value is also a python set() so multiple booleans can be used in the 1 property.
...
Also added PROP_ENUM_FLAG support to operator printouts.
2010-12-13 09:10:16 +00:00
Campbell Barton
6ef85af300
exceptions in registering properties were not properly handled, allowing a single error stop the main module registration loop.
...
worst case 1 script error could load blender without a UI.
2010-12-13 07:54:35 +00:00