[Bf-blender-cvs] [7119e69e4ac] greasepencil-object: Rename struct_copy to light_copy
Falk David
noreply at git.blender.org
Mon Feb 7 18:35:12 CET 2022
Commit: 7119e69e4ac6780733e0c74aa2abd3c233e6294d
Author: Falk David
Date: Wed Feb 2 11:46:04 2022 +0100
Branches: greasepencil-object
https://developer.blender.org/rB7119e69e4ac6780733e0c74aa2abd3c233e6294d
Rename struct_copy to light_copy
===================================================================
M source/blender/blenkernel/BKE_gpencil_update_cache.h
M source/blender/blenkernel/intern/gpencil.c
M source/blender/blenkernel/intern/gpencil_update_cache.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_gpencil_update_cache.h b/source/blender/blenkernel/BKE_gpencil_update_cache.h
index 7ee1542c28d..8c833f6091d 100644
--- a/source/blender/blenkernel/BKE_gpencil_update_cache.h
+++ b/source/blender/blenkernel/BKE_gpencil_update_cache.h
@@ -39,11 +39,11 @@ struct GPencilUpdateCache;
/* GPencilUpdateCache.flag */
typedef enum eGPUpdateCacheNodeFlag {
/* Node is a placeholder (e.g. when only an index is needed). */
- GP_UPDATE_NODE_NO_COPY = -1,
- /* Copy the element as well as all of its content. */
- GP_UPDATE_NODE_FULL_COPY = 0,
+ GP_UPDATE_NODE_NO_COPY = 0,
/* Copy only element, not the content. */
- GP_UPDATE_NODE_STRUCT_COPY = 1,
+ GP_UPDATE_NODE_LIGHT_COPY = 1,
+ /* Copy the element as well as all of its content. */
+ GP_UPDATE_NODE_FULL_COPY = 2,
} eGPUpdateCacheNodeFlag;
/**
@@ -100,7 +100,7 @@ typedef struct GPencilUpdateCacheTraverseSettings {
* \param data: A data pointer to populate the initial cache with.
* \param full_copy: If true, will mark this update cache as a full copy
* (GP_UPDATE_NODE_FULL_COPY). If false, it will be marked as a struct copy
- * (GP_UPDATE_NODE_STRUCT_COPY).
+ * (GP_UPDATE_NODE_LIGHT_COPY).
*/
GPencilUpdateCache *BKE_gpencil_create_update_cache(void *data, bool full_copy);
@@ -134,10 +134,10 @@ void BKE_gpencil_tag_full_update(struct bGPdata *gpd,
* The function assumes that when a parameter is NULL all of the following parameters are NULL too.
* E.g. in order to tag a layer (gpl), the parameters would *have* to be (gpd, gpl, NULL, NULL).
*/
-void BKE_gpencil_tag_struct_update(struct bGPdata *gpd,
- struct bGPDlayer *gpl,
- struct bGPDframe *gpf,
- struct bGPDstroke *gps);
+void BKE_gpencil_tag_light_update(struct bGPdata *gpd,
+ struct bGPDlayer *gpl,
+ struct bGPDframe *gpf,
+ struct bGPDstroke *gps);
/**
* Frees the GPencilUpdateCache on the gpd->runtime. This will not free the data that the cache
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 3508b83ef23..b9ebd19a617 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2876,7 +2876,7 @@ static bool gpencil_update_on_write_layer_cb(GPencilUpdateCache *gpl_cache, void
td->gpl_eval->runtime.gpl_orig = gpl;
return true;
}
- else if (gpl_cache->flag == GP_UPDATE_NODE_STRUCT_COPY) {
+ else if (gpl_cache->flag == GP_UPDATE_NODE_LIGHT_COPY) {
BLI_assert(gpl != NULL);
BKE_gpencil_layer_copy_settings(gpl, td->gpl_eval);
td->gpl_eval->runtime.gpl_orig = gpl;
@@ -2916,7 +2916,7 @@ static bool gpencil_update_on_write_frame_cb(GPencilUpdateCache *gpf_cache, void
return true;
}
- else if (gpf_cache->flag == GP_UPDATE_NODE_STRUCT_COPY) {
+ else if (gpf_cache->flag == GP_UPDATE_NODE_LIGHT_COPY) {
BLI_assert(gpf != NULL);
BKE_gpencil_frame_copy_settings(gpf, td->gpf_eval);
td->gpf_eval->runtime.gpf_orig = gpf;
@@ -2958,7 +2958,7 @@ static bool gpencil_update_on_write_stroke_cb(GPencilUpdateCache *gps_cache, voi
pt_eval->runtime.idx_orig = i;
}
}
- else if (gps_cache->flag == GP_UPDATE_NODE_STRUCT_COPY) {
+ else if (gps_cache->flag == GP_UPDATE_NODE_LIGHT_COPY) {
BLI_assert(gps != NULL);
BKE_gpencil_stroke_copy_settings(gps, td->gps_eval);
td->gps_eval->runtime.gps_orig = gps;
@@ -2982,7 +2982,7 @@ void BKE_gpencil_update_on_write(bGPdata *gpd_orig, bGPdata *gpd_eval)
return;
}
- if (update_cache->flag == GP_UPDATE_NODE_STRUCT_COPY) {
+ if (update_cache->flag == GP_UPDATE_NODE_LIGHT_COPY) {
BKE_gpencil_data_copy_settings(gpd_orig, gpd_eval);
}
diff --git a/source/blender/blenkernel/intern/gpencil_update_cache.c b/source/blender/blenkernel/intern/gpencil_update_cache.c
index c47ee9a621f..b3a17287c24 100644
--- a/source/blender/blenkernel/intern/gpencil_update_cache.c
+++ b/source/blender/blenkernel/intern/gpencil_update_cache.c
@@ -120,7 +120,7 @@ static void update_cache_node_create_ex(GPencilUpdateCache *root_cache,
return;
}
- const int node_flag = full_copy ? GP_UPDATE_NODE_FULL_COPY : GP_UPDATE_NODE_STRUCT_COPY;
+ const int node_flag = full_copy ? GP_UPDATE_NODE_FULL_COPY : GP_UPDATE_NODE_LIGHT_COPY;
if (gpl_index == -1) {
root_cache->data = (bGPdata *)data;
@@ -166,8 +166,7 @@ static void update_cache_node_create_ex(GPencilUpdateCache *root_cache,
return;
}
- GPencilUpdateCache *gps_cache = update_cache_alloc(
- gps_index, node_flag, (bGPDstroke *)data);
+ GPencilUpdateCache *gps_cache = update_cache_alloc(gps_index, node_flag, (bGPDstroke *)data);
BLI_dlrbTree_add(
gpf_node->cache->children, cache_node_compare, cache_node_alloc, NULL, gps_cache);
@@ -243,7 +242,7 @@ static void gpencil_traverse_update_cache_ex(GPencilUpdateCache *parent_cache,
GPencilUpdateCache *BKE_gpencil_create_update_cache(void *data, bool full_copy)
{
return update_cache_alloc(
- 0, full_copy ? GP_UPDATE_NODE_FULL_COPY : GP_UPDATE_NODE_STRUCT_COPY, data);
+ 0, full_copy ? GP_UPDATE_NODE_FULL_COPY : GP_UPDATE_NODE_LIGHT_COPY, data);
}
void BKE_gpencil_traverse_update_cache(GPencilUpdateCache *cache,
@@ -260,7 +259,7 @@ void BKE_gpencil_tag_full_update(bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, b
}
}
-void BKE_gpencil_tag_struct_update(bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
+void BKE_gpencil_tag_light_update(bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
{
if (U.experimental.use_gpencil_update_cache) {
update_cache_node_create(gpd, gpl, gpf, gps, false);
More information about the Bf-blender-cvs
mailing list