Commit: a0c45cdaa48d0ec74f7daa8909899cc44c014058 Author: YimingWu Date: Thu Jun 27 14:43:37 2019 +0800 Branches: soc-2019-npr https://developer.blender.org/rBa0c45cdaa48d0ec74f7daa8909899cc44c014058
LANPR: selective line type now working for objects and collections =================================================================== M source/blender/draw/engines/lanpr/lanpr_access.c M source/blender/draw/engines/lanpr/lanpr_access.h M source/blender/draw/engines/lanpr/lanpr_chain.c M source/blender/draw/engines/lanpr/lanpr_ops.c =================================================================== diff --git a/source/blender/draw/engines/lanpr/lanpr_access.c b/source/blender/draw/engines/lanpr/lanpr_access.c index eb737377ff9..4c380623485 100644 --- a/source/blender/draw/engines/lanpr/lanpr_access.c +++ b/source/blender/draw/engines/lanpr/lanpr_access.c @@ -46,7 +46,8 @@ void lanpr_generate_gpencil_from_chain(Depsgraph *depsgraph, int qi_begin, int qi_end, int material_nr, - Collection *col) + Collection *col, + int types) { Scene *scene = DEG_get_evaluated_scene(depsgraph); LANPR_RenderBuffer *rb = lanpr_share.render_buffer_shared; @@ -81,6 +82,9 @@ void lanpr_generate_gpencil_from_chain(Depsgraph *depsgraph, if (!rlc->object_ref) { continue; /* intersection lines are lost! */ } + if(!(rlc->type & types)){ + continue; + } if (rlc->level > qi_end || rlc->level < qi_begin) { continue; } diff --git a/source/blender/draw/engines/lanpr/lanpr_access.h b/source/blender/draw/engines/lanpr/lanpr_access.h index a8d34ed2bb8..556f07107e6 100644 --- a/source/blender/draw/engines/lanpr/lanpr_access.h +++ b/source/blender/draw/engines/lanpr/lanpr_access.h @@ -17,7 +17,8 @@ void lanpr_generate_gpencil_from_chain(Depsgraph *depsgraph, int qi_begin, int qi_end, int material_nr, - struct Collection *col); + struct Collection *col, + int types); void lanpr_update_data_for_external(Depsgraph *depsgraph); diff --git a/source/blender/draw/engines/lanpr/lanpr_chain.c b/source/blender/draw/engines/lanpr/lanpr_chain.c index 0cde4ce5f04..dccccdb9acd 100644 --- a/source/blender/draw/engines/lanpr/lanpr_chain.c +++ b/source/blender/draw/engines/lanpr/lanpr_chain.c @@ -551,6 +551,7 @@ void lanpr_split_chains_for_fixed_occlusion(LANPR_RenderBuffer *rb) rlci->line_type, fixed_occ); new_rlc->object_ref = rlc->object_ref; + new_rlc->type = rlc->type; rlc = new_rlc; fixed_occ = rlci->occlusion; rlc->level = fixed_occ; diff --git a/source/blender/draw/engines/lanpr/lanpr_ops.c b/source/blender/draw/engines/lanpr/lanpr_ops.c index 0ec9647e77c..97bbc797c32 100644 --- a/source/blender/draw/engines/lanpr/lanpr_ops.c +++ b/source/blender/draw/engines/lanpr/lanpr_ops.c @@ -4478,7 +4478,8 @@ void lanpr_update_gp_strokes_recursive(Depsgraph *dg, struct Collection *col, in flmd->use_multiple_levels ? flmd->level_end : flmd->level_begin, flmd->material, - NULL); + NULL, + flmd->types); } } } @@ -4525,7 +4526,8 @@ void lanpr_update_gp_strokes_collection(Depsgraph *dg, struct Collection *col, i col->lanpr.use_multiple_levels ? col->lanpr.level_end : col->lanpr.level_begin, col->lanpr.material, - col); + col, + col->lanpr.types); } int lanpr_update_gp_strokes_exec(struct bContext *C, struct wmOperator *op) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs