[Bf-python] More Proposed API changes.

Campbell Barton cbarton at metavr.com
Tue Mar 13 01:29:05 CET 2007


Chris Want wrote:
> Toni Alatalo wrote:
>> i am concerned about having the module auto-imported though. "explicit 
>> is better than implicit". nothing like that is usually automagically 
>> 'there' in python. admittedly, as bpy is embedded, it makes sense that 
> 
> <snip>
> 
> Although I'm not strongly passionate about it, I'm against
> auto-import too. If we ever get to a point that we
> can load a Blender module outside of a Blender executable
> as a module in a regular python interpreter (i.e., if Blender
> is ever broken up into a shared graphics library or libraries)
> then this sloppy auto-import will be a hindrance since a lot
> of potentially usable scripts will be broken.
> 
> I know this is a lofty goal, but it's better to think of
> such things earlier rather than later. I'd rather
> add the extra "import bpy" line and be safe.
> 
> Chris

agree with joe on this one, blender's API externally isnt going to 
happen in foreseeable future.

The advantage is as broken points out, people will be able to jump in 
and start scripting with one less hurdle..

If your editing somebody elses script you wont havr to keep track of 
what they imported.. (I find thisa bit annoying when maintaining other 
peoples scripts)
(was it Window.* or Blender.Windows.* of B.Window.*?)

worst case is people have to add in "import bpy" to the start of a script



More information about the Bf-python mailing list