Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_edit.c
| Context not available. | |||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| /* Used for drag opening (dragging over 'plus' icon) */ | |||||
| static TreeElement *outliner_drag_open_element(const SpaceOops *soops, TreeElement *te, const float fmval[2]) | |||||
| { | |||||
| if ((fmval[1] > te->ys) && (fmval[1] < (te->ys + UI_UNIT_Y))) { | |||||
| // hidden icon, no open/close | |||||
| if (te && (te->flag & TE_ICONROW) == 0) { | |||||
| // open/close icon | |||||
| if (fmval[0] > te->xs && fmval[0] < te->xs + UI_UNIT_X) { | |||||
| return te; | |||||
| } | |||||
| } | |||||
| } | |||||
| /* Not it. Let's look at its children. */ | |||||
| if ((TREESTORE(te)->flag & TSE_CLOSED) == 0 && (te->subtree.first)) { | |||||
| for (te = te->subtree.first; te; te = te->next) { | |||||
| TreeElement *te_valid = outliner_drag_open_element(soops, te, fmval); | |||||
| if (te_valid) | |||||
| return te_valid; | |||||
| } | |||||
| } | |||||
| return NULL; | |||||
| } | |||||
| TreeElement *outliner_drag_open_find(const SpaceOops *soops, const float fmval[2]) | |||||
| { | |||||
| TreeElement *te; | |||||
| for (te = soops->tree.first; te; te = te->next) { | |||||
| TreeElement *te_valid = outliner_drag_open_element(soops, te, fmval); | |||||
| if (te_valid) | |||||
| return te_valid; | |||||
| } | |||||
| return NULL; | |||||
| } | |||||
| /* ************************************************************** */ | /* ************************************************************** */ | ||||
| /* Click Activated */ | /* Click Activated */ | ||||
| Context not available. | |||||
| RNA_def_string(ot->srna, "material", "Material", MAX_ID_NAME, "Material", "Target Material"); | RNA_def_string(ot->srna, "material", "Material", MAX_ID_NAME, "Material", "Target Material"); | ||||
| } | } | ||||
| void OUTLINER_OT_drag_scroll(wmOperatorType *ot) | |||||
| { | |||||
| /* identifiers */ | |||||
| ot->name = "Scroll"; | |||||
| ot->description = "Scroll"; | |||||
| ot->idname = "OUTLINER_OT_drag_scroll"; | |||||
| } | |||||
| void OUTLINER_OT_drag_open(wmOperatorType *ot) | |||||
| { | |||||
| /* identifiers */ | |||||
| ot->name = "Open"; | |||||
| ot->description = "Open"; | |||||
| ot->idname = "OUTLINER_OT_drag_open"; | |||||
| } | |||||
| Context not available. | |||||