Commit Graph

10 Commits

Author SHA1 Message Date
Campbell Barton
3150e4ee12 update tagged objects in the scene after calling each operator, this makes running a set of recorded operators work as expected. 2010-01-26 08:41:16 +00:00
Campbell Barton
c91a0f8adf make exception a bit nicer (since wiki docs dont make much sense how it was before) 2010-01-25 18:09:46 +00:00
Campbell Barton
453945e9e3 remove python api cruft from custom operator registration 2009-12-30 22:51:44 +00:00
Martin Poirier
b00cddeb66 Macro registration using the normal rna registration methods (like operators).
bpy.types.register(MacroClass)

instead of

bpy.ops.add_macro(MacroClass)

The rest is unchanged.

Also remove some now unused code for the old registration methods (there's still some remaining).
2009-12-30 22:14:32 +00:00
Campbell Barton
bbe13e7823 * register operators like other classes
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
2009-12-24 19:50:43 +00:00
Campbell Barton
a1656300ba script for automating pep8 checks.
On ubuntu/debian install these tools...

   sudo apt-get install pylint pyflakes python-setuptools python-pip
   sudo pip install pep8

then run from blenders source dir...
   python release/test/pep8.py

This searches for the comments "# <pep8 compliant>" and "# <pep8-80 compliant>", running the checking tools on these scripts only.

* some minor pep8 corrections too.
2009-12-13 13:59:16 +00:00
Campbell Barton
5ebe54f470 pep8 edits and fix some warnings 2009-12-05 22:03:07 +00:00
Martin Poirier
bcd1ab54cd Support for the C Macro system in Python.
Basic definition works like a python operator but you derive from "bpy.types.Macro" instead.
Operators are added to the macro after it has been added with "bpy.ops.add_macro" through the class method "define" which takes an operator id and returns an OperatorMacroType (new RNA type) for which properties can then be defined to be passed to the operator when run.

Example: http://blenderartists.org/~theeth/bf/macro.py

Using this system, it should be easy to add an operator to the console that converts selected lines into a macro or even a more generic record macro system.
2009-12-05 19:27:26 +00:00
Campbell Barton
5a322bd67c F8 reload works again, script errors are printed but dont stop loading every other script 2009-11-13 11:10:29 +00:00
Campbell Barton
4c7dc3e5c5 changes python initialization
- bpy is now a python package, this makes it easier to add utility modules and adjust python startup which was previously using verbose Py/C api. Access should not be any slower since both C and Python modules use dictionary access.
- loop over scripts and load via python (currently F8 reload isnt working, will add back shortly)
- the C module is kept but renamed to _bpy and not meant for direct access from anything but the bpy package.
- bpy_types.py is an exception since it runs before the bpy package is initialized.
2009-11-13 09:28:05 +00:00