Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_select.c
| Show All 35 Lines | |||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| #include "DNA_group_types.h" | #include "DNA_group_types.h" | ||||
| #include "DNA_material_types.h" | #include "DNA_material_types.h" | ||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_armature_types.h" | #include "DNA_armature_types.h" | ||||
| #include "DNA_lamp_types.h" | #include "DNA_lamp_types.h" | ||||
| #include "DNA_workspace_types.h" | #include "DNA_workspace_types.h" | ||||
| #include "DNA_gpencil_types.h" | |||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_rand.h" | #include "BLI_rand.h" | ||||
| #include "BLI_string_utils.h" | #include "BLI_string_utils.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| Show All 31 Lines | |||||
| #include "object_intern.h" | #include "object_intern.h" | ||||
| /************************ Exported **************************/ | /************************ Exported **************************/ | ||||
| /* simple API for object selection, rather than just using the flag | /* simple API for object selection, rather than just using the flag | ||||
| * this takes into account the 'restrict selection in 3d view' flag. | * this takes into account the 'restrict selection in 3d view' flag. | ||||
| * deselect works always, the restriction just prevents selection */ | * deselect works always, the restriction just prevents selection */ | ||||
| /* Note: send a NC_SCENE|ND_OB_SELECT notifier yourself! (or | /* Note: send a NC_SCENE|ND_OB_SELECT notifier yourself! (or | ||||
| * or a NC_SCENE|ND_OB_VISIBLE in case of visibility toggling */ | * or a NC_SCENE|ND_OB_VISIBLE in case of visibility toggling */ | ||||
| void ED_object_base_select(Base *base, eObjectSelect_Mode mode) | void ED_object_base_select(Base *base, eObjectSelect_Mode mode) | ||||
| { | { | ||||
| if (mode == BA_INVERT) { | if (mode == BA_INVERT) { | ||||
| mode = (base->flag & BASE_SELECTED) != 0 ? BA_DESELECT : BA_SELECT; | mode = (base->flag & BASE_SELECTED) != 0 ? BA_DESELECT : BA_SELECT; | ||||
| } | } | ||||
| if (base) { | if (base) { | ||||
| ▲ Show 20 Lines • Show All 1,090 Lines • Show Last 20 Lines | |||||