DNA: rename camera YF_dofdist -> dof_distance

This commit is contained in:
Campbell Barton 2019-02-16 09:40:19 +11:00
parent a2f345468c
commit 51c034686a
Notes: blender-bot 2023-02-14 07:17:43 +01:00
Referenced by issue #61500, DNA renaming proposal
7 changed files with 9 additions and 12 deletions

View File

@ -133,7 +133,7 @@ float BKE_camera_object_dof_distance(Object *ob)
sub_v3_v3v3(dof_dir, ob->obmat[3], cam->dof_ob->obmat[3]);
return fabsf(dot_v3v3(view_dir, dof_dir));
}
return cam->YF_dofdist;
return cam->dof_distance;
}
float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y)

View File

@ -600,7 +600,7 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
case CAM_YF_APERT:
poin = &(ca->YF_aperture); break;
case CAM_YF_FDIST:
poin = &(ca->YF_dofdist); break;
poin = &(ca->dof_distance); break;
#endif // XXX these are not defined in RNA
case CAM_SHIFT_X:

View File

@ -93,7 +93,7 @@ bool CamerasExporter::exportBlenderProfile(COLLADASW::Camera &cm,Camera *cam)
{
cm.addExtraTechniqueParameter("blender","shiftx",cam->shiftx);
cm.addExtraTechniqueParameter("blender","shifty",cam->shifty);
cm.addExtraTechniqueParameter("blender","YF_dofdist",cam->YF_dofdist);
cm.addExtraTechniqueParameter("blender","dof_distance",cam->dof_distance);
return true;
}

View File

@ -836,7 +836,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
if (et && et->isProfile("blender")) {
et->setData("shiftx",&(cam->shiftx));
et->setData("shifty",&(cam->shifty));
et->setData("YF_dofdist",&(cam->YF_dofdist));
et->setData("dof_distance",&(cam->dof_distance));
}
cam->clipsta = camera->getNearClippingPlane().getValue();
cam->clipend = camera->getFarClippingPlane().getValue();

View File

@ -90,11 +90,7 @@ typedef struct Camera {
float lens, ortho_scale, drawsize;
float sensor_x, sensor_y;
float shiftx, shifty;
/* yafray: dof params */
/* qdn: yafray var 'YF_dofdist' now enabled for defocus composite node as well.
* The name was not changed so that no other files need to be modified */
float YF_dofdist;
float dof_distance;
/** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;

View File

@ -38,10 +38,12 @@
/* No include guard (intentional). */
/* Match RNA names where possible. */
/* Match RNA names where possible, keep sorted. */
DNA_STRUCT_RENAME_ELEM(Camera, YF_dofdist, dof_distance)
#if 0
DNA_STRUCT_RENAME(Lamp, Light)
DNA_STRUCT_RENAME(SpaceOops, SpaceOutliner)
DNA_STRUCT_RENAME_ELEM(Camera, YF_dofdist, dof_distance)
DNA_STRUCT_RENAME_ELEM(Object, dup_group, instance_collection)
#endif

View File

@ -517,7 +517,6 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
prop = RNA_def_property(srna, "dof_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "YF_dofdist");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 5000.0f, 1, 2);
RNA_def_property_ui_text(prop, "DOF Distance", "Distance to the focus point for depth of field");