[Bf-python] Proposed BPyAPI Additions

Campbell Barton cbarton at metavr.com
Fri Sep 1 12:32:01 CEST 2006


In reply Matt  also
Id realy realy like not to have object type spesific funbctions in Scene 
or scn.objects

Matt, I hear your request, do you think this is adequate?

ob= scn.objects.new(Mesh.Primitives.Cube(2.0))

I prefer this because
1) dosent add extra functions to scn.objects - functions that realy 
relate to each datatype
2) cleanly seperates functionality - data creation is kept out of the 
scene, but is easily linked in.
3) It uses existing Mesh module functions ( we could wrap them, but that 
adds wrappwe code for scene that can be kept in mesh).

(removed .new(Types.Mesh) from the proposal)

http://mediawiki.blender.org/index.php/BlenderDev/BPythonAPI/SceneRefactor


J L wrote:
> Hi,
>
> Just thought I'd comment on this...
>
> Making users supply constants to functions such as those that add 
> stuff is not too user-friendly. I consider this approach to be fairly 
> clumsy, especially if access to them is through several layers of .'s, 
> most of which are capitals.
>
> I prefer the approach where each type is given a function of its own, 
> even if that means making those functions just wrappers which run a 
> function like the existing (which would then be hidden from user)
>
> Aligorith
>
> _________________________________________________________________
> Check out the latest video  @  http://xtra.co.nz/streaming
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list