Initial Grease Pencil 3.0 stage #106848
|
@ -42,7 +42,6 @@ static void grease_pencil_init_data(ID *id)
|
|||
{
|
||||
using namespace blender::bke;
|
||||
|
||||
filedescriptor marked this conversation as resolved
Outdated
|
||||
// printf("grease_pencil_init_data\n");
|
||||
GreasePencil *grease_pencil = (GreasePencil *)id;
|
||||
grease_pencil->runtime = MEM_new<GreasePencilRuntime>(__func__);
|
||||
}
|
||||
|
@ -54,7 +53,6 @@ static void grease_pencil_copy_data(Main * /*bmain*/,
|
|||
{
|
||||
using namespace blender;
|
||||
|
||||
// printf("grease_pencil_copy_data\n");
|
||||
GreasePencil *grease_pencil_dst = (GreasePencil *)id_dst;
|
||||
Hans Goudey
commented
C++ cast here (and above, I'll stop writing it now) C++ cast here (and above, I'll stop writing it now)
|
||||
const GreasePencil *grease_pencil_src = (GreasePencil *)id_src;
|
||||
Hans Goudey
commented
Personally I find Personally I find `grease_pencil_dst` a longer name than it needs to be, compared to something like `gp_dst`, where it's easier to see the logic when reading the function IMO. I understand that's subjective though
Falk David
commented
This used to be the case in the old grease pencil code, but tbh I find it better when it's more explicit. We ended up with This used to be the case in the old grease pencil code, but tbh I find it better when it's more explicit. We ended up with `gpf`,`gpd`,`gps` etc. and it's really unreadable imo.
|
||||
|
||||
|
@ -108,7 +106,6 @@ static void grease_pencil_copy_data(Main * /*bmain*/,
|
|||
|
||||
static void grease_pencil_free_data(ID *id)
|
||||
{
|
||||
// printf("grease_pencil_free_data\n");
|
||||
GreasePencil *grease_pencil = (GreasePencil *)id;
|
||||
BKE_animdata_free(&grease_pencil->id, false);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
* Copyright 2023 Blender Foundation. */
|
||||
|
||||
/** \file
|
||||
|
@ -202,12 +202,6 @@ typedef struct GreasePencil {
|
|||
char _pad[4];
|
||||
|
||||
#ifdef __cplusplus
|
||||
blender::Span<GreasePencilDrawingOrReference *> drawings() const;
|
||||
blender::MutableSpan<GreasePencilDrawingOrReference *> drawings_for_write();
|
||||
void add_empty_drawings(int n);
|
||||
void remove_drawing(int index);
|
||||
void foreach_visible_drawing(int frame,
|
||||
blender::FunctionRef<void(GreasePencilDrawing &)> function);
|
||||
void read_drawing_array(BlendDataReader *reader);
|
||||
void write_drawing_array(BlendWriter *writer);
|
||||
void free_drawing_array();
|
||||
|
@ -238,6 +232,12 @@ typedef struct GreasePencil {
|
|||
*/
|
||||
GreasePencilRuntimeHandle *runtime;
|
||||
#ifdef __cplusplus
|
||||
blender::Span<GreasePencilDrawingOrReference *> drawings() const;
|
||||
blender::MutableSpan<GreasePencilDrawingOrReference *> drawings_for_write();
|
||||
void add_empty_drawings(int n);
|
||||
void remove_drawing(int index);
|
||||
void foreach_visible_drawing(int frame,
|
||||
blender::FunctionRef<void(GreasePencilDrawing &)> function);
|
||||
const blender::bke::greasepencil::Layer *active_layer() const;
|
||||
blender::bke::greasepencil::LayerGroup &root_group();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Remove printfs.