Commit Graph

12 Commits

Author SHA1 Message Date
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
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
Campbell Barton
03d8fd4616 - use relative imports for packages
- reload() has been removed from pythons builtins. use imp.reload() instead (still need to apply globally).
- fixed own mistake, not ignoring 'filter_glob' as a keyword argument (broke fbx, obj, 3ds export)
2010-11-20 02:56:58 +00:00
Campbell Barton
506e692263 fix [#24804] filetring of files doesnt work for import/export 2010-11-19 10:33:44 +00:00
Campbell Barton
070f38a6d0 bugfix [#24696] Export OBJ - Selection Only toggle button has the wrong default state.
Added convenience function to operators, 'as_keywords()', so operator settings can be passed directly to a function as keyword arguments.

The problem in this case was that dictionary access to operator properties was not returning rna-property defaults, so as_keywords() ensures all defaults are set.
2010-11-15 13:11:40 +00:00
Campbell Barton
ab404a0f66 patch [#24424] Python scripts update for API changes
from Filiciss Muhgue (filiciss)
2010-10-27 22:15:55 +00:00
Campbell Barton
6a4b9298c8 patch [#23968] filter_filetypes property to allow operators to filter by file extensions in the file selector
modified the patch to store the string internally rather then an array of allocated string pointers, less hassle with memory allocation.
changed to use fnmatch, so *.foo is needed (not .foo as with the patch)
2010-09-24 07:05:43 +00:00
Thomas Dinges
cd4fb20b73 Patch [#23759] more replace self.properties.foo --> self.foo for bf-extensions/trunk/py/scripts
by Filiciss Muhgue (filiciss). Thanks a lot!

Part 1: Trunk, second part of patch will be committed to Extensions.
2010-09-10 23:39:43 +00:00
Campbell Barton
d0c54d3d0e use set as a suffix (matches operators)
- set_frame() --> frame_set()
 - set_context_pointer() --> context_pointer_set()

material adding works for curves and metaballs, new function to remove materials.

materials.link() didnt well fit how this is used elsewhere
 - order matters
 - it can be linked more than once.
 - remove(material), isnt that useful since you need to manage indicies.

... use list style functions instead. materials.append(mat) / materials.pop(index)
2010-09-03 07:25:37 +00:00
Campbell Barton
a89c526a92 finished moving importers and exporters into python packages (as proposed on the mailing list).
- made operator dir's into python packages
- lazy loading of module which do the actual import and export (faster blender load times)
- general maintanance and small fixes.
- bugfix for exporting x3d materials
- leak fix for exporting 3ds
2010-09-01 12:11:34 +00:00
Campbell Barton
66a4de07e0 excuse the noise, adding type's in format package names. 2010-09-01 03:06:28 +00:00