Cleanup: unused includes in source/blender/io/usd

Reduce dependence on Blender headers as much as possible and move closer
to an include-what-you-use setup.

- Removes unnecessary includes
- Replaces some includes with more appropriate, narrower, substitutes

Pull Request: https://projects.blender.org/blender/blender/pulls/122619
This commit is contained in:
Jesse Yurkovich
2024-06-02 04:46:02 +02:00
committed by Jesse Yurkovich
parent dbc842b21e
commit 55a7e62f8a
7 changed files with 7 additions and 22 deletions

View File

@@ -10,15 +10,12 @@
# include "DNA_modifier_types.h"
# include "DNA_space_types.h"
# include <cstring>
# include "BKE_context.hh"
# include "BKE_file_handler.hh"
# include "BKE_report.hh"
# include "BLI_path_util.h"
# include "BLI_string.h"
# include "BLI_utildefines.h"
# include "BLT_translation.hh"
@@ -44,7 +41,8 @@
# include "io_utils.hh"
# include "usd.hh"
# include <cstdio>
# include <string>
# include <utility>
using namespace blender::io::usd;
@@ -158,7 +156,6 @@ const EnumPropertyItem prop_usdz_downscale_size[] = {
/* Stored in the wmOperator's customdata field to indicate it should run as a background job.
* This is set when the operator is invoked, and not set when it is only executed. */
enum { AS_BACKGROUND_JOB = 1 };
struct eUSDOperatorOptions {
bool as_background_job;
};

View File

@@ -2,19 +2,8 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BKE_mesh.hh"
#include "BKE_report.hh"
#include "DNA_customdata_types.h"
#include "usd.hh"
#include <pxr/base/vt/array.h>
#include <pxr/usd/sdf/valueTypeName.h>
#include <pxr/usd/usdGeom/primvar.h>
#include <optional>
struct Mesh;
struct ReportList;

View File

@@ -9,10 +9,8 @@
#include "BKE_object.hh"
#include "BKE_pointcloud.hh"
#include "BLI_color.hh"
#include "BLI_span.hh"
#include "DNA_cachefile_types.h"
#include "DNA_object_types.h"
#include "DNA_pointcloud_types.h"

View File

@@ -16,7 +16,6 @@
#include <pxr/usd/sdf/path.h>
#include <pxr/usd/usd/prim.h>
#include <optional>
#include <string>
struct CacheFile;

View File

@@ -4,6 +4,8 @@
#include "usd_reader_utils.hh"
#include "BKE_idprop.hh"
#include <pxr/usd/usd/attribute.h>
#include "CLG_log.h"

View File

@@ -6,8 +6,9 @@
#include "usd.hh"
#include <pxr/usd/usd/prim.h>
#include <pxr/usd/usd/timeCode.h>
#include "BKE_idprop.hh"
struct ID;
namespace blender::io::usd {

View File

@@ -19,6 +19,7 @@
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_key_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_action.h"
@@ -26,7 +27,6 @@
#include "BKE_deform.hh"
#include "BKE_fcurve.hh"
#include "BKE_key.hh"
#include "BKE_mesh.hh"
#include "BKE_modifier.hh"
#include "BKE_object_deform.h"
#include "BKE_report.hh"
@@ -39,7 +39,6 @@
#include "BLI_vector.hh"
#include "ED_armature.hh"
#include "ED_mesh.hh"
#include "ED_object_vgroup.hh"
#include "ANIM_animdata.hh"