My goal is to:
I tried to change DESC_NAME property of default user data group but didn't succeed, thats why I created parentless group with name needed, but as I see it cant be selected by default. Is there some other way of reaching my goal?
@fwilleke80 Thanks for answer! Unfortunately I'm dealing with python tag, not plugin
I create Python Tag with custom group (tab), Tag has selected by default tab "Tag".
How to set selected my newly created tab?
@ferdinand thanks again, it’s more clear now!
About my concept: I’m trying to make procedural “current state to object” where result base object remains the same and only thing that changes is it’s mesh. It will allow users to direct manipulate object that has procedural source - cloner, exturde, etc, and keep all lnks to that changing mesh valid. Manipulations can include utilizing vertex colors/weights with fields, attaching stuff to points with xpresso, using object where mesh is strictly needed (like collider in thinking particles, etc). Some of that tricks can be achieved with correction deformer, but not all of them.
As far as I know c4d.utils.SendModelingCommand will create new object, so its not the case. Copying polygon and point tags is super fast so I hope there is some way to keep this operation in sync.
For instance, how VertexColorTag being resized if MCOMMAND_DELETE applied? Does SendModelingCommand held that or something else?
And another question: Cinema 4D crashes if target object has Vertex Color Tag and after that get update of Tpoint & Tpolygon tags. Is there a way of resizing Vertex Color Tag?
edit (Ferdinand): Forked from Copy mesh from one object to another with Python.
@ferdinand thanks for qiuck answer and quality info! I went with copying Tpoint and Tpolygn tags, but now stuck with translating hidden Ngon edges — can you point the right way to do that?
I feel like it sholud be some functions from c4d.PolygonObject class but stuck in here:
bs = c4d.BaseSelect()
bs.SetAll( * polyObj.GetPolygonCount() * 4)
ng = c4d.utils.Neighbor()
#doesnt work as expected, hidden ngon edges are not showing up
polyObj.SetSelectedEdges(ng, bs, c4d.EDGESELECTIONTYPE_HIDDEN)
Hi! I'm looking for quick way to copy all points, edges and polygons data from one poly object to another with Python tag.
Right now i'm using this loops:
for i in range(0, pointCount):
for i in range(0, polygonCount):
poly = sourceObj.GetPolygon(i)
targetObj.SetPolygon(i, c4d.CPolygon(poly.a, poly.b, poly.c))
targetObj.SetPolygon(i, c4d.CPolygon(poly.a, poly.b, poly.c, poly.d))
It's missing hidden edges for Ngons feature but already really slow on 10k+ polygons. Is there way to do it faster?
I'm looking into Edit->Copy & Edit->Paste commands but its really hacky way since its tag, not a single execution script.
Also C4DAtom.CopyTo() looks promising but I have no idea what flag I should pass to copy only mesh, not every object property