CodeCleanup: Use eDrawType
This patch will make use of the eDrawType where it was used as a variable or parameter name. The eObjectDrawType was renamed to eDrawType as it is also used by `View3DShading.type`.
This commit is contained in:
parent
e96b103536
commit
79558a581d
|
@ -37,7 +37,7 @@ extern "C" {
|
|||
typedef struct ImBuf *(*SequencerDrawView)(struct Depsgraph *depsgraph,
|
||||
struct Scene *scene,
|
||||
struct View3DShading *shading_override,
|
||||
eObjectDrawType drawtype,
|
||||
eDrawType drawtype,
|
||||
struct Object *camera,
|
||||
int width,
|
||||
int height,
|
||||
|
|
|
@ -83,7 +83,7 @@ short select_id_get_object_select_mode(Scene *scene, Object *ob)
|
|||
return r_select_mode;
|
||||
}
|
||||
|
||||
static bool check_ob_drawface_dot(short select_mode, const View3D *v3d, char dt)
|
||||
static bool check_ob_drawface_dot(short select_mode, const View3D *v3d, eDrawType dt)
|
||||
{
|
||||
if (select_mode & SCE_SELECT_FACE) {
|
||||
if ((dt < OB_SOLID) || XRAY_FLAG_ENABLED(v3d)) {
|
||||
|
|
|
@ -1130,7 +1130,7 @@ static void drw_engines_enable_external(void)
|
|||
/* Gather all draw engines needed and store them in DST.enabled_engines
|
||||
* That also define the rendering order of engines */
|
||||
static void drw_engines_enable_from_engine(RenderEngineType *engine_type,
|
||||
int drawtype,
|
||||
eDrawType drawtype,
|
||||
bool use_xray)
|
||||
{
|
||||
switch (drawtype) {
|
||||
|
@ -1179,7 +1179,7 @@ static void drw_engines_enable(ViewLayer *UNUSED(view_layer),
|
|||
bool gpencil_engine_needed)
|
||||
{
|
||||
View3D *v3d = DST.draw_ctx.v3d;
|
||||
const int drawtype = v3d->shading.type;
|
||||
const eDrawType drawtype = v3d->shading.type;
|
||||
const bool use_xray = XRAY_ENABLED(v3d);
|
||||
|
||||
drw_engines_enable_from_engine(engine_type, drawtype, use_xray);
|
||||
|
|
|
@ -43,7 +43,7 @@ struct View3DShading;
|
|||
|
||||
void ED_view3d_draw_offscreen(struct Depsgraph *depsgraph,
|
||||
struct Scene *scene,
|
||||
eObjectDrawType drawtype,
|
||||
eDrawType drawtype,
|
||||
struct View3D *v3d,
|
||||
struct ARegion *ar,
|
||||
int winx,
|
||||
|
@ -59,7 +59,7 @@ void ED_view3d_draw_offscreen(struct Depsgraph *depsgraph,
|
|||
|
||||
struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Depsgraph *depsgraph,
|
||||
struct Scene *scene,
|
||||
eObjectDrawType drawtype,
|
||||
eDrawType drawtype,
|
||||
struct View3D *v3d,
|
||||
struct ARegion *ar,
|
||||
int sizex,
|
||||
|
@ -72,7 +72,7 @@ struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Depsgraph *depsgraph,
|
|||
struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(struct Depsgraph *depsgraph,
|
||||
struct Scene *scene,
|
||||
struct View3DShading *shading_override,
|
||||
eObjectDrawType drawtype,
|
||||
eDrawType drawtype,
|
||||
struct Object *camera,
|
||||
int width,
|
||||
int height,
|
||||
|
|
|
@ -1631,7 +1631,7 @@ static void view3d_stereo3d_setup_offscreen(Depsgraph *depsgraph,
|
|||
|
||||
void ED_view3d_draw_offscreen(Depsgraph *depsgraph,
|
||||
Scene *scene,
|
||||
eObjectDrawType drawtype,
|
||||
eDrawType drawtype,
|
||||
View3D *v3d,
|
||||
ARegion *ar,
|
||||
int winx,
|
||||
|
@ -1711,7 +1711,7 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph,
|
|||
*/
|
||||
ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph,
|
||||
Scene *scene,
|
||||
eObjectDrawType drawtype,
|
||||
eDrawType drawtype,
|
||||
View3D *v3d,
|
||||
ARegion *ar,
|
||||
int sizex,
|
||||
|
@ -1857,7 +1857,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph,
|
|||
ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph,
|
||||
Scene *scene,
|
||||
View3DShading *shading_override,
|
||||
eObjectDrawType drawtype,
|
||||
eDrawType drawtype,
|
||||
Object *camera,
|
||||
int width,
|
||||
int height,
|
||||
|
|
|
@ -39,15 +39,15 @@ typedef enum eObjectMode {
|
|||
OB_MODE_WEIGHT_GPENCIL = 1 << 10,
|
||||
} eObjectMode;
|
||||
|
||||
/** #Object.dt */
|
||||
typedef enum eObjectDrawType {
|
||||
/** #Object.dt, #View3DShading.type */
|
||||
typedef enum eDrawType {
|
||||
OB_BOUNDBOX = 1,
|
||||
OB_WIRE = 2,
|
||||
OB_SOLID = 3,
|
||||
OB_MATERIAL = 4,
|
||||
OB_TEXTURE = 5,
|
||||
OB_RENDER = 6,
|
||||
} eObjectDrawType;
|
||||
} eDrawType;
|
||||
|
||||
/** Any mode where the brush system is used. */
|
||||
#define OB_MODE_ALL_PAINT \
|
||||
|
|
Loading…
Reference in New Issue