diff options
Diffstat (limited to 'source/blender/editors/space_outliner')
7 files changed, 35 insertions, 188 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 73289dce968..7b2bbf3e285 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -29,49 +29,30 @@ * \ingroup spoutliner */ -#include <string.h> -#include <stdlib.h> - -#include "MEM_guardedalloc.h" - -#include "DNA_anim_types.h" #include "DNA_armature_types.h" -#include "DNA_camera_types.h" #include "DNA_group_types.h" -#include "DNA_key_types.h" #include "DNA_lamp_types.h" -#include "DNA_material_types.h" -#include "DNA_mesh_types.h" -#include "DNA_meta_types.h" -#include "DNA_particle_types.h" +#include "DNA_object_types.h" #include "DNA_scene_types.h" -#include "DNA_world_types.h" #include "DNA_sequence_types.h" -#include "DNA_object_types.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLI_ghash.h" -#include "BKE_animsys.h" #include "BKE_context.h" #include "BKE_deform.h" #include "BKE_depsgraph.h" -#include "BKE_fcurve.h" #include "BKE_global.h" -#include "BKE_group.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_modifier.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" - -#include "BLI_ghash.h" #include "ED_armature.h" #include "ED_object.h" #include "ED_screen.h" -#include "ED_util.h" #include "WM_api.h" #include "WM_types.h" @@ -85,7 +66,6 @@ #include "UI_view2d.h" #include "RNA_access.h" -#include "RNA_define.h" #include "outliner_intern.h" @@ -298,7 +278,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) if (tselem->type==0) { test_idbutton(tselem->id->name+2); // library.c, unique name and alpha sort - switch(GS(tselem->id->name)) { + switch (GS(tselem->id->name)) { case ID_MA: WM_event_add_notifier(C, NC_MATERIAL, NULL); break; case ID_TE: @@ -325,7 +305,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) } } else { - switch(tselem->type) { + switch (tselem->type) { case TSE_DEFGROUP: defgroup_unique_name(te->directdata, (Object *)tselem->id); // id = object break; @@ -739,7 +719,7 @@ static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v)) short maptype= keymap_menu_type(kmi->type); if (maptype!=kmi->maptype) { - switch(kmi->maptype) { + switch (kmi->maptype) { case OL_KM_KEYBOARD: kmi->type= AKEY; kmi->val= KM_PRESS; @@ -796,7 +776,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo xstart+= butw2+5; /* edit actual event */ - switch(kmi->maptype) { + switch (kmi->maptype) { case OL_KM_KEYBOARD: uiDefKeyevtButS(block, 0, "", xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->type, "Key code"); xstart+= butw2+5; @@ -924,7 +904,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto arg.alpha= alpha; if (tselem->type) { - switch( tselem->type) { + switch ( tselem->type) { case TSE_ANIM_DATA: UI_icon_draw(x, y, ICON_ANIM_DATA); break; // xxx case TSE_NLA: @@ -952,7 +932,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto { Object *ob= (Object *)tselem->id; ModifierData *md= BLI_findlink(&ob->modifiers, tselem->nr); - switch(md->type) { + switch (md->type) { case eModifierType_Subsurf: UI_icon_draw(x, y, ICON_MOD_SUBSURF); break; case eModifierType_Armature: @@ -1113,7 +1093,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto } } else { - switch( GS(tselem->id->name)) { + switch ( GS(tselem->id->name)) { case ID_SCE: tselem_draw_icon_uibut(&arg, ICON_SCENE_DATA); break; case ID_ME: @@ -1128,7 +1108,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto { Lamp *la= (Lamp *)tselem->id; - switch(la->type) { + switch (la->type) { case LA_LOCAL: tselem_draw_icon_uibut(&arg, ICON_LAMP_POINT); break; case LA_SUN: diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 981c4a5d867..62d93f62d0f 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -29,79 +29,39 @@ * \ingroup spoutliner */ -#include <math.h> -#include <string.h> -#include <stdlib.h> -#include <stddef.h> - #include "MEM_guardedalloc.h" #include "DNA_anim_types.h" -#include "DNA_armature_types.h" -#include "DNA_constraint_types.h" -#include "DNA_camera_types.h" #include "DNA_group_types.h" -#include "DNA_key_types.h" -#include "DNA_lamp_types.h" -#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" #include "DNA_object_types.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLI_math_base.h" - -#if defined WIN32 && !defined _LIBC -# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ -#else -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -# include <fnmatch.h> -#endif #include "BLF_translation.h" #include "BKE_animsys.h" #include "BKE_context.h" -#include "BKE_deform.h" #include "BKE_depsgraph.h" -#include "BKE_fcurve.h" -#include "BKE_global.h" -#include "BKE_group.h" #include "BKE_library.h" #include "BKE_main.h" -#include "BKE_modifier.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" -#include "ED_armature.h" #include "ED_object.h" #include "ED_screen.h" -#include "ED_util.h" +#include "ED_keyframing.h" #include "WM_api.h" #include "WM_types.h" -#include "BIF_gl.h" -#include "BIF_glutil.h" - #include "UI_interface.h" -#include "UI_interface_icons.h" #include "UI_resources.h" #include "UI_view2d.h" #include "RNA_access.h" #include "RNA_define.h" -#include "RNA_enum_types.h" - -#include "ED_keyframing.h" #include "outliner_intern.h" diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index d2ef4573ccf..12f8f2cb38b 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -28,9 +28,6 @@ * \ingroup spoutliner */ - -#include <stdlib.h> - #include "DNA_space_types.h" #include "WM_api.h" @@ -42,9 +39,8 @@ #include "outliner_intern.h" -/* ************************** registration **********************************/ - +/* ************************** registration **********************************/ void outliner_operatortypes(void) { diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index c7aa4dc4e92..5515ec45269 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -29,54 +29,23 @@ * \ingroup spoutliner */ -#include <math.h> -#include <string.h> #include <stdlib.h> -#include <stddef.h> #include "MEM_guardedalloc.h" -#include "DNA_anim_types.h" #include "DNA_armature_types.h" -#include "DNA_constraint_types.h" -#include "DNA_camera_types.h" #include "DNA_group_types.h" -#include "DNA_key_types.h" #include "DNA_lamp_types.h" #include "DNA_material_types.h" -#include "DNA_mesh_types.h" -#include "DNA_meta_types.h" -#include "DNA_particle_types.h" +#include "DNA_object_types.h" #include "DNA_scene_types.h" -#include "DNA_world_types.h" #include "DNA_sequence_types.h" -#include "DNA_object_types.h" +#include "DNA_world_types.h" -#include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLI_math_base.h" - -#if defined WIN32 && !defined _LIBC -# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ -#else -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -# include <fnmatch.h> -#endif - -#include "BKE_animsys.h" #include "BKE_context.h" -#include "BKE_deform.h" #include "BKE_depsgraph.h" -#include "BKE_fcurve.h" -#include "BKE_global.h" -#include "BKE_group.h" -#include "BKE_library.h" -#include "BKE_main.h" -#include "BKE_modifier.h" -#include "BKE_report.h" #include "BKE_scene.h" #include "BKE_sequencer.h" @@ -88,12 +57,8 @@ #include "WM_api.h" #include "WM_types.h" -#include "BIF_gl.h" -#include "BIF_glutil.h" #include "UI_interface.h" -#include "UI_interface_icons.h" -#include "UI_resources.h" #include "UI_view2d.h" #include "RNA_access.h" @@ -664,7 +629,7 @@ static int tree_element_active_keymap_item(bContext *UNUSED(C), TreeElement *te, int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set) { - switch(te->idcode) { + switch (te->idcode) { /* Note: no ID_OB: objects are handled specially to allow multiple * selection. See do_outliner_item_activate. */ case ID_MA: @@ -687,7 +652,7 @@ int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement /* Context can be NULL when set==0 */ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, int set) { - switch(tselem->type) { + switch (tselem->type) { case TSE_DEFGROUP: return tree_element_active_defgroup(C, scene, te, tselem, set); case TSE_BONE: diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index ba3637a88af..13e86209f3a 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -29,56 +29,31 @@ * \ingroup spoutliner */ -#include <math.h> -#include <string.h> -#include <stdlib.h> -#include <stddef.h> - #include "MEM_guardedalloc.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" -#include "DNA_constraint_types.h" -#include "DNA_camera_types.h" #include "DNA_group_types.h" -#include "DNA_key_types.h" #include "DNA_lamp_types.h" #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" #include "DNA_object_types.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLI_math_base.h" - -#if defined WIN32 && !defined _LIBC -# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ -#else -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -# include <fnmatch.h> -#endif - #include "BKE_animsys.h" #include "BKE_context.h" -#include "BKE_deform.h" #include "BKE_depsgraph.h" #include "BKE_fcurve.h" -#include "BKE_global.h" #include "BKE_group.h" #include "BKE_library.h" #include "BKE_main.h" -#include "BKE_modifier.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "ED_armature.h" #include "ED_object.h" @@ -88,12 +63,7 @@ #include "WM_api.h" #include "WM_types.h" -#include "BIF_gl.h" -#include "BIF_glutil.h" - #include "UI_interface.h" -#include "UI_interface_icons.h" -#include "UI_resources.h" #include "UI_view2d.h" #include "RNA_access.h" @@ -126,7 +96,7 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb, } else { int idcode= GS(tselem->id->name); - switch(idcode) { + switch (idcode) { case ID_SCE: *scenelevel= 1; break; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index e83fce0cf05..e2d43386c5e 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -31,8 +31,15 @@ #include <math.h> #include <string.h> -#include <stdlib.h> -#include <stddef.h> + +#if defined WIN32 && !defined _LIBC || defined __sun +# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ +#else +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif +# include <fnmatch.h> +#endif #include "MEM_guardedalloc.h" @@ -55,51 +62,20 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLI_math_base.h" +#include "BLI_math.h" -#if defined WIN32 && !defined _LIBC || defined __sun -# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ -#else -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -# include <fnmatch.h> -#endif - - -#include "BKE_animsys.h" -#include "BKE_context.h" -#include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" -#include "BKE_global.h" -#include "BKE_group.h" -#include "BKE_library.h" #include "BKE_main.h" #include "BKE_modifier.h" -#include "BKE_report.h" -#include "BKE_scene.h" #include "BKE_sequencer.h" #include "ED_armature.h" -#include "ED_object.h" #include "ED_screen.h" -#include "ED_util.h" #include "WM_api.h" #include "WM_types.h" -#include "BIF_gl.h" -#include "BIF_glutil.h" - -#include "UI_interface.h" -#include "UI_interface_icons.h" -#include "UI_resources.h" -#include "UI_view2d.h" - #include "RNA_access.h" -#include "RNA_define.h" -#include "RNA_enum_types.h" #include "outliner_intern.h" diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index ed050b7f93d..c2a3affa1b6 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -182,9 +182,9 @@ static void outliner_main_area_free(ARegion *UNUSED(ar)) static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_OB_ACTIVE: case ND_OB_SELECT: case ND_OB_VISIBLE: @@ -200,7 +200,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_OBJECT: - switch(wmn->data) { + switch (wmn->data) { case ND_TRANSFORM: /* transform doesn't change outliner data */ break; @@ -212,7 +212,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case ND_CONSTRAINT: - switch(wmn->action) { + switch (wmn->action) { case NA_ADDED: case NA_REMOVED: case NA_RENAME: @@ -244,7 +244,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_MATERIAL: - switch(wmn->data) { + switch (wmn->data) { case ND_SHADING: case ND_SHADING_DRAW: ED_region_tag_redraw(ar); @@ -255,7 +255,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_GEOM: - switch(wmn->data) { + switch (wmn->data) { case ND_DATA: /* needed for vertex groups only, no special notifier atm so use NC_GEOM|ND_DATA */ ED_region_tag_redraw(ar); @@ -263,7 +263,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_ANIMATION: - switch(wmn->data) { + switch (wmn->data) { case ND_NLA_ACTCHANGE: case ND_KEYFRAME: ED_region_tag_redraw(ar); @@ -299,7 +299,7 @@ static void outliner_header_area_free(ARegion *UNUSED(ar)) static void outliner_header_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: if (wmn->data == ND_KEYINGSET) ED_region_tag_redraw(ar); |