mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cleanup: Fix various incomplete headers and wrong namespace placement
Make sure headers include all the required headers and prototypes so they can be safely included, and users of clangd don't see errors in their IDE. Also fix forward declarations and pragmas that were in the wrong place. Pull Request: https://projects.blender.org/blender/blender/pulls/154976
This commit is contained in:
parent
934346f935
commit
79ee6b5f9f
15 changed files with 54 additions and 29 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "GHOST_Types.hh"
|
||||
|
||||
class GHOST_XrSession;
|
||||
class GHOST_XrSessionBeginInfo;
|
||||
|
||||
class GHOST_IXrContext {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "ANIM_evaluation.hh"
|
||||
struct Action;
|
||||
struct Layer;
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct Action;
|
||||
struct Layer;
|
||||
struct AnimationEvalContext;
|
||||
struct PointerRNA;
|
||||
|
||||
namespace animrig::internal {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct Mesh;
|
||||
|
||||
#include "BLI_virtual_array_fwd.hh"
|
||||
|
||||
#include "BKE_attribute_filter.hh"
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct Mesh;
|
||||
|
||||
namespace bke {
|
||||
|
||||
class CurvesGeometry;
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ int knots_num(int points_num, int8_t order, bool cyclic);
|
|||
* Calculate the total number of control points for a NURBS curve including virtual/repeated points
|
||||
* for a cyclic/closed curve.
|
||||
*/
|
||||
int control_points_num(int num_control_points, int8_t order, bool cyclic);
|
||||
int control_points_num(int points_num, int8_t order, bool cyclic);
|
||||
|
||||
/**
|
||||
* Depending on KnotsMode calculates knots or copies custom knots into given `MutableSpan`.
|
||||
|
|
|
|||
|
|
@ -21,11 +21,10 @@
|
|||
#include "BKE_image_wrappers.hh"
|
||||
|
||||
#include "DNA_image_types.h"
|
||||
struct PartialUpdateUser;
|
||||
|
||||
namespace blender {
|
||||
|
||||
extern "C" {
|
||||
}
|
||||
struct PartialUpdateUser;
|
||||
|
||||
namespace bke::image::partial_update {
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
#include "DNA_windowmanager_enums.h"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
|
||||
|
|
@ -30,22 +31,24 @@ namespace blender {
|
|||
|
||||
struct ARegion;
|
||||
struct ARegionType;
|
||||
struct ColorManagedViewSettings;
|
||||
struct bContext;
|
||||
struct ColorManagedDisplaySettings;
|
||||
struct ColorManagedViewSettings;
|
||||
struct Editing;
|
||||
struct MenuType;
|
||||
struct rctf;
|
||||
struct Scene;
|
||||
struct ScrArea;
|
||||
struct SeqRetimingKey;
|
||||
struct SeqTimelineChannel;
|
||||
struct Strip;
|
||||
struct SpaceSeq;
|
||||
struct Strip;
|
||||
struct StripElem;
|
||||
struct View2D;
|
||||
struct bContext;
|
||||
struct rctf;
|
||||
struct wmEvent;
|
||||
struct wmKeyConfig;
|
||||
struct wmOperator;
|
||||
struct wmOperatorType;
|
||||
struct ScrArea;
|
||||
struct Editing;
|
||||
|
||||
namespace ed::asset {
|
||||
struct AssetItemTree;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,19 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/** \file
|
||||
* \ingroup bgrease_pencil
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_bounds_types.hh"
|
||||
#include "BLI_color_types.hh"
|
||||
#include "BLI_function_ref.hh"
|
||||
#include "BLI_math_matrix_types.hh"
|
||||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_vector.hh"
|
||||
#include "BLI_virtual_array.hh"
|
||||
|
||||
#include "grease_pencil_io.hh"
|
||||
|
||||
|
|
@ -16,16 +23,12 @@
|
|||
|
||||
namespace blender {
|
||||
|
||||
#pragma once
|
||||
|
||||
/** \file
|
||||
* \ingroup bgrease_pencil
|
||||
*/
|
||||
|
||||
struct Scene;
|
||||
struct Object;
|
||||
struct Material;
|
||||
struct RegionView3D;
|
||||
struct GreasePencil;
|
||||
|
||||
namespace bke::greasepencil {
|
||||
class Layer;
|
||||
class Drawing;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ namespace io::hydra {
|
|||
|
||||
extern CLG_LogRef *LOG_HYDRA_SCENE;
|
||||
|
||||
class Engine;
|
||||
class CameraDelegate;
|
||||
|
||||
class HydraSceneDelegate : public pxr::HdSceneDelegate {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,17 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_math_vector_types.hh"
|
||||
#include "BLI_math_matrix_types.hh"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct Curve;
|
||||
struct Nurb;
|
||||
struct OBJExportParams;
|
||||
struct Object;
|
||||
struct Depsgraph;
|
||||
|
||||
namespace bke {
|
||||
class CurvesGeometry;
|
||||
|
|
@ -96,7 +100,7 @@ class OBJCurves : public IOBJCurve, NonCopyable {
|
|||
|
||||
public:
|
||||
OBJCurves(const bke::CurvesGeometry &curve, const float4x4 &transform, const std::string &name);
|
||||
virtual ~OBJCurves() override = default;
|
||||
~OBJCurves() override = default;
|
||||
|
||||
const float4x4 &object_transform() const override;
|
||||
|
||||
|
|
@ -123,7 +127,7 @@ class OBJLegacyCurve : public IOBJCurve, NonCopyable {
|
|||
|
||||
public:
|
||||
OBJLegacyCurve(const Depsgraph *depsgraph, Object *curve_object);
|
||||
virtual ~OBJLegacyCurve() override = default;
|
||||
~OBJLegacyCurve() override = default;
|
||||
|
||||
const float4x4 &object_transform() const override;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@
|
|||
namespace blender {
|
||||
|
||||
struct OBJImportParams;
|
||||
namespace bke {
|
||||
struct CurvesGeometry;
|
||||
};
|
||||
|
||||
namespace io::obj {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@
|
|||
* \ingroup sequencer
|
||||
*/
|
||||
|
||||
#include "DNA_object_enums.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
#include "DNA_view3d_enums.h"
|
||||
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct Depsgraph;
|
||||
|
|
@ -18,9 +24,6 @@ struct Object;
|
|||
struct Scene;
|
||||
struct View3DShading;
|
||||
|
||||
enum eDrawType;
|
||||
enum eV3DOffscreenDrawFlag;
|
||||
|
||||
namespace seq {
|
||||
using DrawViewFn = ImBuf *(*)(Depsgraph *,
|
||||
Scene *,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
#include "BLI_math_vector.hh"
|
||||
#include "BLI_task.hh"
|
||||
|
||||
#include "DNA_sequence_types.h"
|
||||
|
||||
#include "IMB_imbuf.hh"
|
||||
|
||||
namespace blender {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
#include "BLI_math_vector_types.hh"
|
||||
|
||||
#include "DNA_windowmanager_enums.h"
|
||||
|
||||
#include "gizmo/wm_gizmo_wmapi.hh"
|
||||
|
||||
namespace blender {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
#include "GHOST_Types.hh"
|
||||
|
||||
struct GPUContext;
|
||||
class GHOST_IContext;
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct bContext;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "BLI_compiler_attrs.h"
|
||||
|
||||
#include "DNA_windowmanager_enums.h"
|
||||
|
||||
namespace blender {
|
||||
|
||||
struct bContext;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue