Cleanup: remove unused R_ORTHO / R_PANORAMA flags.
This commit is contained in:
parent
0b5b543b7c
commit
82e59d4c18
|
@ -1 +1 @@
|
||||||
Subproject commit 59495b4b59077aa1cc68fffbdae1463af980f08e
|
Subproject commit d3349b42856d00c278f72f2a5909a6c96b9cdb5e
|
|
@ -1 +1 @@
|
||||||
Subproject commit 371960484a38fc64e0a2635170a41a0d8ab2f6bd
|
Subproject commit 1a5f14657ee06ec2f520326032305dc1f2c5e2d5
|
|
@ -1 +1 @@
|
||||||
Subproject commit 474702157831f1a58bb50f5240ab8b1b02b6ba37
|
Subproject commit b4496a81e4f3d607a692f7c2e12fce3dbd784de4
|
|
@ -62,7 +62,6 @@ void BKE_camera_free(struct Camera *ca);
|
||||||
/* Camera Usage */
|
/* Camera Usage */
|
||||||
|
|
||||||
float BKE_camera_object_dof_distance(struct Object *ob);
|
float BKE_camera_object_dof_distance(struct Object *ob);
|
||||||
void BKE_camera_object_mode(struct RenderData *rd, struct Object *ob);
|
|
||||||
|
|
||||||
int BKE_camera_sensor_fit(int sensor_fit, float sizex, float sizey);
|
int BKE_camera_sensor_fit(int sensor_fit, float sizex, float sizey);
|
||||||
float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y);
|
float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y);
|
||||||
|
|
|
@ -132,17 +132,6 @@ void BKE_camera_free(Camera *ca)
|
||||||
|
|
||||||
/******************************** Camera Usage *******************************/
|
/******************************** Camera Usage *******************************/
|
||||||
|
|
||||||
void BKE_camera_object_mode(RenderData *rd, Object *cam_ob)
|
|
||||||
{
|
|
||||||
rd->mode &= ~(R_ORTHO | R_PANORAMA);
|
|
||||||
|
|
||||||
if (cam_ob && cam_ob->type == OB_CAMERA) {
|
|
||||||
Camera *cam = cam_ob->data;
|
|
||||||
if (cam->type == CAM_ORTHO) rd->mode |= R_ORTHO;
|
|
||||||
if (cam->type == CAM_PANO) rd->mode |= R_PANORAMA;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get the camera's dof value, takes the dof object into account */
|
/* get the camera's dof value, takes the dof object into account */
|
||||||
float BKE_camera_object_dof_distance(Object *ob)
|
float BKE_camera_object_dof_distance(Object *ob)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str
|
||||||
freestyle_scene = BKE_scene_add(freestyle_bmain, name);
|
freestyle_scene = BKE_scene_add(freestyle_bmain, name);
|
||||||
freestyle_scene->r.cfra = old_scene->r.cfra;
|
freestyle_scene->r.cfra = old_scene->r.cfra;
|
||||||
freestyle_scene->r.mode = old_scene->r.mode &
|
freestyle_scene->r.mode = old_scene->r.mode &
|
||||||
~(R_EDGE_FRS | R_PANORAMA | R_MBLUR | R_BORDER);
|
~(R_EDGE_FRS | R_BORDER);
|
||||||
freestyle_scene->r.xsch = re->rectx; // old_scene->r.xsch
|
freestyle_scene->r.xsch = re->rectx; // old_scene->r.xsch
|
||||||
freestyle_scene->r.ysch = re->recty; // old_scene->r.ysch
|
freestyle_scene->r.ysch = re->recty; // old_scene->r.ysch
|
||||||
freestyle_scene->r.xasp = 1.0f; // old_scene->r.xasp;
|
freestyle_scene->r.xasp = 1.0f; // old_scene->r.xasp;
|
||||||
|
|
|
@ -1580,15 +1580,15 @@ typedef struct Scene {
|
||||||
/* RenderData.mode */
|
/* RenderData.mode */
|
||||||
#define R_OSA 0x0001
|
#define R_OSA 0x0001
|
||||||
/* #define R_SHADOW 0x0002 */
|
/* #define R_SHADOW 0x0002 */
|
||||||
/* #define R_GAMMA 0x0004 */
|
/* #define R_GAMMA 0x0004 */
|
||||||
#define R_ORTHO 0x0008
|
/* #define R_ORTHO 0x0008 */
|
||||||
/* #define R_ENVMAP 0x0010 */
|
/* #define R_ENVMAP 0x0010 */
|
||||||
/* #define R_EDGE 0x0020 */
|
/* #define R_EDGE 0x0020 */
|
||||||
/* #define R_FIELDS 0x0040 */
|
/* #define R_FIELDS 0x0040 */
|
||||||
/*#define R_FIELDSTILL 0x0080 */
|
/*#define R_FIELDSTILL 0x0080 */
|
||||||
/*#define R_RADIO 0x0100 */ /* deprecated */
|
/*#define R_RADIO 0x0100 */ /* deprecated */
|
||||||
#define R_BORDER 0x0200
|
#define R_BORDER 0x0200
|
||||||
#define R_PANORAMA 0x0400
|
#define R_PANORAMA 0x0400 /* deprecated */
|
||||||
#define R_CROP 0x0800
|
#define R_CROP 0x0800
|
||||||
/* Disable camera switching: runtime (DURIAN_CAMERA_SWITCH) */
|
/* Disable camera switching: runtime (DURIAN_CAMERA_SWITCH) */
|
||||||
#define R_NO_CAMERA_SWITCH 0x1000
|
#define R_NO_CAMERA_SWITCH 0x1000
|
||||||
|
|
|
@ -157,8 +157,6 @@ static void re_camera_params_get(Render *re, CameraParams *params, Object *cam_o
|
||||||
re->clipend = params->clipend;
|
re->clipend = params->clipend;
|
||||||
|
|
||||||
re->viewplane = params->viewplane;
|
re->viewplane = params->viewplane;
|
||||||
|
|
||||||
BKE_camera_object_mode(&re->r, cam_ob);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RE_SetOverrideCamera(Render *re, Object *camera)
|
void RE_SetOverrideCamera(Render *re, Object *camera)
|
||||||
|
|
|
@ -939,7 +939,6 @@ void RE_SetWindow(Render *re, const rctf *viewplane, float clipsta, float clipen
|
||||||
re->viewplane = *viewplane;
|
re->viewplane = *viewplane;
|
||||||
re->clipsta = clipsta;
|
re->clipsta = clipsta;
|
||||||
re->clipend = clipend;
|
re->clipend = clipend;
|
||||||
re->r.mode &= ~R_ORTHO;
|
|
||||||
|
|
||||||
perspective_m4(re->winmat,
|
perspective_m4(re->winmat,
|
||||||
re->viewplane.xmin, re->viewplane.xmax,
|
re->viewplane.xmin, re->viewplane.xmax,
|
||||||
|
@ -954,7 +953,6 @@ void RE_SetOrtho(Render *re, const rctf *viewplane, float clipsta, float clipend
|
||||||
re->viewplane = *viewplane;
|
re->viewplane = *viewplane;
|
||||||
re->clipsta = clipsta;
|
re->clipsta = clipsta;
|
||||||
re->clipend = clipend;
|
re->clipend = clipend;
|
||||||
re->r.mode |= R_ORTHO;
|
|
||||||
|
|
||||||
orthographic_m4(re->winmat,
|
orthographic_m4(re->winmat,
|
||||||
re->viewplane.xmin, re->viewplane.xmax,
|
re->viewplane.xmin, re->viewplane.xmax,
|
||||||
|
@ -1860,24 +1858,6 @@ bool RE_is_rendering_allowed(Scene *scene, ViewLayer *single_layer, Object *came
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get panorama & ortho, only after camera is set */
|
|
||||||
BKE_camera_object_mode(&scene->r, camera_override ? camera_override : scene->camera);
|
|
||||||
|
|
||||||
/* forbidden combinations */
|
|
||||||
if (scene->r.mode & R_PANORAMA) {
|
|
||||||
if (scene->r.mode & R_ORTHO) {
|
|
||||||
BKE_report(reports, RPT_ERROR, "No ortho render possible for panorama");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef WITH_FREESTYLE
|
|
||||||
if (scene->r.mode & R_EDGE_FRS) {
|
|
||||||
BKE_report(reports, RPT_ERROR, "Panoramic camera not supported in Freestyle");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (RE_seq_render_active(scene, &scene->r)) {
|
if (RE_seq_render_active(scene, &scene->r)) {
|
||||||
if (scene->r.mode & R_BORDER) {
|
if (scene->r.mode & R_BORDER) {
|
||||||
BKE_report(reports, RPT_ERROR, "Border rendering is not supported by sequencer");
|
BKE_report(reports, RPT_ERROR, "Border rendering is not supported by sequencer");
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 87f7038ee8c4b46a5e73a1a9065e2a9b7367f594
|
Subproject commit 11656ebaf7f912cdb1b5eb39c5d0a3b5d492c1aa
|
Loading…
Reference in New Issue