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:
authorJanne Karhu <jhkarh@gmail.com>2009-07-24 23:36:08 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-07-24 23:36:08 +0400
commit9325f35d4c01fc6950a4d14badc8f8e5adbb276f (patch)
treead6e2fd97a1539f82112066ac2dd457ec675d4a5 /source/blender/editors/space_nla
parentf24bcac43eab1238f933a227d8da84ee0d48a0c3 (diff)
ParticleSettings animdata wasn't shown in graph editor, dope sheet and nla editor.
Tiny bug fix too: Had forgotten particle child length setting from do_versions so old files with child hair showed all hair with zero length.
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_channels.c19
-rw-r--r--source/blender/editors/space_nla/nla_draw.c42
-rw-r--r--source/blender/editors/space_nla/nla_header.c1
3 files changed, 56 insertions, 6 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 1ab348eb28e..79c2c94719c 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -38,6 +38,7 @@
#include "DNA_camera_types.h"
#include "DNA_curve_types.h"
#include "DNA_object_types.h"
+#include "DNA_particle_types.h"
#include "DNA_screen_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
@@ -185,6 +186,13 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
+ case ANIMTYPE_FILLPARTD:
+ {
+ Object *ob= (Object *)ale->data;
+ ob->nlaflag ^= OB_ADS_SHOWPARTS; // XXX
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
case ANIMTYPE_DSMAT:
{
@@ -228,6 +236,13 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
+ case ANIMTYPE_DSPART:
+ {
+ ParticleSettings *part= (ParticleSettings *)ale->data;
+ part->flag ^= PART_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
case ANIMTYPE_NLATRACK:
{
@@ -237,8 +252,8 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
/* offset for start of channel (on LHS of channel-list) */
if (ale->id) {
- /* special exception for materials */
- if (GS(ale->id->name) == ID_MA)
+ /* special exception for materials and particles */
+ if (ELEM(GS(ale->id->name),ID_MA,ID_PA))
offset= 21 + NLACHANNEL_BUTTON_WIDTH;
else
offset= 14;
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 9aa71187334..6809c7928ac 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_particle_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_world_types.h"
@@ -693,6 +694,22 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
strcpy(name, "Materials");
}
break;
+ case ANIMTYPE_FILLPARTD: /* object particles (dopesheet) expand widget */
+ {
+ Object *ob = (Object *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_PARTICLE_DATA;
+
+ if (FILTER_PART_OBJC(ob))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, "Particles");
+ }
+ break;
case ANIMTYPE_DSMAT: /* single material (dopesheet) expand widget */
@@ -793,6 +810,23 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
strcpy(name, wo->id.name+2);
}
break;
+ case ANIMTYPE_DSPART: /* particle (dopesheet) expand widget */
+ {
+ ParticleSettings *part= (ParticleSettings*)ale->data;
+
+ group = 0;
+ indent = 0;
+ special = ICON_PARTICLE_DATA;
+ offset = 21;
+
+ if (FILTER_PART_OBJD(part))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, part->id.name+2);
+ }
+ break;
case ANIMTYPE_NLATRACK: /* NLA Track */
{
@@ -801,8 +835,8 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
indent= 0;
if (ale->id) {
- /* special exception for materials */
- if (GS(ale->id->name) == ID_MA) {
+ /* special exception for materials and particles */
+ if (ELEM(GS(ale->id->name),ID_MA,ID_PA)) {
offset= 21;
indent= 1;
}
@@ -846,8 +880,8 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
group = 5;
if (ale->id) {
- /* special exception for materials */
- if (GS(ale->id->name) == ID_MA) {
+ /* special exception for materials and particles */
+ if (ELEM(GS(ale->id->name),ID_MA,ID_PA)) {
offset= 21;
indent= 1;
}
diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c
index f159f440759..3f504441108 100644
--- a/source/blender/editors/space_nla/nla_header.c
+++ b/source/blender/editors/space_nla/nla_header.c
@@ -261,6 +261,7 @@ 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_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;
}