Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-08-03 17:09:23 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-03 17:09:23 +0400
commit641c8e69a82fc8f674f81948e329cae334ef60fc (patch)
tree9e67c1672c83d49a728f28da3a7ca48dd5f6d558 /source/blender/editors/space_nla
parentcd905eef702555b27d4d90983b079a1a62c31fb8 (diff)
2.5 - MetaBalls are now animateable
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_channels.c17
-rw-r--r--source/blender/editors/space_nla/nla_draw.c26
-rw-r--r--source/blender/editors/space_nla/nla_header.c3
3 files changed, 45 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 98dacc8ef5b..ab918519ec0 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -45,6 +45,7 @@
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
+#include "DNA_meta_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_world_types.h"
@@ -320,6 +321,22 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
+ case ANIMTYPE_DSMBALL:
+ {
+ MetaBall *mb= (MetaBall *)ale->data;
+ AnimData *adt= ale->adt;
+
+ if ( (adt) && (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) ) {
+ /* toggle mute */
+ adt->flag ^= ADT_NLA_EVAL_OFF;
+ }
+ else {
+ /* toggle expand */
+ mb->flag2 ^= MB_DS_EXPAND;
+ }
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
case ANIMTYPE_NLATRACK:
{
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 3feefcc11ab..a7a854a7277 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -46,6 +46,7 @@
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
+#include "DNA_meta_types.h"
#include "DNA_particle_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
@@ -908,6 +909,31 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
strcpy(name, part->id.name+2);
}
break;
+ case ANIMTYPE_DSMBALL: /* metaball (dopesheet) expand widget */
+ {
+ MetaBall *mb = (MetaBall *)ale->data;
+ AnimData *adt= ale->adt;
+
+ group = 4;
+ indent = 1;
+ special = ICON_META_DATA;
+
+ if (FILTER_MBALL_OBJD(mb))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ /* NLA evaluation on/off button */
+ if (adt) {
+ if (adt->flag & ADT_NLA_EVAL_OFF)
+ mute = ICON_MUTE_IPO_ON;
+ else
+ mute = ICON_MUTE_IPO_OFF;
+ }
+
+ strcpy(name, mb->id.name+2);
+ }
+ break;
case ANIMTYPE_NLATRACK: /* NLA Track */
{
diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c
index 20343adef03..04c2db08bda 100644
--- a/source/blender/editors/space_nla/nla_header.c
+++ b/source/blender/editors/space_nla/nla_header.c
@@ -261,13 +261,14 @@ void nla_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Lamps");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Cameras");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Curves");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Particles");
uiBlockEndAlign(block);
xco += 15;
}
else {
// XXX this case shouldn't happen at all... for now, just pad out same amount of space
- xco += 7*XIC + 15;
+ xco += 10*XIC + 15;
}
xco += (XIC + 8);