Current State of Deformed Object
On 07/10/2013 at 19:25, xxxxxxxx wrote:
I'm trying to get a mesh on a current frame, and do like a current state to object so I have that object at that frame, just that mesh(no tags).
I've been using dupObj=c4d.utils.SendModelingCommand(c4d.MCOMMAND_CURRENTSTATETOOBJECT, [obj])
However, there are times(namely when a mesh is bound or deformed via the skin deformer, or some other stuff where I run into two problems:
1. I get a hierarchy, so the dupe is in a null.
2. It still has the weight tag, and so when I remove the weight tag, it goes back to the bind pose.
So my question is what is the best way to just completely bake it down to the deformed state so I'm left only with a mesh and no tags(they are not needed in my case)? Is there a better way or a more useful command I can use to get what I'm looking for?
On 08/10/2013 at 00:46, xxxxxxxx wrote:
It is just like in the editor, if the cache of object does contain other parametric objects, the result
of CSTO will also contain parametric objects. You have to execute CSTO multiple times then until
your result is entirely static.
On 08/10/2013 at 01:02, xxxxxxxx wrote:
Take a look at the c4dtools.utils.current_state_to_object() function. In my tests, the conversion
worked fine. If you get a hierarchy, you can join all polygon objects into one using
On 08/10/2013 at 06:51, xxxxxxxx wrote:
Thanks littledevil thats sort of where I ended up. Is there any way to know how many times it would need to be run?
Niklas are those functions in r14? I forgot to mention im using r14. I dont remember ever seeing either of those in c4d.utils.
On 08/10/2013 at 07:28, xxxxxxxx wrote:
It's in c4dtools.utils, not c4d.utils. You can use the library or the code of the library with appropriate
credit notes in respect to the Simplified BSD License.
On 08/10/2013 at 21:44, xxxxxxxx wrote:
Hey Niklas, so I tried the current_state_to_object, however it didn't work. It makes a duplicate but the duplicate is not from the deformed object. It is of my current object back in the bind pose.
I had tried using GetDeform and passing that into SendModellingCommand, but even that doesnt work for me. In some cases I have something that will work, and in others it won't work.
On 09/10/2013 at 11:03, xxxxxxxx wrote:
could you provide a small example scene where it didn't work? It works for me when using
deformers like bend, wrap and collision.