Fix #130262: Grease Pencil: Merge layers node skips copying properties
The "Merge Layers" node creates a new `GreasePencil` as the result but forgot to copy the Grease Pencil parameters. Pull Request: https://projects.blender.org/blender/blender/pulls/130273
This commit is contained in:
committed by
Falk David
parent
d22ea1d80b
commit
478caef5cf
@@ -47,10 +47,8 @@ GreasePencil *merge_layers(const GreasePencil &src_grease_pencil,
|
||||
|
||||
GreasePencil *new_grease_pencil = BKE_grease_pencil_new_nomain();
|
||||
|
||||
BKE_grease_pencil_copy_parameters(src_grease_pencil, *new_grease_pencil);
|
||||
new_grease_pencil->runtime->eval_frame = src_grease_pencil.runtime->eval_frame;
|
||||
new_grease_pencil->material_array = static_cast<Material **>(
|
||||
MEM_dupallocN(src_grease_pencil.material_array));
|
||||
new_grease_pencil->material_array_num = src_grease_pencil.material_array_num;
|
||||
|
||||
const int new_layers_num = layers_to_merge.size();
|
||||
new_grease_pencil->add_layers_with_empty_drawings_for_eval(new_layers_num);
|
||||
|
||||
Reference in New Issue
Block a user