Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi,
I'm currently troubleshooting a rig with priority problems. I'm trying to print out tags that have "logical" priority data such as constraint, IK and IK-spline. However, it seems like all tags have priority data such as phong tag despite the fact that the priority data is not available for editing (i.e. visible) for such tags.
Is there a way to list tags with logical priority data?
Thank you for
Here is the code so far
import c4d doc = c4d.documents.GetActiveDocument() # Recurses a hierarchy, starting from op def recurse_hierarchy(op): while op: for tag in op.GetTags(): if tag[c4d.EXPRESSION_PRIORITY]: print tag.GetName() recurse_hierarchy(op.GetDown()) op = op.GetNext() if doc: # Iterate all objects in the document recurse_hierarchy(doc.GetFirstObject())
P.S. There seems to be typo in the documentation (https://developers.maxon.net/?p=26) Under the python usage, it says doc = c4d.GetActiveDocument() It gives me an error.
doc = c4d.GetActiveDocument()
I think it should be. doc = c4d.documents.GetActiveDocument()
doc = c4d.documents.GetActiveDocument()
hello,
you can check in the description if the parameter does have a name
descTag = tag.GetDescription(c4d.DESCFLAGS_DESC_NONE) bc = descTag.GetParameter(c4d.EXPRESSION_PRIORITY) if bc[c4d.DESC_NAME] is not None: print tag
If the tag doesn't have any priority list, the basecontainer will be empty but not "None"
Cheers Manuel
@m_magalhaes said in Retrieve tags that have only "logical" Priority Data?:
Thanks @m_magalhaes. Works as expected! Just a little change from c4d.DESCFLAGS_DESC_NONE to c4d.DESCFLAGS_DESC_0
c4d.DESCFLAGS_DESC_NONE
c4d.DESCFLAGS_DESC_0
Thanks again. Have a great day ahead!