From BlenderWiki

Jump to: navigation, search

Overview | Tools | User Interface | Editors | Animation | Render | Breaking Forward Compatibility | Scripting | Import/Export | Simple Todos | Regression Tests


API Documentation

Unstable or poorly tested

  • Using operators from python, in many cases won't work (when they could) or crash instantly.
  • Render API currently crashes fairly frequently (1 in 10 times or so), because of threading issues???.

Fixes that still need doing.

Internal API Problems

  • Class registration needs to be reworked. as well as some internal bugs fixed.
  • RNA api has a bug where 'raw_type' defaults to INT but is not set for MFace verts in makesrna.
  • ID data returned from functions is not included unless the type is an ID itself.
    Returning a mesh will work but not a meshes face for eg.
    see bpy_rna.c - /* XXX this is missing the ID part! */
  • Dynamic enums currently refer to invalid memory when accessed from python, we need a way for python to hold the memory until its done with the dynamic enum.

Low Priority Py API

  • Re-Registering classes leaks memory, would be good to resolve this. (see comments in bpy_rna.c)
  • 'Safe Mode' - where writes to invalid memory are detected.
  • Implement import hooks rather than replacing import/reload http://www.python.org/dev/peps/pep-0302/

Python/RNA API Design TODO

  • Add a way to cancel running scripts from the user interface, with no console this becomes very problematic (Esc --> KeyboardInterrupt for example).
  • Currently there is no way to write packed images from blend files, support for this should be added to exporters. eg: image.pack_write("somepath.png")
  • Addressing operators/panels/menus, should we translate all names from
    SOME_MT_menu --> some.menu, ONE_PT_panel --> one.panel ?<r>would mean the UI code could reference them by this more pythonic syntax.
  • need to decide how 2.4x api's will fit in with new apis. PyNodes, PyConstraints.
  • convenience function to get selected verts/edges/faces to prevent expensive iteration over meshes. Something like: me.verts.selected
  • Design a method to allow custom UIs to filter properties/options. Useful for Blender GE too (example: which constraints are supported list. Complex matter for which rna needs to be extended?
  • Zero bytes are not supported in RNA byte string types: [1]

Inconsistencies

General todo items

  • Operator redo (toolbar) could also change the last InfoWindow print of the python operator equivalent.
  • Python access to particle edit mode is missing.
  • a way to remove mesh vertices from RNA
  • Python access to start/stop the physics sim.
  • mathutil.geometry.intersect_point_quad_2d works inpredictable for non-concave or quads with singularity edges #30831
  • modules/rna_xml.py: BoolVectorProperty and CollectionProperty issue #32882