Initial Grease Pencil 3.0 stage #106848
|
@ -187,12 +187,6 @@ class Layer : public ::GreasePencilLayer {
|
||||||
const Map<int, GreasePencilFrame> &frames() const;
|
const Map<int, GreasePencilFrame> &frames() const;
|
||||||
Map<int, GreasePencilFrame> &frames_for_write();
|
Map<int, GreasePencilFrame> &frames_for_write();
|
||||||
|
|
||||||
/**
|
|
||||||
* \returns the layer masks.
|
|
||||||
*/
|
|
||||||
// Span<LayerMask> masks() const;
|
|
||||||
// Vector<LayerMask> &masks_for_write();
|
|
||||||
|
|
||||||
bool is_visible() const;
|
bool is_visible() const;
|
||||||
bool is_locked() const;
|
bool is_locked() const;
|
||||||
|
|
||||||
|
|
|
@ -306,9 +306,10 @@ Layer &TreeNode::as_layer_for_write()
|
||||||
LayerMask::LayerMask()
|
LayerMask::LayerMask()
|
||||||
{
|
{
|
||||||
this->layer_name = nullptr;
|
this->layer_name = nullptr;
|
||||||
|
this->flag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerMask::LayerMask(StringRefNull name)
|
LayerMask::LayerMask(StringRefNull name) : LayerMask()
|
||||||
{
|
{
|
||||||
this->layer_name = BLI_strdup(name.c_str());
|
this->layer_name = BLI_strdup(name.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,13 +210,12 @@ void legacy_gpencil_to_grease_pencil(Main &bmain, GreasePencil &grease_pencil, b
|
||||||
new_layer.blend_mode = static_cast<int8_t>(gpl->blend_mode);
|
new_layer.blend_mode = static_cast<int8_t>(gpl->blend_mode);
|
||||||
|
|
||||||
/* Convert the layer masks. */
|
/* Convert the layer masks. */
|
||||||
// Vector<LayerMask> masks = new_layer.masks_for_write();
|
LISTBASE_FOREACH (bGPDlayer_Mask *, mask, &gpl->mask_layers) {
|
||||||
// LISTBASE_FOREACH (bGPDlayer_Mask *, mask, &gpl->mask_layers) {
|
LayerMask *new_mask = new LayerMask(mask->name);
|
||||||
// LayerMask new_mask = LayerMask(mask->name);
|
new_mask->flag = mask->flag;
|
||||||
// new_mask.flag = mask->flag;
|
BLI_addtail(&new_layer.masks, new_mask);
|
||||||
// masks.append(std::move(new_mask));
|
}
|
||||||
// }
|
new_layer.opacity = gpl->opacity;
|
||||||
// new_layer.opacity = gpl->opacity;
|
|
||||||
|
|
||||||
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
|
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
|
||||||
grease_pencil.drawing_array[i] = reinterpret_cast<GreasePencilDrawingBase *>(
|
grease_pencil.drawing_array[i] = reinterpret_cast<GreasePencilDrawingBase *>(
|
||||||
|
|
Loading…
Reference in New Issue