[Bf-animsys] Bf-animsys Digest, Vol 30, Issue 1

Erick Blender erickblender at gmail.com
Wed Apr 20 23:05:55 CEST 2016


Thanks for the clear respond :)

On Tue, Apr 19, 2016 at 1:00 PM, <bf-animsys-request at blender.org> wrote:

> Send Bf-animsys mailing list submissions to
>         bf-animsys at blender.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.blender.org/mailman/listinfo/bf-animsys
> or, via email, send a message with subject or body 'help' to
>         bf-animsys-request at blender.org
>
> You can reach the person managing the list at
>         bf-animsys-owner at blender.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Bf-animsys digest..."
>
>
> Today's Topics:
>
>    1. Animation logic (Erick Blender)
>    2. Re: Animation logic (Joshua Leung)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 19 Apr 2016 10:19:08 +0300
> From: Erick Blender <erickblender at gmail.com>
> Subject: [Bf-animsys] Animation logic
> To: bf-animsys at blender.org, bf-committers at blender.org
> Message-ID:
>         <CAFgX_-yvMV=
> NyggShinbU9Y3gJF1bapZAe4gtinUFAnbXUBeGA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi there!
>
> Wanted to ask about Blender animation logic, how graph editor, timeline,
> dopesheet and NLA work together?
> Reading code files in blender/editor/animation i find many useful code and
> i found as well  that in blender/editor/transform/transform_conversion.c
> there is basic keyframes move, ...
>
> My question is how graph editor, timeline, dopesheet and NLA talk to each
> other for example when moving a keyframe in graph it get updated in the
> dopesheet or vise versa. Is there some where in the code that Blender
> update dopesheet when action happening in the graph editor?
>
> Thanks in advance :)
>
> <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=oa-2109-v2-b
> >
> Virus-free.
> www.avast.com
> <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=oa-2109-v2-b
> >
> <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.blender.org/pipermail/bf-animsys/attachments/20160419/c2e07cde/attachment-0001.htm
>
> ------------------------------
>
> Message: 2
> Date: Tue, 19 Apr 2016 19:47:17 +1200
> From: Joshua Leung <aligorith at gmail.com>
> Subject: Re: [Bf-animsys] Animation logic
> To: Discussion list to assist animation developers
>         <bf-animsys at blender.org>
> Message-ID:
>         <CA+KxdBA58Q6txjMcSxTfDdweSDMTrnPkETct=
> y+s8mMyrG7UZQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Erick,
>
> For a useful (though overly broad/general) introduction to the key concepts
> of how updates in Blender happen in general, see this:
>
> https://wiki.blender.org/index.php/Dev:2.5/Source/Architecture/Window_Manager
>
>
> Here you go  (this was originally go to be "in short", but then it turned
> out to be a lot longer reply ;):
> * The code in your "operator" modifies the keyframes/etc. data (i.e. stuff
> stored in the SDNA structs that form that Main database)
> * When your operator is done, it sends a "notifier"  -
> WM_event_add_notifier(C, ....notifier flags..., NULL);
>   For keyframe editing, this is usually something like NC_ANIMATION |
> ND_KEYFRAME | NA_EDITED (i.e. notifier for "animation context", "keyframe
> data", "editing performed/action").
> * Notifiers are added to a global queue to be processed the next time we go
> through flushing updates (more about this below), instead of being handled
> immediately (i.e. the "callback" style of updates that other toolkits -
> notably Qt, GTK, and all of the Java ones - Swing, etc. use. However, the
> "callback style" has some serious disadvantages - i.e. some updates
> happening multiple times, bad performance if you inadvertently chain up a
> bunch of these by relying on delegating to other callbacks, and "callback
> hell" if that chaining accidentally forms a loop.)
> * As in any GUI program, Blender has what's known as an "event loop".
> Basically, it's like you've got a piece of code in your main function that
> does:
>   while (true) {
>         get_event();
>         handle_event();    // run operators, and/or exit the program
>         flush_updates();   // handle notifiers
>         refresh_and_redraw();
>    }
>
>   In Blender, notifiers are handled in the "flush_updates()" step, after
> the operator runs (i.e. handle_event() == an operator gets run, or some
> event gets sent to the UI handler, or something like that). What that means
> is that it goes through each window -> editor -> region, and for each of
> the queued up notifiers, it asks those if it would like to do anything
> about that notifier. (You could say it's sort of Observer Pattern stuff I
> guess, except it's deferred updates, and we're still really only asking if
> they'd like to do any updates). So, each of the animation editors will
> listen for NC_ANIMATION | ND_KEYFRAME events, and when they hear them, will
> tag themselves to be redrawn.
>
>   Finally, when it's time to redraw the UI, only the editors/regions that
> are tagged to get redrawn will be redrawn (since redrawing everything all
> the time, even if nothing has changed is slow, and would make everything
> laggy). So, at this point, all the visible animation editors would get
> redrawn, because they tagged themselves to get redrawn, in response to the
> notifier that got sent out.
>
>
>
> Now, all of the above is only just updating the UI (which is what your
> question was about). If you were to talk about how you get those animation
> changes flushed to the actual models and rigs, then you'll need to be
> talking about the dependency graph stuff then. But, there it's really a
> similar idea again :)
>
>
> (Also, if you're just concerned with the transform code, have a look in
> transform_generics.c -> recalcData() for how things get tagged for updates
> there :)
>
>
>
> Regards,
> Joshua
>
>
> On Tue, Apr 19, 2016 at 7:19 PM, Erick Blender <erickblender at gmail.com>
> wrote:
>
> > Hi there!
> >
> > Wanted to ask about Blender animation logic, how graph editor, timeline,
> > dopesheet and NLA work together?
> > Reading code files in blender/editor/animation i find many useful code
> and
> > i found as well  that in blender/editor/transform/transform_conversion.c
> > there is basic keyframes move, ...
> >
> > My question is how graph editor, timeline, dopesheet and NLA talk to each
> > other for example when moving a keyframe in graph it get updated in the
> > dopesheet or vise versa. Is there some where in the code that Blender
> > update dopesheet when action happening in the graph editor?
> >
> > Thanks in advance :)
> >
> >
> > <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=oa-2109-v2-b>
> Virus-free.
> > www.avast.com
> > <
> https://www.avast.com/en-us/lp-esg-fav?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=oa-2109-v2-b
> >
> > <#m_8821382711635120639_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >
> > _______________________________________________
> > Bf-animsys mailing list
> > Bf-animsys at blender.org
> > https://lists.blender.org/mailman/listinfo/bf-animsys
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.blender.org/pipermail/bf-animsys/attachments/20160419/b43c6636/attachment-0001.htm
>
> ------------------------------
>
> _______________________________________________
> Bf-animsys mailing list
> Bf-animsys at blender.org
> https://lists.blender.org/mailman/listinfo/bf-animsys
>
>
> End of Bf-animsys Digest, Vol 30, Issue 1
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-animsys/attachments/20160421/6f13e100/attachment.html>


More information about the Bf-animsys mailing list