Cleanup: add View3D_Runtime struct
Also remove 'matcap_icon'
This commit is contained in:
parent
70cbd0a6bd
commit
f7e35d61f8
|
@ -7170,7 +7170,7 @@ static void direct_link_area(FileData *fd, ScrArea *area)
|
|||
direct_link_gpencil(fd, v3d->gpd);
|
||||
}
|
||||
v3d->localvd = newdataadr(fd, v3d->localvd);
|
||||
v3d->properties_storage = NULL;
|
||||
v3d->runtime.properties_storage = NULL;
|
||||
|
||||
/* render can be quite heavy, set to solid on load */
|
||||
if (v3d->shading.type == OB_RENDER) {
|
||||
|
|
|
@ -415,8 +415,8 @@ static void view3d_free(SpaceLink *sl)
|
|||
MEM_freeN(vd->localvd);
|
||||
}
|
||||
|
||||
if (vd->properties_storage) {
|
||||
MEM_freeN(vd->properties_storage);
|
||||
if (vd->runtime.properties_storage) {
|
||||
MEM_freeN(vd->runtime.properties_storage);
|
||||
}
|
||||
|
||||
if (vd->fx_settings.ssao) {
|
||||
|
@ -443,7 +443,7 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl)
|
|||
|
||||
if (v3dn->localvd) {
|
||||
v3dn->localvd = NULL;
|
||||
v3dn->properties_storage = NULL;
|
||||
v3dn->runtime.properties_storage = NULL;
|
||||
}
|
||||
|
||||
if (v3dn->shading.type == OB_RENDER) {
|
||||
|
@ -452,7 +452,7 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl)
|
|||
|
||||
/* copy or clear inside new stuff */
|
||||
|
||||
v3dn->properties_storage = NULL;
|
||||
v3dn->runtime.properties_storage = NULL;
|
||||
if (v3dn->fx_settings.dof) {
|
||||
v3dn->fx_settings.dof = MEM_dupallocN(v3do->fx_settings.dof);
|
||||
}
|
||||
|
|
|
@ -196,10 +196,10 @@ static void apply_scale_factor_clamp(float *val, const int tot, const float ve_m
|
|||
|
||||
static TransformProperties *v3d_transform_props_ensure(View3D *v3d)
|
||||
{
|
||||
if (v3d->properties_storage == NULL) {
|
||||
v3d->properties_storage = MEM_callocN(sizeof(TransformProperties), "TransformProperties");
|
||||
if (v3d->runtime.properties_storage == NULL) {
|
||||
v3d->runtime.properties_storage = MEM_callocN(sizeof(TransformProperties), "TransformProperties");
|
||||
}
|
||||
return v3d->properties_storage;
|
||||
return v3d->runtime.properties_storage;
|
||||
}
|
||||
|
||||
/* is used for both read and write... */
|
||||
|
|
|
@ -223,6 +223,11 @@ typedef struct View3DOverlay {
|
|||
|
||||
} View3DOverlay;
|
||||
|
||||
typedef struct View3D_Runtime {
|
||||
/** Nkey panel stores stuff here. */
|
||||
void *properties_storage;
|
||||
} View3D_Runtime;
|
||||
|
||||
/* 3D ViewPort Struct */
|
||||
typedef struct View3D {
|
||||
struct SpaceLink *next, *prev;
|
||||
|
@ -275,10 +280,7 @@ typedef struct View3D {
|
|||
float clip_start, clip_end;
|
||||
float ofs[3] DNA_DEPRECATED;
|
||||
|
||||
char _pad[4];
|
||||
|
||||
/** Icon id. */
|
||||
short matcap_icon;
|
||||
char _pad[6];
|
||||
|
||||
short gridlines;
|
||||
/** Number of subdivisions in the grid between each highlighted grid line. */
|
||||
|
@ -295,9 +297,6 @@ typedef struct View3D {
|
|||
* instead set (temporarily) from camera */
|
||||
struct GPUFXSettings fx_settings;
|
||||
|
||||
/** Nkey panel stores stuff here (runtime only!). */
|
||||
void *properties_storage;
|
||||
|
||||
/* XXX deprecated? */
|
||||
/** Grease-Pencil Data (annotation layers). */
|
||||
struct bGPdata *gpd DNA_DEPRECATED;
|
||||
|
@ -316,6 +315,9 @@ typedef struct View3D {
|
|||
|
||||
View3DShading shading;
|
||||
View3DOverlay overlay;
|
||||
|
||||
/** Runtime evaluation data (keep last). */
|
||||
View3D_Runtime runtime;
|
||||
} View3D;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue