diff options
author | Stefan Werner <stewreo@gmail.com> | 2020-07-16 08:48:33 +0300 |
---|---|---|
committer | Stefan Werner <stewreo@gmail.com> | 2020-07-16 08:48:33 +0300 |
commit | a2638d0f410770eab53dc2c65c69c1bf4db3fdf2 (patch) | |
tree | db612c808cca5a502aeb43ebc4ff4c5f031ea01c | |
parent | 79ba0c3ab0ea24f67023b8c4c41659cc021e46de (diff) | |
parent | 2811de6e5c2a114a8612fffc7b317e9f91943d1e (diff) |
Merge branch 'master' into mac_arm64
20 files changed, 66 insertions, 37 deletions
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt index 23a47e064e2..f5e488d1bd2 100644 --- a/intern/cycles/util/CMakeLists.txt +++ b/intern/cycles/util/CMakeLists.txt @@ -100,6 +100,7 @@ set(SRC_HEADERS util_simd.h util_avxf.h util_avxb.h + util_avxi.h util_semaphore.h util_sseb.h util_ssef.h diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 699ac4afe88..77e777db872 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -429,6 +429,7 @@ if(WITH_XR_OPENXR) GHOST_IXrContext.h intern/GHOST_IXrGraphicsBinding.h intern/GHOST_XrContext.h + intern/GHOST_XrException.h intern/GHOST_XrSession.h intern/GHOST_XrSwapchain.h intern/GHOST_Xr_intern.h diff --git a/intern/sky/CMakeLists.txt b/intern/sky/CMakeLists.txt index d46880367dc..f67941605aa 100644 --- a/intern/sky/CMakeLists.txt +++ b/intern/sky/CMakeLists.txt @@ -27,6 +27,10 @@ set(INC_SYS set(SRC source/sky_model.cpp source/sky_nishita.cpp + + include/sky_model.h + source/sky_float3.h + source/sky_model_data.h ) set(LIB diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 593d972b0af..50edb0b55ee 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -45,6 +45,7 @@ set(SRC_DNA_INC ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_gpencil_modifier_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_gpencil_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_gpu_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_hair_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_image_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_ipo_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_key_types.h @@ -71,12 +72,14 @@ set(SRC_DNA_INC ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_packedFile_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_particle_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_pointcache_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_pointcloud_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_rigidbody_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_scene_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_screen_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_sdna_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_sequence_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_shader_fx_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_simulation_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_sound_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_space_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_speaker_types.h @@ -87,7 +90,9 @@ set(SRC_DNA_INC ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_vec_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_vfont_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_view2d_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_view3d_enums.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_view3d_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_volume_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_windowmanager_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_workspace_types.h ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_world_types.h diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index b70476b8590..25710ef29ca 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -324,6 +324,7 @@ set(SRC BKE_idprop.h BKE_idtype.h BKE_image.h + BKE_image_save.h BKE_ipo.h BKE_kelvinlet.h BKE_key.h @@ -376,6 +377,7 @@ set(SRC BKE_scene.h BKE_screen.h BKE_sequencer.h + BKE_sequencer_offscreen.h BKE_shader_fx.h BKE_shrinkwrap.h BKE_simulation.h @@ -414,6 +416,7 @@ set(SRC intern/multires_inline.h intern/multires_reshape.h intern/multires_unsubdivide.h + intern/ocean_intern.h intern/pbvh_intern.h intern/subdiv_converter.h intern/subdiv_inline.h diff --git a/source/blender/blenkernel/intern/gpencil_geom.c b/source/blender/blenkernel/intern/gpencil_geom.c index 1f96fb85ad7..5e55d3b2bef 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.c +++ b/source/blender/blenkernel/intern/gpencil_geom.c @@ -2259,11 +2259,13 @@ static Material *gpencil_add_material(Main *bmain, return mat_gp; } -static int gpencil_material_find_index_byname(Object *ob, char *name, const int num) +static int gpencil_material_find_index_by_name_prefix(Object *ob, const char *name_prefix) { + const int name_prefix_len = strlen(name_prefix); for (int i = 0; i < ob->totcol; i++) { Material *ma = BKE_object_material_get(ob, i + 1); - if ((ma != NULL) && (ma->gp_style != NULL) && (STREQLEN(ma->id.name + 2, name, num))) { + if ((ma != NULL) && (ma->gp_style != NULL) && + (STREQLEN(ma->id.name + 2, name_prefix, name_prefix_len))) { return i; } } @@ -2314,8 +2316,8 @@ void BKE_gpencil_convert_mesh(Main *bmain, MLoop *mloop = me_eval->mloop; int mpoly_len = me_eval->totpoly; int i; - int stroke_mat_index = gpencil_material_find_index_byname(ob_gp, "Stroke", 6); - int fill_mat_index = gpencil_material_find_index_byname(ob_gp, "Fill", 4); + int stroke_mat_index = gpencil_material_find_index_by_name_prefix(ob_gp, "Stroke"); + int fill_mat_index = gpencil_material_find_index_by_name_prefix(ob_gp, "Fill"); /* If the object has enough materials means it was created in a previous step. */ const bool create_mat = ((ob_gp->totcol > 0) && (ob_gp->totcol >= ob_mesh->totcol)) ? false : diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 02f5ac66c64..a6e2b6a7835 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -449,7 +449,7 @@ static int lib_override_library_make_tag_ids_cb(LibraryIDLinkCallbackData *cb_da } /** - * Advanced 'smart' function to create fully functionnal overrides. + * Advanced 'smart' function to create fully functional overrides. * * \note Currently it only does special things if given \a id_root is an object of collection, more * specific behaviors may be added in the future for other ID types. diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 7339c887151..6921a13e2c2 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -5725,7 +5725,7 @@ static Sequence *seq_dupli(const Scene *scene_src, struct SeqEffectHandle sh; sh = BKE_sequence_get_effect(seq); if (sh.copy) { - sh.copy(seq, seqn, flag); + sh.copy(seqn, seq, flag); } seqn->strip->stripdata = NULL; diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index c352a9ec1ae..1ed5c8e9b10 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -198,6 +198,7 @@ set(SRC BLI_kdtree.h BLI_kdtree_impl.h BLI_lasso_2d.h + BLI_linear_allocator.hh BLI_link_utils.h BLI_linklist.h BLI_linklist_lockfree.h @@ -232,6 +233,7 @@ set(SRC BLI_probing_strategies.hh BLI_quadric.h BLI_rand.h + BLI_rand.hh BLI_rect.h BLI_resource_collector.hh BLI_scanfill.h diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index e8ac2f9e13f..cfcd4e0c65a 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -148,6 +148,7 @@ set(SRC engines/overlay/overlay_wireframe.c DRW_engine.h + DRW_engine_types.h DRW_select_buffer.h intern/DRW_render.h intern/draw_cache.h diff --git a/source/blender/draw/intern/draw_cache_impl_pointcloud.c b/source/blender/draw/intern/draw_cache_impl_pointcloud.c index 91baf9fa15e..5977c60335f 100644 --- a/source/blender/draw/intern/draw_cache_impl_pointcloud.c +++ b/source/blender/draw/intern/draw_cache_impl_pointcloud.c @@ -162,7 +162,7 @@ static void pointcloud_batch_cache_ensure_pos(Object *ob, PointCloudBatchCache * if (format.attr_len == 0) { /* initialize vertex format */ /* From the opengl wiki: - * Note that size does not have to exactly match the size used by the vertex shader. If the + * Note that size does not have to exactly match the size used by the vertex shader. If the * vertex shader has fewer components than the attribute provides, then the extras are ignored. * If the vertex shader has more components than the array provides, the extras are given * values from the vector (0, 0, 0, 1) for the missing XYZW components. diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c index 32cae609395..59436276277 100644 --- a/source/blender/editors/interface/interface_align.c +++ b/source/blender/editors/interface/interface_align.c @@ -122,26 +122,6 @@ bool ui_but_can_align(const uiBut *but) (BLI_rctf_size_y(&but->rect) > 0.0f)); } -int ui_but_align_opposite_to_area_align_get(const ARegion *region) -{ - const ARegion *align_region = (region->alignment & RGN_SPLIT_PREV && region->prev) ? - region->prev : - region; - - switch (RGN_ALIGN_ENUM_FROM_MASK(align_region->alignment)) { - case RGN_ALIGN_TOP: - return UI_BUT_ALIGN_DOWN; - case RGN_ALIGN_BOTTOM: - return UI_BUT_ALIGN_TOP; - case RGN_ALIGN_LEFT: - return UI_BUT_ALIGN_RIGHT; - case RGN_ALIGN_RIGHT: - return UI_BUT_ALIGN_LEFT; - } - - return 0; -} - /** * This function checks a pair of buttons (assumed in a same align group), * and if they are neighbors, set needed data accordingly. @@ -545,9 +525,9 @@ void ui_block_align_calc(uiBlock *block, const ARegion *region) # undef STITCH # undef MAX_DELTA -#else +#else /* !USE_UIBUT_SPATIAL_ALIGN */ -bool ui_but_can_align(uiBut *but) +bool ui_but_can_align(const uiBut *but) { return !ELEM(but->type, UI_BTYPE_LABEL, @@ -730,7 +710,7 @@ static void ui_block_align_calc_but(uiBut *first, short nr) } } -void ui_block_align_calc(uiBlock *block) +void ui_block_align_calc(uiBlock *block, const struct ARegion *UNUSED(region)) { uiBut *but; short nr; @@ -755,4 +735,25 @@ void ui_block_align_calc(uiBlock *block) } } } -#endif + +#endif /* !USE_UIBUT_SPATIAL_ALIGN */ + +int ui_but_align_opposite_to_area_align_get(const ARegion *region) +{ + const ARegion *align_region = (region->alignment & RGN_SPLIT_PREV && region->prev) ? + region->prev : + region; + + switch (RGN_ALIGN_ENUM_FROM_MASK(align_region->alignment)) { + case RGN_ALIGN_TOP: + return UI_BUT_ALIGN_DOWN; + case RGN_ALIGN_BOTTOM: + return UI_BUT_ALIGN_TOP; + case RGN_ALIGN_LEFT: + return UI_BUT_ALIGN_RIGHT; + case RGN_ALIGN_RIGHT: + return UI_BUT_ALIGN_LEFT; + } + + return 0; +} diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 9907a124ba6..9d85bd46a3b 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -7879,7 +7879,7 @@ void MESH_OT_mark_freestyle_face(wmOperatorType *ot) /* NOTE: these defines are saved in keymap files, do not change values but just add new ones */ /* NOTE: We could add more here, like e.g. a switch between local or global coordinates of target, - * use numinput to type in explicit vector values... */ + * use number-input to type in explicit vector values. */ enum { /* Generic commands. */ EDBM_CLNOR_MODAL_CANCEL = 1, diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 0cc4dcef442..2188f758dc7 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -805,7 +805,7 @@ UvElementMap *BM_uv_element_map_create(BMesh *bm, sub_v2_v2v2(uvdiff, uv2, uv); /* Check if the uv loops share the same selection state (if not, they are not connected as - * they have been ripped or other edit commands have seperated them). */ + * they have been ripped or other edit commands have separated them). */ bool connected = uv_vert_sel == uv2_vert_sel && fabsf(uvdiff[0]) < STD_UV_CONNECT_LIMIT && fabsf(uvdiff[1]) < STD_UV_CONNECT_LIMIT; diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.c b/source/blender/editors/sculpt_paint/sculpt_automasking.c index 4b016b3df4d..7c8a5ce80d4 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automasking.c +++ b/source/blender/editors/sculpt_paint/sculpt_automasking.c @@ -89,7 +89,7 @@ bool SCULPT_is_automasking_enabled(const Sculpt *sd, const SculptSession *ss, co return false; } -int SCULPT_automasking_mode_effective_bits(const Sculpt *sculpt, const Brush *brush) +static int sculpt_automasking_mode_effective_bits(const Sculpt *sculpt, const Brush *brush) { return sculpt->automasking_flags | brush->automasking_flags; } @@ -97,7 +97,7 @@ int SCULPT_automasking_mode_effective_bits(const Sculpt *sculpt, const Brush *br static bool SCULPT_automasking_needs_cache(const Sculpt *sd, const Brush *brush) { - const int automasking_flags = SCULPT_automasking_mode_effective_bits(sd, brush); + const int automasking_flags = sculpt_automasking_mode_effective_bits(sd, brush); if (automasking_flags & BRUSH_AUTOMASKING_TOPOLOGY) { return true; } @@ -309,7 +309,7 @@ static void SCULPT_stroke_automasking_settings_update(SculptSession *ss, Sculpt { BLI_assert(ss->cache); - ss->cache->automask_settings.flags = SCULPT_automasking_mode_effective_bits(sd, brush); + ss->cache->automask_settings.flags = sculpt_automasking_mode_effective_bits(sd, brush); ss->cache->automask_settings.initial_face_set = SCULPT_active_face_set_get(ss); } diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index f308a11fbfd..83096b4eded 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -725,7 +725,7 @@ typedef struct PrefetchQueue { int initial_frame, current_frame, start_frame, end_frame; short render_size, render_flag; - /* If true prefecthing goes forward in time, + /* If true pre-fetching goes forward in time, * otherwise it goes backwards in time (starting from current frame). */ bool forward; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index fab98857c99..bf02845058e 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2945,6 +2945,9 @@ static int view3d_all_exec(bContext *C, wmOperator *op) } if (center) { + struct wmMsgBus *mbus = CTX_wm_message_bus(C); + WM_msg_publish_rna_prop(mbus, &scene->id, &scene->cursor, View3DCursor, location); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index 17a90d10ca7..f48ea610345 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -96,6 +96,7 @@ set(SRC ../include/ED_util_imbuf.h ../include/ED_uvedit.h ../include/ED_view3d.h + ../include/ED_view3d_offscreen.h ../include/UI_icons.h ../include/UI_interface.h ../include/UI_interface_icons.h diff --git a/source/blender/functions/CMakeLists.txt b/source/blender/functions/CMakeLists.txt index fefd86f6c86..0ec531dea0d 100644 --- a/source/blender/functions/CMakeLists.txt +++ b/source/blender/functions/CMakeLists.txt @@ -39,6 +39,7 @@ set(SRC FN_attributes_ref.hh FN_cpp_type.hh FN_cpp_types.hh + FN_generic_vector_array.hh FN_multi_function.hh FN_multi_function_builder.hh FN_multi_function_context.hh diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 220801137f5..8361c43afc1 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -306,6 +306,10 @@ struct anim *IMB_open_anim(const char *name, bool IMB_anim_can_produce_frames(const struct anim *anim) { +#if !(defined(WITH_AVI) || defined(WITH_FFMPEG)) + UNUSED_VARS(anim); +#endif + #ifdef WITH_AVI if (anim->avi != NULL) { return true; |