DwM: Support flat-shaded w/ clay & eevee engines
Needed for sculpt mode drawing w/ engines, see: T51497
This commit is contained in:
@@ -47,6 +47,8 @@
|
||||
#include "DNA_camera_types.h"
|
||||
#include "DNA_view3d_types.h"
|
||||
#include "DNA_screen_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
|
||||
#include "ED_space_api.h"
|
||||
#include "ED_screen.h"
|
||||
@@ -1880,6 +1882,18 @@ bool DRW_object_is_renderable(Object *ob)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool DRW_object_is_flat_normal(Object *ob)
|
||||
{
|
||||
if (ob->type == OB_MESH) {
|
||||
Mesh *me = ob->data;
|
||||
if (me->mpoly && me->mpoly[0].flag & ME_SMOOTH) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user