fix for minor glitch when setting the camera in local view (camera could try to smooth view into its self).
This commit is contained in:
@@ -472,7 +472,7 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
|
||||
if(ob) {
|
||||
Object *camera_old= (rv3d->persp == RV3D_CAMOB && scene->camera) ? scene->camera : NULL;
|
||||
Object *camera_old= (rv3d->persp == RV3D_CAMOB) ? V3D_CAMERA_SCENE(scene, v3d) : NULL;
|
||||
rv3d->persp= RV3D_CAMOB;
|
||||
v3d->camera= ob;
|
||||
if(v3d->scenelock)
|
||||
|
||||
@@ -1053,6 +1053,9 @@ typedef struct Scene {
|
||||
#define BASACT (scene->basact)
|
||||
#define OBACT (BASACT? BASACT->object: NULL)
|
||||
|
||||
#define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL)
|
||||
#define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera)
|
||||
|
||||
#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
|
||||
#define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
|
||||
#define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
|
||||
|
||||
Reference in New Issue
Block a user