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).
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.
Hello @karpique,
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 its mesh.
ObjectData
SendModelingCommand
MCOMMAND_CURRENTSTATETOOBJECT
PolygonObject
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.
I do not understand what here the question is.
For instance, how VertexColorTag being resized if MCOMMAND_DELETE applied? Does SendModelingCommand held that or something else?
VariableTag instances, e.g. a VertexColorTag, adapt themselves to modelling operations carried out on thier hosting geometry, no further actions are needed. C4DAtom.CopyTo is however not a modelling operation but replaces the content of one object with that of another (assuming they are of matching type). There is no way to notify the VertexColorTag of such 'change' since it has no clue how to map the old to the new data. If the new data happens to be of the correct size, it will work without any further actions, since the VertexColorTag does not care about topology, but mismatching sizes it can lead to crashes.
VariableTag
VertexColorTag
C4DAtom.CopyTo
Cheers, Ferdinand
I would like to point out that we ask the community here to post separate questions into separate postings, so that other users can find more easily answers when searching the forum. You can read more about the procedures of SDK support in our Forum Guidelines.
Which is why I did move your question into this new topic. We will answer it with our normal procedures in the coming days.
Thank you for your understanding, Ferdinand
thank you for reaching out to us. The answer is unfortunately, no, you cannot resize a c4d.VariableTag, i.e., a c4d.VertexColorTag. You can however create a new instance and copy over data from the old tag, taking the new size into account.
c4d.VariableTag
c4d.VertexColorTag
But I am also a bit unsure how your question is meant. When you copy over all point and polygon information from one polygon object to another, then all the old point and polygon information in the object that has been copied to, will be gone. So even if you would carry over the vertex color information, it would not make much sense anymore, as it has been created for the old topology. The crashing you did experience, most likely was caused by overwriting the target polygon object with a vertex list that was smaller than the original one. The VertexColorTag was still indexing that old and larger vertex set and then came down burning when you switched out the vertex data under his feet
When you want to just join two polygon meshes, including some tag data associated with them, I would recommend using c4d.utils.SendModelingCommand. If this is not the case, I would have to ask you to clarify what your goals are, because I currently do not fully understand them.
c4d.utils.SendModelingCommand
@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.
without any further questions, we will consider this topic as solved by Monday and flag it accordingly.