Cleanup: expose struct for ED_view3d_mats_rv3d_*
authorCampbell Barton <ideasman42@gmail.com>
Sat, 4 Mar 2017 02:32:40 +0000 (13:32 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 4 Mar 2017 02:32:40 +0000 (13:32 +1100)
source/blender/editors/include/ED_view3d.h
source/blender/editors/space_view3d/view3d_draw.c
source/blender/python/intern/gpu_offscreen.c

index 79176d9e9cf72da419d01769256920607e8ead2f..5514dc0d3dfcff561715eb25569736a0b9dcaad4 100644 (file)
@@ -47,6 +47,7 @@ struct Main;
 struct MetaElem;
 struct Nurb;
 struct Object;
+struct RV3DMatrixStore;
 struct RegionView3D;
 struct Scene;
 struct ScrArea;
@@ -330,8 +331,8 @@ void ED_view3d_check_mats_rv3d(struct RegionView3D *rv3d);
 #endif
 int ED_view3d_scene_layer_set(int lay, const int *values, int *active);
 
-void *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d);
-void  ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, void *rv3dmat_pt);
+struct RV3DMatrixStore *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d);
+void                    ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, struct RV3DMatrixStore *rv3dmat);
 
 bool ED_view3d_context_activate(struct bContext *C);
 void ED_view3d_draw_offscreen_init(struct Scene *scene, struct View3D *v3d);
index f23e587e55db2e2e939a7d4f1dbdcdffc225bd8a..0c5cf1bd9362cbda37edbd4de8acbb0aa07793ee 100644 (file)
@@ -2955,7 +2955,7 @@ struct RV3DMatrixStore {
        float pixsize;
 };
 
-void *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d)
+struct RV3DMatrixStore *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d)
 {
        struct RV3DMatrixStore *rv3dmat = MEM_mallocN(sizeof(*rv3dmat), __func__);
        copy_m4_m4(rv3dmat->winmat, rv3d->winmat);
@@ -2968,9 +2968,8 @@ void *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d)
        return (void *)rv3dmat;
 }
 
-void ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, void *rv3dmat_pt)
+void ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, struct RV3DMatrixStore *rv3dmat)
 {
-       struct RV3DMatrixStore *rv3dmat = rv3dmat_pt;
        copy_m4_m4(rv3d->winmat, rv3dmat->winmat);
        copy_m4_m4(rv3d->viewmat, rv3dmat->viewmat);
        copy_m4_m4(rv3d->persmat, rv3dmat->persmat);
index c4863b2a92fff562e7b32e7a1c23b20d0dec2b4a..7711ce18bd0d6e171799a424f881fd493738a2e9 100644 (file)
@@ -202,7 +202,7 @@ static PyObject *pygpu_offscreen_draw_view3d(BPy_GPUOffScreen *self, PyObject *a
        ARegion *ar;
        GPUFX *fx;
        GPUFXSettings fx_settings;
-       void *rv3d_mats;
+       struct RV3DMatrixStore *rv3d_mats;
 
        BPY_GPU_OFFSCREEN_CHECK_OBJ(self);