[Bf-python] object.getDataName() - Implimented
Willian Padovani Germano
wgermano at ig.com.br
Wed Feb 2 04:56:36 CET 2005
Campbell Barton wrote:
> Hi, I was perplexed that There was no way to get the name of all the
> meshs without doing a getData- Which can be slow with large mesh's.
Hi Campbell and Stephen,
I'm committing a quick test, adding an optional keyword arg to
object.getData():
obj.getData(only_name = True) will return only the name, not the object
wrapper itself. obj.getData() works as before, as well as: 0 or 1 or
True or False and only_name = True or 1 or False or 0, as expected. For
readability, using .getData() to get obdata wrappers and
.getData(only_name = True) for the name string is better, of course.
I'm not sure about "only_name" keyword, if anyone has a better
suggestion, feel free to comment.
Anyway, just a test, tell me what you think. We may also update the
.Get() module functions with something like this later, Stephen. As you
say, at least for NMesh the economy makes it worthwhile. Besides,
unlinked objs and obdata can't be found from Python unless we know
their names. Having a way to get a list of names for all available
meshes, for example, could be useful. Maybe something like done in
Blender.Library, like someone (sorry!) suggested here a while ago.
--
Willian
More information about the Bf-python
mailing list