Campbell Barton
fc0c016940
replace import *'s with named imports (using * is convenient for some scripts but considered bad practice by python devs)
2011-02-27 15:25:24 +00:00
Campbell Barton
52f92b4cb1
lazy load modules for more scripts.
2011-02-27 14:16:32 +00:00
Campbell Barton
87acf919a5
lazy load pydoc module. move help() replacement into console code rather then on startup since importing pydoc pulls in lots of other modules too.
2011-02-27 14:08:33 +00:00
Campbell Barton
91e6fd1828
port of function from 2.4x's BPyMesh.py thanks to 'merlin_' on IRC.
2011-02-26 16:13:14 +00:00
Campbell Barton
b25db7c8cb
pep8 cleanup
2011-02-25 16:06:14 +00:00
Campbell Barton
2fd60d9719
error in own recent moving addons functions into its own module. addon_utils.reset_all failed.
2011-02-22 22:24:50 +00:00
Campbell Barton
4b859e91cb
bugfix/workaround [ #25629 ] Add torus with autmatic edit mode duplicates mesh after >Aling to View.
...
adding meshes in C does:
Add Empty Mesh -> Enter Editmode -> Create Mesh
while python does:
Add Generated Mesh -> Enter Editmode
problem with this is there is no empty undo state for undo-redo to use so it always gave a duplicate mesh on redo-ing.
workaround by adding an empty mesh, do an undo push, and join the generated mesh into the empty one.
this would be fixed if undo stack spanned modes.
2011-02-22 02:47:59 +00:00
Nathan Vegdahl
ea20a27240
Editbone length was still using "normalize()" instead of "normalized()"
...
for setting length, which was thus failing and erroring out.
2011-02-21 20:26:37 +00:00
Campbell Barton
eee4a62e87
move addon utilities into their own module, these were getting mixed between bpy.utils and space_userpref.
2011-02-21 07:07:44 +00:00
Campbell Barton
54dd0f57cf
bug [ #26089 ] editbone.transfrom() seems to mess up bone roll (by more than float precision error)
...
This is intentional behavior but add options not to transform the bones scale & roll.
2011-02-21 01:29:35 +00:00
Campbell Barton
063a7f217b
python api docs & examples for registrable Menu/Panel/Operator/PropertyGroup classes.
2011-02-18 08:47:37 +00:00
Campbell Barton
812f238494
pep8 cleanup and remove unused vars/imports
2011-02-17 04:35:41 +00:00
Campbell Barton
430bb75749
enum-flag arguments were incorrectly documented.
2011-02-16 10:19:14 +00:00
Campbell Barton
4c35d8d5a8
rename IDPropertyGroup to PropertyGroup
...
also renamed IDProperty to PropertyGroupItem (these are not referenced for common usage and we already have 'Property' defined).
2011-02-16 02:51:56 +00:00
Campbell Barton
a6765280f9
py rna api: turn class.is_register into a class property rather then a class method.
...
eg:
if MySybclass.is_registered:
...
2011-02-14 07:26:07 +00:00
Guillermo S. Romero
7b201c7693
SVN maintenance.
2011-02-14 04:47:55 +00:00
Campbell Barton
e70ca00f71
- move keyingsets_utils.py into modules.
...
- add gplv2 header
- define __all__ so when importing '*' it wont being in locally defined vars.
2011-02-12 08:12:00 +00:00
Campbell Barton
17efeb310d
bpy.utils.register_module() generator could go into eternal loop.
2011-02-11 01:27:00 +00:00
Campbell Barton
2f4f046b6f
UI functions added to existing UI classes (operators adding their own menus for eg),
...
would stop the entire menu from drawing if they raised an exception.
now print the exception and continue.
Also added a verbose argument for bpy.utils.(un)register_module() to help test whats being registered.
2011-02-11 01:12:01 +00:00
Campbell Barton
b1cdf5c344
use weak references for the internal metaclass typemap,
...
this should help with blender leaking memory with python classes though the bug is still not fixed.
2011-02-11 00:39:07 +00:00
Campbell Barton
fb8c135584
minor python register changes.
...
- KeyingSetInfo classes are now collected like Panels, Operators etc so bpy.utils.register_module() can be used.
- move bpy.types.register() to bpy.utils.register_class
2011-02-11 00:11:17 +00:00
Campbell Barton
4612034cf4
patch [ #25809 ] Auto-Registration as utility function.
...
This removes auto-registration, committed by Martin r30961.
Realize this is a contentious topic but Brecht and myself both would rather opt-in registration.
TODO:
- addons need updating.
- class list will be modified to use weakrefs (should have been done for existing system too).
- will move bpy.types.(un)register functions into bpy.utils.(un)register_class, currently including these functions in a type list is internally ugly, scripts which loop over types also need to check for these.
2011-02-10 23:48:22 +00:00
Campbell Barton
6c21f4713b
mailed Stani Michiels and he's ok to switch his console autocomplete to GPLv2 or later.
2011-02-08 00:01:15 +00:00
Campbell Barton
8b52087d83
update for changes in mathutils.
2011-02-05 07:04:23 +00:00
Campbell Barton
0362d19f2d
Pythons path functions - os.walk(). os.path.exists(). etc support bytes for paths as well as strings, support this with blender/rna too.
...
- bpy.data.*.load() functions were only accepting UTF-8 paths.
- rna functions/properties now accept byte values rather then strings for file paths.
- bpy.path.resolve_ncase now supports byte objects.
2011-02-01 04:24:47 +00:00
Campbell Barton
2df908df39
fix for error in add mesh script with no operator passed.
2011-01-26 14:52:00 +00:00
Campbell Barton
e6027018fe
recent commit broke Mesh.from_pydata()
2011-01-18 06:35:26 +00:00
Campbell Barton
28382c7983
document Mesh.from_pydata() [ #25688 ] undocumted functions in pyapi
2011-01-18 01:38:14 +00:00
Campbell Barton
743182106f
py api: bpy.path.abspath(), option to return relative to a path other then the current blend file.
2011-01-15 20:35:31 +00:00
Campbell Barton
f66912a335
misc edits, no functional changes
...
- enabling/disabling no longer prints in the terminal unless in debug mode.
- remove 'header' struct from BLI_storage_types.h, from revision 2 and is not used.
- Add GCC property to guardedalloc to warn if the return value from allocation functions isn't used.
2011-01-15 15:48:46 +00:00
Campbell Barton
9146ca06dd
pep8 corrections.
2011-01-13 23:00:51 +00:00
Campbell Barton
0384be9644
bugfix [ #25595 ] Adding Torus when in edit mode strange behavior.
...
also added Align View option and made local view cursor work.
2011-01-12 15:45:00 +00:00
Campbell Barton
22577d98c9
initial x3d/vrml importer port from 2.4x.
...
some files import now.
- no animation support yet
- no rad/deg conversion changes from 2.4x
- matrix multiplication still needs switching.
2011-01-11 02:49:01 +00:00
Campbell Barton
dacdfbe6f3
recent change to keyframe menu broke BVH import, now don't use the operator at all, instead assign the action manually.
...
Also added bpy.path.display_name_from_filepath(), since filepaths are not ensured to be utf8.
same as calling: os.path.splitext(os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
2011-01-03 08:28:22 +00:00
Campbell Barton
7f3fe8a2df
pep8 cleanup
2011-01-01 07:20:34 +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
Campbell Barton
c2c71e59ed
fix for own error [ #25299 ] custom properties not showing in viedw3d panel
...
error made when fixing id pinning, for non-properties space.
2010-12-19 13:04:14 +00:00
Campbell Barton
c26cc0afa1
bugfix [ #25290 ] Align on text gives a traceback
...
[#25284 ] Traceback error on "System Info" script
- Align was only working on mesh objects, now operate on all objects, missing boundbox's are treated as single points.
- obj.bound_box was returning all nan's for object types with no boundbox.
- ENUM_FLAG type enums were showing no text when displayed in operator redo panel.
2010-12-19 07:05:29 +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
676d795d7e
bugfix [ #25240 ] Custom properties panel on pinned data fail.
2010-12-17 10:33:28 +00:00
Doug Hammond
2b772739fb
Moved extensions_framework into addons/modules
2010-12-11 16:35:11 +00:00
Campbell Barton
3256d0fc6a
allow addons/modules path so extension authors can develop their own shared modules.
2010-12-11 11:52:28 +00:00
Campbell Barton
1622385445
pedantic word ordering change.
...
- wm.add_modal_handler -> modal_handler_add
- wm.add_fileselect -> fileselect_add
- ob.add_shape_key -> shape_key_add
- VIEW3D_OT_add_background_image -> VIEW3D_OT_background_image_add (same for remove)
Also made 2 internal cmake vars hidden.
2010-12-08 11:42:11 +00:00
Doug Hammond
ba8c185161
extensions_framework: prefer user config and scripts dirs, if set, to save addon config files to.
2010-12-05 16:39:48 +00:00
Doug Hammond
3a88d96aa2
extensions_framework: fix bug that would create extra UI space when entire row is hidden. May not be the most efficient implementation, however it is working properly now.
2010-12-02 19:03:24 +00:00
Doug Hammond
225be0cf30
extensions_framework: fix UI drawing logic
2010-11-23 00:23:57 +00:00
Doug Hammond
8a4b42bee7
extensions_framework: fix UI drawing bug and some redundant code
2010-11-23 00:06:09 +00:00
Campbell Barton
6f90a38a54
error in own recent commit
2010-11-22 23:41:00 +00:00
Campbell Barton
1d468c75e7
bugfix [ #24805 ] bpy operator runs in wrong order or is ignored at all
2010-11-22 17:21:18 +00:00
Campbell Barton
593815b23f
reloading addons wasn't working.
2010-11-20 04:18:06 +00:00