On 26/01/2017 at 04:38, xxxxxxxx wrote:
Please, its fine, I am easily confused as this is all new to me.
I see what you mean now, I actually meant that I do not know how you derive the meaning (object type) from the ID numbers, I understood that .GetClassification() is used to get the ID, but as gr4ph0s said originally:
"add ".GetClassification()" you will see a number (5155, wich is egal to c4d.Obase )"
What I should have said was, how do ascertain the number is equal to c4d.Obase?
But I think you have answered that by also letting me know about .GetType()
I see what you mean now.
I wanted to try your code but with the Stage object instead of your tag example, I got an error at the line:
bcDesc = desc.GetParameterI(c4d.DescID(5155), None)
"TypeError: 'NoneType' object has no attribute '__getitem__'"
full code (in a python tag on a stage object) :
stageObj = op.GetObject()
desc = stageObj.GetDescription(c4d.DESCFLAGS_DESC_0)
bcDesc = desc.GetParameterI(c4d.DescID(5155), None) # to get ID drag param to console and append .GetType()
bcTypesAccepted = bcDesc[c4d.DESC_ACCEPT] # there's also the opposite DESC_REFUSE
def main() :
frame = doc.GetTime().GetFrame(doc.GetFps())
stageObj[c4d.STAGEOBJECT_CLINK] = cam(frame)
for index, value in bcTypesAccepted:
print "Index: %i, Value: %s" % (index, str(value))
def cam(frm) :
childs = stageObj.GetChildren()