diff options
author | Yiming Wu <xp8110@outlook.com> | 2022-06-23 08:22:56 +0300 |
---|---|---|
committer | Yiming Wu <xp8110@outlook.com> | 2022-06-23 08:22:56 +0300 |
commit | e4f51b3a6eb69bf71e997b11e33a2baabbf0fdfe (patch) | |
tree | 036b6ca8e670b30a229030099109b46270f2365d /source/blender | |
parent | 743a027862a709e4faecac91a7ab49f2e7edbda0 (diff) |
LineArt: Cleanup minor warnings from variable type changes.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h | 4 | ||||
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h index a72ce76d591..e90d3dc34c5 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h +++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h @@ -167,7 +167,7 @@ typedef struct LineartEdgeChainItem { float gpos[3]; float normal[3]; uint16_t line_type; - int8_t occlusion; + uint8_t occlusion; uint8_t material_mask_bits; uint8_t intersection_mask; size_t index; @@ -330,7 +330,7 @@ typedef struct LineartCache { ListBase chains; /** Cache only contains edge types specified in this variable. */ - int8_t rb_edge_types; + uint16_t all_enabled_edge_types; } LineartCache; #define DBL_TRIANGLE_LIM 1e-8 diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index c08bf3e0fe9..c7b2104a6e6 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -2701,7 +2701,7 @@ static bool lineart_triangle_edge_image_space_occlusion(SpinLock *UNUSED(spl), int isec_e1, isec_e2, isec_e3; /* If edge is parallel to one of the edges in the triangle. */ bool para_e1, para_e2, para_e3; - enum LineartPointTri state_v1 = 0, state_v2 = 0; + enum LineartPointTri state_v1 = LRT_OUTSIDE_TRIANGLE, state_v2 = LRT_OUTSIDE_TRIANGLE; double dir_v1[3]; double dir_v2[3]; @@ -3038,7 +3038,7 @@ static LineartVert *lineart_triangle_share_point(const LineartTriangle *l, } static bool lineart_triangle_2v_intersection_math( - LineartVert *v1, LineartVert *v2, LineartTriangle *tri, double *last, double *rv) + LineartVert *v1, LineartVert *v2, LineartTriangle *tri, const double *last, double *rv) { /* Direction vectors for the edge verts. We will check if the verts are on the same side of the * triangle or not. */ @@ -3390,7 +3390,7 @@ static LineartData *lineart_create_render_buffer(Scene *scene, lmd->cache = lc; lmd->la_data_ptr = ld; - lc->rb_edge_types = lmd->edge_types_override; + lc->all_enabled_edge_types = lmd->edge_types_override; if (!scene || !camera || !lc) { return NULL; @@ -4829,7 +4829,7 @@ static void lineart_gpencil_generate(LineartCache *cache, /* (!orig_col && !orig_ob) means the whole scene is selected. */ - int enabled_types = cache->rb_edge_types; + int enabled_types = cache->all_enabled_edge_types; bool invert_input = modifier_flags & LRT_GPENCIL_INVERT_SOURCE_VGROUP; bool match_output = modifier_flags & LRT_GPENCIL_MATCH_OUTPUT_VGROUP; |