diff options
author | Himanshi Kalra <himanshikalra98@gmail.com> | 2021-07-26 22:29:28 +0300 |
---|---|---|
committer | Himanshi Kalra <himanshikalra98@gmail.com> | 2021-07-26 22:29:28 +0300 |
commit | dff47e3b94dace457670926c7fb9e6ae3401d297 (patch) | |
tree | 1443247bcf185e28d0c97994cb13b4ac64fa56bd | |
parent | fd32fe6b02f68662cfe04ea9cbaf86187dbf77a4 (diff) | |
parent | cf74cd93674c11e8e5ef599100d0c7bf3cc8a79c (diff) |
Merge branch 'master' into soc-2021-geometry-nodes-regression-testsoc-2021-geometry-nodes-regression-test
55 files changed, 248 insertions, 107 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 90188751fc0..70973eeda99 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -404,7 +404,7 @@ endif() # CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags. if(WITH_OPENMP) - if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0") + if(CMAKE_C_COMPILER_ID MATCHES "Clang") # Use OpenMP from our precompiled libraries. message(STATUS "Using ${LIBDIR}/openmp for OpenMP") set(OPENMP_CUSTOM ON) @@ -480,10 +480,8 @@ else() set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic") endif() -if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5) - # Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv - string(APPEND CMAKE_CXX_FLAGS " -ftemplate-depth=1024") -endif() +# Clang has too low template depth of 128 for libmv. +string(APPEND CMAKE_CXX_FLAGS " -ftemplate-depth=1024") # Avoid conflicts with Luxrender, and other plug-ins that may use the same # libraries as Blender with a different version or build options. diff --git a/build_files/config/pipeline_config.json b/build_files/config/pipeline_config.json index c9a5e25eaaf..d914cf85eae 100644 --- a/build_files/config/pipeline_config.json +++ b/build_files/config/pipeline_config.json @@ -41,7 +41,7 @@ }, "cuda11": { - "version": "11.3" + "version": "11.4" } }, "cmake": diff --git a/intern/cycles/device/cuda/device_cuda_impl.cpp b/intern/cycles/device/cuda/device_cuda_impl.cpp index 5b62292ca55..cebe8ce631e 100644 --- a/intern/cycles/device/cuda/device_cuda_impl.cpp +++ b/intern/cycles/device/cuda/device_cuda_impl.cpp @@ -461,18 +461,19 @@ string CUDADevice::compile_kernel(const DeviceRequestedFeatures &requested_featu const int nvcc_cuda_version = cuewCompilerVersion(); VLOG(1) << "Found nvcc " << nvcc << ", CUDA version " << nvcc_cuda_version << "."; - if (nvcc_cuda_version < 80) { + if (nvcc_cuda_version < 101) { printf( "Unsupported CUDA version %d.%d detected, " - "you need CUDA 8.0 or newer.\n", + "you need CUDA 10.1 or newer.\n", nvcc_cuda_version / 10, nvcc_cuda_version % 10); return string(); } - else if (!(nvcc_cuda_version == 101 || nvcc_cuda_version == 102)) { + else if (!(nvcc_cuda_version == 101 || nvcc_cuda_version == 102 || nvcc_cuda_version == 111 || + nvcc_cuda_version == 112 || nvcc_cuda_version == 113 || nvcc_cuda_version == 114)) { printf( "CUDA version %d.%d detected, build may succeed but only " - "CUDA 10.1 and 10.2 are officially supported.\n", + "CUDA 10.1 to 11.4 are officially supported.\n", nvcc_cuda_version / 10, nvcc_cuda_version % 10); } diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index ea0f16c9233..db789d885f7 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -380,11 +380,16 @@ if(WITH_CYCLES_CUDA_BINARIES) set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}") # warn for other versions - if((CUDA_VERSION MATCHES "101") OR (CUDA_VERSION MATCHES "102") OR (CUDA_VERSION MATCHES "111")) + if((CUDA_VERSION MATCHES "101") OR + (CUDA_VERSION MATCHES "102") OR + (CUDA_VERSION MATCHES "111") OR + (CUDA_VERSION MATCHES "112") OR + (CUDA_VERSION MATCHES "113") OR + (CUDA_VERSION MATCHES "114")) else() message(WARNING "CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, " - "build may succeed but only CUDA 10.1, 10.2 and 11.1 are officially supported") + "build may succeed but only CUDA 10.1 to 11.4 are officially supported") endif() # build for each arch diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h index 1113ede0f2d..38afa163db5 100644 --- a/intern/cycles/util/util_math_fast.h +++ b/intern/cycles/util/util_math_fast.h @@ -103,7 +103,7 @@ ccl_device float fast_sinf(float x) * 1.19209e-07 max error */ int q = fast_rint(x * M_1_PI_F); - float qf = q; + float qf = (float)q; x = madd(qf, -0.78515625f * 4, x); x = madd(qf, -0.00024187564849853515625f * 4, x); x = madd(qf, -3.7747668102383613586e-08f * 4, x); @@ -132,7 +132,7 @@ ccl_device float fast_cosf(float x) { /* Same argument reduction as fast_sinf(). */ int q = fast_rint(x * M_1_PI_F); - float qf = q; + float qf = (float)q; x = madd(qf, -0.78515625f * 4, x); x = madd(qf, -0.00024187564849853515625f * 4, x); x = madd(qf, -3.7747668102383613586e-08f * 4, x); @@ -160,7 +160,7 @@ ccl_device void fast_sincosf(float x, float *sine, float *cosine) { /* Same argument reduction as fast_sin. */ int q = fast_rint(x * M_1_PI_F); - float qf = q; + float qf = (float)q; x = madd(qf, -0.78515625f * 4, x); x = madd(qf, -0.00024187564849853515625f * 4, x); x = madd(qf, -3.7747668102383613586e-08f * 4, x); @@ -207,7 +207,7 @@ ccl_device float fast_tanf(float x) * we sometimes need to take the reciprocal of the polynomial */ int q = fast_rint(x * 2.0f * M_1_PI_F); - float qf = q; + float qf = (float)q; x = madd(qf, -0.78515625f * 2, x); x = madd(qf, -0.00024187564849853515625f * 2, x); x = madd(qf, -3.7747668102383613586e-08f * 2, x); @@ -407,7 +407,7 @@ ccl_device float fast_logb(float x) x = fabsf(x); x = clamp(x, FLT_MIN, FLT_MAX); unsigned bits = __float_as_uint(x); - return (int)(bits >> 23) - 127; + return (float)((int)(bits >> 23) - 127); } ccl_device float fast_exp2f(float x) diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index d168d9ab6dd..6408d4096fe 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -734,11 +734,9 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): col = flow.column() col.prop(domain, "noise_scale", text="Upres Factor") - # TODO (sebbas): Mantaflow only supports wavelet noise. Maybe get rid of noise type field. - col.prop(domain, "noise_type", text="Noise Method") + col.prop(domain, "noise_strength", text="Strength") col = flow.column() - col.prop(domain, "noise_strength", text="Strength") col.prop(domain, "noise_pos_scale", text="Scale") col.prop(domain, "noise_time_anim", text="Time") diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h index 404f344919c..c8af1a91725 100644 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@ -98,6 +98,9 @@ struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *view_l const int index); int BKE_layer_collection_findindex(struct ViewLayer *view_layer, const struct LayerCollection *lc); +void BKE_layer_collection_resync_forbid(void); +void BKE_layer_collection_resync_allow(void); + void BKE_main_collection_sync(const struct Main *bmain); void BKE_scene_collection_sync(const struct Scene *scene); void BKE_layer_collection_sync(const struct Scene *scene, struct ViewLayer *view_layer); diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 1d8dc97d2af..92fd220549a 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -5005,7 +5005,6 @@ void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd, tfds->noise_pos_scale = fds->noise_pos_scale; tfds->noise_time_anim = fds->noise_time_anim; tfds->noise_scale = fds->noise_scale; - tfds->noise_type = fds->noise_type; /* liquid domain options */ tfds->flip_ratio = fds->flip_ratio; diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 28282aaa823..0a0705649bc 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -737,6 +737,35 @@ int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection * in at least one layer collection. That list is also synchronized here, and * stores state like selection. */ +/* This API allows to temporarily forbid resync of LayerCollections. + * + * This can greatly improve performances in cases where those functions get + * called a lot (e.g. during massive remappings of IDs). + * + * Usage of these should be done very carefully though. In particular, calling + * code must ensures it resync LayerCollections before any UI/Eevnt loop + * handling can happen. + * + * WARNING: This is not threadsafe at all, only use from main thread. + * + * NOTE: This is a quick and safe band-aid around the long-known issue + * regarding this resync process. + * Proper fix would be to make resync itself lazy, i.e. only happen + * when actually needed. + * See also T73411. + */ +static bool no_resync = false; + +void BKE_layer_collection_resync_forbid(void) +{ + no_resync = true; +} + +void BKE_layer_collection_resync_allow(void) +{ + no_resync = false; +} + static void layer_collection_objects_sync(ViewLayer *view_layer, LayerCollection *layer, ListBase *r_lb_new_object_bases, @@ -933,6 +962,10 @@ static void layer_collection_sync(ViewLayer *view_layer, */ void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer) { + if (no_resync) { + return; + } + if (!scene->master_collection) { /* Happens for old files that don't have versioning applied yet. */ return; @@ -997,6 +1030,10 @@ void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer) void BKE_scene_collection_sync(const Scene *scene) { + if (no_resync) { + return; + } + LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { BKE_layer_collection_sync(scene, view_layer); } @@ -1004,6 +1041,10 @@ void BKE_scene_collection_sync(const Scene *scene) void BKE_main_collection_sync(const Main *bmain) { + if (no_resync) { + return; + } + /* TODO: if a single collection changed, figure out which * scenes it belongs to and only update those. */ @@ -1018,6 +1059,10 @@ void BKE_main_collection_sync(const Main *bmain) void BKE_main_collection_sync_remap(const Main *bmain) { + if (no_resync) { + return; + } + /* On remapping of object or collection pointers free caches. */ /* TODO: try to make this faster */ @@ -1320,6 +1365,10 @@ static void layer_collection_local_sync(ViewLayer *view_layer, void BKE_layer_collection_local_sync(ViewLayer *view_layer, const View3D *v3d) { + if (no_resync) { + return; + } + const unsigned short local_collections_uuid = v3d->local_collections_uuid; /* Reset flags and set the bases visible by default. */ @@ -1337,6 +1386,10 @@ void BKE_layer_collection_local_sync(ViewLayer *view_layer, const View3D *v3d) */ void BKE_layer_collection_local_sync_all(const Main *bmain) { + if (no_resync) { + return; + } + LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 9871bf5dc83..0ef9692f7e5 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -1722,6 +1722,11 @@ void BKE_lib_override_library_main_resync(Main *bmain, COLLECTION_RESTRICT_RENDER; } + /* Necessary to improve performances, and prevent layers matching override sub-collections to be + * lost when re-syncing the parent override collection. + * Ref. T73411. */ + BKE_layer_collection_resync_forbid(); + int library_indirect_level = lib_override_libraries_index_define(bmain); while (library_indirect_level >= 0) { /* Update overrides from each indirect level separately. */ @@ -1734,6 +1739,8 @@ void BKE_lib_override_library_main_resync(Main *bmain, library_indirect_level--; } + BKE_layer_collection_resync_allow(); + /* Essentially ensures that potentially new overrides of new objects will be instantiated. */ lib_override_library_create_post_process( bmain, scene, view_layer, NULL, NULL, override_resync_residual_storage, true); diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index ad154704d2c..930d82fa225 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -52,8 +52,8 @@ set(INC set(SRC intern/draw_cache.c intern/draw_cache_extract_mesh.cc - intern/draw_cache_extract_mesh_extractors.c intern/draw_cache_extract_mesh_render_data.c + intern/mesh_extractors/extract_mesh.c intern/mesh_extractors/extract_mesh_ibo_edituv.cc intern/mesh_extractors/extract_mesh_ibo_fdots.cc intern/mesh_extractors/extract_mesh_ibo_lines.cc @@ -193,7 +193,6 @@ set(SRC intern/DRW_render.h intern/draw_cache.h intern/draw_cache_extract.h - intern/draw_cache_extract_mesh_private.h intern/draw_cache_impl.h intern/draw_cache_inline.h intern/draw_color_management.h @@ -207,6 +206,7 @@ set(SRC intern/draw_manager_text.h intern/draw_shader.h intern/draw_view.h + intern/mesh_extractors/extract_mesh.h intern/smaa_textures.h engines/basic/basic_engine.h engines/eevee/eevee_engine.h diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.cc b/source/blender/draw/intern/draw_cache_extract_mesh.cc index 8d8bb14d953..1bc2b8a9def 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh.cc +++ b/source/blender/draw/intern/draw_cache_extract_mesh.cc @@ -41,9 +41,10 @@ #include "GPU_capabilities.h" #include "draw_cache_extract.h" -#include "draw_cache_extract_mesh_private.h" #include "draw_cache_inline.h" +#include "mesh_extractors/extract_mesh.h" + // #define DEBUG_TIME #ifdef DEBUG_TIME diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c index 7327a4fc1fd..27fd6ca9134 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c +++ b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c @@ -38,7 +38,7 @@ #include "ED_mesh.h" -#include "draw_cache_extract_mesh_private.h" +#include "mesh_extractors/extract_mesh.h" /* ---------------------------------------------------------------------- */ /** \name Update Loose Geometry diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 38ecdf7756b..359788545e4 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -67,11 +67,12 @@ #include "ED_uvedit.h" #include "draw_cache_extract.h" -#include "draw_cache_extract_mesh_private.h" #include "draw_cache_inline.h" #include "draw_cache_impl.h" /* own include */ +#include "mesh_extractors/extract_mesh.h" + /* ---------------------------------------------------------------------- */ /** \name Dependencies between buffer and batch * \{ */ diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_extractors.c b/source/blender/draw/intern/mesh_extractors/extract_mesh.c index e813f006351..53827dcc7d9 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_extractors.c +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh.c @@ -29,7 +29,8 @@ #include "ED_uvedit.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" + #include "draw_cache_impl.h" void *mesh_extract_buffer_get(const MeshExtract *extractor, MeshBufferCache *mbc) diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_private.h b/source/blender/draw/intern/mesh_extractors/extract_mesh.h index f24ccf1a028..f24ccf1a028 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_private.h +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh.h diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc index 2dff101c71f..5bd5f7adaa8 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc @@ -21,12 +21,12 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" - #include "BLI_vector.hh" #include "MEM_guardedalloc.h" +#include "extract_mesh.h" + namespace blender::draw { /* ---------------------------------------------------------------------- */ /** \name Extract Edit UV Triangles Indices diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc index c21725ffa32..0f41702a22c 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc @@ -21,12 +21,12 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" - #include "BLI_vector.hh" #include "MEM_guardedalloc.h" +#include "extract_mesh.h" + namespace blender::draw { /* ---------------------------------------------------------------------- */ /** \name Extract Face-dots Indices diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc index 6c677debf88..0096da9e56f 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc @@ -21,10 +21,10 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" - #include "MEM_guardedalloc.h" +#include "extract_mesh.h" + namespace blender::draw { /* ---------------------------------------------------------------------- */ diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc index bdb9af1faf3..7a37cf50264 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc @@ -21,13 +21,13 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" - #include "BLI_edgehash.h" #include "BLI_vector.hh" #include "MEM_guardedalloc.h" +#include "extract_mesh.h" + namespace blender::draw { /* ---------------------------------------------------------------------- */ diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc index 277f9d69c2f..5def7edb75a 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc @@ -21,14 +21,14 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" - #include "BLI_bitmap.h" #include "BLI_vector.hh" #include "atomic_ops.h" #include "MEM_guardedalloc.h" +#include "extract_mesh.h" + namespace blender::draw { /* ---------------------------------------------------------------------- */ /** \name Extract Paint Mask Line Indices diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_points.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_points.cc index cee0c224aab..cc1a19b8d26 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_points.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_points.cc @@ -21,12 +21,12 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" - #include "BLI_vector.hh" #include "MEM_guardedalloc.h" +#include "extract_mesh.h" + namespace blender::draw { /* ---------------------------------------------------------------------- */ diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc index 3b2da9879c5..e346177af52 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc @@ -21,10 +21,10 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" - #include "MEM_guardedalloc.h" +#include "extract_mesh.h" + namespace blender::draw { static void extract_tris_mat_task_reduce(void *_userdata_to, void *_userdata_from) diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc index 1bc4c7e330f..302616d4da9 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc @@ -25,7 +25,7 @@ #include "GPU_capabilities.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edit_data.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edit_data.cc index ff250a30ec4..a7efb9c8a1b 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edit_data.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edit_data.cc @@ -21,7 +21,8 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" + #include "draw_cache_impl.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_data.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_data.cc index aa58266d56b..0378aadabd0 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_data.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_data.cc @@ -21,7 +21,8 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" + #include "draw_cache_impl.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc index 1d62637d172..a60c0182e89 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc @@ -25,7 +25,7 @@ #include "BKE_mesh.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc index 16814653408..d79ac493c33 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc @@ -25,7 +25,7 @@ #include "BKE_mesh.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_edituv_data.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_edituv_data.cc index 5a988c73a7e..b7182d1b60f 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_edituv_data.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_edituv_data.cc @@ -21,7 +21,8 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" + #include "draw_cache_impl.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_nor.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_nor.cc index fb9d34e7733..5e4ad54f7b6 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_nor.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_nor.cc @@ -21,7 +21,7 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc index c4706c412c6..e765fb8a8bf 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_pos.cc @@ -21,7 +21,7 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_uv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_uv.cc index 0289fd63a30..042a0d2debe 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_uv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_uv.cc @@ -21,7 +21,7 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc index b942068352b..8344a615cbe 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc @@ -21,7 +21,7 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc index b734061b76a..075d54e268e 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc @@ -30,7 +30,7 @@ #include "BKE_editmesh_bvh.h" #include "BKE_editmesh_cache.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_orco.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_orco.cc index 80b73cac678..269c0343e32 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_orco.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_orco.cc @@ -21,7 +21,7 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc index 2ac926dd257..b8e5dcb613f 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc @@ -23,7 +23,7 @@ #include "MEM_guardedalloc.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_sculpt_data.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_sculpt_data.cc index 7b36a009419..dbb1e1f880b 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_sculpt_data.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_sculpt_data.cc @@ -27,7 +27,7 @@ #include "BKE_paint.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc index ac44e97f229..cd8d46901c5 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_select_idx.cc @@ -21,7 +21,7 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_skin_roots.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_skin_roots.cc index d7a01ee607f..ffca01d00dd 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_skin_roots.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_skin_roots.cc @@ -21,7 +21,7 @@ * \ingroup draw */ -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc index f251141c442..8f36bfdf1ef 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc @@ -30,7 +30,7 @@ #include "BKE_mesh.h" #include "BKE_mesh_tangent.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc index 0f3c2483296..013da7d674a 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc @@ -23,7 +23,7 @@ #include "BLI_string.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc index 2f1cff08796..d810acfb617 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc @@ -25,7 +25,7 @@ #include "BLI_string.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_weights.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_weights.cc index aae266eadce..c547a453aeb 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_weights.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_weights.cc @@ -25,7 +25,7 @@ #include "BKE_deform.h" -#include "draw_cache_extract_mesh_private.h" +#include "extract_mesh.h" namespace blender::draw { diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index b1e57079d28..8baac26bed3 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -1355,6 +1355,14 @@ static int gpencil_merge_layer_exec(bContext *C, wmOperator *op) LISTBASE_FOREACH (bGPDframe *, gpf_src, &gpl_src->frames) { /* Try to find frame in destination layer hash table. */ bGPDframe *gpf_dst = BLI_ghash_lookup(gh_frames_dst, POINTER_FROM_INT(gpf_src->framenum)); + /* Apply layer transformation. */ + LISTBASE_FOREACH (bGPDstroke *, gps_src, &gpf_src->strokes) { + for (int p = 0; p < gps_src->totpoints; p++) { + bGPDspoint *pt = &gps_src->points[p]; + mul_v3_m4v3(&pt->x, gpl_src->layer_mat, &pt->x); + } + } + /* Add to tail all strokes. */ if (gpf_dst) { BLI_movelisttolist(&gpf_dst->strokes, &gpf_src->strokes); diff --git a/source/blender/editors/transform/transform_snap_sequencer.c b/source/blender/editors/transform/transform_snap_sequencer.c index d0b730383d5..a1f396eb503 100644 --- a/source/blender/editors/transform/transform_snap_sequencer.c +++ b/source/blender/editors/transform/transform_snap_sequencer.c @@ -34,6 +34,7 @@ #include "UI_view2d.h" +#include "SEQ_effects.h" #include "SEQ_iterator.h" #include "SEQ_sequencer.h" @@ -104,11 +105,41 @@ static void seq_snap_source_points_build(const TransInfo *UNUSED(t), /** \name Snap targets * \{ */ -static SeqCollection *query_snap_targets(const TransInfo *t) +/* Add effect strips directly or indirectly connected to `seq_reference` to `collection`. */ +static void query_strip_effects_fn(Sequence *seq_reference, + ListBase *seqbase, + SeqCollection *collection) { - const ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene, false)); + if (!SEQ_collection_append_strip(seq_reference, collection)) { + return; /* Strip is already in set, so all effects connected to it are as well. */ + } + + /* Find all strips connected to `seq_reference`. */ + LISTBASE_FOREACH (Sequence *, seq_test, seqbase) { + if (seq_test->seq1 == seq_reference || seq_test->seq2 == seq_reference || + seq_test->seq3 == seq_reference) { + query_strip_effects_fn(seq_test, seqbase, collection); + } + } +} + +static SeqCollection *seq_collection_extract_effects(SeqCollection *collection) +{ + SeqCollection *effects = SEQ_collection_create(__func__); + Sequence *seq; + SEQ_ITERATOR_FOREACH (seq, collection) { + if (SEQ_effect_get_num_inputs(seq->type) > 0) { + SEQ_collection_append_strip(seq, effects); + } + } + return effects; +} + +static SeqCollection *query_snap_targets(const TransInfo *t, SeqCollection *snap_sources) +{ + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene, false)); const short snap_flag = SEQ_tool_settings_snap_flag_get(t->scene); - SeqCollection *collection = SEQ_collection_create(__func__); + SeqCollection *snap_targets = SEQ_collection_create(__func__); LISTBASE_FOREACH (Sequence *, seq, seqbase) { if ((seq->flag & SELECT)) { continue; /* Selected are being transformed. */ @@ -119,9 +150,18 @@ static SeqCollection *query_snap_targets(const TransInfo *t) if (seq->type == SEQ_TYPE_SOUND_RAM && (snap_flag & SEQ_SNAP_IGNORE_SOUND)) { continue; } - SEQ_collection_append_strip(seq, collection); + SEQ_collection_append_strip(seq, snap_targets); } - return collection; + + /* Effects will always change position with strip to which they are connected and they don't have + * to be selected. Remove such strips from `snap_targets` collection. */ + SeqCollection *snap_sources_temp = SEQ_collection_duplicate(snap_sources); + SEQ_collection_expand(seqbase, snap_sources_temp, query_strip_effects_fn); + SeqCollection *snap_sources_effects = seq_collection_extract_effects(snap_sources_temp); + SEQ_collection_exclude(snap_targets, snap_sources_effects); + SEQ_collection_free(snap_sources_temp); + + return snap_targets; } static int seq_get_snap_target_points_count(const TransInfo *t, @@ -178,11 +218,14 @@ static void seq_snap_target_points_build(const TransInfo *t, if (snap_mode & SEQ_SNAP_TO_STRIP_HOLD) { int content_start = min_ii(seq->enddisp, seq->start); int content_end = max_ii(seq->startdisp, seq->start + seq->len); - if (seq->anim_startofs == 0) { - content_start = seq->startdisp; - } - if (seq->anim_endofs == 0) { - content_end = seq->enddisp; + /* Effects and single image strips produce incorrect content length. Skip these strips. */ + if ((seq->type & SEQ_TYPE_EFFECT) != 0 || seq->len == 1) { + if (seq->anim_startofs == 0 && seq->startstill == 0) { + content_start = seq->startdisp; + } + if (seq->anim_endofs == 0 && seq->endstill == 0) { + content_end = seq->enddisp; + } } snap_data->target_snap_points[i] = content_start; snap_data->target_snap_points[i + 1] = content_end; @@ -214,16 +257,25 @@ TransSeqSnapData *transform_snap_sequencer_data_alloc(const TransInfo *t) TransSeqSnapData *snap_data = MEM_callocN(sizeof(TransSeqSnapData), __func__); ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(t->scene, false)); - /* Build arrays of snap points. */ SeqCollection *snap_sources = SEQ_query_selected_strips(seqbase); + SeqCollection *snap_targets = query_snap_targets(t, snap_sources); + + if (SEQ_collection_len(snap_sources) == 0 || SEQ_collection_len(snap_targets) == 0) { + SEQ_collection_free(snap_targets); + SEQ_collection_free(snap_sources); + MEM_freeN(snap_data); + return NULL; + } + + /* Build arrays of snap points. */ seq_snap_source_points_alloc(snap_data, snap_sources); seq_snap_source_points_build(t, snap_data, snap_sources); SEQ_collection_free(snap_sources); - SeqCollection *snap_targets = query_snap_targets(t); seq_snap_target_points_alloc(t, snap_data, snap_targets); seq_snap_target_points_build(t, snap_data, snap_targets); SEQ_collection_free(snap_targets); + return snap_data; } @@ -236,12 +288,16 @@ void transform_snap_sequencer_data_free(TransSeqSnapData *data) bool transform_snap_sequencer_calc(TransInfo *t) { + const TransSeqSnapData *snap_data = t->tsnap.seq_context; + if (snap_data == NULL) { + return false; + } + /* Prevent snapping when constrained to Y axis. */ if (t->con.mode & CON_APPLY && t->con.mode & CON_AXIS1) { return false; } - const TransSeqSnapData *snap_data = t->tsnap.seq_context; int best_dist = MAXFRAME, best_target_frame = 0, best_source_frame = 0; for (int i = 0; i < snap_data->source_snap_point_count; i++) { diff --git a/source/blender/makesdna/DNA_fluid_defaults.h b/source/blender/makesdna/DNA_fluid_defaults.h index 9454342654c..95f5b8b66b0 100644 --- a/source/blender/makesdna/DNA_fluid_defaults.h +++ b/source/blender/makesdna/DNA_fluid_defaults.h @@ -101,7 +101,6 @@ .noise_time_anim = 0.1f, \ .res_noise = {0, 0, 0}, \ .noise_scale = 2, \ - .noise_type = FLUID_NOISE_TYPE_WAVELET, \ .particle_randomness = 0.1f, \ .particle_number = 2, \ .particle_minimum = 8, \ diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h index cec6eb0d044..57523f1c4d8 100644 --- a/source/blender/makesdna/DNA_fluid_types.h +++ b/source/blender/makesdna/DNA_fluid_types.h @@ -198,11 +198,6 @@ enum { FLUID_DOMAIN_TYPE_LIQUID = 1, }; -/* Smoke noise types. */ -enum { - FLUID_NOISE_TYPE_WAVELET = (1 << 0), -}; - /* Mesh levelset generator types. */ enum { FLUID_DOMAIN_MESH_IMPROVED = 0, @@ -580,8 +575,7 @@ typedef struct FluidDomainSettings { float noise_time_anim; int res_noise[3]; int noise_scale; - short noise_type; /* Noise type: wave, curl, anisotropic. */ - char _pad3[2]; /* Unused. */ + char _pad3[4]; /* Unused. */ /* Liquid domain options. */ float particle_randomness; diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 5e015af8e20..10e899b7ee3 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -1268,11 +1268,6 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) {FLUID_DOMAIN_TYPE_LIQUID, "LIQUID", 0, "Liquid", "Create domain for liquids"}, {0, NULL, 0, NULL, NULL}}; - static const EnumPropertyItem prop_noise_type_items[] = { - {FLUID_NOISE_TYPE_WAVELET, "NOISEWAVE", 0, "Wavelet", ""}, - {0, NULL, 0, NULL, NULL}, - }; - static const EnumPropertyItem prop_compression_items[] = { {VDB_COMPRESSION_ZIP, "ZIP", 0, "Zip", "Effective but slow compression"}, # ifdef WITH_OPENVDB_BLOSC @@ -1813,14 +1808,6 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_noise_reset"); - prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "noise_type"); - RNA_def_property_enum_items(prop, prop_noise_type_items); - RNA_def_property_ui_text( - prop, "Noise Method", "Noise method which is used during the high-res simulation"); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_noise_reset"); - prop = RNA_def_property(srna, "use_noise", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_NOISE); RNA_def_property_ui_text(prop, "Use Noise", "Enable fluid noise (using amplification)"); diff --git a/source/blender/nodes/NOD_math_functions.hh b/source/blender/nodes/NOD_math_functions.hh index 8e153bdb25f..9443be820d1 100644 --- a/source/blender/nodes/NOD_math_functions.hh +++ b/source/blender/nodes/NOD_math_functions.hh @@ -266,7 +266,7 @@ inline bool try_dispatch_float_math_fl3_fl3_to_fl3(const NodeVectorMathOperation return dispatch([](float3 a, float3 b) { return float3::cross_high_precision(a, b); }); case NODE_VECTOR_MATH_PROJECT: return dispatch([](float3 a, float3 b) { - float length_squared = float3::dot(b, b); + float length_squared = b.length_squared(); return (length_squared != 0.0) ? (float3::dot(a, b) / length_squared) * b : float3(0.0f); }); case NODE_VECTOR_MATH_REFLECT: diff --git a/source/blender/sequencer/SEQ_iterator.h b/source/blender/sequencer/SEQ_iterator.h index e4c9f20f736..cb2091511a9 100644 --- a/source/blender/sequencer/SEQ_iterator.h +++ b/source/blender/sequencer/SEQ_iterator.h @@ -71,11 +71,13 @@ bool SEQ_iterator_ensure(SeqCollection *collection, struct Sequence *SEQ_iterator_yield(SeqIterator *iterator); SeqCollection *SEQ_collection_create(const char *name); +SeqCollection *SEQ_collection_duplicate(SeqCollection *collection); uint SEQ_collection_len(const SeqCollection *collection); bool SEQ_collection_append_strip(struct Sequence *seq, SeqCollection *data); bool SEQ_collection_remove_strip(struct Sequence *seq, SeqCollection *data); void SEQ_collection_free(SeqCollection *collection); void SEQ_collection_merge(SeqCollection *collection_dst, SeqCollection *collection_src); +void SEQ_collection_exclude(SeqCollection *collection, SeqCollection *exclude_elements); void SEQ_collection_expand(struct ListBase *seqbase, SeqCollection *collection, void query_func(struct Sequence *seq_reference, diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index 20a2ee3b183..09f033e70fb 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -184,6 +184,22 @@ void SEQ_collection_merge(SeqCollection *collection_dst, SeqCollection *collecti } /** + * Remove strips from collection that are also in `exclude_elements`. Source collection will be + * freed. + * + * \param collection: collection from which strips are removed + * \param exclude_elements: collection of strips to be removed + */ +void SEQ_collection_exclude(SeqCollection *collection, SeqCollection *exclude_elements) +{ + Sequence *seq; + SEQ_ITERATOR_FOREACH (seq, exclude_elements) { + SEQ_collection_remove_strip(seq, collection); + } + SEQ_collection_free(exclude_elements); +} + +/** * Expand collection by running SEQ_query() for each strip, which will be used as reference. * Results of these queries will be merged into provided collection. * @@ -213,6 +229,22 @@ void SEQ_collection_expand(ListBase *seqbase, } } +/** + * Duplicate collection + * + * \param collection: collection to be duplicated + * \return duplicate of collection + */ +SeqCollection *SEQ_collection_duplicate(SeqCollection *collection) +{ + SeqCollection *duplicate = SEQ_collection_create(__func__); + Sequence *seq; + SEQ_ITERATOR_FOREACH (seq, collection) { + SEQ_collection_append_strip(seq, duplicate); + } + return duplicate; +} + /** \} */ /** diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index a4b32fac9fc..c3aeffe8fda 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -1060,13 +1060,6 @@ elseif(APPLE) endif() endif() - if(WITH_LLVM AND NOT LLVM_STATIC) - install( - FILES ${LIBDIR}/llvm/lib/libLLVM-3.4.dylib - DESTINATION Blender.app/Contents/MacOS - ) - endif() - # python if(WITH_PYTHON AND NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK) # Copy the python libs into the install directory diff --git a/source/tools b/source/tools -Subproject c8579c5cf43229843df505da9644b5b0b720197 +Subproject 2afbb8ec472cac5102eb239f57b006f8c938768 diff --git a/tests/performance/api/environment.py b/tests/performance/api/environment.py index 3a9b3eaf936..70fc15f251c 100644 --- a/tests/performance/api/environment.py +++ b/tests/performance/api/environment.py @@ -122,7 +122,7 @@ class TestEnvironment: executable = executable / self._blender_executable_name() elif not executable.is_file() and executable.name == 'blender': # Executable path without proper path on Windows or macOS. - executable = executable.parent() / self._blender_executable_name() + executable = executable.parent / self._blender_executable_name() if executable.is_file(): return executable diff --git a/tests/performance/benchmark b/tests/performance/benchmark index eb01b6053a7..ad1e07d0ef3 100755 --- a/tests/performance/benchmark +++ b/tests/performance/benchmark @@ -125,10 +125,10 @@ def run_entry(env: api.TestEnvironment, config: api.TestConfig, row: List, entry entry.error_msg = 'Failed to build' # Run test and update output and status. - entry.status = 'running' - print_row(config, row, end='\r') - if executable_ok: + entry.status = 'running' + print_row(config, row, end='\r') + try: entry.output = test.run(env, device_id) if not entry.output: |