2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2009-06-07 11:37:15 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2009-06-07 11:37:15 +00:00
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-06-07 11:37:15 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2009 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup spnla
|
2011-02-27 20:29:51 +00:00
|
|
|
*/
|
|
|
|
|
|
2009-06-07 11:37:15 +00:00
|
|
|
#include <float.h>
|
2020-03-19 09:33:03 +01:00
|
|
|
#include <math.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <string.h>
|
2009-06-07 11:37:15 +00:00
|
|
|
|
|
|
|
|
#include "DNA_anim_types.h"
|
|
|
|
|
|
2011-01-07 18:36:47 +00:00
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
|
2009-06-07 11:37:15 +00:00
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
|
|
|
|
#include "BLI_blenlib.h"
|
|
|
|
|
|
2015-08-16 17:32:01 +10:00
|
|
|
#include "BLT_translation.h"
|
2011-07-08 04:32:45 +00:00
|
|
|
|
2009-06-07 11:37:15 +00:00
|
|
|
#include "BKE_context.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BKE_nla.h"
|
2009-06-07 11:37:15 +00:00
|
|
|
#include "BKE_screen.h"
|
|
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
|
|
|
|
#include "RNA_access.h"
|
|
|
|
|
|
|
|
|
|
#include "ED_anim_api.h"
|
|
|
|
|
#include "ED_screen.h"
|
|
|
|
|
|
|
|
|
|
#include "UI_interface.h"
|
|
|
|
|
#include "UI_resources.h"
|
|
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
#include "nla_intern.h" /* own include */
|
2009-06-07 11:37:15 +00:00
|
|
|
|
|
|
|
|
/* ******************* nla editor space & buttons ************** */
|
|
|
|
|
|
|
|
|
|
/* -------------- */
|
|
|
|
|
|
2013-08-07 03:44:05 +00:00
|
|
|
static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int UNUSED(event))
|
2009-06-07 11:37:15 +00:00
|
|
|
{
|
2019-05-01 11:09:22 +10:00
|
|
|
// Scene *scene = CTX_data_scene(C);
|
2013-08-07 03:44:05 +00:00
|
|
|
#if 0
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (event) {
|
2018-04-16 17:08:27 +02:00
|
|
|
/* pass */
|
2009-06-07 11:37:15 +00:00
|
|
|
}
|
2013-08-07 03:44:05 +00:00
|
|
|
#endif
|
2009-06-07 11:37:15 +00:00
|
|
|
/* default for now */
|
2012-05-08 18:05:57 +00:00
|
|
|
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
|
|
|
|
WM_event_add_notifier(C, NC_SCENE | ND_TRANSFORM, NULL);
|
2009-06-07 11:37:15 +00:00
|
|
|
}
|
|
|
|
|
|
2014-05-05 14:15:28 +12:00
|
|
|
bool nla_panel_context(const bContext *C,
|
|
|
|
|
PointerRNA *adt_ptr,
|
|
|
|
|
PointerRNA *nlt_ptr,
|
|
|
|
|
PointerRNA *strip_ptr)
|
2009-06-07 11:37:15 +00:00
|
|
|
{
|
|
|
|
|
bAnimContext ac;
|
2012-05-08 18:05:57 +00:00
|
|
|
bAnimListElem *ale = NULL;
|
2009-06-09 04:39:33 +00:00
|
|
|
ListBase anim_data = {NULL, NULL};
|
2014-05-05 14:15:28 +12:00
|
|
|
short found = 0; /* not bool, since we need to indicate "found but not ideal" status */
|
2009-06-09 04:39:33 +00:00
|
|
|
int filter;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 00:18:34 +10:00
|
|
|
/* For now, only draw if we could init the anim-context info
|
|
|
|
|
* (necessary for all animation-related tools)
|
|
|
|
|
* to work correctly is able to be correctly retrieved. There's no point showing empty panels? */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ANIM_animdata_get_context(C, &ac) == 0) {
|
2014-05-05 14:15:28 +12:00
|
|
|
return false;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-06-04 09:31:30 +02:00
|
|
|
/* extract list of active channel(s), of which we should only take the first one
|
2018-11-14 12:53:15 +11:00
|
|
|
* - we need the channels flag to get the active AnimData block when there are no NLA Tracks
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
*/
|
Animation Channel Filtering Refactor - Part 3 (Visibility Flag Split)
* This (big) commit is aimed at cleaning up the filtering flags used
by the animation channel filtering code. The list of filtering flags
has been growing a bit "organically" since it's humble origins for use
in the Action Editor some 3 years (IIRC) ago now during a weekend
hackathon. Obviously, some things have ended up tacked on, while
others have been the product of other flag options. Nevertheless, it
was time for a bit of a spring clean!
* Most notably, one area where the system outgrown its original design
for the Action Editor was in terms of the "visibility" filtering flag
it was using. While in the Action Editor the concept of what channels
to include was strictly dictated by whether the channel hierarchy
showed it, in the Graph Editor this is not always the case. In other
words, there was a difference between the data the channels
represented being visible and the channels for that data being visible
in the hierarchy.
Long story short: this lead to bug report [#27076] (and many like it),
where if you selected an F-Curve, then collapsed the Group it was in,
then even after selecting another F-Curve in another Group, the
original F-Curve's properties would still be shown in the Properties
Region. The good news is that this commit fixes this issue right away!
* More good news will follow, as I start checking on the flag usage of
other tools, but I'm committing this first so that we have a stable
reference (of code similar to the old buggy stuff) on which we can
fall back to later to find bugs (should they pop up).
Anyways, back to the trenches!
2011-06-22 11:41:26 +00:00
|
|
|
/* XXX: double-check active! */
|
2012-05-08 18:05:57 +00:00
|
|
|
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ACTIVE |
|
|
|
|
|
ANIMFILTER_LIST_CHANNELS);
|
2009-06-09 04:39:33 +00:00
|
|
|
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
for (ale = anim_data.first; ale; ale = ale->next) {
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
switch (ale->type) {
|
|
|
|
|
case ANIMTYPE_NLATRACK: /* NLA Track - The primary data type which should get caught */
|
|
|
|
|
{
|
2012-05-08 18:05:57 +00:00
|
|
|
NlaTrack *nlt = (NlaTrack *)ale->data;
|
|
|
|
|
AnimData *adt = ale->adt;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
/* found it, now set the pointers */
|
|
|
|
|
if (adt_ptr) {
|
|
|
|
|
/* AnimData pointer */
|
|
|
|
|
RNA_pointer_create(ale->id, &RNA_AnimData, adt, adt_ptr);
|
|
|
|
|
}
|
|
|
|
|
if (nlt_ptr) {
|
|
|
|
|
/* NLA-Track pointer */
|
|
|
|
|
RNA_pointer_create(ale->id, &RNA_NlaTrack, nlt, nlt_ptr);
|
|
|
|
|
}
|
|
|
|
|
if (strip_ptr) {
|
|
|
|
|
/* NLA-Strip pointer */
|
2012-05-08 18:05:57 +00:00
|
|
|
NlaStrip *strip = BKE_nlastrip_find_active(nlt);
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, strip_ptr);
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
found = 1;
|
2013-07-19 15:23:42 +00:00
|
|
|
break;
|
2009-06-09 04:39:33 +00:00
|
|
|
}
|
2012-05-08 18:05:57 +00:00
|
|
|
case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
case ANIMTYPE_OBJECT:
|
2012-05-08 18:05:57 +00:00
|
|
|
case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
case ANIMTYPE_DSLAM:
|
|
|
|
|
case ANIMTYPE_DSCAM:
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
case ANIMTYPE_DSCACHEFILE:
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
case ANIMTYPE_DSCUR:
|
|
|
|
|
case ANIMTYPE_DSSKEY:
|
|
|
|
|
case ANIMTYPE_DSWOR:
|
2009-11-11 05:03:49 +00:00
|
|
|
case ANIMTYPE_DSNTREE:
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
case ANIMTYPE_DSPART:
|
|
|
|
|
case ANIMTYPE_DSMBALL:
|
|
|
|
|
case ANIMTYPE_DSARM:
|
2013-03-14 05:44:56 +00:00
|
|
|
case ANIMTYPE_DSMESH:
|
|
|
|
|
case ANIMTYPE_DSTEX:
|
|
|
|
|
case ANIMTYPE_DSLAT:
|
2010-09-21 22:23:10 +00:00
|
|
|
case ANIMTYPE_DSLINESTYLE:
|
2011-08-01 11:44:20 +00:00
|
|
|
case ANIMTYPE_DSSPK:
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
case ANIMTYPE_DSGPENCIL:
|
2020-03-17 14:41:48 +01:00
|
|
|
case ANIMTYPE_PALETTE:
|
|
|
|
|
case ANIMTYPE_DSHAIR:
|
|
|
|
|
case ANIMTYPE_DSPOINTCLOUD:
|
2020-04-20 10:37:38 +02:00
|
|
|
case ANIMTYPE_DSVOLUME:
|
|
|
|
|
case ANIMTYPE_DSSIMULATION: {
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
/* for these channels, we only do AnimData */
|
2013-03-16 02:42:19 +00:00
|
|
|
if (ale->adt && adt_ptr) {
|
|
|
|
|
ID *id;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-16 02:42:19 +00:00
|
|
|
if ((ale->data == NULL) || (ale->type == ANIMTYPE_OBJECT)) {
|
|
|
|
|
/* ale->data is not an ID block! */
|
|
|
|
|
id = ale->id;
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
}
|
2013-03-16 02:42:19 +00:00
|
|
|
else {
|
2019-01-15 23:24:20 +11:00
|
|
|
/* ale->data is always the proper ID block we need,
|
|
|
|
|
* but ale->id may not be (i.e. for textures) */
|
2013-03-16 02:42:19 +00:00
|
|
|
id = (ID *)ale->data;
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-16 02:42:19 +00:00
|
|
|
/* AnimData pointer */
|
2015-04-04 11:36:46 +13:00
|
|
|
if (adt_ptr) {
|
|
|
|
|
RNA_pointer_create(id, &RNA_AnimData, ale->adt, adt_ptr);
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-06-04 09:31:30 +02:00
|
|
|
/* set found status to -1, since setting to 1 would break the loop
|
2013-03-16 02:42:19 +00:00
|
|
|
* and potentially skip an active NLA-Track in some cases...
|
|
|
|
|
*/
|
|
|
|
|
found = -1;
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
}
|
2013-07-19 15:23:42 +00:00
|
|
|
break;
|
2012-10-21 05:46:41 +00:00
|
|
|
}
|
2009-06-09 04:39:33 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (found > 0) {
|
2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)
* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying.
* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...
Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
|
|
|
break;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2009-06-09 04:39:33 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* free temp data */
|
2014-05-19 00:24:45 +10:00
|
|
|
ANIM_animdata_freelist(&anim_data);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-05-05 14:15:28 +12:00
|
|
|
return (found != 0);
|
2009-06-07 11:37:15 +00:00
|
|
|
}
|
|
|
|
|
|
2009-06-19 04:45:56 +00:00
|
|
|
#if 0
|
2018-07-02 11:47:00 +02:00
|
|
|
static bool nla_panel_poll(const bContext *C, PanelType *pt)
|
2009-06-07 11:37:15 +00:00
|
|
|
{
|
|
|
|
|
return nla_panel_context(C, NULL, NULL);
|
|
|
|
|
}
|
2009-06-19 04:45:56 +00:00
|
|
|
#endif
|
2009-06-07 11:37:15 +00:00
|
|
|
|
2018-07-02 11:47:00 +02:00
|
|
|
static bool nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt))
|
2009-07-31 07:43:47 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA ptr;
|
|
|
|
|
return (nla_panel_context(C, &ptr, NULL, NULL) && (ptr.data != NULL));
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-02 11:47:00 +02:00
|
|
|
static bool nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
|
2009-06-19 04:45:56 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA ptr;
|
2009-07-31 07:43:47 +00:00
|
|
|
return (nla_panel_context(C, NULL, NULL, &ptr) && (ptr.data != NULL));
|
2009-06-19 04:45:56 +00:00
|
|
|
}
|
|
|
|
|
|
2018-07-02 11:47:00 +02:00
|
|
|
static bool nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
|
2009-06-19 04:45:56 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA ptr;
|
|
|
|
|
NlaStrip *strip;
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (!nla_panel_context(C, NULL, NULL, &ptr)) {
|
2009-06-19 04:45:56 +00:00
|
|
|
return 0;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
|
|
|
|
if (ptr.data == NULL) {
|
2009-06-19 04:45:56 +00:00
|
|
|
return 0;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
strip = ptr.data;
|
2009-06-19 04:45:56 +00:00
|
|
|
return (strip->type == NLASTRIP_TYPE_CLIP);
|
|
|
|
|
}
|
2009-06-09 04:39:33 +00:00
|
|
|
|
2018-07-02 11:47:00 +02:00
|
|
|
static bool nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt))
|
2011-08-07 12:27:20 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA ptr;
|
|
|
|
|
NlaStrip *strip;
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (!nla_panel_context(C, NULL, NULL, &ptr)) {
|
2011-08-07 12:27:20 +00:00
|
|
|
return 0;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
|
|
|
|
if (ptr.data == NULL) {
|
2011-08-07 12:27:20 +00:00
|
|
|
return 0;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
strip = ptr.data;
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (strip->type == NLASTRIP_TYPE_SOUND) {
|
2011-08-07 12:27:20 +00:00
|
|
|
return 0;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2011-08-07 12:27:20 +00:00
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* -------------- */
|
|
|
|
|
|
2009-07-31 07:43:47 +00:00
|
|
|
/* active AnimData */
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_animdata(const bContext *C, Panel *panel)
|
2009-07-31 07:43:47 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA adt_ptr;
|
2011-01-09 01:17:56 +00:00
|
|
|
/* AnimData *adt; */
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2009-07-31 07:43:47 +00:00
|
|
|
uiLayout *row;
|
|
|
|
|
uiBlock *block;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-07-31 07:43:47 +00:00
|
|
|
/* check context and also validity of pointer */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (!nla_panel_context(C, &adt_ptr, NULL, NULL)) {
|
2009-07-31 07:43:47 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-10-26 04:14:10 +00:00
|
|
|
/* adt = adt_ptr.data; */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
block = uiLayoutGetBlock(layout);
|
2014-11-09 21:20:40 +01:00
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiLayoutSetPropSep(layout, true);
|
|
|
|
|
uiLayoutSetPropDecorate(layout, false);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-16 02:42:19 +00:00
|
|
|
/* AnimData Source Properties ----------------------------------- */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-06-04 09:31:30 +02:00
|
|
|
/* icon + id-block name of block where AnimData came from to prevent
|
2013-03-16 02:42:19 +00:00
|
|
|
* accidentally changing the properties of the wrong action
|
|
|
|
|
*/
|
2019-08-23 09:52:12 +02:00
|
|
|
if (adt_ptr.owner_id) {
|
|
|
|
|
ID *id = adt_ptr.owner_id;
|
2013-03-16 02:42:19 +00:00
|
|
|
PointerRNA id_ptr;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-16 02:42:19 +00:00
|
|
|
RNA_id_pointer_create(id, &id_ptr);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-16 02:42:19 +00:00
|
|
|
/* ID-block name > AnimData */
|
2014-04-01 11:34:00 +11:00
|
|
|
row = uiLayoutRow(layout, true);
|
2013-03-16 02:42:19 +00:00
|
|
|
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-16 02:42:19 +00:00
|
|
|
uiItemL(row, id->name + 2, RNA_struct_ui_icon(id_ptr.type)); /* id-block (src) */
|
2018-09-20 18:07:58 +02:00
|
|
|
uiItemL(row, "", ICON_SMALL_TRI_RIGHT_VEC); /* expander */
|
2013-03-16 02:42:19 +00:00
|
|
|
uiItemL(row, IFACE_("Animation Data"), ICON_ANIM_DATA); /* animdata */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-16 02:42:19 +00:00
|
|
|
uiItemS(layout);
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-07-31 07:43:47 +00:00
|
|
|
/* Active Action Properties ------------------------------------- */
|
|
|
|
|
/* action */
|
2014-04-01 11:34:00 +11:00
|
|
|
row = uiLayoutRow(layout, true);
|
2018-01-03 21:54:02 +11:00
|
|
|
uiTemplateID(row,
|
|
|
|
|
(bContext *)C,
|
|
|
|
|
&adt_ptr,
|
|
|
|
|
"action",
|
UI: Redesigned data-block selectors
The previous design is rather old and has a couple of problems:
* Scalability: The current solution of adding little icon buttons next to the
data-block name field doesn't scale well. It only works if there's a small
number of operations. We need to be able to place more items there for better
data-block management. Especially with the introduction of library overrides.
* Discoverability: It's not obvious what some of the icons do. They appear and
disappear, but it's not obvious why some are available at times and others
not.
* Unclear Status: Currently their library status (linked, indirectly linked,
broken link, library override) isn't really clear.
* Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to
invoke alternative behaviors. This is not a usual pattern in Blender.
This patch does the following changes:
* Adds a menu to the right of the name button to access all kinds of operations
(create, delete, unlink, user management, library overrides, etc).
* Make good use of the "disabled hint" for tooltips, to explain why buttons are
disabled. The UI team wants to establish this as a good practise.
* Use superimposed icons for duplicate and unlink, rather than extra buttons
(uses less space, looks less distracting and is a nice + consistent design
language).
* Remove fake user and user count button, they are available from the menu now.
* Support tooltips for superimposed icons (committed mouse hover feedback to
master already).
* Slightly increase size of the name button - it was already a bit small
before, and the move from real buttons to superimposed icons reduces usable
space for the name itself.
* More clearly differentiate between duplicate and creating a new data-block.
The latter is only available in the menu.
* Display library status icon on the left (linked, missing library, overridden,
asset)
* Disables "Make Single User" button - in review we weren't sure if there are
good use-cases for it, so better to see if we can remove it.
Note that I do expect some aspects of this design to change still. I think some
changes are problematic, but others disagreed. I will open a feedback thread on
devtalk to see what others think.
Differential Revision: https://developer.blender.org/D8554
Reviewed by: Bastien Montagne
Design discussed and agreed on with the UI team, also see T79959.
2020-12-18 18:12:11 +01:00
|
|
|
"ACTION_OT_new",
|
2021-01-13 15:08:09 +01:00
|
|
|
NULL,
|
2018-07-31 10:22:19 +02:00
|
|
|
"NLA_OT_action_unlink",
|
|
|
|
|
UI_TEMPLATE_ID_FILTER_ALL,
|
2019-11-25 19:41:30 +01:00
|
|
|
false,
|
|
|
|
|
NULL);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-07-31 07:43:47 +00:00
|
|
|
/* extrapolation */
|
2014-04-01 11:34:00 +11:00
|
|
|
row = uiLayoutRow(layout, true);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(row, &adt_ptr, "action_extrapolation", 0, IFACE_("Extrapolation"), ICON_NONE);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-07-31 07:43:47 +00:00
|
|
|
/* blending */
|
2014-04-01 11:34:00 +11:00
|
|
|
row = uiLayoutRow(layout, true);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(row, &adt_ptr, "action_blend_type", 0, IFACE_("Blending"), ICON_NONE);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-07-31 07:43:47 +00:00
|
|
|
/* influence */
|
2014-04-01 11:34:00 +11:00
|
|
|
row = uiLayoutRow(layout, true);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(row, &adt_ptr, "action_influence", 0, IFACE_("Influence"), ICON_NONE);
|
2009-07-31 07:43:47 +00:00
|
|
|
}
|
|
|
|
|
|
2020-01-28 13:13:45 +01:00
|
|
|
/* generic settings for active NLA-Strip */
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_stripname(const bContext *C, Panel *panel)
|
2009-06-09 04:39:33 +00:00
|
|
|
{
|
2020-01-28 13:13:45 +01:00
|
|
|
PointerRNA strip_ptr;
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2009-06-09 04:39:33 +00:00
|
|
|
uiLayout *row;
|
|
|
|
|
uiBlock *block;
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2020-01-28 13:13:45 +01:00
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
2009-06-09 04:39:33 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
block = uiLayoutGetBlock(layout);
|
2014-11-09 21:20:40 +01:00
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2020-01-28 13:13:45 +01:00
|
|
|
/* Strip Properties ------------------------------------- */
|
|
|
|
|
/* strip type */
|
|
|
|
|
row = uiLayoutRow(layout, false);
|
|
|
|
|
if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_CLIP) {
|
|
|
|
|
uiItemL(row, "", ICON_ANIM);
|
|
|
|
|
}
|
|
|
|
|
else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_TRANSITION) {
|
|
|
|
|
uiItemL(row, "", ICON_ARROW_LEFTRIGHT);
|
|
|
|
|
}
|
|
|
|
|
else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_META) {
|
|
|
|
|
uiItemL(row, "", ICON_SEQ_STRIP_META);
|
|
|
|
|
}
|
|
|
|
|
else if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
|
|
|
|
|
uiItemL(row, "", ICON_SOUND);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uiItemR(row, &strip_ptr, "name", 0, "", ICON_NLA);
|
|
|
|
|
|
2020-12-18 17:13:15 -06:00
|
|
|
UI_block_emboss_set(block, UI_EMBOSS_NONE_OR_STATUS);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(row, &strip_ptr, "mute", 0, "", ICON_NONE);
|
|
|
|
|
UI_block_emboss_set(block, UI_EMBOSS);
|
2009-06-09 04:39:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* generic settings for active NLA-Strip */
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_properties(const bContext *C, Panel *panel)
|
2009-06-07 11:37:15 +00:00
|
|
|
{
|
2009-06-09 04:39:33 +00:00
|
|
|
PointerRNA strip_ptr;
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2020-04-18 08:32:21 +02:00
|
|
|
uiLayout *column, *row;
|
2009-06-07 11:37:15 +00:00
|
|
|
uiBlock *block;
|
2011-08-07 12:27:20 +00:00
|
|
|
short showEvalProps = 1;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
2009-06-25 05:05:35 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
block = uiLayoutGetBlock(layout);
|
2014-11-09 21:20:40 +01:00
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* Strip Properties ------------------------------------- */
|
|
|
|
|
/* strip type */
|
2020-01-28 13:13:45 +01:00
|
|
|
|
|
|
|
|
uiLayoutSetPropSep(layout, true);
|
|
|
|
|
uiLayoutSetPropDecorate(layout, false);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* strip extents */
|
2014-04-01 11:34:00 +11:00
|
|
|
column = uiLayoutColumn(layout, true);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(column, &strip_ptr, "frame_start", 0, IFACE_("Frame Start"), ICON_NONE);
|
|
|
|
|
uiItemR(column, &strip_ptr, "frame_end", 0, IFACE_("End"), ICON_NONE);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-08-07 12:27:20 +00:00
|
|
|
/* Evaluation-Related Strip Properties ------------------ */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-08-07 12:27:20 +00:00
|
|
|
/* sound properties strips don't have these settings */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND) {
|
2011-08-07 12:27:20 +00:00
|
|
|
showEvalProps = 0;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-08-07 12:27:20 +00:00
|
|
|
/* only show if allowed to... */
|
|
|
|
|
if (showEvalProps) {
|
|
|
|
|
/* extrapolation */
|
2020-01-28 13:13:45 +01:00
|
|
|
column = uiLayoutColumn(layout, false);
|
|
|
|
|
uiItemR(column, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE);
|
|
|
|
|
uiItemR(column, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-10 08:40:49 +02:00
|
|
|
/* Blend in/out + auto-blending:
|
2020-07-07 12:44:47 +10:00
|
|
|
* - blend in/out can only be set when auto-blending is off.
|
2011-08-07 12:27:20 +00:00
|
|
|
*/
|
2020-01-28 13:13:45 +01:00
|
|
|
|
|
|
|
|
uiItemS(layout);
|
|
|
|
|
|
|
|
|
|
column = uiLayoutColumn(layout, true);
|
|
|
|
|
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_auto_blend") == false);
|
|
|
|
|
uiItemR(column, &strip_ptr, "blend_in", 0, IFACE_("Blend In"), ICON_NONE);
|
|
|
|
|
uiItemR(column, &strip_ptr, "blend_out", 0, IFACE_("Out"), ICON_NONE);
|
|
|
|
|
|
2020-04-18 08:32:21 +02:00
|
|
|
row = uiLayoutRow(column, true);
|
|
|
|
|
uiLayoutSetActive(row, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
|
|
|
|
|
uiItemR(row, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); /* XXX as toggle? */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-08-07 12:27:20 +00:00
|
|
|
/* settings */
|
2020-06-22 15:06:13 +02:00
|
|
|
column = uiLayoutColumnWithHeading(layout, true, IFACE_("Playback"));
|
2020-04-18 08:32:21 +02:00
|
|
|
row = uiLayoutRow(column, true);
|
|
|
|
|
uiLayoutSetActive(row,
|
2012-05-08 18:05:57 +00:00
|
|
|
!(RNA_boolean_get(&strip_ptr, "use_animated_influence") ||
|
|
|
|
|
RNA_boolean_get(&strip_ptr, "use_animated_time")));
|
2020-04-18 08:32:21 +02:00
|
|
|
uiItemR(row, &strip_ptr, "use_reverse", 0, NULL, ICON_NONE);
|
2020-01-28 13:13:45 +01:00
|
|
|
|
2020-04-18 08:32:21 +02:00
|
|
|
uiItemR(column, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE);
|
2011-08-07 12:27:20 +00:00
|
|
|
}
|
2009-06-09 04:39:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* action-clip only settings for active NLA-Strip */
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_actclip(const bContext *C, Panel *panel)
|
2009-06-09 04:39:33 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA strip_ptr;
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2009-06-09 04:39:33 +00:00
|
|
|
uiLayout *column, *row;
|
|
|
|
|
uiBlock *block;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* check context and also validity of pointer */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
2009-06-09 04:39:33 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
block = uiLayoutGetBlock(layout);
|
2014-11-09 21:20:40 +01:00
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiLayoutSetPropSep(layout, true);
|
|
|
|
|
uiLayoutSetPropDecorate(layout, false);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* Strip Properties ------------------------------------- */
|
|
|
|
|
/* action pointer */
|
2014-04-01 11:34:00 +11:00
|
|
|
row = uiLayoutRow(layout, true);
|
2012-05-08 18:05:57 +00:00
|
|
|
uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* action extents */
|
2014-04-01 11:34:00 +11:00
|
|
|
column = uiLayoutColumn(layout, true);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Frame Start"), ICON_NONE);
|
|
|
|
|
uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End"), ICON_NONE);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-06-22 15:06:13 +02:00
|
|
|
row = uiLayoutRowWithHeading(layout, false, IFACE_("Sync Length"));
|
2020-04-18 08:32:21 +02:00
|
|
|
uiItemR(row, &strip_ptr, "use_sync_length", 0, "", ICON_NONE);
|
2013-04-26 13:42:55 +00:00
|
|
|
uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length");
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* action usage */
|
2014-04-01 11:34:00 +11:00
|
|
|
column = uiLayoutColumn(layout, true);
|
|
|
|
|
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(column, &strip_ptr, "scale", 0, IFACE_("Playback Scale"), ICON_NONE);
|
2012-05-08 18:05:57 +00:00
|
|
|
uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
|
2009-06-07 11:37:15 +00:00
|
|
|
}
|
|
|
|
|
|
2009-06-09 04:39:33 +00:00
|
|
|
/* evaluation settings for active NLA-Strip */
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_animated_influence_header(const bContext *C, Panel *panel)
|
2009-06-09 04:39:33 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA strip_ptr;
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2020-01-28 13:13:45 +01:00
|
|
|
uiLayout *col;
|
2009-06-09 04:39:33 +00:00
|
|
|
uiBlock *block;
|
|
|
|
|
|
|
|
|
|
/* check context and also validity of pointer */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
2009-06-09 04:39:33 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
block = uiLayoutGetBlock(layout);
|
2014-11-09 21:20:40 +01:00
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
col = uiLayoutColumn(layout, true);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(col, &strip_ptr, "use_animated_influence", 0, "", ICON_NONE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* evaluation settings for active NLA-Strip */
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_evaluation(const bContext *C, Panel *panel)
|
2020-01-28 13:13:45 +01:00
|
|
|
{
|
|
|
|
|
PointerRNA strip_ptr;
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2020-01-28 13:13:45 +01:00
|
|
|
uiBlock *block;
|
|
|
|
|
|
|
|
|
|
/* check context and also validity of pointer */
|
|
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2020-01-28 13:13:45 +01:00
|
|
|
block = uiLayoutGetBlock(layout);
|
|
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
|
|
|
|
uiLayoutSetPropSep(layout, true);
|
|
|
|
|
|
|
|
|
|
uiLayoutSetEnabled(layout, RNA_boolean_get(&strip_ptr, "use_animated_influence"));
|
|
|
|
|
uiItemR(layout, &strip_ptr, "influence", 0, NULL, ICON_NONE);
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_animated_strip_time_header(const bContext *C, Panel *panel)
|
2020-01-28 13:13:45 +01:00
|
|
|
{
|
|
|
|
|
PointerRNA strip_ptr;
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2020-01-28 13:13:45 +01:00
|
|
|
uiLayout *col;
|
|
|
|
|
uiBlock *block;
|
|
|
|
|
|
|
|
|
|
/* check context and also validity of pointer */
|
|
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
block = uiLayoutGetBlock(layout);
|
|
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
2011-11-23 19:05:52 +00:00
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
col = uiLayoutColumn(layout, true);
|
2020-01-28 13:13:45 +01:00
|
|
|
uiItemR(col, &strip_ptr, "use_animated_time", 0, "", ICON_NONE);
|
|
|
|
|
}
|
2011-11-23 19:05:52 +00:00
|
|
|
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_animated_strip_time(const bContext *C, Panel *panel)
|
2020-01-28 13:13:45 +01:00
|
|
|
{
|
|
|
|
|
PointerRNA strip_ptr;
|
2020-04-03 22:20:25 -05:00
|
|
|
uiLayout *layout = panel->layout;
|
2020-01-28 13:13:45 +01:00
|
|
|
uiBlock *block;
|
|
|
|
|
|
|
|
|
|
/* check context and also validity of pointer */
|
|
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
block = uiLayoutGetBlock(layout);
|
|
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
|
|
|
|
uiLayoutSetPropSep(layout, true);
|
|
|
|
|
|
|
|
|
|
uiLayoutSetEnabled(layout, RNA_boolean_get(&strip_ptr, "use_animated_time"));
|
|
|
|
|
uiItemR(layout, &strip_ptr, "strip_time", 0, NULL, ICON_NONE);
|
2009-06-09 04:39:33 +00:00
|
|
|
}
|
2009-06-07 11:37:15 +00:00
|
|
|
|
2009-06-19 04:45:56 +00:00
|
|
|
/* F-Modifiers for active NLA-Strip */
|
2020-04-03 22:20:25 -05:00
|
|
|
static void nla_panel_modifiers(const bContext *C, Panel *panel)
|
2009-06-19 04:45:56 +00:00
|
|
|
{
|
|
|
|
|
PointerRNA strip_ptr;
|
2009-07-02 06:41:10 +00:00
|
|
|
NlaStrip *strip;
|
|
|
|
|
FModifier *fcm;
|
2009-07-02 12:41:03 +00:00
|
|
|
uiLayout *col, *row;
|
2009-06-19 04:45:56 +00:00
|
|
|
uiBlock *block;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-06-19 04:45:56 +00:00
|
|
|
/* check context and also validity of pointer */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
|
2009-06-19 04:45:56 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-05-08 18:05:57 +00:00
|
|
|
strip = strip_ptr.data;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-04-03 22:20:25 -05:00
|
|
|
block = uiLayoutGetBlock(panel->layout);
|
2014-11-09 21:20:40 +01:00
|
|
|
UI_block_func_handle_set(block, do_nla_region_buttons, NULL);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-07-02 06:41:10 +00:00
|
|
|
/* 'add modifier' button at top of panel */
|
2009-07-02 12:41:03 +00:00
|
|
|
{
|
2020-04-03 22:20:25 -05:00
|
|
|
row = uiLayoutRow(panel->layout, false);
|
2012-05-08 18:05:57 +00:00
|
|
|
block = uiLayoutGetBlock(row);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 00:18:34 +10:00
|
|
|
/* FIXME: we need to set the only-active property so that this
|
|
|
|
|
* will only add modifiers for the active strip (not all selected). */
|
2016-04-04 00:30:59 +12:00
|
|
|
uiItemMenuEnumO(
|
|
|
|
|
row, (bContext *)C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2016-04-04 00:30:59 +12:00
|
|
|
/* copy/paste (as sub-row) */
|
2014-04-01 11:34:00 +11:00
|
|
|
row = uiLayoutRow(row, true);
|
2012-05-08 18:05:57 +00:00
|
|
|
uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");
|
|
|
|
|
uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
|
2009-07-02 12:41:03 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-07-02 06:41:10 +00:00
|
|
|
/* draw each modifier */
|
2012-05-08 18:05:57 +00:00
|
|
|
for (fcm = strip->modifiers.first; fcm; fcm = fcm->next) {
|
2020-04-03 22:20:25 -05:00
|
|
|
col = uiLayoutColumn(panel->layout, true);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-08-23 09:52:12 +02:00
|
|
|
ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.owner_id, &strip->modifiers, fcm);
|
2009-07-02 12:41:03 +00:00
|
|
|
}
|
2009-06-19 04:45:56 +00:00
|
|
|
}
|
|
|
|
|
|
2009-06-07 11:37:15 +00:00
|
|
|
/* ******************* general ******************************** */
|
|
|
|
|
|
|
|
|
|
void nla_buttons_register(ARegionType *art)
|
|
|
|
|
{
|
|
|
|
|
PanelType *pt;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animdata");
|
2009-07-31 07:43:47 +00:00
|
|
|
strcpy(pt->idname, "NLA_PT_animdata");
|
2013-03-27 19:09:50 +00:00
|
|
|
strcpy(pt->label, N_("Animation Data"));
|
2020-01-28 13:13:45 +01:00
|
|
|
strcpy(pt->category, "Edited Action");
|
2015-08-16 17:32:01 +10:00
|
|
|
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
|
2020-01-28 13:13:45 +01:00
|
|
|
pt->flag = PANEL_TYPE_NO_HEADER;
|
2012-05-08 18:05:57 +00:00
|
|
|
pt->draw = nla_panel_animdata;
|
|
|
|
|
pt->poll = nla_animdata_panel_poll;
|
2009-07-31 07:43:47 +00:00
|
|
|
BLI_addtail(&art->paneltypes, pt);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-01-28 13:13:45 +01:00
|
|
|
pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
|
|
|
|
|
strcpy(pt->idname, "NLA_PT_stripname");
|
|
|
|
|
strcpy(pt->label, N_("Active Strip Name"));
|
|
|
|
|
strcpy(pt->category, "Strip");
|
2015-08-16 17:32:01 +10:00
|
|
|
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
|
2020-01-28 13:13:45 +01:00
|
|
|
pt->flag = PANEL_TYPE_NO_HEADER;
|
|
|
|
|
pt->draw = nla_panel_stripname;
|
|
|
|
|
pt->poll = nla_strip_panel_poll;
|
2009-06-09 04:39:33 +00:00
|
|
|
BLI_addtail(&art->paneltypes, pt);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-01-28 13:13:45 +01:00
|
|
|
PanelType *pt_properties = pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
|
2009-06-07 11:37:15 +00:00
|
|
|
strcpy(pt->idname, "NLA_PT_properties");
|
2013-03-27 19:09:50 +00:00
|
|
|
strcpy(pt->label, N_("Active Strip"));
|
2020-01-28 13:13:45 +01:00
|
|
|
strcpy(pt->category, "Strip");
|
2015-08-16 17:32:01 +10:00
|
|
|
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
|
2012-05-08 18:05:57 +00:00
|
|
|
pt->draw = nla_panel_properties;
|
|
|
|
|
pt->poll = nla_strip_panel_poll;
|
2009-06-07 11:37:15 +00:00
|
|
|
BLI_addtail(&art->paneltypes, pt);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties");
|
2009-06-09 04:39:33 +00:00
|
|
|
strcpy(pt->idname, "NLA_PT_actionclip");
|
2013-03-27 19:09:50 +00:00
|
|
|
strcpy(pt->label, N_("Action Clip"));
|
2020-01-28 13:13:45 +01:00
|
|
|
strcpy(pt->category, "Strip");
|
2015-08-16 17:32:01 +10:00
|
|
|
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
|
2012-05-08 18:05:57 +00:00
|
|
|
pt->draw = nla_panel_actclip;
|
2020-01-28 13:13:45 +01:00
|
|
|
pt->flag = PANEL_TYPE_DEFAULT_CLOSED;
|
2012-05-08 18:05:57 +00:00
|
|
|
pt->poll = nla_strip_actclip_panel_poll;
|
2009-06-09 04:39:33 +00:00
|
|
|
BLI_addtail(&art->paneltypes, pt);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation");
|
2009-06-09 04:39:33 +00:00
|
|
|
strcpy(pt->idname, "NLA_PT_evaluation");
|
2020-01-28 13:13:45 +01:00
|
|
|
strcpy(pt->parent_id, "NLA_PT_properties");
|
|
|
|
|
strcpy(pt->label, N_("Animated Influence"));
|
|
|
|
|
strcpy(pt->category, "Strip");
|
2015-08-16 17:32:01 +10:00
|
|
|
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
|
2012-05-08 18:05:57 +00:00
|
|
|
pt->draw = nla_panel_evaluation;
|
2020-01-28 13:13:45 +01:00
|
|
|
pt->draw_header = nla_panel_animated_influence_header;
|
|
|
|
|
pt->parent = pt_properties;
|
|
|
|
|
pt->flag = PANEL_TYPE_DEFAULT_CLOSED;
|
2012-05-08 18:05:57 +00:00
|
|
|
pt->poll = nla_strip_eval_panel_poll;
|
2020-01-28 13:13:45 +01:00
|
|
|
BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
|
2020-01-28 18:43:41 +01:00
|
|
|
BLI_addtail(&art->paneltypes, pt);
|
2020-01-28 13:13:45 +01:00
|
|
|
|
2020-01-28 18:43:41 +01:00
|
|
|
pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animated strip time");
|
2020-01-28 13:13:45 +01:00
|
|
|
strcpy(pt->idname, "NLA_PT_animated_strip_time");
|
|
|
|
|
strcpy(pt->parent_id, "NLA_PT_properties");
|
|
|
|
|
strcpy(pt->label, N_("Animated Strip Time"));
|
|
|
|
|
strcpy(pt->category, "Strip");
|
|
|
|
|
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
|
|
|
|
|
pt->draw = nla_panel_animated_strip_time;
|
|
|
|
|
pt->draw_header = nla_panel_animated_strip_time_header;
|
|
|
|
|
pt->parent = pt_properties;
|
|
|
|
|
pt->flag = PANEL_TYPE_DEFAULT_CLOSED;
|
|
|
|
|
pt->poll = nla_strip_eval_panel_poll;
|
|
|
|
|
BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt));
|
2020-01-28 18:43:41 +01:00
|
|
|
BLI_addtail(&art->paneltypes, pt);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-08 18:05:57 +00:00
|
|
|
pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers");
|
2009-06-09 04:39:33 +00:00
|
|
|
strcpy(pt->idname, "NLA_PT_modifiers");
|
2013-03-27 19:09:50 +00:00
|
|
|
strcpy(pt->label, N_("Modifiers"));
|
2017-06-12 13:35:00 +10:00
|
|
|
strcpy(pt->category, "Modifiers");
|
2015-08-16 17:32:01 +10:00
|
|
|
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
|
2012-05-08 18:05:57 +00:00
|
|
|
pt->draw = nla_panel_modifiers;
|
|
|
|
|
pt->poll = nla_strip_eval_panel_poll;
|
2009-06-09 04:39:33 +00:00
|
|
|
BLI_addtail(&art->paneltypes, pt);
|
2009-06-07 11:37:15 +00:00
|
|
|
}
|