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:
@@ -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,
|
typedef bool (*BLF_GlyphBoundsFn)(const char *str,
|
||||||
const size_t str_step_ofs,
|
const size_t str_step_ofs,
|
||||||
const struct rcti *glyph_step_bounds,
|
const struct rcti *glyph_step_bounds,
|
||||||
const int glyph_advance_x,
|
int glyph_advance_x,
|
||||||
const struct rctf *glyph_bounds,
|
const struct rctf *glyph_bounds,
|
||||||
const int glyph_bearing[2],
|
const int glyph_bearing[2],
|
||||||
void *user_data);
|
void *user_data);
|
||||||
@@ -298,9 +298,9 @@ void BLF_dir_free(char **dirs, int count) ATTR_NONNULL();
|
|||||||
void BLF_thumb_preview(const char *filename,
|
void BLF_thumb_preview(const char *filename,
|
||||||
const char **draw_str,
|
const char **draw_str,
|
||||||
const char **i18n_draw_str,
|
const char **i18n_draw_str,
|
||||||
const unsigned char draw_str_lines,
|
unsigned char draw_str_lines,
|
||||||
const float font_color[4],
|
const float font_color[4],
|
||||||
const int font_size,
|
int font_size,
|
||||||
unsigned char *buf,
|
unsigned char *buf,
|
||||||
int w,
|
int w,
|
||||||
int h,
|
int h,
|
||||||
@@ -326,8 +326,8 @@ int BLF_set_default(void);
|
|||||||
|
|
||||||
/* blf_font_default.c */
|
/* blf_font_default.c */
|
||||||
|
|
||||||
int BLF_load_default(const bool unique);
|
int BLF_load_default(bool unique);
|
||||||
int BLF_load_mono_default(const bool unique);
|
int BLF_load_mono_default(bool unique);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void BLF_state_print(int fontid);
|
void BLF_state_print(int fontid);
|
||||||
|
@@ -123,7 +123,7 @@ void blf_font_boundbox_foreach_glyph(struct FontBLF *font,
|
|||||||
bool (*user_fn)(const char *str,
|
bool (*user_fn)(const char *str,
|
||||||
const size_t str_step_ofs,
|
const size_t str_step_ofs,
|
||||||
const struct rcti *glyph_step_bounds,
|
const struct rcti *glyph_step_bounds,
|
||||||
const int glyph_advance_x,
|
int glyph_advance_x,
|
||||||
const struct rctf *glyph_bounds,
|
const struct rctf *glyph_bounds,
|
||||||
const int glyph_bearing[2],
|
const int glyph_bearing[2],
|
||||||
void *user_data),
|
void *user_data),
|
||||||
|
@@ -376,7 +376,7 @@ void DM_interp_vert_data(struct DerivedMesh *source,
|
|||||||
int count,
|
int count,
|
||||||
int dest_index);
|
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.
|
* Same as above but won't use render settings.
|
||||||
|
@@ -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_copy_id_action(struct Main *bmain, struct ID *id);
|
||||||
|
|
||||||
void BKE_animdata_duplicate_id_action(struct Main *bmain,
|
void BKE_animdata_duplicate_id_action(struct Main *bmain, struct ID *id, uint duplicate_flags);
|
||||||
struct ID *id,
|
|
||||||
const uint duplicate_flags);
|
|
||||||
|
|
||||||
/* Merge copies of data from source AnimData block */
|
/* Merge copies of data from source AnimData block */
|
||||||
typedef enum eAnimData_MergeCopy_Modes {
|
typedef enum eAnimData_MergeCopy_Modes {
|
||||||
|
@@ -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.
|
* 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.
|
* \return The path if found, NULL string if not.
|
||||||
*/
|
*/
|
||||||
bool BKE_appdir_folder_id_ex(const int folder_id,
|
bool BKE_appdir_folder_id_ex(int folder_id, const char *subfolder, char *path, size_t path_len);
|
||||||
const char *subfolder,
|
const char *BKE_appdir_folder_id(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);
|
|
||||||
/**
|
/**
|
||||||
* Returns the path to a folder in the user area, creating it if it doesn't exist.
|
* 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.
|
* 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.
|
* 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.
|
* 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 char *BKE_appdir_folder_id_version(int folder_id, int version, bool check_is_dir);
|
||||||
const int version,
|
|
||||||
const bool check_is_dir);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if this is an install with user files kept together
|
* 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,
|
bool BKE_appdir_program_python_search(char *fullpath,
|
||||||
const size_t fullpath_len,
|
const size_t fullpath_len,
|
||||||
const int version_major,
|
int version_major,
|
||||||
const int version_minor);
|
int version_minor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize path to temporary directory.
|
* Initialize path to temporary directory.
|
||||||
|
@@ -63,7 +63,7 @@ struct AssetLibrary {
|
|||||||
void on_blend_save_handler_register();
|
void on_blend_save_handler_register();
|
||||||
void on_blend_save_handler_unregister();
|
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:
|
private:
|
||||||
bCallbackFuncStore on_save_callback_store_{};
|
bCallbackFuncStore on_save_callback_store_{};
|
||||||
|
@@ -54,19 +54,16 @@ typedef enum AttributeDomain {
|
|||||||
|
|
||||||
bool BKE_id_attributes_supported(struct ID *id);
|
bool BKE_id_attributes_supported(struct ID *id);
|
||||||
|
|
||||||
struct CustomDataLayer *BKE_id_attribute_new(struct ID *id,
|
struct CustomDataLayer *BKE_id_attribute_new(
|
||||||
const char *name,
|
struct ID *id, const char *name, int type, AttributeDomain domain, struct ReportList *reports);
|
||||||
const int type,
|
|
||||||
const AttributeDomain domain,
|
|
||||||
struct ReportList *reports);
|
|
||||||
bool BKE_id_attribute_remove(struct ID *id,
|
bool BKE_id_attribute_remove(struct ID *id,
|
||||||
struct CustomDataLayer *layer,
|
struct CustomDataLayer *layer,
|
||||||
struct ReportList *reports);
|
struct ReportList *reports);
|
||||||
|
|
||||||
struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id,
|
struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id,
|
||||||
const char *name,
|
const char *name,
|
||||||
const int type,
|
int type,
|
||||||
const AttributeDomain domain);
|
AttributeDomain domain);
|
||||||
|
|
||||||
AttributeDomain BKE_id_attribute_domain(struct ID *id, struct CustomDataLayer *layer);
|
AttributeDomain BKE_id_attribute_domain(struct ID *id, struct CustomDataLayer *layer);
|
||||||
int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer);
|
int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer);
|
||||||
|
@@ -264,7 +264,7 @@ class OutputAttribute {
|
|||||||
OutputAttribute(GVMutableArray varray,
|
OutputAttribute(GVMutableArray varray,
|
||||||
AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
SaveFn save,
|
SaveFn save,
|
||||||
const bool ignore_old_values);
|
bool ignore_old_values);
|
||||||
|
|
||||||
~OutputAttribute();
|
~OutputAttribute();
|
||||||
|
|
||||||
@@ -387,7 +387,7 @@ class CustomDataAttributes {
|
|||||||
CustomDataAttributes(CustomDataAttributes &&other);
|
CustomDataAttributes(CustomDataAttributes &&other);
|
||||||
CustomDataAttributes &operator=(const CustomDataAttributes &other);
|
CustomDataAttributes &operator=(const CustomDataAttributes &other);
|
||||||
|
|
||||||
void reallocate(const int size);
|
void reallocate(int size);
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
@@ -423,8 +423,7 @@ class CustomDataAttributes {
|
|||||||
*/
|
*/
|
||||||
void reorder(Span<AttributeIDRef> new_order);
|
void reorder(Span<AttributeIDRef> new_order);
|
||||||
|
|
||||||
bool foreach_attribute(const AttributeForeachCallback callback,
|
bool foreach_attribute(const AttributeForeachCallback callback, AttributeDomain domain) const;
|
||||||
const AttributeDomain domain) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
@@ -141,7 +141,7 @@ inline ColorGeometry4f mix3(const float3 &weights,
|
|||||||
* This is just basic linear interpolation.
|
* 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)
|
template<> inline bool mix2(const float factor, const bool &a, const bool &b)
|
||||||
{
|
{
|
||||||
@@ -287,7 +287,7 @@ class ColorGeometryMixer {
|
|||||||
public:
|
public:
|
||||||
ColorGeometryMixer(MutableSpan<ColorGeometry4f> buffer,
|
ColorGeometryMixer(MutableSpan<ColorGeometry4f> buffer,
|
||||||
ColorGeometry4f default_color = ColorGeometry4f(0.0f, 0.0f, 0.0f, 1.0f));
|
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();
|
void finalize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -63,7 +63,7 @@ bool BKE_copybuffer_copy_end(struct Main *bmain_src,
|
|||||||
bool BKE_copybuffer_read(struct Main *bmain_dst,
|
bool BKE_copybuffer_read(struct Main *bmain_dst,
|
||||||
const char *libname,
|
const char *libname,
|
||||||
struct ReportList *reports,
|
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).
|
* 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,
|
int BKE_copybuffer_paste(struct bContext *C,
|
||||||
const char *libname,
|
const char *libname,
|
||||||
const int flag,
|
int flag,
|
||||||
struct ReportList *reports,
|
struct ReportList *reports,
|
||||||
const uint64_t id_types_mask);
|
uint64_t id_types_mask);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -34,8 +34,8 @@ enum eUndoStepDir;
|
|||||||
struct MemFileUndoData *BKE_memfile_undo_encode(struct Main *bmain,
|
struct MemFileUndoData *BKE_memfile_undo_encode(struct Main *bmain,
|
||||||
struct MemFileUndoData *mfu_prev);
|
struct MemFileUndoData *mfu_prev);
|
||||||
bool BKE_memfile_undo_decode(struct MemFileUndoData *mfu,
|
bool BKE_memfile_undo_decode(struct MemFileUndoData *mfu,
|
||||||
const enum eUndoStepDir undo_direction,
|
enum eUndoStepDir undo_direction,
|
||||||
const bool use_old_bmain_data,
|
bool use_old_bmain_data,
|
||||||
struct bContext *C);
|
struct bContext *C);
|
||||||
void BKE_memfile_undo_free(struct MemFileUndoData *mfu);
|
void BKE_memfile_undo_free(struct MemFileUndoData *mfu);
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@ void BKE_blendfile_read_setup_ex(struct bContext *C,
|
|||||||
const struct BlendFileReadParams *params,
|
const struct BlendFileReadParams *params,
|
||||||
struct BlendFileReadReport *reports,
|
struct BlendFileReadReport *reports,
|
||||||
/* Extra args. */
|
/* Extra args. */
|
||||||
const bool startup_update_defaults,
|
bool startup_update_defaults,
|
||||||
const char *startup_app_template);
|
const char *startup_app_template);
|
||||||
|
|
||||||
void BKE_blendfile_read_setup(struct bContext *C,
|
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,
|
bool BKE_blendfile_write_partial(struct Main *bmain_src,
|
||||||
const char *filepath,
|
const char *filepath,
|
||||||
const int write_flags,
|
int write_flags,
|
||||||
const int remap_mode,
|
int remap_mode,
|
||||||
struct ReportList *reports);
|
struct ReportList *reports);
|
||||||
void BKE_blendfile_write_partial_end(struct Main *bmain_src);
|
void BKE_blendfile_write_partial_end(struct Main *bmain_src);
|
||||||
|
|
||||||
|
@@ -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.
|
* \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,
|
void BKE_blendfile_link_append_context_flag_set(struct BlendfileLinkAppendContext *lapp_context,
|
||||||
const int flag,
|
int flag,
|
||||||
const bool do_set);
|
bool do_set);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store reference to a Blender's embedded memfile into the context.
|
* 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 BlendfileLinkAppendContextItem *BKE_blendfile_link_append_context_item_add(
|
||||||
struct BlendfileLinkAppendContext *lapp_context,
|
struct BlendfileLinkAppendContext *lapp_context,
|
||||||
const char *idname,
|
const char *idname,
|
||||||
const short idcode,
|
short idcode,
|
||||||
void *userdata);
|
void *userdata);
|
||||||
|
|
||||||
#define BLENDFILE_LINK_APPEND_INVALID -1
|
#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(
|
int BKE_blendfile_link_append_context_item_idtypes_from_library_add(
|
||||||
struct BlendfileLinkAppendContext *lapp_context,
|
struct BlendfileLinkAppendContext *lapp_context,
|
||||||
struct ReportList *reports,
|
struct ReportList *reports,
|
||||||
const uint64_t id_types_filter,
|
uint64_t id_types_filter,
|
||||||
const int library_index);
|
int library_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable search of the given \a item into the library stored at given index in the link/append
|
* 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(
|
void BKE_blendfile_link_append_context_item_library_index_enable(
|
||||||
struct BlendfileLinkAppendContext *lapp_context,
|
struct BlendfileLinkAppendContext *lapp_context,
|
||||||
struct BlendfileLinkAppendContextItem *item,
|
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.
|
* 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(
|
void BKE_blendfile_link_append_context_item_foreach(
|
||||||
struct BlendfileLinkAppendContext *lapp_context,
|
struct BlendfileLinkAppendContext *lapp_context,
|
||||||
BKE_BlendfileLinkAppendContexteItemFunction callback_function,
|
BKE_BlendfileLinkAppendContexteItemFunction callback_function,
|
||||||
const eBlendfileLinkAppendForeachItemFlag flag,
|
eBlendfileLinkAppendForeachItemFlag flag,
|
||||||
void *userdata);
|
void *userdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -215,7 +215,7 @@ void BKE_blendfile_link(struct BlendfileLinkAppendContext *lapp_context,
|
|||||||
void BKE_blendfile_library_relocate(struct BlendfileLinkAppendContext *lapp_context,
|
void BKE_blendfile_library_relocate(struct BlendfileLinkAppendContext *lapp_context,
|
||||||
struct ReportList *reports,
|
struct ReportList *reports,
|
||||||
struct Library *library,
|
struct Library *library,
|
||||||
const bool do_reload);
|
bool do_reload);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -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,
|
void BKE_bpath_missing_files_find(struct Main *bmain,
|
||||||
const char *searchpath,
|
const char *searchpath,
|
||||||
struct ReportList *reports,
|
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. */
|
/** 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,
|
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.
|
* \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.
|
/** 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
|
* \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
|
* 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. */
|
* #BKE_bpath_list_backup that generated the given \a path_list_handle. */
|
||||||
void BKE_bpath_list_restore(struct Main *bmain,
|
void BKE_bpath_list_restore(struct Main *bmain, eBPathForeachFlag flag, void *path_list_handle);
|
||||||
const eBPathForeachFlag flag,
|
|
||||||
void *path_list_handle);
|
|
||||||
|
|
||||||
/** Free the temp backup of paths in \a path_list_handle.
|
/** Free the temp backup of paths in \a path_list_handle.
|
||||||
*
|
*
|
||||||
|
@@ -50,7 +50,7 @@ void BKE_brush_system_exit(void);
|
|||||||
* \note Resulting brush will have two users: one as a fake user,
|
* \note Resulting brush will have two users: one as a fake user,
|
||||||
* another is assumed to be used by the caller.
|
* 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.
|
* Add a new gp-brush.
|
||||||
*/
|
*/
|
||||||
@@ -66,35 +66,27 @@ bool BKE_brush_delete(struct Main *bmain, struct Brush *brush);
|
|||||||
* Add grease pencil settings.
|
* Add grease pencil settings.
|
||||||
*/
|
*/
|
||||||
void BKE_brush_init_gpencil_settings(struct Brush *brush);
|
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);
|
void BKE_brush_sculpt_reset(struct Brush *brush);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a set of grease pencil Drawing presets.
|
* Create a set of grease pencil Drawing presets.
|
||||||
*/
|
*/
|
||||||
void BKE_brush_gpencil_paint_presets(struct Main *bmain,
|
void BKE_brush_gpencil_paint_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
|
||||||
struct ToolSettings *ts,
|
|
||||||
const bool reset);
|
|
||||||
/**
|
/**
|
||||||
* Create a set of grease pencil Vertex Paint presets.
|
* Create a set of grease pencil Vertex Paint presets.
|
||||||
*/
|
*/
|
||||||
void BKE_brush_gpencil_vertex_presets(struct Main *bmain,
|
void BKE_brush_gpencil_vertex_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
|
||||||
struct ToolSettings *ts,
|
|
||||||
const bool reset);
|
|
||||||
/**
|
/**
|
||||||
* Create a set of grease pencil Sculpt Paint presets.
|
* Create a set of grease pencil Sculpt Paint presets.
|
||||||
*/
|
*/
|
||||||
void BKE_brush_gpencil_sculpt_presets(struct Main *bmain,
|
void BKE_brush_gpencil_sculpt_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
|
||||||
struct ToolSettings *ts,
|
|
||||||
const bool reset);
|
|
||||||
/**
|
/**
|
||||||
* Create a set of grease pencil Weight Paint presets.
|
* Create a set of grease pencil Weight Paint presets.
|
||||||
*/
|
*/
|
||||||
void BKE_brush_gpencil_weight_presets(struct Main *bmain,
|
void BKE_brush_gpencil_weight_presets(struct Main *bmain, struct ToolSettings *ts, bool reset);
|
||||||
struct ToolSettings *ts,
|
void BKE_gpencil_brush_preset_set(struct Main *bmain, struct Brush *brush, short type);
|
||||||
const bool reset);
|
|
||||||
void BKE_gpencil_brush_preset_set(struct Main *bmain, struct Brush *brush, const short type);
|
|
||||||
|
|
||||||
void BKE_brush_jitter_pos(const struct Scene *scene,
|
void BKE_brush_jitter_pos(const struct Scene *scene,
|
||||||
struct Brush *brush,
|
struct Brush *brush,
|
||||||
@@ -130,12 +122,12 @@ float BKE_brush_sample_tex_3d(const struct Scene *scene,
|
|||||||
const struct Brush *br,
|
const struct Brush *br,
|
||||||
const float point[3],
|
const float point[3],
|
||||||
float rgba[4],
|
float rgba[4],
|
||||||
const int thread,
|
int thread,
|
||||||
struct ImagePool *pool);
|
struct ImagePool *pool);
|
||||||
float BKE_brush_sample_masktex(const struct Scene *scene,
|
float BKE_brush_sample_masktex(const struct Scene *scene,
|
||||||
struct Brush *br,
|
struct Brush *br,
|
||||||
const float point[2],
|
const float point[2],
|
||||||
const int thread,
|
int thread,
|
||||||
struct ImagePool *pool);
|
struct ImagePool *pool);
|
||||||
|
|
||||||
/* Texture. */
|
/* Texture. */
|
||||||
|
@@ -141,8 +141,8 @@ BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data,
|
|||||||
*/
|
*/
|
||||||
BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data,
|
BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data,
|
||||||
const struct MVert *vert,
|
const struct MVert *vert,
|
||||||
const int verts_num,
|
int verts_num,
|
||||||
const bool vert_allocated,
|
bool vert_allocated,
|
||||||
const BLI_bitmap *verts_mask,
|
const BLI_bitmap *verts_mask,
|
||||||
int verts_num_active,
|
int verts_num_active,
|
||||||
float epsilon,
|
float epsilon,
|
||||||
@@ -179,10 +179,10 @@ BVHTree *bvhtree_from_editmesh_edges_ex(BVHTreeFromEditMesh *data,
|
|||||||
*/
|
*/
|
||||||
BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data,
|
BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data,
|
||||||
const struct MVert *vert,
|
const struct MVert *vert,
|
||||||
const bool vert_allocated,
|
bool vert_allocated,
|
||||||
const struct MEdge *edge,
|
const struct MEdge *edge,
|
||||||
const int edges_num,
|
int edges_num,
|
||||||
const bool edge_allocated,
|
bool edge_allocated,
|
||||||
const BLI_bitmap *edges_mask,
|
const BLI_bitmap *edges_mask,
|
||||||
int edges_num_active,
|
int edges_num_active,
|
||||||
float epsilon,
|
float epsilon,
|
||||||
@@ -203,10 +203,10 @@ BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data,
|
|||||||
*/
|
*/
|
||||||
BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data,
|
BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data,
|
||||||
const struct MVert *vert,
|
const struct MVert *vert,
|
||||||
const bool vert_allocated,
|
bool vert_allocated,
|
||||||
const struct MFace *face,
|
const struct MFace *face,
|
||||||
const int numFaces,
|
int numFaces,
|
||||||
const bool face_allocated,
|
bool face_allocated,
|
||||||
const BLI_bitmap *faces_mask,
|
const BLI_bitmap *faces_mask,
|
||||||
int faces_num_active,
|
int faces_num_active,
|
||||||
float epsilon,
|
float epsilon,
|
||||||
@@ -240,12 +240,12 @@ BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data,
|
|||||||
*/
|
*/
|
||||||
BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data,
|
BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data,
|
||||||
const struct MVert *vert,
|
const struct MVert *vert,
|
||||||
const bool vert_allocated,
|
bool vert_allocated,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
const bool loop_allocated,
|
bool loop_allocated,
|
||||||
const struct MLoopTri *looptri,
|
const struct MLoopTri *looptri,
|
||||||
const int looptri_num,
|
int looptri_num,
|
||||||
const bool looptri_allocated,
|
bool looptri_allocated,
|
||||||
const BLI_bitmap *mask,
|
const BLI_bitmap *mask,
|
||||||
int looptri_num_active,
|
int looptri_num_active,
|
||||||
float epsilon,
|
float epsilon,
|
||||||
@@ -264,14 +264,14 @@ BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data,
|
|||||||
BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data,
|
BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data,
|
||||||
const struct Mesh *mesh,
|
const struct Mesh *mesh,
|
||||||
const BVHCacheType bvh_cache_type,
|
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.
|
* Builds or queries a BVH-cache for the cache BVH-tree of the request type.
|
||||||
*/
|
*/
|
||||||
BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data,
|
BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data,
|
||||||
struct BMEditMesh *em,
|
struct BMEditMesh *em,
|
||||||
const int tree_type,
|
int tree_type,
|
||||||
const BVHCacheType bvh_cache_type,
|
const BVHCacheType bvh_cache_type,
|
||||||
struct BVHCache **bvh_cache_p,
|
struct BVHCache **bvh_cache_p,
|
||||||
ThreadMutex *mesh_eval_mutex);
|
ThreadMutex *mesh_eval_mutex);
|
||||||
@@ -288,14 +288,11 @@ void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data);
|
|||||||
/**
|
/**
|
||||||
* Math functions used by callbacks
|
* Math functions used by callbacks
|
||||||
*/
|
*/
|
||||||
float bvhtree_ray_tri_intersection(const BVHTreeRay *ray,
|
float bvhtree_ray_tri_intersection(
|
||||||
const float m_dist,
|
const BVHTreeRay *ray, float m_dist, const float v0[3], const float v1[3], const float v2[3]);
|
||||||
const float v0[3],
|
|
||||||
const float v1[3],
|
|
||||||
const float v2[3]);
|
|
||||||
float bvhtree_sphereray_tri_intersection(const BVHTreeRay *ray,
|
float bvhtree_sphereray_tri_intersection(const BVHTreeRay *ray,
|
||||||
float radius,
|
float radius,
|
||||||
const float m_dist,
|
float m_dist,
|
||||||
const float v0[3],
|
const float v0[3],
|
||||||
const float v1[3],
|
const float v1[3],
|
||||||
const float v2[3]);
|
const float v2[3]);
|
||||||
@@ -310,7 +307,7 @@ typedef struct BVHTreeFromPointCloud {
|
|||||||
|
|
||||||
BVHTree *BKE_bvhtree_from_pointcloud_get(struct BVHTreeFromPointCloud *data,
|
BVHTree *BKE_bvhtree_from_pointcloud_get(struct BVHTreeFromPointCloud *data,
|
||||||
const struct PointCloud *pointcloud,
|
const struct PointCloud *pointcloud,
|
||||||
const int tree_type);
|
int tree_type);
|
||||||
|
|
||||||
void free_bvhtree_from_pointcloud(struct BVHTreeFromPointCloud *data);
|
void free_bvhtree_from_pointcloud(struct BVHTreeFromPointCloud *data);
|
||||||
|
|
||||||
|
@@ -114,14 +114,14 @@ typedef enum {
|
|||||||
|
|
||||||
typedef struct bCallbackFuncStore {
|
typedef struct bCallbackFuncStore {
|
||||||
struct bCallbackFuncStore *next, *prev;
|
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;
|
void *arg;
|
||||||
short alloc;
|
short alloc;
|
||||||
} bCallbackFuncStore;
|
} bCallbackFuncStore;
|
||||||
|
|
||||||
void BKE_callback_exec(struct Main *bmain,
|
void BKE_callback_exec(struct Main *bmain,
|
||||||
struct PointerRNA **pointers,
|
struct PointerRNA **pointers,
|
||||||
const int num_pointers,
|
int num_pointers,
|
||||||
eCbEvent evt);
|
eCbEvent evt);
|
||||||
void BKE_callback_exec_null(struct Main *bmain, 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);
|
void BKE_callback_exec_id(struct Main *bmain, struct ID *id, eCbEvent evt);
|
||||||
|
@@ -110,8 +110,8 @@ void BKE_camera_params_compute_matrix(CameraParams *params);
|
|||||||
|
|
||||||
void BKE_camera_view_frame_ex(const struct Scene *scene,
|
void BKE_camera_view_frame_ex(const struct Scene *scene,
|
||||||
const struct Camera *camera,
|
const struct Camera *camera,
|
||||||
const float drawsize,
|
float drawsize,
|
||||||
const bool do_clip,
|
bool do_clip,
|
||||||
const float scale[3],
|
const float scale[3],
|
||||||
float r_asp[2],
|
float r_asp[2],
|
||||||
float r_shift[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,
|
void BKE_camera_multiview_view_matrix(const struct RenderData *rd,
|
||||||
const struct Object *camera,
|
const struct Object *camera,
|
||||||
const bool is_left,
|
bool is_left,
|
||||||
float r_viewmat[4][4]);
|
float r_viewmat[4][4]);
|
||||||
void BKE_camera_multiview_model_matrix(const struct RenderData *rd,
|
void BKE_camera_multiview_model_matrix(const struct RenderData *rd,
|
||||||
const struct Object *camera,
|
const struct Object *camera,
|
||||||
|
@@ -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 *BKE_collection_duplicate(struct Main *bmain,
|
||||||
struct Collection *parent,
|
struct Collection *parent,
|
||||||
struct Collection *collection,
|
struct Collection *collection,
|
||||||
const uint duplicate_flags,
|
uint duplicate_flags,
|
||||||
const uint duplicate_options);
|
uint duplicate_options);
|
||||||
|
|
||||||
/* Master Collection for Scene */
|
/* 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,
|
bool BKE_collection_object_remove(struct Main *bmain,
|
||||||
struct Collection *collection,
|
struct Collection *collection,
|
||||||
struct Object *object,
|
struct Object *object,
|
||||||
const bool free_us);
|
bool free_us);
|
||||||
/**
|
/**
|
||||||
* Move object from a collection into another
|
* 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,
|
bool BKE_scene_collections_object_remove(struct Main *bmain,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *object,
|
struct Object *object,
|
||||||
const bool free_us);
|
bool free_us);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check all collections in \a bmain (including embedded ones in scenes) for CollectionObject with
|
* 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.
|
* 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.
|
* The automatic/fallback name of a new collection.
|
||||||
*/
|
*/
|
||||||
|
@@ -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).
|
* \param step: is limited from 0 (frame start position) to 1 (frame end position).
|
||||||
*/
|
*/
|
||||||
void collision_move_object(struct CollisionModifierData *collmd,
|
void collision_move_object(struct CollisionModifierData *collmd,
|
||||||
const float step,
|
float step,
|
||||||
const float prevstep,
|
float prevstep,
|
||||||
const bool moving_bvh);
|
bool moving_bvh);
|
||||||
|
|
||||||
void collision_get_collider_velocity(float vel_old[3],
|
void collision_get_collider_velocity(float vel_old[3],
|
||||||
float vel_new[3],
|
float vel_new[3],
|
||||||
|
@@ -34,7 +34,7 @@ struct ColorBand;
|
|||||||
void BKE_colorband_init(struct ColorBand *coba, bool rangetype);
|
void BKE_colorband_init(struct ColorBand *coba, bool rangetype);
|
||||||
void BKE_colorband_init_from_table_rgba(struct ColorBand *coba,
|
void BKE_colorband_init_from_table_rgba(struct ColorBand *coba,
|
||||||
const float (*array)[4],
|
const float (*array)[4],
|
||||||
const int array_len,
|
int array_len,
|
||||||
bool filter_sample);
|
bool filter_sample);
|
||||||
struct ColorBand *BKE_colorband_add(bool rangetype);
|
struct ColorBand *BKE_colorband_add(bool rangetype);
|
||||||
bool BKE_colorband_evaluate(const struct ColorBand *coba, float in, float out[4]);
|
bool BKE_colorband_evaluate(const struct ColorBand *coba, float in, float out[4]);
|
||||||
|
@@ -67,7 +67,7 @@ void BKE_curvemap_reset(struct CurveMap *cuma, const struct rctf *clipr, int pre
|
|||||||
/**
|
/**
|
||||||
* Removes with flag set.
|
* 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.
|
* Remove specified point.
|
||||||
*/
|
*/
|
||||||
@@ -81,7 +81,7 @@ void BKE_curvemap_handle_set(struct CurveMap *cuma, int type);
|
|||||||
/**
|
/**
|
||||||
* \note only does current curvemap!.
|
* \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);
|
void BKE_curvemapping_changed_all(struct CurveMapping *cumap);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -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_rna: Use Include the properties from 'RNA_Context'.
|
||||||
* \param use_all: Don't skip values (currently only "scene").
|
* \param use_all: Don't skip values (currently only "scene").
|
||||||
*/
|
*/
|
||||||
ListBase CTX_data_dir_get_ex(const bContext *C,
|
ListBase CTX_data_dir_get_ex(const bContext *C, bool use_store, bool use_rna, bool use_all);
|
||||||
const bool use_store,
|
|
||||||
const bool use_rna,
|
|
||||||
const bool use_all);
|
|
||||||
ListBase CTX_data_dir_get(const bContext *C);
|
ListBase CTX_data_dir_get(const bContext *C);
|
||||||
int /*eContextResult*/ CTX_data_get(
|
int /*eContextResult*/ CTX_data_get(
|
||||||
const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb, short *r_type);
|
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);
|
const char *CTX_data_mode_string(const bContext *C);
|
||||||
enum eContextObjectMode CTX_data_mode_enum_ex(const struct Object *obedit,
|
enum eContextObjectMode CTX_data_mode_enum_ex(const struct Object *obedit,
|
||||||
const struct Object *ob,
|
const struct Object *ob,
|
||||||
const eObjectMode object_mode);
|
eObjectMode object_mode);
|
||||||
enum eContextObjectMode CTX_data_mode_enum(const bContext *C);
|
enum eContextObjectMode CTX_data_mode_enum(const bContext *C);
|
||||||
|
|
||||||
void CTX_data_main_set(bContext *C, struct Main *bmain);
|
void CTX_data_main_set(bContext *C, struct Main *bmain);
|
||||||
|
@@ -43,7 +43,7 @@ void BKE_crazyspace_set_quats_editmesh(struct BMEditMesh *em,
|
|||||||
float (*origcos)[3],
|
float (*origcos)[3],
|
||||||
float (*mappedcos)[3],
|
float (*mappedcos)[3],
|
||||||
float (*quats)[4],
|
float (*quats)[4],
|
||||||
const bool use_select);
|
bool use_select);
|
||||||
void BKE_crazyspace_set_quats_mesh(struct Mesh *me,
|
void BKE_crazyspace_set_quats_mesh(struct Mesh *me,
|
||||||
float (*origcos)[3],
|
float (*origcos)[3],
|
||||||
float (*mappedcos)[3],
|
float (*mappedcos)[3],
|
||||||
|
@@ -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.
|
* Find an ID in the given main that matches the given encoded float.
|
||||||
*/
|
*/
|
||||||
bool BKE_cryptomatte_find_name(const struct CryptomatteSession *session,
|
bool BKE_cryptomatte_find_name(const struct CryptomatteSession *session,
|
||||||
const float encoded_hash,
|
float encoded_hash,
|
||||||
char *r_name,
|
char *r_name,
|
||||||
int name_len);
|
int name_len);
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ struct CryptomatteHash {
|
|||||||
uint32_t hash;
|
uint32_t hash;
|
||||||
|
|
||||||
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);
|
static CryptomatteHash from_hex_encoded(blender::StringRef hex_encoded);
|
||||||
|
|
||||||
std::string hex_encoded() const;
|
std::string hex_encoded() const;
|
||||||
|
@@ -90,7 +90,7 @@ typedef struct CVKeyIndex {
|
|||||||
* Frees edit-curve entirely.
|
* Frees edit-curve entirely.
|
||||||
*/
|
*/
|
||||||
void BKE_curve_editfont_free(struct Curve *cu);
|
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);
|
struct Curve *BKE_curve_add(struct Main *bmain, const char *name, int type);
|
||||||
short BKE_curve_type_get(const struct Curve *cu);
|
short BKE_curve_type_get(const struct Curve *cu);
|
||||||
void BKE_curve_type_test(struct Object *ob);
|
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_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_median(struct Curve *cu, float cent[3]);
|
||||||
bool BKE_curve_center_bounds(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,
|
void BKE_curve_transform_ex(
|
||||||
const float mat[4][4],
|
struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props, float unit_scale);
|
||||||
const bool do_keys,
|
void BKE_curve_transform(struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props);
|
||||||
const bool do_props,
|
void BKE_curve_translate(struct Curve *cu, const float offset[3], bool do_keys);
|
||||||
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_material_index_remove(struct Curve *cu, int index);
|
void BKE_curve_material_index_remove(struct Curve *cu, int index);
|
||||||
bool BKE_curve_material_index_used(const 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);
|
void BKE_curve_material_index_clear(struct Curve *cu);
|
||||||
bool BKE_curve_material_index_validate(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_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.
|
* \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,
|
void BKE_curve_nurbs_vert_coords_apply_with_mat4(struct ListBase *lb,
|
||||||
const float (*vert_coords)[3],
|
const float (*vert_coords)[3],
|
||||||
const float mat[4][4],
|
const float mat[4][4],
|
||||||
const bool constrain_2d);
|
bool constrain_2d);
|
||||||
|
|
||||||
void BKE_curve_nurbs_vert_coords_apply(struct ListBase *lb,
|
void BKE_curve_nurbs_vert_coords_apply(struct ListBase *lb,
|
||||||
const float (*vert_coords)[3],
|
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 (*BKE_curve_nurbs_key_vert_coords_alloc(const struct ListBase *lb,
|
||||||
float *key,
|
float *key,
|
||||||
@@ -202,7 +196,7 @@ void BKE_curve_correct_bezpart(const float v1[2], float v2[2], float v3[2], cons
|
|||||||
|
|
||||||
/* ** Nurbs ** */
|
/* ** 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(const struct ListBase *nurb);
|
||||||
int BKE_nurbList_verts_count_without_handles(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.
|
* - 5: Set align, like 3 but no toggle.
|
||||||
* - 6: Clear align (setting #HD_FREE), 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_set(struct ListBase *editnurb, char code);
|
||||||
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb,
|
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, bool calc_length, uint8_t flag);
|
||||||
const bool calc_length,
|
|
||||||
const uint8_t flag);
|
|
||||||
|
|
||||||
void BKE_nurbList_handles_autocalc(ListBase *editnurb, 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);
|
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.
|
* 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,
|
unsigned int BKE_curve_calc_coords_axis_len(unsigned int bezt_array_len,
|
||||||
const unsigned int resolu,
|
unsigned int resolu,
|
||||||
const bool is_cyclic,
|
bool is_cyclic,
|
||||||
const bool use_cyclic_duplicate_endpoint);
|
bool use_cyclic_duplicate_endpoint);
|
||||||
/**
|
/**
|
||||||
* Calculate an array for the entire curve (cyclic or non-cyclic).
|
* Calculate an array for the entire curve (cyclic or non-cyclic).
|
||||||
* \note Call for each axis.
|
* \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.
|
* \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,
|
void BKE_curve_calc_coords_axis(const struct BezTriple *bezt_array,
|
||||||
const unsigned int bezt_array_len,
|
unsigned int bezt_array_len,
|
||||||
const unsigned int resolu,
|
unsigned int resolu,
|
||||||
const bool is_cyclic,
|
bool is_cyclic,
|
||||||
const bool use_cyclic_duplicate_endpoint,
|
bool use_cyclic_duplicate_endpoint,
|
||||||
/* array params */
|
/* array params */
|
||||||
const unsigned int axis,
|
unsigned int axis,
|
||||||
const unsigned int stride,
|
unsigned int stride,
|
||||||
float *r_points);
|
float *r_points);
|
||||||
|
|
||||||
void BKE_nurb_knot_calc_u(struct Nurb *nu);
|
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.
|
* \note caller must ensure active vertex remains valid.
|
||||||
*/
|
*/
|
||||||
bool BKE_nurb_type_convert(struct Nurb *nu,
|
bool BKE_nurb_type_convert(struct Nurb *nu, short type, bool use_handles, const char **r_err_msg);
|
||||||
const short type,
|
|
||||||
const bool use_handles,
|
|
||||||
const char **r_err_msg);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Be sure to call #BKE_nurb_knot_calc_u / #BKE_nurb_knot_calc_v after this.
|
* 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,
|
void BKE_nurb_handle_calc(struct BezTriple *bezt,
|
||||||
struct BezTriple *prev,
|
struct BezTriple *prev,
|
||||||
struct BezTriple *next,
|
struct BezTriple *next,
|
||||||
const bool is_fcurve,
|
bool is_fcurve,
|
||||||
const char smoothing);
|
char smoothing);
|
||||||
/**
|
/**
|
||||||
* Variant of #BKE_nurb_handle_calc() that allows calculating based on a different select flag.
|
* 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,
|
void BKE_nurb_handle_calc_ex(struct BezTriple *bezt,
|
||||||
struct BezTriple *prev,
|
struct BezTriple *prev,
|
||||||
struct BezTriple *next,
|
struct BezTriple *next,
|
||||||
const eBezTriple_Flag__Alias handle_sel_flag,
|
eBezTriple_Flag__Alias handle_sel_flag,
|
||||||
const bool is_fcurve,
|
bool is_fcurve,
|
||||||
const char smoothing);
|
char smoothing);
|
||||||
/**
|
/**
|
||||||
* Similar to #BKE_nurb_handle_calc but for curves and figures out the previous and next for us.
|
* 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.
|
* handles if the key is selected.
|
||||||
*/
|
*/
|
||||||
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt,
|
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt,
|
||||||
const eBezTriple_Flag__Alias sel_flag,
|
eBezTriple_Flag__Alias sel_flag,
|
||||||
const bool use_handle,
|
bool use_handle,
|
||||||
const bool use_around_local);
|
bool use_around_local);
|
||||||
void BKE_nurb_handles_test(struct Nurb *nu, const bool use_handles, const bool use_around_local);
|
void BKE_nurb_handles_test(struct Nurb *nu, bool use_handles, bool use_around_local);
|
||||||
|
|
||||||
/* **** Depsgraph evaluation **** */
|
/* **** 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,
|
unsigned int BKE_curve_decimate_bezt_array(struct BezTriple *bezt_array,
|
||||||
const unsigned int bezt_array_len,
|
unsigned int bezt_array_len,
|
||||||
const unsigned int resolu,
|
unsigned int resolu,
|
||||||
const bool is_cyclic,
|
bool is_cyclic,
|
||||||
const char flag_test,
|
char flag_test,
|
||||||
const char flag_set,
|
char flag_set,
|
||||||
const float error_sq_max,
|
float error_sq_max,
|
||||||
const unsigned int error_target_len);
|
unsigned int error_target_len);
|
||||||
|
|
||||||
void BKE_curve_decimate_nurb(struct Nurb *nu,
|
void BKE_curve_decimate_nurb(struct Nurb *nu,
|
||||||
const unsigned int resolu,
|
unsigned int resolu,
|
||||||
const float error_sq_max,
|
float error_sq_max,
|
||||||
const unsigned int error_target_len);
|
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,
|
void BKE_curve_deform_coords(const struct Object *ob_curve,
|
||||||
const struct Object *ob_target,
|
const struct Object *ob_target,
|
||||||
float (*vert_coords)[3],
|
float (*vert_coords)[3],
|
||||||
const int vert_coords_len,
|
int vert_coords_len,
|
||||||
const struct MDeformVert *dvert,
|
const struct MDeformVert *dvert,
|
||||||
const int defgrp_index,
|
int defgrp_index,
|
||||||
const short flag,
|
short flag,
|
||||||
const short defaxis);
|
short defaxis);
|
||||||
|
|
||||||
void BKE_curve_deform_coords_with_editmesh(const struct Object *ob_curve,
|
void BKE_curve_deform_coords_with_editmesh(const struct Object *ob_curve,
|
||||||
const struct Object *ob_target,
|
const struct Object *ob_target,
|
||||||
float (*vert_coords)[3],
|
float (*vert_coords)[3],
|
||||||
const int vert_coords_len,
|
int vert_coords_len,
|
||||||
const int defgrp_index,
|
int defgrp_index,
|
||||||
const short flag,
|
short flag,
|
||||||
const short defaxis,
|
short defaxis,
|
||||||
struct BMEditMesh *em_target);
|
struct BMEditMesh *em_target);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -445,7 +434,7 @@ void BKE_curve_deform_co(const struct Object *ob_curve,
|
|||||||
const struct Object *ob_target,
|
const struct Object *ob_target,
|
||||||
const float orco[3],
|
const float orco[3],
|
||||||
float vec[3],
|
float vec[3],
|
||||||
const int no_rot_axis,
|
int no_rot_axis,
|
||||||
float r_mat[3][3]);
|
float r_mat[3][3]);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
@@ -62,8 +62,8 @@ struct CurveProfile *BKE_curveprofile_copy(const struct CurveProfile *profile);
|
|||||||
* \return Whether the handle moved from its start position.
|
* \return Whether the handle moved from its start position.
|
||||||
*/
|
*/
|
||||||
bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point,
|
bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point,
|
||||||
const bool handle_1,
|
bool handle_1,
|
||||||
const bool snap,
|
bool snap,
|
||||||
const float delta[2]);
|
const float delta[2]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -76,7 +76,7 @@ bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point,
|
|||||||
*/
|
*/
|
||||||
bool BKE_curveprofile_move_point(struct CurveProfile *profile,
|
bool BKE_curveprofile_move_point(struct CurveProfile *profile,
|
||||||
struct CurveProfilePoint *point,
|
struct CurveProfilePoint *point,
|
||||||
const bool snap,
|
bool snap,
|
||||||
const float delta[2]);
|
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.
|
* \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
|
* 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.
|
* \param update_flags: Bit-field with fields defined in header file.
|
||||||
* Controls removing doubles and clipping.
|
* 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.
|
* Does a single evaluation along the profile's path.
|
||||||
|
@@ -84,7 +84,7 @@ void customData_mask_layers__print(const struct CustomData_MeshMasks *mask);
|
|||||||
typedef void (*cd_interp)(
|
typedef void (*cd_interp)(
|
||||||
const void **sources, const float *weights, const float *sub_weights, int count, void *dest);
|
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 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).
|
* 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).
|
* another, while not overwriting anything else (e.g. flags).
|
||||||
*/
|
*/
|
||||||
void CustomData_data_mix_value(
|
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
|
* 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,
|
CustomDataMask mask,
|
||||||
eCDAllocType alloctype,
|
eCDAllocType alloctype,
|
||||||
struct BMesh *bm,
|
struct BMesh *bm,
|
||||||
const char htype);
|
char htype);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NULL's all members and resets the #CustomData.typemap.
|
* 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.
|
* Duplicate data of a layer with flag NOFREE, and remove that flag.
|
||||||
* \return the layer data.
|
* \return the layer data.
|
||||||
*/
|
*/
|
||||||
void *CustomData_duplicate_referenced_layer(struct CustomData *data,
|
void *CustomData_duplicate_referenced_layer(struct CustomData *data, int type, int totelem);
|
||||||
const int type,
|
|
||||||
const int totelem);
|
|
||||||
void *CustomData_duplicate_referenced_layer_n(struct CustomData *data,
|
void *CustomData_duplicate_referenced_layer_n(struct CustomData *data,
|
||||||
const int type,
|
int type,
|
||||||
const int n,
|
int n,
|
||||||
const int totelem);
|
int totelem);
|
||||||
void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
|
void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
|
||||||
const int type,
|
int type,
|
||||||
const char *name,
|
const char *name,
|
||||||
const int totelem);
|
int totelem);
|
||||||
void *CustomData_duplicate_referenced_layer_anonymous(
|
void *CustomData_duplicate_referenced_layer_anonymous(
|
||||||
CustomData *data,
|
CustomData *data, int type, const struct AnonymousAttributeID *anonymous_id, int totelem);
|
||||||
const int type,
|
|
||||||
const struct AnonymousAttributeID *anonymous_id,
|
|
||||||
const int totelem);
|
|
||||||
bool CustomData_is_referenced_layer(struct CustomData *data, int type);
|
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.
|
* 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.
|
* 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'.
|
* \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.
|
* 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,
|
void CustomData_bmesh_do_versions_update_active_layers(struct CustomData *fdata,
|
||||||
struct CustomData *ldata);
|
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
|
#ifndef NDEBUG
|
||||||
/**
|
/**
|
||||||
@@ -595,9 +590,7 @@ bool CustomData_from_bmeshpoly_test(CustomData *fdata, CustomData *ldata, bool f
|
|||||||
*
|
*
|
||||||
* \return True if some errors were found.
|
* \return True if some errors were found.
|
||||||
*/
|
*/
|
||||||
bool CustomData_layer_validate(struct CustomDataLayer *layer,
|
bool CustomData_layer_validate(struct CustomDataLayer *layer, uint totitems, bool do_fixes);
|
||||||
const uint totitems,
|
|
||||||
const bool do_fixes);
|
|
||||||
void CustomData_layers__print(struct CustomData *data);
|
void CustomData_layers__print(struct CustomData *data);
|
||||||
|
|
||||||
/* External file storage */
|
/* External file storage */
|
||||||
@@ -627,8 +620,8 @@ typedef void (*cd_datatransfer_interp)(const struct CustomDataTransferLayerMap *
|
|||||||
void *dest,
|
void *dest,
|
||||||
const void **sources,
|
const void **sources,
|
||||||
const float *weights,
|
const float *weights,
|
||||||
const int count,
|
int count,
|
||||||
const float mix_factor);
|
float mix_factor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake CD_LAYERS (those are actually 'real' data stored directly into elements' structs,
|
* Fake CD_LAYERS (those are actually 'real' data stored directly into elements' structs,
|
||||||
|
@@ -63,19 +63,19 @@ enum {
|
|||||||
DT_TYPE_POLY_ALL = DT_TYPE_UV | DT_TYPE_SHARP_FACE | DT_TYPE_FREESTYLE_FACE,
|
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);
|
struct CustomData_MeshMasks *r_data_masks);
|
||||||
/**
|
/**
|
||||||
* Check what can do each layer type
|
* Check what can do each layer type
|
||||||
* (if it is actually handled by transfer-data, if it supports advanced mixing.
|
* (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_advanced_mixing,
|
||||||
bool *r_threshold);
|
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_cdtype(int dtdata_type);
|
||||||
int BKE_object_data_transfer_dttype_to_srcdst_index(const int dtdata_type);
|
int BKE_object_data_transfer_dttype_to_srcdst_index(int dtdata_type);
|
||||||
|
|
||||||
#define DT_DATATYPE_IS_VERT(_dt) \
|
#define DT_DATATYPE_IS_VERT(_dt) \
|
||||||
ELEM(_dt, DT_TYPE_MDEFORMVERT, DT_TYPE_SHAPEKEY, DT_TYPE_SKIN, DT_TYPE_BWEIGHT_VERT)
|
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 Scene *scene,
|
||||||
struct Object *ob_src,
|
struct Object *ob_src,
|
||||||
struct Object *ob_dst,
|
struct Object *ob_dst,
|
||||||
const int data_types,
|
int data_types,
|
||||||
const bool use_delete,
|
bool use_delete,
|
||||||
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
|
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
|
||||||
const int tolayers_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 Scene *scene,
|
||||||
struct Object *ob_src,
|
struct Object *ob_src,
|
||||||
struct Object *ob_dst,
|
struct Object *ob_dst,
|
||||||
const int data_types,
|
int data_types,
|
||||||
const bool use_create,
|
bool use_create,
|
||||||
const int map_vert_mode,
|
int map_vert_mode,
|
||||||
const int map_edge_mode,
|
int map_edge_mode,
|
||||||
const int map_loop_mode,
|
int map_loop_mode,
|
||||||
const int map_poly_mode,
|
int map_poly_mode,
|
||||||
struct SpaceTransform *space_transform,
|
struct SpaceTransform *space_transform,
|
||||||
const bool auto_transform,
|
bool auto_transform,
|
||||||
const float max_distance,
|
float max_distance,
|
||||||
const float ray_radius,
|
float ray_radius,
|
||||||
const float islands_handling_precision,
|
float islands_handling_precision,
|
||||||
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
|
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
|
||||||
const int tolayers_select[DT_MULTILAYER_INDEX_MAX],
|
const int tolayers_select[DT_MULTILAYER_INDEX_MAX],
|
||||||
const int mix_mode,
|
int mix_mode,
|
||||||
const float mix_factor,
|
float mix_factor,
|
||||||
const char *vgroup_name,
|
const char *vgroup_name,
|
||||||
const bool invert_vgroup,
|
bool invert_vgroup,
|
||||||
struct ReportList *reports);
|
struct ReportList *reports);
|
||||||
bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
|
bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob_src,
|
struct Object *ob_src,
|
||||||
struct Object *ob_dst,
|
struct Object *ob_dst,
|
||||||
struct Mesh *me_dst,
|
struct Mesh *me_dst,
|
||||||
const int data_types,
|
int data_types,
|
||||||
bool use_create,
|
bool use_create,
|
||||||
const int map_vert_mode,
|
int map_vert_mode,
|
||||||
const int map_edge_mode,
|
int map_edge_mode,
|
||||||
const int map_loop_mode,
|
int map_loop_mode,
|
||||||
const int map_poly_mode,
|
int map_poly_mode,
|
||||||
struct SpaceTransform *space_transform,
|
struct SpaceTransform *space_transform,
|
||||||
const bool auto_transform,
|
bool auto_transform,
|
||||||
const float max_distance,
|
float max_distance,
|
||||||
const float ray_radius,
|
float ray_radius,
|
||||||
const float islands_handling_precision,
|
float islands_handling_precision,
|
||||||
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
|
const int fromlayers_select[DT_MULTILAYER_INDEX_MAX],
|
||||||
const int tolayers_select[DT_MULTILAYER_INDEX_MAX],
|
const int tolayers_select[DT_MULTILAYER_INDEX_MAX],
|
||||||
const int mix_mode,
|
int mix_mode,
|
||||||
const float mix_factor,
|
float mix_factor,
|
||||||
const char *vgroup_name,
|
const char *vgroup_name,
|
||||||
const bool invert_vgroup,
|
bool invert_vgroup,
|
||||||
struct ReportList *reports);
|
struct ReportList *reports);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -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.
|
* \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);
|
const struct ListBase *BKE_id_defgroup_list_get(const struct ID *id);
|
||||||
struct ListBase *BKE_id_defgroup_list_get_mutable(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.
|
* \note caller must free.
|
||||||
*/
|
*/
|
||||||
int *BKE_object_defgroup_flip_map(const struct Object *ob,
|
int *BKE_object_defgroup_flip_map(const struct Object *ob, int *flip_map_len, bool use_default);
|
||||||
int *flip_map_len,
|
|
||||||
const bool use_default);
|
|
||||||
/**
|
/**
|
||||||
* \note caller must free.
|
* \note caller must free.
|
||||||
*/
|
*/
|
||||||
int *BKE_object_defgroup_flip_map_single(const struct Object *ob,
|
int *BKE_object_defgroup_flip_map_single(const struct Object *ob,
|
||||||
int *flip_map_len,
|
int *flip_map_len,
|
||||||
const bool use_default,
|
bool use_default,
|
||||||
int defgroup);
|
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);
|
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);
|
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.
|
* 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.
|
* \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.
|
* 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.
|
* \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.
|
* 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.
|
* \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_elems(struct MDeformVert *dvert, int totvert);
|
||||||
void BKE_defvert_array_free(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);
|
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:
|
* 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.
|
* - 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.
|
* This is a bit confusing, just saves some checks from the caller.
|
||||||
*/
|
*/
|
||||||
float BKE_defvert_array_find_weight_safe(const struct MDeformVert *dvert,
|
float BKE_defvert_array_find_weight_safe(const struct MDeformVert *dvert, int index, int defgroup);
|
||||||
const int index,
|
|
||||||
const int defgroup);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \return The total weight in all groups marked in the selection mask.
|
* \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,
|
void BKE_defvert_copy_subset(struct MDeformVert *dvert_dst,
|
||||||
const struct MDeformVert *dvert_src,
|
const struct MDeformVert *dvert_src,
|
||||||
const bool *vgroup_subset,
|
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
|
* Overwrite weights filtered by vgroup_subset and with mirroring specified by the flip map
|
||||||
* - do nothing if neither are set.
|
* - 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,
|
void BKE_defvert_mirror_subset(struct MDeformVert *dvert_dst,
|
||||||
const struct MDeformVert *dvert_src,
|
const struct MDeformVert *dvert_src,
|
||||||
const bool *vgroup_subset,
|
const bool *vgroup_subset,
|
||||||
const int vgroup_tot,
|
int vgroup_tot,
|
||||||
const int *flip_map,
|
const int *flip_map,
|
||||||
const int flip_map_len);
|
int flip_map_len);
|
||||||
/**
|
/**
|
||||||
* Copy an index from one #MDeformVert to another.
|
* Copy an index from one #MDeformVert to another.
|
||||||
* - do nothing if neither are set.
|
* - do nothing if neither are set.
|
||||||
* - add destination weight if needed.
|
* - add destination weight if needed.
|
||||||
*/
|
*/
|
||||||
void BKE_defvert_copy_index(struct MDeformVert *dvert_dst,
|
void BKE_defvert_copy_index(struct MDeformVert *dvert_dst,
|
||||||
const int defgroup_dst,
|
int defgroup_dst,
|
||||||
const struct MDeformVert *dvert_src,
|
const struct MDeformVert *dvert_src,
|
||||||
const int defgroup_src);
|
int defgroup_src);
|
||||||
/**
|
/**
|
||||||
* Only sync over matching weights, don't add or remove groups
|
* Only sync over matching weights, don't add or remove groups
|
||||||
* warning, loop within loop.
|
* warning, loop within loop.
|
||||||
*/
|
*/
|
||||||
void BKE_defvert_sync(struct MDeformVert *dvert_dst,
|
void BKE_defvert_sync(struct MDeformVert *dvert_dst,
|
||||||
const struct MDeformVert *dvert_src,
|
const struct MDeformVert *dvert_src,
|
||||||
const bool use_ensure);
|
bool use_ensure);
|
||||||
/**
|
/**
|
||||||
* be sure all flip_map values are valid
|
* be sure all flip_map values are valid
|
||||||
*/
|
*/
|
||||||
void BKE_defvert_sync_mapped(struct MDeformVert *dvert_dst,
|
void BKE_defvert_sync_mapped(struct MDeformVert *dvert_dst,
|
||||||
const struct MDeformVert *dvert_src,
|
const struct MDeformVert *dvert_src,
|
||||||
const int *flip_map,
|
const int *flip_map,
|
||||||
const int flip_map_len,
|
int flip_map_len,
|
||||||
const bool use_ensure);
|
bool use_ensure);
|
||||||
/**
|
/**
|
||||||
* be sure all flip_map values are valid
|
* 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_remap(struct MDeformVert *dvert, const int *map, int map_len);
|
||||||
void BKE_defvert_flip(struct MDeformVert *dvert, const int *flip_map, const int flip_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,
|
void BKE_defvert_flip_merged(struct MDeformVert *dvert, const int *flip_map, int flip_map_len);
|
||||||
const int *flip_map,
|
|
||||||
const int flip_map_len);
|
|
||||||
void BKE_defvert_normalize(struct MDeformVert *dvert);
|
void BKE_defvert_normalize(struct MDeformVert *dvert);
|
||||||
/**
|
/**
|
||||||
* Same as #BKE_defvert_normalize but takes a bool array.
|
* Same as #BKE_defvert_normalize but takes a bool array.
|
||||||
*/
|
*/
|
||||||
void BKE_defvert_normalize_subset(struct MDeformVert *dvert,
|
void BKE_defvert_normalize_subset(struct MDeformVert *dvert,
|
||||||
const bool *vgroup_subset,
|
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
|
* 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,
|
void BKE_defvert_normalize_lock_single(struct MDeformVert *dvert,
|
||||||
const bool *vgroup_subset,
|
const bool *vgroup_subset,
|
||||||
const int vgroup_tot,
|
int vgroup_tot,
|
||||||
const uint def_nr_lock);
|
uint def_nr_lock);
|
||||||
/**
|
/**
|
||||||
* Same as BKE_defvert_normalize() if no locked vgroup is a member of the subset
|
* Same as BKE_defvert_normalize() if no locked vgroup is a member of the subset
|
||||||
*/
|
*/
|
||||||
void BKE_defvert_normalize_lock_map(struct MDeformVert *dvert,
|
void BKE_defvert_normalize_lock_map(struct MDeformVert *dvert,
|
||||||
const bool *vgroup_subset,
|
const bool *vgroup_subset,
|
||||||
const int vgroup_tot,
|
int vgroup_tot,
|
||||||
const bool *lock_flags,
|
const bool *lock_flags,
|
||||||
const int defbase_tot);
|
int defbase_tot);
|
||||||
|
|
||||||
/* Utilities to 'extract' a given vgroup into a simple float array,
|
/* Utilities to 'extract' a given vgroup into a simple float array,
|
||||||
* for verts, but also edges/polys/loops. */
|
* for verts, but also edges/polys/loops. */
|
||||||
|
|
||||||
void BKE_defvert_extract_vgroup_to_vertweights(struct MDeformVert *dvert,
|
void BKE_defvert_extract_vgroup_to_vertweights(
|
||||||
const int defgroup,
|
struct MDeformVert *dvert, int defgroup, int num_verts, float *r_weights, bool invert_vgroup);
|
||||||
const int num_verts,
|
|
||||||
float *r_weights,
|
|
||||||
const bool invert_vgroup);
|
|
||||||
/**
|
/**
|
||||||
* The following three make basic interpolation,
|
* The following three make basic interpolation,
|
||||||
* using temp vert_weights array to avoid looking up same weight several times.
|
* using temp vert_weights array to avoid looking up same weight several times.
|
||||||
*/
|
*/
|
||||||
void BKE_defvert_extract_vgroup_to_edgeweights(struct MDeformVert *dvert,
|
void BKE_defvert_extract_vgroup_to_edgeweights(struct MDeformVert *dvert,
|
||||||
const int defgroup,
|
int defgroup,
|
||||||
const int num_verts,
|
int num_verts,
|
||||||
struct MEdge *edges,
|
struct MEdge *edges,
|
||||||
const int num_edges,
|
int num_edges,
|
||||||
float *r_weights,
|
float *r_weights,
|
||||||
const bool invert_vgroup);
|
bool invert_vgroup);
|
||||||
void BKE_defvert_extract_vgroup_to_loopweights(struct MDeformVert *dvert,
|
void BKE_defvert_extract_vgroup_to_loopweights(struct MDeformVert *dvert,
|
||||||
const int defgroup,
|
int defgroup,
|
||||||
const int num_verts,
|
int num_verts,
|
||||||
struct MLoop *loops,
|
struct MLoop *loops,
|
||||||
const int num_loops,
|
int num_loops,
|
||||||
float *r_weights,
|
float *r_weights,
|
||||||
const bool invert_vgroup);
|
bool invert_vgroup);
|
||||||
void BKE_defvert_extract_vgroup_to_polyweights(struct MDeformVert *dvert,
|
void BKE_defvert_extract_vgroup_to_polyweights(struct MDeformVert *dvert,
|
||||||
const int defgroup,
|
int defgroup,
|
||||||
const int num_verts,
|
int num_verts,
|
||||||
struct MLoop *loops,
|
struct MLoop *loops,
|
||||||
const int num_loops,
|
int num_loops,
|
||||||
struct MPoly *polys,
|
struct MPoly *polys,
|
||||||
const int num_polys,
|
int num_polys,
|
||||||
float *r_weights,
|
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_write(struct BlendWriter *writer, int count, struct MDeformVert *dvlist);
|
||||||
void BKE_defvert_blend_read(struct BlendDataReader *reader,
|
void BKE_defvert_blend_read(struct BlendDataReader *reader,
|
||||||
|
@@ -86,7 +86,7 @@ void BKE_displist_free(struct ListBase *lb);
|
|||||||
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph,
|
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph,
|
||||||
const struct Scene *scene,
|
const struct Scene *scene,
|
||||||
struct Object *ob,
|
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_displist_make_mball(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
|
||||||
|
|
||||||
void BKE_curve_calc_modifiers_pre(struct Depsgraph *depsgraph,
|
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 Object *ob,
|
||||||
struct ListBase *source_nurb,
|
struct ListBase *source_nurb,
|
||||||
struct ListBase *target_nurb,
|
struct ListBase *target_nurb,
|
||||||
const bool for_render);
|
bool for_render);
|
||||||
bool BKE_displist_surfindex_get(
|
bool BKE_displist_surfindex_get(
|
||||||
const struct DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
|
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,
|
void BKE_displist_fill(const struct ListBase *dispbase,
|
||||||
struct ListBase *to,
|
struct ListBase *to,
|
||||||
const float normal_proj[3],
|
const float normal_proj[3],
|
||||||
const bool flip_normal);
|
bool flip_normal);
|
||||||
|
|
||||||
float BKE_displist_calc_taper(struct Depsgraph *depsgraph,
|
float BKE_displist_calc_taper(struct Depsgraph *depsgraph,
|
||||||
const struct Scene *scene,
|
const struct Scene *scene,
|
||||||
|
@@ -42,13 +42,13 @@ typedef bool (*BMBVHTree_FaceFilter)(struct BMFace *f, void *userdata);
|
|||||||
BMBVHTree *BKE_bmbvh_new_from_editmesh(struct BMEditMesh *em,
|
BMBVHTree *BKE_bmbvh_new_from_editmesh(struct BMEditMesh *em,
|
||||||
int flag,
|
int flag,
|
||||||
const float (*cos_cage)[3],
|
const float (*cos_cage)[3],
|
||||||
const bool cos_cage_free);
|
bool cos_cage_free);
|
||||||
BMBVHTree *BKE_bmbvh_new_ex(struct BMesh *bm,
|
BMBVHTree *BKE_bmbvh_new_ex(struct BMesh *bm,
|
||||||
struct BMLoop *(*looptris)[3],
|
struct BMLoop *(*looptris)[3],
|
||||||
int looptris_tot,
|
int looptris_tot,
|
||||||
int flag,
|
int flag,
|
||||||
const float (*cos_cage)[3],
|
const float (*cos_cage)[3],
|
||||||
const bool cos_cage_free,
|
bool cos_cage_free,
|
||||||
bool (*test_fn)(struct BMFace *, void *user_data),
|
bool (*test_fn)(struct BMFace *, void *user_data),
|
||||||
void *user_data);
|
void *user_data);
|
||||||
BMBVHTree *BKE_bmbvh_new(struct BMesh *bm,
|
BMBVHTree *BKE_bmbvh_new(struct BMesh *bm,
|
||||||
@@ -56,14 +56,14 @@ BMBVHTree *BKE_bmbvh_new(struct BMesh *bm,
|
|||||||
int looptris_tot,
|
int looptris_tot,
|
||||||
int flag,
|
int flag,
|
||||||
const float (*cos_cage)[3],
|
const float (*cos_cage)[3],
|
||||||
const bool cos_cage_free);
|
bool cos_cage_free);
|
||||||
void BKE_bmbvh_free(BMBVHTree *tree);
|
void BKE_bmbvh_free(BMBVHTree *tree);
|
||||||
struct BVHTree *BKE_bmbvh_tree_get(BMBVHTree *tree);
|
struct BVHTree *BKE_bmbvh_tree_get(BMBVHTree *tree);
|
||||||
|
|
||||||
struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree,
|
struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree,
|
||||||
const float co[3],
|
const float co[3],
|
||||||
const float dir[3],
|
const float dir[3],
|
||||||
const float radius,
|
float radius,
|
||||||
float *r_dist,
|
float *r_dist,
|
||||||
float r_hitout[3],
|
float r_hitout[3],
|
||||||
float r_cagehit[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,
|
struct BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *tree,
|
||||||
const float co[3],
|
const float co[3],
|
||||||
const float dir[3],
|
const float dir[3],
|
||||||
const float radius,
|
float radius,
|
||||||
float *r_dist,
|
float *r_dist,
|
||||||
float r_hitout[3],
|
float r_hitout[3],
|
||||||
float r_cagehit[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.
|
* Find a vert closest to co in a sphere of radius dist_max.
|
||||||
*/
|
*/
|
||||||
struct BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *tree,
|
struct BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *tree, const float co[3], float dist_max);
|
||||||
const float co[3],
|
struct BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *tree, const float co[3], float dist_max);
|
||||||
const float dist_max);
|
|
||||||
struct BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *tree,
|
|
||||||
const float co[3],
|
|
||||||
const float dist_max);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overlap indices reference the looptri's.
|
* Overlap indices reference the looptri's.
|
||||||
|
@@ -39,7 +39,7 @@ void BKE_editmesh_loop_tangent_calc(BMEditMesh *em,
|
|||||||
const float (*loop_normals)[3],
|
const float (*loop_normals)[3],
|
||||||
const float (*vert_orco)[3],
|
const float (*vert_orco)[3],
|
||||||
CustomData *dm_loopdata_out,
|
CustomData *dm_loopdata_out,
|
||||||
const uint dm_loopdata_out_len,
|
uint dm_loopdata_out_len,
|
||||||
short *tangent_mask_curr_p);
|
short *tangent_mask_curr_p);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -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_create_type_data(struct FluidModifierData *fmd);
|
||||||
void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd,
|
void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd,
|
||||||
struct FluidModifierData *tfmd,
|
struct FluidModifierData *tfmd,
|
||||||
const int flag);
|
int flag);
|
||||||
|
|
||||||
bool BKE_fluid_reallocate_fluid(struct FluidDomainSettings *fds, int res[3], int free_old);
|
bool BKE_fluid_reallocate_fluid(struct FluidDomainSettings *fds, int res[3], int free_old);
|
||||||
void BKE_fluid_reallocate_copy_fluid(struct FluidDomainSettings *fds,
|
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 *pset_name,
|
||||||
const char *parts_name,
|
const char *parts_name,
|
||||||
const char *psys_name,
|
const char *psys_name,
|
||||||
const int psys_type);
|
int psys_type);
|
||||||
void BKE_fluid_particle_system_destroy(struct Object *ob, const int particle_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_startframe_set(struct FluidDomainSettings *settings, int value);
|
||||||
void BKE_fluid_cache_endframe_set(struct FluidDomainSettings *settings, int value);
|
void BKE_fluid_cache_endframe_set(struct FluidDomainSettings *settings, int value);
|
||||||
|
@@ -38,10 +38,10 @@ typedef struct FreestyleSettings FreestyleSettings;
|
|||||||
|
|
||||||
/* FreestyleConfig */
|
/* FreestyleConfig */
|
||||||
void BKE_freestyle_config_init(struct FreestyleConfig *config);
|
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,
|
void BKE_freestyle_config_copy(struct FreestyleConfig *new_config,
|
||||||
const struct FreestyleConfig *config,
|
const struct FreestyleConfig *config,
|
||||||
const int flag);
|
int flag);
|
||||||
|
|
||||||
/* FreestyleConfig.modules */
|
/* FreestyleConfig.modules */
|
||||||
struct FreestyleModuleConfig *BKE_freestyle_module_add(struct FreestyleConfig *config);
|
struct FreestyleModuleConfig *BKE_freestyle_module_add(struct FreestyleConfig *config);
|
||||||
|
@@ -109,11 +109,11 @@ class GeometryComponent {
|
|||||||
* \note Conceptually this function is static, the result is always the same for different
|
* \note Conceptually this function is static, the result is always the same for different
|
||||||
* instances of the same geometry component type.
|
* 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.
|
* 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
|
* 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. */
|
/** Returns true when the attribute has been created. */
|
||||||
bool attribute_try_create(const blender::bke::AttributeIDRef &attribute_id,
|
bool attribute_try_create(const blender::bke::AttributeIDRef &attribute_id,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
const CustomDataType data_type,
|
const CustomDataType data_type,
|
||||||
const AttributeInit &initializer);
|
const AttributeInit &initializer);
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ class GeometryComponent {
|
|||||||
* interpolated or converted.
|
* interpolated or converted.
|
||||||
*/
|
*/
|
||||||
blender::fn::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
|
blender::fn::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
const CustomDataType data_type) const;
|
const CustomDataType data_type) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -200,7 +200,7 @@ class GeometryComponent {
|
|||||||
* interpolated.
|
* interpolated.
|
||||||
*/
|
*/
|
||||||
blender::fn::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
|
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.
|
* 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.
|
* contain a default value. This never returns null.
|
||||||
*/
|
*/
|
||||||
blender::fn::GVArray attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
|
blender::fn::GVArray attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
const CustomDataType data_type,
|
const CustomDataType data_type,
|
||||||
const void *default_value = nullptr) const;
|
const void *default_value = nullptr) const;
|
||||||
/* Use instead of the method above when the type is known at compile time for type safety. */
|
/* 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(
|
blender::bke::OutputAttribute attribute_try_get_for_output(
|
||||||
const blender::bke::AttributeIDRef &attribute_id,
|
const blender::bke::AttributeIDRef &attribute_id,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
const CustomDataType data_type,
|
const CustomDataType data_type,
|
||||||
const void *default_value = nullptr);
|
const void *default_value = nullptr);
|
||||||
/* Use instead of the method above when the type is known at compile time for type safety. */
|
/* 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(
|
blender::bke::OutputAttribute attribute_try_get_for_output_only(
|
||||||
const blender::bke::AttributeIDRef &attribute_id,
|
const blender::bke::AttributeIDRef &attribute_id,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
const CustomDataType data_type);
|
const CustomDataType data_type);
|
||||||
/* Use instead of the method above when the type is known at compile time for type safety. */
|
/* Use instead of the method above when the type is known at compile time for type safety. */
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@@ -281,10 +281,9 @@ class GeometryComponent {
|
|||||||
private:
|
private:
|
||||||
virtual const blender::bke::ComponentAttributeProviders *get_attribute_providers() const;
|
virtual const blender::bke::ComponentAttributeProviders *get_attribute_providers() const;
|
||||||
|
|
||||||
virtual blender::fn::GVArray attribute_try_adapt_domain_impl(
|
virtual blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
|
||||||
const blender::fn::GVArray &varray,
|
AttributeDomain from_domain,
|
||||||
const AttributeDomain from_domain,
|
AttributeDomain to_domain) const;
|
||||||
const AttributeDomain to_domain) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@@ -570,7 +569,7 @@ class MeshComponent : public GeometryComponent {
|
|||||||
*/
|
*/
|
||||||
Mesh *get_for_write();
|
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;
|
bool is_empty() const final;
|
||||||
|
|
||||||
@@ -582,10 +581,9 @@ class MeshComponent : public GeometryComponent {
|
|||||||
private:
|
private:
|
||||||
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
|
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
|
||||||
|
|
||||||
blender::fn::GVArray attribute_try_adapt_domain_impl(
|
blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
|
||||||
const blender::fn::GVArray &varray,
|
AttributeDomain from_domain,
|
||||||
const AttributeDomain from_domain,
|
AttributeDomain to_domain) const final;
|
||||||
const AttributeDomain to_domain) const final;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -634,7 +632,7 @@ class PointCloudComponent : public GeometryComponent {
|
|||||||
*/
|
*/
|
||||||
PointCloud *get_for_write();
|
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;
|
bool is_empty() const final;
|
||||||
|
|
||||||
@@ -684,7 +682,7 @@ class CurveComponent : public GeometryComponent {
|
|||||||
const CurveEval *get_for_read() const;
|
const CurveEval *get_for_read() const;
|
||||||
CurveEval *get_for_write();
|
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;
|
bool is_empty() const final;
|
||||||
|
|
||||||
@@ -702,10 +700,9 @@ class CurveComponent : public GeometryComponent {
|
|||||||
private:
|
private:
|
||||||
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
|
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
|
||||||
|
|
||||||
blender::fn::GVArray attribute_try_adapt_domain_impl(
|
blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
|
||||||
const blender::fn::GVArray &varray,
|
AttributeDomain from_domain,
|
||||||
const AttributeDomain from_domain,
|
AttributeDomain to_domain) const final;
|
||||||
const 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`
|
* changed. This is a function on the component rather than each reference to ensure `const`
|
||||||
* correctness for that reason.
|
* 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::Span<int> instance_reference_handles() const;
|
||||||
blender::MutableSpan<int> instance_reference_handles();
|
blender::MutableSpan<int> instance_reference_handles();
|
||||||
@@ -933,7 +930,7 @@ class InstancesComponent : public GeometryComponent {
|
|||||||
blender::bke::CustomDataAttributes &attributes();
|
blender::bke::CustomDataAttributes &attributes();
|
||||||
const blender::bke::CustomDataAttributes &attributes() const;
|
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(
|
void foreach_referenced_geometry(
|
||||||
blender::FunctionRef<void(const GeometrySet &geometry_set)> callback) const;
|
blender::FunctionRef<void(const GeometrySet &geometry_set)> callback) const;
|
||||||
@@ -1027,7 +1024,7 @@ class GeometryFieldInput : public fn::FieldInput {
|
|||||||
ResourceScope &scope) const override;
|
ResourceScope &scope) const override;
|
||||||
|
|
||||||
virtual GVArray get_varray_for_context(const GeometryComponent &component,
|
virtual GVArray get_varray_for_context(const GeometryComponent &component,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
IndexMask mask) const = 0;
|
IndexMask mask) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1055,7 +1052,7 @@ class AttributeFieldInput : public GeometryFieldInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GVArray get_varray_for_context(const GeometryComponent &component,
|
GVArray get_varray_for_context(const GeometryComponent &component,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
IndexMask mask) const override;
|
IndexMask mask) const override;
|
||||||
|
|
||||||
std::string socket_inspection_name() 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,
|
GVArray get_varray_for_context(const GeometryComponent &component,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
IndexMask mask) const override;
|
IndexMask mask) const override;
|
||||||
|
|
||||||
std::string socket_inspection_name() 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,
|
GVArray get_varray_for_context(const GeometryComponent &component,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
IndexMask mask) const override;
|
IndexMask mask) const override;
|
||||||
|
|
||||||
std::string socket_inspection_name() const override;
|
std::string socket_inspection_name() const override;
|
||||||
|
@@ -151,8 +151,8 @@ struct bGPDframe *BKE_gpencil_frame_addcopy(struct bGPDlayer *gpl, int cframe);
|
|||||||
*/
|
*/
|
||||||
struct bGPDlayer *BKE_gpencil_layer_addnew(struct bGPdata *gpd,
|
struct bGPDlayer *BKE_gpencil_layer_addnew(struct bGPdata *gpd,
|
||||||
const char *name,
|
const char *name,
|
||||||
const bool setactive,
|
bool setactive,
|
||||||
const bool add_to_header);
|
bool add_to_header);
|
||||||
/**
|
/**
|
||||||
* Add a new grease pencil data-block.
|
* Add a new grease pencil data-block.
|
||||||
* \param bmain: Main pointer
|
* \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
|
* \param gpf_src: Source grease pencil frame
|
||||||
* \return Pointer to new frame
|
* \return Pointer to new frame
|
||||||
*/
|
*/
|
||||||
struct bGPDframe *BKE_gpencil_frame_duplicate(const struct bGPDframe *gpf_src,
|
struct bGPDframe *BKE_gpencil_frame_duplicate(const struct bGPDframe *gpf_src, bool dup_strokes);
|
||||||
const bool dup_strokes);
|
|
||||||
/**
|
/**
|
||||||
* Make a copy of a given gpencil layer.
|
* Make a copy of a given gpencil layer.
|
||||||
* \param gpl_src: Source grease pencil layer
|
* \param gpl_src: Source grease pencil layer
|
||||||
* \return Pointer to new layer
|
* \return Pointer to new layer
|
||||||
*/
|
*/
|
||||||
struct bGPDlayer *BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src,
|
struct bGPDlayer *BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src,
|
||||||
const bool dup_frames,
|
bool dup_frames,
|
||||||
const bool dup_strokes);
|
bool dup_strokes);
|
||||||
/**
|
/**
|
||||||
* Make a copy of a given gpencil layer settings.
|
* 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.
|
* \return Pointer to new stroke.
|
||||||
*/
|
*/
|
||||||
struct bGPDstroke *BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src,
|
struct bGPDstroke *BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src,
|
||||||
const bool dup_points,
|
bool dup_points,
|
||||||
const bool dup_curve);
|
bool dup_curve);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a copy of a given gpencil data-block.
|
* 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.
|
* \return True if done.
|
||||||
*/
|
*/
|
||||||
bool BKE_gpencil_merge_materials_table_get(struct Object *ob,
|
bool BKE_gpencil_merge_materials_table_get(struct Object *ob,
|
||||||
const float hue_threshold,
|
float hue_threshold,
|
||||||
const float sat_threshold,
|
float sat_threshold,
|
||||||
const float val_threshold,
|
float val_threshold,
|
||||||
struct GHash *r_mat_table);
|
struct GHash *r_mat_table);
|
||||||
/**
|
/**
|
||||||
* Merge similar materials
|
* Merge similar materials
|
||||||
@@ -266,9 +265,9 @@ bool BKE_gpencil_merge_materials_table_get(struct Object *ob,
|
|||||||
* \return True if done
|
* \return True if done
|
||||||
*/
|
*/
|
||||||
bool BKE_gpencil_merge_materials(struct Object *ob,
|
bool BKE_gpencil_merge_materials(struct Object *ob,
|
||||||
const float hue_threshold,
|
float hue_threshold,
|
||||||
const float sat_threshold,
|
float sat_threshold,
|
||||||
const float val_threshold,
|
float val_threshold,
|
||||||
int *r_removed);
|
int *r_removed);
|
||||||
|
|
||||||
/* statistics functions */
|
/* statistics functions */
|
||||||
@@ -296,7 +295,7 @@ struct bGPDstroke *BKE_gpencil_stroke_new(int mat_idx, int totpoints, short thic
|
|||||||
* \return Pointer to new stroke
|
* \return Pointer to new stroke
|
||||||
*/
|
*/
|
||||||
struct bGPDstroke *BKE_gpencil_stroke_add(
|
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
|
* 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,
|
int totpoints,
|
||||||
short thickness);
|
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 */
|
/* Stroke and Fill - Alpha Visibility Threshold */
|
||||||
#define GPENCIL_ALPHA_OPACITY_THRESH 0.001f
|
#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 gpd: Grease pencil data-block
|
||||||
* \param unlock: Unlock flag
|
* \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.
|
* Add grease pencil mask layer.
|
||||||
@@ -641,11 +640,8 @@ void BKE_gpencil_palette_ensure(struct Main *bmain, struct Scene *scene);
|
|||||||
* \param mask: Mask
|
* \param mask: Mask
|
||||||
* \return True if done
|
* \return True if done
|
||||||
*/
|
*/
|
||||||
bool BKE_gpencil_from_image(struct SpaceImage *sima,
|
bool BKE_gpencil_from_image(
|
||||||
struct bGPdata *gpd,
|
struct SpaceImage *sima, struct bGPdata *gpd, struct bGPDframe *gpf, float size, bool mask);
|
||||||
struct bGPDframe *gpf,
|
|
||||||
const float size,
|
|
||||||
const bool mask);
|
|
||||||
|
|
||||||
/* Iterators */
|
/* Iterators */
|
||||||
/**
|
/**
|
||||||
|
@@ -50,17 +50,17 @@ void BKE_gpencil_convert_curve(struct Main *bmain,
|
|||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob_gp,
|
struct Object *ob_gp,
|
||||||
struct Object *ob_cu,
|
struct Object *ob_cu,
|
||||||
const bool use_collections,
|
bool use_collections,
|
||||||
const float scale_thickness,
|
float scale_thickness,
|
||||||
const float sample);
|
float sample);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a bGPDcurve by doing a cubic curve fitting on the grease pencil stroke points.
|
* 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,
|
struct bGPDcurve *BKE_gpencil_stroke_editcurve_generate(struct bGPDstroke *gps,
|
||||||
const float error_threshold,
|
float error_threshold,
|
||||||
const float corner_angle,
|
float corner_angle,
|
||||||
const float stroke_radius);
|
float stroke_radius);
|
||||||
/**
|
/**
|
||||||
* Updates the edit-curve for a stroke. Frees the old curve if one exists and generates a new one.
|
* 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.
|
* Recalculate stroke points with the edit-curve of the stroke.
|
||||||
*/
|
*/
|
||||||
void BKE_gpencil_stroke_update_geometry_from_editcurve(struct bGPDstroke *gps,
|
void BKE_gpencil_stroke_update_geometry_from_editcurve(struct bGPDstroke *gps,
|
||||||
const uint resolution,
|
uint resolution,
|
||||||
const bool is_adaptive);
|
bool is_adaptive);
|
||||||
/**
|
/**
|
||||||
* Recalculate the handles of the edit curve of a grease pencil stroke.
|
* 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_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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -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
|
* \return True if it was possible to calculate
|
||||||
*/
|
*/
|
||||||
bool BKE_gpencil_stroke_minmax(const struct bGPDstroke *gps,
|
bool BKE_gpencil_stroke_minmax(const struct bGPDstroke *gps,
|
||||||
const bool use_select,
|
bool use_select,
|
||||||
float r_min[3],
|
float r_min[3],
|
||||||
float r_max[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,
|
void BKE_gpencil_stroke_merge_distance(struct bGPdata *gpd,
|
||||||
struct bGPDframe *gpf,
|
struct bGPDframe *gpf,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
const float threshold,
|
float threshold,
|
||||||
const bool use_unselected);
|
bool use_unselected);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get points of stroke always flat to view not affected
|
* 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,
|
const struct bGPDspoint *points,
|
||||||
int totpoints,
|
int totpoints,
|
||||||
float (*points2d)[2],
|
float (*points2d)[2],
|
||||||
const float scale,
|
float scale,
|
||||||
int *r_direction);
|
int *r_direction);
|
||||||
/**
|
/**
|
||||||
* Triangulate stroke to generate data for filling areas.
|
* 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,
|
bool BKE_gpencil_stroke_sample(struct bGPdata *gpd,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
const float dist,
|
float dist,
|
||||||
const bool select);
|
bool select);
|
||||||
/**
|
/**
|
||||||
* Apply smooth position to stroke point.
|
* Apply smooth position to stroke point.
|
||||||
* \param gps: Stroke to smooth
|
* \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 inf: Amount of smoothing to apply
|
||||||
* \param smooth_caps: Apply smooth to stroke extremes
|
* \param smooth_caps: Apply smooth to stroke extremes
|
||||||
*/
|
*/
|
||||||
bool BKE_gpencil_stroke_smooth_point(struct bGPDstroke *gps,
|
bool BKE_gpencil_stroke_smooth_point(struct bGPDstroke *gps, int i, float inf, bool smooth_caps);
|
||||||
int i,
|
|
||||||
float inf,
|
|
||||||
const bool smooth_caps);
|
|
||||||
/**
|
/**
|
||||||
* Apply smooth strength to stroke point.
|
* Apply smooth strength to stroke point.
|
||||||
* \param gps: Stroke to smooth
|
* \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,
|
void BKE_gpencil_dissolve_points(struct bGPdata *gpd,
|
||||||
struct bGPDframe *gpf,
|
struct bGPDframe *gpf,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
const short tag);
|
short tag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Backbone stretch similar to Freestyle.
|
* 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.
|
* \param extra_point_count: When follow_curvature is true, use this amount of extra points.
|
||||||
*/
|
*/
|
||||||
bool BKE_gpencil_stroke_stretch(struct bGPDstroke *gps,
|
bool BKE_gpencil_stroke_stretch(struct bGPDstroke *gps,
|
||||||
const float dist,
|
float dist,
|
||||||
const float overshoot_fac,
|
float overshoot_fac,
|
||||||
const short mode,
|
short mode,
|
||||||
const bool follow_curvature,
|
bool follow_curvature,
|
||||||
const int extra_point_count,
|
int extra_point_count,
|
||||||
const float segment_influence,
|
float segment_influence,
|
||||||
const float max_angle,
|
float max_angle,
|
||||||
const bool invert_curvature);
|
bool invert_curvature);
|
||||||
/**
|
/**
|
||||||
* Trim stroke to needed segments.
|
* Trim stroke to needed segments.
|
||||||
* \param gps: Target stroke.
|
* \param gps: Target stroke.
|
||||||
* \param index_from: the index of the first point to be used in the trimmed result.
|
* \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.
|
* \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,
|
bool BKE_gpencil_stroke_trim_points(struct bGPDstroke *gps, int index_from, int index_to);
|
||||||
const int index_from,
|
|
||||||
const int index_to);
|
|
||||||
/**
|
/**
|
||||||
* Split the given stroke into several new strokes, partitioning
|
* Split the given stroke into several new strokes, partitioning
|
||||||
* it based on whether the stroke points have a particular flag
|
* 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 *gps,
|
||||||
struct bGPDstroke *next_stroke,
|
struct bGPDstroke *next_stroke,
|
||||||
int tag_flags,
|
int tag_flags,
|
||||||
const bool select,
|
bool select,
|
||||||
const bool flat_cap,
|
bool flat_cap,
|
||||||
const int limit);
|
int limit);
|
||||||
void BKE_gpencil_curve_delete_tagged_points(struct bGPdata *gpd,
|
void BKE_gpencil_curve_delete_tagged_points(struct bGPdata *gpd,
|
||||||
struct bGPDframe *gpf,
|
struct bGPDframe *gpf,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
@@ -341,7 +336,7 @@ void BKE_gpencil_stroke_flip(struct bGPDstroke *gps);
|
|||||||
bool BKE_gpencil_stroke_split(struct bGPdata *gpd,
|
bool BKE_gpencil_stroke_split(struct bGPdata *gpd,
|
||||||
struct bGPDframe *gpf,
|
struct bGPDframe *gpf,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
const int before_index,
|
int before_index,
|
||||||
struct bGPDstroke **remaining_gps);
|
struct bGPDstroke **remaining_gps);
|
||||||
/**
|
/**
|
||||||
* Shrink the stroke by length.
|
* Shrink the stroke by length.
|
||||||
@@ -349,7 +344,7 @@ bool BKE_gpencil_stroke_split(struct bGPdata *gpd,
|
|||||||
* \param dist: delta length
|
* \param dist: delta length
|
||||||
* \param mode: 1->Start, 2->End
|
* \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.
|
* 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);
|
float BKE_gpencil_stroke_length(const struct bGPDstroke *gps, bool use_3d);
|
||||||
/** Calculate grease pencil stroke length between points. */
|
/** Calculate grease pencil stroke length between points. */
|
||||||
float BKE_gpencil_stroke_segment_length(const struct bGPDstroke *gps,
|
float BKE_gpencil_stroke_segment_length(const struct bGPDstroke *gps,
|
||||||
const int start_index,
|
int start_index,
|
||||||
const int end_index,
|
int end_index,
|
||||||
bool use_3d);
|
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,
|
void BKE_gpencil_stroke_join(struct bGPDstroke *gps_a,
|
||||||
struct bGPDstroke *gps_b,
|
struct bGPDstroke *gps_b,
|
||||||
const bool leave_gaps,
|
bool leave_gaps,
|
||||||
const bool fit_thickness,
|
bool fit_thickness,
|
||||||
const bool smooth);
|
bool smooth);
|
||||||
/**
|
/**
|
||||||
* Copy the stroke of the frame to all frames selected (except current).
|
* 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 bGPDlayer *gpl,
|
||||||
struct bGPDframe *gpf,
|
struct bGPDframe *gpf,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
const bool tail);
|
bool tail);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a mesh object to grease pencil stroke.
|
* Convert a mesh object to grease pencil stroke.
|
||||||
@@ -408,14 +403,14 @@ bool BKE_gpencil_convert_mesh(struct Main *bmain,
|
|||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob_gp,
|
struct Object *ob_gp,
|
||||||
struct Object *ob_mesh,
|
struct Object *ob_mesh,
|
||||||
const float angle,
|
float angle,
|
||||||
const int thickness,
|
int thickness,
|
||||||
const float offset,
|
float offset,
|
||||||
const float matrix[4][4],
|
const float matrix[4][4],
|
||||||
const int frame_offset,
|
int frame_offset,
|
||||||
const bool use_seams,
|
bool use_seams,
|
||||||
const bool use_faces,
|
bool use_faces,
|
||||||
const bool use_vgroups);
|
bool use_vgroups);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subdivide the grease pencil stroke so the number of points is target_number.
|
* 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,
|
void BKE_gpencil_stroke_uniform_subdivide(struct bGPdata *gpd,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
const uint32_t target_number,
|
uint32_t target_number,
|
||||||
const bool select);
|
bool select);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stroke to view space
|
* Stroke to view space
|
||||||
@@ -458,7 +453,7 @@ struct bGPDstroke *BKE_gpencil_stroke_perimeter_from_view(struct RegionView3D *r
|
|||||||
struct bGPdata *gpd,
|
struct bGPdata *gpd,
|
||||||
const struct bGPDlayer *gpl,
|
const struct bGPDlayer *gpl,
|
||||||
struct bGPDstroke *gps,
|
struct bGPDstroke *gps,
|
||||||
const int subdivisions,
|
int subdivisions,
|
||||||
const float diff_mat[4][4]);
|
const float diff_mat[4][4]);
|
||||||
/**
|
/**
|
||||||
* Get average pressure.
|
* Get average pressure.
|
||||||
|
@@ -207,7 +207,7 @@ typedef struct GpencilModifierTypeInfo {
|
|||||||
*/
|
*/
|
||||||
void (*updateDepsgraph)(struct GpencilModifierData *md,
|
void (*updateDepsgraph)(struct GpencilModifierData *md,
|
||||||
const struct ModifierUpdateDepsgraphContext *ctx,
|
const struct ModifierUpdateDepsgraphContext *ctx,
|
||||||
const int mode);
|
int mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should return true if the modifier needs to be recalculated on time
|
* 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 md: Modifier data.
|
||||||
* \param flag: Flags.
|
* \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
|
* Free grease pencil modifier data
|
||||||
* \param md: 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,
|
void BKE_gpencil_modifier_copydata_ex(struct GpencilModifierData *md,
|
||||||
struct GpencilModifierData *target,
|
struct GpencilModifierData *target,
|
||||||
const int flag);
|
int flag);
|
||||||
/**
|
/**
|
||||||
* Set grease pencil modifier error.
|
* Set grease pencil modifier error.
|
||||||
* \param md: Modifier data.
|
* \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,
|
void BKE_gpencil_set_lineart_modifier_limits(struct GpencilModifierData *md,
|
||||||
const struct GpencilLineartLimitInfo *info,
|
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,
|
bool BKE_gpencil_is_first_lineart_in_stack(const struct Object *ob,
|
||||||
const struct GpencilModifierData *md);
|
const struct GpencilModifierData *md);
|
||||||
|
|
||||||
@@ -457,8 +457,8 @@ int BKE_gpencil_time_modifier_cfra(struct Depsgraph *depsgraph,
|
|||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct bGPDlayer *gpl,
|
struct bGPDlayer *gpl,
|
||||||
const int cfra,
|
int cfra,
|
||||||
const bool is_render);
|
bool is_render);
|
||||||
|
|
||||||
void BKE_gpencil_modifier_blend_write(struct BlendWriter *writer, struct ListBase *modbase);
|
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);
|
void BKE_gpencil_modifier_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb);
|
||||||
|
@@ -123,13 +123,13 @@ struct ImBuf *BKE_icon_imbuf_get_buffer(int icon_id) ATTR_WARN_UNUSED_RESULT;
|
|||||||
/**
|
/**
|
||||||
* Retrieve icon for id.
|
* 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.
|
* Set icon for id if not already defined.
|
||||||
* Used for inserting the internal icons.
|
* 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.
|
* 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.
|
* Remove icon and free data.
|
||||||
*/
|
*/
|
||||||
bool BKE_icon_delete(const int icon_id);
|
bool BKE_icon_delete(int icon_id);
|
||||||
bool BKE_icon_delete_unmanaged(const int icon_id);
|
bool BKE_icon_delete_unmanaged(int icon_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report changes - icon needs to be recalculated.
|
* 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.
|
* 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.
|
* Handle deferred (lazy) loading/generation of preview image, if needed.
|
||||||
* For now, only used with file thumbnails.
|
* 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.
|
* 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()).
|
* \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);
|
void BKE_previewimg_finish(struct PreviewImage *prv, int size);
|
||||||
bool BKE_previewimg_is_finished(const struct PreviewImage *prv, const int size);
|
bool BKE_previewimg_is_finished(const struct PreviewImage *prv, int size);
|
||||||
|
|
||||||
struct PreviewImage *BKE_previewimg_cached_get(const char *name);
|
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,
|
struct PreviewImage *BKE_previewimg_cached_thumbnail_read(const char *name,
|
||||||
const char *path,
|
const char *path,
|
||||||
const int source,
|
int source,
|
||||||
bool force_update);
|
bool force_update);
|
||||||
|
|
||||||
void BKE_previewimg_cached_release(const char *name);
|
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 Icon_Geom *BKE_icon_geom_from_file(const char *filename);
|
||||||
|
|
||||||
struct ImBuf *BKE_icon_geom_rasterize(const struct Icon_Geom *geom,
|
struct ImBuf *BKE_icon_geom_rasterize(const struct Icon_Geom *geom,
|
||||||
const unsigned int size_x,
|
unsigned int size_x,
|
||||||
const unsigned int size_y);
|
unsigned int size_y);
|
||||||
void BKE_icon_geom_invert_lightness(struct Icon_Geom *geom);
|
void BKE_icon_geom_invert_lightness(struct Icon_Geom *geom);
|
||||||
|
|
||||||
int BKE_icon_ensure_studio_light(struct StudioLight *sl, int id_type);
|
int BKE_icon_ensure_studio_light(struct StudioLight *sl, int id_type);
|
||||||
|
@@ -62,7 +62,7 @@ typedef union IDPropertyTemplate {
|
|||||||
*/
|
*/
|
||||||
struct IDProperty *IDP_NewIDPArray(const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
struct IDProperty *IDP_NewIDPArray(const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||||
struct IDProperty *IDP_CopyIDPArray(const struct IDProperty *array,
|
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.
|
* Shallow copies item.
|
||||||
@@ -102,7 +102,7 @@ void IDP_FreeString(struct IDProperty *prop) ATTR_NONNULL();
|
|||||||
|
|
||||||
typedef void (*IDPWalkFunc)(void *userData, struct IDProperty *idp);
|
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 -------*/
|
/*-------- Group Functions -------*/
|
||||||
|
|
||||||
@@ -113,9 +113,8 @@ void IDP_AssignID(struct IDProperty *prop, struct ID *id, const int flag);
|
|||||||
* \note Use for syncing proxies.
|
* \note Use for syncing proxies.
|
||||||
*/
|
*/
|
||||||
void IDP_SyncGroupValues(struct IDProperty *dest, const struct IDProperty *src) ATTR_NONNULL();
|
void IDP_SyncGroupValues(struct IDProperty *dest, const struct IDProperty *src) ATTR_NONNULL();
|
||||||
void IDP_SyncGroupTypes(struct IDProperty *dest,
|
void IDP_SyncGroupTypes(struct IDProperty *dest, const struct IDProperty *src, bool do_arraylen)
|
||||||
const struct IDProperty *src,
|
ATTR_NONNULL();
|
||||||
const bool do_arraylen) ATTR_NONNULL();
|
|
||||||
/**
|
/**
|
||||||
* Replaces all properties with the same name in a destination group from a source group.
|
* 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.
|
* If a property is missing in \a dest, add it.
|
||||||
* Do it recursively.
|
* 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();
|
ATTR_NONNULL();
|
||||||
/**
|
/**
|
||||||
* If a property is missing in \a dest, add it.
|
* 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,
|
void IDP_MergeGroup_ex(struct IDProperty *dest,
|
||||||
const struct IDProperty *src,
|
const struct IDProperty *src,
|
||||||
const bool do_overwrite,
|
bool do_overwrite,
|
||||||
const int flag) ATTR_NONNULL();
|
int flag) ATTR_NONNULL();
|
||||||
/**
|
/**
|
||||||
* This function has a sanity check to make sure ID properties with the same name don't
|
* This function has a sanity check to make sure ID properties with the same name don't
|
||||||
* get added to the group.
|
* 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,
|
struct IDProperty *IDP_GetPropertyTypeFromGroup(const struct IDProperty *prop,
|
||||||
const char *name,
|
const char *name,
|
||||||
const char type) ATTR_WARN_UNUSED_RESULT
|
char type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||||
ATTR_NONNULL();
|
|
||||||
|
|
||||||
/*-------- Main Functions --------*/
|
/*-------- 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
|
* \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.
|
* exist; otherwise the function will return NULL if there's no Group property attached to the ID.
|
||||||
*/
|
*/
|
||||||
struct IDProperty *IDP_GetProperties(struct ID *id,
|
struct IDProperty *IDP_GetProperties(struct ID *id, bool create_if_needed) ATTR_WARN_UNUSED_RESULT
|
||||||
const bool create_if_needed) ATTR_WARN_UNUSED_RESULT
|
|
||||||
ATTR_NONNULL();
|
ATTR_NONNULL();
|
||||||
struct IDProperty *IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT
|
struct IDProperty *IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT
|
||||||
ATTR_NONNULL();
|
ATTR_NONNULL();
|
||||||
struct IDProperty *IDP_CopyProperty_ex(const struct IDProperty *prop,
|
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,
|
* Copy content from source #IDProperty into destination one,
|
||||||
* freeing destination property's content first.
|
* 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,
|
bool IDP_EqualsProperties_ex(struct IDProperty *prop1,
|
||||||
struct IDProperty *prop2,
|
struct IDProperty *prop2,
|
||||||
const bool is_strict) ATTR_WARN_UNUSED_RESULT;
|
bool is_strict) ATTR_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
bool IDP_EqualsProperties(struct IDProperty *prop1,
|
bool IDP_EqualsProperties(struct IDProperty *prop1,
|
||||||
struct IDProperty *prop2) ATTR_WARN_UNUSED_RESULT;
|
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
|
* IDP_AddToGroup or MEM_freeN the property, doing anything else might result in
|
||||||
* a memory leak.
|
* a memory leak.
|
||||||
*/
|
*/
|
||||||
struct IDProperty *IDP_New(const char type,
|
struct IDProperty *IDP_New(char type,
|
||||||
const IDPropertyTemplate *val,
|
const IDPropertyTemplate *val,
|
||||||
const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
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!
|
* \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.
|
* 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_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_FreeProperty(struct IDProperty *prop);
|
||||||
|
|
||||||
void IDP_ClearProperty(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.
|
* IDP_TYPE_FILTER_ enum in DNA_ID.h.
|
||||||
*/
|
*/
|
||||||
void IDP_foreach_property(struct IDProperty *id_property_root,
|
void IDP_foreach_property(struct IDProperty *id_property_root,
|
||||||
const int type_filter,
|
int type_filter,
|
||||||
IDPForeachPropertyCallback callback,
|
IDPForeachPropertyCallback callback,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
|
@@ -78,12 +78,12 @@ typedef void (*IDTypeInitDataFunction)(struct ID *id);
|
|||||||
typedef void (*IDTypeCopyDataFunction)(struct Main *bmain,
|
typedef void (*IDTypeCopyDataFunction)(struct Main *bmain,
|
||||||
struct ID *id_dst,
|
struct ID *id_dst,
|
||||||
const struct ID *id_src,
|
const struct ID *id_src,
|
||||||
const int flag);
|
int flag);
|
||||||
|
|
||||||
typedef void (*IDTypeFreeDataFunction)(struct ID *id);
|
typedef void (*IDTypeFreeDataFunction)(struct ID *id);
|
||||||
|
|
||||||
/** \param flags: See BKE_lib_id.h's LIB_ID_MAKELOCAL_... flags. */
|
/** \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);
|
typedef void (*IDTypeForeachIDFunction)(struct ID *id, struct LibraryForeachIDData *data);
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ extern IDTypeInfo IDType_ID_LINK_PLACEHOLDER;
|
|||||||
void BKE_idtype_init(void);
|
void BKE_idtype_init(void);
|
||||||
|
|
||||||
/* General helpers. */
|
/* 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);
|
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.
|
* \param idcode: The code to convert.
|
||||||
* \return A static string representing the name of the code.
|
* \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).
|
* Convert an \a idcode into a name (plural).
|
||||||
*
|
*
|
||||||
* \param idcode: The code to convert.
|
* \param idcode: The code to convert.
|
||||||
* \return A static string representing the name of the code.
|
* \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.
|
* Convert an \a idcode into its translations' context.
|
||||||
*
|
*
|
||||||
* \param idcode: The code to convert.
|
* \param idcode: The code to convert.
|
||||||
* \return A static string representing the i18n context of the code.
|
* \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.
|
* 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.
|
* \param idcode: The code to check.
|
||||||
* \return Boolean, 0 when invalid.
|
* \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.
|
* 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.
|
* \param idcode: The IDType code to check.
|
||||||
* \return Boolean, false when non linkable, true otherwise.
|
* \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.
|
* Check if an ID type is only appendable.
|
||||||
*
|
*
|
||||||
* \param idcode: The IDType code to check.
|
* \param idcode: The IDType code to check.
|
||||||
* \return Boolean, false when also linkable, true when only appendable.
|
* \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.
|
* 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.
|
* \param idcode: The IDType code to check.
|
||||||
* \return Boolean, false when it cannot be re-used, true otherwise.
|
* \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. */
|
/* Macro currently, since any linkable IDtype should be localizable. */
|
||||||
#define BKE_idtype_idcode_is_localizable BKE_idtype_idcode_is_linkable
|
#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).
|
* 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).
|
* 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).
|
* 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).
|
* 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.
|
* Return an ID code and steps the index forward 1.
|
||||||
|
@@ -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,
|
int BKE_imbuf_write_as(struct ImBuf *ibuf,
|
||||||
const char *name,
|
const char *name,
|
||||||
struct ImageFormatData *imf,
|
struct ImageFormatData *imf,
|
||||||
const bool save_copy);
|
bool save_copy);
|
||||||
void BKE_image_path_from_imformat(char *string,
|
void BKE_image_path_from_imformat(char *string,
|
||||||
const char *base,
|
const char *base,
|
||||||
const char *relbase,
|
const char *relbase,
|
||||||
int frame,
|
int frame,
|
||||||
const struct ImageFormatData *im_format,
|
const struct ImageFormatData *im_format,
|
||||||
const bool use_ext,
|
bool use_ext,
|
||||||
const bool use_frames,
|
bool use_frames,
|
||||||
const char *suffix);
|
const char *suffix);
|
||||||
void BKE_image_path_from_imtype(char *string,
|
void BKE_image_path_from_imtype(char *string,
|
||||||
const char *base,
|
const char *base,
|
||||||
const char *relbase,
|
const char *relbase,
|
||||||
int frame,
|
int frame,
|
||||||
const char imtype,
|
char imtype,
|
||||||
const bool use_ext,
|
bool use_ext,
|
||||||
const bool use_frames,
|
bool use_frames,
|
||||||
const char *suffix);
|
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_imformat(char *string, const struct ImageFormatData *im_format);
|
||||||
int BKE_image_path_ensure_ext_from_imtype(char *string, const char imtype);
|
int BKE_image_path_ensure_ext_from_imtype(char *string, char imtype);
|
||||||
char BKE_image_ftype_to_imtype(const int ftype, const struct ImbFormatOptions *options);
|
char BKE_image_ftype_to_imtype(int ftype, const struct ImbFormatOptions *options);
|
||||||
int BKE_image_imtype_to_ftype(const char imtype, struct ImbFormatOptions *r_options);
|
int BKE_image_imtype_to_ftype(char imtype, struct ImbFormatOptions *r_options);
|
||||||
|
|
||||||
bool BKE_imtype_is_movie(const char imtype);
|
bool BKE_imtype_is_movie(char imtype);
|
||||||
bool BKE_imtype_supports_zbuf(const char imtype);
|
bool BKE_imtype_supports_zbuf(char imtype);
|
||||||
bool BKE_imtype_supports_compress(const char imtype);
|
bool BKE_imtype_supports_compress(char imtype);
|
||||||
bool BKE_imtype_supports_quality(const char imtype);
|
bool BKE_imtype_supports_quality(char imtype);
|
||||||
bool BKE_imtype_requires_linear_float(const char imtype);
|
bool BKE_imtype_requires_linear_float(char imtype);
|
||||||
char BKE_imtype_valid_channels(const char imtype, bool write_file);
|
char BKE_imtype_valid_channels(char imtype, bool write_file);
|
||||||
char BKE_imtype_valid_depths(const char imtype);
|
char BKE_imtype_valid_depths(char imtype);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* String is from command line `--render-format` argument,
|
* String is from command line `--render-format` argument,
|
||||||
@@ -241,9 +241,9 @@ struct Image *BKE_image_add_generated(struct Main *bmain,
|
|||||||
int floatbuf,
|
int floatbuf,
|
||||||
short gen_type,
|
short gen_type,
|
||||||
const float color[4],
|
const float color[4],
|
||||||
const bool stereo3d,
|
bool stereo3d,
|
||||||
const bool is_data,
|
bool is_data,
|
||||||
const bool tiled);
|
bool tiled);
|
||||||
/**
|
/**
|
||||||
* Create an image from ibuf. The reference-count of ibuf is increased,
|
* 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.
|
* 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,
|
bool BKE_image_save_openexr_multiview(struct Image *ima,
|
||||||
struct ImBuf *ibuf,
|
struct ImBuf *ibuf,
|
||||||
const char *filepath,
|
const char *filepath,
|
||||||
const int flags);
|
int flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Goes over all textures that use images.
|
* Goes over all textures that use images.
|
||||||
|
@@ -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).
|
* \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);
|
int BKE_keyblock_element_count(const struct Key *key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \param shape_index: The index to use or all (when -1).
|
* \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);
|
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_p(struct ID *id);
|
||||||
struct Key *BKE_key_from_id(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 name: Optional name for the new keyblock.
|
||||||
* \param do_force: always use ctime even for relative keys.
|
* \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.
|
* 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.
|
* 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
|
/** \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).
|
* \param shape_index: The index to use or all (when -1).
|
||||||
*/
|
*/
|
||||||
void BKE_keyblock_data_get_from_shape(const struct Key *key,
|
void BKE_keyblock_data_get_from_shape(const struct Key *key, float (*arr)[3], int shape_index);
|
||||||
float (*arr)[3],
|
|
||||||
const int shape_index);
|
|
||||||
void BKE_keyblock_data_get(const struct Key *key, float (*arr)[3]);
|
void BKE_keyblock_data_get(const struct Key *key, float (*arr)[3]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the data to all key-blocks (or shape_index if != -1).
|
* Set the data to all key-blocks (or shape_index if != -1).
|
||||||
*/
|
*/
|
||||||
void BKE_keyblock_data_set_with_mat4(struct Key *key,
|
void BKE_keyblock_data_set_with_mat4(struct Key *key,
|
||||||
const int shape_index,
|
int shape_index,
|
||||||
const float (*coords)[3],
|
const float (*coords)[3],
|
||||||
const float mat[4][4]);
|
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,
|
void BKE_keyblock_curve_data_set_with_mat4(struct Key *key,
|
||||||
const struct ListBase *nurb,
|
const struct ListBase *nurb,
|
||||||
const int shape_index,
|
int shape_index,
|
||||||
const void *data,
|
const void *data,
|
||||||
const float mat[4][4]);
|
const float mat[4][4]);
|
||||||
/**
|
/**
|
||||||
* Set the data for all key-blocks (or shape_index if != -1).
|
* 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);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
|
@@ -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);
|
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);
|
int BKE_lattice_index_from_uvw(struct Lattice *lt, int u, int v, int w);
|
||||||
void BKE_lattice_index_to_uvw(struct Lattice *lt, const int index, int *r_u, int *r_v, int *r_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(
|
int BKE_lattice_index_flip(struct Lattice *lt, int index, bool flip_u, bool flip_v, bool flip_w);
|
||||||
struct Lattice *lt, const int index, const bool flip_u, const bool flip_v, const bool flip_w);
|
void BKE_lattice_bitmap_from_flag(
|
||||||
void BKE_lattice_bitmap_from_flag(struct Lattice *lt,
|
struct Lattice *lt, unsigned int *bitmap, uint8_t flag, bool clear, bool respecthide);
|
||||||
unsigned int *bitmap,
|
|
||||||
const uint8_t flag,
|
|
||||||
const bool clear,
|
|
||||||
const bool respecthide);
|
|
||||||
|
|
||||||
/* **** Depsgraph evaluation **** */
|
/* **** 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,
|
void BKE_lattice_deform_coords(const struct Object *ob_lattice,
|
||||||
const struct Object *ob_target,
|
const struct Object *ob_target,
|
||||||
float (*vert_coords)[3],
|
float (*vert_coords)[3],
|
||||||
const int vert_coords_len,
|
int vert_coords_len,
|
||||||
const short flag,
|
short flag,
|
||||||
const char *defgrp_name,
|
const char *defgrp_name,
|
||||||
float fac);
|
float fac);
|
||||||
|
|
||||||
void BKE_lattice_deform_coords_with_mesh(const struct Object *ob_lattice,
|
void BKE_lattice_deform_coords_with_mesh(const struct Object *ob_lattice,
|
||||||
const struct Object *ob_target,
|
const struct Object *ob_target,
|
||||||
float (*vert_coords)[3],
|
float (*vert_coords)[3],
|
||||||
const int vert_coords_len,
|
int vert_coords_len,
|
||||||
const short flag,
|
short flag,
|
||||||
const char *defgrp_name,
|
const char *defgrp_name,
|
||||||
const float fac,
|
float fac,
|
||||||
const struct Mesh *me_target);
|
const struct Mesh *me_target);
|
||||||
|
|
||||||
void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice,
|
void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice,
|
||||||
const struct Object *ob_target,
|
const struct Object *ob_target,
|
||||||
float (*vert_coords)[3],
|
float (*vert_coords)[3],
|
||||||
const int vert_coords_len,
|
int vert_coords_len,
|
||||||
const short flag,
|
short flag,
|
||||||
const char *defgrp_name,
|
const char *defgrp_name,
|
||||||
const float fac,
|
float fac,
|
||||||
struct BMEditMesh *em_target);
|
struct BMEditMesh *em_target);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
@@ -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,
|
struct ViewLayer *BKE_view_layer_add(struct Scene *scene,
|
||||||
const char *name,
|
const char *name,
|
||||||
struct ViewLayer *view_layer_source,
|
struct ViewLayer *view_layer_source,
|
||||||
const int type);
|
int type);
|
||||||
|
|
||||||
/* DEPRECATED */
|
/* DEPRECATED */
|
||||||
/**
|
/**
|
||||||
@@ -85,12 +85,12 @@ void BKE_view_layer_free(struct ViewLayer *view_layer);
|
|||||||
/**
|
/**
|
||||||
* Free (or release) any data used by this #ViewLayer.
|
* 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.
|
* 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.
|
* 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,
|
const struct Scene *scene_src,
|
||||||
struct ViewLayer *view_layer_dst,
|
struct ViewLayer *view_layer_dst,
|
||||||
const struct ViewLayer *view_layer_src,
|
const struct ViewLayer *view_layer_src,
|
||||||
const int flag);
|
int flag);
|
||||||
|
|
||||||
void BKE_view_layer_rename(struct Main *bmain,
|
void BKE_view_layer_rename(struct Main *bmain,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
@@ -148,8 +148,7 @@ int BKE_layer_collection_count(const struct ViewLayer *view_layer);
|
|||||||
/**
|
/**
|
||||||
* Get the collection for a given index.
|
* Get the collection for a given index.
|
||||||
*/
|
*/
|
||||||
struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *view_layer,
|
struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *view_layer, int index);
|
||||||
const int index);
|
|
||||||
/**
|
/**
|
||||||
* \return -1 if not found.
|
* \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,
|
void BKE_layer_collection_set_visible(struct ViewLayer *view_layer,
|
||||||
struct LayerCollection *lc,
|
struct LayerCollection *lc,
|
||||||
const bool visible,
|
bool visible,
|
||||||
const bool hierarchy);
|
bool hierarchy);
|
||||||
void BKE_layer_collection_set_flag(struct LayerCollection *lc, const int flag, const bool value);
|
void BKE_layer_collection_set_flag(struct LayerCollection *lc, int flag, bool value);
|
||||||
|
|
||||||
/* Evaluation. */
|
/* Evaluation. */
|
||||||
|
|
||||||
|
@@ -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
|
* The user count is set to 1, all other content (apart from name and links) being
|
||||||
* initialized to zero.
|
* 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;
|
ATTR_WARN_UNUSED_RESULT;
|
||||||
/**
|
/**
|
||||||
* Initialize an ID of given type, such that it has valid 'empty' data.
|
* 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.
|
* \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,
|
* Generic helper to create a new temporary empty data-block of given type,
|
||||||
* *outside* of any Main database.
|
* *outside* of any Main database.
|
||||||
*
|
*
|
||||||
* \param name: can be NULL, in which case we get default name for this ID type.
|
* \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.
|
* New ID creation/copying options.
|
||||||
@@ -202,7 +202,7 @@ enum {
|
|||||||
void BKE_libblock_copy_ex(struct Main *bmain,
|
void BKE_libblock_copy_ex(struct Main *bmain,
|
||||||
const struct ID *id,
|
const struct ID *id,
|
||||||
struct ID **r_newid,
|
struct ID **r_newid,
|
||||||
const int orig_flag);
|
int orig_flag);
|
||||||
/**
|
/**
|
||||||
* Used everywhere in blenkernel.
|
* 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();
|
void BLI_libblock_ensure_unique_name(struct Main *bmain, const char *name) ATTR_NONNULL();
|
||||||
|
|
||||||
struct ID *BKE_libblock_find_name(struct Main *bmain,
|
struct ID *BKE_libblock_find_name(struct Main *bmain,
|
||||||
const short type,
|
short type,
|
||||||
const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
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);
|
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,
|
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_datablock(struct ID *id, int flag) ATTR_NONNULL();
|
||||||
void BKE_libblock_free_data(struct ID *id, const bool do_id_user) 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
|
* 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,
|
* \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.
|
* 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).
|
* 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.
|
* 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.
|
* 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.
|
* it needs specific handling.
|
||||||
* \return true is the ID has successfully been made local.
|
* \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.
|
* \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).
|
* (leave to zero for default, full copy).
|
||||||
* \return NULL when copying that ID type is not supported, the new copy otherwise.
|
* \return NULL when copying that ID type is not supported, the new copy otherwise.
|
||||||
*/
|
*/
|
||||||
struct ID *BKE_id_copy_ex(struct Main *bmain,
|
struct ID *BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, int flag);
|
||||||
const struct ID *id,
|
|
||||||
struct ID **r_newid,
|
|
||||||
const int flag);
|
|
||||||
/**
|
/**
|
||||||
* Invokes the appropriate copy method for the block and returns the result in
|
* Invokes the appropriate copy method for the block and returns the result in
|
||||||
* newid, unless test. Returns true if the block can be copied.
|
* newid, unless test. Returns true if the block can be copied.
|
||||||
*/
|
*/
|
||||||
struct ID *BKE_id_copy_for_duplicate(struct Main *bmain,
|
struct ID *BKE_id_copy_for_duplicate(struct Main *bmain,
|
||||||
struct ID *id,
|
struct ID *id,
|
||||||
const uint duplicate_flags,
|
uint duplicate_flags,
|
||||||
const int copy_flags);
|
int copy_flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does a mere memory swap over the whole IDs data (including type-specific memory).
|
* 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.
|
* Expand ID usages of given id as 'extern' (and no more indirect) linked data.
|
||||||
* Used by ID copy/make_local functions.
|
* 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.
|
* 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,
|
bool BKE_id_new_name_validate(struct ListBase *lb,
|
||||||
struct ID *id,
|
struct ID *id,
|
||||||
const char *name,
|
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
|
* Pull an ID out of a library (make it local). Only call this for IDs that
|
||||||
* don't have other library users.
|
* don't have other library users.
|
||||||
*
|
*
|
||||||
* \param flags: Same set of `LIB_ID_MAKELOCAL_` flags as passed to #BKE_lib_id_make_local.
|
* \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).
|
* Clear or set given tags for all ids of given type in `bmain` (runtime tags).
|
||||||
*
|
*
|
||||||
* \note Affect whole Main database.
|
* \note Affect whole Main database.
|
||||||
*/
|
*/
|
||||||
void BKE_main_id_tag_idcode(struct Main *mainvar,
|
void BKE_main_id_tag_idcode(struct Main *mainvar, short type, int tag, bool value);
|
||||||
const short type,
|
|
||||||
const int tag,
|
|
||||||
const bool value);
|
|
||||||
/**
|
/**
|
||||||
* Clear or set given tags for all ids in listbase (runtime tags).
|
* 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).
|
* 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).
|
* 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).
|
* 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`.
|
* 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_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);
|
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],
|
void BKE_id_full_name_ui_prefix_get(char name[MAX_ID_FULL_NAME_UI],
|
||||||
const struct ID *id,
|
const struct ID *id,
|
||||||
const bool add_lib_hint,
|
bool add_lib_hint,
|
||||||
char separator_char,
|
char separator_char,
|
||||||
int *r_prefix_len);
|
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,
|
void BKE_library_make_local(struct Main *bmain,
|
||||||
const struct Library *lib,
|
const struct Library *lib,
|
||||||
struct GHash *old_to_new_ids,
|
struct GHash *old_to_new_ids,
|
||||||
const bool untagged_only,
|
bool untagged_only,
|
||||||
const bool set_fake);
|
bool set_fake);
|
||||||
|
|
||||||
void BKE_id_tag_set_atomic(struct ID *id, int tag);
|
void BKE_id_tag_set_atomic(struct ID *id, int tag);
|
||||||
void BKE_id_tag_clear_atomic(struct ID *id, int tag);
|
void BKE_id_tag_clear_atomic(struct ID *id, int tag);
|
||||||
|
@@ -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.
|
* 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,
|
void BKE_lib_override_library_copy(struct ID *dst_id, const struct ID *src_id, bool do_full_copy);
|
||||||
const struct ID *src_id,
|
|
||||||
const bool do_full_copy);
|
|
||||||
/**
|
/**
|
||||||
* Clear any overriding data from given \a override.
|
* 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.
|
* 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.
|
* 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 *BKE_lib_override_library_create_from_id(struct Main *bmain,
|
||||||
struct ID *reference_id,
|
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.
|
* 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,
|
bool BKE_lib_override_library_create_from_tag(struct Main *bmain,
|
||||||
const struct Library *reference_library,
|
const struct Library *reference_library,
|
||||||
const bool do_no_main);
|
bool do_no_main);
|
||||||
/**
|
/**
|
||||||
* Advanced 'smart' function to create fully functional overrides.
|
* 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 ViewLayer *view_layer,
|
||||||
struct ID *id_root,
|
struct ID *id_root,
|
||||||
struct Collection *override_resync_residual_storage,
|
struct Collection *override_resync_residual_storage,
|
||||||
const bool do_hierarchy_enforce,
|
bool do_hierarchy_enforce,
|
||||||
const bool do_post_process,
|
bool do_post_process,
|
||||||
struct BlendFileReadReport *reports);
|
struct BlendFileReadReport *reports);
|
||||||
/**
|
/**
|
||||||
* Detect and handle required resync of overrides data, when relations between reference linked IDs
|
* 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,
|
struct IDOverrideLibraryProperty *override_property,
|
||||||
const char *subitem_refname,
|
const char *subitem_refname,
|
||||||
const char *subitem_locname,
|
const char *subitem_locname,
|
||||||
const int subitem_refindex,
|
int subitem_refindex,
|
||||||
const int subitem_locindex,
|
int subitem_locindex,
|
||||||
const bool strict,
|
bool strict,
|
||||||
bool *r_strict);
|
bool *r_strict);
|
||||||
/**
|
/**
|
||||||
* Find override property operation from given sub-item(s), or create it if it does not exist.
|
* 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 IDOverrideLibraryPropertyOperation *BKE_lib_override_library_property_operation_get(
|
||||||
struct IDOverrideLibraryProperty *override_property,
|
struct IDOverrideLibraryProperty *override_property,
|
||||||
const short operation,
|
short operation,
|
||||||
const char *subitem_refname,
|
const char *subitem_refname,
|
||||||
const char *subitem_locname,
|
const char *subitem_locname,
|
||||||
const int subitem_refindex,
|
int subitem_refindex,
|
||||||
const int subitem_locindex,
|
int subitem_locindex,
|
||||||
const bool strict,
|
bool strict,
|
||||||
bool *r_strict,
|
bool *r_strict,
|
||||||
bool *r_created);
|
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.
|
* 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.
|
* 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.
|
* Set or clear given tag in all operations in that override property data.
|
||||||
*/
|
*/
|
||||||
void BKE_lib_override_library_operations_tag(struct IDOverrideLibraryProperty *override_property,
|
void BKE_lib_override_library_operations_tag(struct IDOverrideLibraryProperty *override_property,
|
||||||
const short tag,
|
short tag,
|
||||||
const bool do_set);
|
bool do_set);
|
||||||
/**
|
/**
|
||||||
* Set or clear given tag in all properties and operations in that override data.
|
* Set or clear given tag in all properties and operations in that override data.
|
||||||
*/
|
*/
|
||||||
void BKE_lib_override_library_properties_tag(struct IDOverrideLibrary *override,
|
void BKE_lib_override_library_properties_tag(struct IDOverrideLibrary *override,
|
||||||
const short tag,
|
short tag,
|
||||||
const bool do_set);
|
bool do_set);
|
||||||
/**
|
/**
|
||||||
* Set or clear given tag in all properties and operations in that Main's ID override data.
|
* 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.
|
* Remove all tagged-as-unused properties and operations from that ID override data.
|
||||||
|
@@ -153,8 +153,8 @@ void BKE_lib_query_foreachid_process(struct LibraryForeachIDData *data,
|
|||||||
int cb_flag);
|
int cb_flag);
|
||||||
int BKE_lib_query_foreachid_process_flags_get(struct LibraryForeachIDData *data);
|
int BKE_lib_query_foreachid_process_flags_get(struct LibraryForeachIDData *data);
|
||||||
int BKE_lib_query_foreachid_process_callback_flag_override(struct LibraryForeachIDData *data,
|
int BKE_lib_query_foreachid_process_callback_flag_override(struct LibraryForeachIDData *data,
|
||||||
const int cb_flag,
|
int cb_flag,
|
||||||
const bool do_replace);
|
bool do_replace);
|
||||||
|
|
||||||
#define BKE_LIB_FOREACHID_PROCESS_ID(_data, _id, _cb_flag) \
|
#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.
|
* 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.
|
* 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,
|
* This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above,
|
||||||
* quite useful to reduce useless iterations in some cases.
|
* 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).
|
* 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.
|
* #INDEX_ID_NULL item.
|
||||||
*/
|
*/
|
||||||
void BKE_lib_query_unused_ids_tag(struct Main *bmain,
|
void BKE_lib_query_unused_ids_tag(struct Main *bmain,
|
||||||
const int tag,
|
int tag,
|
||||||
const bool do_local_ids,
|
bool do_local_ids,
|
||||||
const bool do_linked_ids,
|
bool do_linked_ids,
|
||||||
const bool do_tag_recursive,
|
bool do_tag_recursive,
|
||||||
int *r_num_tagged);
|
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,
|
* \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.
|
* 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.
|
* Untag linked data blocks used by other untagged linked data-blocks.
|
||||||
* Used to detect data-blocks that we can forcefully make local
|
* Used to detect data-blocks that we can forcefully make local
|
||||||
|
@@ -104,11 +104,9 @@ enum {
|
|||||||
* \note Requiring new_id to be non-null, this *may* not be the case ultimately,
|
* \note Requiring new_id to be non-null, this *may* not be the case ultimately,
|
||||||
* but makes things simpler for now.
|
* but makes things simpler for now.
|
||||||
*/
|
*/
|
||||||
void BKE_libblock_remap_locked(struct Main *bmain,
|
void BKE_libblock_remap_locked(struct Main *bmain, void *old_idv, void *new_idv, short remap_flags)
|
||||||
void *old_idv,
|
ATTR_NONNULL(1, 2);
|
||||||
void *new_idv,
|
void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, short remap_flags)
|
||||||
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)
|
|
||||||
ATTR_NONNULL(1, 2);
|
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 BKE_libblock_unlink(struct Main *bmain,
|
||||||
void *idv,
|
void *idv,
|
||||||
const bool do_flag_never_null,
|
bool do_flag_never_null,
|
||||||
const bool do_skip_indirect) ATTR_NONNULL();
|
bool do_skip_indirect) ATTR_NONNULL();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Similar to libblock_remap, but only affects IDs used by given \a idv ID.
|
* 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 *idv,
|
||||||
void *old_idv,
|
void *old_idv,
|
||||||
void *new_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
|
* 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,
|
* Very specific usage, not sure we'll keep it on the long run,
|
||||||
* currently only used in Object/Collection duplication code.
|
* 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();
|
ATTR_NONNULL();
|
||||||
|
|
||||||
typedef void (*BKE_library_free_notifier_reference_cb)(const void *);
|
typedef void (*BKE_library_free_notifier_reference_cb)(const void *);
|
||||||
|
@@ -31,7 +31,7 @@ extern "C" {
|
|||||||
struct LightProbe;
|
struct LightProbe;
|
||||||
struct Main;
|
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);
|
void *BKE_lightprobe_add(struct Main *bmain, const char *name);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -60,16 +60,16 @@ LineStyleModifier *BKE_linestyle_geometry_modifier_add(FreestyleLineStyle *lines
|
|||||||
|
|
||||||
LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle,
|
LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linestyle,
|
||||||
const LineStyleModifier *m,
|
const LineStyleModifier *m,
|
||||||
const int flag);
|
int flag);
|
||||||
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle,
|
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle,
|
||||||
const LineStyleModifier *m,
|
const LineStyleModifier *m,
|
||||||
const int flag);
|
int flag);
|
||||||
LineStyleModifier *BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle,
|
LineStyleModifier *BKE_linestyle_thickness_modifier_copy(FreestyleLineStyle *linestyle,
|
||||||
const LineStyleModifier *m,
|
const LineStyleModifier *m,
|
||||||
const int flag);
|
int flag);
|
||||||
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle,
|
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle,
|
||||||
const LineStyleModifier *m,
|
const LineStyleModifier *m,
|
||||||
const int flag);
|
int flag);
|
||||||
|
|
||||||
int BKE_linestyle_color_modifier_remove(FreestyleLineStyle *linestyle,
|
int BKE_linestyle_color_modifier_remove(FreestyleLineStyle *linestyle,
|
||||||
LineStyleModifier *modifier);
|
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,
|
char *BKE_linestyle_path_to_color_ramp(FreestyleLineStyle *linestyle,
|
||||||
struct ColorBand *color_ramp);
|
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);
|
void BKE_linestyle_default_shader(const struct bContext *C, FreestyleLineStyle *linestyle);
|
||||||
|
|
||||||
|
@@ -212,12 +212,10 @@ void BKE_main_lock(struct Main *bmain);
|
|||||||
void BKE_main_unlock(struct Main *bmain);
|
void BKE_main_unlock(struct Main *bmain);
|
||||||
|
|
||||||
/** Generate the mappings between used IDs and their users, and vice-versa. */
|
/** 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);
|
void BKE_main_relations_free(struct Main *bmain);
|
||||||
/** Set or clear given `tag` in all relation entries of given `bmain`. */
|
/** Set or clear given `tag` in all relation entries of given `bmain`. */
|
||||||
void BKE_main_relations_tag_set(struct Main *bmain,
|
void BKE_main_relations_tag_set(struct Main *bmain, eMainIDRelationsEntryTags tag, bool value);
|
||||||
const eMainIDRelationsEntryTags tag,
|
|
||||||
const bool value);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a #GSet storing all IDs present in given \a bmain, by their pointers.
|
* Create a #GSet storing all IDs present in given \a bmain, by their pointers.
|
||||||
|
@@ -56,9 +56,9 @@ enum {
|
|||||||
* \param old_bmain: If not NULL, its IDs will be added the valid references set.
|
* \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,
|
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,
|
struct Main *old_bmain,
|
||||||
const int idmap_types) ATTR_WARN_UNUSED_RESULT
|
int idmap_types) ATTR_WARN_UNUSED_RESULT
|
||||||
ATTR_NONNULL(1);
|
ATTR_NONNULL(1);
|
||||||
void BKE_main_idmap_destroy(struct IDNameLib_Map *id_map) ATTR_NONNULL();
|
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);
|
ATTR_NONNULL(1, 2);
|
||||||
|
|
||||||
struct ID *BKE_main_idmap_lookup_uuid(struct IDNameLib_Map *id_map,
|
struct ID *BKE_main_idmap_lookup_uuid(struct IDNameLib_Map *id_map,
|
||||||
const uint session_uuid) ATTR_WARN_UNUSED_RESULT
|
uint session_uuid) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
|
||||||
ATTR_NONNULL(1);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -115,7 +115,7 @@ float BKE_mask_spline_project_co(struct MaskSpline *spline,
|
|||||||
struct MaskSplinePoint *point,
|
struct MaskSplinePoint *point,
|
||||||
float start_u,
|
float start_u,
|
||||||
const float co[2],
|
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 n[2]);
|
||||||
float BKE_mask_point_weight_scalar(struct MaskSpline *spline,
|
float BKE_mask_point_weight_scalar(struct MaskSpline *spline,
|
||||||
struct MaskSplinePoint *point,
|
struct MaskSplinePoint *point,
|
||||||
const float u);
|
float u);
|
||||||
float BKE_mask_point_weight(struct MaskSpline *spline,
|
float BKE_mask_point_weight(struct MaskSpline *spline, struct MaskSplinePoint *point, float u);
|
||||||
struct MaskSplinePoint *point,
|
|
||||||
const float u);
|
|
||||||
struct MaskSplinePointUW *BKE_mask_point_sort_uw(struct MaskSplinePoint *point,
|
struct MaskSplinePointUW *BKE_mask_point_sort_uw(struct MaskSplinePoint *point,
|
||||||
struct MaskSplinePointUW *uw);
|
struct MaskSplinePointUW *uw);
|
||||||
void BKE_mask_point_add_uw(struct MaskSplinePoint *point, float u, float w);
|
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,
|
void BKE_mask_point_select_set_handle(struct MaskSplinePoint *point,
|
||||||
const eMaskWhichHandle which_handle,
|
eMaskWhichHandle which_handle,
|
||||||
const bool do_select);
|
bool do_select);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
@@ -193,12 +191,12 @@ void BKE_mask_coord_to_image(struct Image *image,
|
|||||||
/** \name Parenting
|
/** \name Parenting
|
||||||
* \{ */
|
* \{ */
|
||||||
|
|
||||||
void BKE_mask_evaluate(struct Mask *mask, 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, const float ctime, const 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_parent_init(struct MaskParent *parent);
|
||||||
void BKE_mask_calc_handle_adjacent_interp(struct MaskSpline *spline,
|
void BKE_mask_calc_handle_adjacent_interp(struct MaskSpline *spline,
|
||||||
struct MaskSplinePoint *point,
|
struct MaskSplinePoint *point,
|
||||||
const float u);
|
float u);
|
||||||
/**
|
/**
|
||||||
* Calculates the tangent of a point by its previous and next
|
* Calculates the tangent of a point by its previous and next
|
||||||
* (ignoring handles - as if its a poly line).
|
* (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,
|
void BKE_mask_calc_handle_point_auto(struct MaskSpline *spline,
|
||||||
struct MaskSplinePoint *point,
|
struct MaskSplinePoint *point,
|
||||||
const bool do_recalc_length);
|
bool do_recalc_length);
|
||||||
void BKE_mask_get_handle_point_adjacent(struct MaskSpline *spline,
|
void BKE_mask_get_handle_point_adjacent(struct MaskSpline *spline,
|
||||||
struct MaskSplinePoint *point,
|
struct MaskSplinePoint *point,
|
||||||
struct MaskSplinePoint **r_point_prev,
|
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,
|
void BKE_mask_layer_shape_to_mask_interp(struct MaskLayer *masklay,
|
||||||
struct MaskLayerShape *masklay_shape_a,
|
struct MaskLayerShape *masklay_shape_a,
|
||||||
struct MaskLayerShape *masklay_shape_b,
|
struct MaskLayerShape *masklay_shape_b,
|
||||||
const float fac);
|
float fac);
|
||||||
struct MaskLayerShape *BKE_mask_layer_shape_find_frame(struct MaskLayer *masklay, const int frame);
|
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.
|
* When returning 2 - the frame isn't found but before/after frames are.
|
||||||
*/
|
*/
|
||||||
int BKE_mask_layer_shape_find_frame_range(struct MaskLayer *masklay,
|
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_a,
|
||||||
struct MaskLayerShape **r_masklay_shape_b);
|
struct MaskLayerShape **r_masklay_shape_b);
|
||||||
/**
|
/**
|
||||||
* \note Does *not* add to the list.
|
* \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);
|
void BKE_mask_layer_shape_free(struct MaskLayerShape *masklay_shape);
|
||||||
struct MaskLayerShape *BKE_mask_layer_shape_verify_frame(struct MaskLayer *masklay,
|
struct MaskLayerShape *BKE_mask_layer_shape_verify_frame(struct MaskLayer *masklay, int frame);
|
||||||
const int frame);
|
|
||||||
struct MaskLayerShape *BKE_mask_layer_shape_duplicate(struct MaskLayerShape *masklay_shape);
|
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_unlink(struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape);
|
||||||
void BKE_mask_layer_shape_sort(struct MaskLayer *masklay);
|
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_resolution(struct MaskSpline *spline, int width, int height);
|
||||||
unsigned int BKE_mask_spline_feather_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,
|
int BKE_mask_spline_differentiate_calc_total(const struct MaskSpline *spline, unsigned int resol);
|
||||||
const unsigned int resol);
|
|
||||||
|
|
||||||
float (*BKE_mask_spline_differentiate_with_resolution(struct MaskSpline *spline,
|
float (*BKE_mask_spline_differentiate_with_resolution(struct MaskSpline *spline,
|
||||||
const unsigned int resol,
|
unsigned int resol,
|
||||||
unsigned int *r_tot_diff_point))[2];
|
unsigned int *r_tot_diff_point))[2];
|
||||||
void BKE_mask_spline_feather_collapse_inner_loops(struct MaskSpline *spline,
|
void BKE_mask_spline_feather_collapse_inner_loops(struct MaskSpline *spline,
|
||||||
float (*feather_points)[2],
|
float (*feather_points)[2],
|
||||||
const unsigned int tot_feather_point);
|
unsigned int tot_feather_point);
|
||||||
float (*BKE_mask_spline_differentiate(
|
float (*BKE_mask_spline_differentiate(
|
||||||
struct MaskSpline *spline, int width, int height, unsigned int *r_tot_diff_point))[2];
|
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(
|
float (*BKE_mask_spline_feather_differentiated_points_with_resolution(
|
||||||
struct MaskSpline *spline,
|
struct MaskSpline *spline,
|
||||||
const unsigned int resol,
|
unsigned int resol,
|
||||||
const bool do_feather_isect,
|
bool do_feather_isect,
|
||||||
unsigned int *r_tot_feather_point))[2];
|
unsigned int *r_tot_feather_point))[2];
|
||||||
|
|
||||||
/* *** mask point functions which involve evaluation *** */
|
/* *** mask point functions which involve evaluation *** */
|
||||||
@@ -393,8 +389,8 @@ float *BKE_mask_point_segment_feather_diff(struct MaskSpline *spline,
|
|||||||
int height,
|
int height,
|
||||||
unsigned int *tot_feather_point);
|
unsigned int *tot_feather_point);
|
||||||
|
|
||||||
void BKE_mask_layer_evaluate_animation(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, const 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_animation(struct Depsgraph *depsgraph, struct Mask *mask);
|
||||||
void BKE_mask_eval_update(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_free(MaskRasterHandle *mr_handle);
|
||||||
void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle,
|
void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle,
|
||||||
struct Mask *mask,
|
struct Mask *mask,
|
||||||
const int width,
|
int width,
|
||||||
const int height,
|
int height,
|
||||||
const bool do_aspect_correct,
|
bool do_aspect_correct,
|
||||||
const bool do_mask_aa,
|
bool do_mask_aa,
|
||||||
const bool do_feather);
|
bool do_feather);
|
||||||
float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float xy[2]);
|
float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float xy[2]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Rasterize a buffer from a single mask (threaded execution).
|
* \brief Rasterize a buffer from a single mask (threaded execution).
|
||||||
*/
|
*/
|
||||||
void BKE_maskrasterize_buffer(MaskRasterHandle *mr_handle,
|
void BKE_maskrasterize_buffer(MaskRasterHandle *mr_handle,
|
||||||
const unsigned int width,
|
unsigned int width,
|
||||||
const unsigned int height,
|
unsigned int height,
|
||||||
float *buffer);
|
float *buffer);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
@@ -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_objects_materials_test_all(struct Main *bmain, struct ID *id);
|
||||||
void BKE_object_material_resize(struct Main *bmain,
|
void BKE_object_material_resize(struct Main *bmain,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
const short totcol,
|
short totcol,
|
||||||
bool do_id_user);
|
bool do_id_user);
|
||||||
void BKE_object_material_remap(struct Object *ob, const unsigned int *remap);
|
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 Object *ob,
|
||||||
struct Material ***matar,
|
struct Material ***matar,
|
||||||
int totcol,
|
int totcol,
|
||||||
const bool to_object_only);
|
bool to_object_only);
|
||||||
|
|
||||||
short BKE_object_material_slot_find_index(struct Object *ob, struct Material *ma);
|
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);
|
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 col: new value.
|
||||||
* \param fac: Zero for is no change.
|
* \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]);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
|
@@ -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. */
|
* meta-ball, because this meta-ball influence polygonization of meta-balls. */
|
||||||
void BKE_mball_properties_copy(struct Scene *scene, struct Object *active_object);
|
void BKE_mball_properties_copy(struct Scene *scene, struct Object *active_object);
|
||||||
|
|
||||||
bool BKE_mball_minmax_ex(const struct MetaBall *mb,
|
bool BKE_mball_minmax_ex(
|
||||||
float min[3],
|
const struct MetaBall *mb, float min[3], float max[3], const float obmat[4][4], short flag);
|
||||||
float max[3],
|
|
||||||
const float obmat[4][4],
|
|
||||||
const short flag);
|
|
||||||
|
|
||||||
/* Basic vertex data functions. */
|
/* Basic vertex data functions. */
|
||||||
|
|
||||||
bool BKE_mball_minmax(const struct MetaBall *mb, float min[3], float max[3]);
|
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_median(const struct MetaBall *mb, float r_cent[3]);
|
||||||
bool BKE_mball_center_bounds(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]);
|
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).
|
* \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 *** */
|
/* *** select funcs *** */
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ struct BMesh *BKE_mesh_to_bmesh_ex(const struct Mesh *me,
|
|||||||
const struct BMeshFromMeshParams *convert_params);
|
const struct BMeshFromMeshParams *convert_params);
|
||||||
struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me,
|
struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
const bool add_key_index,
|
bool add_key_index,
|
||||||
const struct BMeshCreateParams *params);
|
const struct BMeshCreateParams *params);
|
||||||
|
|
||||||
struct Mesh *BKE_mesh_from_bmesh_nomain(struct BMesh *bm,
|
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.
|
* 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_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);
|
void BKE_mesh_ensure_skin_customdata(struct Mesh *me);
|
||||||
|
|
||||||
struct Mesh *BKE_mesh_new_nomain(
|
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_from_metaball(struct ListBase *lb, struct Mesh *me);
|
||||||
void BKE_mesh_to_curve_nurblist(const struct Mesh *me,
|
void BKE_mesh_to_curve_nurblist(const struct Mesh *me,
|
||||||
struct ListBase *nurblist,
|
struct ListBase *nurblist,
|
||||||
const int edge_users_test);
|
int edge_users_test);
|
||||||
void BKE_mesh_to_curve(struct Main *bmain,
|
void BKE_mesh_to_curve(struct Main *bmain,
|
||||||
struct Depsgraph *depsgraph,
|
struct Depsgraph *depsgraph,
|
||||||
struct Scene *scene,
|
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);
|
bool BKE_mesh_material_index_used(struct Mesh *me, short index);
|
||||||
void BKE_mesh_material_index_clear(struct Mesh *me);
|
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_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.
|
* 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 Mesh *BKE_mesh_new_from_object(struct Depsgraph *depsgraph,
|
||||||
struct Object *object,
|
struct Object *object,
|
||||||
const bool preserve_all_data_layers,
|
bool preserve_all_data_layers,
|
||||||
const bool preserve_origindex);
|
bool preserve_origindex);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a version of BKE_mesh_new_from_object() which stores mesh in the given main database.
|
* 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 Scene *scene,
|
||||||
struct Object *ob_eval,
|
struct Object *ob_eval,
|
||||||
struct ModifierData *md_eval,
|
struct ModifierData *md_eval,
|
||||||
const bool use_virtual_modifiers,
|
bool use_virtual_modifiers,
|
||||||
const bool build_shapekey_layers);
|
bool build_shapekey_layers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies a nomain-Mesh into an existing Mesh.
|
* 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 */
|
/* basic vertex data functions */
|
||||||
bool BKE_mesh_minmax(const struct Mesh *me, float r_min[3], float r_max[3]);
|
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_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_ensure(struct Mesh *mesh);
|
||||||
void BKE_mesh_tessface_clear(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 totface,
|
||||||
int totloop,
|
int totloop,
|
||||||
int totpoly,
|
int totpoly,
|
||||||
const bool do_face_nor_copy);
|
bool do_face_nor_copy);
|
||||||
void BKE_mesh_tessface_calc(struct Mesh *mesh);
|
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 struct MPoly *mpolys,
|
||||||
const int *loop_to_poly,
|
const int *loop_to_poly,
|
||||||
const int *e2lfan_curr,
|
const int *e2lfan_curr,
|
||||||
const uint mv_pivot_index,
|
uint mv_pivot_index,
|
||||||
const struct MLoop **r_mlfan_curr,
|
const struct MLoop **r_mlfan_curr,
|
||||||
int *r_mlfan_curr_index,
|
int *r_mlfan_curr_index,
|
||||||
int *r_mlfan_vert_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!
|
* to keep same shading as with auto-smooth!
|
||||||
*/
|
*/
|
||||||
void BKE_edges_sharp_from_angle_set(const struct MVert *mverts,
|
void BKE_edges_sharp_from_angle_set(const struct MVert *mverts,
|
||||||
const int numVerts,
|
int numVerts,
|
||||||
struct MEdge *medges,
|
struct MEdge *medges,
|
||||||
const int numEdges,
|
int numEdges,
|
||||||
struct MLoop *mloops,
|
struct MLoop *mloops,
|
||||||
const int numLoops,
|
int numLoops,
|
||||||
struct MPoly *mpolys,
|
struct MPoly *mpolys,
|
||||||
const float (*polynors)[3],
|
const float (*polynors)[3],
|
||||||
const int numPolys,
|
int numPolys,
|
||||||
const float split_angle);
|
float split_angle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* References a contiguous loop-fan with normal offset vars.
|
* References a contiguous loop-fan with normal offset vars.
|
||||||
@@ -484,9 +484,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Low-level custom normals functions. */
|
/* Low-level custom normals functions. */
|
||||||
void BKE_lnor_spacearr_init(MLoopNorSpaceArray *lnors_spacearr,
|
void BKE_lnor_spacearr_init(MLoopNorSpaceArray *lnors_spacearr, int numLoops, char data_type);
|
||||||
const int numLoops,
|
|
||||||
const char data_type);
|
|
||||||
void BKE_lnor_spacearr_clear(MLoopNorSpaceArray *lnors_spacearr);
|
void BKE_lnor_spacearr_clear(MLoopNorSpaceArray *lnors_spacearr);
|
||||||
void BKE_lnor_spacearr_free(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,
|
void BKE_lnor_space_add_loop(MLoopNorSpaceArray *lnors_spacearr,
|
||||||
MLoopNorSpace *lnor_space,
|
MLoopNorSpace *lnor_space,
|
||||||
const int ml_index,
|
int ml_index,
|
||||||
void *bm_loop,
|
void *bm_loop,
|
||||||
const bool is_single);
|
bool is_single);
|
||||||
void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space,
|
void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space,
|
||||||
const short clnor_data[2],
|
const short clnor_data[2],
|
||||||
float r_custom_lnor[3]);
|
float r_custom_lnor[3]);
|
||||||
@@ -546,42 +544,42 @@ void BKE_lnor_space_custom_normal_to_data(MLoopNorSpace *lnor_space,
|
|||||||
* (splitting edges).
|
* (splitting edges).
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_normals_loop_split(const struct MVert *mverts,
|
void BKE_mesh_normals_loop_split(const struct MVert *mverts,
|
||||||
const int numVerts,
|
int numVerts,
|
||||||
struct MEdge *medges,
|
struct MEdge *medges,
|
||||||
const int numEdges,
|
int numEdges,
|
||||||
struct MLoop *mloops,
|
struct MLoop *mloops,
|
||||||
float (*r_loopnors)[3],
|
float (*r_loopnors)[3],
|
||||||
const int numLoops,
|
int numLoops,
|
||||||
struct MPoly *mpolys,
|
struct MPoly *mpolys,
|
||||||
const float (*polynors)[3],
|
const float (*polynors)[3],
|
||||||
const int numPolys,
|
int numPolys,
|
||||||
const bool use_split_normals,
|
bool use_split_normals,
|
||||||
const float split_angle,
|
float split_angle,
|
||||||
MLoopNorSpaceArray *r_lnors_spacearr,
|
MLoopNorSpaceArray *r_lnors_spacearr,
|
||||||
short (*clnors_data)[2],
|
short (*clnors_data)[2],
|
||||||
int *r_loop_to_poly);
|
int *r_loop_to_poly);
|
||||||
|
|
||||||
void BKE_mesh_normals_loop_custom_set(const struct MVert *mverts,
|
void BKE_mesh_normals_loop_custom_set(const struct MVert *mverts,
|
||||||
const int numVerts,
|
int numVerts,
|
||||||
struct MEdge *medges,
|
struct MEdge *medges,
|
||||||
const int numEdges,
|
int numEdges,
|
||||||
struct MLoop *mloops,
|
struct MLoop *mloops,
|
||||||
float (*r_custom_loopnors)[3],
|
float (*r_custom_loopnors)[3],
|
||||||
const int numLoops,
|
int numLoops,
|
||||||
struct MPoly *mpolys,
|
struct MPoly *mpolys,
|
||||||
const float (*polynors)[3],
|
const float (*polynors)[3],
|
||||||
const int numPolys,
|
int numPolys,
|
||||||
short (*r_clnors_data)[2]);
|
short (*r_clnors_data)[2]);
|
||||||
void BKE_mesh_normals_loop_custom_from_vertices_set(const struct MVert *mverts,
|
void BKE_mesh_normals_loop_custom_from_vertices_set(const struct MVert *mverts,
|
||||||
float (*r_custom_vertnors)[3],
|
float (*r_custom_vertnors)[3],
|
||||||
const int numVerts,
|
int numVerts,
|
||||||
struct MEdge *medges,
|
struct MEdge *medges,
|
||||||
const int numEdges,
|
int numEdges,
|
||||||
struct MLoop *mloops,
|
struct MLoop *mloops,
|
||||||
const int numLoops,
|
int numLoops,
|
||||||
struct MPoly *mpolys,
|
struct MPoly *mpolys,
|
||||||
const float (*polynors)[3],
|
const float (*polynors)[3],
|
||||||
const int numPolys,
|
int numPolys,
|
||||||
short (*r_clnors_data)[2]);
|
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 clnors: The computed custom loop normals.
|
||||||
* \param r_vert_clnors: The (already allocated) array where to store averaged per-vertex 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 struct MLoop *mloops,
|
||||||
const int numLoops,
|
int numLoops,
|
||||||
const float (*clnors)[3],
|
const float (*clnors)[3],
|
||||||
float (*r_vert_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.
|
* \param r_center: Center of mass.
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_calc_volume(const struct MVert *mverts,
|
void BKE_mesh_calc_volume(const struct MVert *mverts,
|
||||||
const int mverts_num,
|
int mverts_num,
|
||||||
const struct MLoopTri *mlooptri,
|
const struct MLoopTri *mlooptri,
|
||||||
const int looptri_num,
|
int looptri_num,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
float *r_volume,
|
float *r_volume,
|
||||||
float r_center[3]);
|
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,
|
* Flip a single MLoop's #MDisps structure,
|
||||||
* low level function to be called from face-flipping code which re-arranged the mdisps themselves.
|
* 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
|
* 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,
|
struct CustomData *ldata,
|
||||||
float (*lnors)[3],
|
float (*lnors)[3],
|
||||||
struct MDisps *mdisp,
|
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);
|
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).
|
* 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,
|
struct Mesh *BKE_mesh_merge_verts(struct Mesh *mesh,
|
||||||
const int *vtargetmap,
|
const int *vtargetmap,
|
||||||
const int tot_vtargetmap,
|
int tot_vtargetmap,
|
||||||
const int merge_mode);
|
int merge_mode);
|
||||||
|
|
||||||
/* Flush flags. */
|
/* 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,
|
void BKE_mesh_flush_hidden_from_verts_ex(const struct MVert *mvert,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
struct MEdge *medge,
|
struct MEdge *medge,
|
||||||
const int totedge,
|
int totedge,
|
||||||
struct MPoly *mpoly,
|
struct MPoly *mpoly,
|
||||||
const int totpoly);
|
int totpoly);
|
||||||
void BKE_mesh_flush_hidden_from_verts(struct Mesh *me);
|
void BKE_mesh_flush_hidden_from_verts(struct Mesh *me);
|
||||||
void BKE_mesh_flush_hidden_from_polys_ex(struct MVert *mvert,
|
void BKE_mesh_flush_hidden_from_polys_ex(struct MVert *mvert,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
struct MEdge *medge,
|
struct MEdge *medge,
|
||||||
const int totedge,
|
int totedge,
|
||||||
const struct MPoly *mpoly,
|
const struct MPoly *mpoly,
|
||||||
const int totpoly);
|
int totpoly);
|
||||||
void BKE_mesh_flush_hidden_from_polys(struct Mesh *me);
|
void BKE_mesh_flush_hidden_from_polys(struct Mesh *me);
|
||||||
/**
|
/**
|
||||||
* simple poly -> vert/edge selection.
|
* simple poly -> vert/edge selection.
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_flush_select_from_polys_ex(struct MVert *mvert,
|
void BKE_mesh_flush_select_from_polys_ex(struct MVert *mvert,
|
||||||
const int totvert,
|
int totvert,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
struct MEdge *medge,
|
struct MEdge *medge,
|
||||||
const int totedge,
|
int totedge,
|
||||||
const struct MPoly *mpoly,
|
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_polys(struct Mesh *me);
|
||||||
void BKE_mesh_flush_select_from_verts_ex(const struct MVert *mvert,
|
void BKE_mesh_flush_select_from_verts_ex(const struct MVert *mvert,
|
||||||
const int totvert,
|
int totvert,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
struct MEdge *medge,
|
struct MEdge *medge,
|
||||||
const int totedge,
|
int totedge,
|
||||||
struct MPoly *mpoly,
|
struct MPoly *mpoly,
|
||||||
const int totpoly);
|
int totpoly);
|
||||||
void BKE_mesh_flush_select_from_verts(struct Mesh *me);
|
void BKE_mesh_flush_select_from_verts(struct Mesh *me);
|
||||||
|
|
||||||
/* spatial evaluation */
|
/* spatial evaluation */
|
||||||
@@ -847,9 +845,9 @@ void BKE_mesh_flush_select_from_verts(struct Mesh *me);
|
|||||||
* \param vert_cos_new: resulting coords.
|
* \param vert_cos_new: resulting coords.
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_calc_relative_deform(const struct MPoly *mpoly,
|
void BKE_mesh_calc_relative_deform(const struct MPoly *mpoly,
|
||||||
const int totpoly,
|
int totpoly,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
const int totvert,
|
int totvert,
|
||||||
|
|
||||||
const float (*vert_cos_src)[3],
|
const float (*vert_cos_src)[3],
|
||||||
const float (*vert_cos_dst)[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.
|
* \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.
|
* Checks if a Mesh is valid without any modification. This is always verbose.
|
||||||
* \returns True if the mesh is valid.
|
* \returns True if the mesh is valid.
|
||||||
@@ -903,24 +901,24 @@ bool BKE_mesh_validate_arrays(struct Mesh *me,
|
|||||||
struct MPoly *mpolys,
|
struct MPoly *mpolys,
|
||||||
unsigned int totpoly,
|
unsigned int totpoly,
|
||||||
struct MDeformVert *dverts, /* assume totvert length */
|
struct MDeformVert *dverts, /* assume totvert length */
|
||||||
const bool do_verbose,
|
bool do_verbose,
|
||||||
const bool do_fixes,
|
bool do_fixes,
|
||||||
bool *r_change);
|
bool *r_change);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \returns is_valid.
|
* \returns is_valid.
|
||||||
*/
|
*/
|
||||||
bool BKE_mesh_validate_all_customdata(struct CustomData *vdata,
|
bool BKE_mesh_validate_all_customdata(struct CustomData *vdata,
|
||||||
const uint totvert,
|
uint totvert,
|
||||||
struct CustomData *edata,
|
struct CustomData *edata,
|
||||||
const uint totedge,
|
uint totedge,
|
||||||
struct CustomData *ldata,
|
struct CustomData *ldata,
|
||||||
const uint totloop,
|
uint totloop,
|
||||||
struct CustomData *pdata,
|
struct CustomData *pdata,
|
||||||
const uint totpoly,
|
uint totpoly,
|
||||||
const bool check_meshmask,
|
bool check_meshmask,
|
||||||
const bool do_verbose,
|
bool do_verbose,
|
||||||
const bool do_fixes,
|
bool do_fixes,
|
||||||
bool *r_change);
|
bool *r_change);
|
||||||
|
|
||||||
void BKE_mesh_strip_loose_faces(struct Mesh *me);
|
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,
|
* If the mesh is from a very old blender version,
|
||||||
* convert mface->edcode to edge drawflags
|
* 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);
|
void BKE_mesh_calc_edges_loose(struct Mesh *mesh);
|
||||||
/**
|
/**
|
||||||
* Calculate edges from polygons.
|
* 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
|
* Calculate/create edges from tessface data
|
||||||
*
|
*
|
||||||
|
@@ -46,8 +46,8 @@ Mesh *direct_mesh_boolean(blender::Span<const Mesh *> meshes,
|
|||||||
blender::Span<const float4x4 *> obmats,
|
blender::Span<const float4x4 *> obmats,
|
||||||
const float4x4 &target_transform,
|
const float4x4 &target_transform,
|
||||||
blender::Span<blender::Array<short>> material_remaps,
|
blender::Span<blender::Array<short>> material_remaps,
|
||||||
const bool use_self,
|
bool use_self,
|
||||||
const bool hole_tolerant,
|
bool hole_tolerant,
|
||||||
const int boolean_mode);
|
int boolean_mode);
|
||||||
|
|
||||||
} // namespace blender::meshintersect
|
} // namespace blender::meshintersect
|
||||||
|
@@ -42,14 +42,14 @@ typedef enum eMeshFairingDepth {
|
|||||||
* the vertex should be modified by fairing. */
|
* the vertex should be modified by fairing. */
|
||||||
void BKE_bmesh_prefair_and_fair_vertices(struct BMesh *bm,
|
void BKE_bmesh_prefair_and_fair_vertices(struct BMesh *bm,
|
||||||
bool *affect_vertices,
|
bool *affect_vertices,
|
||||||
const eMeshFairingDepth depth);
|
eMeshFairingDepth depth);
|
||||||
|
|
||||||
/* This function can optionally use the MVert coordinates of deform_mverts to read and write the
|
/* 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. */
|
* fairing result. When NULL, the function will use mesh->mverts directly. */
|
||||||
void BKE_mesh_prefair_and_fair_vertices(struct Mesh *mesh,
|
void BKE_mesh_prefair_and_fair_vertices(struct Mesh *mesh,
|
||||||
struct MVert *deform_mverts,
|
struct MVert *deform_mverts,
|
||||||
bool *affect_vertices,
|
bool *affect_vertices,
|
||||||
const eMeshFairingDepth depth);
|
eMeshFairingDepth depth);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -68,9 +68,7 @@ void BKE_mesh_foreach_mapped_subdiv_face_center(
|
|||||||
void *userData,
|
void *userData,
|
||||||
MeshForeachFlag flag);
|
MeshForeachFlag flag);
|
||||||
|
|
||||||
void BKE_mesh_foreach_mapped_vert_coords_get(struct Mesh *me_eval,
|
void BKE_mesh_foreach_mapped_vert_coords_get(struct Mesh *me_eval, float (*r_cos)[3], int totcos);
|
||||||
float (*r_cos)[3],
|
|
||||||
const int totcos);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -100,8 +100,8 @@ UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly,
|
|||||||
unsigned int totpoly,
|
unsigned int totpoly,
|
||||||
unsigned int totvert,
|
unsigned int totvert,
|
||||||
const float limit[2],
|
const float limit[2],
|
||||||
const bool selected,
|
bool selected,
|
||||||
const bool use_winding);
|
bool use_winding);
|
||||||
UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
|
UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
|
||||||
void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
|
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,
|
void BKE_mesh_vert_looptri_map_create(MeshElemMap **r_map,
|
||||||
int **r_mem,
|
int **r_mem,
|
||||||
const struct MVert *mvert,
|
const struct MVert *mvert,
|
||||||
const int totvert,
|
int totvert,
|
||||||
const struct MLoopTri *mlooptri,
|
const struct MLoopTri *mlooptri,
|
||||||
const int totlooptri,
|
int totlooptri,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
const int totloop);
|
int totloop);
|
||||||
/**
|
/**
|
||||||
* Generates a map where the key is the vertex and the value
|
* Generates a map where the key is the vertex and the value
|
||||||
* is a list of edges that use that vertex as an endpoint.
|
* 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,
|
void BKE_mesh_edge_loop_map_create(MeshElemMap **r_map,
|
||||||
int **r_mem,
|
int **r_mem,
|
||||||
const struct MEdge *medge,
|
const struct MEdge *medge,
|
||||||
const int totedge,
|
int totedge,
|
||||||
const struct MPoly *mpoly,
|
const struct MPoly *mpoly,
|
||||||
const int totpoly,
|
int totpoly,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
const int totloop);
|
int totloop);
|
||||||
/**
|
/**
|
||||||
* Generates a map where the key is the edge and the value
|
* Generates a map where the key is the edge and the value
|
||||||
* is a list of polygons that use that edge.
|
* 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,
|
void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map,
|
||||||
int **r_mem,
|
int **r_mem,
|
||||||
const struct MEdge *medge,
|
const struct MEdge *medge,
|
||||||
const int totedge,
|
int totedge,
|
||||||
const struct MPoly *mpoly,
|
const struct MPoly *mpoly,
|
||||||
const int totpoly,
|
int totpoly,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
const int totloop);
|
int totloop);
|
||||||
/**
|
/**
|
||||||
* This function creates a map so the source-data (vert/edge/loop/poly)
|
* This function creates a map so the source-data (vert/edge/loop/poly)
|
||||||
* can loop over the destination data (using the destination arrays origindex).
|
* 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.
|
* `totfinal` could be `tottessface` and `final_origindex` its ORIGINDEX custom-data.
|
||||||
* This would allow an MPoly to loop over its tessfaces.
|
* This would allow an MPoly to loop over its tessfaces.
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_origindex_map_create(MeshElemMap **r_map,
|
void BKE_mesh_origindex_map_create(
|
||||||
int **r_mem,
|
MeshElemMap **r_map, int **r_mem, int totsource, const int *final_origindex, int totfinal);
|
||||||
const int totsource,
|
|
||||||
const int *final_origindex,
|
|
||||||
const int totfinal);
|
|
||||||
/**
|
/**
|
||||||
* A version of #BKE_mesh_origindex_map_create that takes a looptri array.
|
* A version of #BKE_mesh_origindex_map_create that takes a looptri array.
|
||||||
* Making a poly -> looptri map.
|
* 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,
|
void BKE_mesh_origindex_map_create_looptri(MeshElemMap **r_map,
|
||||||
int **r_mem,
|
int **r_mem,
|
||||||
const struct MPoly *mpoly,
|
const struct MPoly *mpoly,
|
||||||
const int mpoly_num,
|
int mpoly_num,
|
||||||
const struct MLoopTri *looptri,
|
const struct MLoopTri *looptri,
|
||||||
const int looptri_num);
|
int looptri_num);
|
||||||
|
|
||||||
/* islands */
|
/* islands */
|
||||||
|
|
||||||
@@ -239,28 +236,28 @@ typedef struct MeshIslandStore {
|
|||||||
} MeshIslandStore;
|
} MeshIslandStore;
|
||||||
|
|
||||||
void BKE_mesh_loop_islands_init(MeshIslandStore *island_store,
|
void BKE_mesh_loop_islands_init(MeshIslandStore *island_store,
|
||||||
const short item_type,
|
short item_type,
|
||||||
const int items_num,
|
int items_num,
|
||||||
const short island_type,
|
short island_type,
|
||||||
const short innercut_type);
|
short innercut_type);
|
||||||
void BKE_mesh_loop_islands_clear(MeshIslandStore *island_store);
|
void BKE_mesh_loop_islands_clear(MeshIslandStore *island_store);
|
||||||
void BKE_mesh_loop_islands_free(MeshIslandStore *island_store);
|
void BKE_mesh_loop_islands_free(MeshIslandStore *island_store);
|
||||||
void BKE_mesh_loop_islands_add(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 *items_indices,
|
||||||
const int num_island_items,
|
int num_island_items,
|
||||||
int *island_item_indices,
|
int *island_item_indices,
|
||||||
const int num_innercut_items,
|
int num_innercut_items,
|
||||||
int *innercut_item_indices);
|
int *innercut_item_indices);
|
||||||
|
|
||||||
typedef bool (*MeshRemapIslandsCalc)(struct MVert *verts,
|
typedef bool (*MeshRemapIslandsCalc)(struct MVert *verts,
|
||||||
const int totvert,
|
int totvert,
|
||||||
struct MEdge *edges,
|
struct MEdge *edges,
|
||||||
const int totedge,
|
int totedge,
|
||||||
struct MPoly *polys,
|
struct MPoly *polys,
|
||||||
const int totpoly,
|
int totpoly,
|
||||||
struct MLoop *loops,
|
struct MLoop *loops,
|
||||||
const int totloop,
|
int totloop,
|
||||||
struct MeshIslandStore *r_island_store);
|
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.
|
/* 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.
|
* not some UV layers coordinates.
|
||||||
*/
|
*/
|
||||||
bool BKE_mesh_calc_islands_loop_poly_edgeseam(struct MVert *verts,
|
bool BKE_mesh_calc_islands_loop_poly_edgeseam(struct MVert *verts,
|
||||||
const int totvert,
|
int totvert,
|
||||||
struct MEdge *edges,
|
struct MEdge *edges,
|
||||||
const int totedge,
|
int totedge,
|
||||||
struct MPoly *polys,
|
struct MPoly *polys,
|
||||||
const int totpoly,
|
int totpoly,
|
||||||
struct MLoop *loops,
|
struct MLoop *loops,
|
||||||
const int totloop,
|
int totloop,
|
||||||
MeshIslandStore *r_island_store);
|
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.
|
* those loops are supposed to be really quick to do.
|
||||||
*/
|
*/
|
||||||
bool BKE_mesh_calc_islands_loop_poly_uvmap(struct MVert *verts,
|
bool BKE_mesh_calc_islands_loop_poly_uvmap(struct MVert *verts,
|
||||||
const int totvert,
|
int totvert,
|
||||||
struct MEdge *edges,
|
struct MEdge *edges,
|
||||||
const int totedge,
|
int totedge,
|
||||||
struct MPoly *polys,
|
struct MPoly *polys,
|
||||||
const int totpoly,
|
int totpoly,
|
||||||
struct MLoop *loops,
|
struct MLoop *loops,
|
||||||
const int totloop,
|
int totloop,
|
||||||
const struct MLoopUV *luvs,
|
const struct MLoopUV *luvs,
|
||||||
MeshIslandStore *r_island_store);
|
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.
|
* Note it's callers's responsibility to MEM_freeN returned array.
|
||||||
*/
|
*/
|
||||||
int *BKE_mesh_calc_smoothgroups(const struct MEdge *medge,
|
int *BKE_mesh_calc_smoothgroups(const struct MEdge *medge,
|
||||||
const int totedge,
|
int totedge,
|
||||||
const struct MPoly *mpoly,
|
const struct MPoly *mpoly,
|
||||||
const int totpoly,
|
int totpoly,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
const int totloop,
|
int totloop,
|
||||||
int *r_totgroup,
|
int *r_totgroup,
|
||||||
const bool use_bitflags);
|
bool use_bitflags);
|
||||||
|
|
||||||
/* use on looptri vertex values */
|
/* use on looptri vertex values */
|
||||||
#define BKE_MESH_TESSTRI_VINDEX_ORDER(_tri, _v) \
|
#define BKE_MESH_TESSTRI_VINDEX_ORDER(_tri, _v) \
|
||||||
|
@@ -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,
|
void BKE_mesh_mirror_apply_mirror_on_axis(struct Main *bmain,
|
||||||
struct Mesh *mesh,
|
struct Mesh *mesh,
|
||||||
const int axis,
|
int axis,
|
||||||
const float dist);
|
float dist);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \warning This should _not_ be used to modify original meshes since
|
* \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.
|
* 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 Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(struct MirrorModifierData *mmd,
|
||||||
struct MirrorModifierData *mmd,
|
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
const struct Mesh *mesh,
|
const struct Mesh *mesh,
|
||||||
const int axis,
|
int axis,
|
||||||
const bool use_correct_order_on_merge);
|
bool use_correct_order_on_merge);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -50,10 +50,10 @@ typedef struct MeshPairRemap {
|
|||||||
} MeshPairRemap;
|
} MeshPairRemap;
|
||||||
|
|
||||||
/* Helpers! */
|
/* 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_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:
|
/* TODO:
|
||||||
* Add other 'from/to' mapping sources, like e.g. using an UVMap, etc.
|
* 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(
|
void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(
|
||||||
const int vert_mode,
|
int vert_mode,
|
||||||
const int edge_mode,
|
int edge_mode,
|
||||||
const int loop_mode,
|
int loop_mode,
|
||||||
const int poly_mode,
|
int poly_mode,
|
||||||
struct CustomData_MeshMasks *cddata_mask);
|
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,
|
float BKE_mesh_remap_calc_difference_from_mesh(const struct SpaceTransform *space_transform,
|
||||||
const struct MVert *verts_dst,
|
const struct MVert *verts_dst,
|
||||||
const int numverts_dst,
|
int numverts_dst,
|
||||||
struct Mesh *me_src);
|
struct Mesh *me_src);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set r_space_transform so that best bbox of dst matches best bbox of 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,
|
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 Mesh *me_src,
|
||||||
struct SpaceTransform *r_space_transform);
|
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 struct SpaceTransform *space_transform,
|
||||||
const float max_dist,
|
float max_dist,
|
||||||
const float ray_radius,
|
float ray_radius,
|
||||||
const struct MVert *verts_dst,
|
const struct MVert *verts_dst,
|
||||||
const int numverts_dst,
|
int numverts_dst,
|
||||||
const bool dirty_nors_dst,
|
bool dirty_nors_dst,
|
||||||
struct Mesh *me_src,
|
struct Mesh *me_src,
|
||||||
MeshPairRemap *r_map);
|
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 struct SpaceTransform *space_transform,
|
||||||
const float max_dist,
|
float max_dist,
|
||||||
const float ray_radius,
|
float ray_radius,
|
||||||
const struct MVert *verts_dst,
|
const struct MVert *verts_dst,
|
||||||
const int numverts_dst,
|
int numverts_dst,
|
||||||
const struct MEdge *edges_dst,
|
const struct MEdge *edges_dst,
|
||||||
const int numedges_dst,
|
int numedges_dst,
|
||||||
const bool dirty_nors_dst,
|
bool dirty_nors_dst,
|
||||||
struct Mesh *me_src,
|
struct Mesh *me_src,
|
||||||
MeshPairRemap *r_map);
|
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 struct SpaceTransform *space_transform,
|
||||||
const float max_dist,
|
float max_dist,
|
||||||
const float ray_radius,
|
float ray_radius,
|
||||||
struct MVert *verts_dst,
|
struct MVert *verts_dst,
|
||||||
const int numverts_dst,
|
int numverts_dst,
|
||||||
struct MEdge *edges_dst,
|
struct MEdge *edges_dst,
|
||||||
const int numedges_dst,
|
int numedges_dst,
|
||||||
struct MLoop *loops_dst,
|
struct MLoop *loops_dst,
|
||||||
const int numloops_dst,
|
int numloops_dst,
|
||||||
struct MPoly *polys_dst,
|
struct MPoly *polys_dst,
|
||||||
const int numpolys_dst,
|
int numpolys_dst,
|
||||||
struct CustomData *ldata_dst,
|
struct CustomData *ldata_dst,
|
||||||
struct CustomData *pdata_dst,
|
struct CustomData *pdata_dst,
|
||||||
const bool use_split_nors_dst,
|
bool use_split_nors_dst,
|
||||||
const float split_angle_dst,
|
float split_angle_dst,
|
||||||
const bool dirty_nors_dst,
|
bool dirty_nors_dst,
|
||||||
struct Mesh *me_src,
|
struct Mesh *me_src,
|
||||||
MeshRemapIslandsCalc gen_islands_src,
|
MeshRemapIslandsCalc gen_islands_src,
|
||||||
const float islands_precision_src,
|
float islands_precision_src,
|
||||||
struct MeshPairRemap *r_map);
|
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 struct SpaceTransform *space_transform,
|
||||||
const float max_dist,
|
float max_dist,
|
||||||
const float ray_radius,
|
float ray_radius,
|
||||||
struct MVert *verts_dst,
|
struct MVert *verts_dst,
|
||||||
const int numverts_dst,
|
int numverts_dst,
|
||||||
struct MLoop *loops_dst,
|
struct MLoop *loops_dst,
|
||||||
const int numloops_dst,
|
int numloops_dst,
|
||||||
struct MPoly *polys_dst,
|
struct MPoly *polys_dst,
|
||||||
const int numpolys_dst,
|
int numpolys_dst,
|
||||||
struct CustomData *pdata_dst,
|
struct CustomData *pdata_dst,
|
||||||
const bool dirty_nors_dst,
|
bool dirty_nors_dst,
|
||||||
struct Mesh *me_src,
|
struct Mesh *me_src,
|
||||||
struct MeshPairRemap *r_map);
|
struct MeshPairRemap *r_map);
|
||||||
|
|
||||||
|
@@ -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
|
* 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.)
|
* 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);
|
int BKE_mesh_runtime_looptri_len(const struct Mesh *mesh);
|
||||||
void BKE_mesh_runtime_looptri_recalc(struct Mesh *mesh);
|
void BKE_mesh_runtime_looptri_recalc(struct Mesh *mesh);
|
||||||
/**
|
/**
|
||||||
|
@@ -89,8 +89,8 @@ class MeshAttributeInterpolator {
|
|||||||
const Span<int> looptri_indices);
|
const Span<int> looptri_indices);
|
||||||
|
|
||||||
void sample_data(const GVArray &src,
|
void sample_data(const GVArray &src,
|
||||||
const AttributeDomain domain,
|
AttributeDomain domain,
|
||||||
const eAttributeMapMode mode,
|
eAttributeMapMode mode,
|
||||||
const GMutableSpan dst);
|
const GMutableSpan dst);
|
||||||
|
|
||||||
void sample_attribute(const ReadAttributeLookup &src_attribute,
|
void sample_attribute(const ReadAttributeLookup &src_attribute,
|
||||||
|
@@ -32,14 +32,14 @@ struct ReportList;
|
|||||||
* NOTE: * The mesh should be made of only tris and quads!
|
* NOTE: * The mesh should be made of only tris and quads!
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_calc_loop_tangent_single_ex(const struct MVert *mverts,
|
void BKE_mesh_calc_loop_tangent_single_ex(const struct MVert *mverts,
|
||||||
const int numVerts,
|
int numVerts,
|
||||||
const struct MLoop *mloops,
|
const struct MLoop *mloops,
|
||||||
float (*r_looptangent)[4],
|
float (*r_looptangent)[4],
|
||||||
float (*loopnors)[3],
|
float (*loopnors)[3],
|
||||||
const struct MLoopUV *loopuv,
|
const struct MLoopUV *loopuv,
|
||||||
const int numLoops,
|
int numLoops,
|
||||||
const struct MPoly *mpolys,
|
const struct MPoly *mpolys,
|
||||||
const int numPolys,
|
int numPolys,
|
||||||
struct ReportList *reports);
|
struct ReportList *reports);
|
||||||
/**
|
/**
|
||||||
* Wrapper around BKE_mesh_calc_loop_tangent_single_ex, which takes care of most boiling code.
|
* 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,
|
void BKE_mesh_calc_loop_tangent_ex(const struct MVert *mvert,
|
||||||
const struct MPoly *mpoly,
|
const struct MPoly *mpoly,
|
||||||
const uint mpoly_len,
|
uint mpoly_len,
|
||||||
const struct MLoop *mloop,
|
const struct MLoop *mloop,
|
||||||
const struct MLoopTri *looptri,
|
const struct MLoopTri *looptri,
|
||||||
const uint looptri_len,
|
uint looptri_len,
|
||||||
|
|
||||||
struct CustomData *loopdata,
|
struct CustomData *loopdata,
|
||||||
bool calc_active_tangent,
|
bool calc_active_tangent,
|
||||||
@@ -71,7 +71,7 @@ void BKE_mesh_calc_loop_tangent_ex(const struct MVert *mvert,
|
|||||||
const float (*vert_orco)[3],
|
const float (*vert_orco)[3],
|
||||||
/* result */
|
/* result */
|
||||||
struct CustomData *loopdata_out,
|
struct CustomData *loopdata_out,
|
||||||
const uint loopdata_out_len,
|
uint loopdata_out_len,
|
||||||
short *tangent_mask_curr_p);
|
short *tangent_mask_curr_p);
|
||||||
|
|
||||||
void BKE_mesh_calc_loop_tangents(struct Mesh *me_eval,
|
void BKE_mesh_calc_loop_tangents(struct Mesh *me_eval,
|
||||||
|
@@ -184,7 +184,7 @@ typedef struct ModifierTypeInfo {
|
|||||||
*
|
*
|
||||||
* \param flag: Copying options (see BKE_lib_id.h's LIB_ID_COPY_... flags for more).
|
* \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 *********************/
|
/********************* Deform modifier functions *********************/
|
||||||
|
|
||||||
@@ -322,7 +322,7 @@ typedef struct ModifierTypeInfo {
|
|||||||
*
|
*
|
||||||
* The dag_eval_mode should be of type eEvaluationMode.
|
* 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
|
* 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);
|
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);
|
void BKE_modifier_free(struct ModifierData *md);
|
||||||
/**
|
/**
|
||||||
* Use instead of `BLI_remlink` when the object's active modifier should change.
|
* 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,
|
void BKE_modifier_copydata_generic(const struct ModifierData *md,
|
||||||
struct ModifierData *md_dst,
|
struct ModifierData *md_dst,
|
||||||
const int flag);
|
int flag);
|
||||||
void BKE_modifier_copydata(struct ModifierData *md, struct ModifierData *target);
|
void BKE_modifier_copydata(struct ModifierData *md, struct ModifierData *target);
|
||||||
void BKE_modifier_copydata_ex(struct ModifierData *md,
|
void BKE_modifier_copydata_ex(struct ModifierData *md, struct ModifierData *target, int flag);
|
||||||
struct ModifierData *target,
|
|
||||||
const int flag);
|
|
||||||
bool BKE_modifier_depends_ontime(struct Scene *scene, struct ModifierData *md, int dag_eval_mode);
|
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_mapping(struct ModifierData *md);
|
||||||
bool BKE_modifier_supports_cage(struct Scene *scene, 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).
|
* (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,
|
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);
|
void BKE_modifier_check_uuids_unique_and_report(const struct Object *object);
|
||||||
|
|
||||||
|
@@ -167,7 +167,7 @@ void multiresModifier_ensure_external_read(struct Mesh *mesh,
|
|||||||
/**** interpolation stuff ****/
|
/**** interpolation stuff ****/
|
||||||
/* Adapted from `sculptmode.c` */
|
/* 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.
|
* 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 MPoly *mpoly,
|
||||||
struct MLoop *mloop,
|
struct MLoop *mloop,
|
||||||
const struct MLoopTri *lt,
|
const struct MLoopTri *lt,
|
||||||
const int face_side,
|
int face_side,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
float *x,
|
float *x,
|
||||||
float *y);
|
float *y);
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ bool multiresModifier_reshapeFromVertcos(struct Depsgraph *depsgraph,
|
|||||||
struct Object *object,
|
struct Object *object,
|
||||||
struct MultiresModifierData *mmd,
|
struct MultiresModifierData *mmd,
|
||||||
const float (*vert_coords)[3],
|
const float (*vert_coords)[3],
|
||||||
const int num_vert_coords);
|
int num_vert_coords);
|
||||||
/**
|
/**
|
||||||
* Returns truth on success, false otherwise.
|
* Returns truth on success, false otherwise.
|
||||||
*
|
*
|
||||||
@@ -202,7 +202,7 @@ bool multiresModifier_reshapeFromDeformModifier(struct Depsgraph *depsgraph,
|
|||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct MultiresModifierData *mmd,
|
struct MultiresModifierData *mmd,
|
||||||
struct ModifierData *deform_md);
|
struct ModifierData *deform_md);
|
||||||
bool multiresModifier_reshapeFromCCG(const int tot_level,
|
bool multiresModifier_reshapeFromCCG(int tot_level,
|
||||||
struct Mesh *coarse_mesh,
|
struct Mesh *coarse_mesh,
|
||||||
struct SubdivCCG *subdiv_ccg);
|
struct SubdivCCG *subdiv_ccg);
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ typedef enum eMultiresSubdivideModeType {
|
|||||||
|
|
||||||
void multiresModifier_subdivide(struct Object *object,
|
void multiresModifier_subdivide(struct Object *object,
|
||||||
struct MultiresModifierData *mmd,
|
struct MultiresModifierData *mmd,
|
||||||
const eMultiresSubdivideModeType mode);
|
eMultiresSubdivideModeType mode);
|
||||||
void multires_subdivide_create_tangent_displacement_linear_grids(struct Object *object,
|
void multires_subdivide_create_tangent_displacement_linear_grids(struct Object *object,
|
||||||
struct MultiresModifierData *mmd);
|
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,
|
void multiresModifier_subdivide_to_level(struct Object *object,
|
||||||
struct MultiresModifierData *mmd,
|
struct MultiresModifierData *mmd,
|
||||||
const int top_level,
|
int top_level,
|
||||||
const eMultiresSubdivideModeType mode);
|
eMultiresSubdivideModeType mode);
|
||||||
|
|
||||||
/* Subdivision integration, defined in multires_subdiv.c */
|
/* 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 Scene *scene,
|
||||||
const struct Object *object,
|
const struct Object *object,
|
||||||
const struct MultiresModifierData *mmd,
|
const struct MultiresModifierData *mmd,
|
||||||
const bool use_render_params,
|
bool use_render_params,
|
||||||
const bool ignore_simplify,
|
bool ignore_simplify,
|
||||||
const bool ignore_control_edges);
|
bool ignore_control_edges);
|
||||||
|
|
||||||
/* General helpers. */
|
/* 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],
|
BLI_INLINE void BKE_multires_construct_tangent_matrix(float tangent_matrix[3][3],
|
||||||
const float dPdu[3],
|
const float dPdu[3],
|
||||||
const float dPdv[3],
|
const float dPdv[3],
|
||||||
const int corner);
|
int corner);
|
||||||
|
|
||||||
/* Versioning. */
|
/* Versioning. */
|
||||||
|
|
||||||
|
@@ -481,7 +481,7 @@ void ntreeFreeTree(struct bNodeTree *ntree);
|
|||||||
void ntreeFreeEmbeddedTree(struct bNodeTree *ntree);
|
void ntreeFreeEmbeddedTree(struct bNodeTree *ntree);
|
||||||
struct bNodeTree *ntreeCopyTree_ex(const struct bNodeTree *ntree,
|
struct bNodeTree *ntreeCopyTree_ex(const struct bNodeTree *ntree,
|
||||||
struct Main *bmain,
|
struct Main *bmain,
|
||||||
const bool do_id_user);
|
bool do_id_user);
|
||||||
struct bNodeTree *ntreeCopyTree(struct Main *bmain, const struct bNodeTree *ntree);
|
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 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.
|
* Returns localized tree for execution in threads.
|
||||||
*/
|
*/
|
||||||
@@ -770,7 +770,7 @@ void nodeChainIter(const bNodeTree *ntree,
|
|||||||
const bNode *node_start,
|
const bNode *node_start,
|
||||||
bool (*callback)(bNode *, bNode *, void *, const bool),
|
bool (*callback)(bNode *, bNode *, void *, const bool),
|
||||||
void *userdata,
|
void *userdata,
|
||||||
const bool reversed);
|
bool reversed);
|
||||||
/**
|
/**
|
||||||
* Iterate over a chain of nodes, starting with \a node_start, executing
|
* Iterate over a chain of nodes, starting with \a node_start, executing
|
||||||
* \a callback for each node (which can return false to end iterator).
|
* \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
|
/** \name Node Tree
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree,
|
void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, int layer_index);
|
||||||
struct Scene *scene,
|
|
||||||
const int layer_index);
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
/** \name Shader Nodes
|
/** \name Shader Nodes
|
||||||
@@ -1550,7 +1548,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree,
|
|||||||
float dxt[3],
|
float dxt[3],
|
||||||
float dyt[3],
|
float dyt[3],
|
||||||
int osatex,
|
int osatex,
|
||||||
const short thread,
|
short thread,
|
||||||
const struct Tex *tex,
|
const struct Tex *tex,
|
||||||
short which_output,
|
short which_output,
|
||||||
int cfra,
|
int cfra,
|
||||||
|
@@ -67,11 +67,9 @@ void BKE_object_workob_calc_parent(struct Depsgraph *depsgraph,
|
|||||||
struct Object *workob);
|
struct Object *workob);
|
||||||
|
|
||||||
void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src);
|
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);
|
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, const int flag);
|
struct ParticleSystem *BKE_object_copy_particlesystem(struct ParticleSystem *psys, int flag);
|
||||||
void BKE_object_copy_particlesystems(struct Object *ob_dst,
|
void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src, int flag);
|
||||||
const struct Object *ob_src,
|
|
||||||
const int flag);
|
|
||||||
void BKE_object_free_particlesystems(struct Object *ob);
|
void BKE_object_free_particlesystems(struct Object *ob);
|
||||||
void BKE_object_free_softbody(struct Object *ob);
|
void BKE_object_free_softbody(struct Object *ob);
|
||||||
void BKE_object_free_curve_cache(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,
|
bool BKE_object_modifier_stack_copy(struct Object *ob_dst,
|
||||||
const struct Object *ob_src,
|
const struct Object *ob_src,
|
||||||
const bool do_copy_all,
|
bool do_copy_all,
|
||||||
const int flag_subdata);
|
int flag_subdata);
|
||||||
void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_src);
|
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_modifiers(struct Object *ob, int flag);
|
||||||
void BKE_object_free_shaderfx(struct Object *ob, const int flag);
|
void BKE_object_free_shaderfx(struct Object *ob, int flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Proxy rule:
|
* Proxy rule:
|
||||||
@@ -187,7 +185,7 @@ typedef enum eObjectVisibilityResult {
|
|||||||
/**
|
/**
|
||||||
* Return which parts of the object are visible, as evaluated by depsgraph.
|
* 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.
|
* 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).
|
* 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_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);
|
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],
|
const float mat[4][4],
|
||||||
struct Object *parent,
|
struct Object *parent,
|
||||||
const float parentinv[4][4],
|
const float parentinv[4][4],
|
||||||
const bool use_compat);
|
bool use_compat);
|
||||||
/** See #BKE_object_apply_mat4_ex */
|
/** See #BKE_object_apply_mat4_ex */
|
||||||
void BKE_object_apply_mat4(struct Object *ob,
|
void BKE_object_apply_mat4(struct Object *ob,
|
||||||
const float mat[4][4],
|
const float mat[4][4],
|
||||||
const bool use_compat,
|
bool use_compat,
|
||||||
const bool use_parent);
|
bool use_parent);
|
||||||
void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]);
|
void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]);
|
||||||
|
|
||||||
bool BKE_object_pose_context_check(const struct Object *ob);
|
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]);
|
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_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.
|
* 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);
|
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);
|
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,
|
bool BKE_object_minmax_dupli(struct Depsgraph *depsgraph,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
float r_min[3],
|
float r_min[3],
|
||||||
float r_max[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.
|
* 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,
|
void BKE_object_tfm_protected_restore(struct Object *ob,
|
||||||
const ObjectTfmProtectedChannels *obtfm,
|
const ObjectTfmProtectedChannels *obtfm,
|
||||||
const short protectflag);
|
short protectflag);
|
||||||
|
|
||||||
void BKE_object_tfm_copy(struct Object *object_dst, const struct Object *object_src);
|
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,
|
void BKE_object_eval_eval_base_flags(struct Depsgraph *depsgraph,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
const int view_layer_index,
|
int view_layer_index,
|
||||||
struct Object *object,
|
struct Object *object,
|
||||||
int base_index,
|
int base_index,
|
||||||
const bool is_from_set);
|
bool is_from_set);
|
||||||
|
|
||||||
void BKE_object_handle_data_update(struct Depsgraph *depsgraph,
|
void BKE_object_handle_data_update(struct Depsgraph *depsgraph,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
@@ -504,7 +502,7 @@ void BKE_object_handle_update_ex(struct Depsgraph *depsgraph,
|
|||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct RigidBodyWorld *rbw,
|
struct RigidBodyWorld *rbw,
|
||||||
const bool do_proxy_update);
|
bool do_proxy_update);
|
||||||
|
|
||||||
void BKE_object_sculpt_data_create(struct Object *ob);
|
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 KeyBlock *BKE_object_shapekey_insert(struct Main *bmain,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
const char *name,
|
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_remove(struct Main *bmain, struct Object *ob, struct KeyBlock *kb);
|
||||||
bool BKE_object_shapekey_free(struct Main *bmain, struct Object *ob);
|
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.
|
* 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.
|
* The function frees memory used by the runtime data, but not the runtime field itself.
|
||||||
*
|
*
|
||||||
|
@@ -68,16 +68,14 @@ struct MDeformVert *BKE_object_defgroup_data_create(struct ID *id);
|
|||||||
* \param use_selection: Only operate on selection.
|
* \param use_selection: Only operate on selection.
|
||||||
* \return True if any vertex was removed, false otherwise.
|
* \return True if any vertex was removed, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool BKE_object_defgroup_clear(struct Object *ob,
|
bool BKE_object_defgroup_clear(struct Object *ob, struct bDeformGroup *dg, bool use_selection);
|
||||||
struct bDeformGroup *dg,
|
|
||||||
const bool use_selection);
|
|
||||||
/**
|
/**
|
||||||
* Remove all verts (or only selected ones) from all vgroups. Work in Object and Edit modes.
|
* Remove all verts (or only selected ones) from all vgroups. Work in Object and Edit modes.
|
||||||
*
|
*
|
||||||
* \param use_selection: Only operate on selection.
|
* \param use_selection: Only operate on selection.
|
||||||
* \return True if any vertex was removed, false otherwise.
|
* \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.
|
* 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).
|
* Store indices from the defgroup_validmap (faster lookups in some cases).
|
||||||
*/
|
*/
|
||||||
void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap,
|
void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap,
|
||||||
const int defgroup_tot,
|
int defgroup_tot,
|
||||||
int *r_defgroup_subset_map);
|
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
|
* Gets the status of "flag" for each #bDeformGroup
|
||||||
* in the object data's vertex group list and returns an array containing them
|
* 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_lock_flags_get(struct Object *ob, int defbase_tot);
|
||||||
bool *BKE_object_defgroup_validmap_get(struct Object *ob, const int defbase_tot);
|
bool *BKE_object_defgroup_validmap_get(struct Object *ob, int defbase_tot);
|
||||||
/**
|
/**
|
||||||
* Returns total selected vgroups,
|
* Returns total selected vgroups,
|
||||||
* `wpi.defbase_sel` is assumed malloc'd, all values are set.
|
* `wpi.defbase_sel` is assumed malloc'd, all values are set.
|
||||||
|
@@ -73,13 +73,13 @@ typedef struct OceanCache {
|
|||||||
struct Ocean *BKE_ocean_add(void);
|
struct Ocean *BKE_ocean_add(void);
|
||||||
void BKE_ocean_free_data(struct Ocean *oc);
|
void BKE_ocean_free_data(struct Ocean *oc);
|
||||||
void BKE_ocean_free(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.
|
* Return true if the ocean data is valid and can be used.
|
||||||
*/
|
*/
|
||||||
bool BKE_ocean_init_from_modifier(struct Ocean *ocean,
|
bool BKE_ocean_init_from_modifier(struct Ocean *ocean,
|
||||||
struct OceanModifierData const *omd,
|
struct OceanModifierData const *omd,
|
||||||
const int resolution);
|
int resolution);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the ocean is valid and can be used.
|
* 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
|
* 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.
|
* 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.
|
* TMA extends the JONSWAP spectrum.
|
||||||
* This spectral model is best suited to shallow water.
|
* 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
|
* 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
|
* 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,
|
* The fetch parameter represents the distance from a lee shore,
|
||||||
* called the fetch, or the distance over which the wind blows with constant velocity.
|
* 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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -120,7 +120,7 @@ int BKE_packedfile_write_to_file(struct ReportList *reports,
|
|||||||
const char *ref_file_name,
|
const char *ref_file_name,
|
||||||
const char *filename,
|
const char *filename,
|
||||||
struct PackedFile *pf,
|
struct PackedFile *pf,
|
||||||
const bool guimode);
|
bool guimode);
|
||||||
|
|
||||||
/* Free. */
|
/* Free. */
|
||||||
|
|
||||||
|
@@ -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_color_remove(struct Palette *palette, struct PaletteColor *color);
|
||||||
void BKE_palette_clear(struct Palette *palette);
|
void BKE_palette_clear(struct Palette *palette);
|
||||||
|
|
||||||
void BKE_palette_sort_hsv(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, const int totcol);
|
void BKE_palette_sort_svh(struct tPaletteColorHSV *color_array, int totcol);
|
||||||
void BKE_palette_sort_vhs(struct tPaletteColorHSV *color_array, const int totcol);
|
void BKE_palette_sort_vhs(struct tPaletteColorHSV *color_array, int totcol);
|
||||||
void BKE_palette_sort_luminance(struct tPaletteColorHSV *color_array, const int totcol);
|
void BKE_palette_sort_luminance(struct tPaletteColorHSV *color_array, int totcol);
|
||||||
bool BKE_palette_from_hash(struct Main *bmain,
|
bool BKE_palette_from_hash(struct Main *bmain,
|
||||||
struct GHash *color_table,
|
struct GHash *color_table,
|
||||||
const char *name,
|
const char *name,
|
||||||
const bool linear);
|
bool linear);
|
||||||
|
|
||||||
/* Paint curves. */
|
/* 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
|
* #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()
|
* 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);
|
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);
|
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 struct EnumPropertyItem *BKE_paint_get_tool_enum_from_paintmode(ePaintMode mode);
|
||||||
const char *BKE_paint_get_tool_prop_id_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(struct Scene *sce, struct ViewLayer *view_layer);
|
||||||
struct Paint *BKE_paint_get_active_from_context(const struct bContext *C);
|
struct Paint *BKE_paint_get_active_from_context(const struct bContext *C);
|
||||||
ePaintMode BKE_paintmode_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);
|
struct Palette *BKE_paint_palette(struct Paint *paint);
|
||||||
void BKE_paint_palette_set(struct Paint *p, struct Palette *palette);
|
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_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?
|
* 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);
|
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. */
|
/* Stroke related. */
|
||||||
|
|
||||||
|
@@ -294,10 +294,8 @@ int count_particles_mod(struct ParticleSystem *psys, int totgr, int cur);
|
|||||||
|
|
||||||
int psys_get_child_number(struct Scene *scene,
|
int psys_get_child_number(struct Scene *scene,
|
||||||
struct ParticleSystem *psys,
|
struct ParticleSystem *psys,
|
||||||
const bool use_render_params);
|
bool use_render_params);
|
||||||
int psys_get_tot_child(struct Scene *scene,
|
int psys_get_tot_child(struct Scene *scene, struct ParticleSystem *psys, bool use_render_params);
|
||||||
struct ParticleSystem *psys,
|
|
||||||
const bool use_render_params);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get object's active particle system safely.
|
* Get object's active particle system safely.
|
||||||
@@ -329,9 +327,7 @@ struct ParticleSystem *psys_eval_get(struct Depsgraph *depsgraph,
|
|||||||
struct ParticleSystem *psys);
|
struct ParticleSystem *psys);
|
||||||
|
|
||||||
bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys);
|
bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys);
|
||||||
bool psys_check_enabled(struct Object *ob,
|
bool psys_check_enabled(struct Object *ob, struct ParticleSystem *psys, bool use_render_params);
|
||||||
struct ParticleSystem *psys,
|
|
||||||
const bool use_render_params);
|
|
||||||
bool psys_check_edited(struct ParticleSystem *psys);
|
bool psys_check_edited(struct ParticleSystem *psys);
|
||||||
|
|
||||||
void psys_find_group_weights(struct ParticleSettings *part);
|
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);
|
struct ParticleSettings *BKE_particlesettings_add(struct Main *bmain, const char *name);
|
||||||
void psys_reset(struct ParticleSystem *psys, int mode);
|
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);
|
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.
|
* - 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.
|
* - Cached path data is also used to determine cut position for the edit-mode tool.
|
||||||
*/
|
*/
|
||||||
void psys_cache_paths(struct ParticleSimulationData *sim,
|
void psys_cache_paths(struct ParticleSimulationData *sim, float cfra, bool use_render_params);
|
||||||
float cfra,
|
|
||||||
const bool use_render_params);
|
|
||||||
void psys_cache_edit_paths(struct Depsgraph *depsgraph,
|
void psys_cache_edit_paths(struct Depsgraph *depsgraph,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct PTCacheEdit *edit,
|
struct PTCacheEdit *edit,
|
||||||
float cfra,
|
float cfra,
|
||||||
const bool use_render_params);
|
bool use_render_params);
|
||||||
void psys_cache_child_paths(struct ParticleSimulationData *sim,
|
void psys_cache_child_paths(struct ParticleSimulationData *sim,
|
||||||
float cfra,
|
float cfra,
|
||||||
const bool editupdate,
|
bool editupdate,
|
||||||
const bool use_render_params);
|
bool use_render_params);
|
||||||
int do_guides(struct Depsgraph *depsgraph,
|
int do_guides(struct Depsgraph *depsgraph,
|
||||||
struct ParticleSettings *part,
|
struct ParticleSettings *part,
|
||||||
struct ListBase *effectors,
|
struct ListBase *effectors,
|
||||||
@@ -438,7 +432,7 @@ float psys_get_child_size(struct ParticleSystem *psys,
|
|||||||
void psys_get_particle_on_path(struct ParticleSimulationData *sim,
|
void psys_get_particle_on_path(struct ParticleSimulationData *sim,
|
||||||
int pa_num,
|
int pa_num,
|
||||||
struct ParticleKey *state,
|
struct ParticleKey *state,
|
||||||
const bool vel);
|
bool vel);
|
||||||
/**
|
/**
|
||||||
* Gets particle's state at a time.
|
* Gets particle's state at a time.
|
||||||
* \return true if particle exists and can be seen and false if not.
|
* \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,
|
bool psys_get_particle_state(struct ParticleSimulationData *sim,
|
||||||
int p,
|
int p,
|
||||||
struct ParticleKey *state,
|
struct ParticleKey *state,
|
||||||
const bool always);
|
bool always);
|
||||||
|
|
||||||
/* Child paths. */
|
/* Child paths. */
|
||||||
|
|
||||||
@@ -539,7 +533,7 @@ void particle_system_update(struct Depsgraph *depsgraph,
|
|||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct ParticleSystem *psys,
|
struct ParticleSystem *psys,
|
||||||
const bool use_render_params);
|
bool use_render_params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback format for performing operations on ID-pointers for particle systems.
|
* Callback format for performing operations on ID-pointers for particle systems.
|
||||||
@@ -678,8 +672,7 @@ void reset_particle(struct ParticleSimulationData *sim,
|
|||||||
float dtime,
|
float dtime,
|
||||||
float cfra);
|
float cfra);
|
||||||
|
|
||||||
float psys_get_current_display_percentage(struct ParticleSystem *psys,
|
float psys_get_current_display_percentage(struct ParticleSystem *psys, bool use_render_params);
|
||||||
const bool use_render_params);
|
|
||||||
|
|
||||||
/* psys_reset */
|
/* psys_reset */
|
||||||
#define PSYS_RESET_ALL 1
|
#define PSYS_RESET_ALL 1
|
||||||
|
@@ -137,8 +137,8 @@ void BKE_pbvh_build_bmesh(PBVH *pbvh,
|
|||||||
struct BMesh *bm,
|
struct BMesh *bm,
|
||||||
bool smooth_shading,
|
bool smooth_shading,
|
||||||
struct BMLog *log,
|
struct BMLog *log,
|
||||||
const int cd_vert_node_offset,
|
int cd_vert_node_offset,
|
||||||
const int cd_face_node_offset);
|
int cd_face_node_offset);
|
||||||
void BKE_pbvh_free(PBVH *pbvh);
|
void BKE_pbvh_free(PBVH *pbvh);
|
||||||
|
|
||||||
/* Hierarchical Search in the BVH, two methods:
|
/* 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 center[3],
|
||||||
const float view_normal[3],
|
const float view_normal[3],
|
||||||
float radius,
|
float radius,
|
||||||
const bool use_frontface,
|
bool use_frontface,
|
||||||
const bool use_projected);
|
bool use_projected);
|
||||||
|
|
||||||
/* Node Access */
|
/* Node Access */
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@ void BKE_pbvh_respect_hide_set(PBVH *pbvh, bool respect_hide);
|
|||||||
/* Vertex Deformer. */
|
/* Vertex Deformer. */
|
||||||
|
|
||||||
float (*BKE_pbvh_vert_coords_alloc(struct PBVH *pbvh))[3];
|
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);
|
bool BKE_pbvh_is_deformed(struct PBVH *pbvh);
|
||||||
|
|
||||||
/* Vertex Iterator. */
|
/* Vertex Iterator. */
|
||||||
|
@@ -363,7 +363,7 @@ void BKE_ptcache_free_list(struct ListBase *ptcaches);
|
|||||||
/* returns first point cache */
|
/* returns first point cache */
|
||||||
struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new,
|
struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new,
|
||||||
const struct ListBase *ptcaches_old,
|
const struct ListBase *ptcaches_old,
|
||||||
const int flag);
|
int flag);
|
||||||
|
|
||||||
/********************** Baking *********************/
|
/********************** Baking *********************/
|
||||||
|
|
||||||
|
@@ -38,7 +38,7 @@ extern const char *POINTCLOUD_ATTR_RADIUS;
|
|||||||
|
|
||||||
void *BKE_pointcloud_add(struct Main *bmain, const char *name);
|
void *BKE_pointcloud_add(struct Main *bmain, const char *name);
|
||||||
void *BKE_pointcloud_add_default(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);
|
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]);
|
bool BKE_pointcloud_minmax(const struct PointCloud *pointcloud, float r_min[3], float r_max[3]);
|
||||||
|
@@ -60,7 +60,7 @@ void BKE_rigidbody_free_constraint(struct Object *ob);
|
|||||||
void BKE_rigidbody_object_copy(struct Main *bmain,
|
void BKE_rigidbody_object_copy(struct Main *bmain,
|
||||||
struct Object *ob_dst,
|
struct Object *ob_dst,
|
||||||
const struct Object *ob_src,
|
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.
|
* 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);
|
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,
|
void BKE_rigidbody_remove_object(struct Main *bmain,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
const bool free_us);
|
bool free_us);
|
||||||
void BKE_rigidbody_remove_constraint(struct Main *bmain,
|
void BKE_rigidbody_remove_constraint(struct Main *bmain,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
const bool free_us);
|
bool free_us);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
|
@@ -83,7 +83,7 @@ struct Scene *BKE_scene_add(struct Main *bmain, const char *name);
|
|||||||
void BKE_scene_remove_rigidbody_object(struct Main *bmain,
|
void BKE_scene_remove_rigidbody_object(struct Main *bmain,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
const bool free_us);
|
bool free_us);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if there is any instance of the object in the scene.
|
* 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).
|
* \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);
|
void BKE_toolsettings_free(struct ToolSettings *toolsettings);
|
||||||
|
|
||||||
struct Scene *BKE_scene_duplicate(struct Main *bmain, struct Scene *sce, eSceneCopyMethod type);
|
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
|
* Convert integer frame number to fractional frame number taking into account
|
||||||
* sub-frames and time remapping.
|
* 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.
|
* 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.
|
* 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.
|
* 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
|
* Apply the needed correction factor to value, based on unit_type
|
||||||
* (only length-related are affected currently) and `unit->scale_length`.
|
* (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. */
|
/* 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);
|
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);
|
int BKE_scene_multiview_num_views_get(const struct RenderData *rd);
|
||||||
struct SceneRenderView *BKE_scene_multiview_render_view_findindex(const struct RenderData *rd,
|
struct SceneRenderView *BKE_scene_multiview_render_view_findindex(const struct RenderData *rd,
|
||||||
const int view_id);
|
int view_id);
|
||||||
const char *BKE_scene_multiview_render_view_name_get(const struct RenderData *rd,
|
const char *BKE_scene_multiview_render_view_name_get(const struct RenderData *rd, int view_id);
|
||||||
const int view_id);
|
|
||||||
int BKE_scene_multiview_view_id_get(const struct RenderData *rd, const char *viewname);
|
int BKE_scene_multiview_view_id_get(const struct RenderData *rd, const char *viewname);
|
||||||
void BKE_scene_multiview_filepath_get(struct SceneRenderView *srv,
|
void BKE_scene_multiview_filepath_get(struct SceneRenderView *srv,
|
||||||
const char *filepath,
|
const char *filepath,
|
||||||
@@ -313,7 +312,7 @@ void BKE_scene_multiview_view_filepath_get(const struct RenderData *rd,
|
|||||||
const char *view,
|
const char *view,
|
||||||
char *r_filepath);
|
char *r_filepath);
|
||||||
const char *BKE_scene_multiview_view_suffix_get(const struct RenderData *rd, const char *viewname);
|
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,
|
void BKE_scene_multiview_view_prefix_get(struct Scene *scene,
|
||||||
const char *name,
|
const char *name,
|
||||||
char *r_prefix,
|
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,
|
void BKE_scene_transform_orientation_remove(struct Scene *scene,
|
||||||
struct TransformOrientation *orientation);
|
struct TransformOrientation *orientation);
|
||||||
struct TransformOrientation *BKE_scene_transform_orientation_find(const struct Scene *scene,
|
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
|
* \return the index that \a orientation has within \a scene's transform-orientation list
|
||||||
* or -1 if not found.
|
* or -1 if not found.
|
||||||
|
@@ -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_type(const struct ScrArea *area, int type);
|
||||||
struct ARegion *BKE_area_find_region_active_win(struct ScrArea *area);
|
struct ARegion *BKE_area_find_region_active_win(struct ScrArea *area);
|
||||||
struct ARegion *BKE_area_find_region_xy(struct ScrArea *area,
|
struct ARegion *BKE_area_find_region_xy(struct ScrArea *area, int regiontype, const int xy[2])
|
||||||
const int regiontype,
|
ATTR_NONNULL(3);
|
||||||
const int xy[2]) ATTR_NONNULL(3);
|
|
||||||
/**
|
/**
|
||||||
* \note This is only for screen level regions (typically menus/popups).
|
* \note This is only for screen level regions (typically menus/popups).
|
||||||
*/
|
*/
|
||||||
struct ARegion *BKE_screen_find_region_xy(struct bScreen *screen,
|
struct ARegion *BKE_screen_find_region_xy(struct bScreen *screen,
|
||||||
const int regiontype,
|
int regiontype,
|
||||||
const int xy[2]) ATTR_WARN_UNUSED_RESULT
|
const int xy[2]) ATTR_WARN_UNUSED_RESULT
|
||||||
ATTR_NONNULL(1, 3);
|
ATTR_NONNULL(1, 3);
|
||||||
|
|
||||||
struct ARegion *BKE_screen_find_main_region_at_xy(struct bScreen *screen,
|
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);
|
const int xy[2]) ATTR_NONNULL(1, 3);
|
||||||
/**
|
/**
|
||||||
* \note Ideally we can get the area from the context,
|
* \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
|
* \note Using this function is generally a last resort, you really want to be
|
||||||
* using the context when you can - campbell
|
* using the context when you can - campbell
|
||||||
*/
|
*/
|
||||||
struct ScrArea *BKE_screen_find_big_area(struct bScreen *screen,
|
struct ScrArea *BKE_screen_find_big_area(struct bScreen *screen, int spacetype, short min);
|
||||||
const int spacetype,
|
|
||||||
const short min);
|
|
||||||
struct ScrArea *BKE_screen_area_map_find_area_xy(const struct ScrAreaMap *areamap,
|
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);
|
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);
|
void BKE_screen_gizmo_tag_refresh(struct bScreen *screen);
|
||||||
|
|
||||||
|
@@ -164,7 +164,7 @@ void BKE_shaderfxType_panel_id(ShaderFxType type, char *r_idname);
|
|||||||
void BKE_shaderfx_panel_expand(struct ShaderFxData *fx);
|
void BKE_shaderfx_panel_expand(struct ShaderFxData *fx);
|
||||||
const ShaderFxTypeInfo *BKE_shaderfx_get_info(ShaderFxType type);
|
const ShaderFxTypeInfo *BKE_shaderfx_get_info(ShaderFxType type);
|
||||||
struct ShaderFxData *BKE_shaderfx_new(int 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);
|
void BKE_shaderfx_free(struct ShaderFxData *fx);
|
||||||
/**
|
/**
|
||||||
* Check unique name.
|
* 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);
|
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_generic(const struct ShaderFxData *fx_src, struct ShaderFxData *fx_dst);
|
||||||
void BKE_shaderfx_copydata(struct ShaderFxData *fx, struct ShaderFxData *target);
|
void BKE_shaderfx_copydata(struct ShaderFxData *fx, struct ShaderFxData *target);
|
||||||
void BKE_shaderfx_copydata_ex(struct ShaderFxData *fx,
|
void BKE_shaderfx_copydata_ex(struct ShaderFxData *fx, struct ShaderFxData *target, int flag);
|
||||||
struct ShaderFxData *target,
|
|
||||||
const int flag);
|
|
||||||
void BKE_shaderfx_copy(struct ListBase *dst, const struct ListBase *src);
|
void BKE_shaderfx_copy(struct ListBase *dst, const struct ListBase *src);
|
||||||
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *userData);
|
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *userData);
|
||||||
|
|
||||||
|
@@ -121,14 +121,14 @@ void shrinkwrapModifier_deform(struct ShrinkwrapModifierData *smd,
|
|||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct Mesh *mesh,
|
struct Mesh *mesh,
|
||||||
struct MDeformVert *dvert,
|
struct MDeformVert *dvert,
|
||||||
const int defgrp_index,
|
int defgrp_index,
|
||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts);
|
int numVerts);
|
||||||
/* Implementation of the Shrinkwrap Grease Pencil modifier. */
|
/* Implementation of the Shrinkwrap Grease Pencil modifier. */
|
||||||
void shrinkwrapGpencilModifier_deform(struct ShrinkwrapGpencilModifierData *mmd,
|
void shrinkwrapGpencilModifier_deform(struct ShrinkwrapGpencilModifierData *mmd,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct MDeformVert *dvert,
|
struct MDeformVert *dvert,
|
||||||
const int defgrp_index,
|
int defgrp_index,
|
||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts);
|
int numVerts);
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ void BKE_shrinkwrap_remesh_target_project(struct Mesh *src_me,
|
|||||||
bool BKE_shrinkwrap_project_normal(char options,
|
bool BKE_shrinkwrap_project_normal(char options,
|
||||||
const float vert[3],
|
const float vert[3],
|
||||||
const float dir[3],
|
const float dir[3],
|
||||||
const float ray_radius,
|
float ray_radius,
|
||||||
const struct SpaceTransform *transf,
|
const struct SpaceTransform *transf,
|
||||||
struct ShrinkwrapTreeData *tree,
|
struct ShrinkwrapTreeData *tree,
|
||||||
BVHTreeRayHit *hit);
|
BVHTreeRayHit *hit);
|
||||||
|
@@ -127,9 +127,9 @@ class Spline {
|
|||||||
virtual int size() const = 0;
|
virtual int size() const = 0;
|
||||||
int segments_size() const;
|
int segments_size() const;
|
||||||
bool is_cyclic() 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::MutableSpan<blender::float3> positions() = 0;
|
||||||
virtual blender::Span<blender::float3> positions() const = 0;
|
virtual blender::Span<blender::float3> positions() const = 0;
|
||||||
virtual blender::MutableSpan<float> radii() = 0;
|
virtual blender::MutableSpan<float> radii() = 0;
|
||||||
@@ -175,7 +175,7 @@ class Spline {
|
|||||||
*/
|
*/
|
||||||
blender::Span<blender::float3> evaluated_normals() const;
|
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 {
|
struct LookupResult {
|
||||||
/**
|
/**
|
||||||
@@ -202,20 +202,20 @@ class Spline {
|
|||||||
* factor between them, which can be used to look up any attribute on the evaluated points.
|
* factor between them, which can be used to look up any attribute on the evaluated points.
|
||||||
* \note This does not support extrapolation.
|
* \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
|
* The same as #lookup_evaluated_factor, but looks up a length directly instead of
|
||||||
* a portion of the total.
|
* 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
|
* 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
|
* 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.
|
* float values to interpolation data is in #lookup_data_from_index_factor.
|
||||||
*/
|
*/
|
||||||
blender::Array<float> sample_uniform_index_factors(const int samples_size) const;
|
blender::Array<float> sample_uniform_index_factors(int samples_size) const;
|
||||||
LookupResult lookup_data_from_index_factor(const float index_factor) 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
|
* 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 size() const final;
|
||||||
int resolution() const;
|
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::MutableSpan<blender::float3> positions() final;
|
||||||
blender::Span<blender::float3> positions() const final;
|
blender::Span<blender::float3> positions() const final;
|
||||||
blender::MutableSpan<float> radii() 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
|
* 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.
|
* 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
|
* 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.
|
* 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;
|
void mark_cache_invalid() final;
|
||||||
int evaluated_points_size() const 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
|
* 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.
|
* 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(
|
virtual blender::fn::GVArray interpolate_to_evaluated(
|
||||||
const blender::fn::GVArray &src) const override;
|
const blender::fn::GVArray &src) const override;
|
||||||
|
|
||||||
void evaluate_segment(const int index,
|
void evaluate_segment(int index,
|
||||||
const int next_index,
|
int next_index,
|
||||||
blender::MutableSpan<blender::float3> positions) const;
|
blender::MutableSpan<blender::float3> positions) const;
|
||||||
/**
|
/**
|
||||||
* \warning This functional assumes that the spline has more than one point.
|
* \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. */
|
/** See comment and diagram for #calculate_segment_insertion. */
|
||||||
struct InsertResult {
|
struct InsertResult {
|
||||||
@@ -454,9 +454,7 @@ class BezierSpline final : public Spline {
|
|||||||
* point_prev point_next
|
* point_prev point_next
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
InsertResult calculate_segment_insertion(const int index,
|
InsertResult calculate_segment_insertion(int index, int next_index, float parameter);
|
||||||
const int next_index,
|
|
||||||
const float parameter);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
@@ -552,14 +550,14 @@ class NURBSpline final : public Spline {
|
|||||||
|
|
||||||
int size() const final;
|
int size() const final;
|
||||||
int resolution() const;
|
int resolution() const;
|
||||||
void set_resolution(const int value);
|
void set_resolution(int value);
|
||||||
uint8_t order() const;
|
uint8_t order() const;
|
||||||
void set_order(const uint8_t value);
|
void set_order(uint8_t value);
|
||||||
|
|
||||||
bool check_valid_size_and_order() const;
|
bool check_valid_size_and_order() const;
|
||||||
int knots_size() const;
|
int knots_size() const;
|
||||||
|
|
||||||
void resize(const int size) final;
|
void resize(int size) final;
|
||||||
blender::MutableSpan<blender::float3> positions() final;
|
blender::MutableSpan<blender::float3> positions() final;
|
||||||
blender::Span<blender::float3> positions() const final;
|
blender::Span<blender::float3> positions() const final;
|
||||||
blender::MutableSpan<float> radii() final;
|
blender::MutableSpan<float> radii() final;
|
||||||
@@ -615,7 +613,7 @@ class PolySpline final : public Spline {
|
|||||||
|
|
||||||
int size() const final;
|
int size() const final;
|
||||||
|
|
||||||
void resize(const int size) final;
|
void resize(int size) final;
|
||||||
blender::MutableSpan<blender::float3> positions() final;
|
blender::MutableSpan<blender::float3> positions() final;
|
||||||
blender::Span<blender::float3> positions() const final;
|
blender::Span<blender::float3> positions() const final;
|
||||||
blender::MutableSpan<float> radii() final;
|
blender::MutableSpan<float> radii() final;
|
||||||
@@ -676,7 +674,7 @@ struct CurveEval {
|
|||||||
*/
|
*/
|
||||||
bool has_spline_with_type(const Spline::Type type) const;
|
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.
|
* \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 translate(const blender::float3 &translation);
|
||||||
void transform(const blender::float4x4 &matrix);
|
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
|
* Return the start indices for each of the curve spline's control points, if they were part
|
||||||
|
@@ -151,9 +151,9 @@ typedef struct SubdivDisplacement {
|
|||||||
* Averaging of displacement for vertices created for over coarse vertices
|
* Averaging of displacement for vertices created for over coarse vertices
|
||||||
* and edges is done by subdiv code. */
|
* and edges is done by subdiv code. */
|
||||||
void (*eval_displacement)(struct SubdivDisplacement *displacement,
|
void (*eval_displacement)(struct SubdivDisplacement *displacement,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
const float dPdu[3],
|
const float dPdu[3],
|
||||||
const float dPdv[3],
|
const float dPdv[3],
|
||||||
float r_D[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
|
/* For a given (ptex_u, ptex_v) within a ptex face get corresponding
|
||||||
* (grid_u, grid_v) within a grid. */
|
* (grid_u, grid_v) within a grid. */
|
||||||
BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv(const float ptex_u,
|
BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv(float ptex_u,
|
||||||
const float ptex_v,
|
float ptex_v,
|
||||||
float *r_grid_u,
|
float *r_grid_u,
|
||||||
float *r_grid_v);
|
float *r_grid_v);
|
||||||
|
|
||||||
/* Inverse of above. */
|
/* Inverse of above. */
|
||||||
BLI_INLINE void BKE_subdiv_grid_uv_to_ptex_face_uv(const float grid_u,
|
BLI_INLINE void BKE_subdiv_grid_uv_to_ptex_face_uv(float grid_u,
|
||||||
const float grid_v,
|
float grid_v,
|
||||||
float *r_ptex_u,
|
float *r_ptex_u,
|
||||||
float *r_ptex_v);
|
float *r_ptex_v);
|
||||||
|
|
||||||
/* For a given subdivision level (which is NOT refinement level) get size of
|
/* For a given subdivision level (which is NOT refinement level) get size of
|
||||||
* CCG grid (number of grid points on a side).
|
* 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
|
/* Simplified version of mdisp_rot_face_to_crn, only handles quad and
|
||||||
* works in normalized coordinates.
|
* works in normalized coordinates.
|
||||||
*
|
*
|
||||||
* NOTE: Output coordinates are in ptex coordinates. */
|
* NOTE: Output coordinates are in ptex coordinates. */
|
||||||
BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(const float quad_u,
|
BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(float quad_u,
|
||||||
const float quad_v,
|
float quad_v,
|
||||||
float *r_corner_u,
|
float *r_corner_u,
|
||||||
float *r_corner_v);
|
float *r_corner_v);
|
||||||
|
|
||||||
/* Converts (u, v) coordinate from within a grid to a quad coordinate in
|
/* Converts (u, v) coordinate from within a grid to a quad coordinate in
|
||||||
* normalized ptex coordinates. */
|
* normalized ptex coordinates. */
|
||||||
BLI_INLINE void BKE_subdiv_rotate_grid_to_quad(
|
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. */
|
/* Convert Blender edge crease value to OpenSubdiv sharpness. */
|
||||||
BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_f(float edge_crease);
|
BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_f(float edge_crease);
|
||||||
|
@@ -46,9 +46,9 @@ struct Subdiv;
|
|||||||
/* Functor which evaluates mask value at a given (u, v) of given ptex face. */
|
/* Functor which evaluates mask value at a given (u, v) of given ptex face. */
|
||||||
typedef struct SubdivCCGMaskEvaluator {
|
typedef struct SubdivCCGMaskEvaluator {
|
||||||
float (*eval_mask)(struct SubdivCCGMaskEvaluator *mask_evaluator,
|
float (*eval_mask)(struct SubdivCCGMaskEvaluator *mask_evaluator,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v);
|
float v);
|
||||||
|
|
||||||
/* Free the data, not the evaluator itself. */
|
/* Free the data, not the evaluator itself. */
|
||||||
void (*free)(struct SubdivCCGMaskEvaluator *mask_evaluator);
|
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. */
|
/* Functor which evaluates material and flags of a given coarse face. */
|
||||||
typedef struct SubdivCCGMaterialFlagsEvaluator {
|
typedef struct SubdivCCGMaterialFlagsEvaluator {
|
||||||
DMFlagMat (*eval_material_flags)(
|
DMFlagMat (*eval_material_flags)(
|
||||||
struct SubdivCCGMaterialFlagsEvaluator *material_flags_evaluator,
|
struct SubdivCCGMaterialFlagsEvaluator *material_flags_evaluator, int coarse_face_index);
|
||||||
const int coarse_face_index);
|
|
||||||
|
|
||||||
/* Free the data, not the evaluator itself. */
|
/* Free the data, not the evaluator itself. */
|
||||||
void (*free)(struct SubdivCCGMaterialFlagsEvaluator *material_flags_evaluator);
|
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. */
|
* the current vertex are added at the end of the coords array. */
|
||||||
void BKE_subdiv_ccg_neighbor_coords_get(const SubdivCCG *subdiv_ccg,
|
void BKE_subdiv_ccg_neighbor_coords_get(const SubdivCCG *subdiv_ccg,
|
||||||
const SubdivCCGCoord *coord,
|
const SubdivCCGCoord *coord,
|
||||||
const bool include_duplicates,
|
bool include_duplicates,
|
||||||
SubdivCCGNeighbors *r_neighbors);
|
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,
|
void BKE_subdiv_ccg_eval_limit_point(const SubdivCCG *subdiv_ccg,
|
||||||
const SubdivCCGCoord *coord,
|
const SubdivCCGCoord *coord,
|
||||||
float r_point[3]);
|
float r_point[3]);
|
||||||
|
@@ -65,33 +65,25 @@ void BKE_subdiv_eval_init_displacement(struct Subdiv *subdiv);
|
|||||||
/* Evaluate point at a limit surface, with optional derivatives and normal. */
|
/* Evaluate point at a limit surface, with optional derivatives and normal. */
|
||||||
|
|
||||||
void BKE_subdiv_eval_limit_point(
|
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,
|
void BKE_subdiv_eval_limit_point_and_derivatives(struct Subdiv *subdiv,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
float r_P[3],
|
float r_P[3],
|
||||||
float r_dPdu[3],
|
float r_dPdu[3],
|
||||||
float r_dPdv[3]);
|
float r_dPdv[3]);
|
||||||
void BKE_subdiv_eval_limit_point_and_normal(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_limit_point_and_normal(
|
||||||
const int ptex_face_index,
|
struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_N[3]);
|
||||||
const float u,
|
void BKE_subdiv_eval_limit_point_and_short_normal(
|
||||||
const float v,
|
struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], short r_N[3]);
|
||||||
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]);
|
|
||||||
|
|
||||||
/* Evaluate face-varying layer (such as UV). */
|
/* Evaluate face-varying layer (such as UV). */
|
||||||
void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv,
|
||||||
const int face_varying_channel,
|
int face_varying_channel,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
float r_face_varying[2]);
|
float r_face_varying[2]);
|
||||||
|
|
||||||
/* NOTE: Expects derivatives to be correct.
|
/* 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
|
* Would be nice to have displacement evaluation function which does not require
|
||||||
* knowing derivatives ahead of a time. */
|
* knowing derivatives ahead of a time. */
|
||||||
void BKE_subdiv_eval_displacement(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_displacement(struct Subdiv *subdiv,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
const float dPdu[3],
|
const float dPdu[3],
|
||||||
const float dPdv[3],
|
const float dPdv[3],
|
||||||
float r_D[3]);
|
float r_D[3]);
|
||||||
|
|
||||||
/* Evaluate point on a limit surface with displacement applied to it. */
|
/* Evaluate point on a limit surface with displacement applied to it. */
|
||||||
void BKE_subdiv_eval_final_point(
|
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.
|
/* Patch queries at given resolution.
|
||||||
*
|
*
|
||||||
@@ -119,41 +111,41 @@ void BKE_subdiv_eval_final_point(
|
|||||||
* goes as u in rows, v in columns. */
|
* goes as u in rows, v in columns. */
|
||||||
|
|
||||||
void BKE_subdiv_eval_limit_patch_resolution_point(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_limit_patch_resolution_point(struct Subdiv *subdiv,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const int resolution,
|
int resolution,
|
||||||
void *buffer,
|
void *buffer,
|
||||||
const int offset,
|
int offset,
|
||||||
const int stride);
|
int stride);
|
||||||
void BKE_subdiv_eval_limit_patch_resolution_point_and_derivatives(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_limit_patch_resolution_point_and_derivatives(struct Subdiv *subdiv,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const int resolution,
|
int resolution,
|
||||||
void *point_buffer,
|
void *point_buffer,
|
||||||
const int point_offset,
|
int point_offset,
|
||||||
const int point_stride,
|
int point_stride,
|
||||||
void *du_buffer,
|
void *du_buffer,
|
||||||
const int du_offset,
|
int du_offset,
|
||||||
const int du_stride,
|
int du_stride,
|
||||||
void *dv_buffer,
|
void *dv_buffer,
|
||||||
const int dv_offset,
|
int dv_offset,
|
||||||
const int dv_stride);
|
int dv_stride);
|
||||||
void BKE_subdiv_eval_limit_patch_resolution_point_and_normal(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_limit_patch_resolution_point_and_normal(struct Subdiv *subdiv,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const int resolution,
|
int resolution,
|
||||||
void *point_buffer,
|
void *point_buffer,
|
||||||
const int point_offset,
|
int point_offset,
|
||||||
const int point_stride,
|
int point_stride,
|
||||||
void *normal_buffer,
|
void *normal_buffer,
|
||||||
const int normal_offset,
|
int normal_offset,
|
||||||
const int normal_stride);
|
int normal_stride);
|
||||||
void BKE_subdiv_eval_limit_patch_resolution_point_and_short_normal(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_limit_patch_resolution_point_and_short_normal(struct Subdiv *subdiv,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const int resolution,
|
int resolution,
|
||||||
void *point_buffer,
|
void *point_buffer,
|
||||||
const int point_offset,
|
int point_offset,
|
||||||
const int point_stride,
|
int point_stride,
|
||||||
void *normal_buffer,
|
void *normal_buffer,
|
||||||
const int normal_offset,
|
int normal_offset,
|
||||||
const int normal_stride);
|
int normal_stride);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -35,77 +35,77 @@ struct SubdivForeachContext;
|
|||||||
struct SubdivToMeshSettings;
|
struct SubdivToMeshSettings;
|
||||||
|
|
||||||
typedef bool (*SubdivForeachTopologyInformationCb)(const struct SubdivForeachContext *context,
|
typedef bool (*SubdivForeachTopologyInformationCb)(const struct SubdivForeachContext *context,
|
||||||
const int num_vertices,
|
int num_vertices,
|
||||||
const int num_edges,
|
int num_edges,
|
||||||
const int num_loops,
|
int num_loops,
|
||||||
const int num_polygons,
|
int num_polygons,
|
||||||
const int *subdiv_polygon_offset);
|
const int *subdiv_polygon_offset);
|
||||||
|
|
||||||
typedef void (*SubdivForeachVertexFromCornerCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachVertexFromCornerCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
const int coarse_vertex_index,
|
int coarse_vertex_index,
|
||||||
const int coarse_poly_index,
|
int coarse_poly_index,
|
||||||
const int coarse_corner,
|
int coarse_corner,
|
||||||
const int subdiv_vertex_index);
|
int subdiv_vertex_index);
|
||||||
|
|
||||||
typedef void (*SubdivForeachVertexFromEdgeCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachVertexFromEdgeCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
const int coarse_edge_index,
|
int coarse_edge_index,
|
||||||
const int coarse_poly_index,
|
int coarse_poly_index,
|
||||||
const int coarse_corner,
|
int coarse_corner,
|
||||||
const int subdiv_vertex_index);
|
int subdiv_vertex_index);
|
||||||
|
|
||||||
typedef void (*SubdivForeachVertexInnerCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachVertexInnerCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
const int coarse_poly_index,
|
int coarse_poly_index,
|
||||||
const int coarse_corner,
|
int coarse_corner,
|
||||||
const int subdiv_vertex_index);
|
int subdiv_vertex_index);
|
||||||
|
|
||||||
typedef void (*SubdivForeachEdgeCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachEdgeCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int coarse_edge_index,
|
int coarse_edge_index,
|
||||||
const int subdiv_edge_index,
|
int subdiv_edge_index,
|
||||||
const int subdiv_v1,
|
int subdiv_v1,
|
||||||
const int subdiv_v2);
|
int subdiv_v2);
|
||||||
|
|
||||||
typedef void (*SubdivForeachLoopCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachLoopCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int ptex_face_index,
|
int ptex_face_index,
|
||||||
const float u,
|
float u,
|
||||||
const float v,
|
float v,
|
||||||
const int coarse_loop_index,
|
int coarse_loop_index,
|
||||||
const int coarse_poly_index,
|
int coarse_poly_index,
|
||||||
const int coarse_corner,
|
int coarse_corner,
|
||||||
const int subdiv_loop_index,
|
int subdiv_loop_index,
|
||||||
const int subdiv_vertex_index,
|
int subdiv_vertex_index,
|
||||||
const int subdiv_edge_index);
|
int subdiv_edge_index);
|
||||||
|
|
||||||
typedef void (*SubdivForeachPolygonCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachPolygonCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int coarse_poly_index,
|
int coarse_poly_index,
|
||||||
const int subdiv_poly_index,
|
int subdiv_poly_index,
|
||||||
const int start_loop_index,
|
int start_loop_index,
|
||||||
const int num_loops);
|
int num_loops);
|
||||||
|
|
||||||
typedef void (*SubdivForeachLooseCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachLooseCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int coarse_vertex_index,
|
int coarse_vertex_index,
|
||||||
const int subdiv_vertex_index);
|
int subdiv_vertex_index);
|
||||||
|
|
||||||
typedef void (*SubdivForeachVertexOfLooseEdgeCb)(const struct SubdivForeachContext *context,
|
typedef void (*SubdivForeachVertexOfLooseEdgeCb)(const struct SubdivForeachContext *context,
|
||||||
void *tls,
|
void *tls,
|
||||||
const int coarse_edge_index,
|
int coarse_edge_index,
|
||||||
const float u,
|
float u,
|
||||||
const int subdiv_vertex_index);
|
int subdiv_vertex_index);
|
||||||
|
|
||||||
typedef struct SubdivForeachContext {
|
typedef struct SubdivForeachContext {
|
||||||
/* Is called when topology information becomes available.
|
/* Is called when topology information becomes available.
|
||||||
|
@@ -38,7 +38,7 @@ struct SubsurfModifierData;
|
|||||||
|
|
||||||
void BKE_subsurf_modifier_subdiv_settings_init(struct SubdivSettings *settings,
|
void BKE_subsurf_modifier_subdiv_settings_init(struct SubdivSettings *settings,
|
||||||
const struct SubsurfModifierData *smd,
|
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
|
/* If skip_check_is_last is true, we assume that the modifier passed is the last enabled modifier
|
||||||
* in the stack. */
|
* 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,
|
bool BKE_subsurf_modifier_can_do_gpu_subdiv(const struct Scene *scene,
|
||||||
const struct Object *ob,
|
const struct Object *ob,
|
||||||
const int required_mode);
|
int required_mode);
|
||||||
|
|
||||||
extern void (*BKE_subsurf_modifier_free_gpu_cache_cb)(struct Subdiv *subdiv);
|
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 SubsurfModifierData *smd,
|
||||||
const struct SubdivSettings *subdiv_settings,
|
const struct SubdivSettings *subdiv_settings,
|
||||||
const struct Mesh *mesh,
|
const struct Mesh *mesh,
|
||||||
const bool for_draw_code);
|
bool for_draw_code);
|
||||||
|
|
||||||
struct SubsurfRuntimeData *BKE_subsurf_modifier_ensure_runtime(struct SubsurfModifierData *smd);
|
struct SubsurfRuntimeData *BKE_subsurf_modifier_ensure_runtime(struct SubsurfModifierData *smd);
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ bool BKE_text_reload(struct Text *text);
|
|||||||
struct Text *BKE_text_load_ex(struct Main *bmain,
|
struct Text *BKE_text_load_ex(struct Main *bmain,
|
||||||
const char *file,
|
const char *file,
|
||||||
const char *relpath,
|
const char *relpath,
|
||||||
const bool is_internal);
|
bool is_internal);
|
||||||
/**
|
/**
|
||||||
* Load a text file.
|
* 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);
|
char *txt_to_buf(struct Text *text, int *r_buf_strlen);
|
||||||
void txt_clean_text(struct Text *text);
|
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);
|
int txt_find_string(struct Text *text, const char *findstr, int wrap, int match_case);
|
||||||
bool txt_has_sel(const struct Text *text);
|
bool txt_has_sel(const struct Text *text);
|
||||||
int txt_get_span(struct TextLine *from, struct TextLine *to);
|
int txt_get_span(struct TextLine *from, struct TextLine *to);
|
||||||
void txt_move_up(struct Text *text, const bool sel);
|
void txt_move_up(struct Text *text, bool sel);
|
||||||
void txt_move_down(struct Text *text, const bool sel);
|
void txt_move_down(struct Text *text, bool sel);
|
||||||
void txt_move_left(struct Text *text, const bool sel);
|
void txt_move_left(struct Text *text, bool sel);
|
||||||
void txt_move_right(struct Text *text, const bool sel);
|
void txt_move_right(struct Text *text, bool sel);
|
||||||
void txt_jump_left(struct Text *text, const bool sel, const bool use_init_step);
|
void txt_jump_left(struct Text *text, bool sel, bool use_init_step);
|
||||||
void txt_jump_right(struct Text *text, const bool sel, const bool use_init_step);
|
void txt_jump_right(struct Text *text, bool sel, bool use_init_step);
|
||||||
void txt_move_bof(struct Text *text, const bool sel);
|
void txt_move_bof(struct Text *text, bool sel);
|
||||||
void txt_move_eof(struct Text *text, const bool sel);
|
void txt_move_eof(struct Text *text, bool sel);
|
||||||
void txt_move_bol(struct Text *text, const bool sel);
|
void txt_move_bol(struct Text *text, bool sel);
|
||||||
void txt_move_eol(struct Text *text, const bool sel);
|
void txt_move_eol(struct Text *text, bool sel);
|
||||||
void txt_move_toline(struct Text *text, unsigned int line, const 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.
|
* 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_pop_sel(struct Text *text);
|
||||||
void txt_delete_char(struct Text *text);
|
void txt_delete_char(struct Text *text);
|
||||||
void txt_delete_word(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_comment(struct Text *text);
|
||||||
void txt_indent(struct Text *text);
|
void txt_indent(struct Text *text);
|
||||||
bool txt_uncomment(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);
|
void txt_duplicate_line(struct Text *text);
|
||||||
int txt_setcurr_tab_spaces(struct Text *text, int space);
|
int txt_setcurr_tab_spaces(struct Text *text, int space);
|
||||||
bool txt_cursor_is_line_start(const struct Text *text);
|
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.
|
* Utility functions, could be moved somewhere more generic but are python/text related.
|
||||||
*/
|
*/
|
||||||
int text_check_bracket(const char ch);
|
int text_check_bracket(char ch);
|
||||||
bool text_check_delim(const char ch);
|
bool text_check_delim(char ch);
|
||||||
bool text_check_digit(const char ch);
|
bool text_check_digit(char ch);
|
||||||
bool text_check_identifier(const char ch);
|
bool text_check_identifier(char ch);
|
||||||
bool text_check_identifier_nodigit(const char ch);
|
bool text_check_identifier_nodigit(char ch);
|
||||||
bool text_check_whitespace(const char ch);
|
bool text_check_whitespace(char ch);
|
||||||
int text_find_identifier_start(const char *str, int i);
|
int text_find_identifier_start(const char *str, int i);
|
||||||
|
|
||||||
/* EVIL: defined in `bpy_interface.c`. */
|
/* EVIL: defined in `bpy_interface.c`. */
|
||||||
extern int text_check_identifier_unicode(const unsigned int ch);
|
extern int text_check_identifier_unicode(unsigned int ch);
|
||||||
extern int text_check_identifier_nodigit_unicode(const unsigned int ch);
|
extern int text_check_identifier_nodigit_unicode(unsigned int ch);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TXT_MOVE_LINE_UP = -1,
|
TXT_MOVE_LINE_UP = -1,
|
||||||
|
@@ -66,7 +66,7 @@ short texttool_text_is_active(struct Text *text);
|
|||||||
|
|
||||||
/* Suggestions */
|
/* Suggestions */
|
||||||
void texttool_suggest_add(const char *name, char type);
|
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);
|
void texttool_suggest_clear(void);
|
||||||
SuggItem *texttool_suggest_first(void);
|
SuggItem *texttool_suggest_first(void);
|
||||||
SuggItem *texttool_suggest_last(void);
|
SuggItem *texttool_suggest_last(void);
|
||||||
|
@@ -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_data(struct PointDensity *pd);
|
||||||
void BKE_texture_pointdensity_free(struct PointDensity *pd);
|
void BKE_texture_pointdensity_free(struct PointDensity *pd);
|
||||||
struct PointDensity *BKE_texture_pointdensity_add(void);
|
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);
|
bool BKE_texture_dependsOnTime(const struct Tex *texture);
|
||||||
/**
|
/**
|
||||||
|
@@ -58,7 +58,7 @@ void BKE_tracking_free(struct MovieTracking *tracking);
|
|||||||
*/
|
*/
|
||||||
void BKE_tracking_copy(struct MovieTracking *tracking_dst,
|
void BKE_tracking_copy(struct MovieTracking *tracking_dst,
|
||||||
const struct MovieTracking *tracking_src,
|
const struct MovieTracking *tracking_src,
|
||||||
const int flag);
|
int flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize motion tracking settings to default values,
|
* 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.
|
* 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,
|
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_first_frame,
|
||||||
int *r_last_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,
|
void BKE_tracking_tracks_average(struct MovieTrackingTrack *dst_track,
|
||||||
/*const*/ struct MovieTrackingTrack **src_tracks,
|
/*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 MovieTrackingTrack *BKE_tracking_track_get_named(struct MovieTracking *tracking,
|
||||||
struct MovieTrackingObject *object,
|
struct MovieTrackingObject *object,
|
||||||
@@ -301,7 +301,7 @@ struct MovieTrackingMarker *BKE_tracking_marker_ensure(struct MovieTrackingTrack
|
|||||||
* \returns truth if the result is usable.
|
* \returns truth if the result is usable.
|
||||||
*/
|
*/
|
||||||
bool BKE_tracking_marker_get_interpolated(struct MovieTrackingTrack *track,
|
bool BKE_tracking_marker_get_interpolated(struct MovieTrackingTrack *track,
|
||||||
const int framenr,
|
int framenr,
|
||||||
struct MovieTrackingMarker *r_marker);
|
struct MovieTrackingMarker *r_marker);
|
||||||
|
|
||||||
void BKE_tracking_marker_pattern_minmax(const struct MovieTrackingMarker *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 AutoTrackContext *BKE_autotrack_context_new(struct MovieClip *clip,
|
||||||
struct MovieClipUser *user,
|
struct MovieClipUser *user,
|
||||||
const bool is_backwards);
|
bool is_backwards);
|
||||||
bool BKE_autotrack_context_step(struct AutoTrackContext *context);
|
bool BKE_autotrack_context_step(struct AutoTrackContext *context);
|
||||||
void BKE_autotrack_context_sync(struct AutoTrackContext *context);
|
void BKE_autotrack_context_sync(struct AutoTrackContext *context);
|
||||||
void BKE_autotrack_context_sync_user(struct AutoTrackContext *context, struct MovieClipUser *user);
|
void BKE_autotrack_context_sync_user(struct AutoTrackContext *context, struct MovieClipUser *user);
|
||||||
|
@@ -133,7 +133,7 @@ typedef struct UndoType {
|
|||||||
|
|
||||||
bool (*step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us);
|
bool (*step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us);
|
||||||
void (*step_decode)(
|
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,
|
* \note When freeing all steps,
|
||||||
@@ -263,7 +263,7 @@ bool BKE_undosys_step_load_data_ex(UndoStack *ustack,
|
|||||||
struct bContext *C,
|
struct bContext *C,
|
||||||
UndoStep *us_target,
|
UndoStep *us_target,
|
||||||
UndoStep *us_reference,
|
UndoStep *us_reference,
|
||||||
const bool use_skip);
|
bool use_skip);
|
||||||
/**
|
/**
|
||||||
* Undo/Redo until the given `us_target` step becomes the active (currently loaded) one.
|
* 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
|
* Undo/Redo until the step matching given `index` in the undo stack becomes the active
|
||||||
* (currently loaded) one.
|
* (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.
|
* Undo until `us_target` step becomes the active (currently loaded) one.
|
||||||
|
@@ -96,7 +96,7 @@ void BKE_vfont_build_char(struct Curve *cu,
|
|||||||
float ofsy,
|
float ofsy,
|
||||||
float rot,
|
float rot,
|
||||||
int charidx,
|
int charidx,
|
||||||
const float fsize);
|
float fsize);
|
||||||
|
|
||||||
int BKE_vfont_select_get(struct Object *ob, int *r_start, int *r_end);
|
int BKE_vfont_select_get(struct Object *ob, int *r_start, int *r_end);
|
||||||
void BKE_vfont_select_clamp(struct Object *ob);
|
void BKE_vfont_select_clamp(struct Object *ob);
|
||||||
|
@@ -56,7 +56,7 @@ typedef struct VChar {
|
|||||||
* \retval A new #VFontData structure, or NULL if unable to load.
|
* \retval A new #VFontData structure, or NULL if unable to load.
|
||||||
*/
|
*/
|
||||||
VFontData *BKE_vfontdata_from_freetypefont(struct PackedFile *pf);
|
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_from_freetypefont(struct VFont *vfont, unsigned long character);
|
||||||
VChar *BKE_vfontdata_char_copy(const VChar *vchar_src);
|
VChar *BKE_vfontdata_char_copy(const VChar *vchar_src);
|
||||||
|
@@ -189,7 +189,7 @@ openvdb::GridBase::ConstPtr BKE_volume_grid_openvdb_for_read(const struct Volume
|
|||||||
const struct VolumeGrid *grid);
|
const struct VolumeGrid *grid);
|
||||||
openvdb::GridBase::Ptr BKE_volume_grid_openvdb_for_write(const struct Volume *volume,
|
openvdb::GridBase::Ptr BKE_volume_grid_openvdb_for_write(const struct Volume *volume,
|
||||||
struct VolumeGrid *grid,
|
struct VolumeGrid *grid,
|
||||||
const bool clear);
|
bool clear);
|
||||||
|
|
||||||
VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid);
|
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(
|
openvdb::GridBase::Ptr BKE_volume_grid_create_with_changed_resolution(
|
||||||
const VolumeGridType grid_type,
|
const VolumeGridType grid_type, const openvdb::GridBase &old_grid, float resolution_factor);
|
||||||
const openvdb::GridBase &old_grid,
|
|
||||||
const float resolution_factor);
|
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user