[Bf-python] Feature request about Object Types and Materials, and a question.

Antonio Ospite ospite at studenti.unina.it
Fri Jun 2 13:19:36 CEST 2006


Hello,

I'm writing a rendering script and I would need some addition to the
api that "shouldn't" be that hard to make.

I'm using NMesh.GetRawFromObject() to get geometry (and other) data also
from Surfaces, Curves and Text Objects, but this way I totally loose
informations about materials linked to the obData.
So I ask you if you can extend the api to make it possible to retrieve
material infos also for non Mesh object data.

Adding a getMaterials() call to Text, Curves and Surfaces Object Data
types can be sufficient; although making these infos directly available
in the data returned by NMesh.GetRawFromObject() would be the best from
a user viewpoint.

Now I do something like that to do the conversion:
	mesh = NMesh.GetRawFromObject(object.name)
        newObject = NMesh.PutRaw(mesh, 'Mesh_'+object.name, 1)
        newObject.setMatrix(object.getMatrix())

And I also noted that PutRaw does not set the correct name (the second
argument) for newObject, is that expected?


Finally a question:
In my rendering script I use such a sequence of commands to apply
deformations to mesh objects:
	mesh = NMesh.GetRawFromObject(object.name)
        NMesh.PutRaw(mesh, object.name, 1)

But in blender 2.41 I loose mesh materials infos in doing PutRaw(),
while in current CVS the call works as expected.
Is there a trick I can use to make this work also with 2.41?

Will all these things work already with the Mesh module? ;)

Thanks for your patience.

Regards,
   Antonio Ospite.

-- 
  Web site: http://www.studenti.unina.it/~ospite
Public key: http://www.studenti.unina.it/~ospite/aopubkey.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20060602/67603de7/attachment.sig>


More information about the Bf-python mailing list