Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_common.c
| Show First 20 Lines • Show All 367 Lines • ▼ Show 20 Lines | |||||
| /* ******************************************** COLOR UTILS *********************************************** */ | /* ******************************************** COLOR UTILS *********************************************** */ | ||||
| /* TODO FINISH */ | /* TODO FINISH */ | ||||
| /** | /** | ||||
| * Get the wire color theme_id of an object based on it's state | * Get the wire color theme_id of an object based on it's state | ||||
| * \a r_color is a way to get a pointer to the static color var associated | * \a r_color is a way to get a pointer to the static color var associated | ||||
| */ | */ | ||||
| int DRW_object_wire_theme_get(Object *ob, SceneLayer *scene_layer, float **r_color) | int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color) | ||||
| { | { | ||||
| const bool is_edit = (ob->mode & OB_MODE_EDIT) != 0; | const bool is_edit = (ob->mode & OB_MODE_EDIT) != 0; | ||||
| const bool active = (scene_layer->basact && scene_layer->basact->object == ob); | const bool active = (view_layer->basact && view_layer->basact->object == ob); | ||||
| /* confusing logic here, there are 2 methods of setting the color | /* confusing logic here, there are 2 methods of setting the color | ||||
| * 'colortab[colindex]' and 'theme_id', colindex overrides theme_id. | * 'colortab[colindex]' and 'theme_id', colindex overrides theme_id. | ||||
| * | * | ||||
| * note: no theme yet for 'colindex' */ | * note: no theme yet for 'colindex' */ | ||||
| int theme_id = is_edit ? TH_WIRE_EDIT : TH_WIRE; | int theme_id = is_edit ? TH_WIRE_EDIT : TH_WIRE; | ||||
| if (//(scene->obedit == NULL) && | if (//(scene->obedit == NULL) && | ||||
| ((G.moving & G_TRANSFORM_OBJ) != 0) && | ((G.moving & G_TRANSFORM_OBJ) != 0) && | ||||
| ▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines | |||||