[Bf-blender-cvs] [f4a1ed4] GPencil_EditStrokes: Note on current bugs which prevent this from working...
Joshua Leung
noreply at git.blender.org
Sat Oct 11 14:39:20 CEST 2014
Commit: f4a1ed4351db23121bcec844c7f2b4944c7afe98
Author: Joshua Leung
Date: Sun Oct 12 00:59:57 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rBf4a1ed4351db23121bcec844c7f2b4944c7afe98
Note on current bugs which prevent this from working...
===================================================================
M source/blender/editors/screen/screen_context.c
===================================================================
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 0d7012f..3e7cf1c 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -26,7 +26,7 @@
* \ingroup edscr
*/
-
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -398,10 +398,14 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if (CTX_data_equals(member, "gpencil_data")) {
+ /* FIXME: for some reason, CTX_data_active_object(C) returns NULL when called from these situations
+ * (as outlined above - see Campbell's #ifdefs). That causes the get active function to fail when
+ * called from context. For that reason, we end up using an alternative where we pass everything in!
+ */
bGPdata *gpd = ED_gpencil_data_get_active(C);
if (gpd) {
- CTX_data_pointer_set(result, NULL, &RNA_GreasePencil, gpd);
+ CTX_data_id_pointer_set(result, &gpd->id);
return 1;
}
}
More information about the Bf-blender-cvs
mailing list