Cleanup: different declaration names, use r_ prefix for return args
This commit is contained in:
@@ -376,7 +376,7 @@ class PartialWriteContext : NonCopyable, NonMovable {
|
||||
* \return `true` on success.
|
||||
*/
|
||||
bool write(const char *write_filepath, int write_flags, int remap_mode, ReportList &reports);
|
||||
bool write(const char *wtite_filepath, ReportList &reports);
|
||||
bool write(const char *write_filepath, ReportList &reports);
|
||||
|
||||
/* TODO: To allow editing an existing external blendfile:
|
||||
* - API to load a context from a blendfile.
|
||||
|
||||
@@ -40,7 +40,9 @@ struct CollectionParent {
|
||||
* Add a collection to a collection ListBase and synchronize all render layers
|
||||
* The ListBase is NULL when the collection is to be added to the master collection
|
||||
*/
|
||||
Collection *BKE_collection_add(Main *bmain, Collection *parent, const char *name);
|
||||
Collection *BKE_collection_add(Main *bmain,
|
||||
Collection *collection_parent,
|
||||
const char *name_custom);
|
||||
/**
|
||||
* Add \a collection_dst to all scene collections that reference object \a ob_src is in.
|
||||
* Used to replace an instance object with a collection (library override operator).
|
||||
@@ -169,7 +171,7 @@ void BKE_collection_object_move(
|
||||
/**
|
||||
* Remove object from all collections of scene
|
||||
*/
|
||||
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *object, bool free_us);
|
||||
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *ob, bool free_us);
|
||||
|
||||
/**
|
||||
* Check all collections in \a bmain (including embedded ones in scenes) for invalid
|
||||
|
||||
@@ -555,7 +555,7 @@ ListBase *which_libbase(Main *bmain, short type);
|
||||
* \note The order of each ID type #ListBase in the array is determined by the `INDEX_ID_<IDTYPE>`
|
||||
* enum definitions in `DNA_ID.h`. See also the #FOREACH_MAIN_ID_BEGIN macro in `BKE_main.hh`
|
||||
*/
|
||||
int set_listbasepointers(Main *main, ListBase *lb[]);
|
||||
int set_listbasepointers(Main *bmain, ListBase *lb[]);
|
||||
|
||||
#define MAIN_VERSION_FILE_ATLEAST(main, ver, subver) \
|
||||
((main)->versionfile > (ver) || \
|
||||
|
||||
@@ -63,7 +63,8 @@ void BKE_reportf(ReportList *reports, eReportType type, const char *format, ...)
|
||||
ATTR_PRINTF_FORMAT(3, 4);
|
||||
|
||||
void BKE_reports_prepend(ReportList *reports, const char *prepend);
|
||||
void BKE_reports_prependf(ReportList *reports, const char *prepend, ...) ATTR_PRINTF_FORMAT(2, 3);
|
||||
void BKE_reports_prependf(ReportList *reports, const char *prepend_format, ...)
|
||||
ATTR_PRINTF_FORMAT(2, 3);
|
||||
|
||||
eReportType BKE_report_print_level(ReportList *reports);
|
||||
void BKE_report_print_level_set(ReportList *reports, eReportType level);
|
||||
|
||||
@@ -655,7 +655,7 @@ ARegion *BKE_region_find_in_listbase_by_type(const ListBase *regionbase, const i
|
||||
* \note This does _not_ work if the region to look up is not in the active space.
|
||||
* Use #BKE_spacedata_find_region_type if that may be the case.
|
||||
*/
|
||||
ARegion *BKE_area_find_region_type(const ScrArea *area, int type);
|
||||
ARegion *BKE_area_find_region_type(const ScrArea *area, int regon_type);
|
||||
ARegion *BKE_area_find_region_active_win(const ScrArea *area);
|
||||
ARegion *BKE_area_find_region_xy(const ScrArea *area, int regiontype, const int xy[2])
|
||||
ATTR_NONNULL(3);
|
||||
|
||||
@@ -156,7 +156,7 @@ void BKE_shaderfx_free(struct ShaderFxData *fx);
|
||||
/**
|
||||
* Check unique name.
|
||||
*/
|
||||
void BKE_shaderfx_unique_name(struct ListBase *shaderfx, struct ShaderFxData *fx);
|
||||
void BKE_shaderfx_unique_name(struct ListBase *shaders, struct ShaderFxData *fx);
|
||||
bool BKE_shaderfx_depends_ontime(struct ShaderFxData *fx);
|
||||
/**
|
||||
* Check whether given shaderfx is not local (i.e. from linked data) when the object is a library
|
||||
|
||||
@@ -33,7 +33,7 @@ void BKE_sound_exit_once(void);
|
||||
|
||||
void *BKE_sound_get_device(void);
|
||||
|
||||
void BKE_sound_init(struct Main *main);
|
||||
void BKE_sound_init(struct Main *bmain);
|
||||
|
||||
void BKE_sound_init_main(struct Main *bmain);
|
||||
|
||||
@@ -41,7 +41,7 @@ void BKE_sound_exit(void);
|
||||
|
||||
void BKE_sound_force_device(const char *device);
|
||||
|
||||
struct bSound *BKE_sound_new_file(struct Main *main, const char *filepath);
|
||||
struct bSound *BKE_sound_new_file(struct Main *bmain, const char *filepath);
|
||||
struct bSound *BKE_sound_new_file_exists_ex(struct Main *bmain,
|
||||
const char *filepath,
|
||||
bool *r_exists);
|
||||
@@ -61,7 +61,7 @@ void BKE_sound_cache(struct bSound *sound);
|
||||
void BKE_sound_delete_cache(struct bSound *sound);
|
||||
|
||||
void BKE_sound_reset_runtime(struct bSound *sound);
|
||||
void BKE_sound_load(struct Main *main, struct bSound *sound);
|
||||
void BKE_sound_load(struct Main *bmain, struct bSound *sound);
|
||||
void BKE_sound_ensure_loaded(struct Main *bmain, struct bSound *sound);
|
||||
|
||||
/* Matches AUD_Channels. */
|
||||
|
||||
@@ -220,13 +220,13 @@ void OVERLAY_grid_init(OVERLAY_Data *vedata)
|
||||
pd->grid.zpos_flag = zpos_flag;
|
||||
}
|
||||
|
||||
void OVERLAY_grid_cache_init(OVERLAY_Data *ved)
|
||||
void OVERLAY_grid_cache_init(OVERLAY_Data *vedata)
|
||||
{
|
||||
OVERLAY_StorageList *stl = ved->stl;
|
||||
OVERLAY_StorageList *stl = vedata->stl;
|
||||
OVERLAY_PrivateData *pd = stl->pd;
|
||||
OVERLAY_GridData *grid = &pd->grid_data;
|
||||
|
||||
OVERLAY_PassList *psl = ved->psl;
|
||||
OVERLAY_PassList *psl = vedata->psl;
|
||||
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
|
||||
|
||||
psl->grid_ps = nullptr;
|
||||
@@ -235,7 +235,7 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *ved)
|
||||
return;
|
||||
}
|
||||
|
||||
GPUUniformBuf *&grid_ubo = reinterpret_cast<Instance *>(ved->instance)->grid_ubo;
|
||||
GPUUniformBuf *&grid_ubo = reinterpret_cast<Instance *>(vedata->instance)->grid_ubo;
|
||||
if (grid_ubo == nullptr) {
|
||||
grid_ubo = GPU_uniformbuf_create(sizeof(OVERLAY_GridData));
|
||||
}
|
||||
|
||||
@@ -253,7 +253,8 @@ struct DRWVolumeGrid {
|
||||
|
||||
namespace blender::draw {
|
||||
|
||||
DRWVolumeGrid *DRW_volume_batch_cache_get_grid(Volume *volume, const bke::VolumeGridData *grid);
|
||||
DRWVolumeGrid *DRW_volume_batch_cache_get_grid(Volume *volume,
|
||||
const bke::VolumeGridData *volume_grid);
|
||||
blender::gpu::Batch *DRW_cache_volume_face_wireframe_get(Object *ob);
|
||||
blender::gpu::Batch *DRW_cache_volume_selection_surface_get(Object *ob);
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ blender::draw::TextureFromPool &DRW_view_data_pass_texture_get(DRWViewData *view
|
||||
void DRW_view_data_default_lists_from_viewport(DRWViewData *view_data, GPUViewport *viewport);
|
||||
void DRW_view_data_texture_list_size_validate(DRWViewData *view_data, const int size[2]);
|
||||
ViewportEngineData *DRW_view_data_engine_data_get_ensure(DRWViewData *view_data,
|
||||
DrawEngineType *engine_type_);
|
||||
DrawEngineType *engine_type);
|
||||
void DRW_view_data_use_engine(DRWViewData *view_data, DrawEngineType *engine_type);
|
||||
void DRW_view_data_reset(DRWViewData *view_data);
|
||||
void DRW_view_data_free_unused(DRWViewData *view_data);
|
||||
|
||||
@@ -153,13 +153,13 @@ void gizmo_property_value_reset(bContext *C,
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
void gizmo_color_get(const wmGizmo *gz, const bool highlight, float r_col[4])
|
||||
void gizmo_color_get(const wmGizmo *gz, const bool highlight, float r_color[4])
|
||||
{
|
||||
if (highlight && !(gz->flag & WM_GIZMO_DRAW_HOVER)) {
|
||||
copy_v4_v4(r_col, gz->color_hi);
|
||||
copy_v4_v4(r_color, gz->color_hi);
|
||||
}
|
||||
else {
|
||||
copy_v4_v4(r_col, gz->color);
|
||||
copy_v4_v4(r_color, gz->color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ class AbstractView {
|
||||
*/
|
||||
bool is_reconstructed() const;
|
||||
|
||||
void filter(std::optional<StringRef> str);
|
||||
void filter(std::optional<StringRef> filter_str);
|
||||
const AbstractViewItem *search_highlight_item() const;
|
||||
};
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ void ED_mask_view_lock_state_restore_no_jump(const bContext *C, const MaskViewLo
|
||||
/* `mask_query.cc` */
|
||||
|
||||
bool ED_mask_find_nearest_diff_point(const bContext *C,
|
||||
Mask *mask,
|
||||
Mask *mask_orig,
|
||||
const float normal_co[2],
|
||||
int threshold,
|
||||
bool feather,
|
||||
@@ -115,7 +115,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C,
|
||||
float *r_u,
|
||||
float *r_score);
|
||||
bool ED_mask_feather_find_nearest(const bContext *C,
|
||||
Mask *mask,
|
||||
Mask *mask_orig,
|
||||
const float normal_co[2],
|
||||
float threshold,
|
||||
MaskLayer **r_mask_layer,
|
||||
@@ -124,7 +124,7 @@ bool ED_mask_feather_find_nearest(const bContext *C,
|
||||
MaskSplinePointUW **r_uw,
|
||||
float *r_score);
|
||||
MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C,
|
||||
Mask *mask,
|
||||
Mask *mask_orig,
|
||||
const float normal_co[2],
|
||||
float threshold,
|
||||
MaskLayer **r_mask_layer,
|
||||
|
||||
@@ -433,15 +433,16 @@ std::string AssetCatalogDropTarget::drop_tooltip_asset_list(const wmDrag &drag)
|
||||
return basic_tip;
|
||||
}
|
||||
|
||||
bool AssetCatalogDropTarget::on_drop(bContext *C, const ui::DragInfo &drag) const
|
||||
bool AssetCatalogDropTarget::on_drop(bContext *C, const ui::DragInfo &drag_info) const
|
||||
{
|
||||
if (drag.drag_data.type == WM_DRAG_ASSET_CATALOG) {
|
||||
return this->drop_asset_catalog_into_catalog(
|
||||
drag.drag_data, this->get_view<AssetCatalogTreeView>(), catalog_item_.get_catalog_id());
|
||||
if (drag_info.drag_data.type == WM_DRAG_ASSET_CATALOG) {
|
||||
return this->drop_asset_catalog_into_catalog(drag_info.drag_data,
|
||||
this->get_view<AssetCatalogTreeView>(),
|
||||
catalog_item_.get_catalog_id());
|
||||
}
|
||||
return this->drop_assets_into_catalog(C,
|
||||
this->get_view<AssetCatalogTreeView>(),
|
||||
drag.drag_data,
|
||||
drag_info.drag_data,
|
||||
catalog_item_.get_catalog_id(),
|
||||
catalog_item_.get_simple_name());
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ void channel_draw_context_init(const bContext *C,
|
||||
|
||||
/* `sequencer_edit.cc` */
|
||||
|
||||
void seq_rectf(const Scene *scene, const Sequence *seq, rctf *rectf);
|
||||
void seq_rectf(const Scene *scene, const Sequence *seq, rctf *rect);
|
||||
Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int sel);
|
||||
void recurs_sel_seq(Sequence *seq_meta);
|
||||
int seq_effect_find_selected(Scene *scene,
|
||||
|
||||
@@ -764,7 +764,7 @@ void transform_input_update(TransInfo *t, const float fac);
|
||||
void transform_input_virtual_mval_reset(TransInfo *t);
|
||||
void transform_input_reset(TransInfo *t, const blender::float2 &mval);
|
||||
|
||||
void setCustomPoints(TransInfo *t, MouseInput *mi, const int start[2], const int end[2]);
|
||||
void setCustomPoints(TransInfo *t, MouseInput *mi, const int mval_start[2], const int mval_end[2]);
|
||||
void setCustomPointsFromDirection(TransInfo *t, MouseInput *mi, const blender::float2 &dir);
|
||||
void setInputPostFct(MouseInput *mi, void (*post)(TransInfo *t, float values[3]));
|
||||
|
||||
|
||||
@@ -418,11 +418,11 @@ eSnapMode snap_edge_points_mesh(SnapObjectContext *sctx,
|
||||
const Object *ob_eval,
|
||||
const ID *id,
|
||||
const float4x4 &obmat,
|
||||
float dist_pex_sq_orig,
|
||||
float dist_px_sq_orig,
|
||||
int edge_index)
|
||||
{
|
||||
SnapData_Mesh nearest2d(sctx, reinterpret_cast<const Mesh *>(id), obmat);
|
||||
eSnapMode elem = nearest2d.snap_edge_points_impl(sctx, edge_index, dist_pex_sq_orig);
|
||||
eSnapMode elem = nearest2d.snap_edge_points_impl(sctx, edge_index, dist_px_sq_orig);
|
||||
if (nearest2d.nearest_point.index != -2) {
|
||||
nearest2d.register_result(sctx, ob_eval, id);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ bool GPU_texture_view_support();
|
||||
bool GPU_stencil_export_support();
|
||||
|
||||
bool GPU_mem_stats_supported();
|
||||
void GPU_mem_stats_get(int *totalmem, int *freemem);
|
||||
void GPU_mem_stats_get(int *r_totalmem, int *r_freemem);
|
||||
|
||||
/**
|
||||
* Return support for the active context + window.
|
||||
|
||||
@@ -19,7 +19,7 @@ class Batch;
|
||||
struct GPUDrawList;
|
||||
|
||||
/* Create a list with at least length drawcalls. Length can affect performance. */
|
||||
GPUDrawList *GPU_draw_list_create(int length);
|
||||
GPUDrawList *GPU_draw_list_create(int list_length);
|
||||
void GPU_draw_list_discard(GPUDrawList *list);
|
||||
|
||||
void GPU_draw_list_append(GPUDrawList *list, blender::gpu::Batch *batch, int i_first, int i_count);
|
||||
|
||||
@@ -463,7 +463,7 @@ void GPU_matrix_project_3fv(const float world[3],
|
||||
const float model[4][4],
|
||||
const float proj[4][4],
|
||||
const int view[4],
|
||||
float win[3])
|
||||
float r_win[3])
|
||||
{
|
||||
float v[4];
|
||||
|
||||
@@ -474,16 +474,16 @@ void GPU_matrix_project_3fv(const float world[3],
|
||||
mul_v3_fl(v, 1.0f / v[3]);
|
||||
}
|
||||
|
||||
win[0] = view[0] + (view[2] * (v[0] + 1)) * 0.5f;
|
||||
win[1] = view[1] + (view[3] * (v[1] + 1)) * 0.5f;
|
||||
win[2] = (v[2] + 1) * 0.5f;
|
||||
r_win[0] = view[0] + (view[2] * (v[0] + 1)) * 0.5f;
|
||||
r_win[1] = view[1] + (view[3] * (v[1] + 1)) * 0.5f;
|
||||
r_win[2] = (v[2] + 1) * 0.5f;
|
||||
}
|
||||
|
||||
void GPU_matrix_project_2fv(const float world[3],
|
||||
const float model[4][4],
|
||||
const float proj[4][4],
|
||||
const int view[4],
|
||||
float win[2])
|
||||
float r_win[2])
|
||||
{
|
||||
float v[4];
|
||||
|
||||
@@ -494,8 +494,8 @@ void GPU_matrix_project_2fv(const float world[3],
|
||||
mul_v2_fl(v, 1.0f / v[3]);
|
||||
}
|
||||
|
||||
win[0] = view[0] + (view[2] * (v[0] + 1)) * 0.5f;
|
||||
win[1] = view[1] + (view[3] * (v[1] + 1)) * 0.5f;
|
||||
r_win[0] = view[0] + (view[2] * (v[0] + 1)) * 0.5f;
|
||||
r_win[1] = view[1] + (view[3] * (v[1] + 1)) * 0.5f;
|
||||
}
|
||||
|
||||
bool GPU_matrix_unproject_3fv(const float win[3],
|
||||
|
||||
@@ -430,16 +430,16 @@ static void recommended_fetch_mode_and_comp_type(Type gpu_type,
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_vertformat_from_shader(GPUVertFormat *format, const GPUShader *gpushader)
|
||||
void GPU_vertformat_from_shader(GPUVertFormat *format, const GPUShader *shader)
|
||||
{
|
||||
GPU_vertformat_clear(format);
|
||||
|
||||
uint attr_len = GPU_shader_get_attribute_len(gpushader);
|
||||
uint attr_len = GPU_shader_get_attribute_len(shader);
|
||||
int location_test = 0, attrs_added = 0;
|
||||
while (attrs_added < attr_len) {
|
||||
char name[256];
|
||||
Type gpu_type;
|
||||
if (!GPU_shader_get_attribute_info(gpushader, location_test++, name, (int *)&gpu_type)) {
|
||||
if (!GPU_shader_get_attribute_info(shader, location_test++, name, (int *)&gpu_type)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -480,7 +480,7 @@ struct GPUTexture *RE_pass_ensure_gpu_texture_cache(struct Render *re, struct Re
|
||||
#define RE_BAKE_DISPLACEMENT 1
|
||||
#define RE_BAKE_AO 2
|
||||
|
||||
void RE_GetCameraWindow(struct Render *re, const struct Object *camera, float mat[4][4]);
|
||||
void RE_GetCameraWindow(struct Render *re, const struct Object *camera, float r_winmat[4][4]);
|
||||
/**
|
||||
* Must be called after #RE_GetCameraWindow(), does not change `re->winmat`.
|
||||
*/
|
||||
|
||||
@@ -700,13 +700,13 @@ void seq_cache_cleanup_sequence(Scene *scene,
|
||||
seq_cache_unlock(scene);
|
||||
}
|
||||
|
||||
void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area_safe)
|
||||
void seq_cache_thumbnail_cleanup(Scene *scene, rctf *r_view_area_safe)
|
||||
{
|
||||
/* Add offsets to the left and right end to keep some frames in cache. */
|
||||
view_area_safe->xmax += 200;
|
||||
view_area_safe->xmin -= 200;
|
||||
view_area_safe->ymin -= 1;
|
||||
view_area_safe->ymax += 1;
|
||||
r_view_area_safe->xmax += 200;
|
||||
r_view_area_safe->xmin -= 200;
|
||||
r_view_area_safe->ymin -= 1;
|
||||
r_view_area_safe->ymax += 1;
|
||||
|
||||
SeqCache *cache = seq_cache_get_from_scene(scene);
|
||||
if (!cache) {
|
||||
@@ -731,9 +731,9 @@ void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area_safe)
|
||||
}
|
||||
|
||||
if ((key->type & SEQ_CACHE_STORE_THUMBNAIL) &&
|
||||
(key->timeline_frame > view_area_safe->xmax ||
|
||||
key->timeline_frame < view_area_safe->xmin || key->seq->machine > view_area_safe->ymax ||
|
||||
key->seq->machine < view_area_safe->ymin))
|
||||
(key->timeline_frame > r_view_area_safe->xmax ||
|
||||
key->timeline_frame < r_view_area_safe->xmin ||
|
||||
key->seq->machine > r_view_area_safe->ymax || key->seq->machine < r_view_area_safe->ymin))
|
||||
{
|
||||
seq_cache_key_unlink(key);
|
||||
BLI_ghash_remove(cache->hash, key, seq_cache_keyfree, seq_cache_valfree);
|
||||
|
||||
@@ -56,6 +56,6 @@ void seq_cache_cleanup_sequence(Scene *scene,
|
||||
Sequence *seq_changed,
|
||||
int invalidate_types,
|
||||
bool force_seq_changed_range);
|
||||
void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area);
|
||||
void seq_cache_thumbnail_cleanup(Scene *scene, rctf *r_view_area_safe);
|
||||
bool seq_cache_is_full();
|
||||
float seq_cache_frame_index_to_timeline_frame(Sequence *seq, float frame_index);
|
||||
|
||||
Reference in New Issue
Block a user