Hi All,
I am trying to get the name of a particle system. Was this just left out of the 2.4.9 API?
Here is the code I have:
import Blender
from Blender import *
from Blender import Mathutils
from Blender.Mathutils import *
import math
import bpy
def fetchIfObject (passedObjectName):
# NOTE: Returns the object even if it is unlinked to the scene.
try:
tempObj = Blender.Object.Get(passedObjectName)
return tempObj
except:
return None
localScene = Scene.GetCurrent()
obEmitter = fetchIfObject('emitter')
if obEmitter != None:
psystems = obEmitter.getParticleSystems()
for psys in psystems:
print (dir(psys))
psys_name = psys.getName()
print (psys_name)
This code assumes there is an object in the scene called “emitter” and that it has a particle system assigned to it.
The getName() function, while displayed in the documents for the API does not seem to actually work. Is there any other way to get the name?
Thanks