[Bf-blender-cvs] [c88597a7c59] temp-sculpt-brush-channel: Merge branch 'master' into temp-sculpt-brush-channel
Commit: c88597a7c595ee30b64f172b0df94f9a28e7c838 Author: Joseph Eagar Date: Sun Nov 13 19:24:44 2022 -0800 Branches: temp-sculpt-brush-channel https://developer.blender.org/rBc88597a7c595ee30b64f172b0df94f9a28e7c838 Merge branch 'master' into temp-sculpt-brush-channel === === diff --cc source/blender/editors/sculpt_paint/curves_sculpt_ops.cc index 7986a58a85c,d6c4d43d5fc..8c22d50b542 --- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc @@@ -76,14 -76,12 +76,14 @@@ namespace blender::ed::sculpt_paint using blender::bke::CurvesGeometry; /* */ - /** \name * SCULPT_CURVES_OT_brush_stroke + /** \name Brush Stroke Operator * \{ */ -float brush_radius_factor(const Brush &brush, const StrokeExtension &stroke_extension) +float brush_radius_factor(const Scene &scene, + const Brush &brush, + const StrokeExtension &stroke_extension) { - if (BKE_brush_use_size_pressure(&brush)) { + if (BKE_brush_use_size_pressure(&scene, &brush)) { return stroke_extension.pressure; } return 1.0f; ___ 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] [5fe146e505d] master: Cleanup: Move mesh_remap.c to C++
Commit: 5fe146e505d4a52287e4960aefaf801e5dae3029 Author: Hans Goudey Date: Sun Nov 13 20:26:00 2022 -0600 Branches: master https://developer.blender.org/rB5fe146e505d4a52287e4960aefaf801e5dae3029 Cleanup: Move mesh_remap.c to C++ To facilitate further mesh data structure refactoring. === M source/blender/blenkernel/CMakeLists.txt R093source/blender/blenkernel/intern/mesh_remap.c source/blender/blenkernel/intern/mesh_remap.cc === diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index d85c7791df6..6b8160aaeda 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -209,7 +209,7 @@ set(SRC intern/mesh_merge_customdata.cc intern/mesh_mirror.c intern/mesh_normals.cc - intern/mesh_remap.c + intern/mesh_remap.cc intern/mesh_remesh_voxel.cc intern/mesh_runtime.cc intern/mesh_sample.cc diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.cc similarity index 93% rename from source/blender/blenkernel/intern/mesh_remap.c rename to source/blender/blenkernel/intern/mesh_remap.cc index d96cd54e198..e9f032a40f8 100644 --- a/source/blender/blenkernel/intern/mesh_remap.c +++ b/source/blender/blenkernel/intern/mesh_remap.cc @@ -6,7 +6,7 @@ * Functions for mapping data between meshes. */ -#include +#include #include "CLG_log.h" @@ -15,7 +15,7 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "BLI_alloca.h" +#include "BLI_array.hh" #include "BLI_astar.h" #include "BLI_bitmap.h" #include "BLI_math.h" @@ -143,7 +143,7 @@ float BKE_mesh_remap_calc_difference_from_mesh(const SpaceTransform *space_trans } } - result = ((float)numverts_dst / result) - 1.0f; + result = (float(numverts_dst) / result) - 1.0f; #if 0 printf("%s: Computed difference between meshes (the lower the better): %f\n", __func__, result); @@ -180,7 +180,7 @@ static void mesh_calc_eigen_matrix(const MVert *verts, const MVert *mv; float(*co)[3]; -cos = MEM_mallocN(sizeof(*cos) * (size_t)numverts, __func__); +cos = static_cast(MEM_mallocN(sizeof(*cos) * (size_t)numverts, __func__)); for (i = 0, co = cos, mv = verts; i < numverts; i++, co++, mv++) { copy_v3_v3(*co, mv->co); } @@ -188,7 +188,7 @@ static void mesh_calc_eigen_matrix(const MVert *verts, * doesn't handle casting correct we use workaround to avoid explicit * cast here. */ -vcos = (void *)cos; +vcos = static_cast((void *)cos); } unit_m4(r_mat); @@ -304,10 +304,10 @@ void BKE_mesh_remap_find_best_match_from_mesh(const MVert *verts_dst, /** \name Mesh to Mesh Mapping * \{ */ -void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(const int UNUSED(vert_mode), -const int UNUSED(edge_mode), +void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(const int /*vert_mode*/, +const int /*edge_mode*/, const int loop_mode, -const int UNUSED(poly_mode), +const int /*poly_mode*/, CustomData_MeshMasks *r_cddata_mask) { /* vert, edge and poly mapping modes never need extra cddata from source object. */ @@ -324,7 +324,8 @@ void BKE_mesh_remap_init(MeshPairRemap *map, const int items_num) BKE_mesh_remap_free(map); - map->items = BLI_memarena_alloc(mem, sizeof(*map->items) * (size_t)items_num); + map->items = static_cast( + BLI_memarena_alloc(mem, sizeof(*map->items) * (size_t)items_num)); map->items_num = items_num; map->mem = mem; @@ -343,7 +344,7 @@ void BKE_mesh_remap_free(MeshPairRemap *map) static void mesh_remap_item_define(MeshPairRemap *map, const int index, - const float UNUSED(hit_dist), + const float /*hit_dist*/, const int island, const int sources_num, const int *indices_src, @@ -354,11 +355,11 @@ static void mesh_remap_item_define(MeshPairRemap *map, if (sources_num) { mapit->sources_num = sources_num; -mapit->indices_src = BLI_memarena_alloc(mem, -sizeof(*mapit->indices_src) * (size_t)sources_num); +mapit->indices_src = static_cast( +BLI_memarena_alloc(mem, sizeof(*mapit->indices_src) * (size_t)sources_num)); memcpy(mapit->indices_src, indices_src, sizeof(*mapit->indices_s
[Bf-blender-cvs] [0190b104c85] blender-v3.4-release: GHOST/Wayland: fix building when GHOST_OPENGL_ALPHA is defined
Commit: 0190b104c85c0c9fb4ba5c674e4dc51c07336a46 Author: Campbell Barton Date: Mon Nov 14 12:01:26 2022 +1100 Branches: blender-v3.4-release https://developer.blender.org/rB0190b104c85c0c9fb4ba5c674e4dc51c07336a46 GHOST/Wayland: fix building when GHOST_OPENGL_ALPHA is defined === M intern/ghost/intern/GHOST_WindowWayland.cpp === diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp index ef53f6a02e6..7e9697d6a69 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cpp +++ b/intern/ghost/intern/GHOST_WindowWayland.cpp @@ -953,9 +953,9 @@ void GHOST_WindowWayland::setOpaque() const struct wl_region *region; /* Make the window opaque. */ - region = wl_compositor_create_region(system_->compositor()); + region = wl_compositor_create_region(system_->wl_compositor()); wl_region_add(region, 0, 0, UNPACK2(window_->size)); - wl_surface_set_opaque_region(window_->surface, region); + wl_surface_set_opaque_region(window_->wl_surface, region); wl_region_destroy(region); } #endif ___ 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] [909f47e0e19] master: UV: fix crash with uv copy on empty selection
Commit: 909f47e0e19799df34d7bdf2a81867f2ea7f2cdc Author: Chris Blackbourn Date: Mon Nov 14 13:35:43 2022 +1300 Branches: master https://developer.blender.org/rB909f47e0e19799df34d7bdf2a81867f2ea7f2cdc UV: fix crash with uv copy on empty selection Introduced in 721fc9c1c950 === M source/blender/editors/uvedit/uvedit_clipboard.cc === diff --git a/source/blender/editors/uvedit/uvedit_clipboard.cc b/source/blender/editors/uvedit/uvedit_clipboard.cc index d7222f04ba8..7ededf516bc 100644 --- a/source/blender/editors/uvedit/uvedit_clipboard.cc +++ b/source/blender/editors/uvedit/uvedit_clipboard.cc @@ -281,9 +281,10 @@ static int uv_copy_exec(bContext *C, wmOperator * /*op*/) const bool use_seams = false; UvElementMap *element_map = BM_uv_element_map_create( em->bm, scene, true, false, use_seams, true); - -const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); -uv_clipboard->append(element_map, cd_loop_uv_offset); +if (element_map) { + const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); + uv_clipboard->append(element_map, cd_loop_uv_offset); +} BM_uv_element_map_free(element_map); } @@ -317,6 +318,10 @@ static int uv_paste_exec(bContext *C, wmOperator * /*op*/) UvElementMap *dest_element_map = BM_uv_element_map_create( em->bm, scene, true, false, use_seams, true); +if (!dest_element_map) { + continue; +} + for (int i = 0; i < dest_element_map->total_islands; i++) { blender::Vector label; const bool found = uv_clipboard->find_isomorphism( ___ 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] [b8d1022dffe] master: Merge branch 'blender-v3.4-release'
Commit: b8d1022dffea6e536c85e56a985b2ba10a4f9273 Author: Campbell Barton Date: Mon Nov 14 10:37:57 2022 +1100 Branches: master https://developer.blender.org/rBb8d1022dffea6e536c85e56a985b2ba10a4f9273 Merge branch 'blender-v3.4-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] [e0cb3e0a393] master: Merge branch 'blender-v3.4-release'
Commit: e0cb3e0a393546284db18a5ebab00abbccc54467 Author: Campbell Barton Date: Mon Nov 14 10:38:01 2022 +1100 Branches: master https://developer.blender.org/rBe0cb3e0a393546284db18a5ebab00abbccc54467 Merge branch 'blender-v3.4-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] [fe6114aaf5e] blender-v3.4-release: GHOST/Wayland: remove display listener (was warning on startup)
Commit: fe6114aaf5ef8e33a2d33c96795d9444f35f4c62 Author: Campbell Barton Date: Mon Nov 14 10:12:34 2022 +1100 Branches: blender-v3.4-release https://developer.blender.org/rBfe6114aaf5ef8e33a2d33c96795d9444f35f4c62 GHOST/Wayland: remove display listener (was warning on startup) This already has a default listener which uses waylands logging. === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index ed0dc9b5949..123534502fb 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -5083,42 +5083,6 @@ static const struct wl_registry_listener registry_listener = { /** \} */ -/* */ -/** \name Listener (Display), #wl_display_listener - * \{ */ - -static CLG_LogRef LOG_WL_DISPLAY = {"ghost.wl.handle.display"}; -#define LOG (&LOG_WL_DISPLAY) - -static void display_handle_error( -void *data, struct wl_display *wl_display, void *object_id, uint32_t code, const char *message) -{ - GWL_Display *display = static_cast(data); - GHOST_ASSERT(display->wl_display == wl_display, "Invalid internal state"); - (void)display; - - /* NOTE: code is #wl_display_error, there isn't a convenient way to convert to an ID. */ - CLOG_INFO(LOG, 2, "error (code=%u, object_id=%p, message=%s)", code, object_id, message); -} - -static void display_handle_delete_id(void *data, struct wl_display *wl_display, uint32_t id) -{ - GWL_Display *display = static_cast(data); - GHOST_ASSERT(display->wl_display == wl_display, "Invalid internal state"); - (void)display; - - CLOG_INFO(LOG, 2, "delete_id (id=%u)", id); -} - -static const struct wl_display_listener display_listener = { -display_handle_error, -display_handle_delete_id, -}; - -#undef LOG - -/** \} */ - /* */ /** \name GHOST Implementation * @@ -5141,8 +5105,6 @@ GHOST_SystemWayland::GHOST_SystemWayland(bool background) /* This may be removed later if decorations are required, needed as part of registration. */ display_->xdg_decor = new GWL_XDG_Decor_System; - wl_display_add_listener(display_->wl_display, &display_listener, display_); - /* Register interfaces. */ { display_->registry_skip_update_all = 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] [d7971972fa9] blender-v3.4-release: GHOST/Wayland: call exit() when Wayland has a fatal error
Commit: d7971972fa9b43d7bff5477ced8bae3cc383387e Author: Campbell Barton Date: Mon Nov 14 10:28:23 2022 +1100 Branches: blender-v3.4-release https://developer.blender.org/rBd7971972fa9b43d7bff5477ced8bae3cc383387e GHOST/Wayland: call exit() when Wayland has a fatal error Without this, a fatal error simply floods the stderr with the same message without exiting. Also add note on why reconnecting to the display server isn't practical. === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 123534502fb..3e45eb5904b 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -66,6 +66,7 @@ #include #include +#include /* For `exit`. */ #include #include @@ -1171,6 +1172,19 @@ static void ghost_wl_display_report_error(struct wl_display *display) else { fprintf(stderr, "The Wayland connection experienced a fatal error: %s\n", strerror(ecode)); } + + /* NOTE(@campbellbarton): The application is running, + * however an error closes all windows and most importantly: + * shuts down the GPU context (loosing all GPU state - shaders, bind codes etc), + * so recovering from this effectively involves restarting. + * + * Keeping the GPU state alive doesn't seem to be supported as windows EGL context must use the + * same connection as the used for all other WAYLAND interactions (see #wl_display_connect). + * So in practice re-connecting to the display server isn't an option. + * + * Exit since leaving the process open will simply flood the output and do nothing. + * Although as the process is in a valid state, auto-save for e.g. is possible, see: T100855. */ + ::exit(-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] [f8ed657481d] refactor-mesh-uv-map-generic: Cleanup: fix comment typo.
Commit: f8ed657481db7866cf23a6499bb1a146df2a7e4d Author: Martijn Versteegh Date: Sun Nov 13 23:38:50 2022 +0100 Branches: refactor-mesh-uv-map-generic https://developer.blender.org/rBf8ed657481db7866cf23a6499bb1a146df2a7e4d Cleanup: fix comment typo. === M source/blender/python/bmesh/bmesh_py_types_customdata.c === diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index a3fad5c9ccf..382fec4e188 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -461,7 +461,7 @@ static PyObject *bpy_bmlayercollection_verify(BPy_BMLayerCollection *self) if (index == -1) { BM_data_layer_add(self->bm, data, self->type); index = 0; -/* Because addingCustomData layers to a bmesh will invalidate any existing pointers +/* Because adding CustomData layers to a bmesh will invalidate any existing pointers * in Py objects we can't lazily add the associated bool layers. So add them all right * now. */ ___ 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] [a9e9ad53965] refactor-mesh-uv-map-generic: Use element index instead of layer index for creation of python MLoopUV.
Commit: a9e9ad539658d598c5b0c218deda7f29ec368444 Author: Martijn Versteegh Date: Sun Nov 13 23:37:24 2022 +0100 Branches: refactor-mesh-uv-map-generic https://developer.blender.org/rBa9e9ad539658d598c5b0c218deda7f29ec368444 Use element index instead of layer index for creation of python MLoopUV. === M source/blender/python/bmesh/bmesh_py_types_customdata.c === diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index f6e9a6864d8..a3fad5c9ccf 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -1147,7 +1147,7 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer) PyErr_SetString(PyExc_ValueError, "BMElem[layer]: layer is from another mesh"); return NULL; } - ret = BPy_BMLoopUV_CreatePyObject(py_ele->bm, py_layer->index); + ret = BPy_BMLoopUV_CreatePyObject(py_ele->bm, py_ele->ele->head.index); break; } case CD_PROP_BYTE_COLOR: { @@ -1254,7 +1254,7 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj ret = -1; } else { -ret = BPy_BMLoopUV_AssignPyObject(py_ele->bm, py_layer->index, py_value); +ret = BPy_BMLoopUV_AssignPyObject(py_ele->bm, py_ele->ele->head.index, py_value); } 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] SVN commit: bf-blender [63100] trunk/lib/tests/modeling/modifiers.blend: Making modifiers test pass, previous try didn't work
Revision: 63100 https://developer.blender.org/rBL63100 Author: howardt Date: 2022-11-13 23:18:08 +0100 (Sun, 13 Nov 2022) Log Message: --- Making modifiers test pass, previous try didn't work Modified Paths: -- trunk/lib/tests/modeling/modifiers.blend Modified: trunk/lib/tests/modeling/modifiers.blend === (Binary files 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] [3eb2bc2c3fd] master: Cleanup: Move lineart_cpu.c to C++
Commit: 3eb2bc2c3fd1170b0bfe8f96db3a285aff9759d2 Author: Hans Goudey Date: Sun Nov 13 14:16:15 2022 -0600 Branches: master https://developer.blender.org/rB3eb2bc2c3fd1170b0bfe8f96db3a285aff9759d2 Cleanup: Move lineart_cpu.c to C++ To enable further mesh data structure refactoring-- access to loose edges in particular. === M source/blender/gpencil_modifiers/CMakeLists.txt M source/blender/gpencil_modifiers/MOD_gpencil_lineart.h M source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h R091source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc M source/blender/gpencil_modifiers/intern/lineart/lineart_intern.h M source/blender/makesdna/DNA_object_types.h === diff --git a/source/blender/gpencil_modifiers/CMakeLists.txt b/source/blender/gpencil_modifiers/CMakeLists.txt index 8dbac602c06..8c85d977263 100644 --- a/source/blender/gpencil_modifiers/CMakeLists.txt +++ b/source/blender/gpencil_modifiers/CMakeLists.txt @@ -67,7 +67,7 @@ set(SRC # Lineart code intern/lineart/lineart_chain.c intern/lineart/lineart_cpp_bridge.cc - intern/lineart/lineart_cpu.c + intern/lineart/lineart_cpu.cc intern/lineart/lineart_ops.c intern/lineart/lineart_shadow.c intern/lineart/lineart_util.c diff --git a/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h b/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h index 713f070de77..0c284f8e540 100644 --- a/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h +++ b/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h @@ -10,6 +10,10 @@ /* Operator types should be in exposed header. */ +#ifdef __cplusplus +extern "C" { +#endif + void OBJECT_OT_lineart_bake_strokes(struct wmOperatorType *ot); void OBJECT_OT_lineart_bake_strokes_all(struct wmOperatorType *ot); void OBJECT_OT_lineart_clear(struct wmOperatorType *ot); @@ -20,3 +24,7 @@ void WM_operatortypes_lineart(void); struct LineartCache; void MOD_lineart_clear_cache(struct LineartCache **lc); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h index 22037d10a71..97a3a782131 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h +++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h @@ -14,6 +14,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct LineartStaticMemPoolNode { Link item; size_t size; @@ -74,6 +78,7 @@ typedef enum eLineArtElementNodeFlag { LRT_ELEMENT_NO_INTERSECTION = (1 << 2), LRT_ELEMENT_INTERSECTION_DATA = (1 << 3), } eLineArtElementNodeFlag; +ENUM_OPERATORS(eLineArtElementNodeFlag, LRT_ELEMENT_INTERSECTION_DATA); typedef struct LineartElementLinkNode { struct LineartElementLinkNode *next, *prev; @@ -929,3 +934,7 @@ void MOD_lineart_gpencil_generate(LineartCache *cache, float MOD_lineart_chain_compute_length(LineartEdgeChain *ec); void ED_operatortypes_lineart(void); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc similarity index 91% rename from source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c rename to source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc index 4b5c40c0e38..b4025454022 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc @@ -49,12 +49,12 @@ #include "lineart_intern.h" -typedef struct LineartIsecSingle { +struct LineartIsecSingle { double v1[3], v2[3]; LineartTriangle *tri1, *tri2; -} LineartIsecSingle; +}; -typedef struct LineartIsecThread { +struct LineartIsecThread { int thread_id; /* Scheduled work range. */ @@ -71,13 +71,13 @@ typedef struct LineartIsecThread { /* For individual thread reference. */ LineartData *ld; -} LineartIsecThread; +}; -typedef struct LineartIsecData { +struct LineartIsecData { LineartData *ld; LineartIsecThread *threads; int thread_count; -} LineartIsecData; +}; static void lineart_bounding_area_link_edge(LineartData *ld, LineartBoundingArea *root_ba, @@ -105,7 +105,7 @@ static void lineart_bounding_area_link_triangle(LineartData *ld, int recursive, int recursive_level, bool do_intersection, -struct LineartIsecThread *th); +LineartIsecThread *th); static void lineart_free_bounding_area_memory(LineartBoundingArea *ba, bool r
[Bf-blender-cvs] [dc513a0af8c] master: Cleanup: Disable mesh normal debug time printing
Commit: dc513a0af8c0788b6079709bac4e642fa6a49d56 Author: Hans Goudey Date: Sun Nov 13 14:19:20 2022 -0600 Branches: master https://developer.blender.org/rBdc513a0af8c0788b6079709bac4e642fa6a49d56 Cleanup: Disable mesh normal debug time printing Left enabled mistakenly by d63ada602d37e5bf0f4f4c. === M source/blender/blenkernel/intern/mesh_normals.cc === diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc index 404357bda8d..7a767d983f4 100644 --- a/source/blender/blenkernel/intern/mesh_normals.cc +++ b/source/blender/blenkernel/intern/mesh_normals.cc @@ -43,7 +43,7 @@ using blender::MutableSpan; using blender::short2; using blender::Span; -#define DEBUG_TIME +// #define DEBUG_TIME #ifdef DEBUG_TIME # include "BLI_timeit.hh" ___ 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] [673c7065857] refactor-mesh-uv-map-generic: Always ensure bool layers for pyhton api.
Commit: 673c70658573a40899dac7a23454f9aa76d054aa Author: Martijn Versteegh Date: Sun Nov 13 21:23:06 2022 +0100 Branches: refactor-mesh-uv-map-generic https://developer.blender.org/rB673c70658573a40899dac7a23454f9aa76d054aa Always ensure bool layers for pyhton api. When verifying a uv layer from the pytho api, always ensure the associated bool layers. We can't lazily allocate them because allocating CustomData layers on a BMesh reallocates layers thereby invalidating existing python objects. === M source/blender/python/bmesh/bmesh_py_types_customdata.c === diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 10ae6a33435..f6e9a6864d8 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -465,13 +465,13 @@ static PyObject *bpy_bmlayercollection_verify(BPy_BMLayerCollection *self) * in Py objects we can't lazily add the associated bool layers. So add them all right * now. */ -if (self->type == CD_PROP_FLOAT2 && self->htype == BM_LOOP) { - const char *active_uv_name = CustomData_get_active_layer_name(&self->bm->ldata, + } + if (self->type == CD_PROP_FLOAT2 && self->htype == BM_LOOP) { +const char *active_uv_name = CustomData_get_active_layer_name(&self->bm->ldata, CD_PROP_FLOAT2); - BM_uv_map_ensure_vert_selection_attribute(self->bm, active_uv_name); - BM_uv_map_ensure_edge_selection_attribute(self->bm, active_uv_name); - BM_uv_map_ensure_pin_attribute(self->bm, active_uv_name); -} +BM_uv_map_ensure_vert_selection_attribute(self->bm, active_uv_name); +BM_uv_map_ensure_edge_selection_attribute(self->bm, active_uv_name); +BM_uv_map_ensure_pin_attribute(self->bm, active_uv_name); } BLI_assert(index >= 0); ___ 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] [fba7461e1a5] master: UV: fix compile on windows
Commit: fba7461e1a51643ea4762f2dc5d4811b49cedbef Author: Chris Blackbourn Date: Mon Nov 14 08:20:53 2022 +1300 Branches: master https://developer.blender.org/rBfba7461e1a51643ea4762f2dc5d4811b49cedbef UV: fix compile on windows Remove VLAs for compiling on windows. Regression from 721fc9c1c950 === M source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc === diff --git a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc index 43975d0d382..897361472a8 100644 --- a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc +++ b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc @@ -309,9 +309,11 @@ static void maximum_common_subgraph_internal( { int min = std::min(n0, n1); - uint8_t cur[min][2]; - uint8_t domains[min * min][BDS]; - uint8_t left[n0], right[n1]; + uint8_t(*cur)[2] = (uint8_t(*)[2])MEM_mallocN(min * sizeof(*cur), __func__); + uint8_t(*domains)[BDS] = (uint8_t(*)[8])MEM_mallocN(min * min * sizeof(*domains), __func__); + uint8_t *left = static_cast(MEM_mallocN(n0 * sizeof *left, __func__)); + uint8_t *right = static_cast(MEM_mallocN(n1 * sizeof *right, __func__)); + uint8_t v, w, *bd; int bd_pos = 0; for (int i = 0; i < n0; i++) { @@ -330,7 +332,8 @@ static void maximum_common_subgraph_internal( * Can occur with moderate sized inputs where the graph has lots of symmetry, e.g. a cube * subdivided 3x times. */ - return; + *inc_pos = 0; + break; } bd = &domains[bd_pos - 1][L]; if (calc_bound(domains, bd_pos, bd[P]) + bd[P] <= *inc_pos || @@ -354,6 +357,11 @@ static void maximum_common_subgraph_internal( } } } + + MEM_freeN(cur); + MEM_freeN(domains); + MEM_freeN(right); + MEM_freeN(left); } static bool check_automorphism(const GraphISO *g0, ___ 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 [63099] trunk/lib/tests/modeling/modifiers.blend: Update modifiers test to go with fix for loop slide spike
Revision: 63099 https://developer.blender.org/rBL63099 Author: howardt Date: 2022-11-13 20:19:33 +0100 (Sun, 13 Nov 2022) Log Message: --- Update modifiers test to go with fix for loop slide spike Modified Paths: -- trunk/lib/tests/modeling/modifiers.blend Modified: trunk/lib/tests/modeling/modifiers.blend === (Binary files 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] [d17f5bcd8f2] master: Fix T95335 Bevel operator Loop Slide overshoot.
Commit: d17f5bcd8f26d32b26bc945658e6d308316cd3fe Author: Howard Trickey Date: Sun Nov 13 14:09:27 2022 -0500 Branches: master https://developer.blender.org/rBd17f5bcd8f26d32b26bc945658e6d308316cd3fe Fix T95335 Bevel operator Loop Slide overshoot. If the edge you are going to slide along is very close to in line with the adjacent beveled edge, then there will be sharp overshoots. There is an epsilon comparison to just abandon loop slide if this situation is happening. That epsilon used to be 0.25 radians, but bug T86768 complained that that value was too high, so it was changed to .0001 radians (5 millidegrees). Now this current bug shows that that was too aggressively small, so this change ups it by a factor of 10, to .001 radians (5 centidegrees). All previous bug reports remained fixed. === M source/blender/bmesh/tools/bmesh_bevel.c === diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index c45f9dbe49c..fbc47505924 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -1502,8 +1502,11 @@ static void offset_meet(BevelParams *bp, } /* This was changed from 0.25f to fix bug T86768. - * Original bug T44961 remains fixed with this value. */ -#define BEVEL_GOOD_ANGLE 0.0001f + * Original bug T44961 remains fixed with this value. + * Update: changed again from 0.0001f to fix bug T95335. + * Original two bugs remained fixed. + */ +#define BEVEL_GOOD_ANGLE 0.001f /** * Calculate the meeting point between e1 and e2 (one of which should have zero offsets), ___ 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] [7419e291e8b] master: Merge branch 'blender-v3.4-release'
Commit: 7419e291e8b81b9dd562a05909bbf30cdd77077e Author: Pratik Borhade Date: Sun Nov 13 22:54:38 2022 +0530 Branches: master https://developer.blender.org/rB7419e291e8b81b9dd562a05909bbf30cdd77077e Merge branch 'blender-v3.4-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] [b927cc9ba6c] blender-v3.4-release: Fix T102187: Add knife tool in mesh panel
Commit: b927cc9ba6c7567066f26fd82c95b0059a8cff75 Author: Pratik Borhade Date: Sun Nov 13 22:48:24 2022 +0530 Branches: blender-v3.4-release https://developer.blender.org/rBb927cc9ba6c7567066f26fd82c95b0059a8cff75 Fix T102187: Add knife tool in mesh panel Add knife tool option in mesh panel Reviewer: campbellbarton, JulienKaspar Differential Revision: https://developer.blender.org/D16395 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 39684aaf161..d6492ea2d85 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3849,6 +3849,7 @@ class VIEW3D_MT_edit_mesh(Menu): layout.operator("mesh.bisect") layout.operator("mesh.knife_project") +layout.operator("mesh.knife_tool") if with_bullet: layout.operator("mesh.convex_hull") ___ 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] [d0f05ba9158] master: Cleanup: fix compiler error/warnings
Commit: d0f05ba9158ddc4549e56a554d76863f22b62725 Author: Jacques Lucke Date: Sun Nov 13 11:29:04 2022 +0100 Branches: master https://developer.blender.org/rBd0f05ba9158ddc4549e56a554d76863f22b62725 Cleanup: fix compiler error/warnings === M source/blender/editors/uvedit/uvedit_clipboard.cc M source/blender/editors/uvedit/uvedit_clipboard_graph_iso.hh === diff --git a/source/blender/editors/uvedit/uvedit_clipboard.cc b/source/blender/editors/uvedit/uvedit_clipboard.cc index 7e6d6a2e0d0..d7222f04ba8 100644 --- a/source/blender/editors/uvedit/uvedit_clipboard.cc +++ b/source/blender/editors/uvedit/uvedit_clipboard.cc @@ -114,7 +114,9 @@ static void add_iso_edge( /* Build an `iso_graph` representation of an island of a `UvElementMap`. */ -GraphISO *build_iso_graph(UvElementMap *element_map, const int island_index, int cd_loop_uv_offset) +static GraphISO *build_iso_graph(UvElementMap *element_map, + const int island_index, + int /*cd_loop_uv_offset*/) { GraphISO *g = new GraphISO(element_map->island_total_unique_uvs[island_index]); for (int i = 0; i < g->n; i++) { @@ -260,7 +262,7 @@ bool UV_ClipboardBuffer::find_isomorphism(UvElementMap *dest_element_map, return false; } -static int uv_copy_exec(bContext *C, wmOperator *op) +static int uv_copy_exec(bContext *C, wmOperator * /*op*/) { UV_clipboard_free(); uv_clipboard = new UV_ClipboardBuffer(); @@ -292,7 +294,7 @@ static int uv_copy_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int uv_paste_exec(bContext *C, wmOperator *op) +static int uv_paste_exec(bContext *C, wmOperator * /*op*/) { /* TODO: Restore `UvClipboard` from system clipboard. */ if (!uv_clipboard) { diff --git a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.hh b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.hh index adfe4de2367..80d246f0ce3 100644 --- a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.hh +++ b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.hh @@ -12,7 +12,7 @@ #pragma once -#include +#include "BLI_sys_types.h" /* A thin representation of a "Graph" in graph theory. */ class GraphISO { ___ 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