diff options
Diffstat (limited to 'source/blender/blenkernel/intern/camera.c')
-rw-r--r-- | source/blender/blenkernel/intern/camera.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c index 71a2b6f703a..7c60698e824 100644 --- a/source/blender/blenkernel/intern/camera.c +++ b/source/blender/blenkernel/intern/camera.c @@ -63,17 +63,6 @@ static void camera_init_data(ID *id) MEMCPY_STRUCT_AFTER(cam, DNA_struct_default_get(Camera), id); } -void *BKE_camera_add(Main *bmain, const char *name) -{ - Camera *cam; - - cam = BKE_libblock_alloc(bmain, ID_CA, name, 0); - - camera_init_data(&cam->id); - - return cam; -} - /** * Only copy internal data of Camera ID from source * to already allocated/initialized destination. @@ -94,13 +83,6 @@ static void camera_copy_data(Main *UNUSED(bmain), BLI_duplicatelist(&cam_dst->bg_images, &cam_src->bg_images); } -Camera *BKE_camera_copy(Main *bmain, const Camera *cam) -{ - Camera *cam_copy; - BKE_id_copy(bmain, &cam->id, (ID **)&cam_copy); - return cam_copy; -} - static void camera_make_local(Main *bmain, ID *id, const int flags) { BKE_lib_id_make_local_generic(bmain, id, flags); @@ -131,6 +113,24 @@ IDTypeInfo IDType_ID_CA = { /******************************** Camera Usage *******************************/ +void *BKE_camera_add(Main *bmain, const char *name) +{ + Camera *cam; + + cam = BKE_libblock_alloc(bmain, ID_CA, name, 0); + + camera_init_data(&cam->id); + + return cam; +} + +Camera *BKE_camera_copy(Main *bmain, const Camera *cam) +{ + Camera *cam_copy; + BKE_id_copy(bmain, &cam->id, (ID **)&cam_copy); + return cam_copy; +} + /* get the camera's dof value, takes the dof object into account */ float BKE_camera_object_dof_distance(Object *ob) { |