[Bf-blender-cvs] [90a23dec465] master: Cleanup: Remove mesh vertex "temp tag" flag
Commit: 90a23dec4650d63a836cb9e9969aab4d0da4ba2f Author: Hans Goudey Date: Fri Jan 28 22:40:13 2022 -0600 Branches: master https://developer.blender.org/rB90a23dec4650d63a836cb9e9969aab4d0da4ba2f Cleanup: Remove mesh vertex "temp tag" flag As part of the project of converting `MVert` into `float3` (more details in T93602), this is an easy step, since it is only locally used runtime data. In the six places it was used, the flag was replaced by a local bitmap. By itself this change has no benefits other than making some code slightly simpler. It only really matters when the other flags are removed and it can be removed from `MVert` along with the bevel weight. Differential Revision: https://developer.blender.org/D13878 === M source/blender/blenkernel/intern/crazyspace.c M source/blender/blenkernel/intern/mesh_merge.c M source/blender/blenkernel/intern/mesh_validate.c M source/blender/editors/object/object_vgroup.c M source/blender/makesdna/DNA_meshdata_types.h M source/blender/modifiers/intern/MOD_screw.c === diff --git a/source/blender/blenkernel/intern/crazyspace.c b/source/blender/blenkernel/intern/crazyspace.c index 573595b6f90..0bf83ed5036 100644 --- a/source/blender/blenkernel/intern/crazyspace.c +++ b/source/blender/blenkernel/intern/crazyspace.c @@ -194,13 +194,10 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me, float (*mappedcos)[3], float (*quats)[4]) { - MVert *mvert = me->mvert; - for (int i = 0; i < me->totvert; i++, mvert++) { -mvert->flag &= ~ME_VERT_TMP_TAG; - } + BLI_bitmap *vert_tag = BLI_BITMAP_NEW(me->totvert, __func__); /* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */ - mvert = me->mvert; + MVert *mvert = me->mvert; MPoly *mp = me->mpoly; MLoop *mloop = me->mloop; @@ -210,7 +207,7 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me, MLoop *ml_prev = &ml_next[mp->totloop - 2]; for (int j = 0; j < mp->totloop; j++) { - if ((mvert[ml_curr->v].flag & ME_VERT_TMP_TAG) == 0) { + if (!BLI_BITMAP_TEST(vert_tag, ml_curr->v)) { const float *co_prev, *co_curr, *co_next; /* orig */ const float *vd_prev, *vd_curr, *vd_next; /* deform */ @@ -233,7 +230,7 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me, set_crazy_vertex_quat( quats[ml_curr->v], co_curr, co_next, co_prev, vd_curr, vd_next, vd_prev); -mvert[ml_curr->v].flag |= ME_VERT_TMP_TAG; +BLI_BITMAP_ENABLE(vert_tag, ml_curr->v); } ml_prev = ml_curr; @@ -241,6 +238,8 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me, ml_next++; } } + + MEM_freeN(vert_tag); } int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgraph, diff --git a/source/blender/blenkernel/intern/mesh_merge.c b/source/blender/blenkernel/intern/mesh_merge.c index 134a1344f83..3c01d5a4a50 100644 --- a/source/blender/blenkernel/intern/mesh_merge.c +++ b/source/blender/blenkernel/intern/mesh_merge.c @@ -27,6 +27,7 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" +#include "BLI_bitmap.h" #include "BLI_edgehash.h" #include "BLI_ghash.h" #include "BLI_utildefines.h" @@ -351,6 +352,8 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh, &poly_map, &poly_map_mem, mesh->mpoly, mesh->mloop, totvert, totpoly, totloop); } /* done preparing for fast poly compare */ + BLI_bitmap *vert_tag = BLI_BITMAP_NEW(mesh->totvert, __func__); + mp = mesh->mpoly; mv = mesh->mvert; for (i = 0; i < totpoly; i++, mp++) { @@ -365,11 +368,11 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh, if (vtargetmap[ml->v] == -1) { all_vertices_merged = false; /* This will be used to check for poly using several time the same vert. */ -mv[ml->v].flag &= ~ME_VERT_TMP_TAG; +BLI_BITMAP_DISABLE(vert_tag, ml->v); } else { /* This will be used to check for poly using several time the same vert. */ -mv[vtargetmap[ml->v]].flag &= ~ME_VERT_TMP_TAG; +BLI_BITMAP_DISABLE(vert_tag, vtargetmap[ml->v]); } } @@ -457,8 +460,8 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh, #endif /* A loop is only valid if its matching edge is, * and it's not reusing a vertex already used by this poly. */ - if (LIKELY((newe[ml->e] != -1) && ((mv[mlv].flag & ME_VERT_TMP_TAG) == 0))) { -mv[mlv].flag |= ME_VERT_TMP_TAG; + if (LIKELY((newe[ml->e] != -1) && !BLI_BITMAP_TEST(vert_tag, mlv))) { +BLI_BITMAP_ENABLE(vert_tag, mlv); if (UNLIKELY(last_valid_ml != NULL && need_edge_from_last_valid_ml)) { /* We need to create a new edge between last valid loop and this one! */ @@ -644,6 +647,8 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh, MEM_freeN(o
[Bf-blender-cvs] [6a8c9ec7633] temp-sculpt-colors: temp-sculpt-colors: Make requested changes
Commit: 6a8c9ec763375340d795030e9ba00f82f9c27286 Author: Joseph Eagar Date: Fri Jan 28 17:47:00 2022 -0800 Branches: temp-sculpt-colors https://developer.blender.org/rB6a8c9ec763375340d795030e9ba00f82f9c27286 temp-sculpt-colors: Make requested changes === M release/datafiles/locale M release/scripts/addons M release/scripts/addons_contrib M source/blender/blenkernel/BKE_attribute.h M source/blender/blenkernel/intern/attribute.c M source/blender/blenkernel/intern/paint.c M source/blender/blenkernel/intern/pbvh.c M source/blender/blenloader/intern/versioning_300.c M source/blender/draw/intern/draw_cache_extract_mesh_render_data.c M source/blender/draw/intern/draw_cache_impl_mesh.c M source/blender/draw/intern/mesh_extractors/extract_mesh.h M source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc M source/blender/editors/geometry/geometry_attributes.cc M source/blender/editors/sculpt_paint/sculpt.c M source/blender/editors/sculpt_paint/sculpt_undo.c M source/blender/gpu/GPU_buffers.h M source/blender/gpu/intern/gpu_buffers.c M source/blender/windowmanager/intern/wm_toolsystem.c M source/tools === diff --git a/release/datafiles/locale b/release/datafiles/locale index 620b85f16d0..93612eddc7c 16 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@ -1 +1 @@ -Subproject commit 620b85f16d03a6aadd7cae56969c9c29b06b992d +Subproject commit 93612eddc7cdfa82d1e7c31c362df0988388629b diff --git a/release/scripts/addons b/release/scripts/addons index 6afec05c328..9207696bbfa 16 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit 6afec05c3286cdea58ab269fb8dd1f5de011de4e +Subproject commit 9207696bbfac648c299f29f031ab5f18d8fa0077 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib index 7936dde9ece..61e45814503 16 --- a/release/scripts/addons_contrib +++ b/release/scripts/addons_contrib @@ -1 +1 @@ -Subproject commit 7936dde9ece881d531b1a2ee6c45ddb56d30038c +Subproject commit 61e45814503f51963c91c51aaf764612e7c5dc72 diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h index 80d14fc31cd..ae7eadd7628 100644 --- a/source/blender/blenkernel/BKE_attribute.h +++ b/source/blender/blenkernel/BKE_attribute.h @@ -50,7 +50,7 @@ typedef enum AttributeDomain { ATTR_DOMAIN_NUM } AttributeDomain; -typedef enum { +typedef enum AttributeDomainMask { ATTR_DOMAIN_MASK_POINT = (1 << 0), ATTR_DOMAIN_MASK_EDGE = (1 << 1), ATTR_DOMAIN_MASK_FACE = (1 << 2), @@ -63,8 +63,11 @@ typedef enum { bool BKE_id_attributes_supported(struct ID *id); -/* list_mask restricts unique name check to certain customdata types, - if in doubt just pass CD_MASK_PROP_ALL */ +/** Create a new attribute layer + * + * \param list_mask restricts unique name check to certain customdata types, + * if in doubt just pass CD_MASK_PROP_ALL + */ struct CustomDataLayer *BKE_id_attribute_new(struct ID *id, const char *name, int type, @@ -97,9 +100,9 @@ void BKE_id_attributes_active_set(struct ID *id, struct CustomDataLayer *layer); int *BKE_id_attributes_active_index_p(struct ID *id); CustomData *BKE_id_attributes_iterator_next_domain(struct ID *id, struct CustomDataLayer *layers); -CustomDataLayer *BKE_id_attribute_from_index(const struct ID *id, - int lookup_index, - const AttributeDomainMask domain_mask); +const CustomDataLayer *BKE_id_attribute_from_index(const struct ID *id, + int lookup_index, + const AttributeDomainMask domain_mask); struct AttributeRef *BKE_id_attributes_active_color_ref_p(struct ID *id); void BKE_id_attributes_active_color_set(struct ID *id, struct CustomDataLayer *active_layer); diff --git a/source/blender/blenkernel/intern/attribute.c b/source/blender/blenkernel/intern/attribute.c index 50c69f26537..44e24d53e7f 100644 --- a/source/blender/blenkernel/intern/attribute.c +++ b/source/blender/blenkernel/intern/attribute.c @@ -457,9 +457,9 @@ CustomData *BKE_id_attributes_iterator_next_domain(ID *id, CustomDataLayer *laye return NULL; } -CustomDataLayer *BKE_id_attribute_from_index(const ID *id, - int lookup_index, - const AttributeDomainMask domain_mask) +const CustomDataLayer *BKE_id_attribute_from_index(const ID *id, + int lookup_index, + const AttributeD
[Bf-blender-cvs] [0b2864382a9] master: Merge branch 'blender-v3.1-release'
Commit: 0b2864382a90585ce5a5033d446ac1f27c82074a Author: Richard Antalik Date: Sat Jan 29 01:42:04 2022 +0100 Branches: master https://developer.blender.org/rB0b2864382a90585ce5a5033d446ac1f27c82074a Merge branch 'blender-v3.1-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [544a0f2880f] blender-v3.1-release: Fix memory leak when adding movie strips
Commit: 544a0f2880ffc31dcbb8df39a249945f390698bb Author: Richard Antalik Date: Sat Jan 29 01:31:53 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB544a0f2880ffc31dcbb8df39a249945f390698bb Fix memory leak when adding movie strips Introduced by b45e71e22cc7. === M source/blender/editors/space_sequencer/sequencer_add.c === diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 72c39839739..d9d801b56ac 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -795,6 +795,7 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) /* Free custom data. */ sequencer_add_cancel(C, op); + SEQ_collection_free(movie_strips); seq_build_proxy(C, movie_strips); DEG_relations_tag_update(bmain); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d29a079cb69] master: Merge branch 'blender-v3.1-release'
Commit: d29a079cb69db31d5b857f39d727614e39a2e47c Author: Hans Goudey Date: Fri Jan 28 17:47:38 2022 -0600 Branches: master https://developer.blender.org/rBd29a079cb69db31d5b857f39d727614e39a2e47c Merge branch 'blender-v3.1-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [03b57d39731] blender-v3.1-release: Fix T94476: Threading/performance issue with curve to points node
Commit: 03b57d39731a3902ac99d2e8e23aa309ac21c131 Author: Hans Goudey Date: Fri Jan 28 17:47:14 2022 -0600 Branches: blender-v3.1-release https://developer.blender.org/rB03b57d39731a3902ac99d2e8e23aa309ac21c131 Fix T94476: Threading/performance issue with curve to points node For every spline, *all* of the normals and tangents in the output were normalized. The node is multithreaded, so sometimes a thread overwrote the normalized result from another thread. Fixing this problem also made the node orders of magnitude faster when there are many splines. === M source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc === diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc index 19efd4b7508..c0c1244f031 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc @@ -282,18 +282,20 @@ static void copy_uniform_sample_point_attributes(const Span splines, } if (!data.tangents.is_empty()) { -spline.sample_with_index_factors( -spline.evaluated_tangents(), uniform_samples, data.tangents.slice(offset, size)); -for (float3 &tangent : data.tangents) { - tangent = math::normalize(tangent); +Span src_tangents = spline.evaluated_tangents(); +MutableSpan sampled_tangents = data.tangents.slice(offset, size); +spline.sample_with_index_factors(src_tangents, uniform_samples, sampled_tangents); +for (float3 &vector : sampled_tangents) { + vector = math::normalize(vector); } } if (!data.normals.is_empty()) { -spline.sample_with_index_factors( -spline.evaluated_normals(), uniform_samples, data.normals.slice(offset, size)); -for (float3 &normals : data.normals) { - normals = math::normalize(normals); +Span src_normals = spline.evaluated_normals(); +MutableSpan sampled_normals = data.normals.slice(offset, size); +spline.sample_with_index_factors(src_normals, uniform_samples, sampled_normals); +for (float3 &vector : sampled_normals) { + vector = math::normalize(vector); } } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [fd1078e1055] master: Fix T62651: Win32 Multiple Adapters Warning
Commit: fd1078e1055e6932fc539a1fae4c7d433b1839d9 Author: Harley Acheson Date: Fri Jan 28 15:19:05 2022 -0800 Branches: master https://developer.blender.org/rBfd1078e1055e6932fc539a1fae4c7d433b1839d9 Fix T62651: Win32 Multiple Adapters Warning Show a more instructive error message for users who have plugged multiple monitors into multiple display adapters. And do not exit if unable to open a child window when in this state. See D13885 for more details Differential Revision: https://developer.blender.org/D13885 Reviewed by Ray Molenkamp === M intern/ghost/intern/GHOST_WindowWin32.cpp === diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 7993772a94b..47d4ff77d17 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -132,8 +132,24 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_hDC = ::GetDC(m_hWnd); if (!setDrawingContextType(type)) { +const char *title = "Blender - Unsupported Graphics Card Configuration"; +const char *text = +"A graphics card and driver with support for OpenGL 3.3 or higher is " +"required.\n\nInstalling the latest driver for your graphics card might resolve the " +"issue."; +if (GetSystemMetrics(SM_CMONITORS) > 1) { + text = + "A graphics card and driver with support for OpenGL 3.3 or higher is " + "required.\n\nPlugging all monitors into your primary graphics card might resolve " + "this issue. Installing the latest driver for your graphics card could also help."; +} +MessageBox(m_hWnd, text, title, MB_OK | MB_ICONERROR); +::ReleaseDC(m_hWnd, m_hDC); ::DestroyWindow(m_hWnd); m_hWnd = NULL; +if (!parentwindow) { + exit(0); +} return; } @@ -567,20 +583,13 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0), GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY); -if (context->initializeDrawingContext()) { - return context; -} -else { - MessageBox(m_hWnd, - "A graphics card and driver with support for OpenGL 3.3 or higher is required.\n" - "Installing the latest driver for your graphics card may resolve the issue.\n\n" - "The program will now close.", - "Blender - Unsupported Graphics Card or Driver", - MB_OK | MB_ICONERROR); +if (context && !context->initializeDrawingContext()) { delete context; - exit(0); + context = nullptr; } +return context; + #elif defined(WITH_GL_PROFILE_COMPAT) // ask for 2.1 context, driver gives any GL version >= 2.1 // (hopefully the latest compatibility profile) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6b7756279f7] master: Fix T93626: Win IME Chinese Numpad Decimal
Commit: 6b7756279f719a434505d461fb03b5faa5ce9aa0 Author: Harley Acheson Date: Fri Jan 28 13:32:46 2022 -0800 Branches: master https://developer.blender.org/rB6b7756279f719a434505d461fb03b5faa5ce9aa0 Fix T93626: Win IME Chinese Numpad Decimal Allow Windows IME Pinyin, when in Chinese mode, to use numpad decimal key to enter decimal point. See D13902 for more details. Differential Revision: https://developer.blender.org/D13902 Reviewed by Brecht Van Lommel === M intern/ghost/intern/GHOST_ImeWin32.cpp M intern/ghost/intern/GHOST_ImeWin32.h M intern/ghost/intern/GHOST_SystemWin32.cpp === diff --git a/intern/ghost/intern/GHOST_ImeWin32.cpp b/intern/ghost/intern/GHOST_ImeWin32.cpp index d1fc80adf56..2a1bfb633b3 100644 --- a/intern/ghost/intern/GHOST_ImeWin32.cpp +++ b/intern/ghost/intern/GHOST_ImeWin32.cpp @@ -96,7 +96,7 @@ bool GHOST_ImeWin32::IsEnglishMode() !(conversion_modes_ & (IME_CMODE_NATIVE | IME_CMODE_FULLSHAPE)); } -bool GHOST_ImeWin32::IsImeKeyEvent(char ascii) +bool GHOST_ImeWin32::IsImeKeyEvent(char ascii, GHOST_TKey key) { if (!(IsEnglishMode())) { /* In Chinese, Japanese, Korean, all alpha keys are processed by IME. */ @@ -106,7 +106,8 @@ bool GHOST_ImeWin32::IsImeKeyEvent(char ascii) if (IsLanguage(IMELANG_JAPANESE) && (ascii >= ' ' && ascii <= '~')) { return true; } -else if (IsLanguage(IMELANG_CHINESE) && ascii && strchr("!\"$'(),.:;<>?[\\]^_`/", ascii)) { +else if (IsLanguage(IMELANG_CHINESE) && ascii && strchr("!\"$'(),.:;<>?[\\]^_`/", ascii) && + !(key == GHOST_kKeyNumpadPeriod)) { return true; } } diff --git a/intern/ghost/intern/GHOST_ImeWin32.h b/intern/ghost/intern/GHOST_ImeWin32.h index ce0e4d64d53..d17a6d79503 100644 --- a/intern/ghost/intern/GHOST_ImeWin32.h +++ b/intern/ghost/intern/GHOST_ImeWin32.h @@ -161,7 +161,7 @@ class GHOST_ImeWin32 { bool IsEnglishMode(); /* Checks a key whether IME has to do handling. */ - bool IsImeKeyEvent(char ascii); + bool IsImeKeyEvent(char ascii, GHOST_TKey key); /** * Create the IME windows, and allocate required resources for them. diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 5251dd01b29..64e1ac3b9b3 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1220,7 +1220,7 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA } #ifdef WITH_INPUT_IME -if (window->getImeInput()->IsImeKeyEvent(ascii)) { +if (window->getImeInput()->IsImeKeyEvent(ascii, key)) { return NULL; } #endif /* WITH_INPUT_IME */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4311a32bc2d] master: Win IME: Ideographic Full Stop to Decimal Point
Commit: 4311a32bc2d9c9e5db475a75cac5b11760f4db71 Author: Harley Acheson Date: Fri Jan 28 13:11:56 2022 -0800 Branches: master https://developer.blender.org/rB4311a32bc2d9c9e5db475a75cac5b11760f4db71 Win IME: Ideographic Full Stop to Decimal Point Convert Ideographic Full Stop, used in Simplified Chinese and Japanese, to Decimal Point when entering numbers into numerical inputs. See D13903 for more details Differential Revision: https://developer.blender.org/D13903 Reviewed by Brecht Van Lommel === M source/blender/editors/interface/interface_handlers.c === diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 905fd452b6c..a171160d020 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3957,7 +3957,14 @@ static void ui_do_but_textedit( ui_textedit_delete_selection(but, data); } if (event->type == WM_IME_COMPOSITE_EVENT && ime_data->result_len) { - ui_textedit_insert_buf(but, data, ime_data->str_result, ime_data->result_len); + if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER) && + strcmp(ime_data->str_result, "\xE3\x80\x82") == 0) { +/* Convert Ideographic Full Stop (U+3002) to decimal point when entering numbers. */ +ui_textedit_insert_ascii(but, data, '.'); + } + else { +ui_textedit_insert_buf(but, data, ime_data->str_result, ime_data->result_len); + } } } else if (event->type == WM_IME_COMPOSITE_END) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ace1b6a73a0] master: UI: Add OneDrive to System List for Windows
Commit: ace1b6a73a0b3e8360640f9251ac30d874365cf8 Author: Harley Acheson Date: Fri Jan 28 12:22:42 2022 -0800 Branches: master https://developer.blender.org/rBace1b6a73a0b3e8360640f9251ac30d874365cf8 UI: Add OneDrive to System List for Windows This patch adds a "OneDrive" icon to the File Manager System list for Windows (only!). See D11133 for more details. Differential Revision: https://developer.blender.org/D11133 Reviewed by Julian Eisel === M source/blender/editors/space_file/fsmenu.c === diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 14f596ae7bf..0a69d0f9b39 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -745,14 +745,17 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks) N_("Fonts"), ICON_FILE_FONT, FS_INSERT_LAST); + fsmenu_add_windows_folder(fsmenu, +FS_CATEGORY_SYSTEM_BOOKMARKS, +&FOLDERID_SkyDrive, +N_("OneDrive"), +ICON_URL, +FS_INSERT_LAST); /* These items are just put in path cache for thumbnail views and if bookmarked. */ fsmenu_add_windows_folder( fsmenu, FS_CATEGORY_OTHER, &FOLDERID_UserProfiles, NULL, ICON_COMMUNITY, FS_INSERT_LAST); - - fsmenu_add_windows_folder( - fsmenu, FS_CATEGORY_OTHER, &FOLDERID_SkyDrive, NULL, ICON_URL, FS_INSERT_LAST); } } #elif defined(__APPLE__) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [26e608d8202] master: Win32: Initialize GHOST_WindowWin32 Members
Commit: 26e608d820280340857fa547d477bc560e8cf605 Author: Harley Acheson Date: Fri Jan 28 12:03:20 2022 -0800 Branches: master https://developer.blender.org/rB26e608d820280340857fa547d477bc560e8cf605 Win32: Initialize GHOST_WindowWin32 Members Initialize m_Bar, m_dropTarget, & m_hWnd members of GHOST_WindowWin32 in constructor's member initializer list. This ensures they are are set or NULL in destructor if constructor does not complete. See D13886 for more details. Differential Revision: https://developer.blender.org/D13886 Reviewed by Jesse Yurkovich === M intern/ghost/intern/GHOST_WindowWin32.cpp === diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index b5d0fd8e6db..7993772a94b 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -71,6 +71,8 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_mousePresent(false), m_inLiveResize(false), m_system(system), + m_dropTarget(NULL), + m_hWnd(0), m_hDC(0), m_isDialog(dialog), m_hasMouseCaptured(false), @@ -78,6 +80,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_nPressedButtons(0), m_customCursor(0), m_wantAlphaBackground(alphaBackground), + m_Bar(NULL), m_wintab(NULL), m_lastPointerTabletData(GHOST_TABLET_DATA_NONE), m_normal_state(GHOST_kWindowStateNormal), ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b3597b1128c] asset-browser-grid-view: Add Asset Browser as own editor
Commit: b3597b1128c29f255e3b44bb1879df84adcef76d Author: Julian Eisel Date: Fri Jan 28 19:27:37 2022 +0100 Branches: asset-browser-grid-view https://developer.blender.org/rBb3597b1128c29f255e3b44bb1879df84adcef76d Add Asset Browser as own editor This is part of a (tentative) plan to split off the Asset Browser from the File Browser, while adding a new grid-view API that generalizes most of the UI. Both editors can use this and only have to implement their case-specific logic. This then allows us to add a proper asset system, that's not tied to the file browser backend anymore. === M release/datafiles/userdef/userdef_default_theme.c M release/scripts/presets/interface_theme/Blender_Light.xml M release/scripts/startup/bl_ui/__init__.py A release/scripts/startup/bl_ui/space_assets.py M source/blender/blenloader/intern/versioning_userdef.c M source/blender/editors/CMakeLists.txt M source/blender/editors/include/ED_space_api.h M source/blender/editors/interface/interface_template_search_menu.cc M source/blender/editors/interface/resources.c M source/blender/editors/space_api/CMakeLists.txt M source/blender/editors/space_api/spacetypes.c A source/blender/editors/space_assets/CMakeLists.txt A source/blender/editors/space_assets/asset_browser_intern.hh A source/blender/editors/space_assets/asset_browser_ops.cc A source/blender/editors/space_assets/space_assets.cc M source/blender/makesdna/DNA_space_types.h M source/blender/makesdna/DNA_userdef_types.h M source/blender/makesrna/RNA_access.h M source/blender/makesrna/intern/rna_space.c M source/blender/makesrna/intern/rna_userdef.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 055a2e37c6c..b095b58d191 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -1067,6 +1067,35 @@ const bTheme U_theme_default = { .edited_object = RGBA(0x00806266), .row_alternate = RGBA(0xff04), }, + .space_assets = { +.back = RGBA(0x28282800), +.title = RGBA(0x), +.text = RGBA(0xe6e6e6ff), +.text_hi = RGBA(0x), +.header = RGBA(0x303030b3), +.header_text = RGBA(0xeeff), +.header_text_hi = RGBA(0x), +.tab_active = RGBA(0x303030ff), +.tab_inactive = RGBA(0x1d1d1dff), +.tab_back = RGBA(0x181818ff), +.tab_outline = RGBA(0x3d3d3dff), +.button = RGBA(0x30303000), +.button_title = RGBA(0x), +.button_text = RGBA(0xccff), +.button_text_hi = RGBA(0x), +.navigation_bar = RGBA(0x303030ff), +.execution_buts = RGBA(0x303030ff), +.panelcolors = { + .header = RGBA(0x3d3d3dff), + .back = RGBA(0x3d3d3dff), + .sub_back = RGBA(0x001f), +}, +.hilite = RGBA(0x4772b3ff), +.vertex_size = 3, +.outline_width = 1, +.facedot_size = 4, +.row_alternate = RGBA(0xff04), + }, .tarm = { { .solid = RGBA(0x9aff), diff --git a/release/scripts/presets/interface_theme/Blender_Light.xml b/release/scripts/presets/interface_theme/Blender_Light.xml index 9a315763c8b..97cca3dd31a 100644 --- a/release/scripts/presets/interface_theme/Blender_Light.xml +++ b/release/scripts/presets/interface_theme/Blender_Light.xml @@ -1363,6 +1363,42 @@ + + + + + + + + + + + + +from bpy.types import Header + + +class ASSETBROWSER_HT_header(Header): +bl_space_type = 'ASSET_BROWSER' + +def draw(self, context): +layout = self.layout +# space = context.space_data + +layout.template_header() + + +classes = ( +ASSETBROWSER_HT_header, +) + +if __name__ == "__main__": # only for live edit. +from bpy.utils import register_class +for cls in classes: +register_class(cls) diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 064d7977c68..0dc4d11f200 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -348,6 +348,7 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) */ { /* Keep this block, even when empty. */ +btheme->space_assets = btheme->space_file; } #undef FROM_DEFAULT_V4_UCHAR diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt index 092198cea86..992dd93e6f6 100644 --- a/source/blender/editors/CMakeLists.txt +++ b/source/blender/editors/CMakeLists.txt @@ -41,6 +41,7 @@ if(WITH_BLENDER) add_subdirectory(sound) add_subdirectory
[Bf-blender-cvs] [82ad1631e46] master: Fix Cycles assert in light sampling
Commit: 82ad1631e46289020f132a7be8fbef2c86c071ff Author: Brecht Van Lommel Date: Fri Jan 28 14:16:06 2022 +0100 Branches: master https://developer.blender.org/rB82ad1631e46289020f132a7be8fbef2c86c071ff Fix Cycles assert in light sampling There is no object transform on lights. === M intern/cycles/kernel/geom/shader_data.h === diff --git a/intern/cycles/kernel/geom/shader_data.h b/intern/cycles/kernel/geom/shader_data.h index 2027190fdd2..fdf914d85e0 100644 --- a/intern/cycles/kernel/geom/shader_data.h +++ b/intern/cycles/kernel/geom/shader_data.h @@ -190,40 +190,46 @@ ccl_device_inline void shader_setup_from_sample(KernelGlobals kg, #ifdef __OBJECT_MOTION__ shader_setup_object_transforms(kg, sd, time); #endif - } - else if (lamp != LAMP_NONE) { -sd->lamp = lamp; - } - /* transform into world space */ - if (object_space) { -object_position_transform_auto(kg, sd, &sd->P); -object_normal_transform_auto(kg, sd, &sd->Ng); -sd->N = sd->Ng; -object_dir_transform_auto(kg, sd, &sd->I); - } +/* transform into world space */ +if (object_space) { + object_position_transform_auto(kg, sd, &sd->P); + object_normal_transform_auto(kg, sd, &sd->Ng); + sd->N = sd->Ng; + object_dir_transform_auto(kg, sd, &sd->I); +} - if (sd->type == PRIMITIVE_TRIANGLE) { -/* smooth normal */ -if (sd->shader & SHADER_SMOOTH_NORMAL) { - sd->N = triangle_smooth_normal(kg, Ng, sd->prim, sd->u, sd->v); +if (sd->type == PRIMITIVE_TRIANGLE) { + /* smooth normal */ + if (sd->shader & SHADER_SMOOTH_NORMAL) { +sd->N = triangle_smooth_normal(kg, Ng, sd->prim, sd->u, sd->v); - if (!(sd->object_flag & SD_OBJECT_TRANSFORM_APPLIED)) { -object_normal_transform_auto(kg, sd, &sd->N); +if (!(sd->object_flag & SD_OBJECT_TRANSFORM_APPLIED)) { + object_normal_transform_auto(kg, sd, &sd->N); +} } -} -/* dPdu/dPdv */ + /* dPdu/dPdv */ #ifdef __DPDU__ -triangle_dPdudv(kg, sd->prim, &sd->dPdu, &sd->dPdv); + triangle_dPdudv(kg, sd->prim, &sd->dPdu, &sd->dPdv); -if (!(sd->object_flag & SD_OBJECT_TRANSFORM_APPLIED)) { - object_dir_transform_auto(kg, sd, &sd->dPdu); - object_dir_transform_auto(kg, sd, &sd->dPdv); + if (!(sd->object_flag & SD_OBJECT_TRANSFORM_APPLIED)) { +object_dir_transform_auto(kg, sd, &sd->dPdu); +object_dir_transform_auto(kg, sd, &sd->dPdv); + } +#endif } +else { +#ifdef __DPDU__ + sd->dPdu = zero_float3(); + sd->dPdv = zero_float3(); #endif +} } else { +if (lamp != LAMP_NONE) { + sd->lamp = lamp; +} #ifdef __DPDU__ sd->dPdu = zero_float3(); sd->dPdv = zero_float3(); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [dd4a89e78df] master: Merge branch 'blender-v3.1-release'
Commit: dd4a89e78dfd4c43f5a5183c1c3e6156e5e504e8 Author: Hans Goudey Date: Fri Jan 28 10:06:04 2022 -0600 Branches: master https://developer.blender.org/rBdd4a89e78dfd4c43f5a5183c1c3e6156e5e504e8 Merge branch 'blender-v3.1-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cb09485ff2b] blender-v3.1-release: UI: Use property split in new operator popup
Commit: cb09485ff2bd7a4931bff0d4bf951b663aafd000 Author: Hans Goudey Date: Fri Jan 28 10:03:07 2022 -0600 Branches: blender-v3.1-release https://developer.blender.org/rBcb09485ff2bd7a4931bff0d4bf951b663aafd000 UI: Use property split in new operator popup This attribute conversion operator was just added. The UI looks more consistent with property split. === M source/blender/editors/geometry/geometry_attributes.cc === diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index 56ecd108bba..17229c4898e 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -325,6 +325,8 @@ static int geometry_attribute_convert_exec(bContext *C, wmOperator *op) static void geometry_attribute_convert_ui(bContext *UNUSED(C), wmOperator *op) { uiLayout *layout = op->layout; + uiLayoutSetPropSep(layout, true); + uiLayoutSetPropDecorate(layout, false); uiItemR(layout, op->ptr, "mode", 0, nullptr, ICON_NONE); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [92d747b0c46] master: Drag & drop: Support using context of hovered button when dropping
Commit: 92d747b0c46e2645b7308edd31c778634c68c2c5 Author: Julian Eisel Date: Fri Jan 28 16:42:23 2022 +0100 Branches: master https://developer.blender.org/rB92d747b0c46e2645b7308edd31c778634c68c2c5 Drag & drop: Support using context of hovered button when dropping Buttons can hold context and it's very useful to use this as a way to let buttons provide context for drop operators. For example, with this D13549 can make the material slot list set the material-slot pointer for each row, and the drop operator can just query that. === M source/blender/editors/include/UI_interface.h M source/blender/editors/interface/interface.c M source/blender/windowmanager/WM_types.h M source/blender/windowmanager/intern/wm_dragdrop.c M source/blender/windowmanager/intern/wm_event_system.c M source/blender/windowmanager/wm_event_system.h === diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 3796fa51499..ae4c2ff16fd 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1370,6 +1370,8 @@ uiBut *uiDefIconTextButO_ptr(uiBlock *block, /* for passing inputs to ButO buttons */ struct PointerRNA *UI_but_operator_ptr_get(uiBut *but); +struct bContextStore *UI_but_context_get(const uiBut *but); + void UI_but_unit_type_set(uiBut *but, int unit_type); int UI_but_unit_type_get(const uiBut *but); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 636281ba373..2292bf759b7 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -5928,6 +5928,11 @@ PointerRNA *UI_but_operator_ptr_get(uiBut *but) return but->opptr; } +bContextStore *UI_but_context_get(const uiBut *but) +{ + return but->context; +} + void UI_but_unit_type_set(uiBut *but, const int unit_type) { but->unit_type = (uchar)(RNA_SUBTYPE_UNIT_VALUE(unit_type)); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index d1f790ce3e2..929b39715b9 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -1048,6 +1048,10 @@ typedef struct wmDragActiveDropState { * it as needed. */ struct ARegion *region_from; + /** If `active_dropbox` is set, additional context provided by the active (i.e. hovered) button. + * Activated before context sensitive operations (polling, drawing, dropping). */ + struct bContextStore *ui_context; + /** Text to show when a dropbox poll succeeds (so the dropbox itself is available) but the * operator poll fails. Typically the message the operator set with * CTX_wm_operator_poll_msg_set(). */ diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 96cb66b44ea..3bc77db45ca 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -226,6 +226,30 @@ void wm_drags_exit(wmWindowManager *wm, wmWindow *win) } } +static bContextStore *wm_drop_ui_context_create(const bContext *C) +{ + uiBut *active_but = UI_region_active_but_get(CTX_wm_region(C)); + if (!active_but) { +return NULL; + } + + bContextStore *but_context = UI_but_context_get(active_but); + if (!but_context) { +return NULL; + } + + return CTX_store_copy(but_context); +} + +static void wm_drop_ui_context_free(bContextStore **context_store) +{ + if (!*context_store) { +return; + } + CTX_store_free(*context_store); + *context_store = NULL; +} + void WM_event_drag_image(wmDrag *drag, ImBuf *imb, float scale, int sx, int sy) { drag->imb = imb; @@ -259,6 +283,7 @@ void WM_drag_free(wmDrag *drag) if (drag->flags & WM_DRAG_FREE_DATA) { WM_drag_data_free(drag->type, drag->poin); } + wm_drop_ui_context_free(&drag->drop_state.ui_context); if (drag->drop_state.free_disabled_info) { MEM_SAFE_FREE(drag->drop_state.disabled_info); } @@ -317,6 +342,10 @@ static wmDropBox *dropbox_active(bContext *C, } const wmOperatorCallContext opcontext = wm_drop_operator_context_get(drop); + if (drag->drop_state.ui_context) { +CTX_store_set(C, drag->drop_state.ui_context); + } + if (WM_operator_poll_context(C, drop->ot, opcontext)) { return drop; } @@ -367,6 +396,10 @@ static void wm_drop_update_active(bContext *C, wmDrag *drag, const wmEvent *even return; } + /* Update UI context, before polling so polls can query this context. */ + wm_drop_ui_context_free(&drag->drop_state.ui_context); + drag->drop_state.ui_context = wm_drop_ui_context_create(C); + wmDropBox *drop_prev = drag->drop_state.active_dropbox; wmDropBox
[Bf-blender-cvs] [391bb6e9ba6] blender-v3.1-release: Cleanup: Clang-tidy warning gl_shader.cc
Commit: 391bb6e9ba647e86ea80350f99658e05c960abdf Author: Jeroen Bakker Date: Fri Jan 28 16:35:05 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB391bb6e9ba647e86ea80350f99658e05c960abdf Cleanup: Clang-tidy warning gl_shader.cc === M source/blender/gpu/opengl/gl_shader.cc === diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc index d1ef6448791..6f39d69e6ff 100644 --- a/source/blender/gpu/opengl/gl_shader.cc +++ b/source/blender/gpu/opengl/gl_shader.cc @@ -498,7 +498,7 @@ std::string GLShader::geometry_layout_declare(const ShaderCreateInfo &info) cons static StageInterfaceInfo *find_interface_by_name(const Vector &ifaces, const StringRefNull &name) { - for (auto iface : ifaces) { + for (auto *iface : ifaces) { if (iface->name == name) { return iface; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b6f640b9534] blender-v3.1-release: Cleanup: Clang-tidy warnings.
Commit: b6f640b9534289d2235f3bcb9689bcc5d58f721d Author: Jeroen Bakker Date: Fri Jan 28 16:18:13 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rBb6f640b9534289d2235f3bcb9689bcc5d58f721d Cleanup: Clang-tidy warnings. Silence Clang-tidy warnings in gpu module. === M source/blender/gpu/intern/gpu_shader_builder_stubs.cc M source/blender/gpu/intern/gpu_shader_dependency.cc === diff --git a/source/blender/gpu/intern/gpu_shader_builder_stubs.cc b/source/blender/gpu/intern/gpu_shader_builder_stubs.cc index 40e54ab4394..716d6e33a81 100644 --- a/source/blender/gpu/intern/gpu_shader_builder_stubs.cc +++ b/source/blender/gpu/intern/gpu_shader_builder_stubs.cc @@ -39,6 +39,8 @@ #include "DNA_userdef_types.h" +#include "NOD_shader.h" + #include "DRW_engine.h" #include "bmesh.h" @@ -167,7 +169,7 @@ void BKE_mesh_looptri_get_real_edges(const struct Mesh *UNUSED(mesh), /** \name Stubs of BKE_material.h * \{ */ -void BKE_material_defaults_free_gpu(void) +void BKE_material_defaults_free_gpu() { /* This function is reachable via GPU_exit. */ } diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc index 3965d796647..5e03f7d0767 100644 --- a/source/blender/gpu/intern/gpu_shader_dependency.cc +++ b/source/blender/gpu/intern/gpu_shader_dependency.cc @@ -119,7 +119,7 @@ struct GPUSource { template int64_t find_str(const StringRef &input, const T keyword, int64_t offset = 0) { -while (1) { +while (true) { if constexpr (reversed) { offset = input.rfind(keyword, offset); } @@ -202,10 +202,10 @@ struct GPUSource { * - All values needs to be specified using constant literals to avoid compiler differences. * - All values needs to have the 'u' suffix to avoid GLSL compiler errors. */ - void enum_preprocess(void) + void enum_preprocess() { const StringRefNull input = source; -std::string output = ""; +std::string output; int64_t cursor = 0; int64_t last_pos = 0; const bool is_cpp = filename.endswith(".hh"); @@ -220,7 +220,7 @@ struct GPUSource { continue; \ } -while (1) { +while (true) { cursor = find_keyword(input, "enum ", cursor); if (cursor == -1) { break; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4e93918b35f] master: Merge branch 'blender-v3.1-release'
Commit: 4e93918b35facdc1ef8aa84d234c0687418006e2 Author: Jeroen Bakker Date: Fri Jan 28 15:09:35 2022 +0100 Branches: master https://developer.blender.org/rB4e93918b35facdc1ef8aa84d234c0687418006e2 Merge branch 'blender-v3.1-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [75e61e5a6dc] blender-v3.1-release: Image Engine: Use GPUShaderCreateInfo.
Commit: 75e61e5a6dc70107eaf784a369f225ca062fdcd5 Author: Jeroen Bakker Date: Fri Jan 28 15:00:26 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB75e61e5a6dc70107eaf784a369f225ca062fdcd5 Image Engine: Use GPUShaderCreateInfo. Ported the image engine shaders to use the GPUShaderCreateInfo struct. No functional changes. === M source/blender/draw/CMakeLists.txt M source/blender/draw/engines/image/image_drawing_mode.hh M source/blender/draw/engines/image/image_shader.cc R074source/blender/draw/engines/image/shaders/engine_image_frag.glsl source/blender/draw/engines/image/shaders/image_engine_frag.glsl R070source/blender/draw/engines/image/shaders/engine_image_vert.glsl source/blender/draw/engines/image/shaders/image_engine_vert.glsl A source/blender/draw/engines/image/shaders/infos/engine_image_info.hh M source/blender/gpu/CMakeLists.txt === diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index b40fc88a076..f4e57d9521b 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -518,8 +518,8 @@ set(GLSL_SRC engines/overlay/shaders/wireframe_frag.glsl engines/overlay/shaders/xray_fade_frag.glsl - engines/image/shaders/engine_image_frag.glsl - engines/image/shaders/engine_image_vert.glsl + engines/image/shaders/image_engine_frag.glsl + engines/image/shaders/image_engine_vert.glsl ) set(GLSL_C) diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index 8eb98b40492..c0d829b9307 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -94,7 +94,7 @@ template class ScreenSpaceDrawingMode : public AbstractD DRWShadingGroup *shgrp = DRW_shgroup_create(shader, instance_data->passes.image_pass); DRW_shgroup_uniform_vec2_copy(shgrp, "farNearDistances", sh_params.far_near); -DRW_shgroup_uniform_vec4_copy(shgrp, "color", ShaderParameters::color); +DRW_shgroup_uniform_vec4_copy(shgrp, "col", ShaderParameters::color); DRW_shgroup_uniform_vec4_copy(shgrp, "shuffle", sh_params.shuffle); DRW_shgroup_uniform_int_copy(shgrp, "drawFlags", sh_params.flags); DRW_shgroup_uniform_bool_copy(shgrp, "imgPremultiplied", sh_params.use_premul_alpha); diff --git a/source/blender/draw/engines/image/image_shader.cc b/source/blender/draw/engines/image/image_shader.cc index 77cbaeec5a4..e3cb60c5511 100644 --- a/source/blender/draw/engines/image/image_shader.cc +++ b/source/blender/draw/engines/image/image_shader.cc @@ -64,11 +64,7 @@ GPUShader *IMAGE_shader_image_get() { IMAGE_Shaders *sh_data = &e_data.shaders; if (sh_data->image_sh == nullptr) { -sh_data->image_sh = DRW_shader_create_with_shaderlib(datatoc_engine_image_vert_glsl, - nullptr, - datatoc_engine_image_frag_glsl, - e_data.lib, - nullptr); +sh_data->image_sh = GPU_shader_create_from_info_name("image_engine_shader"); } return sh_data->image_sh; } diff --git a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl b/source/blender/draw/engines/image/shaders/image_engine_frag.glsl similarity index 74% rename from source/blender/draw/engines/image/shaders/engine_image_frag.glsl rename to source/blender/draw/engines/image/shaders/image_engine_frag.glsl index 298487baab2..bcdc8445b26 100644 --- a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl +++ b/source/blender/draw/engines/image/shaders/image_engine_frag.glsl @@ -6,28 +6,11 @@ #define IMAGE_DRAW_FLAG_SHUFFLING (1 << 2) #define IMAGE_DRAW_FLAG_DEPTH (1 << 3) -uniform sampler2D imageTexture; - -uniform bool imgPremultiplied; -uniform int drawFlags; -uniform vec2 farNearDistances; -uniform vec4 color; -uniform vec4 shuffle; - -/* Maximum UV range. - * Negative UV coordinates and UV coordinates beyond maxUV would draw a border. */ -uniform vec2 maxUv; - -#define FAR_DISTANCE farNearDistances.x -#define NEAR_DISTANCE farNearDistances.y - #define Z_DEPTH_BORDER 1.0 #define Z_DEPTH_IMAGE 0.75 -in vec2 uv_screen; -in vec2 uv_image; - -out vec4 fragColor; +#define FAR_DISTANCE farNearDistances.x +#define NEAR_DISTANCE farNearDistances.y bool is_border(vec2 uv) { @@ -51,7 +34,7 @@ void main() } if ((drawFlags & IMAGE_DRAW_FLAG_SHUFFLING) != 0) { - tex_color = color * dot(tex_color, shuffle); + tex_color = col * dot(tex_color, shuffle); } if ((drawFlags & IMAGE_DRAW_FLAG_SHOW_ALPHA) == 0) { tex_color.a = 1.0; diff --git a/source/blender/dra
[Bf-blender-cvs] [3b2a1ff716a] blender-v3.1-release: Image Engine: Remove unused shader parameter Color.
Commit: 3b2a1ff716a0b927731ca75d9538d6da54637b6b Author: Jeroen Bakker Date: Fri Jan 28 15:02:36 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB3b2a1ff716a0b927731ca75d9538d6da54637b6b Image Engine: Remove unused shader parameter Color. This change removes an unused shader parameter that also collided when a local varialble with the same name was used on different platforms. === M source/blender/draw/engines/image/image_drawing_mode.hh M source/blender/draw/engines/image/image_shader_params.hh M source/blender/draw/engines/image/shaders/image_engine_frag.glsl M source/blender/draw/engines/image/shaders/infos/engine_image_info.hh === diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index c0d829b9307..f501bc78b11 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -94,7 +94,6 @@ template class ScreenSpaceDrawingMode : public AbstractD DRWShadingGroup *shgrp = DRW_shgroup_create(shader, instance_data->passes.image_pass); DRW_shgroup_uniform_vec2_copy(shgrp, "farNearDistances", sh_params.far_near); -DRW_shgroup_uniform_vec4_copy(shgrp, "col", ShaderParameters::color); DRW_shgroup_uniform_vec4_copy(shgrp, "shuffle", sh_params.shuffle); DRW_shgroup_uniform_int_copy(shgrp, "drawFlags", sh_params.flags); DRW_shgroup_uniform_bool_copy(shgrp, "imgPremultiplied", sh_params.use_premul_alpha); diff --git a/source/blender/draw/engines/image/image_shader_params.hh b/source/blender/draw/engines/image/image_shader_params.hh index 46371c598f3..9f3da3f9e9e 100644 --- a/source/blender/draw/engines/image/image_shader_params.hh +++ b/source/blender/draw/engines/image/image_shader_params.hh @@ -35,8 +35,6 @@ #include "image_space.hh" struct ShaderParameters { - constexpr static float color[4] = {1.0f, 1.0f, 1.0f, 1.0f}; - int flags = 0; float shuffle[4]; float far_near[2]; diff --git a/source/blender/draw/engines/image/shaders/image_engine_frag.glsl b/source/blender/draw/engines/image/shaders/image_engine_frag.glsl index bcdc8445b26..b0ac7af457f 100644 --- a/source/blender/draw/engines/image/shaders/image_engine_frag.glsl +++ b/source/blender/draw/engines/image/shaders/image_engine_frag.glsl @@ -34,7 +34,7 @@ void main() } if ((drawFlags & IMAGE_DRAW_FLAG_SHUFFLING) != 0) { - tex_color = col * dot(tex_color, shuffle); + tex_color = vec4(dot(tex_color, shuffle)); } if ((drawFlags & IMAGE_DRAW_FLAG_SHOW_ALPHA) == 0) { tex_color.a = 1.0; diff --git a/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh b/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh index e691abfadcf..1dd20a9a95b 100644 --- a/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh +++ b/source/blender/draw/engines/image/shaders/infos/engine_image_info.hh @@ -10,7 +10,6 @@ GPU_SHADER_CREATE_INFO(image_engine_shader) .vertex_out(image_engine_iface) .fragment_out(0, Type::VEC4, "fragColor") .push_constant(Type::VEC4, "shuffle") -.push_constant(Type::VEC4, "col") .push_constant(Type::VEC2, "maxUv") .push_constant(Type::VEC2, "farNearDistances") .push_constant(Type::INT, "drawFlags") @@ -19,4 +18,4 @@ GPU_SHADER_CREATE_INFO(image_engine_shader) .vertex_source("image_engine_vert.glsl") .fragment_source("image_engine_frag.glsl") .additional_info("draw_modelmat") -.do_static_compilation(true); \ No newline at end of file +.do_static_compilation(true); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c40d6ebceb9] master: Merge branch 'blender-v3.1-release'
Commit: c40d6ebceb9a6439138abe925cfa18b33cfaa22f Author: Sergey Sharybin Date: Fri Jan 28 14:46:16 2022 +0100 Branches: master https://developer.blender.org/rBc40d6ebceb9a6439138abe925cfa18b33cfaa22f Merge branch 'blender-v3.1-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [430f71fce28] blender-v3.1-release: Fix insufficient CPU flags checks for Cycles OIDN
Commit: 430f71fce289e876602178330ac725c46c043abf Author: Sergey Sharybin Date: Fri Jan 28 13:25:23 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB430f71fce289e876602178330ac725c46c043abf Fix insufficient CPU flags checks for Cycles OIDN Sometime throughout development some checks got lost during refactor. This change makes it so that if OIDN is not supported on the current CPU Cycles will report an error and stop rendering. This behavior is similar to when an OptiX denoiser is requested and there is no OptiX compatible device available. The easiest way to verify this change is to force return false from the `openimagedenoise_supported()`. Fixes Cycles part of the T94127. Differential Revision: https://developer.blender.org/D13944 === M intern/cycles/integrator/denoiser.cpp M intern/cycles/integrator/denoiser_oidn.cpp M intern/cycles/integrator/denoiser_oidn.h === diff --git a/intern/cycles/integrator/denoiser.cpp b/intern/cycles/integrator/denoiser.cpp index 2a5f99f358b..28cdeeb630a 100644 --- a/intern/cycles/integrator/denoiser.cpp +++ b/intern/cycles/integrator/denoiser.cpp @@ -125,20 +125,41 @@ static Device *find_best_device(Device *device, DenoiserType type) return best_device; } +static DeviceInfo find_best_denoiser_device_info(const vector &device_infos, + DenoiserType denoiser_type) +{ + for (const DeviceInfo &device_info : device_infos) { +if ((device_info.denoisers & denoiser_type) == 0) { + continue; +} + +/* TODO(sergey): Use one of the already configured devices, so that OptiX denoising can happen + * on a physical CUDA device which is already used for rendering. */ + +/* TODO(sergey): Choose fastest device for denoising. */ + +return device_info; + } + + DeviceInfo none_device; + none_device.type = DEVICE_NONE; + return none_device; +} + static unique_ptr create_denoiser_device(Device *path_trace_device, - const uint device_type_mask) + const uint device_type_mask, + DenoiserType denoiser_type) { const vector device_infos = Device::available_devices(device_type_mask); if (device_infos.empty()) { return nullptr; } - /* TODO(sergey): Use one of the already configured devices, so that OptiX denoising can happen on - * a physical CUDA device which is already used for rendering. */ - - /* TODO(sergey): Choose fastest device for denoising. */ - - const DeviceInfo denoiser_device_info = device_infos.front(); + const DeviceInfo denoiser_device_info = find_best_denoiser_device_info(device_infos, + denoiser_type); + if (denoiser_device_info.type == DEVICE_NONE) { +return nullptr; + } unique_ptr denoiser_device( Device::create(denoiser_device_info, path_trace_device->stats, path_trace_device->profiler)); @@ -186,7 +207,8 @@ Device *Denoiser::ensure_denoiser_device(Progress *progress) device_creation_attempted_ = true; const uint device_type_mask = get_device_type_mask(); - local_denoiser_device_ = create_denoiser_device(path_trace_device_, device_type_mask); + local_denoiser_device_ = create_denoiser_device( + path_trace_device_, device_type_mask, params_.type); denoiser_device_ = local_denoiser_device_.get(); return denoiser_device_; diff --git a/intern/cycles/integrator/denoiser_oidn.cpp b/intern/cycles/integrator/denoiser_oidn.cpp index a08aec513fc..4676e69c4fb 100644 --- a/intern/cycles/integrator/denoiser_oidn.cpp +++ b/intern/cycles/integrator/denoiser_oidn.cpp @@ -37,8 +37,6 @@ OIDNDenoiser::OIDNDenoiser(Device *path_trace_device, const DenoiseParams ¶m : Denoiser(path_trace_device, params) { DCHECK_EQ(params.type, DENOISER_OPENIMAGEDENOISE); - - DCHECK(openimagedenoise_supported()) << "OpenImageDenoiser is not supported on this platform."; } #ifdef WITH_OPENIMAGEDENOISE @@ -585,6 +583,9 @@ bool OIDNDenoiser::denoise_buffer(const BufferParams &buffer_params, const int num_samples, bool allow_inplace_modification) { + DCHECK(openimagedenoise_supported()) + << "OpenImageDenoiser is not supported on this platform or build."; + #ifdef WITH_OPENIMAGEDENOISE thread_scoped_lock lock(mutex_); @@ -635,4 +636,20 @@ uint OIDNDenoiser::get_device_type_mask() const return DEVICE_MASK_CPU; } +Device *OIDNDenoiser::ensure_denoiser_device(Progress *progress) +{ +#ifndef WITH_OPENIMAGEDENOISE + path_trace_device_->set_error("Build without OpenImageDenoiser"); + return nullptr; +#else + if (!openimagedenoise_supported()) { +path_trace_device_->set_er
[Bf-blender-cvs] [29a1d8b1d3f] blender-v3.1-release: Fix compilation error in previous commit.
Commit: 29a1d8b1d3fbf5bc6cc77906ded2178b5d77793b Author: Jeroen Bakker Date: Fri Jan 28 14:01:25 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB29a1d8b1d3fbf5bc6cc77906ded2178b5d77793b Fix compilation error in previous commit. === M source/blender/render/intern/texture_image.c === diff --git a/source/blender/render/intern/texture_image.c b/source/blender/render/intern/texture_image.c index 914fc22ecaf..ad355d0cb25 100644 --- a/source/blender/render/intern/texture_image.c +++ b/source/blender/render/intern/texture_image.c @@ -600,7 +600,7 @@ static void boxsampleclip(struct ImBuf *ibuf, rctf *rf, TexResult *texres) if (div != 0.0f) { div = 1.0f / div; - mul_v4_fl(texres->trgba, div) + mul_v4_fl(texres->trgba, div); } else { zero_v4(texres->trgba); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cdcbdf8ce46] blender-v3.1-release: Remove compilation warnings TexResult.
Commit: cdcbdf8ce46d14c753d68ee8dfa533c642376805 Author: Jeroen Bakker Date: Fri Jan 28 13:28:31 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rBcdcbdf8ce46d14c753d68ee8dfa533c642376805 Remove compilation warnings TexResult. === M source/blender/blenkernel/intern/dynamicpaint.c M source/blender/blenkernel/intern/effect.c M source/blender/blenkernel/intern/texture.c M source/blender/blenlib/intern/math_interp.c M source/blender/compositor/operations/COM_TextureOperation.cc M source/blender/editors/render/render_preview.cc M source/blender/makesrna/intern/rna_texture_api.c M source/blender/modifiers/intern/MOD_displace.c M source/blender/modifiers/intern/MOD_volume_displace.cc M source/blender/modifiers/intern/MOD_weightvg_util.c M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_attribute_sample_texture.cc M source/blender/nodes/texture/nodes/node_texture_output.c M source/blender/nodes/texture/nodes/node_texture_proc.c M source/blender/nodes/texture/nodes/node_texture_texture.c M source/blender/render/RE_texture.h M source/blender/render/intern/texture_common.h M source/blender/render/intern/texture_image.c M source/blender/render/intern/texture_pointdensity.c M source/blender/render/intern/texture_procedural.c === diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 64e0427a810..ef789d3e39b 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -1518,7 +1518,7 @@ static void dynamic_paint_set_init_color_tex_to_vcol_cb( multitex_ext_safe(tex, uv, &texres, pool, scene_color_manage, false); if (texres.tin > pPoint[vert].color[3]) { - copy_v3_v3(pPoint[vert].color, &texres.tr); + copy_v3_v3(pPoint[vert].color, texres.trgba); pPoint[vert].color[3] = texres.tin; } } @@ -1559,7 +1559,7 @@ static void dynamic_paint_set_init_color_tex_to_imseq_cb( multitex_ext_safe(tex, uv_final, &texres, NULL, scene_color_manage, false); /* apply color */ - copy_v3_v3(pPoint[i].color, &texres.tr); + copy_v3_v3(pPoint[i].color, texres.trgba); pPoint[i].color[3] = texres.tin; } diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index bbf9e9edfd2..1f1915f60ca 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -908,9 +908,9 @@ static void do_texture_effector(EffectorCache *eff, eff->pd->tex, tex_co, NULL, NULL, 0, result, 0, NULL, scene_color_manage, false); if (hasrgb && mode == PFIELD_TEX_RGB) { -force[0] = (0.5f - result->tr) * strength; -force[1] = (0.5f - result->tg) * strength; -force[2] = (0.5f - result->tb) * strength; +force[0] = (0.5f - result->trgba[0]) * strength; +force[1] = (0.5f - result->trgba[1]) * strength; +force[2] = (0.5f - result->trgba[2]) * strength; } else if (nabla != 0) { strength /= nabla; @@ -933,7 +933,8 @@ static void do_texture_effector(EffectorCache *eff, /* generate intensity if texture only has rgb value */ if (hasrgb & TEX_RGB) { for (int i = 0; i < 4; i++) { - result[i].tin = (1.0f / 3.0f) * (result[i].tr + result[i].tg + result[i].tb); + result[i].tin = (1.0f / 3.0f) * + (result[i].trgba[0] + result[i].trgba[1] + result[i].trgba[2]); } } force[0] = (result[0].tin - result[1].tin) * strength; @@ -943,12 +944,12 @@ static void do_texture_effector(EffectorCache *eff, else { /*PFIELD_TEX_CURL*/ float dbdy, dgdz, drdz, dbdx, dgdx, drdy; - dbdy = result[2].tb - result[0].tb; - dgdz = result[3].tg - result[0].tg; - drdz = result[3].tr - result[0].tr; - dbdx = result[1].tb - result[0].tb; - dgdx = result[1].tg - result[0].tg; - drdy = result[2].tr - result[0].tr; + dbdy = result[2].trgba[2] - result[0].trgba[2]; + dgdz = result[3].trgba[1] - result[0].trgba[1]; + drdz = result[3].trgba[0] - result[0].trgba[0]; + dbdx = result[1].trgba[2] - result[0].trgba[2]; + dgdx = result[1].trgba[1] - result[0].trgba[1]; + drdy = result[2].trgba[0] - result[0].trgba[0]; force[0] = (dbdy - dgdz) * strength; force[1] = (drdz - dbdx) * strength; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 37d5d732a70..c37e2fb6144 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -723,10 +723,10 @@ void BKE_texture_get_value_ex(const Scene *scene, * if the texture didn't give an RGB value, copy the intensity across */ if (
[Bf-blender-cvs] [be921a04f24] blender-v3.1-release: Image engine: Remove unused parameter.
Commit: be921a04f24a4807682bfb9d1118bcce11c7b66a Author: Jeroen Bakker Date: Fri Jan 28 11:23:22 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rBbe921a04f24a4807682bfb9d1118bcce11c7b66a Image engine: Remove unused parameter. Parameter was used to still be compatible with the previous drawing mode. The previous mode isn't available anymore so the parameter can should be removed. === M source/blender/draw/engines/image/image_shader_params.hh M source/blender/draw/engines/image/image_space.hh M source/blender/draw/engines/image/image_space_image.hh M source/blender/draw/engines/image/image_space_node.hh === diff --git a/source/blender/draw/engines/image/image_shader_params.hh b/source/blender/draw/engines/image/image_shader_params.hh index 3fcea696594..46371c598f3 100644 --- a/source/blender/draw/engines/image/image_shader_params.hh +++ b/source/blender/draw/engines/image/image_shader_params.hh @@ -54,7 +54,6 @@ struct ShaderParameters { Camera *camera = static_cast(scene->camera->data); copy_v2_fl2(far_near, camera->clip_end, camera->clip_start); } -const bool is_tiled_image = (image->source == IMA_SRC_TILED); -space->get_shader_parameters(*this, image_buffer, is_tiled_image); +space->get_shader_parameters(*this, image_buffer); } }; diff --git a/source/blender/draw/engines/image/image_space.hh b/source/blender/draw/engines/image/image_space.hh index 762f43a7337..29d9cd4340b 100644 --- a/source/blender/draw/engines/image/image_space.hh +++ b/source/blender/draw/engines/image/image_space.hh @@ -72,8 +72,7 @@ class AbstractSpaceAccessor { * are updated inside the image engine. */ virtual void get_shader_parameters(ShaderParameters &r_shader_parameters, - ImBuf *image_buffer, - bool is_tiled) = 0; + ImBuf *image_buffer) = 0; /** * Retrieve the gpu textures to draw. diff --git a/source/blender/draw/engines/image/image_space_image.hh b/source/blender/draw/engines/image/image_space_image.hh index 96abe2e57f4..090481a351d 100644 --- a/source/blender/draw/engines/image/image_space_image.hh +++ b/source/blender/draw/engines/image/image_space_image.hh @@ -54,9 +54,7 @@ class SpaceImageAccessor : public AbstractSpaceAccessor { ED_space_image_release_buffer(sima, image_buffer, lock); } - void get_shader_parameters(ShaderParameters &r_shader_parameters, - ImBuf *image_buffer, - bool UNUSED(is_tiled)) override + void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *image_buffer) override { const int sima_flag = sima->flag & ED_space_image_get_display_channel_mask(image_buffer); if ((sima_flag & SI_USE_ALPHA) != 0) { diff --git a/source/blender/draw/engines/image/image_space_node.hh b/source/blender/draw/engines/image/image_space_node.hh index 1ce8fdeb0f3..15eef8f6499 100644 --- a/source/blender/draw/engines/image/image_space_node.hh +++ b/source/blender/draw/engines/image/image_space_node.hh @@ -54,9 +54,7 @@ class SpaceNodeAccessor : public AbstractSpaceAccessor { BKE_image_release_ibuf(image, ibuf, lock); } - void get_shader_parameters(ShaderParameters &r_shader_parameters, - ImBuf *ibuf, - bool UNUSED(is_tiled)) override + void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *ibuf) override { if ((snode->flag & SNODE_USE_ALPHA) != 0) { /* Show RGBA */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7c48196056c] blender-v3.1-release: Silent compilation warning in space_graph.
Commit: 7c48196056c88c17c551e3177ef7b6f276f01d77 Author: Jeroen Bakker Date: Fri Jan 28 11:41:08 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB7c48196056c88c17c551e3177ef7b6f276f01d77 Silent compilation warning in space_graph. === M source/blender/editors/space_graph/graph_draw.c === diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index ed5993c77a7..3a2593cc543 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -437,7 +437,6 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu) for (sel = 0; sel < 2; sel++) { BezTriple *bezt = fcu->bezt, *prevbezt = NULL; int basecol = (sel) ? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE; -const float *fp; uchar col[4]; for (b = 0; b < fcu->totvert; b++, prevbezt = bezt, bezt++) { @@ -452,17 +451,15 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu) /* draw handle with appropriate set of colors if selection is ok */ if ((bezt->f2 & SELECT) == sel) { -fp = bezt->vec[0]; - /* only draw first handle if previous segment had handles */ if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) { UI_GetThemeColor3ubv(basecol + bezt->h1, col); col[3] = fcurve_display_alpha(fcu) * 255; immAttr4ubv(color, col); - immVertex2fv(pos, fp); + immVertex2fv(pos, bezt->vec[0]); immAttr4ubv(color, col); - immVertex2fv(pos, fp + 3); + immVertex2fv(pos, bezt->vec[1]); } /* only draw second handle if this segment is bezier */ @@ -470,33 +467,31 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu) UI_GetThemeColor3ubv(basecol + bezt->h2, col); col[3] = fcurve_display_alpha(fcu) * 255; immAttr4ubv(color, col); - immVertex2fv(pos, fp + 3); + immVertex2fv(pos, bezt->vec[1]); immAttr4ubv(color, col); - immVertex2fv(pos, fp + 6); + immVertex2fv(pos, bezt->vec[2]); } } else { /* only draw first handle if previous segment was had handles, and selection is ok */ if (((bezt->f1 & SELECT) == sel) && ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ { - fp = bezt->vec[0]; UI_GetThemeColor3ubv(basecol + bezt->h1, col); col[3] = fcurve_display_alpha(fcu) * 255; immAttr4ubv(color, col); - immVertex2fv(pos, fp); + immVertex2fv(pos, bezt->vec[0]); immAttr4ubv(color, col); - immVertex2fv(pos, fp + 3); + immVertex2fv(pos, bezt->vec[1]); } /* only draw second handle if this segment is bezier, and selection is ok */ if (((bezt->f3 & SELECT) == sel) && (bezt->ipo == BEZT_IPO_BEZ)) { - fp = bezt->vec[1]; UI_GetThemeColor3ubv(basecol + bezt->h2, col); col[3] = fcurve_display_alpha(fcu) * 255; immAttr4ubv(color, col); - immVertex2fv(pos, fp); + immVertex2fv(pos, bezt->vec[0]); immAttr4ubv(color, col); - immVertex2fv(pos, fp + 3); + immVertex2fv(pos, bezt->vec[1]); } } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [dcb7b3f9f78] blender-v3.1-release: Image Engine: Fix issue show alpha flag not reset.
Commit: dcb7b3f9f78484840edc60bc4cf711823b7eec17 Author: Jeroen Bakker Date: Fri Jan 28 11:19:27 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rBdcb7b3f9f78484840edc60bc4cf711823b7eec17 Image Engine: Fix issue show alpha flag not reset. After showing the alpha in the image editor the setting was not reset so all images in the editor showed as being transparent. This commit fixes this by resetting the flag before updating. === M source/blender/draw/engines/image/image_private.hh M source/blender/draw/engines/image/image_shader_params.hh M source/blender/draw/engines/image/image_space_image.hh M source/blender/draw/engines/image/shaders/engine_image_frag.glsl === diff --git a/source/blender/draw/engines/image/image_private.hh b/source/blender/draw/engines/image/image_private.hh index c8968ddf9c6..6d665db4c41 100644 --- a/source/blender/draw/engines/image/image_private.hh +++ b/source/blender/draw/engines/image/image_private.hh @@ -54,7 +54,6 @@ struct IMAGE_Data { #define IMAGE_DRAW_FLAG_APPLY_ALPHA (1 << 1) #define IMAGE_DRAW_FLAG_SHUFFLING (1 << 2) #define IMAGE_DRAW_FLAG_DEPTH (1 << 3) -#define IMAGE_DRAW_FLAG_DO_REPEAT (1 << 4) /** * Abstract class for a drawing mode of the image engine. diff --git a/source/blender/draw/engines/image/image_shader_params.hh b/source/blender/draw/engines/image/image_shader_params.hh index fd16d9cdc4b..3fcea696594 100644 --- a/source/blender/draw/engines/image/image_shader_params.hh +++ b/source/blender/draw/engines/image/image_shader_params.hh @@ -44,6 +44,7 @@ struct ShaderParameters { void update(AbstractSpaceAccessor *space, const Scene *scene, Image *image, ImBuf *image_buffer) { +flags = 0; copy_v4_fl(shuffle, 1.0f); copy_v2_fl2(far_near, 100.0f, 0.0f); diff --git a/source/blender/draw/engines/image/image_space_image.hh b/source/blender/draw/engines/image/image_space_image.hh index 900ac57c652..96abe2e57f4 100644 --- a/source/blender/draw/engines/image/image_space_image.hh +++ b/source/blender/draw/engines/image/image_space_image.hh @@ -56,11 +56,9 @@ class SpaceImageAccessor : public AbstractSpaceAccessor { void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *image_buffer, - bool is_tiled) override + bool UNUSED(is_tiled)) override { const int sima_flag = sima->flag & ED_space_image_get_display_channel_mask(image_buffer); -const bool do_repeat = (!is_tiled) && ((sima->flag & SI_DRAW_TILE) != 0); -SET_FLAG_FROM_TEST(r_shader_parameters.flags, do_repeat, IMAGE_DRAW_FLAG_DO_REPEAT); if ((sima_flag & SI_USE_ALPHA) != 0) { /* Show RGBA */ r_shader_parameters.flags |= IMAGE_DRAW_FLAG_SHOW_ALPHA | IMAGE_DRAW_FLAG_APPLY_ALPHA; diff --git a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl index 604f9b807b3..298487baab2 100644 --- a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl +++ b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl @@ -5,7 +5,6 @@ #define IMAGE_DRAW_FLAG_APPLY_ALPHA (1 << 1) #define IMAGE_DRAW_FLAG_SHUFFLING (1 << 2) #define IMAGE_DRAW_FLAG_DEPTH (1 << 3) -#define IMAGE_DRAW_FLAG_DO_REPEAT (1 << 4) uniform sampler2D imageTexture; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [379814a1184] blender-v3.1-release: Draw: Remove unused code in image engine shader.
Commit: 379814a1184312aa3714491b92bf5b2ea94cce23 Author: Jeroen Bakker Date: Fri Jan 28 10:56:27 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB379814a1184312aa3714491b92bf5b2ea94cce23 Draw: Remove unused code in image engine shader. === M source/blender/draw/engines/image/shaders/engine_image_vert.glsl === diff --git a/source/blender/draw/engines/image/shaders/engine_image_vert.glsl b/source/blender/draw/engines/image/shaders/engine_image_vert.glsl index 71100a5681a..0c106f48f4a 100644 --- a/source/blender/draw/engines/image/shaders/engine_image_vert.glsl +++ b/source/blender/draw/engines/image/shaders/engine_image_vert.glsl @@ -1,10 +1,5 @@ #pragma BLENDER_REQUIRE(common_view_lib.glsl) -#define IMAGE_DRAW_FLAG_DO_REPEAT (1 << 4) -#define IMAGE_Z_DEPTH 0.75 - -uniform int drawFlags; - in vec2 pos; in vec2 uv; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: bf-blender [62820] tags/blender-3.1-release/lib/: Copy libs to 3.1 branch
Revision: 62820 https://developer.blender.org/rBL62820 Author: dingto Date: 2022-01-28 13:07:35 +0100 (Fri, 28 Jan 2022) Log Message: --- Copy libs to 3.1 branch Added Paths: --- tags/blender-3.1-release/lib/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: bf-blender [62819] tags/blender-3.1-release/: Recreate the 3.1 branch with correct name
Revision: 62819 https://developer.blender.org/rBL62819 Author: dingto Date: 2022-01-28 13:06:49 +0100 (Fri, 28 Jan 2022) Log Message: --- Recreate the 3.1 branch with correct name Added Paths: --- tags/blender-3.1-release/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: bf-blender [62818] tags/blender-v3.1-release/: Remove 3.1 tag from SVN, was created with false name.
Revision: 62818 https://developer.blender.org/rBL62818 Author: dingto Date: 2022-01-28 13:03:43 +0100 (Fri, 28 Jan 2022) Log Message: --- Remove 3.1 tag from SVN, was created with false name. Removed Paths: - tags/blender-v3.1-release/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [5d74fa314b7] master: Fix overread warning in screen operator
Commit: 5d74fa314b7ea8224035a720e92de490636c8939 Author: Julian Eisel Date: Fri Jan 28 12:40:44 2022 +0100 Branches: master https://developer.blender.org/rB5d74fa314b7ea8224035a720e92de490636c8939 Fix overread warning in screen operator Fixes a `stringop-overread` warning, other people are working on fixing some more :) === M source/blender/editors/screen/screen_ops.c === diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 6581bffb6bd..8b6e6b4ef9b 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2608,7 +2608,7 @@ typedef struct RegionMoveData { ARegion *region; ScrArea *area; int bigger, smaller, origval; - int origx, origy; + int orig_xy[2]; int maxsize; AZEdge edge; @@ -2716,8 +2716,7 @@ static int region_scale_invoke(bContext *C, wmOperator *op, const wmEvent *event } rmd->area = sad->sa1; rmd->edge = az->edge; -rmd->origx = event->xy[0]; -rmd->origy = event->xy[1]; +copy_v2_v2_int(rmd->orig_xy, event->xy); rmd->maxsize = area_max_regionsize(rmd->area, rmd->region, rmd->edge); /* if not set we do now, otherwise it uses type */ @@ -2804,7 +2803,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, const wmEvent *event) (BLI_rcti_size_x(&rmd->region->v2d.mask) + 1); const int snap_size_threshold = (U.widget_unit * 2) / aspect; if (ELEM(rmd->edge, AE_LEFT_TO_TOPRIGHT, AE_RIGHT_TO_TOPLEFT)) { -delta = event->xy[0] - rmd->origx; +delta = event->xy[0] - rmd->orig_xy[0]; if (rmd->edge == AE_LEFT_TO_TOPRIGHT) { delta = -delta; } @@ -2837,7 +2836,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, const wmEvent *event) } } else { -delta = event->xy[1] - rmd->origy; +delta = event->xy[1] - rmd->orig_xy[1]; if (rmd->edge == AE_BOTTOM_TO_TOPLEFT) { delta = -delta; } @@ -2879,7 +2878,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, const wmEvent *event) } case LEFTMOUSE: if (event->val == KM_RELEASE) { -if (len_manhattan_v2v2_int(event->xy, &rmd->origx) <= WM_EVENT_CURSOR_MOTION_THRESHOLD) { +if (len_manhattan_v2v2_int(event->xy, rmd->orig_xy) <= WM_EVENT_CURSOR_MOTION_THRESHOLD) { if (rmd->region->flag & RGN_FLAG_HIDDEN) { region_scale_toggle_hidden(C, rmd); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [60bd6804dbd] master: Revert "3.1 splashscreen"
Commit: 60bd6804dbd87b5f1907f208394b69610941fd1b Author: Thomas Dinges Date: Fri Jan 28 11:34:51 2022 +0100 Branches: master https://developer.blender.org/rB60bd6804dbd87b5f1907f208394b69610941fd1b Revert "3.1 splashscreen" This reverts commit 3aa56608f76ced34854841b0ad4e228d787e3673. === M release/datafiles/splash.png === diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png index 4e9d58f2ac9..eb1250cf5a5 100644 Binary files a/release/datafiles/splash.png and b/release/datafiles/splash.png differ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1a154616126] master: Merge branch 'blender-v3.1-release'
Commit: 1a1546161268bc61f32720d93d8cd323733d9027 Author: Thomas Dinges Date: Fri Jan 28 11:34:31 2022 +0100 Branches: master https://developer.blender.org/rB1a1546161268bc61f32720d93d8cd323733d9027 Merge branch 'blender-v3.1-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3aa56608f76] blender-v3.1-release: 3.1 splashscreen
Commit: 3aa56608f76ced34854841b0ad4e228d787e3673 Author: Thomas Dinges Date: Fri Jan 28 11:32:12 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB3aa56608f76ced34854841b0ad4e228d787e3673 3.1 splashscreen Credit: Lorenzo Aiello - https://orencloud.artstation.com/ === M release/datafiles/splash.png === diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png index eb1250cf5a5..4e9d58f2ac9 100644 Binary files a/release/datafiles/splash.png and b/release/datafiles/splash.png differ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f4031f2be2b] master: Revert "Update pipeline config and point to 3.1 branches."
Commit: f4031f2be2b5c62e06a0bfe4bf49287e221de2ed Author: Thomas Dinges Date: Fri Jan 28 11:19:29 2022 +0100 Branches: master https://developer.blender.org/rBf4031f2be2b5c62e06a0bfe4bf49287e221de2ed Revert "Update pipeline config and point to 3.1 branches." This reverts commit 5d4583683b6d99f2561efa589076d67ee15662e0. === M build_files/config/pipeline_config.yaml === diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index 5f85d232dce..8222f2ff0b9 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -5,38 +5,38 @@ update-code: git: submodules: -- branch: blender-v3.1-release +- branch: master commit_id: HEAD path: release/scripts/addons -- branch: blender-v3.1-release +- branch: master commit_id: HEAD path: release/scripts/addons_contrib -- branch: blender-v3.1-release +- branch: master commit_id: HEAD path: release/datafiles/locale -- branch: blender-v3.1-release +- branch: master commit_id: HEAD path: source/tools svn: libraries: darwin-arm64: -branch: tags/blender-3.1-release +branch: trunk commit_id: HEAD path: lib/darwin_arm64 darwin-x86_64: -branch: tags/blender-3.1-release +branch: trunk commit_id: HEAD path: lib/darwin linux-x86_64: -branch: tags/blender-3.1-release +branch: trunk commit_id: HEAD path: lib/linux_centos7_x86_64 windows-amd64: -branch: tags/blender-3.1-release +branch: trunk commit_id: HEAD path: lib/win64_vc15 tests: -branch: tags/blender-3.1-release +branch: trunk commit_id: HEAD path: lib/tests benchmarks: ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [66e4fdab681] master: Revert "Blender 3.1 bcon3 (beta)"
Commit: 66e4fdab6818a4787bbb9ccb9ab9ee4b36b04ef6 Author: Thomas Dinges Date: Fri Jan 28 11:19:10 2022 +0100 Branches: master https://developer.blender.org/rB66e4fdab6818a4787bbb9ccb9ab9ee4b36b04ef6 Revert "Blender 3.1 bcon3 (beta)" This reverts commit d45098024ea5b533a406c2a2352b35e49a5e72af. === M source/blender/blenkernel/BKE_blender_version.h === diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 7ae7da9b4b7..091f9784697 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -35,7 +35,7 @@ extern "C" { /* Blender patch version for bugfix releases. */ #define BLENDER_VERSION_PATCH 0 /** Blender release cycle stage: alpha/beta/rc/release. */ -#define BLENDER_VERSION_CYCLE beta +#define BLENDER_VERSION_CYCLE alpha /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cfe18c3b949] master: Merge remote-tracking branch 'origin/blender-v3.1-release'
Commit: cfe18c3b949d019e2e77203265528e8a995b7517 Author: Dalai Felinto Date: Fri Jan 28 11:11:51 2022 +0100 Branches: master https://developer.blender.org/rBcfe18c3b949d019e2e77203265528e8a995b7517 Merge remote-tracking branch 'origin/blender-v3.1-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f756dc4812f] blender-v3.1-release: Blender 3.1 Beta- subversion bump
Commit: f756dc4812f3852bba54ee46c21288540f066672 Author: Dalai Felinto Date: Fri Jan 28 11:11:11 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rBf756dc4812f3852bba54ee46c21288540f066672 Blender 3.1 Beta- subversion bump === M source/blender/blenkernel/BKE_blender_version.h M source/blender/blenloader/intern/versioning_300.c === diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 573b4e33f8c..d1f31e0d2f5 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 5 +#define BLENDER_FILE_SUBVERSION 6 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 81fc6086951..90730439c51 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -782,19 +782,7 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - #blo_do_versions_300 in this file. - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { -/* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 301, 6)) { { /* Ensure driver variable names are unique within the driver. */ ID *id; FOREACH_MAIN_ID_BEGIN (bmain, id) { @@ -829,6 +817,20 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - #blo_do_versions_300 in this file. + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { +/* Keep this block, even when empty. */ + } } static void version_switch_node_input_prefix(Main *bmain) @@ -2485,18 +2487,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { -/* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 301, 6)) { /* Add node storage for map range node. */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -2557,4 +2548,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { +/* Keep this block, even when empty. */ + } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [5d4583683b6] blender-v3.1-release: Update pipeline config and point to 3.1 branches.
Commit: 5d4583683b6d99f2561efa589076d67ee15662e0 Author: Thomas Dinges Date: Fri Jan 28 11:01:11 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB5d4583683b6d99f2561efa589076d67ee15662e0 Update pipeline config and point to 3.1 branches. === M build_files/config/pipeline_config.yaml === diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index 8222f2ff0b9..5f85d232dce 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -5,38 +5,38 @@ update-code: git: submodules: -- branch: master +- branch: blender-v3.1-release commit_id: HEAD path: release/scripts/addons -- branch: master +- branch: blender-v3.1-release commit_id: HEAD path: release/scripts/addons_contrib -- branch: master +- branch: blender-v3.1-release commit_id: HEAD path: release/datafiles/locale -- branch: master +- branch: blender-v3.1-release commit_id: HEAD path: source/tools svn: libraries: darwin-arm64: -branch: trunk +branch: tags/blender-3.1-release commit_id: HEAD path: lib/darwin_arm64 darwin-x86_64: -branch: trunk +branch: tags/blender-3.1-release commit_id: HEAD path: lib/darwin linux-x86_64: -branch: trunk +branch: tags/blender-3.1-release commit_id: HEAD path: lib/linux_centos7_x86_64 windows-amd64: -branch: trunk +branch: tags/blender-3.1-release commit_id: HEAD path: lib/win64_vc15 tests: -branch: trunk +branch: tags/blender-3.1-release commit_id: HEAD path: lib/tests benchmarks: ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d45098024ea] blender-v3.1-release: Blender 3.1 bcon3 (beta)
Commit: d45098024ea5b533a406c2a2352b35e49a5e72af Author: Thomas Dinges Date: Fri Jan 28 10:52:39 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rBd45098024ea5b533a406c2a2352b35e49a5e72af Blender 3.1 bcon3 (beta) === M source/blender/blenkernel/BKE_blender_version.h === diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index d0ab8be9a29..573b4e33f8c 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -35,7 +35,7 @@ extern "C" { /* Blender patch version for bugfix releases. */ #define BLENDER_VERSION_PATCH 0 /** Blender release cycle stage: alpha/beta/rc/release. */ -#define BLENDER_VERSION_CYCLE alpha +#define BLENDER_VERSION_CYCLE beta /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c37b8372449] blender-v3.1-release: Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae.
Commit: c37b83724494c4a69db712a4d149a6b1ade61d51 Author: Bastien Montagne Date: Fri Jan 28 10:22:25 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rBc37b83724494c4a69db712a4d149a6b1ade61d51 Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae. In Outliner, 'Make Override Hierarchy' on an indirectly linked data would fail in case some items higher up in the hierarchy also needed to be overridden was also indirectly linked. === M source/blender/editors/space_outliner/outliner_tools.cc M source/blender/makesdna/DNA_ID.h === diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index fa31025b550..03fc4c20fe5 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -859,8 +859,9 @@ static void id_override_library_create_fn(bContext *C, if (!ID_IS_LINKED(te->store_elem->id)) { break; } -/* If we'd need to override that aren't ID, but it is not overridable, abort. */ -if (!ID_IS_OVERRIDABLE_LIBRARY(te->store_elem->id)) { +/* If some element in the tree needs to be overridden, but its ID is not overridable, + * abort. */ +if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(te->store_elem->id)) { BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); BKE_reportf(reports, RPT_WARNING, diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 060b55ffe5c..fad24f4326c 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -534,12 +534,14 @@ typedef struct PreviewImage { #define ID_IS_LINKED(_id) (((const ID *)(_id))->lib != NULL) -/* Note that this is a fairly high-level check, should be used at user interaction level, not in +/* Note that these are fairly high-level checks, should be used at user interaction level, not in * BKE_library_override typically (especially due to the check on LIB_TAG_EXTERN). */ -#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ - (ID_IS_LINKED(_id) && !ID_MISSING(_id) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0 && \ +#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(_id) \ + (ID_IS_LINKED(_id) && !ID_MISSING(_id) && \ (BKE_idtype_get_info_from_id((const ID *)(_id))->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 0 && \ !ELEM(GS(((ID *)(_id))->name), ID_SCE)) +#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ + (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0) /* NOTE: The three checks below do not take into account whether given ID is linked or not (when * chaining overrides over several libraries). User must ensure the ID is not linked itself ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c0225aa5739] master: Blender 3.2 bcon1 - alpha
Commit: c0225aa5739a4147f592b9a43bb210530d433a95 Author: Thomas Dinges Date: Fri Jan 28 10:48:27 2022 +0100 Branches: master https://developer.blender.org/rBc0225aa5739a4147f592b9a43bb210530d433a95 Blender 3.2 bcon1 - alpha Bump the version number for the new release cycle. === M doc/doxygen/Doxyfile M source/blender/blenkernel/BKE_blender_version.h === diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index 89954d8a155..2f004491c89 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = Blender # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = V3.1 +PROJECT_NUMBER = V3.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index d0ab8be9a29..091f9784697 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -31,7 +31,7 @@ extern "C" { */ /* Blender major and minor version. */ -#define BLENDER_VERSION 301 +#define BLENDER_VERSION 302 /* Blender patch version for bugfix releases. */ #define BLENDER_VERSION_PATCH 0 /** Blender release cycle stage: alpha/beta/rc/release. */ @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 5 +#define BLENDER_FILE_SUBVERSION 0 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [49b9b0251b7] blender-v3.1-release: Draw: Remove unused shader.
Commit: 49b9b0251b77439b1ec6f6f1af92db131aca6d29 Author: Jeroen Bakker Date: Fri Jan 28 10:47:52 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB49b9b0251b77439b1ec6f6f1af92db131aca6d29 Draw: Remove unused shader. tile images aren't a special case anymore for the image engine. === M source/blender/draw/engines/image/image_drawing_mode.hh M source/blender/draw/engines/image/image_private.hh M source/blender/draw/engines/image/image_shader.cc M source/blender/draw/tests/shaders_test.cc === diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index 8762a02458f..8eb98b40492 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -90,7 +90,7 @@ template class ScreenSpaceDrawingMode : public AbstractD void add_shgroups(const IMAGE_InstanceData *instance_data) const { const ShaderParameters &sh_params = instance_data->sh_params; -GPUShader *shader = IMAGE_shader_image_get(false); +GPUShader *shader = IMAGE_shader_image_get(); DRWShadingGroup *shgrp = DRW_shgroup_create(shader, instance_data->passes.image_pass); DRW_shgroup_uniform_vec2_copy(shgrp, "farNearDistances", sh_params.far_near); diff --git a/source/blender/draw/engines/image/image_private.hh b/source/blender/draw/engines/image/image_private.hh index 05ed2881145..c8968ddf9c6 100644 --- a/source/blender/draw/engines/image/image_private.hh +++ b/source/blender/draw/engines/image/image_private.hh @@ -72,7 +72,7 @@ class AbstractDrawingMode { }; /* image_shader.c */ -GPUShader *IMAGE_shader_image_get(bool is_tiled_image); +GPUShader *IMAGE_shader_image_get(); void IMAGE_shader_library_ensure(); void IMAGE_shader_free(); diff --git a/source/blender/draw/engines/image/image_shader.cc b/source/blender/draw/engines/image/image_shader.cc index 1c6abf36505..77cbaeec5a4 100644 --- a/source/blender/draw/engines/image/image_shader.cc +++ b/source/blender/draw/engines/image/image_shader.cc @@ -41,13 +41,13 @@ extern char datatoc_engine_image_vert_glsl[]; namespace blender::draw::image_engine { struct IMAGE_Shaders { - GPUShader *image_sh[2]; + GPUShader *image_sh; }; static struct { IMAGE_Shaders shaders; DRWShaderLibrary *lib; -} e_data = {{{nullptr}}}; /* Engine data */ +} e_data = {{nullptr}}; /* Engine data */ void IMAGE_shader_library_ensure() { @@ -60,19 +60,17 @@ void IMAGE_shader_library_ensure() } } -GPUShader *IMAGE_shader_image_get(bool is_tiled_image) +GPUShader *IMAGE_shader_image_get() { - const int index = is_tiled_image ? 1 : 0; IMAGE_Shaders *sh_data = &e_data.shaders; - if (sh_data->image_sh[index] == nullptr) { -sh_data->image_sh[index] = DRW_shader_create_with_shaderlib( -datatoc_engine_image_vert_glsl, -nullptr, -datatoc_engine_image_frag_glsl, -e_data.lib, -is_tiled_image ? "#define TILED_IMAGE\n" : nullptr); + if (sh_data->image_sh == nullptr) { +sh_data->image_sh = DRW_shader_create_with_shaderlib(datatoc_engine_image_vert_glsl, + nullptr, + datatoc_engine_image_frag_glsl, + e_data.lib, + nullptr); } - return sh_data->image_sh[index]; + return sh_data->image_sh; } void IMAGE_shader_free() diff --git a/source/blender/draw/tests/shaders_test.cc b/source/blender/draw/tests/shaders_test.cc index 6f4dc226c84..b97298cbe95 100644 --- a/source/blender/draw/tests/shaders_test.cc +++ b/source/blender/draw/tests/shaders_test.cc @@ -185,8 +185,7 @@ static void test_image_glsl_shaders() { IMAGE_shader_library_ensure(); - EXPECT_NE(IMAGE_shader_image_get(false), nullptr); - EXPECT_NE(IMAGE_shader_image_get(true), nullptr); + EXPECT_NE(IMAGE_shader_image_get(), nullptr); IMAGE_shader_free(); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: bf-blender [62817] tags/blender-v3.1-release/lib/: Copy libs to Blender 3.1 branch
Revision: 62817 https://developer.blender.org/rBL62817 Author: dingto Date: 2022-01-28 10:32:00 +0100 (Fri, 28 Jan 2022) Log Message: --- Copy libs to Blender 3.1 branch Added Paths: --- tags/blender-v3.1-release/lib/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: bf-blender [62816] tags/blender-v3.1-release/: Blender 3.1 branch for libs
Revision: 62816 https://developer.blender.org/rBL62816 Author: dingto Date: 2022-01-28 10:30:35 +0100 (Fri, 28 Jan 2022) Log Message: --- Blender 3.1 branch for libs Added Paths: --- tags/blender-v3.1-release/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [78647fbcc01] master: Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae.
Commit: 78647fbcc01cc53a8aa2e812cb6599b2bb1039de Author: Bastien Montagne Date: Fri Jan 28 10:22:25 2022 +0100 Branches: master https://developer.blender.org/rB78647fbcc01cc53a8aa2e812cb6599b2bb1039de Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae. In Outliner, 'Make Override Hierarchy' on an indirectly linked data would fail in case some items higher up in the hierarchy also needed to be overridden was also indirectly linked. === M source/blender/editors/space_outliner/outliner_tools.cc M source/blender/makesdna/DNA_ID.h === diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index fa31025b550..03fc4c20fe5 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -859,8 +859,9 @@ static void id_override_library_create_fn(bContext *C, if (!ID_IS_LINKED(te->store_elem->id)) { break; } -/* If we'd need to override that aren't ID, but it is not overridable, abort. */ -if (!ID_IS_OVERRIDABLE_LIBRARY(te->store_elem->id)) { +/* If some element in the tree needs to be overridden, but its ID is not overridable, + * abort. */ +if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(te->store_elem->id)) { BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); BKE_reportf(reports, RPT_WARNING, diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 060b55ffe5c..fad24f4326c 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -534,12 +534,14 @@ typedef struct PreviewImage { #define ID_IS_LINKED(_id) (((const ID *)(_id))->lib != NULL) -/* Note that this is a fairly high-level check, should be used at user interaction level, not in +/* Note that these are fairly high-level checks, should be used at user interaction level, not in * BKE_library_override typically (especially due to the check on LIB_TAG_EXTERN). */ -#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ - (ID_IS_LINKED(_id) && !ID_MISSING(_id) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0 && \ +#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(_id) \ + (ID_IS_LINKED(_id) && !ID_MISSING(_id) && \ (BKE_idtype_get_info_from_id((const ID *)(_id))->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 0 && \ !ELEM(GS(((ID *)(_id))->name), ID_SCE)) +#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ + (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0) /* NOTE: The three checks below do not take into account whether given ID is linked or not (when * chaining overrides over several libraries). User must ensure the ID is not linked itself ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e1be275878b] master: Fix typo in comment.
Commit: e1be275878b949b4e09ef6f3a1f44379a4359a5c Author: Jeroen Bakker Date: Fri Jan 28 09:24:11 2022 +0100 Branches: master https://developer.blender.org/rBe1be275878b949b4e09ef6f3a1f44379a4359a5c Fix typo in comment. === M source/blender/editors/space_node/space_node.cc === diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc index 00fd328b2ed..4d0c88a5343 100644 --- a/source/blender/editors/space_node/space_node.cc +++ b/source/blender/editors/space_node/space_node.cc @@ -977,7 +977,7 @@ static void node_id_remap(ScrArea *UNUSED(area), * copies of pointers. All usages should be calling a function that will receive the appropriate * instance. * - * We could also move a remap address at a time to ise the IDRemapper as that should get closer + * We could also move a remap address at a time to use the IDRemapper as that should get closer * to cleaner code. See {D13615} for more information about this topic. */ BKE_id_remapper_iter(mappings, node_id_remap_cb, slink); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs