Page MenuHome

NMesh.GetNames()
Closed, InvalidPublicPATCH

Description

This returns a list of NMesh names.

The rationale behind this is that the only current method of getting mesh names in python is...

# Gets a list of unique nmesh names
nmesh_names = []
for ob in Objects.Get():
if ob.getType() == 'Mesh':
if ob.getData(name_only=1) not in nmesh_names:
nmesh_names.append( ob.getData(name_only=1) )

# Now we have a list.

This is flawed because It does not account for Meshes that have no users or meshes that have a fake user, There for- At the moment its impossible to get an NMesh that has no users, unless you alredy know its there.

This simple patch fixes that.
Pydocs are also Included.

- Cam



Event Timeline

Willian Padovani Germano (ianwill) changed the task status from Unknown Status to Unknown Status.May 20 2005, 6:46 AM