Cleanup: Remove unnecessary struct and typedef keywords from C++ headers

This commit is contained in:
Hans Goudey
2023-11-14 09:51:41 +01:00
parent 7b51d32dd9
commit 0c1bb82fc4
26 changed files with 581 additions and 714 deletions

View File

@@ -15,9 +15,9 @@ namespace blender::bke {
struct GeometrySet;
}
struct ARegionType;
struct bArmature;
struct BMEditMesh;
struct BlendDataReader;
struct BlendLibReader;
struct BlendWriter;
struct CustomData_MeshMasks;
struct DepsNodeHandle;
@@ -29,9 +29,9 @@ struct Mesh;
struct ModifierData;
struct Object;
struct Scene;
struct bArmature;
struct StructRNA;
typedef enum {
enum ModifierTypeType {
/* Should not be used, only for None modifier type */
eModifierTypeType_None,
@@ -60,9 +60,9 @@ typedef enum {
* of the object, rather some of its CustomData layers.
* E.g. UVProject and WeightVG modifiers. */
eModifierTypeType_NonGeometrical,
} ModifierTypeType;
};
typedef enum {
enum ModifierTypeFlag {
eModifierTypeFlag_AcceptsMesh = (1 << 0),
eModifierTypeFlag_AcceptsCVs = (1 << 1),
eModifierTypeFlag_SupportsMapping = (1 << 2),
@@ -104,16 +104,13 @@ typedef enum {
/** Accepts #GreasePencil data input. */
eModifierTypeFlag_AcceptsGreasePencil = (1 << 12),
} ModifierTypeFlag;
};
ENUM_OPERATORS(ModifierTypeFlag, eModifierTypeFlag_AcceptsBMesh)
typedef void (*IDWalkFunc)(void *user_data, struct Object *ob, struct ID **idpoin, int cb_flag);
typedef void (*TexWalkFunc)(void *user_data,
struct Object *ob,
struct ModifierData *md,
const char *propname);
using IDWalkFunc = void (*)(void *user_data, Object *ob, ID **idpoin, int cb_flag);
using TexWalkFunc = void (*)(void *user_data, Object *ob, ModifierData *md, const char *propname);
typedef enum ModifierApplyFlag {
enum ModifierApplyFlag {
/** Render time. */
MOD_APPLY_RENDER = 1 << 0,
/** Result of evaluation will be cached, so modifier might
@@ -129,24 +126,24 @@ typedef enum ModifierApplyFlag {
* This flag can be checked to ignore rendering display data to the mesh.
* See `OBJECT_OT_modifier_apply` operator. */
MOD_APPLY_TO_BASE_MESH = 1 << 4,
} ModifierApplyFlag;
};
ENUM_OPERATORS(ModifierApplyFlag, MOD_APPLY_TO_BASE_MESH);
typedef struct ModifierUpdateDepsgraphContext {
struct Scene *scene;
struct Object *object;
struct DepsNodeHandle *node;
} ModifierUpdateDepsgraphContext;
struct ModifierUpdateDepsgraphContext {
Scene *scene;
Object *object;
DepsNodeHandle *node;
};
/* Contains the information for deformXXX and applyXXX functions below that
* doesn't change between consecutive modifiers. */
typedef struct ModifierEvalContext {
struct Depsgraph *depsgraph;
struct Object *object;
struct ModifierEvalContext {
Depsgraph *depsgraph;
Object *object;
ModifierApplyFlag flag;
} ModifierEvalContext;
};
typedef struct ModifierTypeInfo {
struct ModifierTypeInfo {
/* A unique identifier for this modifier. Used to generate the panel id type name.
* See #BKE_modifier_type_panel_id. */
char idname[32];
@@ -163,7 +160,7 @@ typedef struct ModifierTypeInfo {
int struct_size;
/* StructRNA of this modifier. This is typically something like RNA_*Modifier. */
struct StructRNA *srna;
StructRNA *srna;
ModifierTypeType type;
ModifierTypeFlag flags;
@@ -179,7 +176,7 @@ typedef struct ModifierTypeInfo {
*
* \param flag: Copying options (see BKE_lib_id.h's LIB_ID_COPY_... flags for more).
*/
void (*copy_data)(const struct ModifierData *md, struct ModifierData *target, int flag);
void (*copy_data)(const ModifierData *md, ModifierData *target, int flag);
/********************* Deform modifier functions *********************/
@@ -188,18 +185,18 @@ typedef struct ModifierTypeInfo {
* non-null, if will contain proper (not wrapped) mesh data. The \a vertexCos array may or may
* not be the same as the mesh's position attribute.
*/
void (*deform_verts)(struct ModifierData *md,
const struct ModifierEvalContext *ctx,
struct Mesh *mesh,
void (*deform_verts)(ModifierData *md,
const ModifierEvalContext *ctx,
Mesh *mesh,
float (*vertexCos)[3],
int numVerts);
/**
* Like deform_matrices_EM but called from object mode (for supporting modifiers in sculpt mode).
*/
void (*deform_matrices)(struct ModifierData *md,
const struct ModifierEvalContext *ctx,
struct Mesh *mesh,
void (*deform_matrices)(ModifierData *md,
const ModifierEvalContext *ctx,
Mesh *mesh,
float (*vertexCos)[3],
float (*defMats)[3][3],
int numVerts);
@@ -207,18 +204,18 @@ typedef struct ModifierTypeInfo {
* Like deform_verts but called during edit-mode if supported. The \a mesh argument might be a
* wrapper around edit BMesh data.
*/
void (*deform_verts_EM)(struct ModifierData *md,
const struct ModifierEvalContext *ctx,
struct BMEditMesh *em,
struct Mesh *mesh,
void (*deform_verts_EM)(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
Mesh *mesh,
float (*vertexCos)[3],
int numVerts);
/* Set deform matrix per vertex for crazy-space correction */
void (*deform_matrices_EM)(struct ModifierData *md,
const struct ModifierEvalContext *ctx,
struct BMEditMesh *em,
struct Mesh *mesh,
void (*deform_matrices_EM)(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
Mesh *mesh,
float (*vertexCos)[3],
float (*defMats)[3][3],
int numVerts);
@@ -236,17 +233,15 @@ typedef struct ModifierTypeInfo {
* and must ensure any referenced data layers are converted to non-referenced
* before modification.
*/
struct Mesh *(*modify_mesh)(struct ModifierData *md,
const struct ModifierEvalContext *ctx,
struct Mesh *mesh);
Mesh *(*modify_mesh)(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh);
/**
* The modifier has to change the geometry set in-place. The geometry set can contain zero or
* more geometry components. This callback can be used by modifiers that don't work on any
* specific type of geometry (e.g. mesh).
*/
void (*modify_geometry_set)(struct ModifierData *md,
const struct ModifierEvalContext *ctx,
void (*modify_geometry_set)(ModifierData *md,
const ModifierEvalContext *ctx,
blender::bke::GeometrySet *geometry_set);
/********************* Optional functions *********************/
@@ -257,7 +252,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional.
*/
void (*init_data)(struct ModifierData *md);
void (*init_data)(ModifierData *md);
/**
* Should add to passed \a r_cddata_masks the data types that this
@@ -273,7 +268,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional.
*/
void (*required_data_mask)(struct ModifierData *md, struct CustomData_MeshMasks *r_cddata_masks);
void (*required_data_mask)(ModifierData *md, CustomData_MeshMasks *r_cddata_masks);
/**
* Free internal modifier data variables, this function should
@@ -283,7 +278,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional.
*/
void (*free_data)(struct ModifierData *md);
void (*free_data)(ModifierData *md);
/**
* Return a boolean value indicating if this modifier is able to be
@@ -294,14 +289,14 @@ typedef struct ModifierTypeInfo {
*
* This function is optional (assumes never disabled if not present).
*/
bool (*is_disabled)(const struct Scene *scene, struct ModifierData *md, bool use_render_params);
bool (*is_disabled)(const Scene *scene, ModifierData *md, bool use_render_params);
/**
* Add the appropriate relations to the dependency graph.
*
* This function is optional.
*/
void (*update_depsgraph)(struct ModifierData *md, const ModifierUpdateDepsgraphContext *ctx);
void (*update_depsgraph)(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx);
/**
* Should return true if the modifier needs to be recalculated on time
@@ -309,7 +304,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional (assumes false if not present).
*/
bool (*depends_on_time)(struct Scene *scene, struct ModifierData *md);
bool (*depends_on_time)(Scene *scene, ModifierData *md);
/**
* True when a deform modifier uses normals, the required_data_mask
@@ -319,7 +314,7 @@ typedef struct ModifierTypeInfo {
* this is needed because applying 2 deform modifiers will give the
* second modifier bogus normals.
*/
bool (*depends_on_normals)(struct ModifierData *md);
bool (*depends_on_normals)(ModifierData *md);
/**
* Should call the given walk function with a pointer to each ID
@@ -329,10 +324,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional.
*/
void (*foreach_ID_link)(struct ModifierData *md,
struct Object *ob,
IDWalkFunc walk,
void *user_data);
void (*foreach_ID_link)(ModifierData *md, Object *ob, IDWalkFunc walk, void *user_data);
/**
* Should call the given walk function for each texture that the
@@ -342,10 +334,7 @@ typedef struct ModifierTypeInfo {
* This function is optional. If it is not present, it will be
* assumed the modifier has no textures.
*/
void (*foreach_tex_link)(struct ModifierData *md,
struct Object *ob,
TexWalkFunc walk,
void *user_data);
void (*foreach_tex_link)(ModifierData *md, Object *ob, TexWalkFunc walk, void *user_data);
/**
* Free given run-time data.
@@ -361,7 +350,7 @@ typedef struct ModifierTypeInfo {
void (*free_runtime_data)(void *runtime_data);
/** Register the panel types for the modifier's UI. */
void (*panel_register)(struct ARegionType *region_type);
void (*panel_register)(ARegionType *region_type);
/**
* Is called when the modifier is written to a file. The modifier data struct itself is written
@@ -370,9 +359,7 @@ typedef struct ModifierTypeInfo {
* This method should write any additional arrays and referenced structs that should be
* stored in the file.
*/
void (*blend_write)(struct BlendWriter *writer,
const struct ID *id_owner,
const struct ModifierData *md);
void (*blend_write)(BlendWriter *writer, const ID *id_owner, const ModifierData *md);
/**
* Is called when the modifier is read from a file.
@@ -380,14 +367,14 @@ typedef struct ModifierTypeInfo {
* It can be used to update pointers to arrays and other structs. Furthermore, fields that have
* not been written (e.g. runtime data) can be reset.
*/
void (*blend_read)(struct BlendDataReader *reader, struct ModifierData *md);
} ModifierTypeInfo;
void (*blend_read)(BlendDataReader *reader, ModifierData *md);
};
/* Used to set a modifier's panel type. */
#define MODIFIER_TYPE_PANEL_PREFIX "MOD_PT_"
/* Initialize modifier's global data (type info and some common global storage). */
void BKE_modifier_init(void);
void BKE_modifier_init();
const ModifierTypeInfo *BKE_modifier_get_info(ModifierType type);
@@ -397,42 +384,38 @@ const ModifierTypeInfo *BKE_modifier_get_info(ModifierType type);
* Get the idname of the modifier type's panel, which was defined in the #panel_register callback.
*/
void BKE_modifier_type_panel_id(ModifierType type, char *r_idname);
void BKE_modifier_panel_expand(struct ModifierData *md);
void BKE_modifier_panel_expand(ModifierData *md);
/* Modifier utility calls, do call through type pointer and return
* default values if pointer is optional.
*/
struct ModifierData *BKE_modifier_new(int type);
ModifierData *BKE_modifier_new(int type);
void BKE_modifier_free_ex(struct ModifierData *md, int flag);
void BKE_modifier_free(struct ModifierData *md);
void BKE_modifier_free_ex(ModifierData *md, int flag);
void BKE_modifier_free(ModifierData *md);
/**
* Use instead of `BLI_remlink` when the object's active modifier should change.
*/
void BKE_modifier_remove_from_list(struct Object *ob, struct ModifierData *md);
void BKE_modifier_remove_from_list(Object *ob, ModifierData *md);
/* Generate new UUID for the given modifier. */
void BKE_modifier_session_uuid_generate(struct ModifierData *md);
void BKE_modifier_session_uuid_generate(ModifierData *md);
void BKE_modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
void BKE_modifier_unique_name(ListBase *modifiers, ModifierData *md);
struct ModifierData *BKE_modifier_copy_ex(const struct ModifierData *md, int flag);
ModifierData *BKE_modifier_copy_ex(const ModifierData *md, int flag);
/**
* Callback's can use this to avoid copying every member.
*/
void BKE_modifier_copydata_generic(const struct ModifierData *md,
struct ModifierData *md_dst,
int flag);
void BKE_modifier_copydata(const struct ModifierData *md, struct ModifierData *target);
void BKE_modifier_copydata_ex(const struct ModifierData *md,
struct ModifierData *target,
int flag);
bool BKE_modifier_depends_ontime(struct Scene *scene, struct ModifierData *md);
bool BKE_modifier_supports_mapping(struct ModifierData *md);
bool BKE_modifier_supports_cage(struct Scene *scene, struct ModifierData *md);
bool BKE_modifier_couldbe_cage(struct Scene *scene, struct ModifierData *md);
bool BKE_modifier_is_correctable_deformed(struct ModifierData *md);
void BKE_modifier_copydata_generic(const ModifierData *md, ModifierData *md_dst, int flag);
void BKE_modifier_copydata(const ModifierData *md, ModifierData *target);
void BKE_modifier_copydata_ex(const ModifierData *md, ModifierData *target, int flag);
bool BKE_modifier_depends_ontime(Scene *scene, ModifierData *md);
bool BKE_modifier_supports_mapping(ModifierData *md);
bool BKE_modifier_supports_cage(Scene *scene, ModifierData *md);
bool BKE_modifier_couldbe_cage(Scene *scene, ModifierData *md);
bool BKE_modifier_is_correctable_deformed(ModifierData *md);
bool BKE_modifier_is_same_topology(ModifierData *md);
bool BKE_modifier_is_non_geometrical(ModifierData *md);
/**
@@ -441,84 +424,76 @@ bool BKE_modifier_is_non_geometrical(ModifierData *md);
* \param scene: Current scene, may be NULL,
* in which case `is_disabled` callback of the modifier is never called.
*/
bool BKE_modifier_is_enabled(const struct Scene *scene,
struct ModifierData *md,
int required_mode);
bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode);
/**
* Check whether given modifier is not local (i.e. from linked data) when the object is a library
* override.
*
* \param md: May be NULL, in which case we consider it as a non-local modifier case.
*/
bool BKE_modifier_is_nonlocal_in_liboverride(const struct Object *ob,
const struct ModifierData *md);
bool BKE_modifier_is_nonlocal_in_liboverride(const Object *ob, const ModifierData *md);
/* Set modifier execution error.
* The message will be shown in the interface and will be logged as an error to the console. */
void BKE_modifier_set_error(const struct Object *ob,
struct ModifierData *md,
const char *format,
...) ATTR_PRINTF_FORMAT(3, 4);
void BKE_modifier_set_error(const Object *ob, ModifierData *md, const char *format, ...)
ATTR_PRINTF_FORMAT(3, 4);
/* Set modifier execution warning, which does not prevent the modifier from being applied but which
* might need an attention. The message will only be shown in the interface, but will not appear in
* the logs. */
void BKE_modifier_set_warning(const struct Object *ob,
struct ModifierData *md,
const char *format,
...) ATTR_PRINTF_FORMAT(3, 4);
void BKE_modifier_set_warning(const Object *ob, ModifierData *md, const char *format, ...)
ATTR_PRINTF_FORMAT(3, 4);
bool BKE_modifier_is_preview(struct ModifierData *md);
bool BKE_modifier_is_preview(ModifierData *md);
void BKE_modifiers_foreach_ID_link(struct Object *ob, IDWalkFunc walk, void *user_data);
void BKE_modifiers_foreach_tex_link(struct Object *ob, TexWalkFunc walk, void *user_data);
void BKE_modifiers_foreach_ID_link(Object *ob, IDWalkFunc walk, void *user_data);
void BKE_modifiers_foreach_tex_link(Object *ob, TexWalkFunc walk, void *user_data);
struct ModifierData *BKE_modifiers_findby_type(const struct Object *ob, ModifierType type);
struct ModifierData *BKE_modifiers_findby_name(const struct Object *ob, const char *name);
struct ModifierData *BKE_modifiers_findby_session_uuid(const struct Object *ob,
const SessionUUID *session_uuid);
void BKE_modifiers_clear_errors(struct Object *ob);
ModifierData *BKE_modifiers_findby_type(const Object *ob, ModifierType type);
ModifierData *BKE_modifiers_findby_name(const Object *ob, const char *name);
ModifierData *BKE_modifiers_findby_session_uuid(const Object *ob, const SessionUUID *session_uuid);
void BKE_modifiers_clear_errors(Object *ob);
/**
* used for buttons, to find out if the 'draw deformed in edit-mode option is there.
*
* Also used in transform_conversion.c, to detect crazy-space (2nd arg then is NULL).
* Also used for some mesh tools to give warnings.
*/
int BKE_modifiers_get_cage_index(const struct Scene *scene,
struct Object *ob,
int BKE_modifiers_get_cage_index(const Scene *scene,
Object *ob,
int *r_lastPossibleCageIndex,
bool is_virtual);
bool BKE_modifiers_is_modifier_enabled(struct Object *ob, int modifierType);
bool BKE_modifiers_is_softbody_enabled(struct Object *ob);
bool BKE_modifiers_is_cloth_enabled(struct Object *ob);
bool BKE_modifiers_is_particle_enabled(struct Object *ob);
bool BKE_modifiers_is_modifier_enabled(Object *ob, int modifierType);
bool BKE_modifiers_is_softbody_enabled(Object *ob);
bool BKE_modifiers_is_cloth_enabled(Object *ob);
bool BKE_modifiers_is_particle_enabled(Object *ob);
/**
* Takes an object and returns its first selected armature, else just its armature.
* This should work for multiple armatures per object.
*/
struct Object *BKE_modifiers_is_deformed_by_armature(struct Object *ob);
struct Object *BKE_modifiers_is_deformed_by_meshdeform(struct Object *ob);
Object *BKE_modifiers_is_deformed_by_armature(Object *ob);
Object *BKE_modifiers_is_deformed_by_meshdeform(Object *ob);
/**
* Takes an object and returns its first selected lattice, else just its lattice.
* This should work for multiple lattices per object.
*/
struct Object *BKE_modifiers_is_deformed_by_lattice(struct Object *ob);
Object *BKE_modifiers_is_deformed_by_lattice(Object *ob);
/**
* Takes an object and returns its first selected curve, else just its curve.
* This should work for multiple curves per object.
*/
struct Object *BKE_modifiers_is_deformed_by_curve(struct Object *ob);
bool BKE_modifiers_uses_multires(struct Object *ob);
bool BKE_modifiers_uses_armature(struct Object *ob, struct bArmature *arm);
bool BKE_modifiers_is_correctable_deformed(const struct Scene *scene, struct Object *ob);
void BKE_modifier_free_temporary_data(struct ModifierData *md);
Object *BKE_modifiers_is_deformed_by_curve(Object *ob);
bool BKE_modifiers_uses_multires(Object *ob);
bool BKE_modifiers_uses_armature(Object *ob, bArmature *arm);
bool BKE_modifiers_is_correctable_deformed(const Scene *scene, Object *ob);
void BKE_modifier_free_temporary_data(ModifierData *md);
typedef struct CDMaskLink {
struct CDMaskLink *next;
struct CustomData_MeshMasks mask;
} CDMaskLink;
struct CDMaskLink {
CDMaskLink *next;
CustomData_MeshMasks mask;
};
/**
* Calculates and returns a linked list of CustomData_MeshMasks and modified
@@ -526,46 +501,45 @@ typedef struct CDMaskLink {
* pointed to by md for correct evaluation, assuming the data indicated by
* final_datamask is required at the end of the stack.
*/
struct CDMaskLink *BKE_modifier_calc_data_masks(const struct Scene *scene,
struct ModifierData *md,
struct CustomData_MeshMasks *final_datamask,
int required_mode,
ModifierData *previewmd,
const struct CustomData_MeshMasks *previewmask);
struct ModifierData *BKE_modifier_get_last_preview(const struct Scene *scene,
struct ModifierData *md,
int required_mode);
CDMaskLink *BKE_modifier_calc_data_masks(const Scene *scene,
ModifierData *md,
CustomData_MeshMasks *final_datamask,
int required_mode,
ModifierData *previewmd,
const CustomData_MeshMasks *previewmask);
ModifierData *BKE_modifier_get_last_preview(const Scene *scene,
ModifierData *md,
int required_mode);
typedef struct VirtualModifierData {
struct VirtualModifierData {
ArmatureModifierData amd;
CurveModifierData cmd;
LatticeModifierData lmd;
ShapeKeyModifierData smd;
} VirtualModifierData;
};
/**
* This is to include things that are not modifiers in the evaluation of the modifier stack,
* for example parenting to an armature.
*/
struct ModifierData *BKE_modifiers_get_virtual_modifierlist(const struct Object *ob,
struct VirtualModifierData *data);
ModifierData *BKE_modifiers_get_virtual_modifierlist(const Object *ob, VirtualModifierData *data);
/**
* Ensure modifier correctness when changing `ob->data`.
*/
void BKE_modifiers_test_object(struct Object *ob);
void BKE_modifiers_test_object(Object *ob);
/**
* Here for #do_versions.
*/
void BKE_modifier_mdef_compact_influences(struct ModifierData *md);
void BKE_modifier_mdef_compact_influences(ModifierData *md);
/**
* Initializes `path` with either the blend file or temporary directory.
*/
void BKE_modifier_path_init(char *path, int path_maxncpy, const char *name);
const char *BKE_modifier_path_relbase(struct Main *bmain, struct Object *ob);
const char *BKE_modifier_path_relbase_from_global(struct Object *ob);
const char *BKE_modifier_path_relbase(Main *bmain, Object *ob);
const char *BKE_modifier_path_relbase_from_global(Object *ob);
/* Accessors of original/evaluated modifiers. */
@@ -573,28 +547,23 @@ const char *BKE_modifier_path_relbase_from_global(struct Object *ob);
* For a given modifier data, get corresponding original one.
* If the modifier data is already original, return it as-is.
*/
struct ModifierData *BKE_modifier_get_original(const struct Object *object,
struct ModifierData *md);
struct ModifierData *BKE_modifier_get_evaluated(struct Depsgraph *depsgraph,
struct Object *object,
struct ModifierData *md);
ModifierData *BKE_modifier_get_original(const Object *object, ModifierData *md);
ModifierData *BKE_modifier_get_evaluated(Depsgraph *depsgraph, Object *object, ModifierData *md);
/* wrappers for modifier callbacks that ensure valid normals */
struct Mesh *BKE_modifier_modify_mesh(ModifierData *md,
const struct ModifierEvalContext *ctx,
struct Mesh *me);
Mesh *BKE_modifier_modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *me);
void BKE_modifier_deform_verts(ModifierData *md,
const struct ModifierEvalContext *ctx,
struct Mesh *me,
const ModifierEvalContext *ctx,
Mesh *me,
float (*vertexCos)[3],
int numVerts);
void BKE_modifier_deform_vertsEM(ModifierData *md,
const struct ModifierEvalContext *ctx,
struct BMEditMesh *em,
struct Mesh *me,
const ModifierEvalContext *ctx,
BMEditMesh *em,
Mesh *me,
float (*vertexCos)[3],
int numVerts);
@@ -604,16 +573,12 @@ void BKE_modifier_deform_vertsEM(ModifierData *md,
* Note that modifiers in stack always get fully evaluated COW ID pointers,
* never original ones. Makes things simpler.
*/
struct Mesh *BKE_modifier_get_evaluated_mesh_from_evaluated_object(struct Object *ob_eval);
Mesh *BKE_modifier_get_evaluated_mesh_from_evaluated_object(Object *ob_eval);
void BKE_modifier_check_uuids_unique_and_report(const struct Object *object);
void BKE_modifier_check_uuids_unique_and_report(const Object *object);
void BKE_modifier_blend_write(struct BlendWriter *writer,
const struct ID *id_owner,
struct ListBase *modbase);
void BKE_modifier_blend_read_data(struct BlendDataReader *reader,
struct ListBase *lb,
struct Object *ob);
void BKE_modifier_blend_write(BlendWriter *writer, const ID *id_owner, ListBase *modbase);
void BKE_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb, Object *ob);
namespace blender::bke {

View File

@@ -340,7 +340,7 @@ enum {
PANEL_TYPE_NO_SEARCH = (1 << 7),
};
typedef struct Panel_Runtime {
struct Panel_Runtime {
/* Applied to Panel.ofsx, but saved separately so we can track changes between redraws. */
int region_ofsx = 0;
@@ -359,7 +359,7 @@ typedef struct Panel_Runtime {
/* Non-owning pointer. The context is stored in the block. */
bContextStore *context = nullptr;
} Panel_Runtime;
};
/* #uiList types. */

View File

@@ -40,12 +40,9 @@ void ED_gizmotypes_snap_3d();
/* `gizmo_library_presets.cc` */
void ED_gizmo_draw_preset_box(const struct wmGizmo *gz, const float mat[4][4], int select_id);
void ED_gizmo_draw_preset_arrow(const struct wmGizmo *gz,
const float mat[4][4],
int axis,
int select_id);
void ED_gizmo_draw_preset_circle(const struct wmGizmo *gz,
void ED_gizmo_draw_preset_box(const wmGizmo *gz, const float mat[4][4], int select_id);
void ED_gizmo_draw_preset_arrow(const wmGizmo *gz, const float mat[4][4], int axis, int select_id);
void ED_gizmo_draw_preset_circle(const wmGizmo *gz,
const float mat[4][4],
int axis,
int select_id);
@@ -81,13 +78,13 @@ enum {
*
* \note Needs to be called before #WM_gizmo_target_property_def_rna!
*/
void ED_gizmo_arrow3d_set_ui_range(struct wmGizmo *gz, float min, float max);
void ED_gizmo_arrow3d_set_ui_range(wmGizmo *gz, float min, float max);
/**
* Define a custom factor for arrow min/max distance.
*
* \note Needs to be called before #WM_gizmo_target_property_def_rna!
*/
void ED_gizmo_arrow3d_set_range_fac(struct wmGizmo *gz, float range_fac);
void ED_gizmo_arrow3d_set_range_fac(wmGizmo *gz, float range_fac);
/* -------------------------------------------------------------------- */
/* Cage Gizmo */
@@ -238,15 +235,14 @@ enum {
/* `snap3d_gizmo.cc` */
struct SnapObjectContext *ED_gizmotypes_snap_3d_context_ensure(struct Scene *scene,
struct wmGizmo *gz);
SnapObjectContext *ED_gizmotypes_snap_3d_context_ensure(Scene *scene, wmGizmo *gz);
void ED_gizmotypes_snap_3d_flag_set(struct wmGizmo *gz, int flag);
void ED_gizmotypes_snap_3d_flag_set(wmGizmo *gz, int flag);
bool ED_gizmotypes_snap_3d_is_enabled(const struct wmGizmo *gz);
bool ED_gizmotypes_snap_3d_is_enabled(const wmGizmo *gz);
void ED_gizmotypes_snap_3d_data_get(const struct bContext *C,
struct wmGizmo *gz,
void ED_gizmotypes_snap_3d_data_get(const bContext *C,
wmGizmo *gz,
float r_loc[3],
float r_nor[3],
int r_elem_index[3],

View File

@@ -434,8 +434,8 @@ void clean_fcurve(bAnimContext *ac,
bool only_selected_keys);
void blend_to_neighbor_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor);
void breakdown_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor);
void scale_average_fcurve_segment(struct FCurve *fcu, struct FCurveSegment *segment, float factor);
void push_pull_fcurve_segment(struct FCurve *fcu, struct FCurveSegment *segment, float factor);
void scale_average_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor);
void push_pull_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor);
/**
* Get a 1D gauss kernel. Since the kernel is symmetrical, only calculates the positive side.
* \param sigma: The shape of the gauss distribution.
@@ -467,8 +467,8 @@ enum tShearDirection {
SHEAR_FROM_LEFT = 1,
SHEAR_FROM_RIGHT,
};
void shear_fcurve_segment(struct FCurve *fcu,
struct FCurveSegment *segment,
void shear_fcurve_segment(FCurve *fcu,
FCurveSegment *segment,
float factor,
tShearDirection direction);
/**

View File

@@ -56,14 +56,13 @@ struct SceneFPS_State {
* \param ltime: Time since the last update,
* compatible with the result of #PIL_check_seconds_timer.
*/
void ED_scene_fps_average_accumulate(struct Scene *scene, short fps_samples, double ltime)
void ED_scene_fps_average_accumulate(Scene *scene, short fps_samples, double ltime)
ATTR_NONNULL(1);
/**
* Calculate an average (if it's not already calculated).
* \return false on failure otherwise all values in `state` are initialized.
*/
bool ED_scene_fps_average_calc(const struct Scene *scene, SceneFPS_State *state)
ATTR_NONNULL(1, 2);
bool ED_scene_fps_average_calc(const Scene *scene, SceneFPS_State *state) ATTR_NONNULL(1, 2);
/**
* Clear run-time data for accumulating animation playback average times.
*/

View File

@@ -45,4 +45,4 @@ void ED_operatormacros_sequencer();
Sequence *ED_sequencer_special_preview_get();
void ED_sequencer_special_preview_set(bContext *C, const int mval[2]);
void ED_sequencer_special_preview_clear();
bool sequencer_retiming_mode_is_active(const struct bContext *C);
bool sequencer_retiming_mode_is_active(const bContext *C);

View File

@@ -215,4 +215,4 @@ bool ED_transform_snap_sequencer_to_closest_strip_calc(Scene *scene,
int *r_snap_distance,
float *r_snap_frame);
void ED_draw_sequencer_snap_point(struct ARegion *region, float snap_point);
void ED_draw_sequencer_snap_point(ARegion *region, float snap_point);

View File

@@ -1812,7 +1812,7 @@ void UI_but_func_tooltip_custom_set(uiBut *but,
* \param text: Allocated text (transfer ownership to `data`) or null.
* \param suffix: Allocated text (transfer ownership to `data`) or null.
*/
void UI_tooltip_text_field_add(struct uiTooltipData *data,
void UI_tooltip_text_field_add(uiTooltipData *data,
char *text,
char *suffix,
const uiTooltipStyle style,
@@ -1823,9 +1823,8 @@ void UI_tooltip_text_field_add(struct uiTooltipData *data,
* \param image: Image buffer (duplicated, ownership is *not* transferred to `data`).
* \param image_size: Display size for the image (pixels without UI scale applied).
*/
void UI_tooltip_image_field_add(struct uiTooltipData *data,
const struct ImBuf *image,
const short image_size[2]) ATTR_NONNULL(1, 2, 3);
void UI_tooltip_image_field_add(uiTooltipData *data, const ImBuf *image, const short image_size[2])
ATTR_NONNULL(1, 2, 3);
/**
* Recreate tool-tip (use to update dynamic tips)
@@ -2679,7 +2678,7 @@ void uiTemplateLightLinkingCollection(uiLayout *layout,
void uiTemplateGreasePencilLayerTree(uiLayout *layout, bContext *C);
#endif
void uiTemplateNodeTreeInterface(struct uiLayout *layout, struct PointerRNA *ptr);
void uiTemplateNodeTreeInterface(uiLayout *layout, PointerRNA *ptr);
/**
* \return: A RNA pointer for the operator properties.

View File

@@ -221,7 +221,7 @@ void file_path_to_ui_path(const char *path, char *r_pathi, int max_size);
/* asset_catalog_tree_view.cc */
/* C-handle for #ed::asset_browser::AssetCatalogFilterSettings. */
typedef struct FileAssetCatalogFilterSettingsHandle FileAssetCatalogFilterSettingsHandle;
struct FileAssetCatalogFilterSettingsHandle;
void file_create_asset_catalog_tree_view_in_layout(::AssetLibrary *asset_library,
uiLayout *layout,

View File

@@ -310,21 +310,17 @@ void SEQUENCER_OT_retiming_key_add(wmOperatorType *ot);
void SEQUENCER_OT_retiming_freeze_frame_add(wmOperatorType *ot);
void SEQUENCER_OT_retiming_transition_add(wmOperatorType *ot);
void SEQUENCER_OT_retiming_segment_speed_set(wmOperatorType *ot);
int sequencer_retiming_key_select_exec(struct bContext *C, struct wmOperator *op);
int sequencer_select_exec(struct bContext *C, struct wmOperator *op);
int sequencer_retiming_key_remove_exec(struct bContext *C, struct wmOperator *op);
int sequencer_retiming_select_all_exec(struct bContext *C, struct wmOperator *op);
int sequencer_retiming_box_select_exec(struct bContext *C, struct wmOperator *op);
int sequencer_retiming_key_select_exec(bContext *C, wmOperator *op);
int sequencer_select_exec(bContext *C, wmOperator *op);
int sequencer_retiming_key_remove_exec(bContext *C, wmOperator *op);
int sequencer_retiming_select_all_exec(bContext *C, wmOperator *op);
int sequencer_retiming_box_select_exec(bContext *C, wmOperator *op);
/* `sequencer_retiming_draw.cc` */
void sequencer_draw_retiming(const struct bContext *C);
blender::Vector<Sequence *> sequencer_visible_strips_get(const struct bContext *C);
struct SeqRetimingKey *try_to_realize_virtual_key(const struct bContext *C,
struct Sequence *seq,
const int mval[2]);
struct SeqRetimingKey *retiming_mousover_key_get(const struct bContext *C,
const int mval[2],
Sequence **r_seq);
void sequencer_draw_retiming(const bContext *C);
blender::Vector<Sequence *> sequencer_visible_strips_get(const bContext *C);
SeqRetimingKey *try_to_realize_virtual_key(const bContext *C, Sequence *seq, const int mval[2]);
SeqRetimingKey *retiming_mousover_key_get(const bContext *C, const int mval[2], Sequence **r_seq);
int left_fake_key_frame_get(const bContext *C, const Sequence *seq);
int right_fake_key_frame_get(const bContext *C, const Sequence *seq);
bool retiming_keys_are_visible(const bContext *C);

View File

@@ -41,13 +41,13 @@ extern BlenderRNA BLENDER_RNA;
* There is also a way to get a pointer with the information about all structs.
*/
PointerRNA RNA_main_pointer_create(struct Main *main);
PointerRNA RNA_id_pointer_create(struct ID *id);
PointerRNA RNA_pointer_create(struct ID *id, StructRNA *type, void *data);
PointerRNA RNA_main_pointer_create(Main *main);
PointerRNA RNA_id_pointer_create(ID *id);
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data);
bool RNA_pointer_is_null(const PointerRNA *ptr);
bool RNA_path_resolved_create(PointerRNA *ptr,
struct PropertyRNA *prop,
PropertyRNA *prop,
int prop_index,
PathResolvedRNA *r_anim_rna);
@@ -94,8 +94,8 @@ void RNA_struct_py_type_set(StructRNA *srna, void *py_type);
void *RNA_struct_blender_type_get(StructRNA *srna);
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type);
struct IDProperty **RNA_struct_idprops_p(PointerRNA *ptr);
struct IDProperty *RNA_struct_idprops(PointerRNA *ptr, bool create);
IDProperty **RNA_struct_idprops_p(PointerRNA *ptr);
IDProperty *RNA_struct_idprops(PointerRNA *ptr, bool create);
bool RNA_struct_idprops_check(StructRNA *srna);
bool RNA_struct_idprops_register_check(const StructRNA *type);
bool RNA_struct_idprops_datablock_allowed(const StructRNA *type);
@@ -119,7 +119,7 @@ unsigned int RNA_struct_count_properties(StructRNA *srna);
* Low level direct access to type->properties,
* note this ignores parent classes so should be used with care.
*/
const struct ListBase *RNA_struct_type_properties(StructRNA *srna);
const ListBase *RNA_struct_type_properties(StructRNA *srna);
PropertyRNA *RNA_struct_type_find_property_no_base(StructRNA *srna, const char *identifier);
/**
* \note #RNA_struct_find_property is a higher level alternative to this function
@@ -128,15 +128,15 @@ PropertyRNA *RNA_struct_type_find_property_no_base(StructRNA *srna, const char *
PropertyRNA *RNA_struct_type_find_property(StructRNA *srna, const char *identifier);
FunctionRNA *RNA_struct_find_function(StructRNA *srna, const char *identifier);
const struct ListBase *RNA_struct_type_functions(StructRNA *srna);
const ListBase *RNA_struct_type_functions(StructRNA *srna);
char *RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len);
/**
* Use when registering structs with the #STRUCT_PUBLIC_NAMESPACE flag.
*/
bool RNA_struct_available_or_report(struct ReportList *reports, const char *identifier);
bool RNA_struct_bl_idname_ok_or_report(struct ReportList *reports,
bool RNA_struct_available_or_report(ReportList *reports, const char *identifier);
bool RNA_struct_bl_idname_ok_or_report(ReportList *reports,
const char *identifier,
const char *sep);
@@ -224,47 +224,47 @@ bool RNA_enum_value_from_identifier(const EnumPropertyItem *item,
int RNA_enum_from_name(const EnumPropertyItem *item, const char *name);
unsigned int RNA_enum_items_count(const EnumPropertyItem *item);
void RNA_property_enum_items_ex(struct bContext *C,
void RNA_property_enum_items_ex(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool use_static,
const EnumPropertyItem **r_item,
int *r_totitem,
bool *r_free);
void RNA_property_enum_items(struct bContext *C,
void RNA_property_enum_items(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
const EnumPropertyItem **r_item,
int *r_totitem,
bool *r_free);
void RNA_property_enum_items_gettexted(struct bContext *C,
void RNA_property_enum_items_gettexted(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
const EnumPropertyItem **r_item,
int *r_totitem,
bool *r_free);
void RNA_property_enum_items_gettexted_all(struct bContext *C,
void RNA_property_enum_items_gettexted_all(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
const EnumPropertyItem **r_item,
int *r_totitem,
bool *r_free);
bool RNA_property_enum_value(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value);
bool RNA_property_enum_identifier(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **identifier);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **identifier);
bool RNA_property_enum_name(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **name);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **name);
bool RNA_property_enum_name_gettexted(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **name);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **name);
bool RNA_property_enum_item_from_value(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, EnumPropertyItem *r_item);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, EnumPropertyItem *r_item);
bool RNA_property_enum_item_from_value_gettexted(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, EnumPropertyItem *r_item);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, EnumPropertyItem *r_item);
int RNA_property_enum_bitflag_identifiers(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **identifier);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, int value, const char **identifier);
StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value);
@@ -304,19 +304,16 @@ bool RNA_property_comparable(PointerRNA *ptr, PropertyRNA *prop);
*/
bool RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop); /* slow, use with care */
void RNA_property_update(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop);
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop);
/**
* \param scene: may be NULL.
*/
void RNA_property_update_main(struct Main *bmain,
struct Scene *scene,
PointerRNA *ptr,
PropertyRNA *prop);
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop);
/**
* \note its possible this returns a false positive in the case of #PROP_CONTEXT_UPDATE
* but this isn't likely to be a performance problem.
*/
bool RNA_property_update_check(struct PropertyRNA *prop);
bool RNA_property_update_check(PropertyRNA *prop);
/* Property Data */
@@ -367,7 +364,7 @@ eStringPropertySearchFlag RNA_property_string_search_flag(PropertyRNA *prop);
*
* See #PropStringSearchFunc for details.
*/
void RNA_property_string_search(const struct bContext *C,
void RNA_property_string_search(const bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
const char *edit_text,
@@ -397,13 +394,13 @@ int RNA_property_enum_get_default(PointerRNA *ptr, PropertyRNA *prop);
* E.g to get the next item, pass 1, for the previous -1.
*/
int RNA_property_enum_step(
const struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int from_value, int step);
const bContext *C, PointerRNA *ptr, PropertyRNA *prop, int from_value, int step);
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop) ATTR_NONNULL(1, 2);
void RNA_property_pointer_set(PointerRNA *ptr,
PropertyRNA *prop,
PointerRNA ptr_value,
struct ReportList *reports) ATTR_NONNULL(1, 2);
ReportList *reports) ATTR_NONNULL(1, 2);
PointerRNA RNA_property_pointer_get_default(PointerRNA *ptr, PropertyRNA *prop) ATTR_NONNULL(1, 2);
void RNA_property_collection_begin(PointerRNA *ptr,
@@ -453,14 +450,14 @@ bool RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, Pointe
/* efficient functions to set properties for arrays */
int RNA_property_collection_raw_array(
PointerRNA *ptr, PropertyRNA *prop, PropertyRNA *itemprop, bool set, RawArray *array);
int RNA_property_collection_raw_get(struct ReportList *reports,
int RNA_property_collection_raw_get(ReportList *reports,
PointerRNA *ptr,
PropertyRNA *prop,
const char *propname,
void *array,
RawPropertyType type,
int len);
int RNA_property_collection_raw_set(struct ReportList *reports,
int RNA_property_collection_raw_set(ReportList *reports,
PointerRNA *ptr,
PropertyRNA *prop,
const char *propname,
@@ -480,7 +477,7 @@ bool RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, i
/* copy/reset */
bool RNA_property_copy(
struct Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index);
Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index);
bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index);
bool RNA_property_assign_default(PointerRNA *ptr, PropertyRNA *prop);
@@ -510,14 +507,8 @@ void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name);
void RNA_enum_set(PointerRNA *ptr, const char *name, int value);
void RNA_enum_set_identifier(struct bContext *C,
PointerRNA *ptr,
const char *name,
const char *id);
bool RNA_enum_is_equal(struct bContext *C,
PointerRNA *ptr,
const char *name,
const char *enumname);
void RNA_enum_set_identifier(bContext *C, PointerRNA *ptr, const char *name, const char *id);
bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname);
/* Lower level functions that don't use a PointerRNA. */
bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value);
@@ -630,34 +621,34 @@ void RNA_struct_property_unset(PointerRNA *ptr, const char *identifier);
* Python compatible string representation of this property, (must be freed!).
*/
char *RNA_property_as_string(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index, int max_prop_length);
bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index, int max_prop_length);
/**
* String representation of a property, Python compatible but can be used for display too.
* \param C: can be NULL.
*/
char *RNA_pointer_as_string_id(struct bContext *C, PointerRNA *ptr);
char *RNA_pointer_as_string(struct bContext *C,
char *RNA_pointer_as_string_id(bContext *C, PointerRNA *ptr);
char *RNA_pointer_as_string(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop_ptr,
PointerRNA *ptr_prop);
/**
* \param C: can be NULL.
*/
char *RNA_pointer_as_string_keywords_ex(struct bContext *C,
char *RNA_pointer_as_string_keywords_ex(bContext *C,
PointerRNA *ptr,
bool as_function,
bool all_args,
bool nested_args,
int max_prop_length,
PropertyRNA *iterprop);
char *RNA_pointer_as_string_keywords(struct bContext *C,
char *RNA_pointer_as_string_keywords(bContext *C,
PointerRNA *ptr,
bool as_function,
bool all_args,
bool nested_args,
int max_prop_length);
char *RNA_function_as_string_keywords(
struct bContext *C, FunctionRNA *func, bool as_function, bool all_args, int max_prop_length);
bContext *C, FunctionRNA *func, bool as_function, bool all_args, int max_prop_length);
/* Function */
@@ -671,7 +662,7 @@ PropertyRNA *RNA_function_get_parameter(PointerRNA *ptr, FunctionRNA *func, int
PropertyRNA *RNA_function_find_parameter(PointerRNA *ptr,
FunctionRNA *func,
const char *identifier);
const struct ListBase *RNA_function_defined_parameters(FunctionRNA *func);
const ListBase *RNA_function_defined_parameters(FunctionRNA *func);
/* Utility */
@@ -702,47 +693,38 @@ void RNA_parameter_dynamic_length_set_data(ParameterList *parms,
void *data,
int length);
int RNA_function_call(struct bContext *C,
struct ReportList *reports,
PointerRNA *ptr,
FunctionRNA *func,
ParameterList *parms);
int RNA_function_call_lookup(struct bContext *C,
struct ReportList *reports,
int RNA_function_call(
bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms);
int RNA_function_call_lookup(bContext *C,
ReportList *reports,
PointerRNA *ptr,
const char *identifier,
ParameterList *parms);
int RNA_function_call_direct(struct bContext *C,
struct ReportList *reports,
PointerRNA *ptr,
FunctionRNA *func,
const char *format,
...) ATTR_PRINTF_FORMAT(5, 6);
int RNA_function_call_direct_lookup(struct bContext *C,
struct ReportList *reports,
int RNA_function_call_direct(
bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, ...)
ATTR_PRINTF_FORMAT(5, 6);
int RNA_function_call_direct_lookup(bContext *C,
ReportList *reports,
PointerRNA *ptr,
const char *identifier,
const char *format,
...) ATTR_PRINTF_FORMAT(5, 6);
int RNA_function_call_direct_va(struct bContext *C,
struct ReportList *reports,
int RNA_function_call_direct_va(bContext *C,
ReportList *reports,
PointerRNA *ptr,
FunctionRNA *func,
const char *format,
va_list args);
int RNA_function_call_direct_va_lookup(struct bContext *C,
struct ReportList *reports,
int RNA_function_call_direct_va_lookup(bContext *C,
ReportList *reports,
PointerRNA *ptr,
const char *identifier,
const char *format,
va_list args);
const char *RNA_translate_ui_text(const char *text,
const char *text_ctxt,
struct StructRNA *type,
struct PropertyRNA *prop,
int translate);
const char *RNA_translate_ui_text(
const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop, int translate);
/* ID */
@@ -785,15 +767,9 @@ typedef enum eRNACompareMode {
RNA_EQ_COMPARE,
} eRNACompareMode;
bool RNA_property_equals(struct Main *bmain,
struct PointerRNA *ptr_a,
struct PointerRNA *ptr_b,
struct PropertyRNA *prop,
eRNACompareMode mode);
bool RNA_struct_equals(struct Main *bmain,
struct PointerRNA *ptr_a,
struct PointerRNA *ptr_b,
eRNACompareMode mode);
bool RNA_property_equals(
Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, PropertyRNA *prop, eRNACompareMode mode);
bool RNA_struct_equals(Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, eRNACompareMode mode);
/* Override. */
@@ -853,12 +829,12 @@ ENUM_OPERATORS(eRNAOverrideStatus, RNA_OVERRIDE_STATUS_LOCKED)
*
* \return True if _resulting_ \a ptr_local does match \a ptr_reference.
*/
bool RNA_struct_override_matches(struct Main *bmain,
struct PointerRNA *ptr_local,
struct PointerRNA *ptr_reference,
bool RNA_struct_override_matches(Main *bmain,
PointerRNA *ptr_local,
PointerRNA *ptr_reference,
const char *root_path,
size_t root_path_len,
struct IDOverrideLibrary *override,
IDOverrideLibrary *override,
eRNAOverrideMatch flags,
eRNAOverrideMatchResult *r_report_flags);
@@ -866,11 +842,11 @@ bool RNA_struct_override_matches(struct Main *bmain,
* Store needed second operands into \a storage data-block
* for differential override operations.
*/
bool RNA_struct_override_store(struct Main *bmain,
struct PointerRNA *ptr_local,
struct PointerRNA *ptr_reference,
bool RNA_struct_override_store(Main *bmain,
PointerRNA *ptr_local,
PointerRNA *ptr_reference,
PointerRNA *ptr_storage,
struct IDOverrideLibrary *override);
IDOverrideLibrary *override);
typedef enum eRNAOverrideApplyFlag {
RNA_OVERRIDE_APPLY_FLAG_NOP = 0,
@@ -895,40 +871,34 @@ typedef enum eRNAOverrideApplyFlag {
* are always ID ones. In any case, they are the roots of the `rna_path` of all override properties
* in the given `liboverride` data.
*/
void RNA_struct_override_apply(struct Main *bmain,
struct PointerRNA *id_ptr_dst,
struct PointerRNA *id_ptr_src,
struct PointerRNA *id_ptr_storage,
struct IDOverrideLibrary *liboverride,
void RNA_struct_override_apply(Main *bmain,
PointerRNA *id_ptr_dst,
PointerRNA *id_ptr_src,
PointerRNA *id_ptr_storage,
IDOverrideLibrary *liboverride,
eRNAOverrideApplyFlag flag);
struct IDOverrideLibraryProperty *RNA_property_override_property_find(struct Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
struct ID **r_owner_id);
struct IDOverrideLibraryProperty *RNA_property_override_property_get(struct Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_created);
IDOverrideLibraryProperty *RNA_property_override_property_find(Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
ID **r_owner_id);
IDOverrideLibraryProperty *RNA_property_override_property_get(Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_created);
struct IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_find(
struct Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
int index,
bool strict,
bool *r_strict);
struct IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_get(
struct Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
short operation,
int index,
bool strict,
bool *r_strict,
bool *r_created);
IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_find(
Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index, bool strict, bool *r_strict);
IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_get(Main *bmain,
PointerRNA *ptr,
PropertyRNA *prop,
short operation,
int index,
bool strict,
bool *r_strict,
bool *r_created);
eRNAOverrideStatus RNA_property_override_library_status(struct Main *bmainm,
eRNAOverrideStatus RNA_property_override_library_status(Main *bmainm,
PointerRNA *ptr,
PropertyRNA *prop,
int index);

View File

@@ -27,6 +27,8 @@
/* Blender RNA */
struct Scene;
BlenderRNA *RNA_create();
void RNA_define_free(BlenderRNA *brna);
void RNA_free(BlenderRNA *brna);
@@ -449,10 +451,10 @@ void RNA_def_property_override_funcs(PropertyRNA *prop,
const char *store,
const char *apply);
typedef void (*RNAPropertyUpdateFunc)(struct Main *, struct Scene *, struct PointerRNA *);
typedef void (*RNAPropertyUpdateFuncWithContextAndProperty)(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop);
typedef void (*RNAPropertyUpdateFunc)(Main *, Scene *, PointerRNA *);
typedef void (*RNAPropertyUpdateFuncWithContextAndProperty)(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop);
void RNA_def_property_update_runtime(PropertyRNA *prop, RNAPropertyUpdateFunc func);
void RNA_def_property_update_runtime_with_context_and_property(

View File

@@ -14,12 +14,15 @@ struct ID;
struct bNodeSocketType;
struct bNodeTreeType;
struct bNodeType;
struct PointerRNA;
struct PropertyRNA;
struct bContext;
/* Types */
#define DEF_ENUM(id) extern const EnumPropertyItem id[];
#include "RNA_enum_items.hh"
extern const EnumPropertyItem *rna_enum_attribute_domain_itemf(struct ID *id,
extern const EnumPropertyItem *rna_enum_attribute_domain_itemf(ID *id,
bool include_instances,
bool *r_free);
@@ -37,87 +40,84 @@ struct IDFilterEnumPropertyItem {
const char *name;
const char *description;
};
extern const struct IDFilterEnumPropertyItem rna_enum_id_type_filter_items[];
extern const IDFilterEnumPropertyItem rna_enum_id_type_filter_items[];
/* API calls */
int rna_node_tree_idname_to_enum(const char *idname);
struct bNodeTreeType *rna_node_tree_type_from_enum(int value);
bNodeTreeType *rna_node_tree_type_from_enum(int value);
const EnumPropertyItem *rna_node_tree_type_itemf(void *data,
bool (*poll)(void *data, struct bNodeTreeType *),
bool (*poll)(void *data, bNodeTreeType *),
bool *r_free);
int rna_node_socket_idname_to_enum(const char *idname);
struct bNodeSocketType *rna_node_socket_type_from_enum(int value);
const EnumPropertyItem *rna_node_socket_type_itemf(
void *data, bool (*poll)(void *data, struct bNodeSocketType *), bool *r_free);
bNodeSocketType *rna_node_socket_type_from_enum(int value);
const EnumPropertyItem *rna_node_socket_type_itemf(void *data,
bool (*poll)(void *data, bNodeSocketType *),
bool *r_free);
struct PointerRNA;
struct PropertyRNA;
struct bContext;
const EnumPropertyItem *rna_TransformOrientation_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
/**
* Generic functions, return an enum from library data, index is the position
* in the linked list can add more for different types as needed.
*/
const EnumPropertyItem *RNA_action_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_action_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
#if 0
EnumPropertyItem *RNA_action_local_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
EnumPropertyItem *RNA_action_local_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
#endif
const EnumPropertyItem *RNA_collection_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_collection_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_collection_local_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_collection_local_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_image_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_image_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_image_local_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_image_local_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_scene_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_scene_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_scene_without_active_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_scene_without_active_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_scene_local_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_scene_local_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_movieclip_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_movieclip_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_movieclip_local_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_movieclip_local_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_mask_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_mask_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
const EnumPropertyItem *RNA_mask_local_itemf(struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
const EnumPropertyItem *RNA_mask_local_itemf(bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
bool *r_free);
/* Non confirming, utility function. */
const EnumPropertyItem *RNA_enum_node_tree_types_itemf_impl(struct bContext *C, bool *r_free);
const EnumPropertyItem *RNA_enum_node_tree_types_itemf_impl(bContext *C, bool *r_free);

View File

@@ -150,7 +150,6 @@ bool RNA_path_resolve_property_and_item_pointer_full(const PointerRNA *ptr,
int *r_index,
PointerRNA *r_item_ptr);
typedef struct PropertyElemRNA PropertyElemRNA;
struct PropertyElemRNA {
PropertyElemRNA *next, *prev;
PointerRNA ptr;
@@ -166,7 +165,7 @@ struct PropertyElemRNA {
* \return True if there was no error while resolving the path
* \note Assumes all pointers provided are valid
*/
bool RNA_path_resolve_elements(PointerRNA *ptr, const char *path, struct ListBase *r_elements);
bool RNA_path_resolve_elements(PointerRNA *ptr, const char *path, ListBase *r_elements);
/**
* Find the path from the structure referenced by the pointer to the runtime RNA-defined
@@ -178,7 +177,7 @@ bool RNA_path_resolve_elements(PointerRNA *ptr, const char *path, struct ListBas
* \param needle: Custom property object to find.
* \return Relative path or NULL.
*/
char *RNA_path_from_struct_to_idproperty(PointerRNA *ptr, const struct IDProperty *needle);
char *RNA_path_from_struct_to_idproperty(PointerRNA *ptr, const IDProperty *needle);
/**
* Find the actual ID pointer and path from it to the given ID.
@@ -187,13 +186,11 @@ char *RNA_path_from_struct_to_idproperty(PointerRNA *ptr, const struct IDPropert
* \param[out] r_path: Path from the real ID to the initial ID.
* \return The ID pointer, or NULL in case of failure.
*/
struct ID *RNA_find_real_ID_and_path(struct ID *id, const char **r_path);
ID *RNA_find_real_ID_and_path(ID *id, const char **r_path);
char *RNA_path_from_ID_to_struct(const PointerRNA *ptr);
char *RNA_path_from_real_ID_to_struct(struct Main *bmain,
const PointerRNA *ptr,
struct ID **r_real);
char *RNA_path_from_real_ID_to_struct(Main *bmain, const PointerRNA *ptr, ID **r_real);
char *RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop);
@@ -211,12 +208,12 @@ char *RNA_path_from_ID_to_property_index(const PointerRNA *ptr,
int index_dim,
int index);
char *RNA_path_from_real_ID_to_property_index(struct Main *bmain,
char *RNA_path_from_real_ID_to_property_index(Main *bmain,
const PointerRNA *ptr,
PropertyRNA *prop,
int index_dim,
int index,
struct ID **r_real_id);
ID **r_real_id);
/**
* \return the path to given ptr/prop from the closest ancestor of given type,
@@ -224,13 +221,13 @@ char *RNA_path_from_real_ID_to_property_index(struct Main *bmain,
*/
char *RNA_path_resolve_from_type_to_property(const PointerRNA *ptr,
PropertyRNA *prop,
const struct StructRNA *type);
const StructRNA *type);
/**
* Get the ID as a python representation, eg:
* bpy.data.foo["bar"]
*/
char *RNA_path_full_ID_py(struct ID *id);
char *RNA_path_full_ID_py(ID *id);
/**
* Get the ID.struct as a python representation, eg:
* bpy.data.foo["bar"].some_struct

View File

@@ -31,30 +31,30 @@ struct bContext;
* in some cases this information is needed to correctly get/set
* the properties and validate them. */
typedef struct PointerRNA {
struct ID *owner_id;
struct StructRNA *type;
struct PointerRNA {
ID *owner_id;
StructRNA *type;
void *data;
} PointerRNA;
};
typedef struct PropertyPointerRNA {
struct PropertyPointerRNA {
PointerRNA ptr;
struct PropertyRNA *prop;
} PropertyPointerRNA;
PropertyRNA *prop;
};
/**
* Stored result of a RNA path lookup (as used by anim-system)
*/
typedef struct PathResolvedRNA {
struct PointerRNA ptr;
struct PropertyRNA *prop;
struct PathResolvedRNA {
PointerRNA ptr;
PropertyRNA *prop;
/** -1 for non-array access. */
int prop_index;
} PathResolvedRNA;
};
/* Property */
typedef enum PropertyType {
enum PropertyType {
PROP_BOOLEAN = 0,
PROP_INT = 1,
PROP_FLOAT = 2,
@@ -62,10 +62,10 @@ typedef enum PropertyType {
PROP_ENUM = 4,
PROP_POINTER = 5,
PROP_COLLECTION = 6,
} PropertyType;
};
/* also update rna_property_subtype_unit when you change this */
typedef enum PropertyUnit {
enum PropertyUnit {
PROP_UNIT_NONE = (0 << 16),
PROP_UNIT_LENGTH = (1 << 16), /* m */
PROP_UNIT_AREA = (2 << 16), /* m^2 */
@@ -79,7 +79,7 @@ typedef enum PropertyUnit {
PROP_UNIT_CAMERA = (10 << 16), /* mm */
PROP_UNIT_POWER = (11 << 16), /* W */
PROP_UNIT_TEMPERATURE = (12 << 16), /* C */
} PropertyUnit;
};
ENUM_OPERATORS(PropertyUnit, PROP_UNIT_TEMPERATURE)
/**
@@ -93,7 +93,7 @@ ENUM_OPERATORS(PropertyUnit, PROP_UNIT_TEMPERATURE)
* Sliders with logarithmic scale and value bar must have a range > 0
* while logarithmic sliders without the value bar can have a range of >= 0.
*/
typedef enum PropertyScaleType {
enum PropertyScaleType {
/** Linear scale (default). */
PROP_SCALE_LINEAR = 0,
/**
@@ -106,7 +106,7 @@ typedef enum PropertyScaleType {
* - Maximum range: `-inf < x < inf`
*/
PROP_SCALE_CUBIC = 2,
} PropertyScaleType;
};
#define RNA_SUBTYPE_UNIT(subtype) ((subtype)&0x00FF0000)
#define RNA_SUBTYPE_VALUE(subtype) ((subtype) & ~0x00FF0000)
@@ -122,7 +122,7 @@ typedef enum PropertyScaleType {
* \note Also update enums in `bpy_props.cc` and `rna_rna.cc` when adding items here.
* Watch it: these values are written to files as part of node socket button sub-types!
*/
typedef enum PropertySubType {
enum PropertySubType {
PROP_NONE = 0,
/* strings */
@@ -175,12 +175,12 @@ typedef enum PropertySubType {
/* temperature */
PROP_TEMPERATURE = 43 | PROP_UNIT_TEMPERATURE,
} PropertySubType;
};
/* Make sure enums are updated with these */
/* HIGHEST FLAG IN USE: 1 << 31
* FREE FLAGS: 9, 11, 13, 14, 15. */
typedef enum PropertyFlag {
enum PropertyFlag {
/**
* Editable means the property is editable in the user
* interface, properties are editable by default except
@@ -305,7 +305,7 @@ typedef enum PropertyFlag {
* as having the +/- operators available in the file browser.
**/
PROP_PATH_OUTPUT = (1 << 2),
} PropertyFlag;
};
ENUM_OPERATORS(PropertyFlag, PROP_TEXTEDIT_UPDATE)
/**
@@ -314,7 +314,7 @@ ENUM_OPERATORS(PropertyFlag, PROP_TEXTEDIT_UPDATE)
*
* FREE FLAGS: 2, 3, 4, 5, 6, 7, 8, 9, 12 and above.
*/
typedef enum PropertyOverrideFlag {
enum PropertyOverrideFlag {
/** Means that the property can be overridden by a local override of some linked datablock. */
PROPOVERRIDE_OVERRIDABLE_LIBRARY = (1 << 0),
@@ -350,14 +350,14 @@ typedef enum PropertyOverrideFlag {
* (e.g. name of material slots is actually name of assigned material).
*/
PROPOVERRIDE_NO_PROP_NAME = (1 << 11),
} PropertyOverrideFlag;
};
ENUM_OPERATORS(PropertyOverrideFlag, PROPOVERRIDE_NO_PROP_NAME);
/**
* Function parameters flags.
* \warning 16bits only.
*/
typedef enum ParameterFlag {
enum ParameterFlag {
PARM_REQUIRED = (1 << 0),
PARM_OUTPUT = (1 << 1),
PARM_RNAPTR = (1 << 2),
@@ -369,20 +369,20 @@ typedef enum ParameterFlag {
* \note only for input parameters!
*/
PARM_PYFUNC_OPTIONAL = (1 << 3),
} ParameterFlag;
};
ENUM_OPERATORS(ParameterFlag, PARM_PYFUNC_OPTIONAL)
struct CollectionPropertyIterator;
struct Link;
typedef int (*IteratorSkipFunc)(struct CollectionPropertyIterator *iter, void *data);
typedef int (*IteratorSkipFunc)(CollectionPropertyIterator *iter, void *data);
typedef struct ListBaseIterator {
struct Link *link;
struct ListBaseIterator {
Link *link;
int flag;
IteratorSkipFunc skip;
} ListBaseIterator;
};
typedef struct ArrayIterator {
struct ArrayIterator {
char *ptr;
/** Past the last valid pointer, only for comparisons, ignores skipped values. */
char *endptr;
@@ -402,18 +402,18 @@ typedef struct ArrayIterator {
* this changes indices so quick array index lookups are not possible when skip function is used.
*/
IteratorSkipFunc skip;
} ArrayIterator;
};
typedef struct CountIterator {
struct CountIterator {
void *ptr;
int item;
} CountIterator;
};
typedef struct CollectionPropertyIterator {
struct CollectionPropertyIterator {
/* internal */
PointerRNA parent;
PointerRNA builtin_parent;
struct PropertyRNA *prop;
PropertyRNA *prop;
union {
ArrayIterator array;
ListBaseIterator listbase;
@@ -426,19 +426,19 @@ typedef struct CollectionPropertyIterator {
/* external */
PointerRNA ptr;
int valid;
} CollectionPropertyIterator;
};
typedef struct CollectionPointerLink {
struct CollectionPointerLink *next, *prev;
struct CollectionPointerLink {
CollectionPointerLink *next, *prev;
PointerRNA ptr;
} CollectionPointerLink;
};
/** Copy of ListBase for RNA. */
typedef struct CollectionListBase {
struct CollectionPointerLink *first, *last;
} CollectionListBase;
struct CollectionListBase {
CollectionPointerLink *first, *last;
};
typedef enum RawPropertyType {
enum RawPropertyType {
PROP_RAW_UNSET = -1,
PROP_RAW_INT, /* XXX: abused for types that are not set, eg. MFace.verts, needs fixing. */
PROP_RAW_SHORT,
@@ -446,20 +446,20 @@ typedef enum RawPropertyType {
PROP_RAW_BOOLEAN,
PROP_RAW_DOUBLE,
PROP_RAW_FLOAT,
} RawPropertyType;
};
typedef struct RawArray {
struct RawArray {
void *array;
RawPropertyType type;
int len;
int stride;
} RawArray;
};
/**
* This struct is are typically defined in arrays which define an *enum* for RNA,
* which is used by the RNA API both for user-interface and the Python API.
*/
typedef struct EnumPropertyItem {
struct EnumPropertyItem {
/** The internal value of the enum, not exposed to users. */
int value;
/**
@@ -475,7 +475,7 @@ typedef struct EnumPropertyItem {
const char *name;
/** Longer description used in the interface. */
const char *description;
} EnumPropertyItem;
};
/**
* Heading for RNA enum items (shown in the UI).
@@ -499,62 +499,36 @@ typedef struct EnumPropertyItem {
#define RNA_ENUM_ITEM_SEPR_COLUMN RNA_ENUM_ITEM_HEADING("", NULL)
/* extended versions with PropertyRNA argument */
typedef bool (*BooleanPropertyGetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop);
typedef void (*BooleanPropertySetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
bool value);
typedef void (*BooleanArrayPropertyGetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
bool *values);
typedef void (*BooleanArrayPropertySetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
typedef bool (*BooleanPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop);
typedef void (*BooleanPropertySetFunc)(PointerRNA *ptr, PropertyRNA *prop, bool value);
typedef void (*BooleanArrayPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop, bool *values);
typedef void (*BooleanArrayPropertySetFunc)(PointerRNA *ptr,
PropertyRNA *prop,
const bool *values);
typedef int (*IntPropertyGetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop);
typedef void (*IntPropertySetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop, int value);
typedef void (*IntArrayPropertyGetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
int *values);
typedef void (*IntArrayPropertySetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
const int *values);
typedef void (*IntPropertyRangeFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
int *min,
int *max,
int *softmin,
int *softmax);
typedef float (*FloatPropertyGetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop);
typedef void (*FloatPropertySetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
float value);
typedef void (*FloatArrayPropertyGetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
float *values);
typedef void (*FloatArrayPropertySetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
const float *values);
typedef void (*FloatPropertyRangeFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
float *min,
float *max,
float *softmin,
float *softmax);
typedef void (*StringPropertyGetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
char *value);
typedef int (*StringPropertyLengthFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop);
typedef void (*StringPropertySetFunc)(struct PointerRNA *ptr,
struct PropertyRNA *prop,
const char *value);
typedef int (*IntPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop);
typedef void (*IntPropertySetFunc)(PointerRNA *ptr, PropertyRNA *prop, int value);
typedef void (*IntArrayPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop, int *values);
typedef void (*IntArrayPropertySetFunc)(PointerRNA *ptr, PropertyRNA *prop, const int *values);
typedef void (*IntPropertyRangeFunc)(
PointerRNA *ptr, PropertyRNA *prop, int *min, int *max, int *softmin, int *softmax);
typedef float (*FloatPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop);
typedef void (*FloatPropertySetFunc)(PointerRNA *ptr, PropertyRNA *prop, float value);
typedef void (*FloatArrayPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop, float *values);
typedef void (*FloatArrayPropertySetFunc)(PointerRNA *ptr, PropertyRNA *prop, const float *values);
typedef void (*FloatPropertyRangeFunc)(
PointerRNA *ptr, PropertyRNA *prop, float *min, float *max, float *softmin, float *softmax);
typedef void (*StringPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop, char *value);
typedef int (*StringPropertyLengthFunc)(PointerRNA *ptr, PropertyRNA *prop);
typedef void (*StringPropertySetFunc)(PointerRNA *ptr, PropertyRNA *prop, const char *value);
typedef struct StringPropertySearchVisitParams {
struct StringPropertySearchVisitParams {
/** Text being searched for (never NULL). */
const char *text;
/** Additional information to display (optional, may be NULL). */
const char *info;
} StringPropertySearchVisitParams;
};
typedef enum eStringPropertySearchFlag {
enum eStringPropertySearchFlag {
/**
* Used so the result of #RNA_property_string_search_flag can be used to check
* if search is supported.
@@ -569,7 +543,7 @@ typedef enum eStringPropertySearchFlag {
* only be enabled this doesn't cause performance issues.
*/
PROP_STRING_SEARCH_SUGGESTION = (1 << 2),
} eStringPropertySearchFlag;
};
ENUM_OPERATORS(eStringPropertySearchFlag, PROP_STRING_SEARCH_SUGGESTION)
/**
@@ -589,54 +563,54 @@ typedef void (*StringPropertySearchVisitFunc)(void *visit_user_data,
* responsible for storing the search results.
* \param visit_user_data: Caller defined data, passed to `visit_fn`.
*/
typedef void (*StringPropertySearchFunc)(const struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
typedef void (*StringPropertySearchFunc)(const bContext *C,
PointerRNA *ptr,
PropertyRNA *prop,
const char *edit_text,
StringPropertySearchVisitFunc visit_fn,
void *visit_user_data);
typedef int (*EnumPropertyGetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop);
typedef void (*EnumPropertySetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop, int value);
typedef int (*EnumPropertyGetFunc)(PointerRNA *ptr, PropertyRNA *prop);
typedef void (*EnumPropertySetFunc)(PointerRNA *ptr, PropertyRNA *prop, int value);
/* same as PropEnumItemFunc */
typedef const EnumPropertyItem *(*EnumPropertyItemFunc)(struct bContext *C,
typedef const EnumPropertyItem *(*EnumPropertyItemFunc)(bContext *C,
PointerRNA *ptr,
struct PropertyRNA *prop,
PropertyRNA *prop,
bool *r_free);
typedef struct PropertyRNA PropertyRNA;
struct PropertyRNA;
/* Parameter List */
typedef struct ParameterList {
struct ParameterList {
/** Storage for parameters*. */
void *data;
/** Function passed at creation time. */
struct FunctionRNA *func;
FunctionRNA *func;
/** Store the parameter size. */
int alloc_size;
int arg_count, ret_count;
} ParameterList;
};
typedef struct ParameterIterator {
struct ParameterList *parms;
struct ParameterIterator {
ParameterList *parms;
// PointerRNA funcptr; /* UNUSED */
void *data;
int size, offset;
PropertyRNA *parm;
int valid;
} ParameterIterator;
};
/** Mainly to avoid confusing casts. */
typedef struct ParameterDynAlloc {
struct ParameterDynAlloc {
/** Important, this breaks when set to an int. */
intptr_t array_tot;
void *array;
} ParameterDynAlloc;
};
/* Function */
@@ -653,7 +627,7 @@ typedef struct ParameterDynAlloc {
* <other RNA-defined parameters>);
* </pre>
*/
typedef enum FunctionFlag {
enum FunctionFlag {
/**
* Pass ID owning 'self' data
* (i.e. ptr->owner_id, might be same as self in case data is an ID...).
@@ -700,18 +674,15 @@ typedef enum FunctionFlag {
* and has to free them when deleted.
*/
FUNC_FREE_POINTERS = (1 << 10),
} FunctionFlag;
};
typedef void (*CallFunc)(struct bContext *C,
struct ReportList *reports,
PointerRNA *ptr,
ParameterList *parms);
typedef void (*CallFunc)(bContext *C, ReportList *reports, PointerRNA *ptr, ParameterList *parms);
typedef struct FunctionRNA FunctionRNA;
struct FunctionRNA;
/* Struct */
typedef enum StructFlag {
enum StructFlag {
/** Indicates that this struct is an ID struct, and to use reference-counting. */
STRUCT_ID = (1 << 0),
STRUCT_ID_REFCOUNT = (1 << 1),
@@ -738,33 +709,33 @@ typedef enum StructFlag {
* So accessing the property should not read from the current context to derive values/limits.
*/
STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID = (1 << 11),
} StructFlag;
};
typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, bool *have_function);
typedef int (*StructCallbackFunc)(struct bContext *C,
struct PointerRNA *ptr,
struct FunctionRNA *func,
typedef int (*StructValidateFunc)(PointerRNA *ptr, void *data, bool *have_function);
typedef int (*StructCallbackFunc)(bContext *C,
PointerRNA *ptr,
FunctionRNA *func,
ParameterList *list);
typedef void (*StructFreeFunc)(void *data);
typedef struct StructRNA *(*StructRegisterFunc)(struct Main *bmain,
struct ReportList *reports,
void *data,
const char *identifier,
StructValidateFunc validate,
StructCallbackFunc call,
StructFreeFunc free);
typedef StructRNA *(*StructRegisterFunc)(Main *bmain,
ReportList *reports,
void *data,
const char *identifier,
StructValidateFunc validate,
StructCallbackFunc call,
StructFreeFunc free);
/** Return true when `type` was successfully unregistered & freed. */
typedef bool (*StructUnregisterFunc)(struct Main *bmain, struct StructRNA *type);
typedef bool (*StructUnregisterFunc)(Main *bmain, StructRNA *type);
typedef void **(*StructInstanceFunc)(PointerRNA *ptr);
typedef struct StructRNA StructRNA;
struct StructRNA;
/**
* Blender RNA
*
* Root RNA data structure that lists all struct types.
*/
typedef struct BlenderRNA BlenderRNA;
struct BlenderRNA;
/**
* Extending
@@ -772,29 +743,29 @@ typedef struct BlenderRNA BlenderRNA;
* This struct must be embedded in *Type structs in
* order to make them definable through RNA.
*/
typedef struct ExtensionRNA {
struct ExtensionRNA {
void *data;
StructRNA *srna;
StructCallbackFunc call;
StructFreeFunc free;
} ExtensionRNA;
};
/* Primitive types. */
typedef struct PrimitiveStringRNA {
struct PrimitiveStringRNA {
const char *value;
} PrimitiveStringRNA;
};
typedef struct PrimitiveIntRNA {
struct PrimitiveIntRNA {
int value;
} PrimitiveIntRNA;
};
typedef struct PrimitiveFloatRNA {
struct PrimitiveFloatRNA {
float value;
} PrimitiveFloatRNA;
};
typedef struct PrimitiveBooleanRNA {
struct PrimitiveBooleanRNA {
bool value;
} PrimitiveBooleanRNA;
};
#endif /* __RNA_TYPES_H__ */

View File

@@ -10,28 +10,30 @@
#include "BKE_node.h"
struct bNodeTreeType;
struct CryptomatteSession;
struct Scene;
struct RenderData;
struct Render;
struct ViewLayer;
extern struct bNodeTreeType *ntreeType_Composite;
extern bNodeTreeType *ntreeType_Composite;
void node_cmp_rlayers_outputs(struct bNodeTree *ntree, struct bNode *node);
void node_cmp_rlayers_register_pass(struct bNodeTree *ntree,
struct bNode *node,
struct Scene *scene,
struct ViewLayer *view_layer,
void node_cmp_rlayers_outputs(bNodeTree *ntree, bNode *node);
void node_cmp_rlayers_register_pass(bNodeTree *ntree,
bNode *node,
Scene *scene,
ViewLayer *view_layer,
const char *name,
eNodeSocketDatatype type);
const char *node_cmp_rlayers_sock_to_pass(int sock_index);
void register_node_type_cmp_custom_group(bNodeType *ntype);
void ntreeCompositExecTree(struct Render *render,
struct Scene *scene,
struct bNodeTree *ntree,
struct RenderData *rd,
void ntreeCompositExecTree(Render *render,
Scene *scene,
bNodeTree *ntree,
RenderData *rd,
bool rendering,
int do_previews,
const char *view_name);
@@ -40,7 +42,7 @@ void ntreeCompositExecTree(struct Render *render,
* Called from render pipeline, to tag render input and output.
* need to do all scenes, to prevent errors when you re-render 1 scene.
*/
void ntreeCompositTagRender(struct Scene *scene);
void ntreeCompositTagRender(Scene *scene);
void ntreeCompositTagNeedExec(bNode *node);
@@ -53,29 +55,25 @@ void ntreeCompositTagNeedExec(bNode *node);
* - The render engine calls RE_engine_register_pass for each pass.
* - #RE_engine_register_pass calls #node_cmp_rlayers_register_pass.
*/
void ntreeCompositUpdateRLayers(struct bNodeTree *ntree);
void ntreeCompositUpdateRLayers(bNodeTree *ntree);
void ntreeCompositClearTags(struct bNodeTree *ntree);
void ntreeCompositClearTags(bNodeTree *ntree);
struct bNodeSocket *ntreeCompositOutputFileAddSocket(struct bNodeTree *ntree,
struct bNode *node,
const char *name,
const struct ImageFormatData *im_format);
bNodeSocket *ntreeCompositOutputFileAddSocket(bNodeTree *ntree,
bNode *node,
const char *name,
const ImageFormatData *im_format);
int ntreeCompositOutputFileRemoveActiveSocket(struct bNodeTree *ntree, struct bNode *node);
void ntreeCompositOutputFileSetPath(struct bNode *node,
struct bNodeSocket *sock,
const char *name);
void ntreeCompositOutputFileSetLayer(struct bNode *node,
struct bNodeSocket *sock,
const char *name);
int ntreeCompositOutputFileRemoveActiveSocket(bNodeTree *ntree, bNode *node);
void ntreeCompositOutputFileSetPath(bNode *node, bNodeSocket *sock, const char *name);
void ntreeCompositOutputFileSetLayer(bNode *node, bNodeSocket *sock, const char *name);
/* needed in do_versions */
void ntreeCompositOutputFileUniquePath(struct ListBase *list,
struct bNodeSocket *sock,
void ntreeCompositOutputFileUniquePath(ListBase *list,
bNodeSocket *sock,
const char defname[],
char delim);
void ntreeCompositOutputFileUniqueLayer(struct ListBase *list,
struct bNodeSocket *sock,
void ntreeCompositOutputFileUniqueLayer(ListBase *list,
bNodeSocket *sock,
const char defname[],
char delim);
@@ -96,4 +94,4 @@ void ntreeCompositCryptomatteLayerPrefix(const Scene *scene,
* or image.
*/
void ntreeCompositCryptomatteUpdateLayerNames(const Scene *scene, bNode *node);
struct CryptomatteSession *ntreeCompositCryptomatteSession(const Scene *scene, bNode *node);
CryptomatteSession *ntreeCompositCryptomatteSession(const Scene *scene, bNode *node);

View File

@@ -35,14 +35,14 @@ struct Sequence;
var = SEQ_iterator_yield(&_SEQ_ITERATOR_NAME(iter)))
typedef struct SeqCollection {
struct GSet *set;
GSet *set;
} SeqCollection;
typedef struct SeqIterator {
struct SeqIterator {
GSetIterator gsi;
SeqCollection *collection;
bool iterator_initialized;
} SeqIterator;
};
/**
* Utility function for SEQ_ITERATOR_FOREACH macro.
@@ -56,9 +56,7 @@ typedef struct SeqIterator {
*
* \return false when iterator can not be initialized, true otherwise
*/
bool SEQ_iterator_ensure(SeqCollection *collection,
SeqIterator *iterator,
struct Sequence **r_seq);
bool SEQ_iterator_ensure(SeqCollection *collection, SeqIterator *iterator, Sequence **r_seq);
/**
* Utility function for SEQ_ITERATOR_FOREACH macro.
* Yield collection element
@@ -67,12 +65,12 @@ bool SEQ_iterator_ensure(SeqCollection *collection,
*
* \return collection element or NULL when iteration has ended
*/
struct Sequence *SEQ_iterator_yield(SeqIterator *iterator);
Sequence *SEQ_iterator_yield(SeqIterator *iterator);
/**
* Callback format for the for_each function below.
*/
typedef bool (*SeqForEachFunc)(struct Sequence *seq, void *user_data);
typedef bool (*SeqForEachFunc)(Sequence *seq, void *user_data);
/**
* Utility function to recursively iterate through all sequence strips in a `seqbase` list.
@@ -83,7 +81,7 @@ typedef bool (*SeqForEachFunc)(struct Sequence *seq, void *user_data);
* \param callback: query function callback, returns false if iteration should stop.
* \param user_data: pointer to user data that can be used in the callback function.
*/
void SEQ_for_each_callback(struct ListBase *seqbase, SeqForEachFunc callback, void *user_data);
void SEQ_for_each_callback(ListBase *seqbase, SeqForEachFunc callback, void *user_data);
/**
* Expand set by running `seq_query_func()` for each strip, which will be used as reference.
@@ -93,12 +91,12 @@ void SEQ_for_each_callback(struct ListBase *seqbase, SeqForEachFunc callback, vo
* \param strips: set of strips to be expanded
* \param seq_query_func: query function callback
*/
void SEQ_iterator_set_expand(const struct Scene *scene,
struct ListBase *seqbase,
void SEQ_iterator_set_expand(const Scene *scene,
ListBase *seqbase,
blender::VectorSet<Sequence *> &strips,
void seq_query_func(const struct Scene *scene,
struct Sequence *seq_reference,
struct ListBase *seqbase,
void seq_query_func(const Scene *scene,
Sequence *seq_reference,
ListBase *seqbase,
blender::VectorSet<Sequence *> &strips));
/**
* Query strips from seqbase. seq_reference is used by query function as filter condition.
@@ -109,12 +107,12 @@ void SEQ_iterator_set_expand(const struct Scene *scene,
* \return set of strips
*/
blender::VectorSet<Sequence *> SEQ_query_by_reference(
struct Sequence *seq_reference,
const struct Scene *scene,
struct ListBase *seqbase,
void seq_query_func(const struct Scene *scene,
struct Sequence *seq_reference,
struct ListBase *seqbase,
Sequence *seq_reference,
const Scene *scene,
ListBase *seqbase,
void seq_query_func(const Scene *scene,
Sequence *seq_reference,
ListBase *seqbase,
blender::VectorSet<Sequence *> &strips));
/**
* Query all selected strips in seqbase.
@@ -122,7 +120,7 @@ blender::VectorSet<Sequence *> SEQ_query_by_reference(
* \param seqbase: ListBase in which strips are queried
* \return set of strips
*/
blender::VectorSet<Sequence *> SEQ_query_selected_strips(struct ListBase *seqbase);
blender::VectorSet<Sequence *> SEQ_query_selected_strips(ListBase *seqbase);
/**
* Query all unselected strips in seqbase.
*
@@ -154,9 +152,9 @@ blender::VectorSet<Sequence *> SEQ_query_all_strips_recursive(ListBase *seqbase)
* \param seqbase: ListBase in which strips are queried
* \param strips: set of strips to be filled
*/
void SEQ_query_strip_effect_chain(const struct Scene *scene,
struct Sequence *seq_reference,
struct ListBase *seqbase,
void SEQ_query_strip_effect_chain(const Scene *scene,
Sequence *seq_reference,
ListBase *seqbase,
blender::VectorSet<Sequence *> &strips);
/**
@@ -167,7 +165,7 @@ void SEQ_query_strip_effect_chain(const struct Scene *scene,
* \param displayed_channel: viewed channel. when set to 0, no channel filter is applied
* \return set of strips
*/
blender::VectorSet<Sequence *> SEQ_query_rendered_strips(const struct Scene *scene,
blender::VectorSet<Sequence *> SEQ_query_rendered_strips(const Scene *scene,
ListBase *channels,
ListBase *seqbase,
int timeline_frame,

View File

@@ -19,16 +19,14 @@ struct SeqCacheKey;
struct SeqDiskCache;
struct Sequence;
struct SeqDiskCache *seq_disk_cache_create(struct Main *bmain, struct Scene *scene);
void seq_disk_cache_free(struct SeqDiskCache *disk_cache);
bool seq_disk_cache_is_enabled(struct Main *bmain);
struct ImBuf *seq_disk_cache_read_file(struct SeqDiskCache *disk_cache, struct SeqCacheKey *key);
bool seq_disk_cache_write_file(struct SeqDiskCache *disk_cache,
struct SeqCacheKey *key,
struct ImBuf *ibuf);
bool seq_disk_cache_enforce_limits(struct SeqDiskCache *disk_cache);
void seq_disk_cache_invalidate(struct SeqDiskCache *disk_cache,
struct Scene *scene,
struct Sequence *seq,
struct Sequence *seq_changed,
SeqDiskCache *seq_disk_cache_create(Main *bmain, Scene *scene);
void seq_disk_cache_free(SeqDiskCache *disk_cache);
bool seq_disk_cache_is_enabled(Main *bmain);
ImBuf *seq_disk_cache_read_file(SeqDiskCache *disk_cache, SeqCacheKey *key);
bool seq_disk_cache_write_file(SeqDiskCache *disk_cache, SeqCacheKey *key, ImBuf *ibuf);
bool seq_disk_cache_enforce_limits(SeqDiskCache *disk_cache);
void seq_disk_cache_invalidate(SeqDiskCache *disk_cache,
Scene *scene,
Sequence *seq,
Sequence *seq_changed,
int invalidate_types);

View File

@@ -13,16 +13,16 @@
struct Scene;
struct Sequence;
struct SeqEffectHandle seq_effect_get_sequence_blend(struct Sequence *seq);
SeqEffectHandle seq_effect_get_sequence_blend(Sequence *seq);
/**
* Build frame map when speed in mode #SEQ_SPEED_MULTIPLY is animated.
* This is, because `target_frame` value is integrated over time.
*/
void seq_effect_speed_rebuild_map(struct Scene *scene, struct Sequence *seq);
void seq_effect_speed_rebuild_map(Scene *scene, Sequence *seq);
/**
* Override timeline_frame when rendering speed effect input.
*/
float seq_speed_effect_target_frame_get(struct Scene *scene,
struct Sequence *seq,
float seq_speed_effect_target_frame_get(Scene *scene,
Sequence *seq,
float timeline_frame,
int input);

View File

@@ -16,7 +16,7 @@ struct Scene;
struct SeqRenderData;
struct Sequence;
typedef struct SeqCacheKey {
struct SeqCacheKey {
struct SeqCache *cache_owner;
void *userkey;
struct SeqCacheKey *link_prev; /* Used for linking intermediate items to final frame. */
@@ -30,40 +30,31 @@ typedef struct SeqCacheKey {
/* ID of task for assigning temp cache entries to particular task(thread, etc.) */
eSeqTaskId task_id;
int type;
} SeqCacheKey;
};
struct ImBuf *seq_cache_get(const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
int type);
void seq_cache_put(const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
int type,
struct ImBuf *i);
void seq_cache_thumbnail_put(const struct SeqRenderData *context,
struct Sequence *seq,
ImBuf *seq_cache_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type);
void seq_cache_put(
const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *i);
void seq_cache_thumbnail_put(const SeqRenderData *context,
Sequence *seq,
float timeline_frame,
struct ImBuf *i,
const struct rctf *view_area);
bool seq_cache_put_if_possible(const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
int type,
struct ImBuf *nval);
ImBuf *i,
const rctf *view_area);
bool seq_cache_put_if_possible(
const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *nval);
/**
* Find only "base" keys.
* Sources(other types) for a frame must be freed all at once.
*/
bool seq_cache_recycle_item(struct Scene *scene);
void seq_cache_free_temp_cache(struct Scene *scene, short id, int timeline_frame);
void seq_cache_destruct(struct Scene *scene);
void seq_cache_cleanup_all(struct Main *bmain);
void seq_cache_cleanup_sequence(struct Scene *scene,
struct Sequence *seq,
struct Sequence *seq_changed,
bool seq_cache_recycle_item(Scene *scene);
void seq_cache_free_temp_cache(Scene *scene, short id, int timeline_frame);
void seq_cache_destruct(Scene *scene);
void seq_cache_cleanup_all(Main *bmain);
void seq_cache_cleanup_sequence(Scene *scene,
Sequence *seq,
Sequence *seq_changed,
int invalidate_types,
bool force_seq_changed_range);
void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area);
bool seq_cache_is_full(void);
float seq_cache_frame_index_to_timeline_frame(struct Sequence *seq, float frame_index);
bool seq_cache_is_full();
float seq_cache_frame_index_to_timeline_frame(Sequence *seq, float frame_index);

View File

@@ -15,15 +15,15 @@ struct Sequence;
/**
* Start or resume prefetching.
*/
void seq_prefetch_start(const struct SeqRenderData *context, float timeline_frame);
void seq_prefetch_free(struct Scene *scene);
bool seq_prefetch_job_is_running(struct Scene *scene);
void seq_prefetch_get_time_range(struct Scene *scene, int *start, int *end);
void seq_prefetch_start(const SeqRenderData *context, float timeline_frame);
void seq_prefetch_free(Scene *scene);
bool seq_prefetch_job_is_running(Scene *scene);
void seq_prefetch_get_time_range(Scene *scene, int *start, int *end);
/**
* For cache context swapping.
*/
struct SeqRenderData *seq_prefetch_get_original_context(const struct SeqRenderData *context);
SeqRenderData *seq_prefetch_get_original_context(const SeqRenderData *context);
/**
* For cache context swapping.
*/
struct Sequence *seq_prefetch_get_original_sequence(struct Sequence *seq, struct Scene *scene);
Sequence *seq_prefetch_get_original_sequence(Sequence *seq, Scene *scene);

View File

@@ -14,9 +14,7 @@ struct Sequence;
struct anim;
#define PROXY_MAXFILE (2 * FILE_MAXDIR + FILE_MAXFILE)
struct ImBuf *seq_proxy_fetch(const struct SeqRenderData *context,
struct Sequence *seq,
int timeline_frame);
bool seq_proxy_get_custom_file_filepath(struct Sequence *seq, char *name, int view_id);
ImBuf *seq_proxy_fetch(const SeqRenderData *context, Sequence *seq, int timeline_frame);
bool seq_proxy_get_custom_file_filepath(Sequence *seq, char *name, int view_id);
void free_proxy_seq(Sequence *seq);
void seq_proxy_index_dir_set(struct anim *anim, const char *base_dir);
void seq_proxy_index_dir_set(anim *anim, const char *base_dir);

View File

@@ -8,11 +8,8 @@
* \ingroup sequencer
*/
#ifdef __cplusplus
extern "C" {
#endif
struct ImBuf;
struct LinkNode;
struct ListBase;
struct Scene;
struct SeqEffectHandle;
@@ -25,42 +22,38 @@ struct Sequence;
#define EARLY_USE_INPUT_2 2
/* mutable state for sequencer */
typedef struct SeqRenderState {
struct LinkNode *scene_parents;
} SeqRenderState;
struct SeqRenderState {
LinkNode *scene_parents;
};
void seq_render_state_init(SeqRenderState *state);
struct ImBuf *seq_render_give_ibuf_seqbase(const struct SeqRenderData *context,
float timeline_frame,
int chan_shown,
struct ListBase *channels,
struct ListBase *seqbasep);
struct ImBuf *seq_render_effect_execute_threaded(struct SeqEffectHandle *sh,
const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
float fac,
struct ImBuf *ibuf1,
struct ImBuf *ibuf2,
struct ImBuf *ibuf3);
void seq_imbuf_to_sequencer_space(struct Scene *scene, struct ImBuf *ibuf, bool make_float);
int seq_get_shown_sequences(const struct Scene *scene,
struct ListBase *channels,
struct ListBase *seqbase,
ImBuf *seq_render_give_ibuf_seqbase(const SeqRenderData *context,
float timeline_frame,
int chan_shown,
ListBase *channels,
ListBase *seqbasep);
ImBuf *seq_render_effect_execute_threaded(SeqEffectHandle *sh,
const SeqRenderData *context,
Sequence *seq,
float timeline_frame,
float fac,
ImBuf *ibuf1,
ImBuf *ibuf2,
ImBuf *ibuf3);
void seq_imbuf_to_sequencer_space(Scene *scene, ImBuf *ibuf, bool make_float);
int seq_get_shown_sequences(const Scene *scene,
ListBase *channels,
ListBase *seqbase,
int timeline_frame,
int chanshown,
struct Sequence **r_seq_arr);
struct ImBuf *seq_render_strip(const struct SeqRenderData *context,
struct SeqRenderState *state,
struct Sequence *seq,
float timeline_frame);
struct ImBuf *seq_render_mask(const struct SeqRenderData *context,
struct Mask *mask,
float frame_index,
bool make_float);
void seq_imbuf_assign_spaces(struct Scene *scene, struct ImBuf *ibuf);
#ifdef __cplusplus
}
#endif
Sequence **r_seq_arr);
ImBuf *seq_render_strip(const SeqRenderData *context,
SeqRenderState *state,
Sequence *seq,
float timeline_frame);
ImBuf *seq_render_mask(const SeqRenderData *context,
Mask *mask,
float frame_index,
bool make_float);
void seq_imbuf_assign_spaces(Scene *scene, ImBuf *ibuf);

View File

@@ -17,8 +17,8 @@ struct StripProxy;
* Cache must be freed before calling this function
* since it leaves the seqbase in an invalid state.
*/
void seq_free_sequence_recurse(struct Scene *scene, struct Sequence *seq, bool do_id_user);
struct StripProxy *seq_strip_proxy_alloc(void);
void seq_free_sequence_recurse(Scene *scene, Sequence *seq, bool do_id_user);
StripProxy *seq_strip_proxy_alloc();
/**
* Find meta strip, that contains strip `key`.
* If lookup hash doesn't exist, it will be created. If hash is tagged as invalid, it will be
@@ -29,8 +29,7 @@ struct StripProxy *seq_strip_proxy_alloc(void);
*
* \return pointer to meta strip
*/
struct Sequence *seq_sequence_lookup_meta_by_seq(const struct Scene *scene,
const struct Sequence *key);
Sequence *seq_sequence_lookup_meta_by_seq(const Scene *scene, const Sequence *key);
/**
* Find effect strips, that use strip `seq` as one of inputs.
* If lookup hash doesn't exist, it will be created. If hash is tagged as invalid, it will be
@@ -41,5 +40,5 @@ struct Sequence *seq_sequence_lookup_meta_by_seq(const struct Scene *scene,
*
* \return collection of effect strips
*/
blender::Span<Sequence *> seq_sequence_lookup_effects_by_seq(const struct Scene *scene,
const struct Sequence *key);
blender::Span<Sequence *> seq_sequence_lookup_effects_by_seq(const Scene *scene,
const Sequence *key);

View File

@@ -15,14 +15,14 @@ struct Scene;
struct Sequence;
struct SeqCollection;
void seq_update_sound_bounds_recursive(const struct Scene *scene, struct Sequence *metaseq);
void seq_update_sound_bounds_recursive(const Scene *scene, Sequence *metaseq);
/* Describes gap between strips in timeline. */
typedef struct GapInfo {
struct GapInfo {
int gap_start_frame; /* Start frame of the gap. */
int gap_length; /* Length of the gap. */
bool gap_exists; /* False if there are no gaps. */
} GapInfo;
};
/**
* Find first gap between strips after initial_frame and describe it by filling data of r_gap_info
@@ -32,19 +32,16 @@ typedef struct GapInfo {
* \param initial_frame: frame on timeline from where gaps are searched for.
* \param r_gap_info: data structure describing gap, that will be filled in by this function.
*/
void seq_time_gap_info_get(const struct Scene *scene,
struct ListBase *seqbase,
void seq_time_gap_info_get(const Scene *scene,
ListBase *seqbase,
int initial_frame,
struct GapInfo *r_gap_info);
void seq_time_effect_range_set(const struct Scene *scene, Sequence *seq);
GapInfo *r_gap_info);
void seq_time_effect_range_set(const Scene *scene, Sequence *seq);
/**
* Update strip `startdisp` and `enddisp` (n-input effects have no length to calculate these).
*/
void seq_time_update_effects_strip_range(const struct Scene *scene,
blender::Span<Sequence *> &effects);
void seq_time_translate_handles(const struct Scene *scene, struct Sequence *seq, const int offset);
float seq_time_media_playback_rate_factor_get(const struct Scene *scene,
const struct Sequence *seq);
int seq_time_strip_original_content_length_get(const struct Scene *scene,
const struct Sequence *seq);
float seq_retiming_evaluate(const struct Sequence *seq, const float frame_index);
void seq_time_update_effects_strip_range(const Scene *scene, blender::Span<Sequence *> &effects);
void seq_time_translate_handles(const Scene *scene, Sequence *seq, const int offset);
float seq_time_media_playback_rate_factor_get(const Scene *scene, const Sequence *seq);
int seq_time_strip_original_content_length_get(const Scene *scene, const Sequence *seq);
float seq_retiming_evaluate(const Sequence *seq, const float frame_index);

View File

@@ -11,6 +11,6 @@
struct ListBase;
struct Scene;
bool sequencer_seq_generates_image(struct Sequence *seq);
void seq_open_anim_file(struct Scene *scene, struct Sequence *seq, bool openfile);
Sequence *SEQ_get_meta_by_seqbase(struct ListBase *seqbase_main, struct ListBase *meta_seqbase);
bool sequencer_seq_generates_image(Sequence *seq);
void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile);
Sequence *SEQ_get_meta_by_seqbase(ListBase *seqbase_main, ListBase *meta_seqbase);