diff options
author | Janne Karhu <jhkarh@gmail.com> | 2009-07-24 23:36:08 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2009-07-24 23:36:08 +0400 |
commit | 9325f35d4c01fc6950a4d14badc8f8e5adbb276f (patch) | |
tree | ad6e2fd97a1539f82112066ac2dd457ec675d4a5 /source/blender/editors/space_graph | |
parent | f24bcac43eab1238f933a227d8da84ee0d48a0c3 (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_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 38 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_header.c | 1 |
2 files changed, 37 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index f8f613223db..67a93b2e786 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -52,6 +52,7 @@ #include "DNA_lamp_types.h" #include "DNA_material_types.h" #include "DNA_object_types.h" +#include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" @@ -1038,6 +1039,22 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, 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 */ @@ -1138,6 +1155,23 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, 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_GROUP: /* action group */ @@ -1196,8 +1230,8 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) grp= fcu->grp; 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_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c index eeede3ae95b..e4ce889a188 100644 --- a/source/blender/editors/space_graph/graph_header.c +++ b/source/blender/editors/space_graph/graph_header.c @@ -304,6 +304,7 @@ void graph_header_buttons(const bContext *C, ARegion *ar) uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->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, &(sipo->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, &(sipo->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, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Particles"); uiBlockEndAlign(block); xco += 15; } |