[Bf-python] Depreceing... and other proposed changes
Gilbert, Joseph T.
jgilbert at tigr.ORG
Fri Aug 18 17:26:20 CEST 2006
1) No problems with 'undeprecating' vector.negate
2) Armature.New() is the 'factory' class generation method that I
thought we were trying to move away from.
The correct way of creating a class should be with tp_new and tp_init
where tp_init will take raw data as the initializer for the class.
example:
myrandomobject = ObjectType(initializer_data)
instead of:
myrandomobject = Module.New()
-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Campbell
Barton
Sent: Thursday, August 17, 2006 1:52 AM
To: Blender Foundation Python list
Subject: [Bf-python] Depreceing... and other proposed changes
Hi, a few things I'd like to discuss
Can we depricate NMesh.PutRaw() -
Too many scripts use this in a way that could overwrite existing data
(if theres a name conflict), and I dont see its that relevent anymore
since one can link an object to the scene, set the layers and select it.
-
Its also out of line with other objects and keeps scripters from being
'scene aware'
Can we make -vec return a copy and un-depricate vec.negate(), -vec
should not modify wrapped data.
..other changes....
Add Mesh.Unlink(me) for zero user meshes only. current way meshes work
is good but in some cases- BPyMesh.getMeshFromObject() - still needs to
link to an object for triangulating which means it will not be
de-allocated,
Add Armature.New()
Change the way Object data linking works by changing Object.New()
currently..
ob= Object.New('Mesh')
scn.link(ob)
data= ob.data
propose we pass the data to the object instead so objects can never
exist without data
data= Mesh.New()
ob= Object.New(data)
scn.link(ob)
This way the objects type is dictated by its data type so no need to
pass a string. and its also saves an extra ob.link().
- Cam
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python
More information about the Bf-python
mailing list