Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-06-29 16:28:38 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-06-29 16:47:43 +0300
commita351eb072658ce6fb84290f80d8f17bb397fb7ff (patch)
tree8db60cbddbafddd69ceb2f9b3ad32fa82a8dc022 /source/blender/editors/gpencil/gpencil_mesh.c
parent399dbb1aa391f04357f91ab875241db3c6041aa5 (diff)
GPencil: Cleanup function names replace gp_ by gpencil_ prefix
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_mesh.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_mesh.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/gpencil/gpencil_mesh.c b/source/blender/editors/gpencil/gpencil_mesh.c
index 03b6252e9ba..763f5687edf 100644
--- a/source/blender/editors/gpencil/gpencil_mesh.c
+++ b/source/blender/editors/gpencil/gpencil_mesh.c
@@ -57,9 +57,9 @@
#include "gpencil_intern.h"
/* Check frame_end is always > start frame! */
-static void gp_bake_set_frame_end(struct Main *UNUSED(main),
- struct Scene *UNUSED(scene),
- struct PointerRNA *ptr)
+static void gpencil_bake_set_frame_end(struct Main *UNUSED(main),
+ struct Scene *UNUSED(scene),
+ struct PointerRNA *ptr)
{
int frame_start = RNA_int_get(ptr, "frame_start");
int frame_end = RNA_int_get(ptr, "frame_end");
@@ -70,7 +70,7 @@ static void gp_bake_set_frame_end(struct Main *UNUSED(main),
}
/* Extract mesh animation to Grease Pencil. */
-static bool gp_bake_mesh_animation_poll(bContext *C)
+static bool gpencil_bake_mesh_animation_poll(bContext *C)
{
if (CTX_data_mode_enum(C) != CTX_MODE_OBJECT) {
return false;
@@ -86,7 +86,7 @@ typedef struct GpBakeOb {
Object *ob;
} GpBakeOb;
-static void gp_bake_duplilist(Depsgraph *depsgraph, Scene *scene, Object *ob, ListBase *list)
+static void gpencil_bake_duplilist(Depsgraph *depsgraph, Scene *scene, Object *ob, ListBase *list)
{
GpBakeOb *elem = NULL;
ListBase *lb;
@@ -104,7 +104,7 @@ static void gp_bake_duplilist(Depsgraph *depsgraph, Scene *scene, Object *ob, Li
free_object_duplilist(lb);
}
-static void gp_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene, ListBase *list)
+static void gpencil_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene, ListBase *list)
{
GpBakeOb *elem = NULL;
@@ -118,7 +118,7 @@ static void gp_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene, Lis
}
/* Add duplilist. */
else if (obact->type == OB_EMPTY) {
- gp_bake_duplilist(depsgraph, scene, obact, list);
+ gpencil_bake_duplilist(depsgraph, scene, obact, list);
}
/* Add other selected objects. */
@@ -135,20 +135,20 @@ static void gp_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene, Lis
/* Add duplilist. */
if (ob->type == OB_EMPTY) {
- gp_bake_duplilist(depsgraph, scene, obact, list);
+ gpencil_bake_duplilist(depsgraph, scene, obact, list);
}
}
CTX_DATA_END;
}
-static void gp_bake_free_ob_list(ListBase *list)
+static void gpencil_bake_free_ob_list(ListBase *list)
{
LISTBASE_FOREACH_MUTABLE (GpBakeOb *, elem, list) {
MEM_SAFE_FREE(elem);
}
}
-static int gp_bake_mesh_animation_exec(bContext *C, wmOperator *op)
+static int gpencil_bake_mesh_animation_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
@@ -158,12 +158,12 @@ static int gp_bake_mesh_animation_exec(bContext *C, wmOperator *op)
Object *ob_gpencil = NULL;
ListBase list = {NULL, NULL};
- gp_bake_ob_list(C, depsgraph, scene, &list);
+ gpencil_bake_ob_list(C, depsgraph, scene, &list);
/* Cannot check this in poll because the active object changes. */
if (list.first == NULL) {
BKE_report(op->reports, RPT_INFO, "No valid object selected");
- gp_bake_free_ob_list(&list);
+ gpencil_bake_free_ob_list(&list);
return OPERATOR_CANCELLED;
}
@@ -202,7 +202,7 @@ static int gp_bake_mesh_animation_exec(bContext *C, wmOperator *op)
if ((ob_gpencil == NULL) || (ob_gpencil->type != OB_GPENCIL)) {
BKE_report(op->reports, RPT_ERROR, "Target grease pencil object not valid");
- gp_bake_free_ob_list(&list);
+ gpencil_bake_free_ob_list(&list);
return OPERATOR_CANCELLED;
}
@@ -310,7 +310,7 @@ static int gp_bake_mesh_animation_exec(bContext *C, wmOperator *op)
}
/* Free memory. */
- gp_bake_free_ob_list(&list);
+ gpencil_bake_free_ob_list(&list);
if (sctx != NULL) {
ED_transform_snap_object_context_destroy(sctx);
}
@@ -359,8 +359,8 @@ void GPENCIL_OT_bake_mesh_animation(wmOperatorType *ot)
ot->description = "Bake Mesh Animation to Grease Pencil strokes";
/* callbacks */
- ot->exec = gp_bake_mesh_animation_exec;
- ot->poll = gp_bake_mesh_animation_poll;
+ ot->exec = gpencil_bake_mesh_animation_exec;
+ ot->poll = gpencil_bake_mesh_animation_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -371,7 +371,7 @@ void GPENCIL_OT_bake_mesh_animation(wmOperatorType *ot)
prop = RNA_def_int(
ot->srna, "frame_end", 250, 1, 100000, "End Frame", "The end frame of animation", 1, 100000);
- RNA_def_property_update_runtime(prop, gp_bake_set_frame_end);
+ RNA_def_property_update_runtime(prop, gpencil_bake_set_frame_end);
prop = RNA_def_int(ot->srna, "step", 1, 1, 100, "Step", "Step between generated frames", 1, 100);