Commit: 335f8000c8c8dead2ef64d92272cfd41c91e656d
Author: Falk David
Date:   Tue May 10 18:55:02 2022 +0200
Branches: gpencil-new-data-proposal
https://developer.blender.org/rB335f8000c8c8dead2ef64d92272cfd41c91e656d

Basic GPLayerGroup constructor

===================================================================

M       source/blender/blenkernel/intern/gpencil_new_proposal_test.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/gpencil_new_proposal_test.cc 
b/source/blender/blenkernel/intern/gpencil_new_proposal_test.cc
index a5d770f659f..31d26829349 100644
--- a/source/blender/blenkernel/intern/gpencil_new_proposal_test.cc
+++ b/source/blender/blenkernel/intern/gpencil_new_proposal_test.cc
@@ -21,7 +21,16 @@ class GPLayerGroup : ::GPLayerGroup {
  public:
   GPLayerGroup()
   {
-    /* TODO */
+    this->children = nullptr;
+    this->children_size = 0;
+    this->layer_indices = nullptr;
+    this->layer_indices_size = 0;
+  }
+
+  GPLayerGroup(const StringRefNull name) : GPLayerGroup()
+  {
+    BLI_assert(name.size() < 128);
+    strcpy(this->name, name.c_str());
   }
 
   ~GPLayerGroup()
@@ -34,6 +43,11 @@ class GPLayerGroup : ::GPLayerGroup {
     MEM_SAFE_FREE(this->children);
     MEM_SAFE_FREE(this->layer_indices);
   }
+
+  IndexMask layers_index_mask()
+  {
+    return {reinterpret_cast<int64_t>(this->layer_indices), 
this->layer_indices_size};
+  }
 };
 
 class GPDataRuntime {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to