Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_draw.c
| Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, poin); | WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, poin); | ||||
| } | } | ||||
| static void restrictbutton_bone_visibility_fn(bContext *C, void *poin, void *UNUSED(poin2)) | static void restrictbutton_bone_visibility_fn(bContext *C, void *poin, void *UNUSED(poin2)) | ||||
| { | { | ||||
| Bone *bone = (Bone *)poin; | Bone *bone = (Bone *)poin; | ||||
| if (CTX_wm_window(C)->eventstate->ctrl) { | if (CTX_wm_window(C)->eventstate->shift) { | ||||
| restrictbutton_recursive_bone(bone, BONE_HIDDEN_P, (bone->flag & BONE_HIDDEN_P) != 0); | restrictbutton_recursive_bone(bone, BONE_HIDDEN_P, (bone->flag & BONE_HIDDEN_P) != 0); | ||||
| } | } | ||||
| } | } | ||||
| static void restrictbutton_bone_select_fn(bContext *C, void *UNUSED(poin), void *poin2) | static void restrictbutton_bone_select_fn(bContext *C, void *UNUSED(poin), void *poin2) | ||||
| { | { | ||||
| Bone *bone = (Bone *)poin2; | Bone *bone = (Bone *)poin2; | ||||
| if (bone->flag & BONE_UNSELECTABLE) { | if (bone->flag & BONE_UNSELECTABLE) { | ||||
| bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); | bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); | ||||
| } | } | ||||
| if (CTX_wm_window(C)->eventstate->ctrl) { | if (CTX_wm_window(C)->eventstate->shift) { | ||||
| restrictbutton_recursive_bone(bone, BONE_UNSELECTABLE, (bone->flag & BONE_UNSELECTABLE) != 0); | restrictbutton_recursive_bone(bone, BONE_UNSELECTABLE, (bone->flag & BONE_UNSELECTABLE) != 0); | ||||
| } | } | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL); | WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL); | ||||
| } | } | ||||
| static void restrictbutton_ebone_select_fn(bContext *C, void *UNUSED(poin), void *poin2) | static void restrictbutton_ebone_select_fn(bContext *C, void *UNUSED(poin), void *poin2) | ||||
| { | { | ||||
| EditBone *ebone = (EditBone *)poin2; | EditBone *ebone = (EditBone *)poin2; | ||||
| if (ebone->flag & BONE_UNSELECTABLE) { | if (ebone->flag & BONE_UNSELECTABLE) { | ||||
| ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); | ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); | ||||
| } | } | ||||
| if (CTX_wm_window(C)->eventstate->ctrl) { | if (CTX_wm_window(C)->eventstate->shift) { | ||||
| restrictbutton_recursive_ebone( | restrictbutton_recursive_ebone( | ||||
| C, ebone, BONE_UNSELECTABLE, (ebone->flag & BONE_UNSELECTABLE) != 0); | C, ebone, BONE_UNSELECTABLE, (ebone->flag & BONE_UNSELECTABLE) != 0); | ||||
| } | } | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL); | WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL); | ||||
| } | } | ||||
| static void restrictbutton_ebone_visibility_fn(bContext *C, void *UNUSED(poin), void *poin2) | static void restrictbutton_ebone_visibility_fn(bContext *C, void *UNUSED(poin), void *poin2) | ||||
| { | { | ||||
| EditBone *ebone = (EditBone *)poin2; | EditBone *ebone = (EditBone *)poin2; | ||||
| if (ebone->flag & BONE_HIDDEN_A) { | if (ebone->flag & BONE_HIDDEN_A) { | ||||
| ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); | ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); | ||||
| } | } | ||||
| if (CTX_wm_window(C)->eventstate->ctrl) { | if (CTX_wm_window(C)->eventstate->shift) { | ||||
| restrictbutton_recursive_ebone(C, ebone, BONE_HIDDEN_A, (ebone->flag & BONE_HIDDEN_A) != 0); | restrictbutton_recursive_ebone(C, ebone, BONE_HIDDEN_A, (ebone->flag & BONE_HIDDEN_A) != 0); | ||||
| } | } | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL); | WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL); | ||||
| } | } | ||||
| static void restrictbutton_gp_layer_flag_fn(bContext *C, void *poin, void *UNUSED(poin2)) | static void restrictbutton_gp_layer_flag_fn(bContext *C, void *poin, void *UNUSED(poin2)) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 2,884 Lines • ▼ Show 20 Lines | if ((tselem->flag & TSE_TEXTBUT) == 0) { | ||||
| } | } | ||||
| text_color[3] *= alpha_fac; | text_color[3] *= alpha_fac; | ||||
| UI_fontstyle_draw_simple(fstyle, startx + offsx, *starty + 5 * ufac, te->name, text_color); | UI_fontstyle_draw_simple(fstyle, startx + offsx, *starty + 5 * ufac, te->name, text_color); | ||||
| } | } | ||||
| offsx += (int)(UI_UNIT_X + UI_fontstyle_string_width(fstyle, te->name)); | offsx += (int)(UI_UNIT_X + UI_fontstyle_string_width(fstyle, te->name)); | ||||
| /* closed item, we draw the icons, not when it's a scene, or master-server list though */ | /* closed item, we draw the icons, not when it's a scene, or master-server list though */ | ||||
| if (!TSELEM_OPEN(tselem, space_outliner)) { | if (!TSELEM_OPEN(tselem, space_outliner) && | ||||
| !(space_outliner->filter & SO_FILTER_NO_INLINE_CHILDREN)) { | |||||
| if (te->subtree.first) { | if (te->subtree.first) { | ||||
| if (tselem->type == 0 && te->idcode == ID_SCE) { | if (tselem->type == 0 && te->idcode == ID_SCE) { | ||||
| /* pass */ | /* pass */ | ||||
| } | } | ||||
| /* this tree element always has same amount of branches, so don't draw */ | /* this tree element always has same amount of branches, so don't draw */ | ||||
| else if (tselem->type != TSE_R_LAYER) { | else if (tselem->type != TSE_R_LAYER) { | ||||
| int tempx = startx + offsx; | int tempx = startx + offsx; | ||||
| ▲ Show 20 Lines • Show All 560 Lines • Show Last 20 Lines | |||||