diff options
Diffstat (limited to 'source/blender/editors/space_outliner')
4 files changed, 32 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index fd55f4d4fdc..18f4a02ab72 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1080,6 +1080,8 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto UI_icon_draw(x, y, ICON_MODIFIER); break; case TSE_LINKED_OB: UI_icon_draw(x, y, ICON_OBJECT_DATA); break; + case TSE_LINKED_PSYS: + UI_icon_draw(x, y, ICON_PARTICLES); break; case TSE_MODIFIER: { Object *ob = (Object *)tselem->id; @@ -1107,6 +1109,10 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto UI_icon_draw(x, y, ICON_MOD_SOFT); break; case eModifierType_Boolean: UI_icon_draw(x, y, ICON_MOD_BOOLEAN); break; + case eModifierType_ParticleSystem: + UI_icon_draw(x, y, ICON_MOD_PARTICLES); break; + case eModifierType_ParticleInstance: + UI_icon_draw(x, y, ICON_MOD_PARTICLES); break; case eModifierType_EdgeSplit: UI_icon_draw(x, y, ICON_MOD_EDGESPLIT); break; case eModifierType_Array: diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index c5dfbf1819b..f23c294c488 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -61,7 +61,7 @@ typedef struct TreeElement { #define TREESTORE_ID_TYPE(_id) \ (ELEM(GS((_id)->name), ID_SCE, ID_LI, ID_OB, ID_ME, ID_CU, ID_MB, ID_NT, ID_MA, ID_TE, ID_IM, ID_LT, ID_LA, ID_CA) || \ - ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_GD, ID_LS) || \ + ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS) || \ ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL)) /* Only in 'blendfile' mode ... :/ */ /* TreeElement->flag */ diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index a9f834c509f..a73e160f357 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -617,6 +617,20 @@ static eOLDrawState tree_element_active_modifier( return OL_DRAWSEL_NONE; } +static eOLDrawState tree_element_active_psys( + bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tselem, const eOLSetState set) +{ + if (set != OL_SETSEL_NONE) { + Object *ob = (Object *)tselem->id; + + WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob); + +// XXX extern_set_butspace(F7KEY, 0); + } + + return OL_DRAWSEL_NONE; +} + static int tree_element_active_constraint( bContext *C, TreeElement *UNUSED(te), TreeStoreElem *tselem, const eOLSetState set) { @@ -795,6 +809,8 @@ eOLDrawState tree_element_type_active( return OL_DRAWSEL_NORMAL; } break; + case TSE_LINKED_PSYS: + return tree_element_active_psys(C, scene, te, tselem, set); case TSE_POSE_BASE: return tree_element_active_pose(C, scene, te, tselem, set); case TSE_POSE_CHANNEL: diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index d1c75b01157..ec46c5df9a0 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -46,6 +46,7 @@ #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meta_types.h" +#include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_world_types.h" #include "DNA_sequence_types.h" @@ -621,6 +622,14 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree else if (md->type == eModifierType_Hook) { outliner_add_element(soops, &ten->subtree, ((HookModifierData *) md)->object, ten, TSE_LINKED_OB, 0); } + else if (md->type == eModifierType_ParticleSystem) { + ParticleSystem *psys = ((ParticleSystemModifierData *) md)->psys; + TreeElement *ten_psys; + + ten_psys = outliner_add_element(soops, &ten->subtree, ob, te, TSE_LINKED_PSYS, 0); + ten_psys->directdata = psys; + ten_psys->name = psys->part->id.name + 2; + } } } |