diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-08-13 09:38:05 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-08-13 09:39:46 +0300 |
commit | 7c380119a7089ed98a280bc3d2202c0345a0d1c7 (patch) | |
tree | 99e2f6dad4b220e16d860ce55b103600c33bcfc8 /source | |
parent | e84ffae7ba9610f0203396a6dfceaee5e2c1842e (diff) |
GPencil: Remove unused parameter and fix warning
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_gpencil_curve.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/gpencil_curve.c | 5 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 4 |
4 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_curve.h b/source/blender/blenkernel/BKE_gpencil_curve.h index 9a5950bcfab..c61427c6c4a 100644 --- a/source/blender/blenkernel/BKE_gpencil_curve.h +++ b/source/blender/blenkernel/BKE_gpencil_curve.h @@ -35,7 +35,6 @@ void BKE_gpencil_convert_curve(struct Main *bmain, struct Scene *scene, struct Object *ob_gp, struct Object *ob_cu, - const bool gpencil_lines, const bool use_collections, const float scale_thickness, const float sample); diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c index 4974e98b076..6b3f752120a 100644 --- a/source/blender/blenkernel/intern/gpencil_curve.c +++ b/source/blender/blenkernel/intern/gpencil_curve.c @@ -290,7 +290,6 @@ static int gpencil_get_stroke_material_fromcurve( static void gpencil_convert_spline(Main *bmain, Object *ob_gp, Object *ob_cu, - const bool UNUSED(gpencil_lines), const float scale_thickness, const float sample, bGPDframe *gpf, @@ -460,7 +459,6 @@ static void gpencil_convert_spline(Main *bmain, * \param scene: Original scene. * \param ob_gp: Grease pencil object to add strokes. * \param ob_cu: Curve to convert. - * \param gpencil_lines: Use lines for strokes. * \param use_collections: Create layers using collection names. * \param scale_thickness: Scale thickness factor. * \param sample: Sample distance, zero to disable. @@ -469,7 +467,6 @@ void BKE_gpencil_convert_curve(Main *bmain, Scene *scene, Object *ob_gp, Object *ob_cu, - const bool gpencil_lines, const bool use_collections, const float scale_thickness, const float sample) @@ -510,7 +507,7 @@ void BKE_gpencil_convert_curve(Main *bmain, /* Read all splines of the curve and create a stroke for each. */ LISTBASE_FOREACH (Nurb *, nu, &cu->nurb) { - gpencil_convert_spline(bmain, ob_gp, ob_cu, gpencil_lines, scale_thickness, sample, gpf, nu); + gpencil_convert_spline(bmain, ob_gp, ob_cu, scale_thickness, sample, gpf, nu); } /* Merge any similar material. */ diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 197c1c3bdbe..139900d0a4d 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2647,7 +2647,7 @@ static int object_convert_exec(bContext *C, wmOperator *op) ob_gpencil = ED_gpencil_add_object(C, ob->loc, local_view_bits); copy_v3_v3(ob_gpencil->rot, ob->rot); copy_v3_v3(ob_gpencil->scale, ob->scale); - BKE_gpencil_convert_curve(bmain, scene, ob_gpencil, ob, false, false, 1.0f, 0.0f); + BKE_gpencil_convert_curve(bmain, scene, ob_gpencil, ob, false, 1.0f, 0.0f); gpencilConverted = true; } } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 609340888e1..ab6b60603c7 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -713,7 +713,6 @@ bool rna_Object_generate_gpencil_strokes(Object *ob, bContext *C, ReportList *reports, Object *ob_gpencil, - bool gpencil_lines, bool use_collections, float scale_thickness, float sample) @@ -729,7 +728,7 @@ bool rna_Object_generate_gpencil_strokes(Object *ob, Scene *scene = CTX_data_scene(C); BKE_gpencil_convert_curve( - bmain, scene, ob_gpencil, ob, gpencil_lines, use_collections, scale_thickness, sample); + bmain, scene, ob_gpencil, ob, use_collections, scale_thickness, sample); WM_main_add_notifier(NC_GPENCIL | ND_DATA, NULL); @@ -1199,7 +1198,6 @@ void RNA_api_object(StructRNA *srna) "", "Grease Pencil object used to create new strokes"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); - parm = RNA_def_boolean(func, "gpencil_lines", false, "", "Create Lines"); parm = RNA_def_boolean(func, "use_collections", true, "", "Use Collections"); parm = RNA_def_float( func, "scale_thickness", 1.0f, 0.0f, FLT_MAX, "", "Thickness scaling factor", 0.0f, 100.0f); |