GPencil: Remove unused parameter and fix warning
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user