[Bf-blender-cvs] [2c35b091bf2] lanpr-under-gp: LineArt: Cleanup warnings
YimingWu
noreply at git.blender.org
Wed Nov 4 12:03:08 CET 2020
Commit: 2c35b091bf26d03fa3c7a2e7575a0f21f3afdee3
Author: YimingWu
Date: Wed Nov 4 19:02:53 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB2c35b091bf26d03fa3c7a2e7575a0f21f3afdee3
LineArt: Cleanup warnings
===================================================================
M source/blender/blenloader/intern/versioning_290.c
M source/blender/editors/gpencil/gpencil_add_lineart.c
M source/blender/editors/include/ED_gpencil.h
M source/blender/editors/include/ED_lineart.h
M source/blender/editors/lineart/lineart_chain.c
M source/blender/editors/lineart/lineart_cpu.c
M source/blender/editors/lineart/lineart_ops.c
M source/blender/editors/lineart/lineart_util.c
M source/blender/editors/object/object_add.c
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M source/blender/makesrna/intern/rna_material.c
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 92316e7ae7b..999490e5013 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1140,13 +1140,13 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
{
if (!DNA_struct_find(fd->filesdna, "SceneLineArt")) {
- LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
- scene->lineart.crease_threshold = DEG2RAD(140.0f);
- scene->lineart.line_types |= LRT_EDGE_FLAG_ALL_TYPE;
- scene->lineart.flags |= (LRT_ALLOW_DUPLI_OBJECTS | LRT_REMOVE_DOUBLES);
- scene->lineart.angle_splitting_threshold = DEG2RAD(60.0f);
- scene->lineart.chaining_geometry_threshold = 0.01f;
- scene->lineart.chaining_image_threshold = 0.01f;
+ LISTBASE_FOREACH (Scene *, sc, &bmain->scenes) {
+ sc->lineart.crease_threshold = DEG2RAD(140.0f);
+ sc->lineart.line_types |= LRT_EDGE_FLAG_ALL_TYPE;
+ sc->lineart.flags |= (LRT_ALLOW_DUPLI_OBJECTS | LRT_REMOVE_DOUBLES);
+ sc->lineart.angle_splitting_threshold = DEG2RAD(60.0f);
+ sc->lineart.chaining_geometry_threshold = 0.01f;
+ sc->lineart.chaining_image_threshold = 0.01f;
}
}
}
diff --git a/source/blender/editors/gpencil/gpencil_add_lineart.c b/source/blender/editors/gpencil/gpencil_add_lineart.c
index 1300a5f73c6..7cbaa6ef2d5 100644
--- a/source/blender/editors/gpencil/gpencil_add_lineart.c
+++ b/source/blender/editors/gpencil/gpencil_add_lineart.c
@@ -94,7 +94,7 @@ static const ColorTemplate gp_stroke_material_black = {
/* LineArt API */
/* Add a Simple LineArt setup. */
-void ED_gpencil_create_lineart(bContext *C, Object *ob, float mat[4][4])
+void ED_gpencil_create_lineart(bContext *C, Object *ob)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 7f0b7d48761..9098dc8670d 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -243,7 +243,7 @@ void ED_gpencil_brush_draw_eraser(struct Brush *brush, int x, int y);
void ED_gpencil_create_monkey(struct bContext *C, struct Object *ob, float mat[4][4]);
void ED_gpencil_create_stroke(struct bContext *C, struct Object *ob, float mat[4][4]);
-void ED_gpencil_create_lineart(struct bContext *C, struct Object *ob, float mat[4][4]);
+void ED_gpencil_create_lineart(struct bContext *C, struct Object *ob);
/* ------------ Object Utilities ------------ */
struct Object *ED_gpencil_add_object(struct bContext *C,
diff --git a/source/blender/editors/include/ED_lineart.h b/source/blender/editors/include/ED_lineart.h
index 2e33c38112a..cac00973eed 100644
--- a/source/blender/editors/include/ED_lineart.h
+++ b/source/blender/editors/include/ED_lineart.h
@@ -631,7 +631,7 @@ struct GpencilModifierData;
void ED_lineart_gpencil_generate(struct Depsgraph *depsgraph,
Object *gpencil_object,
- float **gp_obmat_inverse,
+ float (*gp_obmat_inverse)[4],
struct bGPDlayer *UNUSED(gpl),
struct bGPDframe *gpf,
int level_start,
diff --git a/source/blender/editors/lineart/lineart_chain.c b/source/blender/editors/lineart/lineart_chain.c
index 897674a8ffd..926e5856b3e 100644
--- a/source/blender/editors/lineart/lineart_chain.c
+++ b/source/blender/editors/lineart/lineart_chain.c
@@ -66,7 +66,7 @@ static LineartRenderLine *lineart_line_get_connected(LineartBoundingArea *ba,
/* always chain connected lines for now. */
/* simplification will take care of the sharp points. */
- /* if(cosine whatever) continue; */
+ /* if(cosine whatever) continue;. */
if (rv != nrl->l && rv != nrl->r) {
if (nrl->flags & LRT_EDGE_FLAG_INTERSECTION) {
@@ -154,7 +154,7 @@ static LineartRenderLineChainItem *lineart_chain_append_point(LineartRenderBuffe
rlci->transparency_mask = transparency_mask;
BLI_addtail(&rlc->chain, rlci);
- /* printf("a %f,%f %d\n", x, y, level); */
+ /* printf("a %f,%f %d\n", x, y, level);. */
return rlci;
}
@@ -192,7 +192,7 @@ static LineartRenderLineChainItem *lineart_chain_push_point(LineartRenderBuffer
rlci->transparency_mask = transparency_mask;
BLI_addhead(&rlc->chain, rlci);
- /* printf("data %f,%f %d\n", x, y, level); */
+ /* printf("data %f,%f %d\n", x, y, level);. */
return rlci;
}
@@ -237,7 +237,7 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
normalize_v3(N);
}
- /* step 1: grow left */
+ /* step 1: grow left. */
ba = ED_lineart_get_point_bounding_area_deep(rb, rl->l->fbcoord[0], rl->l->fbcoord[1]);
new_rv = rl->l;
rls = rl->segments.first;
@@ -336,7 +336,7 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
ba = ED_lineart_get_point_bounding_area_deep(rb, new_rv->fbcoord[0], new_rv->fbcoord[1]);
}
- /* Restore normal value */
+ /* Restore normal value. */
if (rl->tl || rl->tr) {
zero_v3(N);
if (rl->tl) {
@@ -351,7 +351,7 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
}
normalize_v3(N);
}
- /* step 2: this line */
+ /* step 2: this line. */
rls = rl->segments.first;
last_occlusion = ((LineartRenderLineSegment *)rls)->occlusion;
last_transparency = ((LineartRenderLineSegment *)rls)->transparency_mask;
@@ -388,12 +388,12 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
last_transparency,
rl->r->index);
- /* step 3: grow right */
+ /* step 3: grow right. */
ba = ED_lineart_get_point_bounding_area_deep(rb, rl->r->fbcoord[0], rl->r->fbcoord[1]);
new_rv = rl->r;
- /* below already done in step 2 */
+ /* below already done in step 2. */
/* lineart_chain_push_point(rb,rlc,new_rv->fbcoord[0],new_rv->fbcoord[1],rl->flags,0);
- */
+ . */
while (ba && (new_rl = lineart_line_get_connected(ba, new_rv, &new_rv, rl->flags))) {
new_rl->flags |= LRT_EDGE_FLAG_CHAIN_PICKED;
@@ -412,7 +412,7 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
normalize_v3(N);
}
- /* fix leading vertex type */
+ /* fix leading vertex type. */
rlci = rlc->chain.last;
rlci->line_type = new_rl->flags & LRT_EDGE_FLAG_ALL_TYPE;
@@ -420,7 +420,7 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
rls = new_rl->segments.last;
last_occlusion = rls->occlusion;
last_transparency = rls->transparency_mask;
- rlci->occlusion = last_occlusion; /* fix leading vertex occlusion */
+ rlci->occlusion = last_occlusion; /* fix leading vertex occlusion. */
for (rls = new_rl->segments.last; rls; rls = rls->prev) {
double gpos[3], lpos[3];
double *lfb = new_rl->l->fbcoord, *rfb = new_rl->r->fbcoord;
@@ -535,10 +535,10 @@ static LineartBoundingArea *lineart_bounding_area_get_end_point(LineartRenderBuf
return lineart_bounding_area_get_rlci_recursive(rb, root, rlci);
}
-/* if reduction threshold is even larger than a small bounding area, */
+/* if reduction threshold is even larger than a small bounding area,. */
/* then 1) geometry is simply too dense. */
/* 2) probably need to add it to root bounding area which has larger surface area then it
- * will */
+ * will. */
/* cover typical threshold values. */
static void lineart_bounding_area_link_point_recursive(LineartRenderBuffer *rb,
LineartBoundingArea *root,
@@ -630,7 +630,7 @@ void ED_lineart_chain_split_for_fixed_occlusion(LineartRenderBuffer *rb)
((LineartRenderLineChainItem *)rlc->chain.last)->next = 0;
rlci->prev = 0;
- /* end the previous one */
+ /* end the previous one. */
lineart_chain_append_point(rb,
rlc,
rlci->pos[0],
@@ -677,8 +677,8 @@ static void lineart_chain_connect(LineartRenderBuffer *UNUSED(rb),
onto->type = LRT_EDGE_FLAG_CONTOUR;
}
}
- if (!reverse_1) { /* L--R L-R */
- if (reverse_2) { /* L--R R-L */
+ if (!reverse_1) { /* L--R L-R. */
+ if (reverse_2) { /* L--R R-L. */
BLI_listbase_reverse(&sub->chain);
}
rlci = sub->chain.first;
@@ -692,8 +692,8 @@ static void lineart_chain_connect(LineartRenderBuffer *UNUSED(rb),
((LineartRenderLineChainItem *)sub->chain.first)->prev = onto->chain.last;
onto->chain.last = sub->chain.last;
}
- else { /* L-R L--R */
- if (!reverse_2) { /* R-L L--R */
+ else { /* L-R L--R. */
+ if (!reverse_2) { /* R-L L--R. */
BLI_listbase_reverse(&sub->chain);
}
rlci = onto->chain.first;
@@ -755,7 +755,7 @@ static LineartChainRegisterEntry *lineart_chain_get_closest_cre(LineartRenderBuf
continue; /* fuzzy intersetions but no intersection line found. */
}
}
- else { /* line type different but no fuzzy */
+ else { /* line type different but no fuzzy. */
continue;
}
}
@@ -903,7 +903,7 @@ void ED_lineart_chain_connect(LineartRenderBuffer *rb, const int do_geometry_spa
}
}
-/* length is in image space */
+/* length is in image space. */
float ED_lineart_chain_compute_length(LineartRenderLineChain *rlc)
{
LineartRenderLineChainItem *rlci;
@@ -986,7 +986,7 @@ void ED_lineart_chain_split_angle(LineartRenderBuffer *rb, float angle_threshold
((LineartRenderLineChainItem *)rlc->chain.last)->next = 0;
rlci->prev = 0;
- /* end the previous one */
+ /* end the previous one. */
lineart_chain_append_point(rb,
rlc,
rlci->pos[0],
diff --git a/source/blender/editors/lineart/lineart_
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list