How to Get CAJoint points Counts(Bone Display Set : Polygon)
chuanzhen last edited by chuanzhen
Bone Display Set:Polygon,i can change CAJoint point postion in Point Edit Mode.But how can i get more info or change,i can not use the function of PointObject to get a CAJoint info.
How can I handle CAJoint like a PointObject?(My goal is to change the number of Points and Polygons of CAJoint.)
Thanks for any help!
m_adam last edited by
The CAJoint is registered as PolygonObject, unfortunately, due to the nature of python, is not possible to cast this CAJoint to a PolygonObject, while in C++ you could use the ToPoly macro to convert it.
import c4d # Main function def main(): if not op: return tag = op.GetTag(c4d.Tpoint) if not tag: return pos = tag.GetAllHighlevelData() pos = c4d.Vector(100, 0, 0) tag.SetAllHighlevelData(pos) op.Message(c4d.MSG_UPDATE) c4d.EventAdd() # Execute main() if __name__=='__main__': main()
Of course, Tpoint and Tpolygon have no safety mechanism like ensure the VertexId are consistent and so on, so please be careful with the data you write since you can easily screw up the scene.
chuanzhen last edited by