Hi,
Would any one know how to get/set the name of the datablock used by an
object? i.e the string after “ME” (NOT the string after “OB”).
Thanks a lot.
didu
Hi,
Would any one know how to get/set the name of the datablock used by an
object? i.e the string after “ME” (NOT the string after “OB”).
Thanks a lot.
didu
in B2.25/26/27
import Blender
O=Blender.Object.get('objectname')
print O.data.name
or
import Blender
O=Blender.Object.get('objectname')
print O.getData().name
Thanks a lot jms!!
I didn’t realize that the getattr function was overloaded in Mesh class.
I also discovered that using the Blender.NMesh.PutRaw() function, you can
create a datablock with the given name. However, PutRaw() would display
the mesh onto the current scene immediately. So, I have a few more questions:
(1) Is it possible to create a datablock without assigning it to an object? I guess the answer is probably no, and it probably wouldn’t make sense to
do something like this.
(2) Is it possible to create a datablock with a given name without using PutRaw? Or Using PutRaw but not display it on the current Scene immediately?
Thanks a lot.
didu
Perhaps with the Blender.NMesh.New() function.
I did not try. Read the doc : Blender.NMesh.New.doc
Blender.NMesh.New() was one of the first things that I tried, and it didn’t work. But thanks anyway.
didu