Cleanup: remove redundant const qualifiers for POD types

MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
This commit is contained in:
Campbell Barton 2022-01-07 11:38:08 +11:00
parent bb69c19f08
commit 3d3bc74884
373 changed files with 3058 additions and 3644 deletions

View File

@ -124,7 +124,7 @@ int BLF_draw_mono(int fontid, const char *str, size_t str_len, int cwidth) ATTR_
typedef bool (*BLF_GlyphBoundsFn)(const char *str,
const size_t str_step_ofs,
const struct rcti *glyph_step_bounds,
const int glyph_advance_x,
int glyph_advance_x,
const struct rctf *glyph_bounds,
const int glyph_bearing[2],
void *user_data);
@ -298,9 +298,9 @@ void BLF_dir_free(char **dirs, int count) ATTR_NONNULL();
void BLF_thumb_preview(const char *filename,
const char **draw_str,
const char **i18n_draw_str,
const unsigned char draw_str_lines,
unsigned char draw_str_lines,
const float font_color[4],
const int font_size,
int font_size,
unsigned char *buf,
int w,
int h,
@ -326,8 +326,8 @@ int BLF_set_default(void);
/* blf_font_default.c */
int BLF_load_default(const bool unique);
int BLF_load_mono_default(const bool unique);
int BLF_load_default(bool unique);
int BLF_load_mono_default(bool unique);
#ifdef DEBUG
void BLF_state_print(int fontid);

View File

@ -123,7 +123,7 @@ void blf_font_boundbox_foreach_glyph(struct FontBLF *font,
bool (*user_fn)(const char *str,
const size_t str_step_ofs,
const struct rcti *glyph_step_bounds,
const int glyph_advance_x,
int glyph_advance_x,
const struct rctf *glyph_bounds,
const int glyph_bearing[2],
void *user_data),

View File

@ -376,7 +376,7 @@ void DM_interp_vert_data(struct DerivedMesh *source,
int count,
int dest_index);
void mesh_get_mapped_verts_coords(struct Mesh *me_eval, float (*r_cos)[3], const int totcos);
void mesh_get_mapped_verts_coords(struct Mesh *me_eval, float (*r_cos)[3], int totcos);
/**
* Same as above but won't use render settings.

View File

@ -117,9 +117,7 @@ bool BKE_animdata_copy_id(struct Main *bmain, struct ID *id_to, struct ID *id_fr
*/
void BKE_animdata_copy_id_action(struct Main *bmain, struct ID *id);
void BKE_animdata_duplicate_id_action(struct Main *bmain,
struct ID *id,
const uint duplicate_flags);
void BKE_animdata_duplicate_id_action(struct Main *bmain, struct ID *id, uint duplicate_flags);
/* Merge copies of data from source AnimData block */
typedef enum eAnimData_MergeCopy_Modes {

View File

@ -88,26 +88,21 @@ bool BKE_appdir_folder_caches(char *r_path, size_t path_len);
* this may contain path separators but must resolve to a directory, checked with #BLI_is_dir.
* \return The path if found, NULL string if not.
*/
bool BKE_appdir_folder_id_ex(const int folder_id,
const char *subfolder,
char *path,
size_t path_len);
const char *BKE_appdir_folder_id(const int folder_id, const char *subfolder);
bool BKE_appdir_folder_id_ex(int folder_id, const char *subfolder, char *path, size_t path_len);
const char *BKE_appdir_folder_id(int folder_id, const char *subfolder);
/**
* Returns the path to a folder in the user area, creating it if it doesn't exist.
*/
const char *BKE_appdir_folder_id_create(const int folder_id, const char *subfolder);
const char *BKE_appdir_folder_id_create(int folder_id, const char *subfolder);
/**
* Returns the path to a folder in the user area without checking that it actually exists first.
*/
const char *BKE_appdir_folder_id_user_notest(const int folder_id, const char *subfolder);
const char *BKE_appdir_folder_id_user_notest(int folder_id, const char *subfolder);
/**
* Returns the path of the top-level version-specific local, user or system directory.
* If check_is_dir, then the result will be NULL if the directory doesn't exist.
*/
const char *BKE_appdir_folder_id_version(const int folder_id,
const int version,
const bool check_is_dir);
const char *BKE_appdir_folder_id_version(int folder_id, int version, bool check_is_dir);
/**
* Check if this is an install with user files kept together
@ -146,8 +141,8 @@ bool BKE_appdir_font_folder_default(char *dir);
*/
bool BKE_appdir_program_python_search(char *fullpath,
const size_t fullpath_len,
const int version_major,
const int version_minor);
int version_major,
int version_minor);
/**
* Initialize path to temporary directory.

View File

@ -63,7 +63,7 @@ struct AssetLibrary {
void on_blend_save_handler_register();
void on_blend_save_handler_unregister();
void on_blend_save_post(struct Main *, struct PointerRNA **pointers, const int num_pointers);
void on_blend_save_post(struct Main *, struct PointerRNA **pointers, int num_pointers);
private:
bCallbackFuncStore on_save_callback_store_{};

View File

@ -54,19 +54,16 @@ typedef enum AttributeDomain {
bool BKE_id_attributes_supported(struct ID *id);
struct CustomDataLayer *BKE_id_attribute_new(struct ID *id,
const char *name,
const int type,
const AttributeDomain domain,
struct ReportList *reports);
struct CustomDataLayer *BKE_id_attribute_new(
struct ID *id, const char *name, int type, AttributeDomain domain, struct ReportList *reports);
bool BKE_id_attribute_remove(struct ID *id,
struct CustomDataLayer *layer,
struct ReportList *reports);
struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id,
const char *name,
const int type,
const AttributeDomain domain);
int type,
AttributeDomain domain);
AttributeDomain BKE_id_attribute_domain(struct ID *id, struct CustomDataLayer *layer);
int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer);

View File

@ -264,7 +264,7 @@ class OutputAttribute {
OutputAttribute(GVMutableArray varray,
AttributeDomain domain,
SaveFn save,
const bool ignore_old_values);
bool ignore_old_values);
~OutputAttribute();
@ -387,7 +387,7 @@ class CustomDataAttributes {
CustomDataAttributes(CustomDataAttributes &&other);
CustomDataAttributes &operator=(const CustomDataAttributes &other);
void reallocate(const int size);
void reallocate(int size);
void clear();
@ -423,8 +423,7 @@ class CustomDataAttributes {
*/
void reorder(Span<AttributeIDRef> new_order);
bool foreach_attribute(const AttributeForeachCallback callback,
const AttributeDomain domain) const;
bool foreach_attribute(const AttributeForeachCallback callback, AttributeDomain domain) const;
};
/* -------------------------------------------------------------------- */

View File

@ -141,7 +141,7 @@ inline ColorGeometry4f mix3(const float3 &weights,
* This is just basic linear interpolation.
* \{ */
template<typename T> T mix2(const float factor, const T &a, const T &b);
template<typename T> T mix2(float factor, const T &a, const T &b);
template<> inline bool mix2(const float factor, const bool &a, const bool &b)
{
@ -287,7 +287,7 @@ class ColorGeometryMixer {
public:
ColorGeometryMixer(MutableSpan<ColorGeometry4f> buffer,
ColorGeometry4f default_color = ColorGeometry4f(0.0f, 0.0f, 0.0f, 1.0f));
void mix_in(const int64_t index, const ColorGeometry4f &color, const float weight = 1.0f);
void mix_in(int64_t index, const ColorGeometry4f &color, float weight = 1.0f);
void finalize();
};

View File

@ -63,7 +63,7 @@ bool BKE_copybuffer_copy_end(struct Main *bmain_src,
bool BKE_copybuffer_read(struct Main *bmain_dst,
const char *libname,
struct ReportList *reports,
const uint64_t id_types_mask);
uint64_t id_types_mask);
/**
* Paste data-blocks from the given .blend file 'buffer' (i.e. append them).
*
@ -80,9 +80,9 @@ bool BKE_copybuffer_read(struct Main *bmain_dst,
*/
int BKE_copybuffer_paste(struct bContext *C,
const char *libname,
const int flag,
int flag,
struct ReportList *reports,
const uint64_t id_types_mask);
uint64_t id_types_mask);
#ifdef __cplusplus
}

View File

@ -34,8 +34,8 @@ enum eUndoStepDir;
struct MemFileUndoData *BKE_memfile_undo_encode(struct Main *bmain,
struct MemFileUndoData *mfu_prev);
bool BKE_memfile_undo_decode(struct MemFileUndoData *mfu,
const enum eUndoStepDir undo_direction,
const bool use_old_bmain_data,
enum eUndoStepDir undo_direction,
bool use_old_bmain_data,
struct bContext *C);
void BKE_memfile_undo_free(struct MemFileUndoData *mfu);

View File

@ -46,7 +46,7 @@ void BKE_blendfile_read_setup_ex(struct bContext *C,
const struct BlendFileReadParams *params,
struct BlendFileReadReport *reports,
/* Extra args. */
const bool startup_update_defaults,
bool startup_update_defaults,
const char *startup_app_template);
void BKE_blendfile_read_setup(struct bContext *C,
@ -127,8 +127,8 @@ void BKE_blendfile_write_partial_begin(struct Main *bmain_src);
*/
bool BKE_blendfile_write_partial(struct Main *bmain_src,
const char *filepath,
const int write_flags,
const int remap_mode,
int write_flags,
int remap_mode,
struct ReportList *reports);
void BKE_blendfile_write_partial_end(struct Main *bmain_src);

View File

@ -54,8 +54,8 @@ void BKE_blendfile_link_append_context_free(struct BlendfileLinkAppendContext *l
* \param do_set: Set the given \a flag if true, clear it otherwise.
*/
void BKE_blendfile_link_append_context_flag_set(struct BlendfileLinkAppendContext *lapp_context,
const int flag,
const bool do_set);
int flag,
bool do_set);
/**
* Store reference to a Blender's embedded memfile into the context.
@ -98,7 +98,7 @@ void BKE_blendfile_link_append_context_library_add(struct BlendfileLinkAppendCon
struct BlendfileLinkAppendContextItem *BKE_blendfile_link_append_context_item_add(
struct BlendfileLinkAppendContext *lapp_context,
const char *idname,
const short idcode,
short idcode,
void *userdata);
#define BLENDFILE_LINK_APPEND_INVALID -1
@ -119,8 +119,8 @@ struct BlendfileLinkAppendContextItem *BKE_blendfile_link_append_context_item_ad
int BKE_blendfile_link_append_context_item_idtypes_from_library_add(
struct BlendfileLinkAppendContext *lapp_context,
struct ReportList *reports,
const uint64_t id_types_filter,
const int library_index);
uint64_t id_types_filter,
int library_index);
/**
* Enable search of the given \a item into the library stored at given index in the link/append
@ -129,7 +129,7 @@ int BKE_blendfile_link_append_context_item_idtypes_from_library_add(
void BKE_blendfile_link_append_context_item_library_index_enable(
struct BlendfileLinkAppendContext *lapp_context,
struct BlendfileLinkAppendContextItem *item,
const int library_index);
int library_index);
/**
* Check if given link/append context is empty (has no items to process) or not.
*/
@ -175,7 +175,7 @@ typedef bool (*BKE_BlendfileLinkAppendContexteItemFunction)(
void BKE_blendfile_link_append_context_item_foreach(
struct BlendfileLinkAppendContext *lapp_context,
BKE_BlendfileLinkAppendContexteItemFunction callback_function,
const eBlendfileLinkAppendForeachItemFlag flag,
eBlendfileLinkAppendForeachItemFlag flag,
void *userdata);
/**
@ -215,7 +215,7 @@ void BKE_blendfile_link(struct BlendfileLinkAppendContext *lapp_context,
void BKE_blendfile_library_relocate(struct BlendfileLinkAppendContext *lapp_context,
struct ReportList *reports,
struct Library *library,
const bool do_reload);
bool do_reload);
#ifdef __cplusplus
}

View File

@ -171,7 +171,7 @@ void BKE_bpath_missing_files_check(struct Main *bmain, struct ReportList *report
void BKE_bpath_missing_files_find(struct Main *bmain,
const char *searchpath,
struct ReportList *reports,
const bool find_all);
bool find_all);
/** Rebase all relative file paths in given \a bmain from \a basedir_src to \a basedir_dst. */
void BKE_bpath_relative_rebase(struct Main *bmain,
@ -193,16 +193,14 @@ void BKE_bpath_absolute_convert(struct Main *bmain,
*
* \return An opaque handle to pass to #BKE_bpath_list_restore and #BKE_bpath_list_free.
*/
void *BKE_bpath_list_backup(struct Main *bmain, const eBPathForeachFlag flag);
void *BKE_bpath_list_backup(struct Main *bmain, eBPathForeachFlag flag);
/** Restore the temp backup of paths from \a path_list_handle into all IDs in given \a bmain.
*
* \note This function assumes that the data in given Main did not change (no
* addition/deletion/re-ordering of IDs, or their file paths) since the call to
* #BKE_bpath_list_backup that generated the given \a path_list_handle. */
void BKE_bpath_list_restore(struct Main *bmain,
const eBPathForeachFlag flag,
void *path_list_handle);
void BKE_bpath_list_restore(struct Main *bmain, eBPathForeachFlag flag, void *path_list_handle);
/** Free the temp backup of paths in \a path_list_handle.
*

View File

@ -50,7 +50,7 @@ void BKE_brush_system_exit(void);
* \note Resulting brush will have two users: one as a fake user,
* another is assumed to be used by the caller.
*/
struct Brush *BKE_brush_add(struct Main *bmain, const char *name, const eObjectMode ob_mode);
struct Brush *BKE_brush_add(struct Main *bmain, const char *name, eObjectMode ob_mode);
/**
* Add a new gp-brush.
*/
@ -66,35 +66,27 @@ bool BKE_brush_delete(struct Main *bmain, struct Brush *brush);
* Add grease pencil settings.
*/
void BKE_brush_init_gpencil_settings(struct Brush *brush);
struct Brush *BKE_brush_first_search(struct Main *bmain, const eObjectMode ob_mode);
struct Brush *BKE_brush_first_search(struct Main *bmain, eObjectMode ob_mode);
void BKE_brush_sculpt_reset(struct Brush *brush);
/**
* Create a set of grease pencil Drawing presets.
*/
void BKE_brush_gpencil_paint_presets(struct Main *bmain,
struct ToolSettings *ts,
const bool reset);
void BKE_brush_gpencil_paint_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
/**
* Create a set of grease pencil Vertex Paint presets.
*/
void BKE_brush_gpencil_vertex_presets(struct Main *bmain,
struct ToolSettings *ts,
const bool reset);
void BKE_brush_gpencil_vertex_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
/**
* Create a set of grease pencil Sculpt Paint presets.
*/
void BKE_brush_gpencil_sculpt_presets(struct Main *bmain,
struct ToolSettings *ts,
const bool reset);
void BKE_brush_gpencil_sculpt_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
/**
* Create a set of grease pencil Weight Paint presets.
*/
void BKE_brush_gpencil_weight_presets(struct Main *bmain,
struct ToolSettings *ts,
const bool reset);
void BKE_gpencil_brush_preset_set(struct Main *bmain, struct Brush *brush, const short type);
void BKE_brush_gpencil_weight_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
void BKE_gpencil_brush_preset_set(struct Main *bmain, struct Brush *brush, short type);
void BKE_brush_jitter_pos(const struct Scene *scene,
struct Brush *brush,
@ -130,12 +122,12 @@ float BKE_brush_sample_tex_3d(const struct Scene *scene,
const struct Brush *br,
const float point[3],
float rgba[4],
const int thread,
int thread,
struct ImagePool *pool);
float BKE_brush_sample_masktex(const struct Scene *scene,
struct Brush *br,
const float point[2],
const int thread,
int thread,
struct ImagePool *pool);
/* Texture. */

View File

@ -141,8 +141,8 @@ BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data,
*/
BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data,
const struct MVert *vert,
const int verts_num,
const bool vert_allocated,
int verts_num,
bool vert_allocated,
const BLI_bitmap *verts_mask,
int verts_num_active,
float epsilon,
@ -179,10 +179,10 @@ BVHTree *bvhtree_from_editmesh_edges_ex(BVHTreeFromEditMesh *data,
*/
BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data,
const struct MVert *vert,
const bool vert_allocated,
bool vert_allocated,
const struct MEdge *edge,
const int edges_num,
const bool edge_allocated,
int edges_num,
bool edge_allocated,
const BLI_bitmap *edges_mask,
int edges_num_active,
float epsilon,
@ -203,10 +203,10 @@ BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data,
*/
BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data,
const struct MVert *vert,
const bool vert_allocated,
bool vert_allocated,
const struct MFace *face,
const int numFaces,
const bool face_allocated,
int numFaces,
bool face_allocated,
const BLI_bitmap *faces_mask,
int faces_num_active,
float epsilon,
@ -240,12 +240,12 @@ BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data,
*/
BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data,
const struct MVert *vert,
const bool vert_allocated,
bool vert_allocated,
const struct MLoop *mloop,
const bool loop_allocated,
bool loop_allocated,
const struct MLoopTri *looptri,
const int looptri_num,
const bool looptri_allocated,
int looptri_num,
bool looptri_allocated,
const BLI_bitmap *mask,
int looptri_num_active,
float epsilon,
@ -264,14 +264,14 @@ BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data,
BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data,
const struct Mesh *mesh,
const BVHCacheType bvh_cache_type,
const int tree_type);
int tree_type);
/**
* Builds or queries a BVH-cache for the cache BVH-tree of the request type.
*/
BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data,
struct BMEditMesh *em,
const int tree_type,
int tree_type,
const BVHCacheType bvh_cache_type,
struct BVHCache **bvh_cache_p,
ThreadMutex *mesh_eval_mutex);
@ -288,14 +288,11 @@ void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data);
/**
* Math functions used by callbacks
*/
float bvhtree_ray_tri_intersection(const BVHTreeRay *ray,
const float m_dist,
const float v0[3],
const float v1[3],
const float v2[3]);
float bvhtree_ray_tri_intersection(
const BVHTreeRay *ray, float m_dist, const float v0[3], const float v1[3], const float v2[3]);
float bvhtree_sphereray_tri_intersection(const BVHTreeRay *ray,
float radius,
const float m_dist,
float m_dist,
const float v0[3],
const float v1[3],
const float v2[3]);
@ -310,7 +307,7 @@ typedef struct BVHTreeFromPointCloud {
BVHTree *BKE_bvhtree_from_pointcloud_get(struct BVHTreeFromPointCloud *data,
const struct PointCloud *pointcloud,
const int tree_type);
int tree_type);
void free_bvhtree_from_pointcloud(struct BVHTreeFromPointCloud *data);

View File

@ -114,14 +114,14 @@ typedef enum {
typedef struct bCallbackFuncStore {
struct bCallbackFuncStore *next, *prev;
void (*func)(struct Main *, struct PointerRNA **, const int num_pointers, void *arg);
void (*func)(struct Main *, struct PointerRNA **, int num_pointers, void *arg);
void *arg;
short alloc;
} bCallbackFuncStore;
void BKE_callback_exec(struct Main *bmain,
struct PointerRNA **pointers,
const int num_pointers,
int num_pointers,
eCbEvent evt);
void BKE_callback_exec_null(struct Main *bmain, eCbEvent evt);
void BKE_callback_exec_id(struct Main *bmain, struct ID *id, eCbEvent evt);

View File

@ -110,8 +110,8 @@ void BKE_camera_params_compute_matrix(CameraParams *params);
void BKE_camera_view_frame_ex(const struct Scene *scene,
const struct Camera *camera,
const float drawsize,
const bool do_clip,
float drawsize,
bool do_clip,
const float scale[3],
float r_asp[2],
float r_shift[2],
@ -151,7 +151,7 @@ struct Object *BKE_camera_multiview_render(const struct Scene *scene,
*/
void BKE_camera_multiview_view_matrix(const struct RenderData *rd,
const struct Object *camera,
const bool is_left,
bool is_left,
float r_viewmat[4][4]);
void BKE_camera_multiview_model_matrix(const struct RenderData *rd,
const struct Object *camera,

View File

@ -102,8 +102,8 @@ bool BKE_collection_delete(struct Main *bmain, struct Collection *collection, bo
struct Collection *BKE_collection_duplicate(struct Main *bmain,
struct Collection *parent,
struct Collection *collection,
const uint duplicate_flags,
const uint duplicate_options);
uint duplicate_flags,
uint duplicate_options);
/* Master Collection for Scene */
@ -144,7 +144,7 @@ void BKE_collection_object_add_from(struct Main *bmain,
bool BKE_collection_object_remove(struct Main *bmain,
struct Collection *collection,
struct Object *object,
const bool free_us);
bool free_us);
/**
* Move object from a collection into another
*
@ -162,7 +162,7 @@ void BKE_collection_object_move(struct Main *bmain,
bool BKE_scene_collections_object_remove(struct Main *bmain,
struct Scene *scene,
struct Object *object,
const bool free_us);
bool free_us);
/**
* Check all collections in \a bmain (including embedded ones in scenes) for CollectionObject with
@ -218,7 +218,7 @@ struct Base *BKE_collection_or_layer_objects(const struct ViewLayer *view_layer,
*
* The index is calculated from top to bottom counting the children before the siblings.
*/
struct Collection *BKE_collection_from_index(struct Scene *scene, const int index);
struct Collection *BKE_collection_from_index(struct Scene *scene, int index);
/**
* The automatic/fallback name of a new collection.
*/

View File

@ -122,9 +122,9 @@ void bvhtree_update_from_mvert(struct BVHTree *bvhtree,
* \param step: is limited from 0 (frame start position) to 1 (frame end position).
*/
void collision_move_object(struct CollisionModifierData *collmd,
const float step,
const float prevstep,
const bool moving_bvh);
float step,
float prevstep,
bool moving_bvh);
void collision_get_collider_velocity(float vel_old[3],
float vel_new[3],

View File

@ -34,7 +34,7 @@ struct ColorBand;
void BKE_colorband_init(struct ColorBand *coba, bool rangetype);
void BKE_colorband_init_from_table_rgba(struct ColorBand *coba,
const float (*array)[4],
const int array_len,
int array_len,
bool filter_sample);
struct ColorBand *BKE_colorband_add(bool rangetype);
bool BKE_colorband_evaluate(const struct ColorBand *coba, float in, float out[4]);

View File

@ -67,7 +67,7 @@ void BKE_curvemap_reset(struct CurveMap *cuma, const struct rctf *clipr, int pre
/**
* Removes with flag set.
*/
void BKE_curvemap_remove(struct CurveMap *cuma, const short flag);
void BKE_curvemap_remove(struct CurveMap *cuma, short flag);
/**
* Remove specified point.
*/
@ -81,7 +81,7 @@ void BKE_curvemap_handle_set(struct CurveMap *cuma, int type);
/**
* \note only does current curvemap!.
*/
void BKE_curvemapping_changed(struct CurveMapping *cumap, const bool rem_doubles);
void BKE_curvemapping_changed(struct CurveMapping *cumap, bool rem_doubles);
void BKE_curvemapping_changed_all(struct CurveMapping *cumap);
/**

View File

@ -253,10 +253,7 @@ ListBase CTX_data_collection_get(const bContext *C, const char *member);
* \param use_rna: Use Include the properties from 'RNA_Context'.
* \param use_all: Don't skip values (currently only "scene").
*/
ListBase CTX_data_dir_get_ex(const bContext *C,
const bool use_store,
const bool use_rna,
const bool use_all);
ListBase CTX_data_dir_get_ex(const bContext *C, bool use_store, bool use_rna, bool use_all);
ListBase CTX_data_dir_get(const bContext *C);
int /*eContextResult*/ CTX_data_get(
const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb, short *r_type);
@ -320,7 +317,7 @@ struct ToolSettings *CTX_data_tool_settings(const bContext *C);
const char *CTX_data_mode_string(const bContext *C);
enum eContextObjectMode CTX_data_mode_enum_ex(const struct Object *obedit,
const struct Object *ob,
const eObjectMode object_mode);
eObjectMode object_mode);
enum eContextObjectMode CTX_data_mode_enum(const bContext *C);
void CTX_data_main_set(bContext *C, struct Main *bmain);

View File

@ -43,7 +43,7 @@ void BKE_crazyspace_set_quats_editmesh(struct BMEditMesh *em,
float (*origcos)[3],
float (*mappedcos)[3],
float (*quats)[4],
const bool use_select);
bool use_select);
void BKE_crazyspace_set_quats_mesh(struct Mesh *me,
float (*origcos)[3],
float (*mappedcos)[3],

View File

@ -59,7 +59,7 @@ float BKE_cryptomatte_hash_to_float(uint32_t cryptomatte_hash);
* Find an ID in the given main that matches the given encoded float.
*/
bool BKE_cryptomatte_find_name(const struct CryptomatteSession *session,
const float encoded_hash,
float encoded_hash,
char *r_name,
int name_len);

View File

@ -70,7 +70,7 @@ struct CryptomatteHash {
uint32_t hash;
CryptomatteHash(uint32_t hash);
CryptomatteHash(const char *name, const int name_len);
CryptomatteHash(const char *name, int name_len);
static CryptomatteHash from_hex_encoded(blender::StringRef hex_encoded);
std::string hex_encoded() const;

View File

@ -90,7 +90,7 @@ typedef struct CVKeyIndex {
* Frees edit-curve entirely.
*/
void BKE_curve_editfont_free(struct Curve *cu);
void BKE_curve_init(struct Curve *cu, const short curve_type);
void BKE_curve_init(struct Curve *cu, short curve_type);
struct Curve *BKE_curve_add(struct Main *bmain, const char *name, int type);
short BKE_curve_type_get(const struct Curve *cu);
void BKE_curve_type_test(struct Object *ob);
@ -106,23 +106,17 @@ void BKE_curve_texspace_ensure(struct Curve *cu);
bool BKE_curve_minmax(struct Curve *cu, bool use_radius, float min[3], float max[3]);
bool BKE_curve_center_median(struct Curve *cu, float cent[3]);
bool BKE_curve_center_bounds(struct Curve *cu, float cent[3]);
void BKE_curve_transform_ex(struct Curve *cu,
const float mat[4][4],
const bool do_keys,
const bool do_props,
const float unit_scale);
void BKE_curve_transform(struct Curve *cu,
const float mat[4][4],
const bool do_keys,
const bool do_props);
void BKE_curve_translate(struct Curve *cu, const float offset[3], const bool do_keys);
void BKE_curve_transform_ex(
struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props, float unit_scale);
void BKE_curve_transform(struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props);
void BKE_curve_translate(struct Curve *cu, const float offset[3], bool do_keys);
void BKE_curve_material_index_remove(struct Curve *cu, int index);
bool BKE_curve_material_index_used(const struct Curve *cu, int index);
void BKE_curve_material_index_clear(struct Curve *cu);
bool BKE_curve_material_index_validate(struct Curve *cu);
void BKE_curve_material_remap(struct Curve *cu, const unsigned int *remap, unsigned int remap_len);
void BKE_curve_smooth_flag_set(struct Curve *cu, const bool use_smooth);
void BKE_curve_smooth_flag_set(struct Curve *cu, bool use_smooth);
/**
* \return edit-nurbs or normal nurbs list.
@ -155,11 +149,11 @@ void BKE_curve_nurbs_vert_coords_get(const struct ListBase *lb,
void BKE_curve_nurbs_vert_coords_apply_with_mat4(struct ListBase *lb,
const float (*vert_coords)[3],
const float mat[4][4],
const bool constrain_2d);
bool constrain_2d);
void BKE_curve_nurbs_vert_coords_apply(struct ListBase *lb,
const float (*vert_coords)[3],
const bool constrain_2d);
bool constrain_2d);
float (*BKE_curve_nurbs_key_vert_coords_alloc(const struct ListBase *lb,
float *key,
@ -202,7 +196,7 @@ void BKE_curve_correct_bezpart(const float v1[2], float v2[2], float v3[2], cons
/* ** Nurbs ** */
bool BKE_nurbList_index_get_co(struct ListBase *editnurb, const int index, float r_co[3]);
bool BKE_nurbList_index_get_co(struct ListBase *editnurb, int index, float r_co[3]);
int BKE_nurbList_verts_count(const struct ListBase *nurb);
int BKE_nurbList_verts_count_without_handles(const struct ListBase *nurb);
@ -218,10 +212,8 @@ void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2);
* - 5: Set align, like 3 but no toggle.
* - 6: Clear align (setting #HD_FREE), like 3 but no toggle.
*/
void BKE_nurbList_handles_set(struct ListBase *editnurb, const char code);
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb,
const bool calc_length,
const uint8_t flag);
void BKE_nurbList_handles_set(struct ListBase *editnurb, char code);
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, bool calc_length, uint8_t flag);
void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag);
void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set);
@ -266,10 +258,10 @@ void BKE_nurb_makeCurve(const struct Nurb *nu,
/**
* Calculate the length for arrays filled in by #BKE_curve_calc_coords_axis.
*/
unsigned int BKE_curve_calc_coords_axis_len(const unsigned int bezt_array_len,
const unsigned int resolu,
const bool is_cyclic,
const bool use_cyclic_duplicate_endpoint);
unsigned int BKE_curve_calc_coords_axis_len(unsigned int bezt_array_len,
unsigned int resolu,
bool is_cyclic,
bool use_cyclic_duplicate_endpoint);
/**
* Calculate an array for the entire curve (cyclic or non-cyclic).
* \note Call for each axis.
@ -277,13 +269,13 @@ unsigned int BKE_curve_calc_coords_axis_len(const unsigned int bezt_array_len,
* \param use_cyclic_duplicate_endpoint: Duplicate values at the beginning & end of the array.
*/
void BKE_curve_calc_coords_axis(const struct BezTriple *bezt_array,
const unsigned int bezt_array_len,
const unsigned int resolu,
const bool is_cyclic,
const bool use_cyclic_duplicate_endpoint,
unsigned int bezt_array_len,
unsigned int resolu,
bool is_cyclic,
bool use_cyclic_duplicate_endpoint,
/* array params */
const unsigned int axis,
const unsigned int stride,
unsigned int axis,
unsigned int stride,
float *r_points);
void BKE_nurb_knot_calc_u(struct Nurb *nu);
@ -301,10 +293,7 @@ void BKE_nurb_direction_switch(struct Nurb *nu);
/**
* \note caller must ensure active vertex remains valid.
*/
bool BKE_nurb_type_convert(struct Nurb *nu,
const short type,
const bool use_handles,
const char **r_err_msg);
bool BKE_nurb_type_convert(struct Nurb *nu, short type, bool use_handles, const char **r_err_msg);
/**
* Be sure to call #BKE_nurb_knot_calc_u / #BKE_nurb_knot_calc_v after this.
@ -333,8 +322,8 @@ void BKE_nurb_bpoint_calc_plane(struct Nurb *nu, struct BPoint *bp, float r_plan
void BKE_nurb_handle_calc(struct BezTriple *bezt,
struct BezTriple *prev,
struct BezTriple *next,
const bool is_fcurve,
const char smoothing);
bool is_fcurve,
char smoothing);
/**
* Variant of #BKE_nurb_handle_calc() that allows calculating based on a different select flag.
*
@ -345,9 +334,9 @@ void BKE_nurb_handle_calc(struct BezTriple *bezt,
void BKE_nurb_handle_calc_ex(struct BezTriple *bezt,
struct BezTriple *prev,
struct BezTriple *next,
const eBezTriple_Flag__Alias handle_sel_flag,
const bool is_fcurve,
const char smoothing);
eBezTriple_Flag__Alias handle_sel_flag,
bool is_fcurve,
char smoothing);
/**
* Similar to #BKE_nurb_handle_calc but for curves and figures out the previous and next for us.
*/
@ -371,10 +360,10 @@ void BKE_nurb_handles_autocalc(struct Nurb *nu, uint8_t flag);
* handles if the key is selected.
*/
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt,
const eBezTriple_Flag__Alias sel_flag,
const bool use_handle,
const bool use_around_local);
void BKE_nurb_handles_test(struct Nurb *nu, const bool use_handles, const bool use_around_local);
eBezTriple_Flag__Alias sel_flag,
bool use_handle,
bool use_around_local);
void BKE_nurb_handles_test(struct Nurb *nu, bool use_handles, bool use_around_local);
/* **** Depsgraph evaluation **** */
@ -398,18 +387,18 @@ extern void (*BKE_curve_batch_cache_free_cb)(struct Curve *cu);
* \{ */
unsigned int BKE_curve_decimate_bezt_array(struct BezTriple *bezt_array,
const unsigned int bezt_array_len,
const unsigned int resolu,
const bool is_cyclic,
const char flag_test,
const char flag_set,
const float error_sq_max,
const unsigned int error_target_len);
unsigned int bezt_array_len,
unsigned int resolu,
bool is_cyclic,
char flag_test,
char flag_set,
float error_sq_max,
unsigned int error_target_len);
void BKE_curve_decimate_nurb(struct Nurb *nu,
const unsigned int resolu,
const float error_sq_max,
const unsigned int error_target_len);
unsigned int resolu,
float error_sq_max,
unsigned int error_target_len);
/** \} */
@ -420,19 +409,19 @@ void BKE_curve_decimate_nurb(struct Nurb *nu,
void BKE_curve_deform_coords(const struct Object *ob_curve,
const struct Object *ob_target,
float (*vert_coords)[3],
const int vert_coords_len,
int vert_coords_len,
const struct MDeformVert *dvert,
const int defgrp_index,
const short flag,
const short defaxis);
int defgrp_index,
short flag,
short defaxis);
void BKE_curve_deform_coords_with_editmesh(const struct Object *ob_curve,
const struct Object *ob_target,
float (*vert_coords)[3],
const int vert_coords_len,
const int defgrp_index,
const short flag,
const short defaxis,
int vert_coords_len,
int defgrp_index,
short flag,
short defaxis,
struct BMEditMesh *em_target);
/**
@ -445,7 +434,7 @@ void BKE_curve_deform_co(const struct Object *ob_curve,
const struct Object *ob_target,
const float orco[3],
float vec[3],
const int no_rot_axis,
int no_rot_axis,
float r_mat[3][3]);
/** \} */

View File

@ -62,8 +62,8 @@ struct CurveProfile *BKE_curveprofile_copy(const struct CurveProfile *profile);
* \return Whether the handle moved from its start position.
*/
bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point,
const bool handle_1,
const bool snap,
bool handle_1,
bool snap,
const float delta[2]);
/**
@ -76,7 +76,7 @@ bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point,
*/
bool BKE_curveprofile_move_point(struct CurveProfile *profile,
struct CurveProfilePoint *point,
const bool snap,
bool snap,
const float delta[2]);
/**
@ -92,7 +92,7 @@ bool BKE_curveprofile_remove_point(struct CurveProfile *profile, struct CurvePro
*
* \note Requires #BKE_curveprofile_update call after.
*/
void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, const short flag);
void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag);
/**
* Adds a new point at the specified location. The choice for which points to place the new vertex
@ -151,7 +151,7 @@ enum {
* \param update_flags: Bit-field with fields defined in header file.
* Controls removing doubles and clipping.
*/
void BKE_curveprofile_update(struct CurveProfile *profile, const int update_flags);
void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags);
/**
* Does a single evaluation along the profile's path.

View File

@ -84,7 +84,7 @@ void customData_mask_layers__print(const struct CustomData_MeshMasks *mask);
typedef void (*cd_interp)(
const void **sources, const float *weights, const float *sub_weights, int count, void *dest);
typedef void (*cd_copy)(const void *source, void *dest, int count);
typedef bool (*cd_validate)(void *item, const uint totitems, const bool do_fixes);
typedef bool (*cd_validate)(void *item, uint totitems, bool do_fixes);
/**
* Update mask_dst with layers defined in mask_src (equivalent to a bit-wise OR).
@ -131,7 +131,7 @@ void CustomData_data_copy_value(int type, const void *source, void *dest);
* another, while not overwriting anything else (e.g. flags).
*/
void CustomData_data_mix_value(
int type, const void *source, void *dest, const int mixmode, const float mixfactor);
int type, const void *source, void *dest, int mixmode, float mixfactor);
/**
* Compares if data1 is equal to data2. type is a valid CustomData type
@ -187,7 +187,7 @@ bool CustomData_bmesh_merge(const struct CustomData *source,
CustomDataMask mask,
eCDAllocType alloctype,
struct BMesh *bm,
const char htype);
char htype);
/**
* NULL's all members and resets the #CustomData.typemap.
@ -268,22 +268,17 @@ int CustomData_number_of_layers_typemask(const struct CustomData *data, CustomDa
* Duplicate data of a layer with flag NOFREE, and remove that flag.
* \return the layer data.
*/
void *CustomData_duplicate_referenced_layer(struct CustomData *data,
const int type,
const int totelem);
void *CustomData_duplicate_referenced_layer(struct CustomData *data, int type, int totelem);
void *CustomData_duplicate_referenced_layer_n(struct CustomData *data,
const int type,
const int n,
const int totelem);
int type,
int n,
int totelem);
void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
const int type,
int type,
const char *name,
const int totelem);
int totelem);
void *CustomData_duplicate_referenced_layer_anonymous(
CustomData *data,
const int type,
const struct AnonymousAttributeID *anonymous_id,
const int totelem);
CustomData *data, int type, const struct AnonymousAttributeID *anonymous_id, int totelem);
bool CustomData_is_referenced_layer(struct CustomData *data, int type);
/**
@ -394,7 +389,7 @@ void CustomData_swap_corners(struct CustomData *data, int index, const int *corn
/**
* Swap two items of given custom data, in all available layers.
*/
void CustomData_swap(struct CustomData *data, const int index_a, const int index_b);
void CustomData_swap(struct CustomData *data, int index_a, int index_b);
/**
* Gets a pointer to the data element at index from the first layer of type.
@ -544,7 +539,7 @@ bool CustomData_layertype_is_dynamic(int type);
/**
* \return Maximum number of layers of given \a type, -1 means 'no limit'.
*/
int CustomData_layertype_layers_max(const int type);
int CustomData_layertype_layers_max(int type);
/**
* Make sure the name of layer at index is unique.
@ -577,7 +572,7 @@ void CustomData_bmesh_update_active_layers(struct CustomData *fdata, struct Cust
*/
void CustomData_bmesh_do_versions_update_active_layers(struct CustomData *fdata,
struct CustomData *ldata);
void CustomData_bmesh_init_pool(struct CustomData *data, int totelem, const char htype);
void CustomData_bmesh_init_pool(struct CustomData *data, int totelem, char htype);
#ifndef NDEBUG
/**
@ -595,9 +590,7 @@ bool CustomData_from_bmeshpoly_test(CustomData *fdata, CustomData *ldata, bool f
*
* \return True if some errors were found.
*/
bool CustomData_layer_validate(struct CustomDataLayer *layer,
const uint totitems,
const bool do_fixes);
bool CustomData_layer_validate(struct CustomDataLayer *layer, uint totitems, bool do_fixes);
void CustomData_layers__print(struct CustomData *data);
/* External file storage */
@ -627,8 +620,8 @@ typedef void (*cd_datatransfer_interp)(const struct CustomDataTransferLayerMap *
void *dest,
const void **sources,
const float *weights,
const int count,
const float mix_factor);
int count,
float mix_factor);
/**
* Fake CD_LAYERS (those are actually 'real' data stored directly into elements' structs,

View File

@ -63,19 +63,19 @@ enum {
DT_TYPE_POLY_ALL = DT_TYPE_UV | DT_TYPE_SHARP_FACE | DT_TYPE_FREESTYLE_FACE,
};
void BKE_object_data_transfer_dttypes_to_cdmask(const int dtdata_types,
void BKE_object_data_transfer_dttypes_to_cdmask(int dtdata_types,
struct CustomData_MeshMasks *r_data_masks);
/**
* Check what can do each layer type
* (if it is actually handled by transfer-data, if it supports advanced mixing.
*/
bool BKE_object_data_transfer_get_dttypes_capacity(const int dtdata_types,
bool BKE_object_data_transfer_get_dttypes_capacity(int dtdata_types,
bool *r_advanced_mixing,
bool *r_threshold);
int BKE_object_data_transfer_get_dttypes_item_types(const int dtdata_types);
int BKE_object_data_transfer_get_dttypes_item_types(int dtdata_types);
int BKE_object_data_transfer_dttype_to_cdtype(const int dtdata_type);
int BKE_object_data_transfer_dttype_to_srcdst_index(const int dtdata_type);
int BKE_object_data_transfer_dttype_to_cdtype(int dtdata_type);
int BKE_object_data_transfer_dttype_to_srcdst_index(int dtdata_type);
#define DT_DATATYPE_IS_VERT(_dt) \
ELEM(_dt, DT_TYPE_MDEFORMVERT, DT_TYPE_SHAPEKEY, DT_TYPE_SKIN, DT_TYPE_BWEIGHT_VERT)
@ -136,8 +136,8 @@ void BKE_object_data_transfer_layout(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob_src,
struct Object *ob_dst,
const int data_types,
const bool use_delete,
int data_types,
bool use_delete,
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
const int tolayers_select[DT_MULTILAYER_INDEX_MAX]);
@ -145,46 +145,46 @@ bool BKE_object_data_transfer_mesh(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob_src,
struct Object *ob_dst,
const int data_types,
const bool use_create,
const int map_vert_mode,
const int map_edge_mode,
const int map_loop_mode,
const int map_poly_mode,
int data_types,
bool use_create,
int map_vert_mode,
int map_edge_mode,
int map_loop_mode,
int map_poly_mode,
struct SpaceTransform *space_transform,
const bool auto_transform,
const float max_distance,
const float ray_radius,
const float islands_handling_precision,
bool auto_transform,
float max_distance,
float ray_radius,
float islands_handling_precision,
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
const int tolayers_select[DT_MULTILAYER_INDEX_MAX],
const int mix_mode,
const float mix_factor,
int mix_mode,
float mix_factor,
const char *vgroup_name,
const bool invert_vgroup,
bool invert_vgroup,
struct ReportList *reports);
bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob_src,
struct Object *ob_dst,
struct Mesh *me_dst,
const int data_types,
int data_types,
bool use_create,
const int map_vert_mode,
const int map_edge_mode,
const int map_loop_mode,
const int map_poly_mode,
int map_vert_mode,
int map_edge_mode,
int map_loop_mode,
int map_poly_mode,
struct SpaceTransform *space_transform,
const bool auto_transform,
const float max_distance,
const float ray_radius,
const float islands_handling_precision,
bool auto_transform,
float max_distance,
float ray_radius,
float islands_handling_precision,
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
const int tolayers_select[DT_MULTILAYER_INDEX_MAX],
const int mix_mode,
const float mix_factor,
int mix_mode,
float mix_factor,
const char *vgroup_name,
const bool invert_vgroup,
bool invert_vgroup,
struct ReportList *reports);
#ifdef __cplusplus

View File

@ -51,7 +51,7 @@ int BKE_object_defgroup_active_index_get(const struct Object *ob);
/**
* \note For historical reasons, the index starts at 1 rather than 0.
*/
void BKE_object_defgroup_active_index_set(struct Object *ob, const int new_index);
void BKE_object_defgroup_active_index_set(struct Object *ob, int new_index);
const struct ListBase *BKE_id_defgroup_list_get(const struct ID *id);
struct ListBase *BKE_id_defgroup_list_get_mutable(struct ID *id);
@ -68,33 +68,31 @@ struct bDeformGroup *BKE_object_defgroup_find_name(const struct Object *ob, cons
/**
* \note caller must free.
*/
int *BKE_object_defgroup_flip_map(const struct Object *ob,
int *flip_map_len,
const bool use_default);
int *BKE_object_defgroup_flip_map(const struct Object *ob, int *flip_map_len, bool use_default);
/**
* \note caller must free.
*/
int *BKE_object_defgroup_flip_map_single(const struct Object *ob,
int *flip_map_len,
const bool use_default,
bool use_default,
int defgroup);
int BKE_object_defgroup_flip_index(const struct Object *ob, int index, const bool use_default);
int BKE_object_defgroup_flip_index(const struct Object *ob, int index, bool use_default);
int BKE_object_defgroup_name_index(const struct Object *ob, const char *name);
void BKE_object_defgroup_unique_name(struct bDeformGroup *dg, struct Object *ob);
struct MDeformWeight *BKE_defvert_find_index(const struct MDeformVert *dv, const int defgroup);
struct MDeformWeight *BKE_defvert_find_index(const struct MDeformVert *dv, int defgroup);
/**
* Ensures that `dv` has a deform weight entry for the specified defweight group.
*
* \note this function is mirrored in editmesh_tools.c, for use for edit-vertices.
*/
struct MDeformWeight *BKE_defvert_ensure_index(struct MDeformVert *dv, const int defgroup);
struct MDeformWeight *BKE_defvert_ensure_index(struct MDeformVert *dv, int defgroup);
/**
* Adds the given vertex to the specified vertex group, with given weight.
*
* \warning this does NOT check for existing, assume caller already knows its not there.
*/
void BKE_defvert_add_index_notest(struct MDeformVert *dv, int defgroup, const float weight);
void BKE_defvert_add_index_notest(struct MDeformVert *dv, int defgroup, float weight);
/**
* Removes the given vertex from the vertex group.
*
@ -110,13 +108,13 @@ int BKE_defvert_find_shared(const struct MDeformVert *dvert_a, const struct MDef
/**
* \return true if has no weights.
*/
bool BKE_defvert_is_weight_zero(const struct MDeformVert *dvert, const int defgroup_tot);
bool BKE_defvert_is_weight_zero(const struct MDeformVert *dvert, int defgroup_tot);
void BKE_defvert_array_free_elems(struct MDeformVert *dvert, int totvert);
void BKE_defvert_array_free(struct MDeformVert *dvert, int totvert);
void BKE_defvert_array_copy(struct MDeformVert *dst, const struct MDeformVert *src, int totvert);
float BKE_defvert_find_weight(const struct MDeformVert *dvert, const int defgroup);
float BKE_defvert_find_weight(const struct MDeformVert *dvert, int defgroup);
/**
* Take care with this the rationale is:
* - if the object has no vertex group. act like vertex group isn't set and return 1.0.
@ -124,9 +122,7 @@ float BKE_defvert_find_weight(const struct MDeformVert *dvert, const int defgrou
*
* This is a bit confusing, just saves some checks from the caller.
*/
float BKE_defvert_array_find_weight_safe(const struct MDeformVert *dvert,
const int index,
const int defgroup);
float BKE_defvert_array_find_weight_safe(const struct MDeformVert *dvert, int index, int defgroup);
/**
* \return The total weight in all groups marked in the selection mask.
@ -180,7 +176,7 @@ void BKE_defvert_copy(struct MDeformVert *dvert_dst, const struct MDeformVert *d
void BKE_defvert_copy_subset(struct MDeformVert *dvert_dst,
const struct MDeformVert *dvert_src,
const bool *vgroup_subset,
const int vgroup_tot);
int vgroup_tot);
/**
* Overwrite weights filtered by vgroup_subset and with mirroring specified by the flip map
* - do nothing if neither are set.
@ -189,101 +185,96 @@ void BKE_defvert_copy_subset(struct MDeformVert *dvert_dst,
void BKE_defvert_mirror_subset(struct MDeformVert *dvert_dst,
const struct MDeformVert *dvert_src,
const bool *vgroup_subset,
const int vgroup_tot,
int vgroup_tot,
const int *flip_map,
const int flip_map_len);
int flip_map_len);
/**
* Copy an index from one #MDeformVert to another.
* - do nothing if neither are set.
* - add destination weight if needed.
*/
void BKE_defvert_copy_index(struct MDeformVert *dvert_dst,
const int defgroup_dst,
int defgroup_dst,
const struct MDeformVert *dvert_src,
const int defgroup_src);
int defgroup_src);
/**
* Only sync over matching weights, don't add or remove groups
* warning, loop within loop.
*/
void BKE_defvert_sync(struct MDeformVert *dvert_dst,
const struct MDeformVert *dvert_src,
const bool use_ensure);
bool use_ensure);
/**
* be sure all flip_map values are valid
*/
void BKE_defvert_sync_mapped(struct MDeformVert *dvert_dst,
const struct MDeformVert *dvert_src,
const int *flip_map,
const int flip_map_len,
const bool use_ensure);
int flip_map_len,
bool use_ensure);
/**
* be sure all flip_map values are valid
*/
void BKE_defvert_remap(struct MDeformVert *dvert, const int *map, const int map_len);
void BKE_defvert_flip(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len);
void BKE_defvert_flip_merged(struct MDeformVert *dvert,
const int *flip_map,
const int flip_map_len);
void BKE_defvert_remap(struct MDeformVert *dvert, const int *map, int map_len);
void BKE_defvert_flip(struct MDeformVert *dvert, const int *flip_map, int flip_map_len);
void BKE_defvert_flip_merged(struct MDeformVert *dvert, const int *flip_map, int flip_map_len);
void BKE_defvert_normalize(struct MDeformVert *dvert);
/**
* Same as #BKE_defvert_normalize but takes a bool array.
*/
void BKE_defvert_normalize_subset(struct MDeformVert *dvert,
const bool *vgroup_subset,
const int vgroup_tot);
int vgroup_tot);
/**
* Same as BKE_defvert_normalize() if the locked vgroup is not a member of the subset
*/
void BKE_defvert_normalize_lock_single(struct MDeformVert *dvert,
const bool *vgroup_subset,
const int vgroup_tot,
const uint def_nr_lock);
int vgroup_tot,
uint def_nr_lock);
/**
* Same as BKE_defvert_normalize() if no locked vgroup is a member of the subset
*/
void BKE_defvert_normalize_lock_map(struct MDeformVert *dvert,
const bool *vgroup_subset,
const int vgroup_tot,
int vgroup_tot,
const bool *lock_flags,
const int defbase_tot);
int defbase_tot);
/* Utilities to 'extract' a given vgroup into a simple float array,
* for verts, but also edges/polys/loops. */
void BKE_defvert_extract_vgroup_to_vertweights(struct MDeformVert *dvert,
const int defgroup,
const int num_verts,
float *r_weights,
const bool invert_vgroup);
void BKE_defvert_extract_vgroup_to_vertweights(
struct MDeformVert *dvert, int defgroup, int num_verts, float *r_weights, bool invert_vgroup);
/**
* The following three make basic interpolation,
* using temp vert_weights array to avoid looking up same weight several times.
*/
void BKE_defvert_extract_vgroup_to_edgeweights(struct MDeformVert *dvert,
const int defgroup,
const int num_verts,
int defgroup,
int num_verts,
struct MEdge *edges,
const int num_edges,
int num_edges,
float *r_weights,
const bool invert_vgroup);
bool invert_vgroup);
void BKE_defvert_extract_vgroup_to_loopweights(struct MDeformVert *dvert,
const int defgroup,
const int num_verts,
int defgroup,
int num_verts,
struct MLoop *loops,
const int num_loops,
int num_loops,
float *r_weights,
const bool invert_vgroup);
bool invert_vgroup);
void BKE_defvert_extract_vgroup_to_polyweights(struct MDeformVert *dvert,
const int defgroup,
const int num_verts,
int defgroup,
int num_verts,
struct MLoop *loops,
const int num_loops,
int num_loops,
struct MPoly *polys,
const int num_polys,
int num_polys,
float *r_weights,
const bool invert_vgroup);
bool invert_vgroup);
void BKE_defvert_weight_to_rgb(float r_rgb[3], const float weight);
void BKE_defvert_weight_to_rgb(float r_rgb[3], float weight);
void BKE_defvert_blend_write(struct BlendWriter *writer, int count, struct MDeformVert *dvlist);
void BKE_defvert_blend_read(struct BlendDataReader *reader,

View File

@ -86,7 +86,7 @@ void BKE_displist_free(struct ListBase *lb);
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph,
const struct Scene *scene,
struct Object *ob,
const bool for_render);
bool for_render);
void BKE_displist_make_mball(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
void BKE_curve_calc_modifiers_pre(struct Depsgraph *depsgraph,
@ -94,7 +94,7 @@ void BKE_curve_calc_modifiers_pre(struct Depsgraph *depsgraph,
struct Object *ob,
struct ListBase *source_nurb,
struct ListBase *target_nurb,
const bool for_render);
bool for_render);
bool BKE_displist_surfindex_get(
const struct DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
@ -107,7 +107,7 @@ bool BKE_displist_surfindex_get(
void BKE_displist_fill(const struct ListBase *dispbase,
struct ListBase *to,
const float normal_proj[3],
const bool flip_normal);
bool flip_normal);
float BKE_displist_calc_taper(struct Depsgraph *depsgraph,
const struct Scene *scene,

View File

@ -42,13 +42,13 @@ typedef bool (*BMBVHTree_FaceFilter)(struct BMFace *f, void *userdata);
BMBVHTree *BKE_bmbvh_new_from_editmesh(struct BMEditMesh *em,
int flag,
const float (*cos_cage)[3],
const bool cos_cage_free);
bool cos_cage_free);
BMBVHTree *BKE_bmbvh_new_ex(struct BMesh *bm,
struct BMLoop *(*looptris)[3],
int looptris_tot,
int flag,
const float (*cos_cage)[3],
const bool cos_cage_free,
bool cos_cage_free,
bool (*test_fn)(struct BMFace *, void *user_data),
void *user_data);
BMBVHTree *BKE_bmbvh_new(struct BMesh *bm,
@ -56,14 +56,14 @@ BMBVHTree *BKE_bmbvh_new(struct BMesh *bm,
int looptris_tot,
int flag,
const float (*cos_cage)[3],
const bool cos_cage_free);
bool cos_cage_free);
void BKE_bmbvh_free(BMBVHTree *tree);
struct BVHTree *BKE_bmbvh_tree_get(BMBVHTree *tree);
struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree,
const float co[3],
const float dir[3],
const float radius,
float radius,
float *r_dist,
float r_hitout[3],
float r_cagehit[3]);
@ -71,7 +71,7 @@ struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree,
struct BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *tree,
const float co[3],
const float dir[3],
const float radius,
float radius,
float *r_dist,
float r_hitout[3],
float r_cagehit[3],
@ -81,12 +81,8 @@ struct BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *tree,
/**
* Find a vert closest to co in a sphere of radius dist_max.
*/
struct BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *tree,
const float co[3],
const float dist_max);
struct BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *tree,
const float co[3],
const float dist_max);
struct BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *tree, const float co[3], float dist_max);
struct BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *tree, const float co[3], float dist_max);
/**
* Overlap indices reference the looptri's.

View File

@ -39,7 +39,7 @@ void BKE_editmesh_loop_tangent_calc(BMEditMesh *em,
const float (*loop_normals)[3],
const float (*vert_orco)[3],
CustomData *dm_loopdata_out,
const uint dm_loopdata_out_len,
uint dm_loopdata_out_len,
short *tangent_mask_curr_p);
#ifdef __cplusplus

View File

@ -49,7 +49,7 @@ void BKE_fluid_modifier_reset(struct FluidModifierData *fmd);
void BKE_fluid_modifier_create_type_data(struct FluidModifierData *fmd);
void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd,
struct FluidModifierData *tfmd,
const int flag);
int flag);
bool BKE_fluid_reallocate_fluid(struct FluidDomainSettings *fds, int res[3], int free_old);
void BKE_fluid_reallocate_copy_fluid(struct FluidDomainSettings *fds,
@ -76,8 +76,8 @@ void BKE_fluid_particle_system_create(struct Main *bmain,
const char *pset_name,
const char *parts_name,
const char *psys_name,
const int psys_type);
void BKE_fluid_particle_system_destroy(struct Object *ob, const int particle_type);
int psys_type);
void BKE_fluid_particle_system_destroy(struct Object *ob, int particle_type);
void BKE_fluid_cache_startframe_set(struct FluidDomainSettings *settings, int value);
void BKE_fluid_cache_endframe_set(struct FluidDomainSettings *settings, int value);

View File

@ -38,10 +38,10 @@ typedef struct FreestyleSettings FreestyleSettings;
/* FreestyleConfig */
void BKE_freestyle_config_init(struct FreestyleConfig *config);
void BKE_freestyle_config_free(struct FreestyleConfig *config, const bool do_id_user);
void BKE_freestyle_config_free(struct FreestyleConfig *config, bool do_id_user);
void BKE_freestyle_config_copy(struct FreestyleConfig *new_config,
const struct FreestyleConfig *config,
const int flag);
int flag);
/* FreestyleConfig.modules */
struct FreestyleModuleConfig *BKE_freestyle_module_add(struct FreestyleConfig *config);

View File

@ -109,11 +109,11 @@ class GeometryComponent {
* \note Conceptually this function is static, the result is always the same for different
* instances of the same geometry component type.
*/
bool attribute_domain_supported(const AttributeDomain domain) const;
bool attribute_domain_supported(AttributeDomain domain) const;
/**
* Return the length of a specific domain, or 0 if the domain is not supported.
*/
virtual int attribute_domain_size(const AttributeDomain domain) const;
virtual int attribute_domain_size(AttributeDomain domain) const;
/**
* Return true if the attribute name corresponds to a built-in attribute with a hardcoded domain
@ -165,7 +165,7 @@ class GeometryComponent {
/** Returns true when the attribute has been created. */
bool attribute_try_create(const blender::bke::AttributeIDRef &attribute_id,
const AttributeDomain domain,
AttributeDomain domain,
const CustomDataType data_type,
const AttributeInit &initializer);
@ -191,7 +191,7 @@ class GeometryComponent {
* interpolated or converted.
*/
blender::fn::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
const AttributeDomain domain,
AttributeDomain domain,
const CustomDataType data_type) const;
/**
@ -200,7 +200,7 @@ class GeometryComponent {
* interpolated.
*/
blender::fn::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
const AttributeDomain domain) const;
AttributeDomain domain) const;
/**
* Get a virtual array that refers to the data of an attribute converted to the given data type.
@ -216,7 +216,7 @@ class GeometryComponent {
* contain a default value. This never returns null.
*/
blender::fn::GVArray attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
const AttributeDomain domain,
AttributeDomain domain,
const CustomDataType data_type,
const void *default_value = nullptr) const;
/* Use instead of the method above when the type is known at compile time for type safety. */
@ -243,7 +243,7 @@ class GeometryComponent {
*/
blender::bke::OutputAttribute attribute_try_get_for_output(
const blender::bke::AttributeIDRef &attribute_id,
const AttributeDomain domain,
AttributeDomain domain,
const CustomDataType data_type,
const void *default_value = nullptr);
/* Use instead of the method above when the type is known at compile time for type safety. */
@ -266,7 +266,7 @@ class GeometryComponent {
*/
blender::bke::OutputAttribute attribute_try_get_for_output_only(
const blender::bke::AttributeIDRef &attribute_id,
const AttributeDomain domain,
AttributeDomain domain,
const CustomDataType data_type);
/* Use instead of the method above when the type is known at compile time for type safety. */
template<typename T>
@ -281,10 +281,9 @@ class GeometryComponent {
private:
virtual const blender::bke::ComponentAttributeProviders *get_attribute_providers() const;
virtual blender::fn::GVArray attribute_try_adapt_domain_impl(
const blender::fn::GVArray &varray,
const AttributeDomain from_domain,
const AttributeDomain to_domain) const;
virtual blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
AttributeDomain from_domain,
AttributeDomain to_domain) const;
};
template<typename T>
@ -570,7 +569,7 @@ class MeshComponent : public GeometryComponent {
*/
Mesh *get_for_write();
int attribute_domain_size(const AttributeDomain domain) const final;
int attribute_domain_size(AttributeDomain domain) const final;
bool is_empty() const final;
@ -582,10 +581,9 @@ class MeshComponent : public GeometryComponent {
private:
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
blender::fn::GVArray attribute_try_adapt_domain_impl(
const blender::fn::GVArray &varray,
const AttributeDomain from_domain,
const AttributeDomain to_domain) const final;
blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
AttributeDomain from_domain,
AttributeDomain to_domain) const final;
};
/**
@ -634,7 +632,7 @@ class PointCloudComponent : public GeometryComponent {
*/
PointCloud *get_for_write();
int attribute_domain_size(const AttributeDomain domain) const final;
int attribute_domain_size(AttributeDomain domain) const final;
bool is_empty() const final;
@ -684,7 +682,7 @@ class CurveComponent : public GeometryComponent {
const CurveEval *get_for_read() const;
CurveEval *get_for_write();
int attribute_domain_size(const AttributeDomain domain) const final;
int attribute_domain_size(AttributeDomain domain) const final;
bool is_empty() const final;
@ -702,10 +700,9 @@ class CurveComponent : public GeometryComponent {
private:
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
blender::fn::GVArray attribute_try_adapt_domain_impl(
const blender::fn::GVArray &varray,
const AttributeDomain from_domain,
const AttributeDomain to_domain) const final;
blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
AttributeDomain from_domain,
AttributeDomain to_domain) const final;
};
/**
@ -912,7 +909,7 @@ class InstancesComponent : public GeometryComponent {
* changed. This is a function on the component rather than each reference to ensure `const`
* correctness for that reason.
*/
GeometrySet &geometry_set_from_reference(const int reference_index);
GeometrySet &geometry_set_from_reference(int reference_index);
blender::Span<int> instance_reference_handles() const;
blender::MutableSpan<int> instance_reference_handles();
@ -933,7 +930,7 @@ class InstancesComponent : public GeometryComponent {
blender::bke::CustomDataAttributes &attributes();
const blender::bke::CustomDataAttributes &attributes() const;
int attribute_domain_size(const AttributeDomain domain) const final;
int attribute_domain_size(AttributeDomain domain) const final;
void foreach_referenced_geometry(
blender::FunctionRef<void(const GeometrySet &geometry_set)> callback) const;
@ -1027,7 +1024,7 @@ class GeometryFieldInput : public fn::FieldInput {
ResourceScope &scope) const override;
virtual GVArray get_varray_for_context(const GeometryComponent &component,
const AttributeDomain domain,
AttributeDomain domain,
IndexMask mask) const = 0;
};
@ -1055,7 +1052,7 @@ class AttributeFieldInput : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
const AttributeDomain domain,
AttributeDomain domain,
IndexMask mask) const override;
std::string socket_inspection_name() const override;
@ -1072,7 +1069,7 @@ class IDAttributeFieldInput : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
const AttributeDomain domain,
AttributeDomain domain,
IndexMask mask) const override;
std::string socket_inspection_name() const override;
@ -1111,7 +1108,7 @@ class AnonymousAttributeFieldInput : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
const AttributeDomain domain,
AttributeDomain domain,
IndexMask mask) const override;
std::string socket_inspection_name() const override;

View File

@ -151,8 +151,8 @@ struct bGPDframe *BKE_gpencil_frame_addcopy(struct bGPDlayer *gpl, int cframe);
*/
struct bGPDlayer *BKE_gpencil_layer_addnew(struct bGPdata *gpd,
const char *name,
const bool setactive,
const bool add_to_header);
bool setactive,
bool add_to_header);
/**
* Add a new grease pencil data-block.
* \param bmain: Main pointer
@ -166,16 +166,15 @@ struct bGPdata *BKE_gpencil_data_addnew(struct Main *bmain, const char name[]);
* \param gpf_src: Source grease pencil frame
* \return Pointer to new frame
*/
struct bGPDframe *BKE_gpencil_frame_duplicate(const struct bGPDframe *gpf_src,
const bool dup_strokes);
struct bGPDframe *BKE_gpencil_frame_duplicate(const struct bGPDframe *gpf_src, bool dup_strokes);
/**
* Make a copy of a given gpencil layer.
* \param gpl_src: Source grease pencil layer
* \return Pointer to new layer
*/
struct bGPDlayer *BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src,
const bool dup_frames,
const bool dup_strokes);
bool dup_frames,
bool dup_strokes);
/**
* Make a copy of a given gpencil layer settings.
*/
@ -199,8 +198,8 @@ struct bGPDcurve *BKE_gpencil_stroke_curve_duplicate(struct bGPDcurve *gpc_src);
* \return Pointer to new stroke.
*/
struct bGPDstroke *BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src,
const bool dup_points,
const bool dup_curve);
bool dup_points,
bool dup_curve);
/**
* Make a copy of a given gpencil data-block.
@ -252,9 +251,9 @@ void BKE_gpencil_material_remap(struct bGPdata *gpd,
* \return True if done.
*/
bool BKE_gpencil_merge_materials_table_get(struct Object *ob,
const float hue_threshold,
const float sat_threshold,
const float val_threshold,
float hue_threshold,
float sat_threshold,
float val_threshold,
struct GHash *r_mat_table);
/**
* Merge similar materials
@ -266,9 +265,9 @@ bool BKE_gpencil_merge_materials_table_get(struct Object *ob,
* \return True if done
*/
bool BKE_gpencil_merge_materials(struct Object *ob,
const float hue_threshold,
const float sat_threshold,
const float val_threshold,
float hue_threshold,
float sat_threshold,
float val_threshold,
int *r_removed);
/* statistics functions */
@ -296,7 +295,7 @@ struct bGPDstroke *BKE_gpencil_stroke_new(int mat_idx, int totpoints, short thic
* \return Pointer to new stroke
*/
struct bGPDstroke *BKE_gpencil_stroke_add(
struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness, const bool insert_at_head);
struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness, bool insert_at_head);
/**
* Add a stroke and copy the temporary drawing color value
@ -314,7 +313,7 @@ struct bGPDstroke *BKE_gpencil_stroke_add_existing_style(struct bGPDframe *gpf,
int totpoints,
short thickness);
struct bGPDcurve *BKE_gpencil_stroke_editcurve_new(const int tot_curve_points);
struct bGPDcurve *BKE_gpencil_stroke_editcurve_new(int tot_curve_points);
/* Stroke and Fill - Alpha Visibility Threshold */
#define GPENCIL_ALPHA_OPACITY_THRESH 0.001f
@ -398,7 +397,7 @@ void BKE_gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl);
* \param gpd: Grease pencil data-block
* \param unlock: Unlock flag
*/
void BKE_gpencil_layer_autolock_set(struct bGPdata *gpd, const bool unlock);
void BKE_gpencil_layer_autolock_set(struct bGPdata *gpd, bool unlock);
/**
* Add grease pencil mask layer.
@ -641,11 +640,8 @@ void BKE_gpencil_palette_ensure(struct Main *bmain, struct Scene *scene);
* \param mask: Mask
* \return True if done
*/
bool BKE_gpencil_from_image(struct SpaceImage *sima,
struct bGPdata *gpd,
struct bGPDframe *gpf,
const float size,
const bool mask);
bool BKE_gpencil_from_image(
struct SpaceImage *sima, struct bGPdata *gpd, struct bGPDframe *gpf, float size, bool mask);
/* Iterators */
/**

View File

@ -50,17 +50,17 @@ void BKE_gpencil_convert_curve(struct Main *bmain,
struct Scene *scene,
struct Object *ob_gp,
struct Object *ob_cu,
const bool use_collections,
const float scale_thickness,
const float sample);
bool use_collections,
float scale_thickness,
float sample);
/**
* Creates a bGPDcurve by doing a cubic curve fitting on the grease pencil stroke points.
*/
struct bGPDcurve *BKE_gpencil_stroke_editcurve_generate(struct bGPDstroke *gps,
const float error_threshold,
const float corner_angle,
const float stroke_radius);
float error_threshold,
float corner_angle,
float stroke_radius);
/**
* Updates the edit-curve for a stroke. Frees the old curve if one exists and generates a new one.
*/
@ -85,13 +85,13 @@ void BKE_gpencil_strokes_selected_sync_selection_editcurve(struct bGPdata *gpd);
* Recalculate stroke points with the edit-curve of the stroke.
*/
void BKE_gpencil_stroke_update_geometry_from_editcurve(struct bGPDstroke *gps,
const uint resolution,
const bool is_adaptive);
uint resolution,
bool is_adaptive);
/**
* Recalculate the handles of the edit curve of a grease pencil stroke.
*/
void BKE_gpencil_editcurve_recalculate_handles(struct bGPDstroke *gps);
void BKE_gpencil_editcurve_subdivide(struct bGPDstroke *gps, const int cuts);
void BKE_gpencil_editcurve_subdivide(struct bGPDstroke *gps, int cuts);
#ifdef __cplusplus
}

View File

@ -57,7 +57,7 @@ bool BKE_gpencil_data_minmax(const struct bGPdata *gpd, float r_min[3], float r_
* \return True if it was possible to calculate
*/
bool BKE_gpencil_stroke_minmax(const struct bGPDstroke *gps,
const bool use_select,
bool use_select,
float r_min[3],
float r_max[3]);
@ -136,8 +136,8 @@ bool BKE_gpencil_stroke_trim(struct bGPdata *gpd, struct bGPDstroke *gps);
void BKE_gpencil_stroke_merge_distance(struct bGPdata *gpd,
struct bGPDframe *gpf,
struct bGPDstroke *gps,
const float threshold,
const bool use_unselected);
float threshold,
bool use_unselected);
/**
* Get points of stroke always flat to view not affected
@ -167,7 +167,7 @@ void BKE_gpencil_stroke_2d_flat_ref(const struct bGPDspoint *ref_points,
const struct bGPDspoint *points,
int totpoints,
float (*points2d)[2],
const float scale,
float scale,
int *r_direction);
/**
* Triangulate stroke to generate data for filling areas.
@ -227,8 +227,8 @@ void BKE_gpencil_point_coords_apply_with_mat4(struct bGPdata *gpd,
*/
bool BKE_gpencil_stroke_sample(struct bGPdata *gpd,
struct bGPDstroke *gps,
const float dist,
const bool select);
float dist,
bool select);
/**
* Apply smooth position to stroke point.
* \param gps: Stroke to smooth
@ -236,10 +236,7 @@ bool BKE_gpencil_stroke_sample(struct bGPdata *gpd,
* \param inf: Amount of smoothing to apply
* \param smooth_caps: Apply smooth to stroke extremes
*/
bool BKE_gpencil_stroke_smooth_point(struct bGPDstroke *gps,
int i,
float inf,
const bool smooth_caps);
bool BKE_gpencil_stroke_smooth_point(struct bGPDstroke *gps, int i, float inf, bool smooth_caps);
/**
* Apply smooth strength to stroke point.
* \param gps: Stroke to smooth
@ -276,7 +273,7 @@ bool BKE_gpencil_stroke_close(struct bGPDstroke *gps);
void BKE_gpencil_dissolve_points(struct bGPdata *gpd,
struct bGPDframe *gpf,
struct bGPDstroke *gps,
const short tag);
short tag);
/**
* Backbone stretch similar to Freestyle.
@ -288,23 +285,21 @@ void BKE_gpencil_dissolve_points(struct bGPdata *gpd,
* \param extra_point_count: When follow_curvature is true, use this amount of extra points.
*/
bool BKE_gpencil_stroke_stretch(struct bGPDstroke *gps,
const float dist,
const float overshoot_fac,
const short mode,
const bool follow_curvature,
const int extra_point_count,
const float segment_influence,
const float max_angle,
const bool invert_curvature);
float dist,
float overshoot_fac,
short mode,
bool follow_curvature,
int extra_point_count,
float segment_influence,
float max_angle,
bool invert_curvature);
/**
* Trim stroke to needed segments.
* \param gps: Target stroke.
* \param index_from: the index of the first point to be used in the trimmed result.
* \param index_to: the index of the last point to be used in the trimmed result.
*/
bool BKE_gpencil_stroke_trim_points(struct bGPDstroke *gps,
const int index_from,
const int index_to);
bool BKE_gpencil_stroke_trim_points(struct bGPDstroke *gps, int index_from, int index_to);
/**
* Split the given stroke into several new strokes, partitioning
* it based on whether the stroke points have a particular flag
@ -315,9 +310,9 @@ struct bGPDstroke *BKE_gpencil_stroke_delete_tagged_points(struct bGPdata *gpd,
struct bGPDstroke *gps,
struct bGPDstroke *next_stroke,
int tag_flags,
const bool select,
const bool flat_cap,
const int limit);
bool select,
bool flat_cap,
int limit);
void BKE_gpencil_curve_delete_tagged_points(struct bGPdata *gpd,
struct bGPDframe *gpf,
struct bGPDstroke *gps,
@ -341,7 +336,7 @@ void BKE_gpencil_stroke_flip(struct bGPDstroke *gps);
bool BKE_gpencil_stroke_split(struct bGPdata *gpd,
struct bGPDframe *gpf,
struct bGPDstroke *gps,
const int before_index,
int before_index,
struct bGPDstroke **remaining_gps);
/**
* Shrink the stroke by length.
@ -349,7 +344,7 @@ bool BKE_gpencil_stroke_split(struct bGPdata *gpd,
* \param dist: delta length
* \param mode: 1->Start, 2->End
*/
bool BKE_gpencil_stroke_shrink(struct bGPDstroke *gps, const float dist, const short mode);
bool BKE_gpencil_stroke_shrink(struct bGPDstroke *gps, float dist, short mode);
/**
* Calculate grease pencil stroke length.
@ -360,8 +355,8 @@ bool BKE_gpencil_stroke_shrink(struct bGPDstroke *gps, const float dist, const s
float BKE_gpencil_stroke_length(const struct bGPDstroke *gps, bool use_3d);
/** Calculate grease pencil stroke length between points. */
float BKE_gpencil_stroke_segment_length(const struct bGPDstroke *gps,
const int start_index,
const int end_index,
int start_index,
int end_index,
bool use_3d);
/**
@ -375,9 +370,9 @@ void BKE_gpencil_stroke_set_random_color(struct bGPDstroke *gps);
*/
void BKE_gpencil_stroke_join(struct bGPDstroke *gps_a,
struct bGPDstroke *gps_b,
const bool leave_gaps,
const bool fit_thickness,
const bool smooth);
bool leave_gaps,
bool fit_thickness,
bool smooth);
/**
* Copy the stroke of the frame to all frames selected (except current).
*/
@ -385,7 +380,7 @@ void BKE_gpencil_stroke_copy_to_keyframes(struct bGPdata *gpd,
struct bGPDlayer *gpl,
struct bGPDframe *gpf,
struct bGPDstroke *gps,
const bool tail);
bool tail);
/**
* Convert a mesh object to grease pencil stroke.
@ -408,14 +403,14 @@ bool BKE_gpencil_convert_mesh(struct Main *bmain,
struct Scene *scene,
struct Object *ob_gp,
struct Object *ob_mesh,
const float angle,
const int thickness,
const float offset,
float angle,
int thickness,
float offset,
const float matrix[4][4],
const int frame_offset,
const bool use_seams,
const bool use_faces,
const bool use_vgroups);
int frame_offset,
bool use_seams,
bool use_faces,
bool use_vgroups);
/**
* Subdivide the grease pencil stroke so the number of points is target_number.
@ -428,8 +423,8 @@ bool BKE_gpencil_convert_mesh(struct Main *bmain,
*/
void BKE_gpencil_stroke_uniform_subdivide(struct bGPdata *gpd,
struct bGPDstroke *gps,
const uint32_t target_number,
const bool select);
uint32_t target_number,
bool select);
/**
* Stroke to view space
@ -458,7 +453,7 @@ struct bGPDstroke *BKE_gpencil_stroke_perimeter_from_view(struct RegionView3D *r
struct bGPdata *gpd,
const struct bGPDlayer *gpl,
struct bGPDstroke *gps,
const int subdivisions,
int subdivisions,
const float diff_mat[4][4]);
/**
* Get average pressure.

View File

@ -207,7 +207,7 @@ typedef struct GpencilModifierTypeInfo {
*/
void (*updateDepsgraph)(struct GpencilModifierData *md,
const struct ModifierUpdateDepsgraphContext *ctx,
const int mode);
int mode);
/**
* Should return true if the modifier needs to be recalculated on time
@ -279,7 +279,7 @@ struct GpencilModifierData *BKE_gpencil_modifier_new(int type);
* \param md: Modifier data.
* \param flag: Flags.
*/
void BKE_gpencil_modifier_free_ex(struct GpencilModifierData *md, const int flag);
void BKE_gpencil_modifier_free_ex(struct GpencilModifierData *md, int flag);
/**
* Free grease pencil modifier data
* \param md: Modifier data.
@ -324,7 +324,7 @@ void BKE_gpencil_modifier_copydata(struct GpencilModifierData *md,
*/
void BKE_gpencil_modifier_copydata_ex(struct GpencilModifierData *md,
struct GpencilModifierData *target,
const int flag);
int flag);
/**
* Set grease pencil modifier error.
* \param md: Modifier data.
@ -403,7 +403,7 @@ GpencilLineartLimitInfo BKE_gpencil_get_lineart_modifier_limits(const struct Obj
void BKE_gpencil_set_lineart_modifier_limits(struct GpencilModifierData *md,
const struct GpencilLineartLimitInfo *info,
const bool is_first_lineart);
bool is_first_lineart);
bool BKE_gpencil_is_first_lineart_in_stack(const struct Object *ob,
const struct GpencilModifierData *md);
@ -457,8 +457,8 @@ int BKE_gpencil_time_modifier_cfra(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob,
struct bGPDlayer *gpl,
const int cfra,
const bool is_render);
int cfra,
bool is_render);
void BKE_gpencil_modifier_blend_write(struct BlendWriter *writer, struct ListBase *modbase);
void BKE_gpencil_modifier_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb);

View File

@ -123,13 +123,13 @@ struct ImBuf *BKE_icon_imbuf_get_buffer(int icon_id) ATTR_WARN_UNUSED_RESULT;
/**
* Retrieve icon for id.
*/
struct Icon *BKE_icon_get(const int icon_id);
struct Icon *BKE_icon_get(int icon_id);
/**
* Set icon for id if not already defined.
* Used for inserting the internal icons.
*/
void BKE_icon_set(const int icon_id, struct Icon *icon);
void BKE_icon_set(int icon_id, struct Icon *icon);
/**
* Remove icon and free data if library object becomes invalid.
@ -139,13 +139,13 @@ void BKE_icon_id_delete(struct ID *id);
/**
* Remove icon and free data.
*/
bool BKE_icon_delete(const int icon_id);
bool BKE_icon_delete_unmanaged(const int icon_id);
bool BKE_icon_delete(int icon_id);
bool BKE_icon_delete_unmanaged(int icon_id);
/**
* Report changes - icon needs to be recalculated.
*/
void BKE_icon_changed(const int icon_id);
void BKE_icon_changed(int icon_id);
/**
* Free all icons.
@ -220,16 +220,16 @@ struct PreviewImage *BKE_previewimg_id_ensure(struct ID *id);
* Handle deferred (lazy) loading/generation of preview image, if needed.
* For now, only used with file thumbnails.
*/
void BKE_previewimg_ensure(struct PreviewImage *prv, const int size);
void BKE_previewimg_ensure(struct PreviewImage *prv, int size);
/**
* Create an #ImBuf holding a copy of the preview image buffer in \a prv.
* \note The returned image buffer has to be free'd (#IMB_freeImBuf()).
*/
struct ImBuf *BKE_previewimg_to_imbuf(struct PreviewImage *prv, const int size);
struct ImBuf *BKE_previewimg_to_imbuf(struct PreviewImage *prv, int size);
void BKE_previewimg_finish(struct PreviewImage *prv, const int size);
bool BKE_previewimg_is_finished(const struct PreviewImage *prv, const int size);
void BKE_previewimg_finish(struct PreviewImage *prv, int size);
bool BKE_previewimg_is_finished(const struct PreviewImage *prv, int size);
struct PreviewImage *BKE_previewimg_cached_get(const char *name);
@ -244,7 +244,7 @@ struct PreviewImage *BKE_previewimg_cached_ensure(const char *name);
*/
struct PreviewImage *BKE_previewimg_cached_thumbnail_read(const char *name,
const char *path,
const int source,
int source,
bool force_update);
void BKE_previewimg_cached_release(const char *name);
@ -259,8 +259,8 @@ struct Icon_Geom *BKE_icon_geom_from_memory(uchar *data, size_t data_len);
struct Icon_Geom *BKE_icon_geom_from_file(const char *filename);
struct ImBuf *BKE_icon_geom_rasterize(const struct Icon_Geom *geom,
const unsigned int size_x,
const unsigned int size_y);
unsigned int size_x,
unsigned int size_y);
void BKE_icon_geom_invert_lightness(struct Icon_Geom *geom);
int BKE_icon_ensure_studio_light(struct StudioLight *sl, int id_type);

View File

@ -62,7 +62,7 @@ typedef union IDPropertyTemplate {
*/
struct IDProperty *IDP_NewIDPArray(const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
struct IDProperty *IDP_CopyIDPArray(const struct IDProperty *array,
const int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* Shallow copies item.
@ -102,7 +102,7 @@ void IDP_FreeString(struct IDProperty *prop) ATTR_NONNULL();
typedef void (*IDPWalkFunc)(void *userData, struct IDProperty *idp);
void IDP_AssignID(struct IDProperty *prop, struct ID *id, const int flag);
void IDP_AssignID(struct IDProperty *prop, struct ID *id, int flag);
/*-------- Group Functions -------*/
@ -113,9 +113,8 @@ void IDP_AssignID(struct IDProperty *prop, struct ID *id, const int flag);
* \note Use for syncing proxies.
*/
void IDP_SyncGroupValues(struct IDProperty *dest, const struct IDProperty *src) ATTR_NONNULL();
void IDP_SyncGroupTypes(struct IDProperty *dest,
const struct IDProperty *src,
const bool do_arraylen) ATTR_NONNULL();
void IDP_SyncGroupTypes(struct IDProperty *dest, const struct IDProperty *src, bool do_arraylen)
ATTR_NONNULL();
/**
* Replaces all properties with the same name in a destination group from a source group.
*/
@ -132,7 +131,7 @@ void IDP_ReplaceInGroup_ex(struct IDProperty *group,
* If a property is missing in \a dest, add it.
* Do it recursively.
*/
void IDP_MergeGroup(struct IDProperty *dest, const struct IDProperty *src, const bool do_overwrite)
void IDP_MergeGroup(struct IDProperty *dest, const struct IDProperty *src, bool do_overwrite)
ATTR_NONNULL();
/**
* If a property is missing in \a dest, add it.
@ -140,8 +139,8 @@ void IDP_MergeGroup(struct IDProperty *dest, const struct IDProperty *src, const
*/
void IDP_MergeGroup_ex(struct IDProperty *dest,
const struct IDProperty *src,
const bool do_overwrite,
const int flag) ATTR_NONNULL();
bool do_overwrite,
int flag) ATTR_NONNULL();
/**
* This function has a sanity check to make sure ID properties with the same name don't
* get added to the group.
@ -180,8 +179,7 @@ struct IDProperty *IDP_GetPropertyFromGroup(const struct IDProperty *prop,
*/
struct IDProperty *IDP_GetPropertyTypeFromGroup(const struct IDProperty *prop,
const char *name,
const char type) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
char type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/*-------- Main Functions --------*/
/**
@ -190,13 +188,12 @@ struct IDProperty *IDP_GetPropertyTypeFromGroup(const struct IDProperty *prop,
* \param create_if_needed: Set to create the group property and attach it to id if it doesn't
* exist; otherwise the function will return NULL if there's no Group property attached to the ID.
*/
struct IDProperty *IDP_GetProperties(struct ID *id,
const bool create_if_needed) ATTR_WARN_UNUSED_RESULT
struct IDProperty *IDP_GetProperties(struct ID *id, bool create_if_needed) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
struct IDProperty *IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
struct IDProperty *IDP_CopyProperty_ex(const struct IDProperty *prop,
const int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* Copy content from source #IDProperty into destination one,
* freeing destination property's content first.
@ -208,7 +205,7 @@ void IDP_CopyPropertyContent(struct IDProperty *dst, struct IDProperty *src) ATT
*/
bool IDP_EqualsProperties_ex(struct IDProperty *prop1,
struct IDProperty *prop2,
const bool is_strict) ATTR_WARN_UNUSED_RESULT;
bool is_strict) ATTR_WARN_UNUSED_RESULT;
bool IDP_EqualsProperties(struct IDProperty *prop1,
struct IDProperty *prop2) ATTR_WARN_UNUSED_RESULT;
@ -240,7 +237,7 @@ bool IDP_EqualsProperties(struct IDProperty *prop1,
* IDP_AddToGroup or MEM_freeN the property, doing anything else might result in
* a memory leak.
*/
struct IDProperty *IDP_New(const char type,
struct IDProperty *IDP_New(char type,
const IDPropertyTemplate *val,
const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
@ -248,9 +245,9 @@ struct IDProperty *IDP_New(const char type,
* \note This will free allocated data, all child properties of arrays and groups, and unlink IDs!
* But it does not free the actual #IDProperty struct itself.
*/
void IDP_FreePropertyContent_ex(struct IDProperty *prop, const bool do_id_user);
void IDP_FreePropertyContent_ex(struct IDProperty *prop, bool do_id_user);
void IDP_FreePropertyContent(struct IDProperty *prop);
void IDP_FreeProperty_ex(struct IDProperty *prop, const bool do_id_user);
void IDP_FreeProperty_ex(struct IDProperty *prop, bool do_id_user);
void IDP_FreeProperty(struct IDProperty *prop);
void IDP_ClearProperty(struct IDProperty *prop);
@ -319,7 +316,7 @@ typedef void (*IDPForeachPropertyCallback)(struct IDProperty *id_property, void
* IDP_TYPE_FILTER_ enum in DNA_ID.h.
*/
void IDP_foreach_property(struct IDProperty *id_property_root,
const int type_filter,
int type_filter,
IDPForeachPropertyCallback callback,
void *user_data);

View File

@ -78,12 +78,12 @@ typedef void (*IDTypeInitDataFunction)(struct ID *id);
typedef void (*IDTypeCopyDataFunction)(struct Main *bmain,
struct ID *id_dst,
const struct ID *id_src,
const int flag);
int flag);
typedef void (*IDTypeFreeDataFunction)(struct ID *id);
/** \param flags: See BKE_lib_id.h's LIB_ID_MAKELOCAL_... flags. */
typedef void (*IDTypeMakeLocalFunction)(struct Main *bmain, struct ID *id, const int flags);
typedef void (*IDTypeMakeLocalFunction)(struct Main *bmain, struct ID *id, int flags);
typedef void (*IDTypeForeachIDFunction)(struct ID *id, struct LibraryForeachIDData *data);
@ -292,7 +292,7 @@ extern IDTypeInfo IDType_ID_LINK_PLACEHOLDER;
void BKE_idtype_init(void);
/* General helpers. */
const struct IDTypeInfo *BKE_idtype_get_info_from_idcode(const short id_code);
const struct IDTypeInfo *BKE_idtype_get_info_from_idcode(short id_code);
const struct IDTypeInfo *BKE_idtype_get_info_from_id(const struct ID *id);
/**
@ -301,21 +301,21 @@ const struct IDTypeInfo *BKE_idtype_get_info_from_id(const struct ID *id);
* \param idcode: The code to convert.
* \return A static string representing the name of the code.
*/
const char *BKE_idtype_idcode_to_name(const short idcode);
const char *BKE_idtype_idcode_to_name(short idcode);
/**
* Convert an \a idcode into a name (plural).
*
* \param idcode: The code to convert.
* \return A static string representing the name of the code.
*/
const char *BKE_idtype_idcode_to_name_plural(const short idcode);
const char *BKE_idtype_idcode_to_name_plural(short idcode);
/**
* Convert an \a idcode into its translations' context.
*
* \param idcode: The code to convert.
* \return A static string representing the i18n context of the code.
*/
const char *BKE_idtype_idcode_to_translation_context(const short idcode);
const char *BKE_idtype_idcode_to_translation_context(short idcode);
/**
* Return if the ID code is a valid ID code.
@ -323,7 +323,7 @@ const char *BKE_idtype_idcode_to_translation_context(const short idcode);
* \param idcode: The code to check.
* \return Boolean, 0 when invalid.
*/
bool BKE_idtype_idcode_is_valid(const short idcode);
bool BKE_idtype_idcode_is_valid(short idcode);
/**
* Check if an ID type is linkable.
@ -331,21 +331,21 @@ bool BKE_idtype_idcode_is_valid(const short idcode);
* \param idcode: The IDType code to check.
* \return Boolean, false when non linkable, true otherwise.
*/
bool BKE_idtype_idcode_is_linkable(const short idcode);
bool BKE_idtype_idcode_is_linkable(short idcode);
/**
* Check if an ID type is only appendable.
*
* \param idcode: The IDType code to check.
* \return Boolean, false when also linkable, true when only appendable.
*/
bool BKE_idtype_idcode_is_only_appendable(const short idcode);
bool BKE_idtype_idcode_is_only_appendable(short idcode);
/**
* Check if an ID type can try to reuse and existing matching local one when being appended again.
*
* \param idcode: The IDType code to check.
* \return Boolean, false when it cannot be re-used, true otherwise.
*/
bool BKE_idtype_idcode_append_is_reusable(const short idcode);
bool BKE_idtype_idcode_append_is_reusable(short idcode);
/* Macro currently, since any linkable IDtype should be localizable. */
#define BKE_idtype_idcode_is_localizable BKE_idtype_idcode_is_linkable
@ -360,20 +360,20 @@ short BKE_idtype_idcode_from_name(const char *idtype_name);
/**
* Convert an \a idcode into an \a idfilter (e.g. #ID_OB -> #FILTER_ID_OB).
*/
uint64_t BKE_idtype_idcode_to_idfilter(const short idcode);
uint64_t BKE_idtype_idcode_to_idfilter(short idcode);
/**
* Convert an \a idfilter into an \a idcode (e.g. #FILTER_ID_OB -> #ID_OB).
*/
short BKE_idtype_idcode_from_idfilter(const uint64_t idfilter);
short BKE_idtype_idcode_from_idfilter(uint64_t idfilter);
/**
* Convert an \a idcode into an index (e.g. #ID_OB -> #INDEX_ID_OB).
*/
int BKE_idtype_idcode_to_index(const short idcode);
int BKE_idtype_idcode_to_index(short idcode);
/**
* Get an \a idcode from an index (e.g. #INDEX_ID_OB -> #ID_OB).
*/
short BKE_idtype_idcode_from_index(const int index);
short BKE_idtype_idcode_from_index(int index);
/**
* Return an ID code and steps the index forward 1.

View File

@ -113,35 +113,35 @@ int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, const struct ImageForm
int BKE_imbuf_write_as(struct ImBuf *ibuf,
const char *name,
struct ImageFormatData *imf,
const bool save_copy);
bool save_copy);
void BKE_image_path_from_imformat(char *string,
const char *base,
const char *relbase,
int frame,
const struct ImageFormatData *im_format,
const bool use_ext,
const bool use_frames,
bool use_ext,
bool use_frames,
const char *suffix);
void BKE_image_path_from_imtype(char *string,
const char *base,
const char *relbase,
int frame,
const char imtype,
const bool use_ext,
const bool use_frames,
char imtype,
bool use_ext,
bool use_frames,
const char *suffix);
int BKE_image_path_ensure_ext_from_imformat(char *string, const struct ImageFormatData *im_format);
int BKE_image_path_ensure_ext_from_imtype(char *string, const char imtype);
char BKE_image_ftype_to_imtype(const int ftype, const struct ImbFormatOptions *options);
int BKE_image_imtype_to_ftype(const char imtype, struct ImbFormatOptions *r_options);
int BKE_image_path_ensure_ext_from_imtype(char *string, char imtype);
char BKE_image_ftype_to_imtype(int ftype, const struct ImbFormatOptions *options);
int BKE_image_imtype_to_ftype(char imtype, struct ImbFormatOptions *r_options);
bool BKE_imtype_is_movie(const char imtype);
bool BKE_imtype_supports_zbuf(const char imtype);
bool BKE_imtype_supports_compress(const char imtype);
bool BKE_imtype_supports_quality(const char imtype);
bool BKE_imtype_requires_linear_float(const char imtype);
char BKE_imtype_valid_channels(const char imtype, bool write_file);
char BKE_imtype_valid_depths(const char imtype);
bool BKE_imtype_is_movie(char imtype);
bool BKE_imtype_supports_zbuf(char imtype);
bool BKE_imtype_supports_compress(char imtype);
bool BKE_imtype_supports_quality(char imtype);
bool BKE_imtype_requires_linear_float(char imtype);
char BKE_imtype_valid_channels(char imtype, bool write_file);
char BKE_imtype_valid_depths(char imtype);
/**
* String is from command line `--render-format` argument,
@ -241,9 +241,9 @@ struct Image *BKE_image_add_generated(struct Main *bmain,
int floatbuf,
short gen_type,
const float color[4],
const bool stereo3d,
const bool is_data,
const bool tiled);
bool stereo3d,
bool is_data,
bool tiled);
/**
* Create an image from ibuf. The reference-count of ibuf is increased,
* caller should take care to drop its reference by calling #IMB_freeImBuf if needed.
@ -334,7 +334,7 @@ void BKE_image_backup_render(struct Scene *scene, struct Image *ima, bool free_c
bool BKE_image_save_openexr_multiview(struct Image *ima,
struct ImBuf *ibuf,
const char *filepath,
const int flags);
int flags);
/**
* Goes over all textures that use images.

View File

@ -68,16 +68,16 @@ float *BKE_key_evaluate_object(struct Object *ob, int *r_totelem);
/**
* \param shape_index: The index to use or all (when -1).
*/
int BKE_keyblock_element_count_from_shape(const struct Key *key, const int shape_index);
int BKE_keyblock_element_count_from_shape(const struct Key *key, int shape_index);
int BKE_keyblock_element_count(const struct Key *key);
/**
* \param shape_index: The index to use or all (when -1).
*/
size_t BKE_keyblock_element_calc_size_from_shape(const struct Key *key, const int shape_index);
size_t BKE_keyblock_element_calc_size_from_shape(const struct Key *key, int shape_index);
size_t BKE_keyblock_element_calc_size(const struct Key *key);
bool BKE_key_idtype_support(const short id_type);
bool BKE_key_idtype_support(short id_type);
struct Key **BKE_key_from_id_p(struct ID *id);
struct Key *BKE_key_from_id(struct ID *id);
@ -98,7 +98,7 @@ struct KeyBlock *BKE_keyblock_add(struct Key *key, const char *name);
* \param name: Optional name for the new keyblock.
* \param do_force: always use ctime even for relative keys.
*/
struct KeyBlock *BKE_keyblock_add_ctime(struct Key *key, const char *name, const bool do_force);
struct KeyBlock *BKE_keyblock_add_ctime(struct Key *key, const char *name, bool do_force);
/**
* Get the appropriate #KeyBlock given an index.
*/
@ -179,7 +179,7 @@ bool BKE_keyblock_move(struct Object *ob, int org_index, int new_index);
/**
* Check if given key-block (as index) is used as basis by others in given key.
*/
bool BKE_keyblock_is_basis(struct Key *key, const int index);
bool BKE_keyblock_is_basis(struct Key *key, int index);
/* -------------------------------------------------------------------- */
/** \name Key-Block Data Access
@ -188,16 +188,14 @@ bool BKE_keyblock_is_basis(struct Key *key, const int index);
/**
* \param shape_index: The index to use or all (when -1).
*/
void BKE_keyblock_data_get_from_shape(const struct Key *key,
float (*arr)[3],
const int shape_index);
void BKE_keyblock_data_get_from_shape(const struct Key *key, float (*arr)[3], int shape_index);
void BKE_keyblock_data_get(const struct Key *key, float (*arr)[3]);
/**
* Set the data to all key-blocks (or shape_index if != -1).
*/
void BKE_keyblock_data_set_with_mat4(struct Key *key,
const int shape_index,
int shape_index,
const float (*coords)[3],
const float mat[4][4]);
/**
@ -206,13 +204,13 @@ void BKE_keyblock_data_set_with_mat4(struct Key *key,
*/
void BKE_keyblock_curve_data_set_with_mat4(struct Key *key,
const struct ListBase *nurb,
const int shape_index,
int shape_index,
const void *data,
const float mat[4][4]);
/**
* Set the data for all key-blocks (or shape_index if != -1).
*/
void BKE_keyblock_data_set(struct Key *key, const int shape_index, const void *data);
void BKE_keyblock_data_set(struct Key *key, int shape_index, const void *data);
/** \} */

View File

@ -69,15 +69,11 @@ void BKE_lattice_transform(struct Lattice *lt, const float mat[4][4], bool do_ke
bool BKE_lattice_is_any_selected(const struct Lattice *lt);
int BKE_lattice_index_from_uvw(struct Lattice *lt, const int u, const int v, const int w);
void BKE_lattice_index_to_uvw(struct Lattice *lt, const int index, int *r_u, int *r_v, int *r_w);
int BKE_lattice_index_flip(
struct Lattice *lt, const int index, const bool flip_u, const bool flip_v, const bool flip_w);
void BKE_lattice_bitmap_from_flag(struct Lattice *lt,
unsigned int *bitmap,
const uint8_t flag,
const bool clear,
const bool respecthide);
int BKE_lattice_index_from_uvw(struct Lattice *lt, int u, int v, int w);
void BKE_lattice_index_to_uvw(struct Lattice *lt, int index, int *r_u, int *r_v, int *r_w);
int BKE_lattice_index_flip(struct Lattice *lt, int index, bool flip_u, bool flip_v, bool flip_w);
void BKE_lattice_bitmap_from_flag(
struct Lattice *lt, unsigned int *bitmap, uint8_t flag, bool clear, bool respecthide);
/* **** Depsgraph evaluation **** */
@ -110,27 +106,27 @@ void BKE_lattice_deform_data_destroy(struct LatticeDeformData *lattice_deform_da
void BKE_lattice_deform_coords(const struct Object *ob_lattice,
const struct Object *ob_target,
float (*vert_coords)[3],
const int vert_coords_len,
const short flag,
int vert_coords_len,
short flag,
const char *defgrp_name,
float fac);
void BKE_lattice_deform_coords_with_mesh(const struct Object *ob_lattice,
const struct Object *ob_target,
float (*vert_coords)[3],
const int vert_coords_len,
const short flag,
int vert_coords_len,
short flag,
const char *defgrp_name,
const float fac,
float fac,
const struct Mesh *me_target);
void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice,
const struct Object *ob_target,
float (*vert_coords)[3],
const int vert_coords_len,
const short flag,
int vert_coords_len,
short flag,
const char *defgrp_name,
const float fac,
float fac,
struct BMEditMesh *em_target);
/** \} */

View File

@ -71,7 +71,7 @@ struct ViewLayer *BKE_view_layer_find(const struct Scene *scene, const char *lay
struct ViewLayer *BKE_view_layer_add(struct Scene *scene,
const char *name,
struct ViewLayer *view_layer_source,
const int type);
int type);
/* DEPRECATED */
/**
@ -85,12 +85,12 @@ void BKE_view_layer_free(struct ViewLayer *view_layer);
/**
* Free (or release) any data used by this #ViewLayer.
*/
void BKE_view_layer_free_ex(struct ViewLayer *view_layer, const bool do_id_user);
void BKE_view_layer_free_ex(struct ViewLayer *view_layer, bool do_id_user);
/**
* Tag all the selected objects of a render-layer.
*/
void BKE_view_layer_selected_objects_tag(struct ViewLayer *view_layer, const int tag);
void BKE_view_layer_selected_objects_tag(struct ViewLayer *view_layer, int tag);
/**
* Fallback for when a Scene has no camera to use.
@ -119,7 +119,7 @@ void BKE_view_layer_copy_data(struct Scene *scene_dst,
const struct Scene *scene_src,
struct ViewLayer *view_layer_dst,
const struct ViewLayer *view_layer_src,
const int flag);
int flag);
void BKE_view_layer_rename(struct Main *bmain,
struct Scene *scene,
@ -148,8 +148,7 @@ int BKE_layer_collection_count(const struct ViewLayer *view_layer);
/**
* Get the collection for a given index.
*/
struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *view_layer,
const int index);
struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *view_layer, int index);
/**
* \return -1 if not found.
*/
@ -242,9 +241,9 @@ void BKE_layer_collection_isolate_local(struct ViewLayer *view_layer,
*/
void BKE_layer_collection_set_visible(struct ViewLayer *view_layer,
struct LayerCollection *lc,
const bool visible,
const bool hierarchy);
void BKE_layer_collection_set_flag(struct LayerCollection *lc, const int flag, const bool value);
bool visible,
bool hierarchy);
void BKE_layer_collection_set_flag(struct LayerCollection *lc, int flag, bool value);
/* Evaluation. */

View File

@ -77,7 +77,7 @@ void *BKE_libblock_alloc_notest(short type) ATTR_WARN_UNUSED_RESULT;
* The user count is set to 1, all other content (apart from name and links) being
* initialized to zero.
*/
void *BKE_libblock_alloc(struct Main *bmain, short type, const char *name, const int flag)
void *BKE_libblock_alloc(struct Main *bmain, short type, const char *name, int flag)
ATTR_WARN_UNUSED_RESULT;
/**
* Initialize an ID of given type, such that it has valid 'empty' data.
@ -114,14 +114,14 @@ void BKE_lib_libblock_session_uuid_renew(struct ID *id);
*
* \param name: can be NULL, in which case we get default name for this ID type.
*/
void *BKE_id_new(struct Main *bmain, const short type, const char *name);
void *BKE_id_new(struct Main *bmain, short type, const char *name);
/**
* Generic helper to create a new temporary empty data-block of given type,
* *outside* of any Main database.
*
* \param name: can be NULL, in which case we get default name for this ID type.
*/
void *BKE_id_new_nomain(const short type, const char *name);
void *BKE_id_new_nomain(short type, const char *name);
/**
* New ID creation/copying options.
@ -202,7 +202,7 @@ enum {
void BKE_libblock_copy_ex(struct Main *bmain,
const struct ID *id,
struct ID **r_newid,
const int orig_flag);
int orig_flag);
/**
* Used everywhere in blenkernel.
*/
@ -220,7 +220,7 @@ void BKE_libblock_rename(struct Main *bmain, struct ID *id, const char *name) AT
void BLI_libblock_ensure_unique_name(struct Main *bmain, const char *name) ATTR_NONNULL();
struct ID *BKE_libblock_find_name(struct Main *bmain,
const short type,
short type,
const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
struct ID *BKE_libblock_find_session_uuid(struct Main *bmain, short type, uint32_t session_uuid);
/**
@ -267,8 +267,8 @@ enum {
LIB_ID_FREE_NO_UI_USER = 1 << 9,
};
void BKE_libblock_free_datablock(struct ID *id, const int flag) ATTR_NONNULL();
void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL();
void BKE_libblock_free_datablock(struct ID *id, int flag) ATTR_NONNULL();
void BKE_libblock_free_data(struct ID *id, bool do_id_user) ATTR_NONNULL();
/**
* In most cases #BKE_id_free_ex handles this, when lower level functions are called directly
@ -295,7 +295,7 @@ void BKE_libblock_free_data_py(struct ID *id);
* \param use_flag_from_idtag: Still use freeing info flags from given #ID datablock,
* even if some overriding ones are passed in \a flag parameter.
*/
void BKE_id_free_ex(struct Main *bmain, void *idv, int flag, const bool use_flag_from_idtag);
void BKE_id_free_ex(struct Main *bmain, void *idv, int flag, bool use_flag_from_idtag);
/**
* Complete ID freeing, should be usable in most cases (even for out-of-Main IDs).
*
@ -385,7 +385,7 @@ enum {
/**
* Generic 'make local' function, works for most of data-block types.
*/
void BKE_lib_id_make_local_generic(struct Main *bmain, struct ID *id, const int flags);
void BKE_lib_id_make_local_generic(struct Main *bmain, struct ID *id, int flags);
/**
* Calls the appropriate make_local method for the block, unless test is set.
*
@ -395,7 +395,7 @@ void BKE_lib_id_make_local_generic(struct Main *bmain, struct ID *id, const int
* it needs specific handling.
* \return true is the ID has successfully been made local.
*/
bool BKE_lib_id_make_local(struct Main *bmain, struct ID *id, const int flags);
bool BKE_lib_id_make_local(struct Main *bmain, struct ID *id, int flags);
/**
* \note Does *not* set #ID.newid pointer.
*/
@ -431,18 +431,15 @@ struct ID *BKE_id_copy(struct Main *bmain, const struct ID *id);
* (leave to zero for default, full copy).
* \return NULL when copying that ID type is not supported, the new copy otherwise.
*/
struct ID *BKE_id_copy_ex(struct Main *bmain,
const struct ID *id,
struct ID **r_newid,
const int flag);
struct ID *BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, int flag);
/**
* Invokes the appropriate copy method for the block and returns the result in
* newid, unless test. Returns true if the block can be copied.
*/
struct ID *BKE_id_copy_for_duplicate(struct Main *bmain,
struct ID *id,
const uint duplicate_flags,
const int copy_flags);
uint duplicate_flags,
int copy_flags);
/**
* Does a mere memory swap over the whole IDs data (including type-specific memory).
@ -474,7 +471,7 @@ void id_sort_by_name(struct ListBase *lb, struct ID *id, struct ID *id_sorting_h
* Expand ID usages of given id as 'extern' (and no more indirect) linked data.
* Used by ID copy/make_local functions.
*/
void BKE_lib_id_expand_local(struct Main *bmain, struct ID *id, const int flags);
void BKE_lib_id_expand_local(struct Main *bmain, struct ID *id, int flags);
/**
* Ensures given ID has a unique name in given listbase.
@ -489,48 +486,45 @@ void BKE_lib_id_expand_local(struct Main *bmain, struct ID *id, const int flags)
bool BKE_id_new_name_validate(struct ListBase *lb,
struct ID *id,
const char *name,
const bool do_linked_data) ATTR_NONNULL(1, 2);
bool do_linked_data) ATTR_NONNULL(1, 2);
/**
* Pull an ID out of a library (make it local). Only call this for IDs that
* don't have other library users.
*
* \param flags: Same set of `LIB_ID_MAKELOCAL_` flags as passed to #BKE_lib_id_make_local.
*/
void BKE_lib_id_clear_library_data(struct Main *bmain, struct ID *id, const int flags);
void BKE_lib_id_clear_library_data(struct Main *bmain, struct ID *id, int flags);
/**
* Clear or set given tags for all ids of given type in `bmain` (runtime tags).
*
* \note Affect whole Main database.
*/
void BKE_main_id_tag_idcode(struct Main *mainvar,
const short type,
const int tag,
const bool value);
void BKE_main_id_tag_idcode(struct Main *mainvar, short type, int tag, bool value);
/**
* Clear or set given tags for all ids in listbase (runtime tags).
*/
void BKE_main_id_tag_listbase(struct ListBase *lb, const int tag, const bool value);
void BKE_main_id_tag_listbase(struct ListBase *lb, int tag, bool value);
/**
* Clear or set given tags for all ids in bmain (runtime tags).
*/
void BKE_main_id_tag_all(struct Main *mainvar, const int tag, const bool value);
void BKE_main_id_tag_all(struct Main *mainvar, int tag, bool value);
/**
* Clear or set given flags for all ids in listbase (persistent flags).
*/
void BKE_main_id_flag_listbase(struct ListBase *lb, const int flag, const bool value);
void BKE_main_id_flag_listbase(struct ListBase *lb, int flag, bool value);
/**
* Clear or set given flags for all ids in bmain (persistent flags).
*/
void BKE_main_id_flag_all(struct Main *bmain, const int flag, const bool value);
void BKE_main_id_flag_all(struct Main *bmain, int flag, bool value);
/**
* Next to indirect usage in `readfile.c/writefile.c` also in `editobject.c`, `scene.c`.
*/
void BKE_main_id_newptr_and_tag_clear(struct Main *bmain);
void BKE_main_id_refcount_recompute(struct Main *bmain, const bool do_linked_only);
void BKE_main_id_refcount_recompute(struct Main *bmain, bool do_linked_only);
void BKE_main_lib_objects_recalc_all(struct Main *bmain);
@ -567,7 +561,7 @@ void BKE_id_full_name_get(char name[MAX_ID_FULL_NAME], const struct ID *id, char
*/
void BKE_id_full_name_ui_prefix_get(char name[MAX_ID_FULL_NAME_UI],
const struct ID *id,
const bool add_lib_hint,
bool add_lib_hint,
char separator_char,
int *r_prefix_len);
@ -591,8 +585,8 @@ char *BKE_id_to_unique_string_key(const struct ID *id);
void BKE_library_make_local(struct Main *bmain,
const struct Library *lib,
struct GHash *old_to_new_ids,
const bool untagged_only,
const bool set_fake);
bool untagged_only,
bool set_fake);
void BKE_id_tag_set_atomic(struct ID *id, int tag);
void BKE_id_tag_clear_atomic(struct ID *id, int tag);

View File

@ -65,17 +65,15 @@ struct IDOverrideLibrary *BKE_lib_override_library_init(struct ID *local_id,
/**
* Shallow or deep copy of a whole override from \a src_id to \a dst_id.
*/
void BKE_lib_override_library_copy(struct ID *dst_id,
const struct ID *src_id,
const bool do_full_copy);
void BKE_lib_override_library_copy(struct ID *dst_id, const struct ID *src_id, bool do_full_copy);
/**
* Clear any overriding data from given \a override.
*/
void BKE_lib_override_library_clear(struct IDOverrideLibrary *override, const bool do_id_user);
void BKE_lib_override_library_clear(struct IDOverrideLibrary *override, bool do_id_user);
/**
* Free given \a override.
*/
void BKE_lib_override_library_free(struct IDOverrideLibrary **override, const bool do_id_user);
void BKE_lib_override_library_free(struct IDOverrideLibrary **override, bool do_id_user);
/**
* Check if given ID has some override rules that actually indicate the user edited it.
@ -90,7 +88,7 @@ bool BKE_lib_override_library_is_user_edited(struct ID *id);
*/
struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain,
struct ID *reference_id,
const bool do_tagged_remap);
bool do_tagged_remap);
/**
* Create overridden local copies of all tagged data-blocks in given Main.
*
@ -112,7 +110,7 @@ struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain,
*/
bool BKE_lib_override_library_create_from_tag(struct Main *bmain,
const struct Library *reference_library,
const bool do_no_main);
bool do_no_main);
/**
* Advanced 'smart' function to create fully functional overrides.
*
@ -176,8 +174,8 @@ bool BKE_lib_override_library_resync(struct Main *bmain,
struct ViewLayer *view_layer,
struct ID *id_root,
struct Collection *override_resync_residual_storage,
const bool do_hierarchy_enforce,
const bool do_post_process,
bool do_hierarchy_enforce,
bool do_post_process,
struct BlendFileReadReport *reports);
/**
* Detect and handle required resync of overrides data, when relations between reference linked IDs
@ -253,21 +251,21 @@ struct IDOverrideLibraryPropertyOperation *BKE_lib_override_library_property_ope
struct IDOverrideLibraryProperty *override_property,
const char *subitem_refname,
const char *subitem_locname,
const int subitem_refindex,
const int subitem_locindex,
const bool strict,
int subitem_refindex,
int subitem_locindex,
bool strict,
bool *r_strict);
/**
* Find override property operation from given sub-item(s), or create it if it does not exist.
*/
struct IDOverrideLibraryPropertyOperation *BKE_lib_override_library_property_operation_get(
struct IDOverrideLibraryProperty *override_property,
const short operation,
short operation,
const char *subitem_refname,
const char *subitem_locname,
const int subitem_refindex,
const int subitem_locindex,
const bool strict,
int subitem_refindex,
int subitem_locindex,
bool strict,
bool *r_strict,
bool *r_created);
/**
@ -341,7 +339,7 @@ bool BKE_lib_override_library_operations_create(struct Main *bmain, struct ID *l
/**
* Check all overrides from given \a bmain and create/update overriding operations as needed.
*/
bool BKE_lib_override_library_main_operations_create(struct Main *bmain, const bool force_auto);
bool BKE_lib_override_library_main_operations_create(struct Main *bmain, bool force_auto);
/**
* Reset all overrides in given \a id_root, while preserving ID relations.
@ -356,18 +354,18 @@ void BKE_lib_override_library_id_hierarchy_reset(struct Main *bmain, struct ID *
* Set or clear given tag in all operations in that override property data.
*/
void BKE_lib_override_library_operations_tag(struct IDOverrideLibraryProperty *override_property,
const short tag,
const bool do_set);
short tag,
bool do_set);
/**
* Set or clear given tag in all properties and operations in that override data.
*/
void BKE_lib_override_library_properties_tag(struct IDOverrideLibrary *override,
const short tag,
const bool do_set);
short tag,
bool do_set);
/**
* Set or clear given tag in all properties and operations in that Main's ID override data.
*/
void BKE_lib_override_library_main_tag(struct Main *bmain, const short tag, const bool do_set);
void BKE_lib_override_library_main_tag(struct Main *bmain, short tag, bool do_set);
/**
* Remove all tagged-as-unused properties and operations from that ID override data.

View File

@ -153,8 +153,8 @@ void BKE_lib_query_foreachid_process(struct LibraryForeachIDData *data,
int cb_flag);
int BKE_lib_query_foreachid_process_flags_get(struct LibraryForeachIDData *data);
int BKE_lib_query_foreachid_process_callback_flag_override(struct LibraryForeachIDData *data,
const int cb_flag,
const bool do_replace);
int cb_flag,
bool do_replace);
#define BKE_LIB_FOREACHID_PROCESS_ID(_data, _id, _cb_flag) \
{ \
@ -202,7 +202,7 @@ void BKE_library_foreach_ID_link(
/**
* Re-usable function, use when replacing ID's.
*/
void BKE_library_update_ID_link_user(struct ID *id_dst, struct ID *id_src, const int cb_flag);
void BKE_library_update_ID_link_user(struct ID *id_dst, struct ID *id_src, int cb_flag);
/**
* Return the number of times given \a id_user uses/references \a id_used.
@ -222,7 +222,7 @@ int BKE_library_ID_use_ID(struct ID *id_user, struct ID *id_used);
* This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above,
* quite useful to reduce useless iterations in some cases.
*/
bool BKE_library_id_can_use_idtype(struct ID *id_owner, const short id_type_used);
bool BKE_library_id_can_use_idtype(struct ID *id_owner, short id_type_used);
/**
* Check whether given ID is used locally (i.e. by another non-linked ID).
@ -257,10 +257,10 @@ void BKE_library_ID_test_usages(struct Main *bmain,
* #INDEX_ID_NULL item.
*/
void BKE_lib_query_unused_ids_tag(struct Main *bmain,
const int tag,
const bool do_local_ids,
const bool do_linked_ids,
const bool do_tag_recursive,
int tag,
bool do_local_ids,
bool do_linked_ids,
bool do_tag_recursive,
int *r_num_tagged);
/**
@ -272,7 +272,7 @@ void BKE_lib_query_unused_ids_tag(struct Main *bmain,
* \param do_init_tag: if \a true, all linked data are checked, if \a false,
* only linked data-blocks already tagged with #LIB_TAG_DOIT are checked.
*/
void BKE_library_unused_linked_data_set_tag(struct Main *bmain, const bool do_init_tag);
void BKE_library_unused_linked_data_set_tag(struct Main *bmain, bool do_init_tag);
/**
* Untag linked data blocks used by other untagged linked data-blocks.
* Used to detect data-blocks that we can forcefully make local

View File

@ -104,11 +104,9 @@ enum {
* \note Requiring new_id to be non-null, this *may* not be the case ultimately,
* but makes things simpler for now.
*/
void BKE_libblock_remap_locked(struct Main *bmain,
void *old_idv,
void *new_idv,
const short remap_flags) ATTR_NONNULL(1, 2);
void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, const short remap_flags)
void BKE_libblock_remap_locked(struct Main *bmain, void *old_idv, void *new_idv, short remap_flags)
ATTR_NONNULL(1, 2);
void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, short remap_flags)
ATTR_NONNULL(1, 2);
/**
@ -120,8 +118,8 @@ void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, const
*/
void BKE_libblock_unlink(struct Main *bmain,
void *idv,
const bool do_flag_never_null,
const bool do_skip_indirect) ATTR_NONNULL();
bool do_flag_never_null,
bool do_skip_indirect) ATTR_NONNULL();
/**
* Similar to libblock_remap, but only affects IDs used by given \a idv ID.
@ -133,7 +131,7 @@ void BKE_libblock_relink_ex(struct Main *bmain,
void *idv,
void *old_idv,
void *new_idv,
const short remap_flags) ATTR_NONNULL(1, 2);
short remap_flags) ATTR_NONNULL(1, 2);
/**
* Remaps ID usages of given ID to their `id->newid` pointer if not None, and proceeds recursively
@ -144,7 +142,7 @@ void BKE_libblock_relink_ex(struct Main *bmain,
* Very specific usage, not sure we'll keep it on the long run,
* currently only used in Object/Collection duplication code.
*/
void BKE_libblock_relink_to_newid(struct Main *bmain, struct ID *id, const int remap_flag)
void BKE_libblock_relink_to_newid(struct Main *bmain, struct ID *id, int remap_flag)
ATTR_NONNULL();
typedef void (*BKE_library_free_notifier_reference_cb)(const void *);

View File

@ -31,7 +31,7 @@ extern "C" {
struct LightProbe;
struct Main;
void BKE_lightprobe_type_set(struct LightProbe *probe, const short lightprobe_type);
void BKE_lightprobe_type_set(struct LightProbe *probe, short lightprobe_type);
void *BKE_lightprobe_add(struct Main *bmain, const char *name);
#ifdef __cplusplus

View File

@ -60,16 +60,16 @@ LineStyleModifier *BKE_linestyle_geometry_modifier_add(FreestyleLineStyle *lines
LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle,
const LineStyleModifier *m,
const int flag);
int flag);
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle,
const LineStyleModifier *m,
const int flag);
int flag);
LineStyleModifier *BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle,
const LineStyleModifier *m,
const int flag);
int flag);
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle,
const LineStyleModifier *m,
const int flag);
int flag);
int BKE_linestyle_color_modifier_remove(FreestyleLineStyle *linestyle,
LineStyleModifier *modifier);
@ -101,7 +101,7 @@ void BKE_linestyle_modifier_list_color_ramps(FreestyleLineStyle *linestyle, List
char *BKE_linestyle_path_to_color_ramp(FreestyleLineStyle *linestyle,
struct ColorBand *color_ramp);
bool BKE_linestyle_use_textures(FreestyleLineStyle *linestyle, const bool use_shading_nodes);
bool BKE_linestyle_use_textures(FreestyleLineStyle *linestyle, bool use_shading_nodes);
void BKE_linestyle_default_shader(const struct bContext *C, FreestyleLineStyle *linestyle);

View File

@ -212,12 +212,10 @@ void BKE_main_lock(struct Main *bmain);
void BKE_main_unlock(struct Main *bmain);
/** Generate the mappings between used IDs and their users, and vice-versa. */
void BKE_main_relations_create(struct Main *bmain, const short flag);
void BKE_main_relations_create(struct Main *bmain, short flag);
void BKE_main_relations_free(struct Main *bmain);
/** Set or clear given `tag` in all relation entries of given `bmain`. */
void BKE_main_relations_tag_set(struct Main *bmain,
const eMainIDRelationsEntryTags tag,
const bool value);
void BKE_main_relations_tag_set(struct Main *bmain, eMainIDRelationsEntryTags tag, bool value);
/**
* Create a #GSet storing all IDs present in given \a bmain, by their pointers.

View File

@ -56,9 +56,9 @@ enum {
* \param old_bmain: If not NULL, its IDs will be added the valid references set.
*/
struct IDNameLib_Map *BKE_main_idmap_create(struct Main *bmain,
const bool create_valid_ids_set,
bool create_valid_ids_set,
struct Main *old_bmain,
const int idmap_types) ATTR_WARN_UNUSED_RESULT
int idmap_types) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
void BKE_main_idmap_destroy(struct IDNameLib_Map *id_map) ATTR_NONNULL();
@ -78,8 +78,7 @@ struct ID *BKE_main_idmap_lookup_id(struct IDNameLib_Map *id_map,
ATTR_NONNULL(1, 2);
struct ID *BKE_main_idmap_lookup_uuid(struct IDNameLib_Map *id_map,
const uint session_uuid) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
uint session_uuid) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
#ifdef __cplusplus
}

View File

@ -115,7 +115,7 @@ float BKE_mask_spline_project_co(struct MaskSpline *spline,
struct MaskSplinePoint *point,
float start_u,
const float co[2],
const eMaskSign sign);
eMaskSign sign);
/** \} */
@ -144,18 +144,16 @@ void BKE_mask_point_normal(struct MaskSpline *spline,
float n[2]);
float BKE_mask_point_weight_scalar(struct MaskSpline *spline,
struct MaskSplinePoint *point,
const float u);
float BKE_mask_point_weight(struct MaskSpline *spline,
struct MaskSplinePoint *point,
const float u);
float u);
float BKE_mask_point_weight(struct MaskSpline *spline, struct MaskSplinePoint *point, float u);
struct MaskSplinePointUW *BKE_mask_point_sort_uw(struct MaskSplinePoint *point,
struct MaskSplinePointUW *uw);
void BKE_mask_point_add_uw(struct MaskSplinePoint *point, float u, float w);
void BKE_mask_point_select_set(struct MaskSplinePoint *point, const bool do_select);
void BKE_mask_point_select_set(struct MaskSplinePoint *point, bool do_select);
void BKE_mask_point_select_set_handle(struct MaskSplinePoint *point,
const eMaskWhichHandle which_handle,
const bool do_select);
eMaskWhichHandle which_handle,
bool do_select);
/** \} */
@ -193,12 +191,12 @@ void BKE_mask_coord_to_image(struct Image *image,
/** \name Parenting
* \{ */
void BKE_mask_evaluate(struct Mask *mask, const float ctime, const bool do_newframe);
void BKE_mask_layer_evaluate(struct MaskLayer *masklay, const float ctime, const bool do_newframe);
void BKE_mask_evaluate(struct Mask *mask, float ctime, bool do_newframe);
void BKE_mask_layer_evaluate(struct MaskLayer *masklay, float ctime, bool do_newframe);
void BKE_mask_parent_init(struct MaskParent *parent);
void BKE_mask_calc_handle_adjacent_interp(struct MaskSpline *spline,
struct MaskSplinePoint *point,
const float u);
float u);
/**
* Calculates the tangent of a point by its previous and next
* (ignoring handles - as if its a poly line).
@ -214,7 +212,7 @@ void BKE_mask_calc_handle_point(struct MaskSpline *spline, struct MaskSplinePoin
*/
void BKE_mask_calc_handle_point_auto(struct MaskSpline *spline,
struct MaskSplinePoint *point,
const bool do_recalc_length);
bool do_recalc_length);
void BKE_mask_get_handle_point_adjacent(struct MaskSpline *spline,
struct MaskSplinePoint *point,
struct MaskSplinePoint **r_point_prev,
@ -247,22 +245,21 @@ void BKE_mask_layer_shape_to_mask(struct MaskLayer *masklay, struct MaskLayerSha
void BKE_mask_layer_shape_to_mask_interp(struct MaskLayer *masklay,
struct MaskLayerShape *masklay_shape_a,
struct MaskLayerShape *masklay_shape_b,
const float fac);
struct MaskLayerShape *BKE_mask_layer_shape_find_frame(struct MaskLayer *masklay, const int frame);
float fac);
struct MaskLayerShape *BKE_mask_layer_shape_find_frame(struct MaskLayer *masklay, int frame);
/**
* When returning 2 - the frame isn't found but before/after frames are.
*/
int BKE_mask_layer_shape_find_frame_range(struct MaskLayer *masklay,
const float frame,
float frame,
struct MaskLayerShape **r_masklay_shape_a,
struct MaskLayerShape **r_masklay_shape_b);
/**
* \note Does *not* add to the list.
*/
struct MaskLayerShape *BKE_mask_layer_shape_alloc(struct MaskLayer *masklay, const int frame);
struct MaskLayerShape *BKE_mask_layer_shape_alloc(struct MaskLayer *masklay, int frame);
void BKE_mask_layer_shape_free(struct MaskLayerShape *masklay_shape);
struct MaskLayerShape *BKE_mask_layer_shape_verify_frame(struct MaskLayer *masklay,
const int frame);
struct MaskLayerShape *BKE_mask_layer_shape_verify_frame(struct MaskLayer *masklay, int frame);
struct MaskLayerShape *BKE_mask_layer_shape_duplicate(struct MaskLayerShape *masklay_shape);
void BKE_mask_layer_shape_unlink(struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape);
void BKE_mask_layer_shape_sort(struct MaskLayer *masklay);
@ -354,15 +351,14 @@ void BKE_mask_clipboard_paste_to_layer(struct Main *bmain, struct MaskLayer *mas
unsigned int BKE_mask_spline_resolution(struct MaskSpline *spline, int width, int height);
unsigned int BKE_mask_spline_feather_resolution(struct MaskSpline *spline, int width, int height);
int BKE_mask_spline_differentiate_calc_total(const struct MaskSpline *spline,
const unsigned int resol);
int BKE_mask_spline_differentiate_calc_total(const struct MaskSpline *spline, unsigned int resol);
float (*BKE_mask_spline_differentiate_with_resolution(struct MaskSpline *spline,
const unsigned int resol,
unsigned int resol,
unsigned int *r_tot_diff_point))[2];
void BKE_mask_spline_feather_collapse_inner_loops(struct MaskSpline *spline,
float (*feather_points)[2],
const unsigned int tot_feather_point);
unsigned int tot_feather_point);
float (*BKE_mask_spline_differentiate(
struct MaskSpline *spline, int width, int height, unsigned int *r_tot_diff_point))[2];
/**
@ -371,8 +367,8 @@ float (*BKE_mask_spline_differentiate(
*/
float (*BKE_mask_spline_feather_differentiated_points_with_resolution(
struct MaskSpline *spline,
const unsigned int resol,
const bool do_feather_isect,
unsigned int resol,
bool do_feather_isect,
unsigned int *r_tot_feather_point))[2];
/* *** mask point functions which involve evaluation *** */
@ -393,8 +389,8 @@ float *BKE_mask_point_segment_feather_diff(struct MaskSpline *spline,
int height,
unsigned int *tot_feather_point);
void BKE_mask_layer_evaluate_animation(struct MaskLayer *masklay, const float ctime);
void BKE_mask_layer_evaluate_deform(struct MaskLayer *masklay, const float ctime);
void BKE_mask_layer_evaluate_animation(struct MaskLayer *masklay, float ctime);
void BKE_mask_layer_evaluate_deform(struct MaskLayer *masklay, float ctime);
void BKE_mask_eval_animation(struct Depsgraph *depsgraph, struct Mask *mask);
void BKE_mask_eval_update(struct Depsgraph *depsgraph, struct Mask *mask);
@ -414,19 +410,19 @@ MaskRasterHandle *BKE_maskrasterize_handle_new(void);
void BKE_maskrasterize_handle_free(MaskRasterHandle *mr_handle);
void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle,
struct Mask *mask,
const int width,
const int height,
const bool do_aspect_correct,
const bool do_mask_aa,
const bool do_feather);
int width,
int height,
bool do_aspect_correct,
bool do_mask_aa,
bool do_feather);
float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float xy[2]);
/**
* \brief Rasterize a buffer from a single mask (threaded execution).
*/
void BKE_maskrasterize_buffer(MaskRasterHandle *mr_handle,
const unsigned int width,
const unsigned int height,
unsigned int width,
unsigned int height,
float *buffer);
/** \} */

View File

@ -51,7 +51,7 @@ void BKE_object_materials_test(struct Main *bmain, struct Object *ob, struct ID
void BKE_objects_materials_test_all(struct Main *bmain, struct ID *id);
void BKE_object_material_resize(struct Main *bmain,
struct Object *ob,
const short totcol,
short totcol,
bool do_id_user);
void BKE_object_material_remap(struct Object *ob, const unsigned int *remap);
/**
@ -110,7 +110,7 @@ void BKE_object_material_array_assign(struct Main *bmain,
struct Object *ob,
struct Material ***matar,
int totcol,
const bool to_object_only);
bool to_object_only);
short BKE_object_material_slot_find_index(struct Object *ob, struct Material *ma);
bool BKE_object_material_slot_add(struct Main *bmain, struct Object *ob);
@ -172,7 +172,7 @@ void BKE_id_material_eval_ensure_default_slot(struct ID *id);
* \param col: new value.
* \param fac: Zero for is no change.
*/
void ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
void ramp_blend(int type, float r_col[3], float fac, const float col[3]);
/** \} */

View File

@ -82,18 +82,15 @@ float *BKE_mball_make_orco(struct Object *ob, struct ListBase *dispbase);
* meta-ball, because this meta-ball influence polygonization of meta-balls. */
void BKE_mball_properties_copy(struct Scene *scene, struct Object *active_object);
bool BKE_mball_minmax_ex(const struct MetaBall *mb,
float min[3],
float max[3],
const float obmat[4][4],
const short flag);
bool BKE_mball_minmax_ex(
const struct MetaBall *mb, float min[3], float max[3], const float obmat[4][4], short flag);
/* Basic vertex data functions. */
bool BKE_mball_minmax(const struct MetaBall *mb, float min[3], float max[3]);
bool BKE_mball_center_median(const struct MetaBall *mb, float r_cent[3]);
bool BKE_mball_center_bounds(const struct MetaBall *mb, float r_cent[3]);
void BKE_mball_transform(struct MetaBall *mb, const float mat[4][4], const bool do_props);
void BKE_mball_transform(struct MetaBall *mb, const float mat[4][4], bool do_props);
void BKE_mball_translate(struct MetaBall *mb, const float offset[3]);
/**
@ -101,7 +98,7 @@ void BKE_mball_translate(struct MetaBall *mb, const float offset[3]);
*
* \note don't do context manipulation here (rna uses).
*/
struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, const int type);
struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, int type);
/* *** select funcs *** */

View File

@ -74,7 +74,7 @@ struct BMesh *BKE_mesh_to_bmesh_ex(const struct Mesh *me,
const struct BMeshFromMeshParams *convert_params);
struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me,
struct Object *ob,
const bool add_key_index,
bool add_key_index,
const struct BMeshCreateParams *params);
struct Mesh *BKE_mesh_from_bmesh_nomain(struct BMesh *bm,
@ -130,7 +130,7 @@ void BKE_mesh_copy_parameters_for_eval(struct Mesh *me_dst, const struct Mesh *m
* when a new mesh is based on an existing mesh.
*/
void BKE_mesh_copy_parameters(struct Mesh *me_dst, const struct Mesh *me_src);
void BKE_mesh_update_customdata_pointers(struct Mesh *me, const bool do_ensure_tess_cd);
void BKE_mesh_update_customdata_pointers(struct Mesh *me, bool do_ensure_tess_cd);
void BKE_mesh_ensure_skin_customdata(struct Mesh *me);
struct Mesh *BKE_mesh_new_nomain(
@ -189,7 +189,7 @@ void BKE_mesh_assign_object(struct Main *bmain, struct Object *ob, struct Mesh *
void BKE_mesh_from_metaball(struct ListBase *lb, struct Mesh *me);
void BKE_mesh_to_curve_nurblist(const struct Mesh *me,
struct ListBase *nurblist,
const int edge_users_test);
int edge_users_test);
void BKE_mesh_to_curve(struct Main *bmain,
struct Depsgraph *depsgraph,
struct Scene *scene,
@ -208,7 +208,7 @@ void BKE_mesh_material_index_remove(struct Mesh *me, short index);
bool BKE_mesh_material_index_used(struct Mesh *me, short index);
void BKE_mesh_material_index_clear(struct Mesh *me);
void BKE_mesh_material_remap(struct Mesh *me, const unsigned int *remap, unsigned int remap_len);
void BKE_mesh_smooth_flag_set(struct Mesh *me, const bool use_smooth);
void BKE_mesh_smooth_flag_set(struct Mesh *me, bool use_smooth);
/**
* Needed after converting a mesh with subsurf optimal display to mesh.
@ -254,8 +254,8 @@ void BKE_mesh_split_faces(struct Mesh *mesh, bool free_loop_normals);
*/
struct Mesh *BKE_mesh_new_from_object(struct Depsgraph *depsgraph,
struct Object *object,
const bool preserve_all_data_layers,
const bool preserve_origindex);
bool preserve_all_data_layers,
bool preserve_origindex);
/**
* This is a version of BKE_mesh_new_from_object() which stores mesh in the given main database.
@ -276,8 +276,8 @@ struct Mesh *BKE_mesh_create_derived_for_modifier(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob_eval,
struct ModifierData *md_eval,
const bool use_virtual_modifiers,
const bool build_shapekey_layers);
bool use_virtual_modifiers,
bool build_shapekey_layers);
/**
* Copies a nomain-Mesh into an existing Mesh.
@ -294,7 +294,7 @@ void BKE_mesh_nomain_to_meshkey(struct Mesh *mesh_src, struct Mesh *mesh_dst, st
/* basic vertex data functions */
bool BKE_mesh_minmax(const struct Mesh *me, float r_min[3], float r_max[3]);
void BKE_mesh_transform(struct Mesh *me, const float mat[4][4], bool do_keys);
void BKE_mesh_translate(struct Mesh *me, const float offset[3], const bool do_keys);
void BKE_mesh_translate(struct Mesh *me, const float offset[3], bool do_keys);
void BKE_mesh_tessface_ensure(struct Mesh *mesh);
void BKE_mesh_tessface_clear(struct Mesh *mesh);
@ -344,7 +344,7 @@ int BKE_mesh_tessface_calc_ex(struct CustomData *fdata,
int totface,
int totloop,
int totpoly,
const bool do_face_nor_copy);
bool do_face_nor_copy);
void BKE_mesh_tessface_calc(struct Mesh *mesh);
/**
@ -410,7 +410,7 @@ void BKE_mesh_loop_manifold_fan_around_vert_next(const struct MLoop *mloops,
const struct MPoly *mpolys,
const int *loop_to_poly,
const int *e2lfan_curr,
const uint mv_pivot_index,
uint mv_pivot_index,
const struct MLoop **r_mlfan_curr,
int *r_mlfan_curr_index,
int *r_mlfan_vert_index,
@ -423,15 +423,15 @@ void BKE_mesh_loop_manifold_fan_around_vert_next(const struct MLoop *mloops,
* to keep same shading as with auto-smooth!
*/
void BKE_edges_sharp_from_angle_set(const struct MVert *mverts,
const int numVerts,
int numVerts,
struct MEdge *medges,
const int numEdges,
int numEdges,
struct MLoop *mloops,
const int numLoops,
int numLoops,
struct MPoly *mpolys,
const float (*polynors)[3],
const int numPolys,
const float split_angle);
int numPolys,
float split_angle);
/**
* References a contiguous loop-fan with normal offset vars.
@ -484,9 +484,7 @@ enum {
};
/* Low-level custom normals functions. */
void BKE_lnor_spacearr_init(MLoopNorSpaceArray *lnors_spacearr,
const int numLoops,
const char data_type);
void BKE_lnor_spacearr_init(MLoopNorSpaceArray *lnors_spacearr, int numLoops, char data_type);
void BKE_lnor_spacearr_clear(MLoopNorSpaceArray *lnors_spacearr);
void BKE_lnor_spacearr_free(MLoopNorSpaceArray *lnors_spacearr);
@ -528,9 +526,9 @@ void BKE_lnor_space_define(MLoopNorSpace *lnor_space,
*/
void BKE_lnor_space_add_loop(MLoopNorSpaceArray *lnors_spacearr,
MLoopNorSpace *lnor_space,
const int ml_index,
int ml_index,
void *bm_loop,
const bool is_single);
bool is_single);
void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space,
const short clnor_data[2],
float r_custom_lnor[3]);
@ -546,42 +544,42 @@ void BKE_lnor_space_custom_normal_to_data(MLoopNorSpace *lnor_space,
* (splitting edges).
*/
void BKE_mesh_normals_loop_split(const struct MVert *mverts,
const int numVerts,
int numVerts,
struct MEdge *medges,
const int numEdges,
int numEdges,
struct MLoop *mloops,
float (*r_loopnors)[3],
const int numLoops,
int numLoops,
struct MPoly *mpolys,
const float (*polynors)[3],
const int numPolys,
const bool use_split_normals,
const float split_angle,
int numPolys,
bool use_split_normals,
float split_angle,
MLoopNorSpaceArray *r_lnors_spacearr,
short (*clnors_data)[2],
int *r_loop_to_poly);
void BKE_mesh_normals_loop_custom_set(const struct MVert *mverts,
const int numVerts,
int numVerts,
struct MEdge *medges,
const int numEdges,
int numEdges,
struct MLoop *mloops,
float (*r_custom_loopnors)[3],
const int numLoops,
int numLoops,
struct MPoly *mpolys,
const float (*polynors)[3],
const int numPolys,
int numPolys,
short (*r_clnors_data)[2]);
void BKE_mesh_normals_loop_custom_from_vertices_set(const struct MVert *mverts,
float (*r_custom_vertnors)[3],
const int numVerts,
int numVerts,
struct MEdge *medges,
const int numEdges,
int numEdges,
struct MLoop *mloops,
const int numLoops,
int numLoops,
struct MPoly *mpolys,
const float (*polynors)[3],
const int numPolys,
int numPolys,
short (*r_clnors_data)[2]);
/**
@ -590,9 +588,9 @@ void BKE_mesh_normals_loop_custom_from_vertices_set(const struct MVert *mverts,
* \param clnors: The computed custom loop normals.
* \param r_vert_clnors: The (already allocated) array where to store averaged per-vertex normals.
*/
void BKE_mesh_normals_loop_to_vertex(const int numVerts,
void BKE_mesh_normals_loop_to_vertex(int numVerts,
const struct MLoop *mloops,
const int numLoops,
int numLoops,
const float (*clnors)[3],
float (*r_vert_clnors)[3]);
@ -682,9 +680,9 @@ bool BKE_mesh_center_of_volume(const struct Mesh *me, float r_cent[3]);
* \param r_center: Center of mass.
*/
void BKE_mesh_calc_volume(const struct MVert *mverts,
const int mverts_num,
int mverts_num,
const struct MLoopTri *mlooptri,
const int looptri_num,
int looptri_num,
const struct MLoop *mloop,
float *r_volume,
float r_center[3]);
@ -724,7 +722,7 @@ void BKE_mesh_convert_mfaces_to_mpolys_ex(struct ID *id,
* Flip a single MLoop's #MDisps structure,
* low level function to be called from face-flipping code which re-arranged the mdisps themselves.
*/
void BKE_mesh_mdisp_flip(struct MDisps *md, const bool use_loop_mdisp_flip);
void BKE_mesh_mdisp_flip(struct MDisps *md, bool use_loop_mdisp_flip);
/**
* Flip (invert winding of) the given \a mpoly, i.e. reverse order of its loops
@ -739,7 +737,7 @@ void BKE_mesh_polygon_flip_ex(struct MPoly *mpoly,
struct CustomData *ldata,
float (*lnors)[3],
struct MDisps *mdisp,
const bool use_loop_mdisp_flip);
bool use_loop_mdisp_flip);
void BKE_mesh_polygon_flip(struct MPoly *mpoly, struct MLoop *mloop, struct CustomData *ldata);
/**
* Flip (invert winding of) all polygons (used to inverse their normals).
@ -792,8 +790,8 @@ enum {
*/
struct Mesh *BKE_mesh_merge_verts(struct Mesh *mesh,
const int *vtargetmap,
const int tot_vtargetmap,
const int merge_mode);
int tot_vtargetmap,
int merge_mode);
/* Flush flags. */
@ -803,35 +801,35 @@ struct Mesh *BKE_mesh_merge_verts(struct Mesh *mesh,
void BKE_mesh_flush_hidden_from_verts_ex(const struct MVert *mvert,
const struct MLoop *mloop,
struct MEdge *medge,
const int totedge,
int totedge,
struct MPoly *mpoly,
const int totpoly);
int totpoly);
void BKE_mesh_flush_hidden_from_verts(struct Mesh *me);
void BKE_mesh_flush_hidden_from_polys_ex(struct MVert *mvert,
const struct MLoop *mloop,
struct MEdge *medge,
const int totedge,
int totedge,
const struct MPoly *mpoly,
const int totpoly);
int totpoly);
void BKE_mesh_flush_hidden_from_polys(struct Mesh *me);
/**
* simple poly -> vert/edge selection.
*/
void BKE_mesh_flush_select_from_polys_ex(struct MVert *mvert,
const int totvert,
int totvert,
const struct MLoop *mloop,
struct MEdge *medge,
const int totedge,
int totedge,
const struct MPoly *mpoly,
const int totpoly);
int totpoly);
void BKE_mesh_flush_select_from_polys(struct Mesh *me);
void BKE_mesh_flush_select_from_verts_ex(const struct MVert *mvert,
const int totvert,
int totvert,
const struct MLoop *mloop,
struct MEdge *medge,
const int totedge,
int totedge,
struct MPoly *mpoly,
const int totpoly);
int totpoly);
void BKE_mesh_flush_select_from_verts(struct Mesh *me);
/* spatial evaluation */
@ -847,9 +845,9 @@ void BKE_mesh_flush_select_from_verts(struct Mesh *me);
* \param vert_cos_new: resulting coords.
*/
void BKE_mesh_calc_relative_deform(const struct MPoly *mpoly,
const int totpoly,
int totpoly,
const struct MLoop *mloop,
const int totvert,
int totvert,
const float (*vert_cos_src)[3],
const float (*vert_cos_dst)[3],
@ -864,7 +862,7 @@ void BKE_mesh_calc_relative_deform(const struct MPoly *mpoly,
*
* \returns true if a change is made.
*/
bool BKE_mesh_validate(struct Mesh *me, const bool do_verbose, const bool cddata_check_mask);
bool BKE_mesh_validate(struct Mesh *me, bool do_verbose, bool cddata_check_mask);
/**
* Checks if a Mesh is valid without any modification. This is always verbose.
* \returns True if the mesh is valid.
@ -903,24 +901,24 @@ bool BKE_mesh_validate_arrays(struct Mesh *me,
struct MPoly *mpolys,
unsigned int totpoly,
struct MDeformVert *dverts, /* assume totvert length */
const bool do_verbose,
const bool do_fixes,
bool do_verbose,
bool do_fixes,
bool *r_change);
/**
* \returns is_valid.
*/
bool BKE_mesh_validate_all_customdata(struct CustomData *vdata,
const uint totvert,
uint totvert,
struct CustomData *edata,
const uint totedge,
uint totedge,
struct CustomData *ldata,
const uint totloop,
uint totloop,
struct CustomData *pdata,
const uint totpoly,
const bool check_meshmask,
const bool do_verbose,
const bool do_fixes,
uint totpoly,
bool check_meshmask,
bool do_verbose,
bool do_fixes,
bool *r_change);
void BKE_mesh_strip_loose_faces(struct Mesh *me);
@ -938,12 +936,12 @@ void BKE_mesh_strip_loose_edges(struct Mesh *me);
* If the mesh is from a very old blender version,
* convert mface->edcode to edge drawflags
*/
void BKE_mesh_calc_edges_legacy(struct Mesh *me, const bool use_old);
void BKE_mesh_calc_edges_legacy(struct Mesh *me, bool use_old);
void BKE_mesh_calc_edges_loose(struct Mesh *mesh);
/**
* Calculate edges from polygons.
*/
void BKE_mesh_calc_edges(struct Mesh *mesh, bool keep_existing_edges, const bool select_new_edges);
void BKE_mesh_calc_edges(struct Mesh *mesh, bool keep_existing_edges, bool select_new_edges);
/**
* Calculate/create edges from tessface data
*

View File

@ -46,8 +46,8 @@ Mesh *direct_mesh_boolean(blender::Span<const Mesh *> meshes,
blender::Span<const float4x4 *> obmats,
const float4x4 &target_transform,
blender::Span<blender::Array<short>> material_remaps,
const bool use_self,
const bool hole_tolerant,
const int boolean_mode);
bool use_self,
bool hole_tolerant,
int boolean_mode);
} // namespace blender::meshintersect

View File

@ -42,14 +42,14 @@ typedef enum eMeshFairingDepth {
* the vertex should be modified by fairing. */
void BKE_bmesh_prefair_and_fair_vertices(struct BMesh *bm,
bool *affect_vertices,
const eMeshFairingDepth depth);
eMeshFairingDepth depth);
/* This function can optionally use the MVert coordinates of deform_mverts to read and write the
* fairing result. When NULL, the function will use mesh->mverts directly. */
void BKE_mesh_prefair_and_fair_vertices(struct Mesh *mesh,
struct MVert *deform_mverts,
bool *affect_vertices,
const eMeshFairingDepth depth);
eMeshFairingDepth depth);
#ifdef __cplusplus
}

View File

@ -68,9 +68,7 @@ void BKE_mesh_foreach_mapped_subdiv_face_center(
void *userData,
MeshForeachFlag flag);
void BKE_mesh_foreach_mapped_vert_coords_get(struct Mesh *me_eval,
float (*r_cos)[3],
const int totcos);
void BKE_mesh_foreach_mapped_vert_coords_get(struct Mesh *me_eval, float (*r_cos)[3], int totcos);
#ifdef __cplusplus
}

View File

@ -100,8 +100,8 @@ UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly,
unsigned int totpoly,
unsigned int totvert,
const float limit[2],
const bool selected,
const bool use_winding);
bool selected,
bool use_winding);
UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
@ -137,11 +137,11 @@ void BKE_mesh_vert_loop_map_create(MeshElemMap **r_map,
void BKE_mesh_vert_looptri_map_create(MeshElemMap **r_map,
int **r_mem,
const struct MVert *mvert,
const int totvert,
int totvert,
const struct MLoopTri *mlooptri,
const int totlooptri,
int totlooptri,
const struct MLoop *mloop,
const int totloop);
int totloop);
/**
* Generates a map where the key is the vertex and the value
* is a list of edges that use that vertex as an endpoint.
@ -163,11 +163,11 @@ void BKE_mesh_vert_edge_vert_map_create(
void BKE_mesh_edge_loop_map_create(MeshElemMap **r_map,
int **r_mem,
const struct MEdge *medge,
const int totedge,
int totedge,
const struct MPoly *mpoly,
const int totpoly,
int totpoly,
const struct MLoop *mloop,
const int totloop);
int totloop);
/**
* Generates a map where the key is the edge and the value
* is a list of polygons that use that edge.
@ -176,11 +176,11 @@ void BKE_mesh_edge_loop_map_create(MeshElemMap **r_map,
void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map,
int **r_mem,
const struct MEdge *medge,
const int totedge,
int totedge,
const struct MPoly *mpoly,
const int totpoly,
int totpoly,
const struct MLoop *mloop,
const int totloop);
int totloop);
/**
* This function creates a map so the source-data (vert/edge/loop/poly)
* can loop over the destination data (using the destination arrays origindex).
@ -195,11 +195,8 @@ void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map,
* `totfinal` could be `tottessface` and `final_origindex` its ORIGINDEX custom-data.
* This would allow an MPoly to loop over its tessfaces.
*/
void BKE_mesh_origindex_map_create(MeshElemMap **r_map,
int **r_mem,
const int totsource,
const int *final_origindex,
const int totfinal);
void BKE_mesh_origindex_map_create(
MeshElemMap **r_map, int **r_mem, int totsource, const int *final_origindex, int totfinal);
/**
* A version of #BKE_mesh_origindex_map_create that takes a looptri array.
* Making a poly -> looptri map.
@ -207,9 +204,9 @@ void BKE_mesh_origindex_map_create(MeshElemMap **r_map,
void BKE_mesh_origindex_map_create_looptri(MeshElemMap **r_map,
int **r_mem,
const struct MPoly *mpoly,
const int mpoly_num,
int mpoly_num,
const struct MLoopTri *looptri,
const int looptri_num);
int looptri_num);
/* islands */
@ -239,28 +236,28 @@ typedef struct MeshIslandStore {
} MeshIslandStore;
void BKE_mesh_loop_islands_init(MeshIslandStore *island_store,
const short item_type,
const int items_num,
const short island_type,
const short innercut_type);
short item_type,
int items_num,
short island_type,
short innercut_type);
void BKE_mesh_loop_islands_clear(MeshIslandStore *island_store);
void BKE_mesh_loop_islands_free(MeshIslandStore *island_store);
void BKE_mesh_loop_islands_add(MeshIslandStore *island_store,
const int item_num,
int item_num,
const int *items_indices,
const int num_island_items,
int num_island_items,
int *island_item_indices,
const int num_innercut_items,
int num_innercut_items,
int *innercut_item_indices);
typedef bool (*MeshRemapIslandsCalc)(struct MVert *verts,
const int totvert,
int totvert,
struct MEdge *edges,
const int totedge,
int totedge,
struct MPoly *polys,
const int totpoly,
int totpoly,
struct MLoop *loops,
const int totloop,
int totloop,
struct MeshIslandStore *r_island_store);
/* Above vert/UV mapping stuff does not do what we need here, but does things we do not need here.
@ -271,13 +268,13 @@ typedef bool (*MeshRemapIslandsCalc)(struct MVert *verts,
* not some UV layers coordinates.
*/
bool BKE_mesh_calc_islands_loop_poly_edgeseam(struct MVert *verts,
const int totvert,
int totvert,
struct MEdge *edges,
const int totedge,
int totedge,
struct MPoly *polys,
const int totpoly,
int totpoly,
struct MLoop *loops,
const int totloop,
int totloop,
MeshIslandStore *r_island_store);
/**
@ -294,13 +291,13 @@ bool BKE_mesh_calc_islands_loop_poly_edgeseam(struct MVert *verts,
* those loops are supposed to be really quick to do.
*/
bool BKE_mesh_calc_islands_loop_poly_uvmap(struct MVert *verts,
const int totvert,
int totvert,
struct MEdge *edges,
const int totedge,
int totedge,
struct MPoly *polys,
const int totpoly,
int totpoly,
struct MLoop *loops,
const int totloop,
int totloop,
const struct MLoopUV *luvs,
MeshIslandStore *r_island_store);
@ -313,13 +310,13 @@ bool BKE_mesh_calc_islands_loop_poly_uvmap(struct MVert *verts,
* Note it's callers's responsibility to MEM_freeN returned array.
*/
int *BKE_mesh_calc_smoothgroups(const struct MEdge *medge,
const int totedge,
int totedge,
const struct MPoly *mpoly,
const int totpoly,
int totpoly,
const struct MLoop *mloop,
const int totloop,
int totloop,
int *r_totgroup,
const bool use_bitflags);
bool use_bitflags);
/* use on looptri vertex values */
#define BKE_MESH_TESSTRI_VINDEX_ORDER(_tri, _v) \

View File

@ -40,19 +40,18 @@ struct Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(struct MirrorMo
void BKE_mesh_mirror_apply_mirror_on_axis(struct Main *bmain,
struct Mesh *mesh,
const int axis,
const float dist);
int axis,
float dist);
/**
* \warning This should _not_ be used to modify original meshes since
* it doesn't handle shape-keys, use #BKE_mesh_mirror_apply_mirror_on_axis instead.
*/
struct Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(
struct MirrorModifierData *mmd,
struct Object *ob,
const struct Mesh *mesh,
const int axis,
const bool use_correct_order_on_merge);
struct Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(struct MirrorModifierData *mmd,
struct Object *ob,
const struct Mesh *mesh,
int axis,
bool use_correct_order_on_merge);
#ifdef __cplusplus
}

View File

@ -50,10 +50,10 @@ typedef struct MeshPairRemap {
} MeshPairRemap;
/* Helpers! */
void BKE_mesh_remap_init(MeshPairRemap *map, const int items_num);
void BKE_mesh_remap_init(MeshPairRemap *map, int items_num);
void BKE_mesh_remap_free(MeshPairRemap *map);
void BKE_mesh_remap_item_define_invalid(MeshPairRemap *map, const int index);
void BKE_mesh_remap_item_define_invalid(MeshPairRemap *map, int index);
/* TODO:
* Add other 'from/to' mapping sources, like e.g. using an UVMap, etc.
@ -155,10 +155,10 @@ enum {
};
void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(
const int vert_mode,
const int edge_mode,
const int loop_mode,
const int poly_mode,
int vert_mode,
int edge_mode,
int loop_mode,
int poly_mode,
struct CustomData_MeshMasks *cddata_mask);
/**
@ -173,73 +173,73 @@ void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(
*/
float BKE_mesh_remap_calc_difference_from_mesh(const struct SpaceTransform *space_transform,
const struct MVert *verts_dst,
const int numverts_dst,
int numverts_dst,
struct Mesh *me_src);
/**
* Set r_space_transform so that best bbox of dst matches best bbox of src.
*/
void BKE_mesh_remap_find_best_match_from_mesh(const struct MVert *verts_dst,
const int numverts_dst,
int numverts_dst,
struct Mesh *me_src,
struct SpaceTransform *r_space_transform);
void BKE_mesh_remap_calc_verts_from_mesh(const int mode,
void BKE_mesh_remap_calc_verts_from_mesh(int mode,
const struct SpaceTransform *space_transform,
const float max_dist,
const float ray_radius,
float max_dist,
float ray_radius,
const struct MVert *verts_dst,
const int numverts_dst,
const bool dirty_nors_dst,
int numverts_dst,
bool dirty_nors_dst,
struct Mesh *me_src,
MeshPairRemap *r_map);
void BKE_mesh_remap_calc_edges_from_mesh(const int mode,
void BKE_mesh_remap_calc_edges_from_mesh(int mode,
const struct SpaceTransform *space_transform,
const float max_dist,
const float ray_radius,
float max_dist,
float ray_radius,
const struct MVert *verts_dst,
const int numverts_dst,
int numverts_dst,
const struct MEdge *edges_dst,
const int numedges_dst,
const bool dirty_nors_dst,
int numedges_dst,
bool dirty_nors_dst,
struct Mesh *me_src,
MeshPairRemap *r_map);
void BKE_mesh_remap_calc_loops_from_mesh(const int mode,
void BKE_mesh_remap_calc_loops_from_mesh(int mode,
const struct SpaceTransform *space_transform,
const float max_dist,
const float ray_radius,
float max_dist,
float ray_radius,
struct MVert *verts_dst,
const int numverts_dst,
int numverts_dst,
struct MEdge *edges_dst,
const int numedges_dst,
int numedges_dst,
struct MLoop *loops_dst,
const int numloops_dst,
int numloops_dst,
struct MPoly *polys_dst,
const int numpolys_dst,
int numpolys_dst,
struct CustomData *ldata_dst,
struct CustomData *pdata_dst,
const bool use_split_nors_dst,
const float split_angle_dst,
const bool dirty_nors_dst,
bool use_split_nors_dst,
float split_angle_dst,
bool dirty_nors_dst,
struct Mesh *me_src,
MeshRemapIslandsCalc gen_islands_src,
const float islands_precision_src,
float islands_precision_src,
struct MeshPairRemap *r_map);
void BKE_mesh_remap_calc_polys_from_mesh(const int mode,
void BKE_mesh_remap_calc_polys_from_mesh(int mode,
const struct SpaceTransform *space_transform,
const float max_dist,
const float ray_radius,
float max_dist,
float ray_radius,
struct MVert *verts_dst,
const int numverts_dst,
int numverts_dst,
struct MLoop *loops_dst,
const int numloops_dst,
int numloops_dst,
struct MPoly *polys_dst,
const int numpolys_dst,
int numpolys_dst,
struct CustomData *pdata_dst,
const bool dirty_nors_dst,
bool dirty_nors_dst,
struct Mesh *me_src,
struct MeshPairRemap *r_map);

View File

@ -56,7 +56,7 @@ void BKE_mesh_runtime_free_data(struct Mesh *mesh);
* However, keep all the flags which defines what the mesh is (for example, that
* it's deformed only, or that its custom data layers are out of date.)
*/
void BKE_mesh_runtime_reset_on_copy(struct Mesh *mesh, const int flag);
void BKE_mesh_runtime_reset_on_copy(struct Mesh *mesh, int flag);
int BKE_mesh_runtime_looptri_len(const struct Mesh *mesh);
void BKE_mesh_runtime_looptri_recalc(struct Mesh *mesh);
/**

View File

@ -89,8 +89,8 @@ class MeshAttributeInterpolator {
const Span<int> looptri_indices);
void sample_data(const GVArray &src,
const AttributeDomain domain,
const eAttributeMapMode mode,
AttributeDomain domain,
eAttributeMapMode mode,
const GMutableSpan dst);
void sample_attribute(const ReadAttributeLookup &src_attribute,

View File

@ -32,14 +32,14 @@ struct ReportList;
* NOTE: * The mesh should be made of only tris and quads!
*/
void BKE_mesh_calc_loop_tangent_single_ex(const struct MVert *mverts,
const int numVerts,
int numVerts,
const struct MLoop *mloops,
float (*r_looptangent)[4],
float (*loopnors)[3],
const struct MLoopUV *loopuv,
const int numLoops,
int numLoops,
const struct MPoly *mpolys,
const int numPolys,
int numPolys,
struct ReportList *reports);
/**
* Wrapper around BKE_mesh_calc_loop_tangent_single_ex, which takes care of most boiling code.
@ -57,10 +57,10 @@ void BKE_mesh_calc_loop_tangent_single(struct Mesh *mesh,
*/
void BKE_mesh_calc_loop_tangent_ex(const struct MVert *mvert,
const struct MPoly *mpoly,
const uint mpoly_len,
uint mpoly_len,
const struct MLoop *mloop,
const struct MLoopTri *looptri,
const uint looptri_len,
uint looptri_len,
struct CustomData *loopdata,
bool calc_active_tangent,
@ -71,7 +71,7 @@ void BKE_mesh_calc_loop_tangent_ex(const struct MVert *mvert,
const float (*vert_orco)[3],
/* result */
struct CustomData *loopdata_out,
const uint loopdata_out_len,
uint loopdata_out_len,
short *tangent_mask_curr_p);
void BKE_mesh_calc_loop_tangents(struct Mesh *me_eval,

View File

@ -184,7 +184,7 @@ typedef struct ModifierTypeInfo {
*
* \param flag: Copying options (see BKE_lib_id.h's LIB_ID_COPY_... flags for more).
*/
void (*copyData)(const struct ModifierData *md, struct ModifierData *target, const int flag);
void (*copyData)(const struct ModifierData *md, struct ModifierData *target, int flag);
/********************* Deform modifier functions *********************/
@ -322,7 +322,7 @@ typedef struct ModifierTypeInfo {
*
* The dag_eval_mode should be of type eEvaluationMode.
*/
bool (*dependsOnTime)(struct Scene *scene, struct ModifierData *md, const int dag_eval_mode);
bool (*dependsOnTime)(struct Scene *scene, struct ModifierData *md, int dag_eval_mode);
/**
* True when a deform modifier uses normals, the requiredDataMask
@ -415,7 +415,7 @@ void BKE_modifier_panel_expand(struct ModifierData *md);
*/
struct ModifierData *BKE_modifier_new(int type);
void BKE_modifier_free_ex(struct ModifierData *md, const int flag);
void BKE_modifier_free_ex(struct ModifierData *md, int flag);
void BKE_modifier_free(struct ModifierData *md);
/**
* Use instead of `BLI_remlink` when the object's active modifier should change.
@ -432,11 +432,9 @@ bool BKE_modifier_unique_name(struct ListBase *modifiers, struct ModifierData *m
*/
void BKE_modifier_copydata_generic(const struct ModifierData *md,
struct ModifierData *md_dst,
const int flag);
int flag);
void BKE_modifier_copydata(struct ModifierData *md, struct ModifierData *target);
void BKE_modifier_copydata_ex(struct ModifierData *md,
struct ModifierData *target,
const int flag);
void BKE_modifier_copydata_ex(struct ModifierData *md, struct ModifierData *target, int flag);
bool BKE_modifier_depends_ontime(struct Scene *scene, struct ModifierData *md, int dag_eval_mode);
bool BKE_modifier_supports_mapping(struct ModifierData *md);
bool BKE_modifier_supports_cage(struct Scene *scene, struct ModifierData *md);
@ -604,7 +602,7 @@ void BKE_modifier_deform_vertsEM(ModifierData *md,
* (i.e. mesh topology remains the same as original one, a.k.a. 'cage' mesh).
*/
struct Mesh *BKE_modifier_get_evaluated_mesh_from_evaluated_object(struct Object *ob_eval,
const bool get_cage_mesh);
bool get_cage_mesh);
void BKE_modifier_check_uuids_unique_and_report(const struct Object *object);

View File

@ -167,7 +167,7 @@ void multiresModifier_ensure_external_read(struct Mesh *mesh,
/**** interpolation stuff ****/
/* Adapted from `sculptmode.c` */
void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u, float v);
void old_mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, float v);
/**
* Find per-corner coordinate with given per-face UV coord.
*/
@ -175,9 +175,9 @@ int mdisp_rot_face_to_crn(struct MVert *mvert,
struct MPoly *mpoly,
struct MLoop *mloop,
const struct MLoopTri *lt,
const int face_side,
const float u,
const float v,
int face_side,
float u,
float v,
float *x,
float *y);
@ -187,7 +187,7 @@ bool multiresModifier_reshapeFromVertcos(struct Depsgraph *depsgraph,
struct Object *object,
struct MultiresModifierData *mmd,
const float (*vert_coords)[3],
const int num_vert_coords);
int num_vert_coords);
/**
* Returns truth on success, false otherwise.
*
@ -202,7 +202,7 @@ bool multiresModifier_reshapeFromDeformModifier(struct Depsgraph *depsgraph,
struct Object *ob,
struct MultiresModifierData *mmd,
struct ModifierData *deform_md);
bool multiresModifier_reshapeFromCCG(const int tot_level,
bool multiresModifier_reshapeFromCCG(int tot_level,
struct Mesh *coarse_mesh,
struct SubdivCCG *subdiv_ccg);
@ -216,7 +216,7 @@ typedef enum eMultiresSubdivideModeType {
void multiresModifier_subdivide(struct Object *object,
struct MultiresModifierData *mmd,
const eMultiresSubdivideModeType mode);
eMultiresSubdivideModeType mode);
void multires_subdivide_create_tangent_displacement_linear_grids(struct Object *object,
struct MultiresModifierData *mmd);
@ -226,8 +226,8 @@ void multires_subdivide_create_tangent_displacement_linear_grids(struct Object *
*/
void multiresModifier_subdivide_to_level(struct Object *object,
struct MultiresModifierData *mmd,
const int top_level,
const eMultiresSubdivideModeType mode);
int top_level,
eMultiresSubdivideModeType mode);
/* Subdivision integration, defined in multires_subdiv.c */
@ -242,9 +242,9 @@ void BKE_multires_subdiv_mesh_settings_init(struct SubdivToMeshSettings *mesh_se
const struct Scene *scene,
const struct Object *object,
const struct MultiresModifierData *mmd,
const bool use_render_params,
const bool ignore_simplify,
const bool ignore_control_edges);
bool use_render_params,
bool ignore_simplify,
bool ignore_control_edges);
/* General helpers. */
@ -257,7 +257,7 @@ void BKE_multires_subdiv_mesh_settings_init(struct SubdivToMeshSettings *mesh_se
BLI_INLINE void BKE_multires_construct_tangent_matrix(float tangent_matrix[3][3],
const float dPdu[3],
const float dPdv[3],
const int corner);
int corner);
/* Versioning. */

View File

@ -481,7 +481,7 @@ void ntreeFreeTree(struct bNodeTree *ntree);
void ntreeFreeEmbeddedTree(struct bNodeTree *ntree);
struct bNodeTree *ntreeCopyTree_ex(const struct bNodeTree *ntree,
struct Main *bmain,
const bool do_id_user);
bool do_id_user);
struct bNodeTree *ntreeCopyTree(struct Main *bmain, const struct bNodeTree *ntree);
/**
@ -518,7 +518,7 @@ void ntreeSetOutput(struct bNodeTree *ntree);
void ntreeFreeCache(struct bNodeTree *ntree);
void ntreeNodeFlagSet(const bNodeTree *ntree, const int flag, const bool enable);
void ntreeNodeFlagSet(const bNodeTree *ntree, int flag, bool enable);
/**
* Returns localized tree for execution in threads.
*/
@ -770,7 +770,7 @@ void nodeChainIter(const bNodeTree *ntree,
const bNode *node_start,
bool (*callback)(bNode *, bNode *, void *, const bool),
void *userdata,
const bool reversed);
bool reversed);
/**
* Iterate over a chain of nodes, starting with \a node_start, executing
* \a callback for each node (which can return false to end iterator).
@ -1103,9 +1103,7 @@ bool BKE_node_tree_iter_step(struct NodeTreeIterStore *ntreeiter,
/** \name Node Tree
*/
void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree,
struct Scene *scene,
const int layer_index);
void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, int layer_index);
/* -------------------------------------------------------------------- */
/** \name Shader Nodes
@ -1550,7 +1548,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree,
float dxt[3],
float dyt[3],
int osatex,
const short thread,
short thread,
const struct Tex *tex,
short which_output,
int cfra,

View File

@ -67,11 +67,9 @@ void BKE_object_workob_calc_parent(struct Depsgraph *depsgraph,
struct Object *workob);
void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src);
void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src, const int flag);
struct ParticleSystem *BKE_object_copy_particlesystem(struct ParticleSystem *psys, const int flag);
void BKE_object_copy_particlesystems(struct Object *ob_dst,
const struct Object *ob_src,
const int flag);
void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src, int flag);
struct ParticleSystem *BKE_object_copy_particlesystem(struct ParticleSystem *psys, int flag);
void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src, int flag);
void BKE_object_free_particlesystems(struct Object *ob);
void BKE_object_free_softbody(struct Object *ob);
void BKE_object_free_curve_cache(struct Object *ob);
@ -140,11 +138,11 @@ bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, struct GpencilModif
*/
bool BKE_object_modifier_stack_copy(struct Object *ob_dst,
const struct Object *ob_src,
const bool do_copy_all,
const int flag_subdata);
bool do_copy_all,
int flag_subdata);
void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_src);
void BKE_object_free_modifiers(struct Object *ob, const int flag);
void BKE_object_free_shaderfx(struct Object *ob, const int flag);
void BKE_object_free_modifiers(struct Object *ob, int flag);
void BKE_object_free_shaderfx(struct Object *ob, int flag);
/**
* Proxy rule:
@ -187,7 +185,7 @@ typedef enum eObjectVisibilityResult {
/**
* Return which parts of the object are visible, as evaluated by depsgraph.
*/
int BKE_object_visibility(const struct Object *ob, const int dag_eval_mode);
int BKE_object_visibility(const struct Object *ob, int dag_eval_mode);
/**
* More general add: creates minimum required data, but without vertices etc.
@ -268,7 +266,7 @@ struct Object *BKE_object_duplicate(struct Main *bmain,
/**
* Use with newly created objects to set their size (used to apply scene-scale).
*/
void BKE_object_obdata_size_init(struct Object *ob, const float size);
void BKE_object_obdata_size_init(struct Object *ob, float size);
void BKE_object_scale_to_mat3(struct Object *ob, float r_mat[3][3]);
void BKE_object_rot_to_mat3(const struct Object *ob, float r_mat[3][3], bool use_drot);
@ -289,12 +287,12 @@ void BKE_object_apply_mat4_ex(struct Object *ob,
const float mat[4][4],
struct Object *parent,
const float parentinv[4][4],
const bool use_compat);
bool use_compat);
/** See #BKE_object_apply_mat4_ex */
void BKE_object_apply_mat4(struct Object *ob,
const float mat[4][4],
const bool use_compat,
const bool use_parent);
bool use_compat,
bool use_parent);
void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]);
bool BKE_object_pose_context_check(const struct Object *ob);
@ -379,20 +377,20 @@ void BKE_object_dimensions_set_ex(struct Object *ob,
const float ob_obmat_orig[4][4]);
void BKE_object_dimensions_set(struct Object *ob, const float value[3], int axis_mask);
void BKE_object_empty_draw_type_set(struct Object *ob, const int value);
void BKE_object_empty_draw_type_set(struct Object *ob, int value);
/**
* Use this to temporally disable/enable bound-box.
*/
void BKE_object_boundbox_flag(struct Object *ob, int flag, const bool set);
void BKE_object_boundbox_flag(struct Object *ob, int flag, bool set);
void BKE_object_boundbox_calc_from_mesh(struct Object *ob, const struct Mesh *me_eval);
bool BKE_object_boundbox_calc_from_evaluated_geometry(struct Object *ob);
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden);
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], bool use_hidden);
bool BKE_object_minmax_dupli(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob,
float r_min[3],
float r_max[3],
const bool use_hidden);
bool use_hidden);
/**
* Sometimes min-max isn't enough, we need to loop over each point.
@ -423,7 +421,7 @@ void BKE_object_tfm_protected_backup(const struct Object *ob, ObjectTfmProtected
void BKE_object_tfm_protected_restore(struct Object *ob,
const ObjectTfmProtectedChannels *obtfm,
const short protectflag);
short protectflag);
void BKE_object_tfm_copy(struct Object *object_dst, const struct Object *object_src);
@ -471,10 +469,10 @@ void BKE_object_select_update(struct Depsgraph *depsgraph, struct Object *object
void BKE_object_eval_eval_base_flags(struct Depsgraph *depsgraph,
struct Scene *scene,
const int view_layer_index,
int view_layer_index,
struct Object *object,
int base_index,
const bool is_from_set);
bool is_from_set);
void BKE_object_handle_data_update(struct Depsgraph *depsgraph,
struct Scene *scene,
@ -504,7 +502,7 @@ void BKE_object_handle_update_ex(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob,
struct RigidBodyWorld *rbw,
const bool do_proxy_update);
bool do_proxy_update);
void BKE_object_sculpt_data_create(struct Object *ob);
@ -544,7 +542,7 @@ void BKE_object_delete_ptcache(struct Object *ob, int index);
struct KeyBlock *BKE_object_shapekey_insert(struct Main *bmain,
struct Object *ob,
const char *name,
const bool from_mix);
bool from_mix);
bool BKE_object_shapekey_remove(struct Main *bmain, struct Object *ob, struct KeyBlock *kb);
bool BKE_object_shapekey_free(struct Main *bmain, struct Object *ob);
@ -594,7 +592,7 @@ void BKE_object_runtime_reset(struct Object *object);
/**
* Reset all pointers which we don't want to be shared when copying the object.
*/
void BKE_object_runtime_reset_on_copy(struct Object *object, const int flag);
void BKE_object_runtime_reset_on_copy(struct Object *object, int flag);
/**
* The function frees memory used by the runtime data, but not the runtime field itself.
*

View File

@ -68,16 +68,14 @@ struct MDeformVert *BKE_object_defgroup_data_create(struct ID *id);
* \param use_selection: Only operate on selection.
* \return True if any vertex was removed, false otherwise.
*/
bool BKE_object_defgroup_clear(struct Object *ob,
struct bDeformGroup *dg,
const bool use_selection);
bool BKE_object_defgroup_clear(struct Object *ob, struct bDeformGroup *dg, bool use_selection);
/**
* Remove all verts (or only selected ones) from all vgroups. Work in Object and Edit modes.
*
* \param use_selection: Only operate on selection.
* \return True if any vertex was removed, false otherwise.
*/
bool BKE_object_defgroup_clear_all(struct Object *ob, const bool use_selection);
bool BKE_object_defgroup_clear_all(struct Object *ob, bool use_selection);
/**
* Remove given vgroup from object. Work in Object and Edit modes.
@ -120,7 +118,7 @@ bool *BKE_object_defgroup_subset_from_select_type(struct Object *ob,
* Store indices from the defgroup_validmap (faster lookups in some cases).
*/
void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap,
const int defgroup_tot,
int defgroup_tot,
int *r_defgroup_subset_map);
/* ********** */
@ -129,8 +127,8 @@ void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap,
* Gets the status of "flag" for each #bDeformGroup
* in the object data's vertex group list and returns an array containing them
*/
bool *BKE_object_defgroup_lock_flags_get(struct Object *ob, const int defbase_tot);
bool *BKE_object_defgroup_validmap_get(struct Object *ob, const int defbase_tot);
bool *BKE_object_defgroup_lock_flags_get(struct Object *ob, int defbase_tot);
bool *BKE_object_defgroup_validmap_get(struct Object *ob, int defbase_tot);
/**
* Returns total selected vgroups,
* `wpi.defbase_sel` is assumed malloc'd, all values are set.

View File

@ -73,13 +73,13 @@ typedef struct OceanCache {
struct Ocean *BKE_ocean_add(void);
void BKE_ocean_free_data(struct Ocean *oc);
void BKE_ocean_free(struct Ocean *oc);
bool BKE_ocean_ensure(struct OceanModifierData *omd, const int resolution);
bool BKE_ocean_ensure(struct OceanModifierData *omd, int resolution);
/**
* Return true if the ocean data is valid and can be used.
*/
bool BKE_ocean_init_from_modifier(struct Ocean *ocean,
struct OceanModifierData const *omd,
const int resolution);
int resolution);
/**
* Return true if the ocean is valid and can be used.
@ -162,12 +162,12 @@ void BKE_ocean_free_modifier_cache(struct OceanModifierData *omd);
* Model is intended for large area 'fully developed' sea, where winds have been steadily blowing
* for days over an area that includes hundreds of wavelengths on a side.
*/
float BLI_ocean_spectrum_piersonmoskowitz(const struct Ocean *oc, const float kx, const float kz);
float BLI_ocean_spectrum_piersonmoskowitz(const struct Ocean *oc, float kx, float kz);
/**
* TMA extends the JONSWAP spectrum.
* This spectral model is best suited to shallow water.
*/
float BLI_ocean_spectrum_texelmarsenarsloe(const struct Ocean *oc, const float kx, const float kz);
float BLI_ocean_spectrum_texelmarsenarsloe(const struct Ocean *oc, float kx, float kz);
/**
* Hasselmann et al, 1973. This model extends the Pierson-Moskowitz model with a peak sharpening
* function This enhancement is an artificial construct to address the problem that the wave
@ -176,7 +176,7 @@ float BLI_ocean_spectrum_texelmarsenarsloe(const struct Ocean *oc, const float k
* The fetch parameter represents the distance from a lee shore,
* called the fetch, or the distance over which the wind blows with constant velocity.
*/
float BLI_ocean_spectrum_jonswap(const struct Ocean *oc, const float kx, const float kz);
float BLI_ocean_spectrum_jonswap(const struct Ocean *oc, float kx, float kz);
#ifdef __cplusplus
}

View File

@ -120,7 +120,7 @@ int BKE_packedfile_write_to_file(struct ReportList *reports,
const char *ref_file_name,
const char *filename,
struct PackedFile *pf,
const bool guimode);
bool guimode);
/* Free. */

View File

@ -148,14 +148,14 @@ bool BKE_palette_is_empty(const struct Palette *palette);
void BKE_palette_color_remove(struct Palette *palette, struct PaletteColor *color);
void BKE_palette_clear(struct Palette *palette);
void BKE_palette_sort_hsv(struct tPaletteColorHSV *color_array, const int totcol);
void BKE_palette_sort_svh(struct tPaletteColorHSV *color_array, const int totcol);
void BKE_palette_sort_vhs(struct tPaletteColorHSV *color_array, const int totcol);
void BKE_palette_sort_luminance(struct tPaletteColorHSV *color_array, const int totcol);
void BKE_palette_sort_hsv(struct tPaletteColorHSV *color_array, int totcol);
void BKE_palette_sort_svh(struct tPaletteColorHSV *color_array, int totcol);
void BKE_palette_sort_vhs(struct tPaletteColorHSV *color_array, int totcol);
void BKE_palette_sort_luminance(struct tPaletteColorHSV *color_array, int totcol);
bool BKE_palette_from_hash(struct Main *bmain,
struct GHash *color_table,
const char *name,
const bool linear);
bool linear);
/* Paint curves. */
@ -172,7 +172,7 @@ void BKE_paint_free(struct Paint *p);
* #id_us_plus(), rather than if we were copying between 2 existing scenes where a matching
* value should decrease the existing user count as with #paint_brush_set()
*/
void BKE_paint_copy(struct Paint *src, struct Paint *tar, const int flag);
void BKE_paint_copy(struct Paint *src, struct Paint *tar, int flag);
void BKE_paint_runtime_init(const struct ToolSettings *ts, struct Paint *paint);
@ -183,7 +183,7 @@ bool BKE_paint_ensure_from_paintmode(struct Scene *sce, ePaintMode mode);
struct Paint *BKE_paint_get_active_from_paintmode(struct Scene *sce, ePaintMode mode);
const struct EnumPropertyItem *BKE_paint_get_tool_enum_from_paintmode(ePaintMode mode);
const char *BKE_paint_get_tool_prop_id_from_paintmode(ePaintMode mode);
uint BKE_paint_get_brush_tool_offset_from_paintmode(const ePaintMode mode);
uint BKE_paint_get_brush_tool_offset_from_paintmode(ePaintMode mode);
struct Paint *BKE_paint_get_active(struct Scene *sce, struct ViewLayer *view_layer);
struct Paint *BKE_paint_get_active_from_context(const struct bContext *C);
ePaintMode BKE_paintmode_get_active_from_context(const struct bContext *C);
@ -193,7 +193,7 @@ void BKE_paint_brush_set(struct Paint *paint, struct Brush *br);
struct Palette *BKE_paint_palette(struct Paint *paint);
void BKE_paint_palette_set(struct Paint *p, struct Palette *palette);
void BKE_paint_curve_set(struct Brush *br, struct PaintCurve *pc);
void BKE_paint_curve_clamp_endpoint_add_index(struct PaintCurve *pc, const int add_index);
void BKE_paint_curve_clamp_endpoint_add_index(struct PaintCurve *pc, int add_index);
/**
* Return true when in vertex/weight/texture paint + face-select mode?
@ -231,7 +231,7 @@ bool paint_is_bmesh_face_hidden(struct BMFace *f);
float paint_grid_paint_mask(const struct GridPaintMask *gpm, uint level, uint x, uint y);
void BKE_paint_face_set_overlay_color_get(const int face_set, const int seed, uchar r_color[4]);
void BKE_paint_face_set_overlay_color_get(int face_set, int seed, uchar r_color[4]);
/* Stroke related. */

View File

@ -294,10 +294,8 @@ int count_particles_mod(struct ParticleSystem *psys, int totgr, int cur);
int psys_get_child_number(struct Scene *scene,
struct ParticleSystem *psys,
const bool use_render_params);
int psys_get_tot_child(struct Scene *scene,
struct ParticleSystem *psys,
const bool use_render_params);
bool use_render_params);
int psys_get_tot_child(struct Scene *scene, struct ParticleSystem *psys, bool use_render_params);
/**
* Get object's active particle system safely.
@ -329,9 +327,7 @@ struct ParticleSystem *psys_eval_get(struct Depsgraph *depsgraph,
struct ParticleSystem *psys);
bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys);
bool psys_check_enabled(struct Object *ob,
struct ParticleSystem *psys,
const bool use_render_params);
bool psys_check_enabled(struct Object *ob, struct ParticleSystem *psys, bool use_render_params);
bool psys_check_edited(struct ParticleSystem *psys);
void psys_find_group_weights(struct ParticleSettings *part);
@ -392,7 +388,7 @@ void object_remove_particle_system(struct Main *bmain,
struct ParticleSettings *BKE_particlesettings_add(struct Main *bmain, const char *name);
void psys_reset(struct ParticleSystem *psys, int mode);
void psys_find_parents(struct ParticleSimulationData *sim, const bool use_render_params);
void psys_find_parents(struct ParticleSimulationData *sim, bool use_render_params);
void psys_unique_name(struct Object *object, struct ParticleSystem *psys, const char *defname);
@ -402,19 +398,17 @@ void psys_unique_name(struct Object *object, struct ParticleSystem *psys, const
* - Makes child strands possible and creates them too into the cache.
* - Cached path data is also used to determine cut position for the edit-mode tool.
*/
void psys_cache_paths(struct ParticleSimulationData *sim,
float cfra,
const bool use_render_params);
void psys_cache_paths(struct ParticleSimulationData *sim, float cfra, bool use_render_params);
void psys_cache_edit_paths(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob,
struct PTCacheEdit *edit,
float cfra,
const bool use_render_params);
bool use_render_params);
void psys_cache_child_paths(struct ParticleSimulationData *sim,
float cfra,
const bool editupdate,
const bool use_render_params);
bool editupdate,
bool use_render_params);
int do_guides(struct Depsgraph *depsgraph,
struct ParticleSettings *part,
struct ListBase *effectors,
@ -438,7 +432,7 @@ float psys_get_child_size(struct ParticleSystem *psys,
void psys_get_particle_on_path(struct ParticleSimulationData *sim,
int pa_num,
struct ParticleKey *state,
const bool vel);
bool vel);
/**
* Gets particle's state at a time.
* \return true if particle exists and can be seen and false if not.
@ -446,7 +440,7 @@ void psys_get_particle_on_path(struct ParticleSimulationData *sim,
bool psys_get_particle_state(struct ParticleSimulationData *sim,
int p,
struct ParticleKey *state,
const bool always);
bool always);
/* Child paths. */
@ -539,7 +533,7 @@ void particle_system_update(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob,
struct ParticleSystem *psys,
const bool use_render_params);
bool use_render_params);
/**
* Callback format for performing operations on ID-pointers for particle systems.
@ -678,8 +672,7 @@ void reset_particle(struct ParticleSimulationData *sim,
float dtime,
float cfra);
float psys_get_current_display_percentage(struct ParticleSystem *psys,
const bool use_render_params);
float psys_get_current_display_percentage(struct ParticleSystem *psys, bool use_render_params);
/* psys_reset */
#define PSYS_RESET_ALL 1

View File

@ -137,8 +137,8 @@ void BKE_pbvh_build_bmesh(PBVH *pbvh,
struct BMesh *bm,
bool smooth_shading,
struct BMLog *log,
const int cd_vert_node_offset,
const int cd_face_node_offset);
int cd_vert_node_offset,
int cd_face_node_offset);
void BKE_pbvh_free(PBVH *pbvh);
/* Hierarchical Search in the BVH, two methods:
@ -279,8 +279,8 @@ bool BKE_pbvh_bmesh_update_topology(PBVH *pbvh,
const float center[3],
const float view_normal[3],
float radius,
const bool use_frontface,
const bool use_projected);
bool use_frontface,
bool use_projected);
/* Node Access */
@ -361,7 +361,7 @@ void BKE_pbvh_respect_hide_set(PBVH *pbvh, bool respect_hide);
/* Vertex Deformer. */
float (*BKE_pbvh_vert_coords_alloc(struct PBVH *pbvh))[3];
void BKE_pbvh_vert_coords_apply(struct PBVH *pbvh, const float (*vertCos)[3], const int totvert);
void BKE_pbvh_vert_coords_apply(struct PBVH *pbvh, const float (*vertCos)[3], int totvert);
bool BKE_pbvh_is_deformed(struct PBVH *pbvh);
/* Vertex Iterator. */

View File

@ -363,7 +363,7 @@ void BKE_ptcache_free_list(struct ListBase *ptcaches);
/* returns first point cache */
struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new,
const struct ListBase *ptcaches_old,
const int flag);
int flag);
/********************** Baking *********************/

View File

@ -38,7 +38,7 @@ extern const char *POINTCLOUD_ATTR_RADIUS;
void *BKE_pointcloud_add(struct Main *bmain, const char *name);
void *BKE_pointcloud_add_default(struct Main *bmain, const char *name);
struct PointCloud *BKE_pointcloud_new_nomain(const int totpoint);
struct PointCloud *BKE_pointcloud_new_nomain(int totpoint);
struct BoundBox *BKE_pointcloud_boundbox_get(struct Object *ob);
bool BKE_pointcloud_minmax(const struct PointCloud *pointcloud, float r_min[3], float r_max[3]);

View File

@ -60,7 +60,7 @@ void BKE_rigidbody_free_constraint(struct Object *ob);
void BKE_rigidbody_object_copy(struct Main *bmain,
struct Object *ob_dst,
const struct Object *ob_src,
const int flag);
int flag);
/** \} */
@ -122,7 +122,7 @@ void BKE_rigidbody_main_collection_object_add(struct Main *bmain,
/**
* Copy.
*/
struct RigidBodyWorld *BKE_rigidbody_world_copy(struct RigidBodyWorld *rbw, const int flag);
struct RigidBodyWorld *BKE_rigidbody_world_copy(struct RigidBodyWorld *rbw, int flag);
void BKE_rigidbody_world_groups_relink(struct RigidBodyWorld *rbw);
/**
@ -167,11 +167,11 @@ void BKE_rigidbody_ensure_local_object(struct Main *bmain, struct Object *ob);
void BKE_rigidbody_remove_object(struct Main *bmain,
struct Scene *scene,
struct Object *ob,
const bool free_us);
bool free_us);
void BKE_rigidbody_remove_constraint(struct Main *bmain,
struct Scene *scene,
struct Object *ob,
const bool free_us);
bool free_us);
/** \} */

View File

@ -83,7 +83,7 @@ struct Scene *BKE_scene_add(struct Main *bmain, const char *name);
void BKE_scene_remove_rigidbody_object(struct Main *bmain,
struct Scene *scene,
struct Object *ob,
const bool free_us);
bool free_us);
/**
* Check if there is any instance of the object in the scene.
@ -141,7 +141,7 @@ struct Scene *BKE_scene_set_name(struct Main *bmain, const char *name);
/**
* \param flag: copying options (see BKE_lib_id.h's `LIB_ID_COPY_...` flags for more).
*/
struct ToolSettings *BKE_toolsettings_copy(struct ToolSettings *toolsettings, const int flag);
struct ToolSettings *BKE_toolsettings_copy(struct ToolSettings *toolsettings, int flag);
void BKE_toolsettings_free(struct ToolSettings *toolsettings);
struct Scene *BKE_scene_duplicate(struct Main *bmain, struct Scene *sce, eSceneCopyMethod type);
@ -181,7 +181,7 @@ float BKE_scene_ctime_get(const struct Scene *scene);
* Convert integer frame number to fractional frame number taking into account
* sub-frames and time remapping.
*/
float BKE_scene_frame_to_ctime(const struct Scene *scene, const int frame);
float BKE_scene_frame_to_ctime(const struct Scene *scene, int frame);
/**
* Get current fractional frame based on frame and sub-frame.
@ -220,7 +220,7 @@ void BKE_scene_graph_update_for_newframe(struct Depsgraph *depsgraph);
/**
* Applies changes right away, does all sets too.
*/
void BKE_scene_graph_update_for_newframe_ex(struct Depsgraph *depsgraph, const bool clear_recalc);
void BKE_scene_graph_update_for_newframe_ex(struct Depsgraph *depsgraph, bool clear_recalc);
/**
* Ensures given scene/view_layer pair has a valid, up-to-date depsgraph.
@ -275,7 +275,7 @@ int BKE_render_preview_pixel_size(const struct RenderData *r);
* Apply the needed correction factor to value, based on unit_type
* (only length-related are affected currently) and `unit->scale_length`.
*/
double BKE_scene_unit_scale(const struct UnitSettings *unit, const int unit_type, double value);
double BKE_scene_unit_scale(const struct UnitSettings *unit, int unit_type, double value);
/* Multi-view. */
@ -295,9 +295,8 @@ bool BKE_scene_multiview_is_render_view_first(const struct RenderData *rd, const
bool BKE_scene_multiview_is_render_view_last(const struct RenderData *rd, const char *viewname);
int BKE_scene_multiview_num_views_get(const struct RenderData *rd);
struct SceneRenderView *BKE_scene_multiview_render_view_findindex(const struct RenderData *rd,
const int view_id);
const char *BKE_scene_multiview_render_view_name_get(const struct RenderData *rd,
const int view_id);
int view_id);
const char *BKE_scene_multiview_render_view_name_get(const struct RenderData *rd, int view_id);
int BKE_scene_multiview_view_id_get(const struct RenderData *rd, const char *viewname);
void BKE_scene_multiview_filepath_get(struct SceneRenderView *srv,
const char *filepath,
@ -313,7 +312,7 @@ void BKE_scene_multiview_view_filepath_get(const struct RenderData *rd,
const char *view,
char *r_filepath);
const char *BKE_scene_multiview_view_suffix_get(const struct RenderData *rd, const char *viewname);
const char *BKE_scene_multiview_view_id_suffix_get(const struct RenderData *rd, const int view_id);
const char *BKE_scene_multiview_view_id_suffix_get(const struct RenderData *rd, int view_id);
void BKE_scene_multiview_view_prefix_get(struct Scene *scene,
const char *name,
char *r_prefix,
@ -349,7 +348,7 @@ void BKE_scene_undo_depsgraphs_restore(struct Main *bmain, struct GHash *depsgra
void BKE_scene_transform_orientation_remove(struct Scene *scene,
struct TransformOrientation *orientation);
struct TransformOrientation *BKE_scene_transform_orientation_find(const struct Scene *scene,
const int index);
int index);
/**
* \return the index that \a orientation has within \a scene's transform-orientation list
* or -1 if not found.

View File

@ -465,19 +465,18 @@ void BKE_region_callback_refresh_tag_gizmomap_set(void (*callback)(struct wmGizm
*/
struct ARegion *BKE_area_find_region_type(const struct ScrArea *area, int type);
struct ARegion *BKE_area_find_region_active_win(struct ScrArea *area);
struct ARegion *BKE_area_find_region_xy(struct ScrArea *area,
const int regiontype,
const int xy[2]) ATTR_NONNULL(3);
struct ARegion *BKE_area_find_region_xy(struct ScrArea *area, int regiontype, const int xy[2])
ATTR_NONNULL(3);
/**
* \note This is only for screen level regions (typically menus/popups).
*/
struct ARegion *BKE_screen_find_region_xy(struct bScreen *screen,
const int regiontype,
int regiontype,
const int xy[2]) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 3);
struct ARegion *BKE_screen_find_main_region_at_xy(struct bScreen *screen,
const int space_type,
int space_type,
const int xy[2]) ATTR_NONNULL(1, 3);
/**
* \note Ideally we can get the area from the context,
@ -490,15 +489,12 @@ struct ScrArea *BKE_screen_find_area_from_space(struct bScreen *screen,
* \note Using this function is generally a last resort, you really want to be
* using the context when you can - campbell
*/
struct ScrArea *BKE_screen_find_big_area(struct bScreen *screen,
const int spacetype,
const short min);
struct ScrArea *BKE_screen_find_big_area(struct bScreen *screen, int spacetype, short min);
struct ScrArea *BKE_screen_area_map_find_area_xy(const struct ScrAreaMap *areamap,
const int spacetype,
int spacetype,
const int xy[2]) ATTR_NONNULL(1, 3);
struct ScrArea *BKE_screen_find_area_xy(struct bScreen *screen,
const int spacetype,
const int xy[2]) ATTR_NONNULL(1, 3);
struct ScrArea *BKE_screen_find_area_xy(struct bScreen *screen, int spacetype, const int xy[2])
ATTR_NONNULL(1, 3);
void BKE_screen_gizmo_tag_refresh(struct bScreen *screen);

View File

@ -164,7 +164,7 @@ void BKE_shaderfxType_panel_id(ShaderFxType type, char *r_idname);
void BKE_shaderfx_panel_expand(struct ShaderFxData *fx);
const ShaderFxTypeInfo *BKE_shaderfx_get_info(ShaderFxType type);
struct ShaderFxData *BKE_shaderfx_new(int type);
void BKE_shaderfx_free_ex(struct ShaderFxData *fx, const int flag);
void BKE_shaderfx_free_ex(struct ShaderFxData *fx, int flag);
void BKE_shaderfx_free(struct ShaderFxData *fx);
/**
* Check unique name.
@ -183,9 +183,7 @@ struct ShaderFxData *BKE_shaderfx_findby_type(struct Object *ob, ShaderFxType ty
struct ShaderFxData *BKE_shaderfx_findby_name(struct Object *ob, const char *name);
void BKE_shaderfx_copydata_generic(const struct ShaderFxData *fx_src, struct ShaderFxData *fx_dst);
void BKE_shaderfx_copydata(struct ShaderFxData *fx, struct ShaderFxData *target);
void BKE_shaderfx_copydata_ex(struct ShaderFxData *fx,
struct ShaderFxData *target,
const int flag);
void BKE_shaderfx_copydata_ex(struct ShaderFxData *fx, struct ShaderFxData *target, int flag);
void BKE_shaderfx_copy(struct ListBase *dst, const struct ListBase *src);
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *userData);

View File

@ -121,14 +121,14 @@ void shrinkwrapModifier_deform(struct ShrinkwrapModifierData *smd,
struct Object *ob,
struct Mesh *mesh,
struct MDeformVert *dvert,
const int defgrp_index,
int defgrp_index,
float (*vertexCos)[3],
int numVerts);
/* Implementation of the Shrinkwrap Grease Pencil modifier. */
void shrinkwrapGpencilModifier_deform(struct ShrinkwrapGpencilModifierData *mmd,
struct Object *ob,
struct MDeformVert *dvert,
const int defgrp_index,
int defgrp_index,
float (*vertexCos)[3],
int numVerts);
@ -166,7 +166,7 @@ void BKE_shrinkwrap_remesh_target_project(struct Mesh *src_me,
bool BKE_shrinkwrap_project_normal(char options,
const float vert[3],
const float dir[3],
const float ray_radius,
float ray_radius,
const struct SpaceTransform *transf,
struct ShrinkwrapTreeData *tree,
BVHTreeRayHit *hit);

View File

@ -127,9 +127,9 @@ class Spline {
virtual int size() const = 0;
int segments_size() const;
bool is_cyclic() const;
void set_cyclic(const bool value);
void set_cyclic(bool value);
virtual void resize(const int size) = 0;
virtual void resize(int size) = 0;
virtual blender::MutableSpan<blender::float3> positions() = 0;
virtual blender::Span<blender::float3> positions() const = 0;
virtual blender::MutableSpan<float> radii() = 0;
@ -175,7 +175,7 @@ class Spline {
*/
blender::Span<blender::float3> evaluated_normals() const;
void bounds_min_max(blender::float3 &min, blender::float3 &max, const bool use_evaluated) const;
void bounds_min_max(blender::float3 &min, blender::float3 &max, bool use_evaluated) const;
struct LookupResult {
/**
@ -202,20 +202,20 @@ class Spline {
* factor between them, which can be used to look up any attribute on the evaluated points.
* \note This does not support extrapolation.
*/
LookupResult lookup_evaluated_factor(const float factor) const;
LookupResult lookup_evaluated_factor(float factor) const;
/**
* The same as #lookup_evaluated_factor, but looks up a length directly instead of
* a portion of the total.
*/
LookupResult lookup_evaluated_length(const float length) const;
LookupResult lookup_evaluated_length(float length) const;
/**
* Return an array of evenly spaced samples along the length of the spline. The samples are
* indices and factors to the next index encoded in floats. The logic for converting from the
* float values to interpolation data is in #lookup_data_from_index_factor.
*/
blender::Array<float> sample_uniform_index_factors(const int samples_size) const;
LookupResult lookup_data_from_index_factor(const float index_factor) const;
blender::Array<float> sample_uniform_index_factors(int samples_size) const;
LookupResult lookup_data_from_index_factor(float index_factor) const;
/**
* Sample any input data with a value for each evaluated point (already interpolated to evaluated
@ -328,9 +328,9 @@ class BezierSpline final : public Spline {
int size() const final;
int resolution() const;
void set_resolution(const int value);
void set_resolution(int value);
void resize(const int size) final;
void resize(int size) final;
blender::MutableSpan<blender::float3> positions() final;
blender::Span<blender::float3> positions() const final;
blender::MutableSpan<float> radii() final;
@ -370,14 +370,14 @@ class BezierSpline final : public Spline {
* Set positions for the right handle of the control point, ensuring that
* aligned handles stay aligned. Has no effect for auto and vector type handles.
*/
void set_handle_position_right(const int index, const blender::float3 &value);
void set_handle_position_right(int index, const blender::float3 &value);
/**
* Set positions for the left handle of the control point, ensuring that
* aligned handles stay aligned. Has no effect for auto and vector type handles.
*/
void set_handle_position_left(const int index, const blender::float3 &value);
void set_handle_position_left(int index, const blender::float3 &value);
bool point_is_sharp(const int index) const;
bool point_is_sharp(int index) const;
void mark_cache_invalid() final;
int evaluated_points_size() const final;
@ -414,18 +414,18 @@ class BezierSpline final : public Spline {
* to interpolate data from control points to evaluated points between them. The next control
* point index result will not overflow the size of the control point vectors.
*/
InterpolationData interpolation_data_from_index_factor(const float index_factor) const;
InterpolationData interpolation_data_from_index_factor(float index_factor) const;
virtual blender::fn::GVArray interpolate_to_evaluated(
const blender::fn::GVArray &src) const override;
void evaluate_segment(const int index,
const int next_index,
void evaluate_segment(int index,
int next_index,
blender::MutableSpan<blender::float3> positions) const;
/**
* \warning This functional assumes that the spline has more than one point.
*/
bool segment_is_vector(const int start_index) const;
bool segment_is_vector(int start_index) const;
/** See comment and diagram for #calculate_segment_insertion. */
struct InsertResult {
@ -454,9 +454,7 @@ class BezierSpline final : public Spline {
* point_prev point_next
* </pre>
*/
InsertResult calculate_segment_insertion(const int index,
const int next_index,
const float parameter);
InsertResult calculate_segment_insertion(int index, int next_index, float parameter);
private:
/**
@ -552,14 +550,14 @@ class NURBSpline final : public Spline {
int size() const final;
int resolution() const;
void set_resolution(const int value);
void set_resolution(int value);
uint8_t order() const;
void set_order(const uint8_t value);
void set_order(uint8_t value);
bool check_valid_size_and_order() const;
int knots_size() const;
void resize(const int size) final;
void resize(int size) final;
blender::MutableSpan<blender::float3> positions() final;
blender::Span<blender::float3> positions() const final;
blender::MutableSpan<float> radii() final;
@ -615,7 +613,7 @@ class PolySpline final : public Spline {
int size() const final;
void resize(const int size) final;
void resize(int size) final;
blender::MutableSpan<blender::float3> positions() final;
blender::Span<blender::float3> positions() const final;
blender::MutableSpan<float> radii() final;
@ -676,7 +674,7 @@ struct CurveEval {
*/
bool has_spline_with_type(const Spline::Type type) const;
void resize(const int size);
void resize(int size);
/**
* \warning Call #reallocate on the spline's attributes after adding all splines.
*/
@ -686,7 +684,7 @@ struct CurveEval {
void translate(const blender::float3 &translation);
void transform(const blender::float4x4 &matrix);
bool bounds_min_max(blender::float3 &min, blender::float3 &max, const bool use_evaluated) const;
bool bounds_min_max(blender::float3 &min, blender::float3 &max, bool use_evaluated) const;
/**
* Return the start indices for each of the curve spline's control points, if they were part

View File

@ -151,9 +151,9 @@ typedef struct SubdivDisplacement {
* Averaging of displacement for vertices created for over coarse vertices
* and edges is done by subdiv code. */
void (*eval_displacement)(struct SubdivDisplacement *displacement,
const int ptex_face_index,
const float u,
const float v,
int ptex_face_index,
float u,
float v,
const float dPdu[3],
const float dPdv[3],
float r_D[3]);
@ -275,35 +275,35 @@ int *BKE_subdiv_face_ptex_offset_get(Subdiv *subdiv);
/* For a given (ptex_u, ptex_v) within a ptex face get corresponding
* (grid_u, grid_v) within a grid. */
BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv(const float ptex_u,
const float ptex_v,
BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv(float ptex_u,
float ptex_v,
float *r_grid_u,
float *r_grid_v);
/* Inverse of above. */
BLI_INLINE void BKE_subdiv_grid_uv_to_ptex_face_uv(const float grid_u,
const float grid_v,
BLI_INLINE void BKE_subdiv_grid_uv_to_ptex_face_uv(float grid_u,
float grid_v,
float *r_ptex_u,
float *r_ptex_v);
/* For a given subdivision level (which is NOT refinement level) get size of
* CCG grid (number of grid points on a side).
*/
BLI_INLINE int BKE_subdiv_grid_size_from_level(const int level);
BLI_INLINE int BKE_subdiv_grid_size_from_level(int level);
/* Simplified version of mdisp_rot_face_to_crn, only handles quad and
* works in normalized coordinates.
*
* NOTE: Output coordinates are in ptex coordinates. */
BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(const float quad_u,
const float quad_v,
BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(float quad_u,
float quad_v,
float *r_corner_u,
float *r_corner_v);
/* Converts (u, v) coordinate from within a grid to a quad coordinate in
* normalized ptex coordinates. */
BLI_INLINE void BKE_subdiv_rotate_grid_to_quad(
const int corner, const float grid_u, const float grid_v, float *r_quad_u, float *r_quad_v);
int corner, float grid_u, float grid_v, float *r_quad_u, float *r_quad_v);
/* Convert Blender edge crease value to OpenSubdiv sharpness. */
BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_f(float edge_crease);

View File

@ -46,9 +46,9 @@ struct Subdiv;
/* Functor which evaluates mask value at a given (u, v) of given ptex face. */
typedef struct SubdivCCGMaskEvaluator {
float (*eval_mask)(struct SubdivCCGMaskEvaluator *mask_evaluator,
const int ptex_face_index,
const float u,
const float v);
int ptex_face_index,
float u,
float v);
/* Free the data, not the evaluator itself. */
void (*free)(struct SubdivCCGMaskEvaluator *mask_evaluator);
@ -67,8 +67,7 @@ bool BKE_subdiv_ccg_mask_init_from_paint(SubdivCCGMaskEvaluator *mask_evaluator,
/* Functor which evaluates material and flags of a given coarse face. */
typedef struct SubdivCCGMaterialFlagsEvaluator {
DMFlagMat (*eval_material_flags)(
struct SubdivCCGMaterialFlagsEvaluator *material_flags_evaluator,
const int coarse_face_index);
struct SubdivCCGMaterialFlagsEvaluator *material_flags_evaluator, int coarse_face_index);
/* Free the data, not the evaluator itself. */
void (*free)(struct SubdivCCGMaterialFlagsEvaluator *material_flags_evaluator);
@ -307,10 +306,10 @@ bool BKE_subdiv_ccg_check_coord_valid(const SubdivCCG *subdiv_ccg, const SubdivC
* the current vertex are added at the end of the coords array. */
void BKE_subdiv_ccg_neighbor_coords_get(const SubdivCCG *subdiv_ccg,
const SubdivCCGCoord *coord,
const bool include_duplicates,
bool include_duplicates,
SubdivCCGNeighbors *r_neighbors);
int BKE_subdiv_ccg_grid_to_face_index(const SubdivCCG *subdiv_ccg, const int grid_index);
int BKE_subdiv_ccg_grid_to_face_index(const SubdivCCG *subdiv_ccg, int grid_index);
void BKE_subdiv_ccg_eval_limit_point(const SubdivCCG *subdiv_ccg,
const SubdivCCGCoord *coord,
float r_point[3]);

View File

@ -65,33 +65,25 @@ void BKE_subdiv_eval_init_displacement(struct Subdiv *subdiv);
/* Evaluate point at a limit surface, with optional derivatives and normal. */
void BKE_subdiv_eval_limit_point(
struct Subdiv *subdiv, const int ptex_face_index, const float u, const float v, float r_P[3]);
struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3]);
void BKE_subdiv_eval_limit_point_and_derivatives(struct Subdiv *subdiv,
const int ptex_face_index,
const float u,
const float v,
int ptex_face_index,
float u,
float v,
float r_P[3],
float r_dPdu[3],
float r_dPdv[3]);
void BKE_subdiv_eval_limit_point_and_normal(struct Subdiv *subdiv,
const int ptex_face_index,
const float u,
const float v,
float r_P[3],
float r_N[3]);
void BKE_subdiv_eval_limit_point_and_short_normal(struct Subdiv *subdiv,
const int ptex_face_index,
const float u,
const float v,
float r_P[3],
short r_N[3]);
void BKE_subdiv_eval_limit_point_and_normal(
struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_N[3]);
void BKE_subdiv_eval_limit_point_and_short_normal(
struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], short r_N[3]);
/* Evaluate face-varying layer (such as UV). */
void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv,
const int face_varying_channel,
const int ptex_face_index,
const float u,
const float v,
int face_varying_channel,
int ptex_face_index,
float u,
float v,
float r_face_varying[2]);
/* NOTE: Expects derivatives to be correct.
@ -101,16 +93,16 @@ void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv,
* Would be nice to have displacement evaluation function which does not require
* knowing derivatives ahead of a time. */
void BKE_subdiv_eval_displacement(struct Subdiv *subdiv,
const int ptex_face_index,
const float u,
const float v,
int ptex_face_index,
float u,
float v,
const float dPdu[3],
const float dPdv[3],
float r_D[3]);
/* Evaluate point on a limit surface with displacement applied to it. */
void BKE_subdiv_eval_final_point(
struct Subdiv *subdiv, const int ptex_face_index, const float u, const float v, float r_P[3]);
struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3]);
/* Patch queries at given resolution.
*
@ -119,41 +111,41 @@ void BKE_subdiv_eval_final_point(
* goes as u in rows, v in columns. */
void BKE_subdiv_eval_limit_patch_resolution_point(struct Subdiv *subdiv,
const int ptex_face_index,
const int resolution,
int ptex_face_index,
int resolution,
void *buffer,
const int offset,
const int stride);
int offset,
int stride);
void BKE_subdiv_eval_limit_patch_resolution_point_and_derivatives(struct Subdiv *subdiv,
const int ptex_face_index,
const int resolution,
int ptex_face_index,
int resolution,
void *point_buffer,
const int point_offset,
const int point_stride,
int point_offset,
int point_stride,
void *du_buffer,
const int du_offset,
const int du_stride,
int du_offset,
int du_stride,
void *dv_buffer,
const int dv_offset,
const int dv_stride);
int dv_offset,
int dv_stride);
void BKE_subdiv_eval_limit_patch_resolution_point_and_normal(struct Subdiv *subdiv,
const int ptex_face_index,
const int resolution,
int ptex_face_index,
int resolution,
void *point_buffer,
const int point_offset,
const int point_stride,
int point_offset,
int point_stride,
void *normal_buffer,
const int normal_offset,
const int normal_stride);
int normal_offset,
int normal_stride);
void BKE_subdiv_eval_limit_patch_resolution_point_and_short_normal(struct Subdiv *subdiv,
const int ptex_face_index,
const int resolution,
int ptex_face_index,
int resolution,
void *point_buffer,
const int point_offset,
const int point_stride,
int point_offset,
int point_stride,
void *normal_buffer,
const int normal_offset,
const int normal_stride);
int normal_offset,
int normal_stride);
#ifdef __cplusplus
}

View File

@ -35,77 +35,77 @@ struct SubdivForeachContext;
struct SubdivToMeshSettings;
typedef bool (*SubdivForeachTopologyInformationCb)(const struct SubdivForeachContext *context,
const int num_vertices,
const int num_edges,
const int num_loops,
const int num_polygons,
int num_vertices,
int num_edges,
int num_loops,
int num_polygons,
const int *subdiv_polygon_offset);
typedef void (*SubdivForeachVertexFromCornerCb)(const struct SubdivForeachContext *context,
void *tls,
const int ptex_face_index,
const float u,
const float v,
const int coarse_vertex_index,
const int coarse_poly_index,
const int coarse_corner,
const int subdiv_vertex_index);
int ptex_face_index,
float u,
float v,
int coarse_vertex_index,
int coarse_poly_index,
int coarse_corner,
int subdiv_vertex_index);
typedef void (*SubdivForeachVertexFromEdgeCb)(const struct SubdivForeachContext *context,
void *tls,
const int ptex_face_index,
const float u,
const float v,
const int coarse_edge_index,
const int coarse_poly_index,
const int coarse_corner,
const int subdiv_vertex_index);
int ptex_face_index,
float u,
float v,
int coarse_edge_index,
int coarse_poly_index,
int coarse_corner,
int subdiv_vertex_index);
typedef void (*SubdivForeachVertexInnerCb)(const struct SubdivForeachContext *context,
void *tls,
const int ptex_face_index,
const float u,
const float v,
const int coarse_poly_index,
const int coarse_corner,
const int subdiv_vertex_index);
int ptex_face_index,
float u,
float v,
int coarse_poly_index,
int coarse_corner,
int subdiv_vertex_index);
typedef void (*SubdivForeachEdgeCb)(const struct SubdivForeachContext *context,
void *tls,
const int coarse_edge_index,
const int subdiv_edge_index,
const int subdiv_v1,
const int subdiv_v2);
int coarse_edge_index,
int subdiv_edge_index,
int subdiv_v1,
int subdiv_v2);
typedef void (*SubdivForeachLoopCb)(const struct SubdivForeachContext *context,
void *tls,
const int ptex_face_index,
const float u,
const float v,
const int coarse_loop_index,
const int coarse_poly_index,
const int coarse_corner,
const int subdiv_loop_index,
const int subdiv_vertex_index,
const int subdiv_edge_index);
int ptex_face_index,
float u,
float v,
int coarse_loop_index,
int coarse_poly_index,
int coarse_corner,
int subdiv_loop_index,
int subdiv_vertex_index,
int subdiv_edge_index);
typedef void (*SubdivForeachPolygonCb)(const struct SubdivForeachContext *context,
void *tls,
const int coarse_poly_index,
const int subdiv_poly_index,
const int start_loop_index,
const int num_loops);
int coarse_poly_index,
int subdiv_poly_index,
int start_loop_index,
int num_loops);
typedef void (*SubdivForeachLooseCb)(const struct SubdivForeachContext *context,
void *tls,
const int coarse_vertex_index,
const int subdiv_vertex_index);
int coarse_vertex_index,
int subdiv_vertex_index);
typedef void (*SubdivForeachVertexOfLooseEdgeCb)(const struct SubdivForeachContext *context,
void *tls,
const int coarse_edge_index,
const float u,
const int subdiv_vertex_index);
int coarse_edge_index,
float u,
int subdiv_vertex_index);
typedef struct SubdivForeachContext {
/* Is called when topology information becomes available.

View File

@ -38,7 +38,7 @@ struct SubsurfModifierData;
void BKE_subsurf_modifier_subdiv_settings_init(struct SubdivSettings *settings,
const struct SubsurfModifierData *smd,
const bool use_render_params);
bool use_render_params);
/* If skip_check_is_last is true, we assume that the modifier passed is the last enabled modifier
* in the stack. */
@ -50,7 +50,7 @@ bool BKE_subsurf_modifier_can_do_gpu_subdiv_ex(const struct Scene *scene,
bool BKE_subsurf_modifier_can_do_gpu_subdiv(const struct Scene *scene,
const struct Object *ob,
const int required_mode);
int required_mode);
extern void (*BKE_subsurf_modifier_free_gpu_cache_cb)(struct Subdiv *subdiv);
@ -58,7 +58,7 @@ struct Subdiv *BKE_subsurf_modifier_subdiv_descriptor_ensure(
const struct SubsurfModifierData *smd,
const struct SubdivSettings *subdiv_settings,
const struct Mesh *mesh,
const bool for_draw_code);
bool for_draw_code);
struct SubsurfRuntimeData *BKE_subsurf_modifier_ensure_runtime(struct SubsurfModifierData *smd);

View File

@ -52,7 +52,7 @@ bool BKE_text_reload(struct Text *text);
struct Text *BKE_text_load_ex(struct Main *bmain,
const char *file,
const char *relpath,
const bool is_internal);
bool is_internal);
/**
* Load a text file.
*
@ -73,25 +73,25 @@ void BKE_text_file_modified_ignore(struct Text *text);
char *txt_to_buf(struct Text *text, int *r_buf_strlen);
void txt_clean_text(struct Text *text);
void txt_order_cursors(struct Text *text, const bool reverse);
void txt_order_cursors(struct Text *text, bool reverse);
int txt_find_string(struct Text *text, const char *findstr, int wrap, int match_case);
bool txt_has_sel(const struct Text *text);
int txt_get_span(struct TextLine *from, struct TextLine *to);
void txt_move_up(struct Text *text, const bool sel);
void txt_move_down(struct Text *text, const bool sel);
void txt_move_left(struct Text *text, const bool sel);
void txt_move_right(struct Text *text, const bool sel);
void txt_jump_left(struct Text *text, const bool sel, const bool use_init_step);
void txt_jump_right(struct Text *text, const bool sel, const bool use_init_step);
void txt_move_bof(struct Text *text, const bool sel);
void txt_move_eof(struct Text *text, const bool sel);
void txt_move_bol(struct Text *text, const bool sel);
void txt_move_eol(struct Text *text, const bool sel);
void txt_move_toline(struct Text *text, unsigned int line, const bool sel);
void txt_move_up(struct Text *text, bool sel);
void txt_move_down(struct Text *text, bool sel);
void txt_move_left(struct Text *text, bool sel);
void txt_move_right(struct Text *text, bool sel);
void txt_jump_left(struct Text *text, bool sel, bool use_init_step);
void txt_jump_right(struct Text *text, bool sel, bool use_init_step);
void txt_move_bof(struct Text *text, bool sel);
void txt_move_eof(struct Text *text, bool sel);
void txt_move_bol(struct Text *text, bool sel);
void txt_move_eol(struct Text *text, bool sel);
void txt_move_toline(struct Text *text, unsigned int line, bool sel);
/**
* Moves to a certain byte in a line, not a certain utf8-character.
*/
void txt_move_to(struct Text *text, unsigned int line, unsigned int ch, const bool sel);
void txt_move_to(struct Text *text, unsigned int line, unsigned int ch, bool sel);
void txt_pop_sel(struct Text *text);
void txt_delete_char(struct Text *text);
void txt_delete_word(struct Text *text);
@ -117,7 +117,7 @@ bool txt_unindent(struct Text *text);
void txt_comment(struct Text *text);
void txt_indent(struct Text *text);
bool txt_uncomment(struct Text *text);
void txt_move_lines(struct Text *text, const int direction);
void txt_move_lines(struct Text *text, int direction);
void txt_duplicate_line(struct Text *text);
int txt_setcurr_tab_spaces(struct Text *text, int space);
bool txt_cursor_is_line_start(const struct Text *text);
@ -129,17 +129,17 @@ int txt_calc_tab_right(struct TextLine *tl, int ch);
/**
* Utility functions, could be moved somewhere more generic but are python/text related.
*/
int text_check_bracket(const char ch);
bool text_check_delim(const char ch);
bool text_check_digit(const char ch);
bool text_check_identifier(const char ch);
bool text_check_identifier_nodigit(const char ch);
bool text_check_whitespace(const char ch);
int text_check_bracket(char ch);
bool text_check_delim(char ch);
bool text_check_digit(char ch);
bool text_check_identifier(char ch);
bool text_check_identifier_nodigit(char ch);
bool text_check_whitespace(char ch);
int text_find_identifier_start(const char *str, int i);
/* EVIL: defined in `bpy_interface.c`. */
extern int text_check_identifier_unicode(const unsigned int ch);
extern int text_check_identifier_nodigit_unicode(const unsigned int ch);
extern int text_check_identifier_unicode(unsigned int ch);
extern int text_check_identifier_nodigit_unicode(unsigned int ch);
enum {
TXT_MOVE_LINE_UP = -1,

View File

@ -66,7 +66,7 @@ short texttool_text_is_active(struct Text *text);
/* Suggestions */
void texttool_suggest_add(const char *name, char type);
void texttool_suggest_prefix(const char *prefix, const int prefix_len);
void texttool_suggest_prefix(const char *prefix, int prefix_len);
void texttool_suggest_clear(void);
SuggItem *texttool_suggest_first(void);
SuggItem *texttool_suggest_last(void);

View File

@ -82,7 +82,7 @@ void BKE_texture_pointdensity_init_data(struct PointDensity *pd);
void BKE_texture_pointdensity_free_data(struct PointDensity *pd);
void BKE_texture_pointdensity_free(struct PointDensity *pd);
struct PointDensity *BKE_texture_pointdensity_add(void);
struct PointDensity *BKE_texture_pointdensity_copy(const struct PointDensity *pd, const int flag);
struct PointDensity *BKE_texture_pointdensity_copy(const struct PointDensity *pd, int flag);
bool BKE_texture_dependsOnTime(const struct Tex *texture);
/**

View File

@ -58,7 +58,7 @@ void BKE_tracking_free(struct MovieTracking *tracking);
*/
void BKE_tracking_copy(struct MovieTracking *tracking_dst,
const struct MovieTracking *tracking_src,
const int flag);
int flag);
/**
* Initialize motion tracking settings to default values,
@ -177,7 +177,7 @@ void BKE_tracking_track_first_last_frame_get(const struct MovieTrackingTrack *tr
* Find the minimum starting frame and maximum ending frame within given set of tracks.
*/
void BKE_tracking_tracks_first_last_frame_minmax(/*const*/ struct MovieTrackingTrack **tracks,
const int num_tracks,
int num_tracks,
int *r_first_frame,
int *r_last_frame);
@ -236,7 +236,7 @@ void BKE_tracking_tracks_join(struct MovieTracking *tracking,
void BKE_tracking_tracks_average(struct MovieTrackingTrack *dst_track,
/*const*/ struct MovieTrackingTrack **src_tracks,
const int num_src_tracks);
int num_src_tracks);
struct MovieTrackingTrack *BKE_tracking_track_get_named(struct MovieTracking *tracking,
struct MovieTrackingObject *object,
@ -301,7 +301,7 @@ struct MovieTrackingMarker *BKE_tracking_marker_ensure(struct MovieTrackingTrack
* \returns truth if the result is usable.
*/
bool BKE_tracking_marker_get_interpolated(struct MovieTrackingTrack *track,
const int framenr,
int framenr,
struct MovieTrackingMarker *r_marker);
void BKE_tracking_marker_pattern_minmax(const struct MovieTrackingMarker *marker,
@ -525,7 +525,7 @@ void BKE_tracking_refine_marker(struct MovieClip *clip,
struct AutoTrackContext *BKE_autotrack_context_new(struct MovieClip *clip,
struct MovieClipUser *user,
const bool is_backwards);
bool is_backwards);
bool BKE_autotrack_context_step(struct AutoTrackContext *context);
void BKE_autotrack_context_sync(struct AutoTrackContext *context);
void BKE_autotrack_context_sync_user(struct AutoTrackContext *context, struct MovieClipUser *user);

View File

@ -133,7 +133,7 @@ typedef struct UndoType {
bool (*step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us);
void (*step_decode)(
struct bContext *C, struct Main *bmain, UndoStep *us, const eUndoStepDir dir, bool is_final);
struct bContext *C, struct Main *bmain, UndoStep *us, eUndoStepDir dir, bool is_final);
/**
* \note When freeing all steps,
@ -263,7 +263,7 @@ bool BKE_undosys_step_load_data_ex(UndoStack *ustack,
struct bContext *C,
UndoStep *us_target,
UndoStep *us_reference,
const bool use_skip);
bool use_skip);
/**
* Undo/Redo until the given `us_target` step becomes the active (currently loaded) one.
*/
@ -272,7 +272,7 @@ bool BKE_undosys_step_load_data(UndoStack *ustack, struct bContext *C, UndoStep
* Undo/Redo until the step matching given `index` in the undo stack becomes the active
* (currently loaded) one.
*/
void BKE_undosys_step_load_from_index(UndoStack *ustack, struct bContext *C, const int index);
void BKE_undosys_step_load_from_index(UndoStack *ustack, struct bContext *C, int index);
/**
* Undo until `us_target` step becomes the active (currently loaded) one.

View File

@ -96,7 +96,7 @@ void BKE_vfont_build_char(struct Curve *cu,
float ofsy,
float rot,
int charidx,
const float fsize);
float fsize);
int BKE_vfont_select_get(struct Object *ob, int *r_start, int *r_end);
void BKE_vfont_select_clamp(struct Object *ob);

View File

@ -56,7 +56,7 @@ typedef struct VChar {
* \retval A new #VFontData structure, or NULL if unable to load.
*/
VFontData *BKE_vfontdata_from_freetypefont(struct PackedFile *pf);
VFontData *BKE_vfontdata_copy(const VFontData *vfont_src, const int flag);
VFontData *BKE_vfontdata_copy(const VFontData *vfont_src, int flag);
VChar *BKE_vfontdata_char_from_freetypefont(struct VFont *vfont, unsigned long character);
VChar *BKE_vfontdata_char_copy(const VChar *vchar_src);

View File

@ -189,7 +189,7 @@ openvdb::GridBase::ConstPtr BKE_volume_grid_openvdb_for_read(const struct Volume
const struct VolumeGrid *grid);
openvdb::GridBase::Ptr BKE_volume_grid_openvdb_for_write(const struct Volume *volume,
struct VolumeGrid *grid,
const bool clear);
bool clear);
VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid);
@ -229,9 +229,7 @@ auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
}
openvdb::GridBase::Ptr BKE_volume_grid_create_with_changed_resolution(
const VolumeGridType grid_type,
const openvdb::GridBase &old_grid,
const float resolution_factor);
const VolumeGridType grid_type, const openvdb::GridBase &old_grid, float resolution_factor);
# endif
#endif

Some files were not shown because too many files have changed in this diff Show More