On 01/08/2016 at 11:37, xxxxxxxx wrote:
What is the best practice to check to see if an object is a MoGraph object and supports effectors? I'm currently manually building a list of object ID's and checking against that.
def is_cloner(obj) : CLONER_IDS = [ 1018544, # Cloner 1018545, # Matrix 1018791, # Fracture 1018957, # MoInstance 1019268, # MoText 1018655, # Tracer 440000054 # MoSpline ] if obj.GetType() in CLONER_IDS: return True return False
This works fine until a new cloner object is introduced (like the new Voronoi Fracture), at which point my plugin doesn't behave as expected and I have to add the new ID and push out an update to all users. Is there a method in the mograph module for checking this?