Commit Graph

25 Commits

Author SHA1 Message Date
f81248265d tag UNUSED() for operator exec() and invoke() functions. 2010-10-15 01:36:14 +00:00
d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
f2d77e4496 remove unused includes from editors/space_* 2010-08-08 08:14:07 +00:00
026ac24922 [#22488] Reloading scripts causes crash
F8 key enabled again, useful for script UI development.

- keying set freeing wasnt freeing from all scenes and the builtin list.
- PointerProperty() cant refer to a removed python srna type (fixed in rigify and netrender).
- Added a check for freeing a type used by a PointerProperty but its very slow, makes reloading take ~10sec. Only enabled this in debug mode for now.

Netrender register() function isnt re-registering the property, probably because the module is cached by python and not re-run.
2010-07-23 01:43:30 +00:00
c2f36a4d6a naming changes
path -> filepath (for rna and operators, as agreed on with elubie)
 path -> data_path (for windowmanager context functions, this was alredy used in many places)
2010-06-14 03:52:10 +00:00
c5cee16630 better not have an instant crash key, script reload currently disabled ubless running in debug mode.
removing keying sets and netrender makes reloading work so probably a problem with how rna works with these classes.
2010-06-08 10:56:59 +00:00
ed338da8c9 - WITH_CXX_GUARDEDALLOC working again
- CMake building without python or fluidsim working again (broke in recent commit)
- remove BLI_short_filename(), it wasnt used anywhere.
2010-06-06 01:15:44 +00:00
ed3a7bd299 script reload (f8), is closer to working.
there are internal memory problems which can make it crash still.
If you remove all directories in the scripts folder except for 'modules' and 'ui', it runs without crashes.
2010-06-01 08:15:43 +00:00
f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00
42ac4a3e7d Fix syntax for ID keyword. 2010-03-21 01:14:04 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
148435b70a batch remove .'s used with RNA_def_struct_ui_text 2010-02-10 21:15:44 +00:00
4f21b1fcba Adding undo flag to the python run flag operator.
It's safer this way.
2009-11-22 20:26:54 +00:00
5a322bd67c F8 reload works again, script errors are printed but dont stop loading every other script 2009-11-13 11:10:29 +00:00
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
4aa7ddfe33 description patch from Ron Walker 2009-10-24 23:26:28 +00:00
9a25d22326 2.5 filebrowser
Appending and Linking 
* Linking Operator, invokes filebrowser for Append/Link
* Separated the append/link function into three parts:
** BLO_library_append_begin finds main for appending
** BLO_library_append_named_part appends one Object,Group, Material, ...
** BLO_library_append_end actually reads and expands the libraries

NOTE 1:
I also changed the returned properties for the filebrowser operators to the following convention:
"path" - the full path to a file or directory, means what is in directory + filename buttons in filebrowser
"directory" - the content of the directory button in filebrowser
"filename" - the content of the filename button in filebrowser
Usually only path should be required, but in some cases it might be more convenient to retrieve the parts separately.

Ton, Brecht: If you have time to take a look, let me know if anything needs to be fixed.
2009-09-12 19:54:39 +00:00
8ab7fbe795 Blender/Python API
Send the full python stack trace to the reporting api,
added BPY_exception_buffer which temporarily overrides sys.stdout and sys.stderr to get the output (uses the io module in py3 StringIO in py2 to avoid writing into a real file), pity the Py/C api has no function to do this.

fix for crash when showing menu's that have no items.
2009-06-14 12:53:47 +00:00
1ed95e0450 F8Key reloads all python scripts and redraws for quick testing
F7 runs test.py also for testing
2009-04-23 06:58:02 +00:00
a71016a1a3 additional op naming convention changes 2009-04-12 23:05:40 +00:00
36c3ed2350 run script in the text editor is back. UI scripts dont work yet. 2009-03-04 13:26:33 +00:00
c1cf33c8aa RNA
* Added more compact property definitions, with a single function.
  Only used by operators at the moment, would need to tweak regular
  expressions a bit more to use it also for other RNA definitions.

* The operator properties defined now were completed a bit more but
  still have many issues that need to be adressed, specifically;

  * Some properties that should be booleans or enums are defined as
    ints, note that ints are only for numeric values, not bitflags
	or multiple choice.
  * Soft/hard limits and default values of many properties are not
    well defined still,
  * Inconsistent naming, especially for example mouse locations or
    bounds are named differently in different places. Also mouse
	locations and other vector like properties should become a single
	vector property instead of multiple X/Y properties.
  * Almost no properties have descriptions, these would be good to
    have for docs and tooltips.

So, please verify that the properties of the operators you wrote are
well defined.
2009-01-16 23:53:11 +00:00
7715e45a7a removed ED_ prefix from script operator.
python operator api was crashing when unknown operators were called.
2008-12-26 12:39:53 +00:00
Nathan Letwory
00fd6c5b00 2.5 / SCons
Make sure we can build WITH_BF_PYTHON=False
2008-12-25 16:02:35 +00:00
de9437e57a * temporary PKey in the script and 3D view runs "./test.py" (for testing PyOperators that need to run in the user interface context atm)
* added ED_SCRIPT_OT_run_pyfile that takes a filename argument.
* RNA_property_string_set didn't add a value to ID props if the prop wasnt there (like ints, floats and bools do)
* bpy_operator.c - raise an error when unknown keyword args are passed to any operator .

Examples of bpy operator api...

bpyoperator.ED_VIEW3D_OT_viewhome(center=1)
bpyoperator.ED_SCR_OT_frame_offset(delta=10)
bpyoperator.ED_VIEW3D_OT_make_parent(type='OBJECT')

At the moment there is no way to stop the operators .invoke() function from running so ED_VIEW3D_OT_make_parent still opens the menu even though it doesn't need to.
2008-12-25 14:17:54 +00:00