Age | Commit message (Collapse) | Author |
|
|
|
few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()...
|
|
|
|
|
|
|
|
|
|
|
|
don't store operator instances and operator functions have access to the context if they need the current screen.
also add some more py api file descriptions.
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
|
|
- add support for IDProp array slicing, but not resizing.
- rename array attribute type to typecode and use chars 'f', 'd', 'i' which match pythons array module. (was using int's which only have a meaning internally).
- rename function 'convert_to_pyobject' to 'to_dict' and 'to_list' for IDProp group and array types respectively.
- remove 'len' array attribute, calling len(array) is fine.
|
|
|
|
- remove some warnings
- fix typos
- cmake allow in-source build (when WITH_IN_SOURCE_BUILD is defined)
- cmake, use an explicit list of rna files (don't glob)
|
|
|
|
and returns -1 as an error value
|
|
|
|
|
|
note: BPY_class_validate() could come in handy later if we need to check classes for properties/functions but for now there is no point in keeping it in.
|
|
internal interpreter problems.
Replace most with RuntimeError.
|
|
no functionality change.
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
reports into python errors.
|
|
'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
|
|
|
|
|
|
path name
- ID properties now suopport non utf-8 strings for their values but not their keys.
- moved utility functions into py_capi_utils.c from bpy_utils and bpy_rna.
- import/export paths have to be printed with repr() or %r, so non utf-8 chars are escaped.
|
|
errors now works when executing class functions in a module.
- replaced PySys_GetObject("modules") with PyImport_GetModuleDict()
- use defaults for keymap import/export rather then setting the same value every time from the UI scripts.
|
|
with bad operator args.
(commit 27432 by Campbell from render25 branch)
|
|
|
|
|
|
|
|
|
|
|
|
fixes a crash that happens when formatting a python exception into a report. - for now use pythons string formatting function.
happens when running the simple operator template so not sure if its worth re-tagging :S
|
|
|
|
- more detailed exceptions (always give file:line incase the python exception doesnt)
- fix some errors in the edit docs
editing docs still fails, need to figure out why.
|
|
for PyRNA and KX_PySequence types.
mesh1 > mesh2 # will raise an error.
|
|
Directories intern/ and source/blender/ now compile warning
free again here with scons/gcc.
|
|
|
|
|
|
- simplified C operator API bpy.__ops__ since its wrapped by python now.
- needs the class to have an __idname__ rather then __name__ (like menus, headers)
- convert python names "console.exec" into blender names "CONSOLE_OT_exec" when registering (store the blender name as class.__idname_bl__, users scripters wont notice)
- bpy.props.props ???, removed
|
|
* refcount error if StringIO or io modules could not be imported
* importing python modules like math didnt work because the script registration overwrote the script path. now just prepend the path.
|
|
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
|
|
thin wrapping vectors which is crash prone.
in short, vectors can work as if they are thin wrapped but not crash blender if the original data is removed.
* RNA vector's return Mathutils vector types.
* BGE vectors for GameObject's localPosition, worldPosition, localPosition, localScale, worldScale, localInertia.
* Comment USE_MATHUTILS define to disable returning vectors.
Example...
* 2.49... *
loc = gameOb.worldPosition
loc[1] = 0
gameOb.worldPosition = loc
* With vectors... *
gameOb.worldPosition[1] = 0
* But this wont crash... *
loc = gameOb.worldPosition
gameOb.endObject()
loc[1] = 0 # will raise an error that the objects removed.
This breaks games which assume return values are lists.
Will add this to eulers, matrix and quaternion types later.
|
|
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.
* Operator exec is called execute in python now, due to conflicts
with python exec keyword.
* Operator invoke/execute now get context argument.
* Fix crash executing operators due to bpy_import_main_set not being
set with Main pointer.
* The bpy.props module now has the FloatProperty/IntProperty/
StringProperty/BoolProperty functions to define RNA properties for
operators.
* Operators now have an __operator__ property to get the actual RNA
operator pointers, this is only temporary though.
* bpy.ops.add now allows the operator to be already registered, it
will simply overwrite the existing one.
* Both the ui and io directories are now scanned and run on startup.
|
|
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.
|
|
struct based on another.
bpy_util.c, PyObSpit - print refcount with PyObject
|
|
BPy_GetContext/BPy_SetContext,
Still not happy with this in the long term but its less problematic then storing the context in pythons namespace which couldn't be set before importing modules.
This might fix a crash quite a few people have reported (but I cant reproduce).
|
|
The Python API to define Panels and Operators is based on subclassing,
this makes that system more generic, and based on RNA. Hopefully that
will make it easy to make various parts of Blender more extensible.
* The system simply uses RNA properties and functions and marks them
with REGISTER to make them part of the type registration process.
Additionally, the struct must provide a register/unregister callback
to create/free the PanelType or similar.
* From the python side there were some small changes, mainly that
registration now goes trough bpy.types.register instead of
bpy.ui.addPanel.
* Only Panels have been wrapped this way now. Check rna_ui.c to see
how this code works. There's still some rough edges and possibilities
to make it cleaner, though it works without any manual python code.
* Started some docs here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNATypeRegistration
* Also changed some RNA_property and RNA_struct functions to not
require a PointerRNA anymore, where they were not required (which
is actually the cause of most changed files).
|