Version Bump: 2.76.2, deprecate values

- RegionView3D.view RV3D_VIEW_PERSPORTHO
  only ever set on initialization, never checked for.
- Lamp.type LA_YF_PHOTON
  from old 2.4x yafray files.

Also iniitalize movie-clip + grease-pencil theme colors.
This commit is contained in:
Campbell Barton 2015-10-23 04:54:07 +11:00
parent 47b1279762
commit ebf197724e
8 changed files with 54 additions and 13 deletions

View File

@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 276
#define BLENDER_SUBVERSION 1
#define BLENDER_SUBVERSION 2
/* Several breakages with 270, e.g. constraint deg vs rad */
#define BLENDER_MINVERSION 270
#define BLENDER_MINSUBVERSION 5

View File

@ -867,5 +867,46 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
{
bScreen *screen;
#define RV3D_VIEW_PERSPORTHO 7
for (screen = main->screen.first; screen; screen = screen->id.next) {
ScrArea *sa;
for (sa = screen->areabase.first; sa; sa = sa->next) {
SpaceLink *sl;
for (sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_VIEW3D) {
ARegion *ar;
ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
for (ar = lb->first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_WINDOW) {
if (ar->regiondata) {
RegionView3D *rv3d = ar->regiondata;
if (rv3d->view == RV3D_VIEW_PERSPORTHO) {
rv3d->view = RV3D_VIEW_USER;
}
}
}
}
break;
}
}
}
}
#undef RV3D_VIEW_PERSPORTHO
}
{
Lamp *lamp;
#define LA_YF_PHOTON 5
for (lamp = main->lamp.first; lamp; lamp = lamp->id.next) {
if (lamp->type == LA_YF_PHOTON) {
lamp->type = LA_LOCAL;
}
}
#undef LA_YF_PHOTON
}
}
}

View File

@ -2646,6 +2646,15 @@ void init_userdef_do_versions(void)
}
}
if (!USER_VERSION_ATLEAST(276, 2)) {
bTheme *btheme;
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
rgba_char_args_set(btheme->tclip.gp_vertex, 0, 0, 0, 255);
rgba_char_args_set(btheme->tclip.gp_vertex_select, 255, 133, 0, 255);
btheme->tclip.gp_vertex_size = 3;
}
}
if (U.pixelsize == 0.0f)
U.pixelsize = 1.0f;

View File

@ -1344,7 +1344,7 @@ static void drawlamp(View3D *v3d, RegionView3D *rv3d, Base *base,
if (is_view) {
/* skip drawing extra info */
}
else if ((la->type == LA_SPOT) || (la->type == LA_YF_PHOTON)) {
else if (la->type == LA_SPOT) {
float x, y, z, z_abs;
copy_v3_fl3(lvec, 0.0f, 0.0f, 1.0f);
copy_v3_fl3(vvec, rv3d->persmat[0][2], rv3d->persmat[1][2], rv3d->persmat[2][2]);

View File

@ -394,7 +394,7 @@ static SpaceLink *view3d_new(const bContext *C)
rv3d = ar->regiondata;
rv3d->viewquat[0] = 1.0f;
rv3d->persp = RV3D_PERSP;
rv3d->view = RV3D_VIEW_PERSPORTHO;
rv3d->view = RV3D_VIEW_USER;
rv3d->dist = 10.0;
return (SpaceLink *)v3d;

View File

@ -127,8 +127,6 @@ typedef struct Lamp {
#define LA_SPOT 2
#define LA_HEMI 3
#define LA_AREA 4
/* yafray: extra lamp type used for caustic photonmap */
#define LA_YF_PHOTON 5
/* mode */
#define LA_SHAD_BUF (1 << 0)

View File

@ -289,7 +289,6 @@ typedef struct View3D {
#define RV3D_VIEW_RIGHT 4
#define RV3D_VIEW_TOP 5
#define RV3D_VIEW_BOTTOM 6
#define RV3D_VIEW_PERSPORTHO 7
#define RV3D_VIEW_CAMERA 8
#define RV3D_VIEW_IS_AXIS(view) \

View File

@ -1615,9 +1615,6 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
lar= go->lampren;
if (lar==NULL) continue;
/* yafray: ignore shading by photonlights, not used in Blender */
if (lar->type==LA_YF_PHOTON) continue;
if (lar->mode & LA_LAYER) if ((lar->lay & shi->obi->lay)==0) continue;
if ((lar->lay & shi->lay)==0) continue;
@ -1858,9 +1855,6 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
lar= go->lampren;
if (lar==NULL) continue;
/* yafray: ignore shading by photonlights, not used in Blender */
if (lar->type==LA_YF_PHOTON) continue;
/* test for lamp layer */
if (lar->mode & LA_LAYER) if ((lar->lay & shi->obi->lay)==0) continue;
if ((lar->lay & shi->lay)==0) continue;
@ -2035,7 +2029,7 @@ static float lamp_get_data_internal(ShadeInput *shi, GroupObject *go, float col[
LampRen *lar = go->lampren;
float visifac, inp;
if (!lar || lar->type == LA_YF_PHOTON
if (!lar
|| ((lar->mode & LA_LAYER) && (lar->lay & shi->obi->lay) == 0)
|| (lar->lay & shi->lay) == 0)
return 0.0f;