Merge branch 'blender-v3.1-release'
This commit is contained in:
commit
04a93b795c
|
@ -1 +1 @@
|
|||
Subproject commit 620b85f16d03a6aadd7cae56969c9c29b06b992d
|
||||
Subproject commit 050058417452bfba0cc9ae8692173eb02ac1ef3a
|
|
@ -1 +1 @@
|
|||
Subproject commit 67f1fbca1482d9d9362a4001332e785c3fd5d230
|
||||
Subproject commit faa9fc7f98e19be54a715c24061185b04dff5b6c
|
|
@ -1 +1 @@
|
|||
Subproject commit 7936dde9ece881d531b1a2ee6c45ddb56d30038c
|
||||
Subproject commit 61e45814503f51963c91c51aaf764612e7c5dc72
|
|
@ -624,6 +624,35 @@ static void lib_override_linked_group_tag_recursive(LibOverrideGroupTagData *dat
|
|||
}
|
||||
}
|
||||
|
||||
static bool lib_override_linked_group_tag_collections_keep_tagged_check_recursive(
|
||||
LibOverrideGroupTagData *data, Collection *collection)
|
||||
{
|
||||
/* NOTE: Collection's object cache (using bases, as returned by #BKE_collection_object_cache_get)
|
||||
* is not usable here, as it may have become invalid from some previous operation and it should
|
||||
* not be updated here. So instead only use collections' reliable 'raw' data to check if some
|
||||
* object in the hierarchy of the given collection is still tagged for override. */
|
||||
for (CollectionObject *collection_object = collection->gobject.first; collection_object != NULL;
|
||||
collection_object = collection_object->next) {
|
||||
Object *object = collection_object->ob;
|
||||
if (object == NULL) {
|
||||
continue;
|
||||
}
|
||||
if ((object->id.tag & data->tag) != 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (CollectionChild *collection_child = collection->children.first; collection_child != NULL;
|
||||
collection_child = collection_child->next) {
|
||||
if (lib_override_linked_group_tag_collections_keep_tagged_check_recursive(
|
||||
data, collection_child->collection)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void lib_override_linked_group_tag_clear_boneshapes_objects(LibOverrideGroupTagData *data)
|
||||
{
|
||||
Main *bmain = data->bmain;
|
||||
|
@ -646,15 +675,8 @@ static void lib_override_linked_group_tag_clear_boneshapes_objects(LibOverrideGr
|
|||
if ((collection->id.tag & data->tag) == 0) {
|
||||
continue;
|
||||
}
|
||||
bool keep_tagged = false;
|
||||
const ListBase object_bases = BKE_collection_object_cache_get(collection);
|
||||
LISTBASE_FOREACH (Base *, base, &object_bases) {
|
||||
if ((base->object->id.tag & data->tag) != 0) {
|
||||
keep_tagged = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!keep_tagged) {
|
||||
|
||||
if (!lib_override_linked_group_tag_collections_keep_tagged_check_recursive(data, collection)) {
|
||||
collection->id.tag &= ~data->tag;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
|
|||
if (iterator.tile_data.tile_buffer == nullptr) {
|
||||
continue;
|
||||
}
|
||||
ensure_float_buffer(*iterator.tile_data.tile_buffer);
|
||||
const bool float_buffer_created = ensure_float_buffer(*iterator.tile_data.tile_buffer);
|
||||
const float tile_width = static_cast<float>(iterator.tile_data.tile_buffer->x);
|
||||
const float tile_height = static_cast<float>(iterator.tile_data.tile_buffer->y);
|
||||
|
||||
|
@ -313,6 +313,10 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
|
|||
0);
|
||||
imb_freerectImbuf_all(&extracted_buffer);
|
||||
}
|
||||
/* TODO(jbakker): Find leak when rendering VSE and remove this call. */
|
||||
if (float_buffer_created) {
|
||||
imb_freerectfloatImBuf(iterator.tile_data.tile_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,12 +370,19 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
|
|||
|
||||
/**
|
||||
* \brief Ensure that the float buffer of the given image buffer is available.
|
||||
*
|
||||
* Returns true when a float buffer was created. Somehow the VSE cache increases the ref
|
||||
* counter, but might use a different mechanism for destructing the image, that doesn't free the
|
||||
* rect_float as the refcounter isn't 0. To work around this we destruct any created local
|
||||
* buffers ourself.
|
||||
*/
|
||||
void ensure_float_buffer(ImBuf &image_buffer) const
|
||||
bool ensure_float_buffer(ImBuf &image_buffer) const
|
||||
{
|
||||
if (image_buffer.rect_float == nullptr) {
|
||||
IMB_float_from_rect(&image_buffer);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void do_full_update_texture_slot(const IMAGE_InstanceData &instance_data,
|
||||
|
@ -382,7 +393,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
|
|||
{
|
||||
const int texture_width = texture_buffer.x;
|
||||
const int texture_height = texture_buffer.y;
|
||||
ensure_float_buffer(tile_buffer);
|
||||
const bool float_buffer_created = ensure_float_buffer(tile_buffer);
|
||||
|
||||
/* IMB_transform works in a non-consistent space. This should be documented or fixed!.
|
||||
* Construct a variant of the info_uv_to_texture that adds the texel space
|
||||
|
@ -417,6 +428,11 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
|
|||
IMB_FILTER_NEAREST,
|
||||
uv_to_texel,
|
||||
crop_rect_ptr);
|
||||
|
||||
/* TODO(jbakker): Find leak when rendering VSE and remove this call. */
|
||||
if (float_buffer_created) {
|
||||
imb_freerectfloatImBuf(&tile_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 26bc78162ec89f21453ce3ded7b999bc6649f32b
|
||||
Subproject commit 7fd2ed908b4f50140670caf6786e5ed245b79137
|
Loading…
Reference in New Issue