Merge branch 'blender-v3.6-release'

This commit is contained in:
2023-05-20 21:18:02 +10:00
42 changed files with 84 additions and 76 deletions

View File

@@ -122,7 +122,8 @@ bool OneapiDevice::check_peer_access(Device * /*peer_device*/)
bool OneapiDevice::can_use_hardware_raytracing_for_features(uint requested_features) const bool OneapiDevice::can_use_hardware_raytracing_for_features(uint requested_features) const
{ {
/* MNEE and Raytrace kernels work correctly with Hardware Raytracing starting with Embree 4.1. */ /* MNEE and Ray-trace kernels work correctly with Hardware Ray-tracing starting with Embree 4.1.
*/
# if defined(RTC_VERSION) && RTC_VERSION < 40100 # if defined(RTC_VERSION) && RTC_VERSION < 40100
return !(requested_features & (KERNEL_FEATURE_MNEE | KERNEL_FEATURE_NODE_RAYTRACE)); return !(requested_features & (KERNEL_FEATURE_MNEE | KERNEL_FEATURE_NODE_RAYTRACE));
# else # else

View File

@@ -432,7 +432,7 @@ ccl_gpu_kernel_threads(GPU_PARALLEL_SORTED_INDEX_DEFAULT_BLOCK_SIZE)
} }
ccl_gpu_kernel_postfix ccl_gpu_kernel_postfix
/* oneAPI verion needs the local_mem accessor in the arguments. */ /* oneAPI Verizon needs the local_mem accessor in the arguments. */
#ifdef __KERNEL_ONEAPI__ #ifdef __KERNEL_ONEAPI__
ccl_gpu_kernel_threads(GPU_PARALLEL_SORT_BLOCK_SIZE) ccl_gpu_kernel_threads(GPU_PARALLEL_SORT_BLOCK_SIZE)
ccl_gpu_kernel_signature(integrator_sort_bucket_pass, ccl_gpu_kernel_signature(integrator_sort_bucket_pass,
@@ -489,7 +489,7 @@ ccl_gpu_kernel_threads(GPU_PARALLEL_SORT_BLOCK_SIZE)
} }
ccl_gpu_kernel_postfix ccl_gpu_kernel_postfix
/* oneAPI verion needs the local_mem accessor in the arguments. */ /* oneAPI version needs the local_mem accessor in the arguments. */
#ifdef __KERNEL_ONEAPI__ #ifdef __KERNEL_ONEAPI__
ccl_gpu_kernel_threads(GPU_PARALLEL_SORT_BLOCK_SIZE) ccl_gpu_kernel_threads(GPU_PARALLEL_SORT_BLOCK_SIZE)
ccl_gpu_kernel_signature(integrator_sort_write_pass, ccl_gpu_kernel_signature(integrator_sort_write_pass,

View File

@@ -109,7 +109,7 @@ size_t oneapi_kernel_preferred_local_size(SyclQueue *queue,
assert(queue); assert(queue);
(void)kernel_global_size; (void)kernel_global_size;
const static size_t preferred_work_group_size_intersect_shading = 32; const static size_t preferred_work_group_size_intersect_shading = 32;
/* Shader evalutation kernels seems to use some amount of shared memory, so better /* Shader evaluation kernels seems to use some amount of shared memory, so better
* to avoid usage of maximum work group sizes for them. */ * to avoid usage of maximum work group sizes for them. */
const static size_t preferred_work_group_size_shader_evaluation = 256; const static size_t preferred_work_group_size_shader_evaluation = 256;
const static size_t preferred_work_group_size_default = 1024; const static size_t preferred_work_group_size_default = 1024;
@@ -196,7 +196,7 @@ bool oneapi_kernel_is_required_for_features(const std::string &kernel_name,
bool oneapi_kernel_is_compatible_with_hardware_raytracing(const std::string &kernel_name) bool oneapi_kernel_is_compatible_with_hardware_raytracing(const std::string &kernel_name)
{ {
/* MNEE and Raytrace kernels work correctly with Hardware Raytracing starting with Embree 4.1. /* MNEE and Ray-trace kernels work correctly with Hardware Ray-tracing starting with Embree 4.1.
*/ */
# if defined(RTC_VERSION) && RTC_VERSION < 40100 # if defined(RTC_VERSION) && RTC_VERSION < 40100
return (kernel_name.find(device_kernel_as_string(DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_MNEE)) == return (kernel_name.find(device_kernel_as_string(DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_MNEE)) ==

View File

@@ -86,7 +86,7 @@ void normals_calc_poly_vert(Span<float3> vert_positions,
* \{ */ * \{ */
/** /**
* Combined with the automatically calculated face corner normal, this gives a dimentional * Combined with the automatically calculated face corner normal, this gives a dimensional
* coordinate space used to convert normals between the "custom normal" #short2 representation and * coordinate space used to convert normals between the "custom normal" #short2 representation and
* a regular #float3 format. * a regular #float3 format.
*/ */

View File

@@ -19,7 +19,7 @@ struct CustomData_MeshMasks;
struct MemArena; struct MemArena;
struct Mesh; struct Mesh;
/* Generic ways to map some geometry elements from a source mesh to a dest one. */ /* Generic ways to map some geometry elements from a source mesh to a destination one. */
typedef struct MeshPairRemapItem { typedef struct MeshPairRemapItem {
int sources_num; int sources_num;
@@ -33,7 +33,7 @@ typedef struct MeshPairRemapItem {
/* All mapping computing func return this. */ /* All mapping computing func return this. */
typedef struct MeshPairRemap { typedef struct MeshPairRemap {
int items_num; int items_num;
MeshPairRemapItem *items; /* array, one item per dest element. */ MeshPairRemapItem *items; /* Array, one item per destination element. */
struct MemArena *mem; /* memory arena, internal use only. */ struct MemArena *mem; /* memory arena, internal use only. */
} MeshPairRemap; } MeshPairRemap;
@@ -89,7 +89,7 @@ enum {
/* ***** Target's edges ***** */ /* ***** Target's edges ***** */
MREMAP_MODE_EDGE = 1 << 25, MREMAP_MODE_EDGE = 1 << 25,
/* Source edge which both vertices are nearest of dest ones. */ /* Source edge which both vertices are nearest of destination ones. */
MREMAP_MODE_EDGE_VERT_NEAREST = MREMAP_MODE_EDGE | MREMAP_USE_VERT | MREMAP_USE_NEAREST, MREMAP_MODE_EDGE_VERT_NEAREST = MREMAP_MODE_EDGE | MREMAP_USE_VERT | MREMAP_USE_NEAREST,
/* Nearest source edge (using mid-point). */ /* Nearest source edge (using mid-point). */
@@ -98,7 +98,7 @@ enum {
/* Nearest edge of nearest poly (using mid-point). */ /* Nearest edge of nearest poly (using mid-point). */
MREMAP_MODE_EDGE_POLY_NEAREST = MREMAP_MODE_EDGE | MREMAP_USE_POLY | MREMAP_USE_NEAREST, MREMAP_MODE_EDGE_POLY_NEAREST = MREMAP_MODE_EDGE | MREMAP_USE_POLY | MREMAP_USE_NEAREST,
/* Cast a set of rays from along dest edge, /* Cast a set of rays from along destination edge,
* interpolating its vertices' normals, and use hit source edges. */ * interpolating its vertices' normals, and use hit source edges. */
MREMAP_MODE_EDGE_EDGEINTERP_VNORPROJ = MREMAP_MODE_EDGE | MREMAP_USE_VERT | MREMAP_USE_NORPROJ | MREMAP_MODE_EDGE_EDGEINTERP_VNORPROJ = MREMAP_MODE_EDGE | MREMAP_USE_VERT | MREMAP_USE_NORPROJ |
MREMAP_USE_INTERP, MREMAP_USE_INTERP,
@@ -131,10 +131,10 @@ enum {
/* Nearest source poly. */ /* Nearest source poly. */
MREMAP_MODE_POLY_NEAREST = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NEAREST, MREMAP_MODE_POLY_NEAREST = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NEAREST,
/* Source poly from best normal-matching dest poly. */ /* Source poly from best normal-matching destination poly. */
MREMAP_MODE_POLY_NOR = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NORMAL, MREMAP_MODE_POLY_NOR = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NORMAL,
/* Project dest poly onto source mesh using its normal, /* Project destination poly onto source mesh using its normal,
* and use interpolation of all intersecting source polys. */ * and use interpolation of all intersecting source polys. */
MREMAP_MODE_POLY_POLYINTERP_PNORPROJ = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NORPROJ | MREMAP_MODE_POLY_POLYINTERP_PNORPROJ = MREMAP_MODE_POLY | MREMAP_USE_POLY | MREMAP_USE_NORPROJ |
MREMAP_USE_INTERP, MREMAP_USE_INTERP,

View File

@@ -334,7 +334,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
0, numEffectedF, &data, ccgSubSurf__calcVertNormals_faces_accumulate_cb, &settings); 0, numEffectedF, &data, ccgSubSurf__calcVertNormals_faces_accumulate_cb, &settings);
} }
/* XXX can I reduce the number of normalisations here? */ /* XXX can I reduce the number of normalization calls here? */
for (ptrIdx = 0; ptrIdx < numEffectedV; ptrIdx++) { for (ptrIdx = 0; ptrIdx < numEffectedV; ptrIdx++) {
CCGVert *v = (CCGVert *)effectedV[ptrIdx]; CCGVert *v = (CCGVert *)effectedV[ptrIdx];
float *no = VERT_getNo(v, lvl); float *no = VERT_getNo(v, lvl);

View File

@@ -641,8 +641,8 @@ static int animsys_quaternion_evaluate_fcurves(PathResolvedRNA quat_rna,
} }
if (fcurve_offset < 4) { if (fcurve_offset < 4) {
/* This quaternion was incompletely keyed, so the result is a mixture of the unit quaterion and /* This quaternion was incompletely keyed, so the result is a mixture of the unit quaternion
* values from FCurves. This means that it's almost certainly no longer of unit length. */ * and values from FCurves. This means that it's almost certainly no longer of unit length. */
normalize_qt(r_quaternion); normalize_qt(r_quaternion);
} }

View File

@@ -611,7 +611,7 @@ static bool data_transfer_layersmapping_cdlayers_multisrc_to_dst(ListBase *r_map
bool *data_dst_to_delete = nullptr; bool *data_dst_to_delete = nullptr;
if (!use_layers_src) { if (!use_layers_src) {
/* No source at all, we can only delete all dest if requested... */ /* No source at all, we can only delete all destination if requested. */
if (use_delete) { if (use_delete) {
idx_dst = tot_dst; idx_dst = tot_dst;
while (idx_dst--) { while (idx_dst--) {
@@ -1421,7 +1421,7 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
} }
/* Check all possible data types. /* Check all possible data types.
* Note item mappings and dest mix weights are cached. */ * Note item mappings and destination mix weights are cached. */
for (int i = 0; i < DT_TYPE_MAX; i++) { for (int i = 0; i < DT_TYPE_MAX; i++) {
const int dtdata_type = 1 << i; const int dtdata_type = 1 << i;
int cddata_type; int cddata_type;

View File

@@ -1006,7 +1006,7 @@ void BKE_main_view_layers_synced_ensure(const Main *bmain)
BKE_scene_view_layers_synced_ensure(scene); BKE_scene_view_layers_synced_ensure(scene);
} }
/* NOTE: This is not (yet?) covered by the dirty tag and deffered re-sync system. */ /* NOTE: This is not (yet?) covered by the dirty tag and deferred re-sync system. */
BKE_layer_collection_local_sync_all(bmain); BKE_layer_collection_local_sync_all(bmain);
} }

View File

@@ -198,8 +198,9 @@ void BKE_lib_override_library_copy(ID *dst_id, const ID *src_id, const bool do_f
BKE_lib_override_library_init(dst_id, nullptr); BKE_lib_override_library_init(dst_id, nullptr);
} }
/* If source is already overriding data, we copy it but reuse its reference for dest ID. /* If source is already overriding data, we copy it but reuse its reference for destination ID.
* Otherwise, source is only an override template, it then becomes reference of dest ID. */ * Otherwise, source is only an override template, it then becomes reference of destination ID.
*/
dst_id->override_library->reference = src_id->override_library->reference ? dst_id->override_library->reference = src_id->override_library->reference ?
src_id->override_library->reference : src_id->override_library->reference :
const_cast<ID *>(src_id); const_cast<ID *>(src_id);
@@ -1776,7 +1777,7 @@ static void lib_override_library_remap(Main *bmain,
* *
* In case linked data keep being modified, these conditions may fail and the mapping may start to * In case linked data keep being modified, these conditions may fail and the mapping may start to
* return 'wrong' results. However, this is considered as an acceptable limitation here, since this * return 'wrong' results. However, this is considered as an acceptable limitation here, since this
* is mainly a 'best effort' to recover from situations that should not be hapenning in the first * is mainly a 'best effort' to recover from situations that should not be happening in the first
* place. * place.
*/ */
@@ -2061,7 +2062,7 @@ static bool lib_override_library_resync(Main *bmain,
} }
/* Get a mapping of all missing linked IDs that were liboverrides, to search for 'old /* Get a mapping of all missing linked IDs that were liboverrides, to search for 'old
* liboverrides' for newly created ones that do not alredy have one, in next step. */ * liboverrides' for newly created ones that do not already have one, in next step. */
LibOverrideMissingIDsData missing_ids_data = lib_override_library_resync_build_missing_ids_data( LibOverrideMissingIDsData missing_ids_data = lib_override_library_resync_build_missing_ids_data(
bmain); bmain);
@@ -2638,7 +2639,8 @@ static bool lib_override_library_main_resync_id_skip_check(ID *id,
return false; return false;
} }
/* Clear 'unreachable' tag of existing liboverrides if they are using another reachable liboverride /**
* Clear 'unreachable' tag of existing liboverrides if they are using another reachable liboverride
* (typical case: Mesh object which only relationship to the rest of the liboverride hierarchy is * (typical case: Mesh object which only relationship to the rest of the liboverride hierarchy is
* though its 'parent' pointer (i.e. rest of the hierarchy has no actual relationship to this mesh * though its 'parent' pointer (i.e. rest of the hierarchy has no actual relationship to this mesh
* object). Sadge. * object). Sadge.
@@ -2646,7 +2648,8 @@ static bool lib_override_library_main_resync_id_skip_check(ID *id,
* Logic and rational of this function are very similar to these of * Logic and rational of this function are very similar to these of
* #lib_override_hierarchy_dependencies_recursive_tag_from, but withing specific resync context. * #lib_override_hierarchy_dependencies_recursive_tag_from, but withing specific resync context.
* *
* \returns True if it finds a non-isolated 'parent' ID, false otherwise. */ * \returns True if it finds a non-isolated 'parent' ID, false otherwise.
*/
static bool lib_override_resync_tagging_finalize_recursive_check_from( static bool lib_override_resync_tagging_finalize_recursive_check_from(
Main *bmain, ID *id, const int library_indirect_level) Main *bmain, ID *id, const int library_indirect_level)
{ {

View File

@@ -257,7 +257,7 @@ static void object_defgroup_remove_common(Object *ob, bDeformGroup *dg, const in
BKE_object_defgroup_active_index_set(ob, active_index - 1); BKE_object_defgroup_active_index_set(ob, active_index - 1);
} }
/* remove all dverts */ /* Remove all deform-verts. */
if (BLI_listbase_is_empty(defbase)) { if (BLI_listbase_is_empty(defbase)) {
if (ob->type == OB_MESH) { if (ob->type == OB_MESH) {
Mesh *me = ob->data; Mesh *me = ob->data;
@@ -404,8 +404,8 @@ void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked)
dg = next_dg; dg = next_dg;
} }
} }
else { /* defbase is empty... */ else { /* `defbase` is empty. */
/* remove all dverts */ /* Remove all deform-verts. */
if (ob->type == OB_MESH) { if (ob->type == OB_MESH) {
Mesh *me = ob->data; Mesh *me = ob->data;
CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert); CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);

View File

@@ -285,7 +285,8 @@ BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
lb->first = lb->last = (void *)0; lb->first = lb->last = (void *)0;
} }
/** Validate the integrity of a given ListBase, returns `true` if evrything is OK, false otherwise. /** Validate the integrity of a given ListBase, returns `true` if everything is OK, false
* otherwise.
*/ */
bool BLI_listbase_validate(struct ListBase *lb); bool BLI_listbase_validate(struct ListBase *lb);

View File

@@ -621,7 +621,7 @@ bool BLI_path_frame_check_chars(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUS
/** \} */ /** \} */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name Blender Spesific File Relative Paths /** \name Blender Specific File Relative Paths
* \{ */ * \{ */
/** /**

View File

@@ -403,7 +403,7 @@ int BLI_rename_overwrite(const char *from, const char *to)
* Support for checking the files aren't the same could be added, however path comparison * Support for checking the files aren't the same could be added, however path comparison
* alone is *not* a guarantee the files are different (given the possibility of accessing * alone is *not* a guarantee the files are different (given the possibility of accessing
* the same file through different paths via symbolic-links), we could instead support a * the same file through different paths via symbolic-links), we could instead support a
* verizon of Python's * `os.path.samefile(..)` which compares the I-node & device. * version of Python's `os.path.samefile(..)` which compares the I-node & device.
* In this particular case we would not want to follow symbolic-links as well. * In this particular case we would not want to follow symbolic-links as well.
* Since this functionality isn't required at the moment, leave this as-is. * Since this functionality isn't required at the moment, leave this as-is.
* Noting it as a potential improvement. */ * Noting it as a potential improvement. */

View File

@@ -352,7 +352,7 @@ void mat3_normalized_to_quat_fast(float q[4], const float mat[3][3])
BLI_assert(!(q[0] < 0.0f)); BLI_assert(!(q[0] < 0.0f));
/* Sometimes normalisation is necessary due to round-off errors in the above /* Sometimes normalization is necessary due to round-off errors in the above
* calculations. The comparison here uses tighter tolerances than * calculations. The comparison here uses tighter tolerances than
* BLI_ASSERT_UNIT_QUAT(), so it's likely that even after a few more * BLI_ASSERT_UNIT_QUAT(), so it's likely that even after a few more
* transformations the quaternion will still be considered unit-ish. */ * transformations the quaternion will still be considered unit-ish. */

View File

@@ -344,7 +344,7 @@ void BLI_str_cursor_step_bounds_utf8(
BLI_str_cursor_step_utf8(str, str_maxlen, r_start, STRCUR_DIR_PREV, STRCUR_JUMP_DELIM, false); BLI_str_cursor_step_utf8(str, str_maxlen, r_start, STRCUR_DIR_PREV, STRCUR_JUMP_DELIM, false);
} }
if ((prev >= next) && (next != STRCUR_DELIM_NONE)) { if ((prev >= next) && (next != STRCUR_DELIM_NONE)) {
/* Expand forward if we are between similar content, after whitespace, or at beginning. */ /* Expand forward if we are between similar content. */
BLI_str_cursor_step_utf8(str, str_maxlen, r_end, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, false); BLI_str_cursor_step_utf8(str, str_maxlen, r_end, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, false);
} }
} }
@@ -361,11 +361,11 @@ void BLI_str_cursor_step_bounds_utf32(
*r_end = pos; *r_end = pos;
if ((prev <= next) && (prev != STRCUR_DELIM_NONE)) { if ((prev <= next) && (prev != STRCUR_DELIM_NONE)) {
/* Expand backward if we are between similar content, before whitespace, or at end. */ /* Expand backward if we are between similar content. */
BLI_str_cursor_step_utf32(str, str_maxlen, r_start, STRCUR_DIR_PREV, STRCUR_JUMP_DELIM, false); BLI_str_cursor_step_utf32(str, str_maxlen, r_start, STRCUR_DIR_PREV, STRCUR_JUMP_DELIM, false);
} }
if ((prev >= next) && (next != STRCUR_DELIM_NONE)) { if ((prev >= next) && (next != STRCUR_DELIM_NONE)) {
/* Expand forward if we are between similar content, after whitespace, or at beginning. */ /* Expand forward if we are between similar content. */
BLI_str_cursor_step_utf32(str, str_maxlen, r_end, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, false); BLI_str_cursor_step_utf32(str, str_maxlen, r_end, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, false);
} }
} }

View File

@@ -199,7 +199,7 @@ bool BLO_main_validate_shapekeys(Main *bmain, ReportList *reports)
shapekey->from); shapekey->from);
/* NOTE: also need to remap UI data ID pointers here, since `bmain` is not the current /* NOTE: also need to remap UI data ID pointers here, since `bmain` is not the current
* `G_MAIN`, default UI-handling remapping callback (defined by call to * `G_MAIN`, default UI-handling remapping callback (defined by call to
* `BKE_library_callback_remap_editor_id_reference_set`) won't work on exoected data here. */ * `BKE_library_callback_remap_editor_id_reference_set`) won't work on expected data here. */
BKE_id_delete_ex(bmain, shapekey, ID_REMAP_FORCE_UI_POINTERS); BKE_id_delete_ex(bmain, shapekey, ID_REMAP_FORCE_UI_POINTERS);
} }

View File

@@ -98,7 +98,7 @@ typedef struct FileData {
/** /**
* Store mapping from old ID pointers (the values they have in the .blend file) to new ones, * Store mapping from old ID pointers (the values they have in the .blend file) to new ones,
* typically from value in `bhead->old` to address in memory where the ID was read. * typically from value in `bhead->old` to address in memory where the ID was read.
* Used during liblinking process (see #lib_link_all). * Used during library-linking process (see #lib_link_all).
*/ */
struct OldNewMap *libmap; struct OldNewMap *libmap;
@@ -115,7 +115,7 @@ typedef struct FileData {
/** Used for undo. */ /** Used for undo. */
ListBase *old_mainlist; ListBase *old_mainlist;
/** /**
* IDMap using uuids as keys of all the old IDs in the old bmain. Used during undo to find a * IDMap using UUID's as keys of all the old IDs in the old bmain. Used during undo to find a
* matching old data when reading a new ID. */ * matching old data when reading a new ID. */
struct IDNameLib_Map *old_idmap_uuid; struct IDNameLib_Map *old_idmap_uuid;

View File

@@ -234,7 +234,7 @@ void _bmo_slot_copy(BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS],
slot_dst->data.buf = NULL; slot_dst->data.buf = NULL;
slot_dst->len = slot_src->len; slot_dst->len = slot_src->len;
if (slot_dst->len) { if (slot_dst->len) {
/* check dest has all flags enabled that the source has */ /* Check destination has all flags enabled that the source has. */
const eBMOpSlotSubType_Elem src_elem_flag = (slot_src->slot_subtype.elem & BM_ALL_NOLOOP); const eBMOpSlotSubType_Elem src_elem_flag = (slot_src->slot_subtype.elem & BM_ALL_NOLOOP);
const eBMOpSlotSubType_Elem dst_elem_flag = (slot_dst->slot_subtype.elem & BM_ALL_NOLOOP); const eBMOpSlotSubType_Elem dst_elem_flag = (slot_dst->slot_subtype.elem & BM_ALL_NOLOOP);

View File

@@ -293,7 +293,7 @@ void DeferredLayer::begin_sync()
/* Textures. */ /* Textures. */
prepass_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx); prepass_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx);
/* Uniform Buf. */ /* Uniform Buffer. */
prepass_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get()); prepass_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get());
inst_.velocity.bind_resources(&prepass_ps_); inst_.velocity.bind_resources(&prepass_ps_);
@@ -338,11 +338,11 @@ void DeferredLayer::begin_sync()
gbuffer_ps_.bind_image(RBUFS_AOV_VALUE_SLOT, &inst_.render_buffers.aov_value_tx); gbuffer_ps_.bind_image(RBUFS_AOV_VALUE_SLOT, &inst_.render_buffers.aov_value_tx);
/* Cryptomatte. */ /* Cryptomatte. */
gbuffer_ps_.bind_image(RBUFS_CRYPTOMATTE_SLOT, &inst_.render_buffers.cryptomatte_tx); gbuffer_ps_.bind_image(RBUFS_CRYPTOMATTE_SLOT, &inst_.render_buffers.cryptomatte_tx);
/* Storage Buf. */ /* Storage Buffer. */
gbuffer_ps_.bind_ssbo(RBUFS_AOV_BUF_SLOT, &inst_.film.aovs_info); gbuffer_ps_.bind_ssbo(RBUFS_AOV_BUF_SLOT, &inst_.film.aovs_info);
/* Textures. */ /* Textures. */
gbuffer_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx); gbuffer_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx);
/* Uniform Buf. */ /* Uniform Buffer. */
gbuffer_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get()); gbuffer_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get());
inst_.sampling.bind_resources(&gbuffer_ps_); inst_.sampling.bind_resources(&gbuffer_ps_);

View File

@@ -89,7 +89,7 @@ class Sampling {
template<typename T> void bind_resources(draw::detail::PassBase<T> *pass) template<typename T> void bind_resources(draw::detail::PassBase<T> *pass)
{ {
/* Storage Buf. */ /* Storage Buffer. */
pass->bind_ssbo(SAMPLING_BUF_SLOT, &data_); pass->bind_ssbo(SAMPLING_BUF_SLOT, &data_);
} }

View File

@@ -120,13 +120,13 @@ class VelocityModule {
template<typename T> void bind_resources(draw::detail::Pass<T> *pass) template<typename T> void bind_resources(draw::detail::Pass<T> *pass)
{ {
/* Storage Buf. */ /* Storage Buffer. */
pass->bind_ssbo(VELOCITY_OBJ_PREV_BUF_SLOT, &(*object_steps[STEP_PREVIOUS])); pass->bind_ssbo(VELOCITY_OBJ_PREV_BUF_SLOT, &(*object_steps[STEP_PREVIOUS]));
pass->bind_ssbo(VELOCITY_OBJ_NEXT_BUF_SLOT, &(*object_steps[next_step_])); pass->bind_ssbo(VELOCITY_OBJ_NEXT_BUF_SLOT, &(*object_steps[next_step_]));
pass->bind_ssbo(VELOCITY_GEO_PREV_BUF_SLOT, &(*geometry_steps[STEP_PREVIOUS])); pass->bind_ssbo(VELOCITY_GEO_PREV_BUF_SLOT, &(*geometry_steps[STEP_PREVIOUS]));
pass->bind_ssbo(VELOCITY_GEO_NEXT_BUF_SLOT, &(*geometry_steps[next_step_])); pass->bind_ssbo(VELOCITY_GEO_NEXT_BUF_SLOT, &(*geometry_steps[next_step_]));
pass->bind_ssbo(VELOCITY_INDIRECTION_BUF_SLOT, &indirection_buf); pass->bind_ssbo(VELOCITY_INDIRECTION_BUF_SLOT, &indirection_buf);
/* Uniform Buf. */ /* Uniform Buffer. */
pass->bind_ubo(VELOCITY_CAMERA_PREV_BUF, &(*camera_steps[STEP_PREVIOUS])); pass->bind_ubo(VELOCITY_CAMERA_PREV_BUF, &(*camera_steps[STEP_PREVIOUS]));
pass->bind_ubo(VELOCITY_CAMERA_CURR_BUF, &(*camera_steps[STEP_CURRENT])); pass->bind_ubo(VELOCITY_CAMERA_CURR_BUF, &(*camera_steps[STEP_CURRENT]));
pass->bind_ubo(VELOCITY_CAMERA_NEXT_BUF, &(*camera_steps[next_step_])); pass->bind_ubo(VELOCITY_CAMERA_NEXT_BUF, &(*camera_steps[next_step_]));

View File

@@ -1142,7 +1142,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
* A symmetrizable selection contains selected ebones of the input direction * A symmetrizable selection contains selected ebones of the input direction
* and unique selected bones with an unique flippable name. * and unique selected bones with an unique flippable name.
* *
* Storing temp ptrs to mirrored unselected ebones. */ * Storing temp pointers to mirrored unselected ebones. */
for (ebone_iter = arm->edbo->first; ebone_iter; ebone_iter = ebone_iter->next) { for (ebone_iter = arm->edbo->first; ebone_iter; ebone_iter = ebone_iter->next) {
if (!(EBONE_VISIBLE(arm, ebone_iter) && (ebone_iter->flag & BONE_SELECTED))) { if (!(EBONE_VISIBLE(arm, ebone_iter) && (ebone_iter->flag & BONE_SELECTED))) {
/* Skipping invisible selected bones. */ /* Skipping invisible selected bones. */

View File

@@ -191,11 +191,11 @@ static void ui_popup_menu_create_block(bContext *C,
if (!pup->but) { if (!pup->but) {
pup->block->flag |= UI_BLOCK_NO_FLIP; pup->block->flag |= UI_BLOCK_NO_FLIP;
} }
/* A title is only provided when a Menu has a label, this is not alwas the case, see e.g. /* A title is only provided when a Menu has a label, this is not always the case, see e.g.
* `VIEW3D_MT_edit_mesh_context_menu` -- this specifies its own label inside the draw function * `VIEW3D_MT_edit_mesh_context_menu` -- this specifies its own label inside the draw function
* depending on vertex/edge/face mode. We still want to flag the uiBlock (but only insert into * depending on vertex/edge/face mode. We still want to flag the uiBlock (but only insert into
* the puphash if we have a title provided). Choosing an entry in a menu will still handle * the `puphash` if we have a title provided). Choosing an entry in a menu will still handle
* puphash later (see `button_activate_exit`) though multiple menus without a label might fight * `puphash` later (see `button_activate_exit`) though multiple menus without a label might fight
* for the same storage of the menu memory. Using idname instead (or in combination with the * for the same storage of the menu memory. Using idname instead (or in combination with the
* label) for the hash could be looked at to solve this. */ * label) for the hash could be looked at to solve this. */
pup->block->flag |= UI_BLOCK_POPUP_MEMORY; pup->block->flag |= UI_BLOCK_POPUP_MEMORY;

View File

@@ -71,8 +71,8 @@ static void undolatt_to_editlatt(UndoLattice *ult, EditLatt *editlatt)
memcpy(editlatt->latt->def, ult->def, sizeof(BPoint) * len_src); memcpy(editlatt->latt->def, ult->def, sizeof(BPoint) * len_src);
} }
/* Even for the same amount of points we dont just copy memory for MDeformVert, relations to /* Even for the same amount of points we don't just copy memory for MDeformVert,
* MDeformWeight might have changed. */ * relations to #MDeformWeight might have changed. */
if (editlatt->latt->dvert && ult->dvert) { if (editlatt->latt->dvert && ult->dvert) {
BKE_defvert_array_free(editlatt->latt->dvert, len_dst); BKE_defvert_array_free(editlatt->latt->dvert, len_dst);
editlatt->latt->dvert = MEM_mallocN(sizeof(MDeformVert) * len_src, "Lattice MDeformVert"); editlatt->latt->dvert = MEM_mallocN(sizeof(MDeformVert) * len_src, "Lattice MDeformVert");

View File

@@ -235,8 +235,8 @@ static void imapaint_tri_weights(float matrix[4][4],
h[1] = (co[1] - view[1]) * 2.0f / view[3] - 1.0f; h[1] = (co[1] - view[1]) * 2.0f / view[3] - 1.0f;
h[2] = 1.0f; h[2] = 1.0f;
/* solve for (w1,w2,w3)/perspdiv in: /* Solve for `(w1,w2,w3)/perspdiv` in:
* h * perspdiv = Project * Model * (w1 * v1 + w2 * v2 + w3 * v3) */ * `h * perspdiv = Project * Model * (w1 * v1 + w2 * v2 + w3 * v3)`. */
wmat[0][0] = pv1[0]; wmat[0][0] = pv1[0];
wmat[1][0] = pv2[0]; wmat[1][0] = pv2[0];
@@ -253,7 +253,7 @@ static void imapaint_tri_weights(float matrix[4][4],
copy_v3_v3(w, h); copy_v3_v3(w, h);
/* w is still divided by perspdiv, make it sum to one */ /* w is still divided by `perspdiv`, make it sum to one */
divw = w[0] + w[1] + w[2]; divw = w[0] + w[1] + w[2];
if (divw != 0.0f) { if (divw != 0.0f) {
mul_v3_fl(w, 1.0f / divw); mul_v3_fl(w, 1.0f / divw);

View File

@@ -58,7 +58,7 @@ bool ED_wpaint_ensure_data(bContext *C,
return false; return false;
} }
/* if nothing was added yet, we make dverts and a vertex deform group */ /* If nothing was added yet, we make deform-verts and a vertex deform group. */
if (BKE_mesh_deform_verts(me) == nullptr) { if (BKE_mesh_deform_verts(me) == nullptr) {
BKE_object_defgroup_data_create(&me->id); BKE_object_defgroup_data_create(&me->id);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
@@ -136,8 +136,7 @@ int ED_wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active)
} }
} }
/* curdef should never be nullptr unless this is /* `mirrdef` shouldn't be -1 unless the object is a light & #BKE_object_defgroup_new fails. */
* a light and BKE_object_defgroup_add_name fails */
return mirrdef; return mirrdef;
} }

View File

@@ -445,9 +445,9 @@ static void gizmo_retime_handle_draw(const bContext *C, wmGizmo *gz)
RetimeHandleMoveGizmo *gizmo = (RetimeHandleMoveGizmo *)gz; RetimeHandleMoveGizmo *gizmo = (RetimeHandleMoveGizmo *)gz;
const View2D *v2d = UI_view2d_fromcontext(C); const View2D *v2d = UI_view2d_fromcontext(C);
/* TODO: This is hardcoded behavior, same as preselect gizmos in 3D view. /* TODO: This is hard-coded behavior, same as pre-select gizmos in 3D view.
* Better solution would be to check operator keymap and display this information in status bar * Better solution would be to check operator keymap and display this information in status bar
* and tooltip. */ * and tool-tip. */
wmEvent *event = CTX_wm_window(C)->eventstate; wmEvent *event = CTX_wm_window(C)->eventstate;
gizmo->create_transition_operation = (event->modifier & KM_SHIFT) != 0; gizmo->create_transition_operation = (event->modifier & KM_SHIFT) != 0;

View File

@@ -216,7 +216,7 @@ static int sequencer_retiming_handle_move_modal(bContext *C, wmOperator *op, con
const bool handle_is_transition = SEQ_retiming_handle_is_transition_type(handle); const bool handle_is_transition = SEQ_retiming_handle_is_transition_type(handle);
const bool prev_handle_is_transition = SEQ_retiming_handle_is_transition_type(handle - 1); const bool prev_handle_is_transition = SEQ_retiming_handle_is_transition_type(handle - 1);
/* When working with transiton, change handles when moving past pivot point. */ /* When working with transition, change handles when moving past pivot point. */
if (handle_is_transition || prev_handle_is_transition) { if (handle_is_transition || prev_handle_is_transition) {
SeqRetimingHandle *transition_start, *transition_end; SeqRetimingHandle *transition_start, *transition_end;
if (handle_is_transition) { if (handle_is_transition) {

View File

@@ -891,7 +891,7 @@ static void view3d_boxview_sync_axis(RegionView3D *rv3d_dst, RegionView3D *rv3d_
mul_qt_v3(viewinv, view_dst_x); mul_qt_v3(viewinv, view_dst_x);
mul_qt_v3(viewinv, view_dst_y); mul_qt_v3(viewinv, view_dst_y);
/* check source and dest have a matching axis */ /* Check source and destination have a matching axis. */
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
if (((fabsf(view_src_x[i]) > axis_eps) || (fabsf(view_src_y[i]) > axis_eps)) && if (((fabsf(view_src_x[i]) > axis_eps) || (fabsf(view_src_y[i]) > axis_eps)) &&
((fabsf(view_dst_x[i]) > axis_eps) || (fabsf(view_dst_y[i]) > axis_eps))) ((fabsf(view_dst_x[i]) > axis_eps) || (fabsf(view_dst_y[i]) > axis_eps)))

View File

@@ -102,7 +102,7 @@ static float get_aspect_scaled_extent(const rctf &extent, const UVPackIsland_Par
} }
/** /**
* \return true iff `b` is a preferred layout over `a`, given the packing parameters supplied. * \return true if `b` is a preferred layout over `a`, given the packing parameters supplied.
*/ */
static bool is_larger(const rctf &a, const rctf &b, const UVPackIsland_Params &params) static bool is_larger(const rctf &a, const rctf &b, const UVPackIsland_Params &params)
{ {

View File

@@ -142,7 +142,7 @@ VKStateManager &VKContext::state_manager_get()
/** \} */ /** \} */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name Framebuffer /** \name Frame-buffer
* \{ */ * \{ */
void VKContext::activate_framebuffer(VKFrameBuffer &framebuffer) void VKContext::activate_framebuffer(VKFrameBuffer &framebuffer)

View File

@@ -33,9 +33,9 @@ class VKFrameBuffer : public FrameBuffer {
/** /**
* Should we flip the viewport to match Blenders coordinate system. We flip the viewport for * Should we flip the viewport to match Blenders coordinate system. We flip the viewport for
* offscreen framebuffers. * off-screen frame-buffers.
* *
* When two framebuffers are blitted we also check if the coordinate system should be flipped * When two frame-buffers are blitted we also check if the coordinate system should be flipped
* during blitting. * during blitting.
*/ */
bool flip_viewport_ = false; bool flip_viewport_ = false;

View File

@@ -169,7 +169,7 @@ void VKPipeline::finalize(VKContext &context,
viewport_state.scissorCount = 1; viewport_state.scissorCount = 1;
pipeline_create_info.pViewportState = &viewport_state; pipeline_create_info.pViewportState = &viewport_state;
/* Multisample state. */ /* Multi-sample state. */
VkPipelineMultisampleStateCreateInfo multisample_state = {}; VkPipelineMultisampleStateCreateInfo multisample_state = {};
multisample_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; multisample_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
multisample_state.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; multisample_state.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;

View File

@@ -20,7 +20,7 @@ VKPipelineStateManager::VKPipelineStateManager()
depth_stencil_state = {}; depth_stencil_state = {};
depth_stencil_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; depth_stencil_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
/* TODO should be extracted from current framebuffer and should not be done here and now. */ /* TODO should be extracted from current frame-buffer and should not be done here and now. */
/* When the attachments differ the state should be forced. */ /* When the attachments differ the state should be forced. */
VkPipelineColorBlendAttachmentState color_blend_attachment = {}; VkPipelineColorBlendAttachmentState color_blend_attachment = {};
color_blend_attachment.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | color_blend_attachment.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT |
@@ -364,4 +364,4 @@ void VKPipelineStateManager::set_shadow_bias(const bool enable)
} }
} }
} // namespace blender::gpu } // namespace blender::gpu

View File

@@ -65,7 +65,7 @@ void path_reference_copy(const Set<std::pair<std::string, std::string>> &copy_se
continue; continue;
} }
if (0 == BLI_path_cmp_normalized(src, dst)) { if (0 == BLI_path_cmp_normalized(src, dst)) {
continue; /* Source and dest are the same. */ continue; /* Source and destination are the same. */
} }
if (!BLI_file_ensure_parent_dir_exists(dst)) { if (!BLI_file_ensure_parent_dir_exists(dst)) {
fprintf(stderr, "Can't make directory for '%s', not copying\n", dst); fprintf(stderr, "Can't make directory for '%s', not copying\n", dst);

View File

@@ -103,8 +103,10 @@ static bool prim_path_valid(const char *path)
return true; return true;
} }
/* Perform validation of export parameter settings. Returns /**
* true if the paramters are valid; returns false otherwise. */ * Perform validation of export parameter settings.
* \return true if the parameters are valid; returns false otherwise.
*/
static bool export_params_valid(const USDExportParams &params) static bool export_params_valid(const USDExportParams &params)
{ {
bool valid = true; bool valid = true;

View File

@@ -296,7 +296,7 @@ static void populate_curve_props_for_nurbs(const bke::CurvesGeometry &geometry,
Array<float> temp_knots(knots_num); Array<float> temp_knots(knots_num);
bke::curves::nurbs::calculate_knots(tot_points, mode, order, is_cyclic, temp_knots); bke::curves::nurbs::calculate_knots(tot_points, mode, order, is_cyclic, temp_knots);
/* Knots should be the concatentation of all batched curves. /* Knots should be the concatenation of all batched curves.
* https://graphics.pixar.com/usd/dev/api/class_usd_geom_nurbs_curves.html#details */ * https://graphics.pixar.com/usd/dev/api/class_usd_geom_nurbs_curves.html#details */
for (int i_knot = 0; i_knot < knots_num; i_knot++) { for (int i_knot = 0; i_knot < knots_num; i_knot++) {
knots.push_back(double(temp_knots[i_knot])); knots.push_back(double(temp_knots[i_knot]));

View File

@@ -567,9 +567,10 @@ typedef enum eItasc_Flags {
ITASC_INITIAL_REITERATION = (1 << 1), ITASC_INITIAL_REITERATION = (1 << 1),
ITASC_REITERATION = (1 << 2), ITASC_REITERATION = (1 << 2),
ITASC_SIMULATION = (1 << 3), ITASC_SIMULATION = (1 << 3),
/**
/* Set this flag to always translate root bones (i.e. bones without a parent) to (0, 0, 0). * Set this flag to always translate root bones (i.e. bones without a parent) to (0, 0, 0).
* This was the pre-3.6 behaviour, and this flag was introduced for backward compatibility. */ * This was the pre-3.6 behavior, and this flag was introduced for backward compatibility.
*/
ITASC_TRANSLATE_ROOT_BONES = (1 << 4), ITASC_TRANSLATE_ROOT_BONES = (1 << 4),
} eItasc_Flags; } eItasc_Flags;

View File

@@ -212,7 +212,7 @@ void weightvg_do_mask(const ModifierEvalContext *ctx,
/* Get vgroup idx from its name. */ /* Get vgroup idx from its name. */
/* Proceed only if vgroup is valid, else use constant factor. */ /* Proceed only if vgroup is valid, else use constant factor. */
/* Get actual dverts (ie vertex group data). */ /* Get actual deform-verts (ie vertex group data). */
const MDeformVert *dvert = static_cast<const MDeformVert *>( const MDeformVert *dvert = static_cast<const MDeformVert *>(
CustomData_get_layer(&mesh->vdata, CD_MDEFORMVERT)); CustomData_get_layer(&mesh->vdata, CD_MDEFORMVERT));
/* Proceed only if vgroup is valid, else assume factor = O. */ /* Proceed only if vgroup is valid, else assume factor = O. */

View File

@@ -2640,7 +2640,7 @@ static PyObject *Vector_swizzle_get(VectorObject *self, void *closure)
* Set the items of this vector using a swizzle. * Set the items of this vector using a swizzle.
* - If value is a vector or list this operates like an array copy, except that * - If value is a vector or list this operates like an array copy, except that
* the destination is effectively re-ordered as defined by the swizzle. At * the destination is effectively re-ordered as defined by the swizzle. At
* most min(len(source), len(dest)) values will be copied. * most `min(len(source), len(destination))` values will be copied.
* - If the value is scalar, it is copied to all axes listed in the swizzle. * - If the value is scalar, it is copied to all axes listed in the swizzle.
* - If an axis appears more than once in the swizzle, the final occurrence is * - If an axis appears more than once in the swizzle, the final occurrence is
* the one that determines its value. * the one that determines its value.

View File

@@ -302,6 +302,7 @@ dict_custom = {
"subdirectories", "subdirectories",
"subdirectory", "subdirectory",
"suboptimally", "suboptimally",
"subrange",
"subtractive", "subtractive",
"superset", "superset",
"symmetrize", "symmetrize",