[Bf-blender-cvs] [f05a18f0fa3] greasepencil-object: GPencil: Rename python API function from convert_to_gpencil to generate_gpencil_strokes
Antonioya
noreply at git.blender.org
Sun Jul 14 10:46:37 CEST 2019
Commit: f05a18f0fa315635030c36e24ff0b49c03909143
Author: Antonioya
Date: Sun Jul 14 10:46:22 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rBf05a18f0fa315635030c36e24ff0b49c03909143
GPencil: Rename python API function from convert_to_gpencil to generate_gpencil_strokes
The problem with old name was that it implied that original object was removed, but the function only creates the strokes, so the new name is better.
===================================================================
M source/blender/makesrna/intern/rna_object_api.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 3d3319a0d15..c3a5b57817c 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -717,12 +717,12 @@ static bool rna_Object_update_from_editmode(Object *ob, Main *bmain)
return result;
}
-bool rna_Object_convert_to_gpencil(Object *ob,
- bContext *C,
- ReportList *reports,
- Object *ob_gpencil,
- bool gpencil_lines,
- bool use_collections)
+bool rna_Object_generate_gpencil_strokes(Object *ob,
+ bContext *C,
+ ReportList *reports,
+ Object *ob_gpencil,
+ bool gpencil_lines,
+ bool use_collections)
{
if (ob->type != OB_CURVE) {
BKE_reportf(reports,
@@ -1185,7 +1185,7 @@ void RNA_api_object(StructRNA *srna)
"Intended to be used by render engines only");
/* Convert curve object to gpencil strokes. */
- func = RNA_def_function(srna, "convert_to_gpencil", "rna_Object_convert_to_gpencil");
+ func = RNA_def_function(srna, "generate_gpencil_strokes", "rna_Object_generate_gpencil_strokes");
RNA_def_function_ui_description(func, "Convert a curve object to grease pencil strokes.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
More information about the Bf-blender-cvs
mailing list