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!
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.
With that's said, you can still access the PolygonData/PointData with the hidden VariableTag: PointTag and PolygonTag.
Here a quick example:
# Main function
if not op:
tag = op.GetTag(c4d.Tpoint)
if not tag:
pos = tag.GetAllHighlevelData()
pos = c4d.Vector(100, 0, 0)
# Execute 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.