Merging r40265 through r40492 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / gpencil / gpencil_edit.c
index c915bc9..e167a21 100644 (file)
@@ -69,6 +69,7 @@
 
 #include "ED_gpencil.h"
 #include "ED_view3d.h"
+#include "ED_clip.h"
 
 #include "gpencil_intern.h"
 
@@ -137,6 +138,19 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
                        }
                                break;
                                
+                       case SPACE_CLIP: /* Nodes Editor */
+                       {
+                               SpaceClip *sc= (SpaceClip *)CTX_wm_space_data(C);
+                               MovieClip *clip= ED_space_clip(sc);
+
+                               if(clip) {
+                                       /* for now, as long as there's a clip, default to using that in Clip Editor */
+                                       if (ptr) RNA_id_pointer_create(&clip->id, ptr);
+                                       return &clip->gpd;
+                               }
+                       }
+                               break;
+                               
                        default: /* unsupported space */
                                return NULL;
                }