My object doesn't animate :-(



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/09/2012 at 22:12, xxxxxxxx wrote:

    I created an Object Data object that behaves perfectly in the editor. When I set some keyframes and, when I drag the playhead, it animates perfectly in the editor. But, if I perform a full render or even a preview render, it doesn't generate the geometry.
    Is there anything I'm not aware of that is required for animation?

    Rui Batista



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/09/2012 at 22:19, xxxxxxxx wrote:

    Ok, the problem only happens in the following situation:

    My object creates a mesh based on a spline.
    It animates fine, except when I have the mesh deformed by a Surface deformer.
    I really need it to work in that situation.
    Any help?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/09/2012 at 23:19, xxxxxxxx wrote:

    Are you using any caching (meaning, do you return op->GetCache() in any cases)? If so, you might have to work on the conditions.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 03:27, xxxxxxxx wrote:

    I tried with and without caching.
    It still doesn't show up in animations :-(

    Rui Batista



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 04:14, xxxxxxxx wrote:

    I don't need to have anything in the Execute method, right?
    I only need to have my object built in the GetVirtualObjects method, isn't that right?
    I really can't understand why it is not working in animations and it is a must that it works in animations.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 05:49, xxxxxxxx wrote:

    Here is a screen capture of what is happening.
    What could be happening?

    http://ruimac.com/movies/animation_error.mov



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 09:44, xxxxxxxx wrote:

    I have been doing some more tests and another deformer that produces the same effect (in the animation the mesh follows the non-deformed state) is the Spline Wrap deformer.
    Are there some deformers that don't deal well with the SendModelingCommand set to CorrentStateToObject at animation time?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 09:51, xxxxxxxx wrote:

    GetDeformCache()   ??



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 11:51, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Are there some deformers that don't deal well with the SendModelingCommand set to CorrentStateToObject at animation time?

    I believe so. I have tried many times to get CSTO to work with a displace deformer. It doesn't seem to return the deformed vertices, just the original ones before any displacement. If you do CSTO on an object plus displace deformer in a scene it works fine, but doing it in GetVirtualObjects to use the deformed vertices for another purpose doesn't work. Or rather, I can't get it to work (not the same thing!).

    Steve



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 13:14, xxxxxxxx wrote:

    Thank you for your testimony, Steve.
    I have tested it with the Displace deformer and it does like you say.
    I really must find a solution for this because it is essential that my plugin works with the Surface deformer.

    I tried with GetDeformCache()
    The statement:

    def_spline=original_spline.GetDeformCache()

    should return in def_spline a BaseObject that was the deformed original_spline, right?
    Is it like if Cinema4D does an internal CSTO?
    Well, I got None all the time :-(



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 17:07, xxxxxxxx wrote:

    I assume you are calling the doc the proper way?
    (as some of your deformed tests seems to work at render)
    via your own Generator i.e.such as:

    doc = mypluginobject.GetDocument()
    

    rather than:

    doc = c4d.documents.GetActiveDocument()
    

    Using GetActiveDocument() is not a safe way to get
    the correct document at render time.
    (As the document is duplicated)

    You are using GetVirtualObjects(), right?
    Then Execute() should not be needed.

    Then, getting the correct Cache of an object can be a bit
    convoluted and calls for some logistics as it
    depends on what kind of object you are checking :)

    The return options for checking a single object are:
    None                        : Undeformed point/poly Object (or Something went wrong)
    GetCache()                  : Undeformed Parametric Object
    GetCache().GetDeformCache() : Deformed Parametric Object
    GetDeformedCache()          : Deformed Point/Poly Object

    In the case of the object is an undeformed point/poly object,
    you need to return the point/poly object itself.

    By setting up a 2 by 2 function matrix ( 2 if else checks)
    you can get the correct return.
    So you have four different return options including the original object
    plus the None if the two if else fail.

    While the Cache return points (and polys for poly objects) as if
    it is an object, afaik the returned cache is to be treated as "read only data".
    I.e. the Cache return of a spline does not include proper variable tags.
    Csto does return a valid object that you can treat as normal but it has problems
    getting the deformed state if its deformer is not a child of it.
    So if you want to treat a "real" object by Cache data, you would
    first get the Cache Data, then Csto the object and finally set the
    points from the Cache data to the object. (object.SetAllPoints(cachedata.GetAllPoints()) )

    Then finally check if anywhere in your set ups there is a Deformer as the first child
    of a Generator. As an example having a HyperNURB where the first child is a deformer
    and then the objects you want to subdivide, both MakeEditable and CurrentStateToObject Commands
    (the Icon/Key Commands as well as code) will fail.

    I hope some of this might help.

    Cheers
    Lennart



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 17:30, xxxxxxxx wrote:

    Lennart, you saved me!!! :-)
    I didn't recall that the document was cloned at render time.
    So, using doc=op.GetDocument() made it work.
    You are the best!!! :-)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 18:05, xxxxxxxx wrote:

    Glad to hear that!

    Could do with a copy when you're done :)

    Cheers
    Lennart



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/09/2012 at 18:30, xxxxxxxx wrote:

    Will send you one, Lennart :-)

    Rui Batista


Log in to reply