Merge branch 'blender-v3.4-release'

This commit is contained in:
Germano Cavalcante
2022-11-16 11:01:29 -03:00
4 changed files with 22 additions and 18 deletions

View File

@@ -103,10 +103,6 @@ if(EXISTS ${SOURCE_DIR}/.git)
endif()
endif()
if(MY_WC_BRANCH MATCHES "^blender-v")
set(MY_WC_BRANCH "master")
endif()
unset(_git_below_check)
endif()

View File

@@ -684,6 +684,15 @@ static void lib_query_unused_ids_tag_recurse(Main *bmain,
return;
}
if (ELEM(GS(id->name), ID_IM)) {
/* Images which have a 'viewer' source (e.g. render results) should not be considered as
* orphaned/unused data. */
Image *image = (Image *)id;
if (image->source == IMA_SRC_VIEWER) {
return;
}
}
/* An ID user is 'valid' (i.e. may affect the 'used'/'not used' status of the ID it uses) if it
* does not match `ignored_usages`, and does match `required_usages`. */
const int ignored_usages = (IDWALK_CB_LOOPBACK | IDWALK_CB_EMBEDDED);
@@ -696,11 +705,10 @@ static void lib_query_unused_ids_tag_recurse(Main *bmain,
bool has_valid_from_users = false;
/* Preemptively consider this ID as unused. That way if there is a loop of dependency leading
* back to it, it won't create a fake 'valid user' detection.
* NOTE: This can only be done for a subset of IDs, some types are never 'indirectly unused',
* same for IDs with a fake user. */
if ((id->flag & LIB_FAKEUSER) == 0 && !ELEM(GS(id->name), ID_SCE, ID_WM, ID_SCR, ID_WS, ID_LI)) {
id->tag |= tag;
}
* NOTE: there are some cases (like when fake user is set, or some ID types) which are never
* 'indirectly unused'. However, these have already been checked and early-returned above, so any
* ID reaching this point of the function can be tagged. */
id->tag |= tag;
for (MainIDRelationsEntryItem *id_from_item = id_relations->from_ids; id_from_item != NULL;
id_from_item = id_from_item->next) {
if ((id_from_item->usage_flag & ignored_usages) != 0 ||
@@ -727,8 +735,7 @@ static void lib_query_unused_ids_tag_recurse(Main *bmain,
id->tag &= ~tag;
}
else {
/* This ID has no 'valid' users, tag it as unused. */
id->tag |= tag;
/* This ID has no 'valid' users, its 'unused' tag preemptively set above can be kept. */
if (r_num_tagged != NULL) {
r_num_tagged[INDEX_ID_NULL]++;
r_num_tagged[BKE_idtype_idcode_to_index(GS(id->name))]++;

View File

@@ -20,10 +20,10 @@ namespace blender::draw {
* \{ */
struct MeshExtract_EdgeFac_Data {
uchar *vbo_data;
uint8_t *vbo_data;
bool use_edge_render;
/* Number of loop per edge. */
uchar *edge_loop_count;
uint8_t *edge_loop_count;
};
static float loop_edge_factor_get(const float f_no[3],
@@ -59,8 +59,7 @@ static void extract_edge_fac_init(const MeshRenderData *mr,
MeshExtract_EdgeFac_Data *data = static_cast<MeshExtract_EdgeFac_Data *>(tls_data);
if (mr->extract_type == MR_EXTRACT_MESH) {
data->edge_loop_count = static_cast<uchar *>(
MEM_callocN(sizeof(uint32_t) * mr->edge_len, __func__));
data->edge_loop_count = MEM_cnew_array<uint8_t>(mr->edge_len, __func__);
/* HACK(@fclem): Detecting the need for edge render.
* We could have a flag in the mesh instead or check the modifier stack. */

View File

@@ -2048,10 +2048,12 @@ static size_t animdata_filter_mask(Main *bmain,
}
/* add mask animation channels */
BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_MASK(mask)) {
tmp_items += animdata_filter_mask_data(&tmp_data, mask, filter_mode);
if (!(filter_mode & ANIMFILTER_FCURVESONLY)) {
BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_MASK(mask)) {
tmp_items += animdata_filter_mask_data(&tmp_data, mask, filter_mode);
}
END_ANIMFILTER_SUBCHANNELS;
}
END_ANIMFILTER_SUBCHANNELS;
/* did we find anything? */
if (tmp_items) {