Cleanup: remove window manager headers from MOD_lineart

This was only used to return success, which is currently never checked.
This commit is contained in:
Campbell Barton 2021-03-21 13:29:46 +11:00
parent dcd9945ebe
commit 4abafa2062
2 changed files with 9 additions and 10 deletions

View File

@ -532,8 +532,8 @@ void MOD_lineart_chain_split_angle(LineartRenderBuffer *rb, float angle_threshol
int MOD_lineart_chain_count(const LineartLineChain *rlc);
void MOD_lineart_chain_clear_picked_flag(struct LineartRenderBuffer *rb);
int MOD_lineart_compute_feature_lines(struct Depsgraph *depsgraph,
struct LineartGpencilModifierData *lmd);
bool MOD_lineart_compute_feature_lines(struct Depsgraph *depsgraph,
struct LineartGpencilModifierData *lmd);
struct Scene;

View File

@ -71,9 +71,6 @@
#include "bmesh_class.h"
#include "bmesh_tools.h"
#include "WM_api.h"
#include "WM_types.h"
#include "MOD_gpencil_modifiertypes.h"
#include "lineart_intern.h"
@ -452,7 +449,7 @@ static void lineart_occlusion_worker(TaskPool *__restrict UNUSED(pool), LineartR
/**
* All internal functions starting with lineart_main_ is called inside
* MOD_lineart_compute_feature_lines function.
* #MOD_lineart_compute_feature_lines function.
* This function handles all occlusion calculation.
*/
static void lineart_main_occlusion_begin(LineartRenderBuffer *rb)
@ -3652,15 +3649,17 @@ static LineartBoundingArea *lineart_bounding_area_next(LineartBoundingArea *this
/**
* This is the entry point of all line art calculations.
*
* \return True when a change is made.
*/
int MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, LineartGpencilModifierData *lmd)
bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, LineartGpencilModifierData *lmd)
{
LineartRenderBuffer *rb;
Scene *scene = DEG_get_evaluated_scene(depsgraph);
int intersections_only = 0; /* Not used right now, but preserve for future. */
if (!scene->camera) {
return OPERATOR_CANCELLED;
return false;
}
rb = lineart_create_render_buffer(scene, lmd);
@ -3685,7 +3684,7 @@ int MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, LineartGpencilModifi
if (!rb->vertex_buffer_pointers.first) {
/* No geometry loaded, return early. */
return OPERATOR_FINISHED;
return true;
}
/* Initialize the bounding box acceleration structure, it's a lot like BVH in 3D. */
@ -3754,7 +3753,7 @@ int MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, LineartGpencilModifi
lineart_count_and_print_render_buffer_memory(rb);
}
return OPERATOR_FINISHED;
return true;
}
static int lineart_rb_edge_types(LineartRenderBuffer *rb)