AnimateDocument dont refresh Spline-anim



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

    On 23/05/2009 at 10:04, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:   Windows  ;   
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    OK hi

    i tryed a little bit with coffee and have the following problem

    i want show the position of an object of every frame

    so easy code:

    > <code>
    > CallCommand(12414); doc->AnimateDocument(ANIMATE_QUICK); var obj= doc->GetFirstObject(); println(obj->GetPosition());
    >
    > CallCommand(12414); doc->AnimateDocument(ANIMATE_QUICK); var obj= doc->GetFirstObject(); println(obj->GetPosition());
    > </code>

    I used that in the console, but the problem is this doesnt invole animations by tags

    for example a camera is following a spline

    So the camera dont have any Keyframes

    Should i use AnimateObject? if, how?

    Yours faithfully
    msthavoc



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

    On 24/05/2009 at 11:35, xxxxxxxx wrote:

    \> \> \> CallCommand(13957); \> \> \> var obj= doc->GetFirstObject(); \> var basetime = doc->GetTime(); \> basetime->SetSecond(1); \> doc->AnimateObject(obj, basetime, 0); \> obj->MultiMessage(MSG_UPDATE); \> obj->Message(MSG_UPDATE); \> println(obj->GetPosition()); \> \> \> \> var obj= doc->GetFirstObject(); \> var basetime = doc->GetTime(); \> basetime->SetSecond(2); \> doc->AnimateObject(obj, basetime, 0); \> obj->MultiMessage(MSG_UPDATE); \> obj->Message(MSG_UPDATE); \> println(obj->GetPosition()); \> \> \> \>

    I also tried AnimateObject() but this is really curios because

    first time it prints the current position of my object

    and 2nd time the console outputs the right position

    but not of 2 different time but only 2 x the same position

    need help :)



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

    On 24/05/2009 at 15:25, xxxxxxxx wrote:

    All you want is get the current position of the object printed in the console?
    Put the following in a CoffeeTag (Cinema R11)and press play.

    > \> main(doc,op) \> { \> if(!object()) return; // no selected object \> println(object()->GetPosition()); // Local position \> println(object()->GetMg()->GetV0()); // Global position \> } \>

    Cheers
    Lennart



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

    On 24/05/2009 at 18:29, xxxxxxxx wrote:

    i dont want to use a coffee tag, i want create a plugin for exporting position and rotation

    so i cant use a tag.



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

    On 25/05/2009 at 02:36, xxxxxxxx wrote:

    ok maybe i can use the tag temporarily

    so that i add this coffetag to an object which returns a value
    which i can read from the console but how, and would give me that the right positions of every frame

    Object Coffetag

    > \> main(doc,op) \> { \> \> if(!object()) return; // no selected object \> return (object()->GetMg()->GetV0()); // Global position \> \> } \> \>

    my console command

    > \> var obj = doc->GetFirstObject(); println(obj->GetFirstTag()); \> \>



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

    On 25/05/2009 at 04:49, xxxxxxxx wrote:

    It 's hard to tell what you really want to do.
    You say you want to export position and rotation
    of an object for each frame.
    What exactly is it that you want to export?
    And export to what?

    Cheers
    Lennart



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

    On 25/05/2009 at 05:47, xxxxxxxx wrote:

    currently I write a plugin for exporting a camera

    but the problem is that the export dont work with cameras which are controlled by tags, for example a follow spline tag (or which is called, sorry use german version of c4d)

    So for testing i use just a console command which shows the problem exactly

    > <code>
    >
    > CallCommand(12414); doc->AnimateDocument(ANIMATE_QUICK); var obj= doc->GetFirstObject(); println(obj->GetPosition());
    >
    > CallCommand(12414); doc->AnimateDocument(ANIMATE_QUICK); var obj= doc->GetFirstObject(); println(obj->GetPosition());
    >
    > </code>

    by using that with a cameraobject (at first position), animated with keyframes you get the right positions from 2 frames

    with a camera with taganimation, you get only 2 times the same position from one position

    so if i can fix it, i could take that console command, make a loop and can use it in my plugin

    Hope its allowed to link images

    so here you can see my problem, i stored the position of each frame in that entryfield

    keyframe animation

    tag animation



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

    On 25/05/2009 at 07:00, xxxxxxxx wrote:

    As for getting the animated pos/rot using a script/Menu plugin,
    check the thread(CGTalk post #11). that script by Adam Swaab
    will animate your document.

    http://forums.cgsociety.org/showthread.php?f=47&t;=742967&highlight;=holy+grail

    Substitute the "CallCommand(12410);//record" line with:

    op->GetMg()->GetHPB(); // rotation
    op->GetMg()->GetV0(); // position

    The export to BHV I have no experience of.

    Cheers
    Lennart



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

    On 25/05/2009 at 13:17, xxxxxxxx wrote:

    thank you very much seems to work

    Yours faithfully
    msthavoc


Log in to reply