[Bf-blender-cvs] [1c28e124145] master: Fix (unreported) missing handling of GPencil Layer's parent Object pointer in BKE_library_query.

Bastien Montagne noreply at git.blender.org
Wed Apr 19 22:10:32 CEST 2017


Commit: 1c28e124145a095b7e5f4c110d7864dba32a7f31
Author: Bastien Montagne
Date:   Wed Apr 19 21:47:01 2017 +0200
Branches: master
https://developer.blender.org/rB1c28e124145a095b7e5f4c110d7864dba32a7f31

Fix (unreported) missing handling of GPencil Layer's parent Object pointer in BKE_library_query.

Grrrr... still finding missing pointers here... :/

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

M	source/blender/blenkernel/intern/library_query.c

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

diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index 0616c614848..7d56b4a5553 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -971,13 +971,20 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
 				}
 				break;
 			}
+			case ID_GD:
+			{
+				bGPdata *gpencil = (bGPdata *) id;
+
+				for (bGPDlayer *gp_layer = gpencil->layers.first; gp_layer; gp_layer = gp_layer->next) {
+					CALLBACK_INVOKE(gp_layer->parent, IDWALK_CB_NOP);
+				}
+			}
 
 			/* Nothing needed for those... */
 			case ID_IM:
 			case ID_VF:
 			case ID_TXT:
 			case ID_SO:
-			case ID_GD:
 			case ID_WM:
 			case ID_PAL:
 			case ID_PC:




More information about the Bf-blender-cvs mailing list