Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_draw.c
| Context not available. | |||||
| { | { | ||||
| TreeElement *te; | TreeElement *te; | ||||
| TreeStoreElem *tselem; | TreeStoreElem *tselem; | ||||
| for (te = lb->first; te; te = te->next) { | for (te = lb->first; te; te = te->next) { | ||||
| tselem = TREESTORE(te); | tselem = TREESTORE(te); | ||||
| /* selection status */ | /* selection status */ | ||||
| if (TSELEM_OPEN(tselem, soops)) | if (TSELEM_OPEN(tselem, soops)) | ||||
| if (tselem->type == TSE_RNA_STRUCT) | if (tselem->type == TSE_RNA_STRUCT) | ||||
| glRecti(0, *starty + 1, (int)ar->v2d.cur.xmax, *starty + UI_UNIT_Y - 1); | { | ||||
merwin: blender code style
```
if (condition) {
do stuff;
}
``` | |||||
| VertexFormat *format = immVertexFormat(); | |||||
| unsigned pos = add_attrib(format, "pos", GL_INT, 2, CONVERT_INT_TO_FLOAT); | |||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | |||||
| immThemeColorShadeAlpha(TH_BACK, -15, -200); | |||||
| immRecti(pos, 0, *starty + 1, (int)ar->v2d.cur.xmax, *starty + UI_UNIT_Y - 1); | |||||
| immUnbindProgram(); | |||||
| } | |||||
| *starty -= UI_UNIT_Y; | *starty -= UI_UNIT_Y; | ||||
| if (TSELEM_OPEN(tselem, soops)) { | if (TSELEM_OPEN(tselem, soops)) { | ||||
| outliner_draw_struct_marks(ar, soops, &te->subtree, starty); | outliner_draw_struct_marks(ar, soops, &te->subtree, starty); | ||||
| if (tselem->type == TSE_RNA_STRUCT) | if (tselem->type == TSE_RNA_STRUCT) | ||||
| fdrawline(0, (float)*starty + UI_UNIT_Y, ar->v2d.cur.xmax, (float)*starty + UI_UNIT_Y); | { | ||||
| VertexFormat *format = immVertexFormat(); | |||||
cyraxAuthorUnsubmitted Not Done Inline ActionsIs there a better way to do this? cyrax: Is there a better way to do this?
Perhaps change the input format from INT to FLOAT and use… | |||||
| unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); | |||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | |||||
| immThemeColorShadeAlpha(TH_BACK, -15, -200); | |||||
| imm_draw_line(pos, 0, (float)*starty + UI_UNIT_Y, ar->v2d.cur.xmax, (float)*starty + UI_UNIT_Y); | |||||
| immUnbindProgram(); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) { | if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) { | ||||
| /* struct marks */ | /* struct marks */ | ||||
| UI_ThemeColorShadeAlpha(TH_BACK, -15, -200); | |||||
| //UI_ThemeColorShade(TH_BACK, -20); | |||||
| starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y - OL_Y_OFFSET; | starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y - OL_Y_OFFSET; | ||||
| outliner_draw_struct_marks(ar, soops, &soops->tree, &starty); | outliner_draw_struct_marks(ar, soops, &soops->tree, &starty); | ||||
| } | } | ||||
| Context not available. | |||||
blender code style
if (condition) { do stuff; }