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:
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?
On 02/08/2016 at 02:26, xxxxxxxx wrote:
all these objects are an instance of Obasemogen. Just note, this is also true for the PolyFX, but as it takes effectors as well, it's probably even a desired side effect.
On 02/08/2016 at 14:38, xxxxxxxx wrote:
Perfect. Thank you!
"""Is it a MoGraph Generator?
from c4d import gui
#Welcome to the world of Python
def main() :
if not op:
if op.IsInstanceOf(c4d.Obasemogen) :
print op.GetName() + " is a MoGraph Generator!"
print op.GetName() + "is not a MoGraph Generator."
It seems like "Obasemogen" isn't documented in the Python SDK, so I'd suggest adding it.