Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/drawobject.c
| Context not available. | |||||
| #include "BKE_subsurf.h" | #include "BKE_subsurf.h" | ||||
| #include "BKE_unit.h" | #include "BKE_unit.h" | ||||
| #include "BKE_tracking.h" | #include "BKE_tracking.h" | ||||
| #include "BKE_gpencil.h" | |||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| Context not available. | |||||
| else if (ob->type == OB_LATTICE) { | else if (ob->type == OB_LATTICE) { | ||||
| bb = BKE_lattice_boundbox_get(ob); | bb = BKE_lattice_boundbox_get(ob); | ||||
| } | } | ||||
| else if (ob->type == OB_GPENCIL) { | |||||
| bb = BKE_gpencil_boundbox_get(ob); | |||||
| } | |||||
| else { | else { | ||||
| const float min[3] = {-1.0f, -1.0f, -1.0f}, max[3] = {1.0f, 1.0f, 1.0f}; | const float min[3] = {-1.0f, -1.0f, -1.0f}, max[3] = {1.0f, 1.0f, 1.0f}; | ||||
| bb = &bb_local; | bb = &bb_local; | ||||
| Context not available. | |||||
| else if (ob->type == OB_SPEAKER) theme_id = TH_SPEAKER; | else if (ob->type == OB_SPEAKER) theme_id = TH_SPEAKER; | ||||
| else if (ob->type == OB_CAMERA) theme_id = TH_CAMERA; | else if (ob->type == OB_CAMERA) theme_id = TH_CAMERA; | ||||
| else if (ob->type == OB_EMPTY) theme_id = TH_EMPTY; | else if (ob->type == OB_EMPTY) theme_id = TH_EMPTY; | ||||
| else if (ob->type == OB_GPENCIL) theme_id = TH_EMPTY; | |||||
| /* fallback to TH_WIRE */ | /* fallback to TH_WIRE */ | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| break; | break; | ||||
| case OB_GPENCIL: | |||||
| if (!render_override) { | |||||
| drawaxes(rv3d->viewmatob, ob->empty_drawsize, ob->empty_drawtype, ob_wire_col); | |||||
| /* draw small box to make different of empty type */ | |||||
| drawaxes(rv3d->viewmatob, ob->empty_drawsize / 4.0f, OB_CUBE, ob_wire_col); | |||||
| } | |||||
| break; | |||||
| case OB_LAMP: | case OB_LAMP: | ||||
| if (!render_override) { | if (!render_override) { | ||||
| drawlamp(v3d, rv3d, base, dt, dflag, ob_wire_col, is_obact); | drawlamp(v3d, rv3d, base, dt, dflag, ob_wire_col, is_obact); | ||||
| Context not available. | |||||
| drawaxes(rv3d->viewmatob, ob->empty_drawsize, ob->empty_drawtype, bcol); | drawaxes(rv3d->viewmatob, ob->empty_drawsize, ob->empty_drawtype, bcol); | ||||
| } | } | ||||
| break; | break; | ||||
| case OB_GPENCIL: | |||||
| drawaxes(rv3d->viewmatob, ob->empty_drawsize, ob->empty_drawtype, NULL); | |||||
| /* draw small box to make different of empty type */ | |||||
| drawaxes(rv3d->viewmatob, ob->empty_drawsize / 4.0f, OB_CUBE, NULL); | |||||
| break; | |||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||