Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-03-21 05:29:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-21 05:47:05 +0300
commit4abafa20621ecacb2ad4ba5d44a35959a1f4c6b8 (patch)
tree4f64c3f87ea1f88e07077968238d8688b652fd9c /source/blender/gpencil_modifiers
parentdcd9945ebe386fa061cf8bdb7a0c425ba8695c29 (diff)
Cleanup: remove window manager headers from MOD_lineart
This was only used to return success, which is currently never checked.
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h4
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c15
2 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 92d71455934..e9fe910dfed 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -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;
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 9f1f91006bf..9a25af3e17c 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -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)