[Bf-python] M_Object_New() and API refactoring issues
Ken Hughes
khughes at pacific.edu
Sat Jun 17 20:10:14 CEST 2006
Ton just talkd to me on IRC and wanted to note some things for after the
release, relevent to the API refactor:
The code in M_Object_New() replicates the functionality in add_object();
he wants us to use that (and other blender API code) in the future.
Granted, this code has been around for a very long time, but part of our
clean-up should be to reduce the code in the BPy API where possible.
Also, he's not thrilled that you can create blender Objects which (1)
have no data and (2) are not linked to a scene. He's mentioned that the
Python API needs to be written so it is (I believe this is his phrase)
"context-aware". He'd prefer something like "obj = scene.Object.New()",
so that it's obvious that the object is linked to an existing scene.
I'll make the changes to M_Object_New() after the 2.42 release just to
clean it up (plus I'm waiting until we're back at Bcon-1 to commit my
Object.c refactor), but wanted to keep this issue open and documented
somewhere.
Ken
More information about the Bf-python
mailing list