[Bf-blender-cvs] [e41cc8162a8] xr-controller-support: Merge branch 'master' into xr-controller-support
Commit: e41cc8162a8a69544323bc69dfb6b321a6a05ce5 Author: Peter Kim Date: Sun Aug 15 15:21:01 2021 +0900 Branches: xr-controller-support https://developer.blender.org/rBe41cc8162a8a69544323bc69dfb6b321a6a05ce5 Merge branch 'master' into xr-controller-support === === ___ 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] [1990bb921f2] xr-controller-support: XR: Support dynamic controller model components
Commit: 1990bb921f2cfbfbbfa9c56cbbeafb40b06f453e Author: Peter Kim Date: Sun Aug 15 15:18:34 2021 +0900 Branches: xr-controller-support https://developer.blender.org/rB1990bb921f2cfbfbbfa9c56cbbeafb40b06f453e XR: Support dynamic controller model components Updating the transforms, or "animating", supported controller model parts (trigger, grip, thumbstick, etc.) provides better visual feedback for the user and adds little overhead due to caching of node transforms/indices. === M intern/ghost/GHOST_C-api.h M intern/ghost/intern/GHOST_C-api.cpp M intern/ghost/intern/GHOST_XrControllerModel.cpp M intern/ghost/intern/GHOST_XrControllerModel.h M intern/ghost/intern/GHOST_XrSession.cpp M intern/ghost/intern/GHOST_XrSession.h M source/blender/windowmanager/xr/intern/wm_xr_session.c === diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index d3ef610a5ac..784febe8581 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -1151,6 +1151,12 @@ int GHOST_XrLoadControllerModel(GHOST_XrContextHandle xr_context, const char *su */ void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_context, const char *subaction_path); +/** + * Update component transforms for the OpenXR controller model. + */ +int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_context, +const char *subaction_path); + /** * Get vertex data for the OpenXR controller model. */ diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp index 08c0f38cdaa..a21c3a90c06 100644 --- a/intern/ghost/intern/GHOST_C-api.cpp +++ b/intern/ghost/intern/GHOST_C-api.cpp @@ -1085,6 +1085,15 @@ void GHOST_XrUnloadControllerModel(GHOST_XrContextHandle xr_contexthandle, GHOST_XR_CAPI_CALL(xr_session->unloadControllerModel(subaction_path), xr_context); } +int GHOST_XrUpdateControllerModelComponents(GHOST_XrContextHandle xr_contexthandle, +const char *subaction_path) +{ + GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle; + GHOST_XrSession *xr_session = xr_context->getSession(); + GHOST_XR_CAPI_CALL_RET(xr_session->updateControllerModelComponents(subaction_path), xr_context); + return 0; +} + int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_contexthandle, const char *subaction_path, GHOST_XrControllerModelData *r_data) diff --git a/intern/ghost/intern/GHOST_XrControllerModel.cpp b/intern/ghost/intern/GHOST_XrControllerModel.cpp index cd2637a4e77..fdd1c12af5b 100644 --- a/intern/ghost/intern/GHOST_XrControllerModel.cpp +++ b/intern/ghost/intern/GHOST_XrControllerModel.cpp @@ -35,6 +35,13 @@ #define STBIWDEF static inline #include "tiny_gltf.h" +struct GHOST_XrControllerModelNode { + int32_t parent_idx = -1; + int32_t component_idx = -1; + float local_transform[4][4]; + float world_transform[4][4]; +}; + /* */ /** \name glTF Utilities * @@ -224,7 +231,7 @@ static GHOST_XrPrimitive read_primitive(const tinygltf::Model &gltf_model, /* Calculate node transform in world space. */ static void calc_node_transform(const tinygltf::Node &gltf_node, const float parent_transform[4][4], -float r_transform[4][4]) +GHOST_XrControllerModelNode &node) { /* A node may specify either a 4x4 matrix or TRS (Translation - Rotation - Scale) values, but not * both. */ @@ -246,15 +253,14 @@ static void calc_node_transform(const tinygltf::Node &gltf_node, (float)dm[13], (float)dm[14], (float)dm[15]}; - -*(Eigen::Matrix4f *)r_transform = *(Eigen::Matrix4f *)parent_transform * *(Eigen::Matrix4f *)m; +memcpy(node.local_transform, m, sizeof(node.local_transform)); } else { /* No matrix is present, so construct a matrix from the TRS values (each one is optional). */ std::vector translation = gltf_node.translation; std::vector rotation = gltf_node.rotation; std::vector scale = gltf_node.scale; -Eigen::Matrix4f m; +Eigen::Matrix4f &m = *(Eigen::Matrix4f *)node.local_transform; Eigen::Quaternionf q; Eigen::Matrix3f scalemat; @@ -287,28 +293,45 @@ static void calc_node_transform(const tinygltf::Node &gltf_node, m.block<3, 3>(0, 0) = q.toRotationMatrix() * scalemat; m.block<3, 1>(0, 3) = Eigen::Vector3f( (float)translation[0], (float)translation[1], (float)translation[2]); - -*(Eigen::Matrix4f *)r_transform = *(Eigen::Matrix4f *)parent_transform * m; } + + *(Eigen::Matrix4f *)node.world_transform = *(E
[Bf-blender-cvs] [45904e2dd10] soc-2021-porting-modifiers-to-nodes-remesh-voxel: Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-remesh-voxel
Commit: 45904e2dd10c5994fbe8c04f5d4130996531ff21 Author: Fabian Schempp Date: Sat Aug 14 21:05:42 2021 +0200 Branches: soc-2021-porting-modifiers-to-nodes-remesh-voxel https://developer.blender.org/rB45904e2dd10c5994fbe8c04f5d4130996531ff21 Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-remesh-voxel # Conflicts: # source/blender/blenkernel/BKE_node.h === === diff --cc source/blender/blenkernel/BKE_node.h index 62edbe6e336,caa7ab6de0a..fce199e5b72 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@@ -1466,7 -1475,8 +1475,9 @@@ int ntreeTexExecTree(struct bNodeTree * #define GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL 1070 #define GEO_NODE_CURVE_TRIM 1071 #define GEO_NODE_CURVE_SET_HANDLES 1072 - #define GEO_NODE_REMESH_VOXEL 1073 + #define GEO_NODE_CURVE_SPLINE_TYPE 1073 + #define GEO_NODE_CURVE_SELECT_HANDLES 1074 ++#define GEO_NODE_REMESH_VOXEL 1075 /** \} */ diff --cc source/blender/nodes/NOD_geometry.h index af43e9872cb,856d787c8d0..739fe880e12 --- a/source/blender/nodes/NOD_geometry.h +++ b/source/blender/nodes/NOD_geometry.h @@@ -93,8 -94,8 +94,9 @@@ void register_node_type_geo_point_separ void register_node_type_geo_point_translate(void); void register_node_type_geo_points_to_volume(void); void register_node_type_geo_raycast(void); +void register_node_type_geo_remesh_voxel(void); void register_node_type_geo_sample_texture(void); + void register_node_type_geo_select_by_handle_type(void); void register_node_type_geo_select_by_material(void); void register_node_type_geo_separate_components(void); void register_node_type_geo_subdivision_surface(void); diff --cc source/blender/nodes/NOD_static_types.h index 0dc09dcfe4f,3852819746e..eb04f3e77ce --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@@ -334,10 -337,8 +337,9 @@@ DefNode(GeometryNode, GEO_NODE_POINTS_T DefNode(GeometryNode, GEO_NODE_RAYCAST, def_geo_raycast, "RAYCAST", Raycast, "Raycast", "") DefNode(GeometryNode, GEO_NODE_SELECT_BY_MATERIAL, 0, "SELECT_BY_MATERIAL", SelectByMaterial, "Select by Material", "") DefNode(GeometryNode, GEO_NODE_SEPARATE_COMPONENTS, 0, "SEPARATE_COMPONENTS", SeparateComponents, "Separate Components", "") - DefNode(GeometryNode, GEO_NODE_MESH_SUBDIVIDE, 0, "MESH_SUBDIVIDE", MeshSubdivide, "Mesh Subdivide", "") DefNode(GeometryNode, GEO_NODE_SUBDIVISION_SURFACE, 0, "SUBDIVISION_SURFACE", SubdivisionSurface, "Subdivision Surface", "") DefNode(GeometryNode, GEO_NODE_SWITCH, def_geo_switch, "SWITCH", Switch, "Switch", "") +DefNode(GeometryNode, GEO_NODE_REMESH_VOXEL, 0, "REMESH_VOXEL", Remesh, "Voxel Remesh", "") DefNode(GeometryNode, GEO_NODE_TRANSFORM, 0, "TRANSFORM", Transform, "Transform", "") DefNode(GeometryNode, GEO_NODE_TRIANGULATE, def_geo_triangulate, "TRIANGULATE", Triangulate, "Triangulate", "") DefNode(GeometryNode, GEO_NODE_VIEWER, 0, "VIEWER", Viewer, "Viewer", "") ___ 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] [fb8c0492324] soc-2021-porting-modifiers-to-nodes-remesh-voxel: Changes based on review by Hans Goudey (HooglyBoogly) and Jacques Lucke (JacquesLucke)
Commit: fb8c049232446eee68b5a54f299176c293dec7d1 Author: Fabian Schempp Date: Sun Aug 15 02:07:29 2021 +0200 Branches: soc-2021-porting-modifiers-to-nodes-remesh-voxel https://developer.blender.org/rBfb8c049232446eee68b5a54f299176c293dec7d1 Changes based on review by Hans Goudey (HooglyBoogly) and Jacques Lucke (JacquesLucke) === M release/scripts/startup/nodeitems_builtins.py M source/blender/nodes/NOD_static_types.h M source/blender/nodes/geometry/nodes/node_geo_remesh_voxel.cc === diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py index 8bbb16849d7..ad16526f887 100644 --- a/release/scripts/startup/nodeitems_builtins.py +++ b/release/scripts/startup/nodeitems_builtins.py @@ -553,7 +553,7 @@ geometry_node_categories = [ NodeItem("GeometryNodeEdgeSplit"), NodeItem("GeometryNodeSubdivisionSurface"), NodeItem("GeometryNodeMeshSubdivide"), -NodeItem("GeometryNodeRemesh"), +NodeItem("GeometryNodeRemeshVoxel"), ]), GeometryNodeCategory("GEO_PRIMITIVES_MESH", "Mesh Primitives", items=[ NodeItem("GeometryNodeMeshCircle"), diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index eb04f3e77ce..2656a87d9dd 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -339,7 +339,7 @@ DefNode(GeometryNode, GEO_NODE_SELECT_BY_MATERIAL, 0, "SELECT_BY_MATERIAL", Sele DefNode(GeometryNode, GEO_NODE_SEPARATE_COMPONENTS, 0, "SEPARATE_COMPONENTS", SeparateComponents, "Separate Components", "") DefNode(GeometryNode, GEO_NODE_SUBDIVISION_SURFACE, 0, "SUBDIVISION_SURFACE", SubdivisionSurface, "Subdivision Surface", "") DefNode(GeometryNode, GEO_NODE_SWITCH, def_geo_switch, "SWITCH", Switch, "Switch", "") -DefNode(GeometryNode, GEO_NODE_REMESH_VOXEL, 0, "REMESH_VOXEL", Remesh, "Voxel Remesh", "") +DefNode(GeometryNode, GEO_NODE_REMESH_VOXEL, 0, "REMESH_VOXEL", RemeshVoxel, "Voxel Remesh", "") DefNode(GeometryNode, GEO_NODE_TRANSFORM, 0, "TRANSFORM", Transform, "Transform", "") DefNode(GeometryNode, GEO_NODE_TRIANGULATE, def_geo_triangulate, "TRIANGULATE", Triangulate, "Triangulate", "") DefNode(GeometryNode, GEO_NODE_VIEWER, 0, "VIEWER", Viewer, "Viewer", "") diff --git a/source/blender/nodes/geometry/nodes/node_geo_remesh_voxel.cc b/source/blender/nodes/geometry/nodes/node_geo_remesh_voxel.cc index dd02cb59335..a9f5719d5f6 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_remesh_voxel.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_remesh_voxel.cc @@ -40,12 +40,9 @@ static void geo_node_remesh_voxel_exec(GeoNodeExecParams params) const float adaptivity = params.extract_input("Adaptivity"); if (geometry_set.has_mesh()) { -/* Unfortunately input_mesh can't be const because - * BKE_mesh_remesh_voxel_to_mesh_nomain expects a non-const mesh */ -Mesh *input_mesh = geometry_set.get_mesh_for_write(); +const Mesh *input_mesh = geometry_set.get_mesh_for_read(); -Mesh *output_mesh = BKE_mesh_remesh_voxel_to_mesh_nomain( -input_mesh, voxel_size, adaptivity, 0.0f); +Mesh *output_mesh = BKE_mesh_remesh_voxel(input_mesh, voxel_size, adaptivity, 0.0f); geometry_set.replace_mesh(output_mesh); } params.set_output("Geometry", std::move(geometry_set)); ___ 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] [d5261e973b5] master: BLF: Do Not Preload Glyph Cache
Commit: d5261e973b5624b40b80771903e9d2a0c9ff37e4 Author: Harley Acheson Date: Sat Aug 14 13:50:51 2021 -0700 Branches: master https://developer.blender.org/rBd5261e973b5624b40b80771903e9d2a0c9ff37e4 BLF: Do Not Preload Glyph Cache This patch turns off the preloading of ascii glyphs and instead caches each glyph the first time it is actually used. See D12215 for much more detail. Differential Revision: https://developer.blender.org/D12215 Reviewed by Campbell Barton === M source/blender/blenfont/intern/blf_font.c M source/blender/blenfont/intern/blf_internal_types.h === diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 0dfb2e843c9..28039ff11ac 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -308,29 +308,6 @@ void blf_font_size(FontBLF *font, unsigned int size, unsigned int dpi) blf_glyph_cache_release(font); } -static GlyphBLF **blf_font_ensure_ascii_table(FontBLF *font, GlyphCacheBLF *gc) -{ - GlyphBLF **glyph_ascii_table; - - glyph_ascii_table = gc->glyph_ascii_table; - - /* build ascii on demand */ - if (glyph_ascii_table['0'] == NULL) { -GlyphBLF *g; -/* Skip control characters and just cache rendered glyphs for visible ASCII range. */ -for (uint i = GLYPH_ASCII_CACHE_MIN; i <= GLYPH_ASCII_CACHE_MAX; i++) { - g = blf_glyph_search(gc, i); - if (!g) { -FT_UInt glyph_index = FT_Get_Char_Index(font->face, i); -g = blf_glyph_add(font, gc, glyph_index, i); - } - glyph_ascii_table[i] = g; -} - } - - return glyph_ascii_table; -} - static void blf_font_ensure_ascii_kerning(FontBLF *font, GlyphCacheBLF *gc, const FT_UInt kern_mode) @@ -352,11 +329,12 @@ static void blf_font_ensure_ascii_kerning(FontBLF *font, * characters. */ -/* NOTE: `blf_font_ensure_ascii_table(font, gc);` must be called before this macro. */ - -#define BLF_UTF8_NEXT_FAST(_font, _gc, _g, _str, _i, _c, _glyph_ascii_table) \ +#define BLF_UTF8_NEXT_FAST(_font, _gc, _g, _str, _i, _c) \ if (((_c) = (_str)[_i]) < GLYPH_ASCII_TABLE_SIZE) { \ -_g = (_glyph_ascii_table)[_c]; \ +if ((_g = (_gc->glyph_ascii_table)[_c]) == NULL) { \ + _g = blf_glyph_add(_font, _gc, FT_Get_Char_Index((_font)->face, _c), _c); \ + _gc->glyph_ascii_table[_c] = _g; \ +} \ _i++; \ } \ else if ((_c = BLI_str_utf8_as_unicode_step(_str, &(_i))) != BLI_UTF8_ERR) { \ @@ -420,8 +398,6 @@ static void blf_font_draw_ex(FontBLF *font, return; } - GlyphBLF **glyph_ascii_table = blf_font_ensure_ascii_table(font, gc); - BLF_KERNING_VARS(font, has_kerning, kern_mode); blf_font_ensure_ascii_kerning(font, gc, kern_mode); @@ -429,7 +405,7 @@ static void blf_font_draw_ex(FontBLF *font, blf_batch_draw_begin(font); while ((i < len) && str[i]) { -BLF_UTF8_NEXT_FAST(font, gc, g, str, i, c, glyph_ascii_table); +BLF_UTF8_NEXT_FAST(font, gc, g, str, i, c); if (UNLIKELY(c == BLI_UTF8_ERR)) { break; @@ -472,7 +448,6 @@ static void blf_font_draw_ascii_ex( int pen_x = 0; GlyphCacheBLF *gc = blf_glyph_cache_acquire(font); - GlyphBLF **glyph_ascii_table = blf_font_ensure_ascii_table(font, gc); BLF_KERNING_VARS(font, has_kerning, kern_mode); @@ -482,8 +457,11 @@ static void blf_font_draw_ascii_ex( while ((c = *(str++)) && len--) { BLI_assert(c < GLYPH_ASCII_TABLE_SIZE); -if ((g = glyph_ascii_table[c]) == NULL) { - continue; +if ((g = gc->glyph_ascii_table[c]) == NULL) { + g = blf_glyph_add(font, gc, FT_Get_Char_Index((font)->face, c), c); + if ((gc->glyph_ascii_table[c] = g) == NULL) { +continue; + } } if (has_kerning) { BLF_KERNING_STEP_FAST(font, kern_mode, g_prev, g, c_prev, c, pen_x); @@ -522,12 +500,11 @@ int blf_font_draw_mono(FontBLF *font, const char *str, size_t len, int cwidth) size_t i = 0; GlyphCacheBLF *gc = blf_glyph_cache_acquire(font); - GlyphBLF **glyph_ascii_table = blf_font_ensure_ascii_table(font, gc); blf_batch_draw_begin(font); while ((i < len) && str[i]) { -BLF_UTF8_NEXT_FAST(font, gc, g, str, i, c, glyph_ascii_table); +BLF_UTF8_NEXT_FAST(font, gc, g, str, i, c); if (UNLIKELY(c == BLI_UTF8_ERR)) { break; @@ -568,8 +545,6 @@ static void blf_font_draw_buffer_ex(FontBLF *font, int pen_y_basis = (int)font->pos[1] + pen_y; size_t i = 0; - GlyphBLF **glyph_ascii_table = blf_font_ensure_ascii_table(font, gc); - /* buffer specific vars */ FontBufInfoBLF *buf_info = &font->buf_info; const float *b_col_float = buf_info->col_float; @@ -584,7 +559,7 @@ static void blf_font_draw_buffer_ex(FontBLF *font, /* another buffer specific call for color conversion
[Bf-blender-cvs] [3e86bfbf936] wayland-no-x11: disable X11 for Wayland-only build
Commit: 3e86bfbf936d43d22fc31056459ae1df2cd723a7 Author: Christian Rauch Date: Sat Aug 14 21:40:06 2021 +0100 Branches: wayland-no-x11 https://developer.blender.org/rB3e86bfbf936d43d22fc31056459ae1df2cd723a7 disable X11 for Wayland-only build === M build_files/config/pipeline_config.yaml === diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index 611df59caec..bb33a3e6b2e 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -65,6 +65,8 @@ buildbot: darwin-x86_64: overrides: {} linux-x86_64: -overrides: {} +overrides: { +WITH_GHOST_X11: "OFF" +} windows-amd64: overrides: {} ___ 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] [ed1e4ab1bf3] wl_default: cmake: disable WITH_GHOST_WAYLAND if any Wayland dependency is missing
Commit: ed1e4ab1bf3ea4e817c8a81cdee350b9adf04986 Author: Christian Rauch Date: Fri Jul 30 22:03:12 2021 +0100 Branches: wl_default https://developer.blender.org/rBed1e4ab1bf3ea4e817c8a81cdee350b9adf04986 cmake: disable WITH_GHOST_WAYLAND if any Wayland dependency is missing This sets WITH_GHOST_WAYLAND to ON and auto-disables it again, if one of the required Wayland development libraries is missing. Differential Revision: D11489 === M CMakeLists.txt M build_files/cmake/platform/platform_unix.cmake M intern/ghost/CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index 201608a531a..ac5e977fba1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,7 +221,7 @@ if(UNIX AND NOT (APPLE OR HAIKU)) option(WITH_GHOST_X11 "Enable building Blender against X11 for windowing" ON) mark_as_advanced(WITH_GHOST_X11) - option(WITH_GHOST_WAYLAND "Enable building Blender against Wayland for windowing (under development)" OFF) + option(WITH_GHOST_WAYLAND "Enable building Blender against Wayland for windowing (under development)" ON) mark_as_advanced(WITH_GHOST_WAYLAND) endif() diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index ffdbbc3f8c5..038a9ba4dac 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -574,20 +574,55 @@ endif() if(WITH_GHOST_WAYLAND) find_package(PkgConfig) - pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12) - pkg_check_modules(wayland-egl REQUIRED wayland-egl) - pkg_check_modules(wayland-scanner REQUIRED wayland-scanner) - pkg_check_modules(xkbcommon REQUIRED xkbcommon) - pkg_check_modules(wayland-cursor REQUIRED wayland-cursor) - pkg_check_modules(dbus REQUIRED dbus-1) - - list(APPEND PLATFORM_LINKLIBS -${wayland-client_LINK_LIBRARIES} -${wayland-egl_LINK_LIBRARIES} -${xkbcommon_LINK_LIBRARIES} -${wayland-cursor_LINK_LIBRARIES} -${dbus_LINK_LIBRARIES} - ) + pkg_check_modules(wayland-client QUIET wayland-client>=1.12) + pkg_check_modules(wayland-egl QUIET wayland-egl) + pkg_check_modules(wayland-scanner QUIET wayland-scanner) + pkg_check_modules(wayland-cursor QUIET wayland-cursor) + pkg_check_modules(xkbcommon QUIET xkbcommon) + pkg_check_modules(dbus QUIET dbus-1) + pkg_check_modules(wayland-protocols QUIET wayland-protocols>=1.15) + + if (${wayland-protocols_FOUND}) +pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + else() +find_path(WAYLAND_PROTOCOLS_DIR + NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml + PATH_SUFFIXES share/wayland-protocols +) + endif() + + if(NOT wayland-client_FOUND) +message(STATUS "wayland-client not found, disabling WITH_GHOST_WAYLAND") +set(WITH_GHOST_WAYLAND OFF) + elseif(NOT wayland-egl_FOUND) +message(STATUS "wayland-egl not found, disabling WITH_GHOST_WAYLAND") +set(WITH_GHOST_WAYLAND OFF) + elseif(NOT wayland-scanner_FOUND) +message(STATUS "wayland-scanner not found, disabling WITH_GHOST_WAYLAND") +set(WITH_GHOST_WAYLAND OFF) + elseif(NOT wayland-cursor_FOUND) +message(STATUS "wayland-cursor not found, disabling WITH_GHOST_WAYLAND") +set(WITH_GHOST_WAYLAND OFF) + elseif(NOT xkbcommon_FOUND) +message(STATUS "xkbcommon not found, disabling WITH_GHOST_WAYLAND") +set(WITH_GHOST_WAYLAND OFF) + elseif(NOT dbus_FOUND) +message(STATUS "dbus not found, disabling WITH_GHOST_WAYLAND") +set(WITH_GHOST_WAYLAND OFF) + elseif(NOT EXISTS ${WAYLAND_PROTOCOLS_DIR}) +message(STATUS "wayland-protocols not found, disabling WITH_GHOST_WAYLAND") +set(WITH_GHOST_WAYLAND OFF) + endif() + + if(WITH_GHOST_WAYLAND) +list(APPEND PLATFORM_LINKLIBS + ${wayland-client_LINK_LIBRARIES} + ${wayland-egl_LINK_LIBRARIES} + ${xkbcommon_LINK_LIBRARIES} + ${wayland-cursor_LINK_LIBRARIES} + ${dbus_LINK_LIBRARIES} +) + endif() endif() if(WITH_GHOST_X11) diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 76cac1049fb..83686fe9cc0 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -306,20 +306,6 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_check_modules(wayland-protocols wayland-protocols>=1.15) -if (${wayland-protocols_FOUND}) - pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) -else() - find_path(WAYLAND_PROTOCOLS_DIR -NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml -PATH_SUFFIXES share/wayland-protocols - ) -endif() - -if (NOT EXISTS ${WAYLAND_PROTOCOLS_DIR}) - message(FATAL_ERROR "path to wayland-protocols not found") -endif() - # Generate protocols bindings.
[Bf-blender-cvs] [a3b3e137856] wl_default: GHOST/X11: link libGL for X11-EGL to resolve OpenGL symbols
Commit: a3b3e1378567a7b3fe39a8a926d42e8e55916168 Author: Christian Rauch Date: Mon Aug 9 20:52:23 2021 +0100 Branches: wl_default https://developer.blender.org/rBa3b3e1378567a7b3fe39a8a926d42e8e55916168 GHOST/X11: link libGL for X11-EGL to resolve OpenGL symbols This links libGL if X11-EGL is enabled, since libOpenGL is not installed by default on some distributions. This is a workaround to resolve the OpenGL symbols that would otherwise be resolved via GLVND. Differential Revision: https://developer.blender.org/D12034 === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index ae2d4b1c8cb..201608a531a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1189,7 +1189,17 @@ endif() if(WITH_GL_EGL) find_package(OpenGL REQUIRED EGL) - list(APPEND BLENDER_GL_LIBRARIES OpenGL::EGL) + + if (WITH_GHOST_WAYLAND AND NOT WITH_GHOST_X11) +# Link to libOpenGL (GLVND) and libEGL for pure Wayland builds, since libGL may not +# be available on Wayland only systems. +list(APPEND BLENDER_GL_LIBRARIES OpenGL::EGL) + else() +# Link to libGL and libEGL for X11 or mixed X11/Wayland builds, since libOpenGL +# is not installed by default on Linux distributions like Ubuntu and we want to +# create portable builds. +list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_egl_LIBRARY} ${OPENGL_gl_LIBRARY}) + endif() list(APPEND GL_DEFINITIONS -DWITH_GL_EGL -DGLEW_EGL -DGLEW_INC_EGL) ___ 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] [bb793c1deed] wl_default: GHOST/X11: don't link GLX when using EGL
Commit: bb793c1deedc254de009a1ab169c9518d8f408c5 Author: Christian Rauch Date: Sun Aug 8 18:34:34 2021 +0100 Branches: wl_default https://developer.blender.org/rBbb793c1deedc254de009a1ab169c9518d8f408c5 GHOST/X11: don't link GLX when using EGL Differential Revision: https://developer.blender.org/D12034 === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index ac5c80cb0d8..ae2d4b1c8cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1179,11 +1179,11 @@ if(WITH_GL_PROFILE_ES20) endif() -else() +elseif(NOT WITH_GL_EGL) if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY) list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY}) else() -list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY}) +list(APPEND BLENDER_GL_LIBRARIES OpenGL::OpenGL OpenGL::GLX) endif() 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] [5c145bda212] wl_default: GHOST/wayland: use Wayland only when 'BLENDER_WAYLAND' is set
Commit: 5c145bda212725530e7ce5cdbab2edf9de382e89 Author: Christian Rauch Date: Thu Jul 29 23:30:05 2021 +0100 Branches: wl_default https://developer.blender.org/rB5c145bda212725530e7ce5cdbab2edf9de382e89 GHOST/wayland: use Wayland only when 'BLENDER_WAYLAND' is set When the X11 and Wayland backends are available, only query Wayland when the BLENDER_WAYLAND environment variable is set and notify the user if this failed. This makes sure that Blender will always use X11. User can then opt-in to Wayland for testing and can continue using X11 in case of issues. Differential Revision: D11489 === M intern/ghost/intern/GHOST_ISystem.cpp === diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp index d9fecda22a4..8938d0bc0b6 100644 --- a/intern/ghost/intern/GHOST_ISystem.cpp +++ b/intern/ghost/intern/GHOST_ISystem.cpp @@ -55,13 +55,21 @@ GHOST_TSuccess GHOST_ISystem::createSystem() m_system = new GHOST_SystemNULL(); #elif defined(WITH_GHOST_X11) && defined(WITH_GHOST_WAYLAND) /* Special case, try Wayland, fall back to X11. */ -try { - m_system = new GHOST_SystemWayland(); -} -catch (const std::runtime_error &) { - /* fallback to X11. */ - delete m_system; - m_system = nullptr; +if (std::getenv("BLENDER_WAYLAND")) { + try { +m_system = new GHOST_SystemWayland(); + } + catch (const std::runtime_error &e) { +/* fallback to X11. */ +fprintf(stderr, +"The Wayland backend was enabled via 'BLENDER_WAYLAND' "\ +"but it could not be instantiated.\n" +"%s\n" \ +"Falling back to X11.\n", +e.what()); +delete m_system; +m_system = nullptr; + } } if (!m_system) { m_system = new GHOST_SystemX11(); ___ 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] [9a74c0d7626] wl_default: GHOST/X11: enable EGL
Commit: 9a74c0d76262790243f6ab9d61556309acc1df72 Author: Christian Rauch Date: Mon Jul 26 21:55:43 2021 +0100 Branches: wl_default https://developer.blender.org/rB9a74c0d76262790243f6ab9d61556309acc1df72 GHOST/X11: enable EGL This will replace GLX with EGL for X11. GLEW does not support GLX and EGL at the same time. Most distributions build GLEW with GLX support, so we have to use the externally provided GLEW and build with EGL support. This effectively sets WITH_SYSTEM_GLEW to OFF for all Linux configurations. Differential Revision: https://developer.blender.org/D12034 === M CMakeLists.txt M build_files/build_environment/install_deps.sh M build_files/cmake/platform/platform_unix.cmake === diff --git a/CMakeLists.txt b/CMakeLists.txt index 2868324bf46..db42f957ee2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -255,16 +255,6 @@ if(WITH_GHOST_X11) option(WITH_X11_ALPHA "Enable X11 transparent background" ON) endif() -if(UNIX AND NOT APPLE) - option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" OFF) - option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system" ON) -else() - # not an option for other OS's - set(WITH_SYSTEM_GLEW OFF) - set(WITH_SYSTEM_GLES OFF) -endif() - - if(UNIX AND NOT APPLE) option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF) endif() @@ -493,15 +483,32 @@ endif() # OpenGL +if(UNIX AND NOT APPLE) + # GLEW can only built with either GLX or EGL support and most binary + # distributions are built with GLX support. So we always compile GLEW + # with EGL support manually, and the options are no longer available. + set(WITH_SYSTEM_GLEW OFF) + set(WITH_SYSTEM_GLES ON) + + # Always use EGL instead of GLX, for X11, Wayland and headless. + set(WITH_GL_EGL ON) +else() + # System GLEW and GLES were never an option on other platforms. + set(WITH_SYSTEM_GLEW OFF) + set(WITH_SYSTEM_GLES OFF) + + # Experimental EGL option. + option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL or WGL)" OFF) + mark_as_advanced(WITH_GL_EGL) +endif() + option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON) option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF) -option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF) option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (through either EGL or the AGL/WGL/XGL 'es20' profile)" OFF) mark_as_advanced( WITH_OPENGL WITH_GLEW_ES - WITH_GL_EGL WITH_GL_PROFILE_ES20 ) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index ff4aad79bb6..cee8109ba32 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -603,9 +603,6 @@ MP3LAME_DEV="" OPENJPEG_USE=false OPENJPEG_DEV="" -# Whether to use system GLEW or not (OpenSubDiv needs recent glew to work). -NO_SYSTEM_GLEW=false - # Switch to english language, else some things (like check_package_DEB()) won't work! LANG_BACK=$LANG LANG="" @@ -4008,13 +4005,9 @@ install_DEB() { version_ge $_glew "1.7.0" if [ $? -eq 1 ]; then WARNING "OpenSubdiv disabled because GLEW-$_glew is not enough" - WARNING "Blender will not use system GLEW library" OSD_SKIP=true - NO_SYSTEM_GLEW=true else WARNING "OpenSubdiv will compile with GLEW-$_glew but with limited capability" - WARNING "Blender will not use system GLEW library" - NO_SYSTEM_GLEW=true fi fi @@ -5985,12 +5978,6 @@ print_info() { fi fi - if [ "$NO_SYSTEM_GLEW" = true ]; then -_1="-D WITH_SYSTEM_GLEW=OFF" -PRINT " $_1" -_buildargs="$_buildargs $_1" - fi - if [ "$FFMPEG_SKIP" = false ]; then _1="-D WITH_CODEC_FFMPEG=ON" _2="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;`print_info_ffmpeglink`'" diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 7f62399ac4f..ffdbbc3f8c5 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -581,8 +581,6 @@ if(WITH_GHOST_WAYLAND) pkg_check_modules(wayland-cursor REQUIRED wayland-cursor) pkg_check_modules(dbus REQUIRED dbus-1) - set(WITH_GL_EGL ON) - list(APPEND PLATFORM_LINKLIBS ${wayland-client_LINK_LIBRARIES} ${wayland-egl_LINK_LIBRARIES}
[Bf-blender-cvs] [3b40e39d233] wl_default: GHOST/X11: remove duplicated EGL linking
Commit: 3b40e39d2334a4291b5589ad864d4a9656042406 Author: Christian Rauch Date: Sun Aug 8 18:42:37 2021 +0100 Branches: wl_default https://developer.blender.org/rB3b40e39d2334a4291b5589ad864d4a9656042406 GHOST/X11: remove duplicated EGL linking Differential Revision: https://developer.blender.org/D12034 === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index db42f957ee2..ac5c80cb0d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1201,8 +1201,6 @@ if(WITH_GL_EGL) ) endif() -list(APPEND BLENDER_GL_LIBRARIES ${OPENGLES_EGL_LIBRARY}) - else() set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file") mark_as_advanced(OPENGLES_EGL_LIBRARY) ___ 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] [ec0ebcdcc49] soc-2021-porting-modifiers-to-nodes-decimate: Changes based on review by Hans Goudey (HooglyBoogly) and Jacques Lucke (JacquesLucke)
Commit: ec0ebcdcc49da24fd91b7fae0eda87903f1a8cb2 Author: Fabian Schempp Date: Sat Aug 14 20:52:49 2021 +0200 Branches: soc-2021-porting-modifiers-to-nodes-decimate https://developer.blender.org/rBec0ebcdcc49da24fd91b7fae0eda87903f1a8cb2 Changes based on review by Hans Goudey (HooglyBoogly) and Jacques Lucke (JacquesLucke) === M source/blender/bmesh/intern/bmesh_mesh.c M source/blender/bmesh/tools/bmesh_decimate_dissolve.c M source/blender/makesdna/DNA_mesh_types.h M source/blender/makesdna/DNA_node_types.h M source/blender/makesrna/intern/rna_nodetree.c M source/blender/nodes/geometry/nodes/node_geo_collapse.cc M source/blender/nodes/geometry/nodes/node_geo_dissolve.cc === diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index e6a59b9c3a5..ef89451a587 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -1453,15 +1453,9 @@ void BM_select_vertices(BMesh *bm, const bool *mask) { BMIter iter; BMVert *v; - int i = 0; - BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { -if (mask[i]) { - BM_elem_flag_set(v, BM_ELEM_SELECT, true); -} -else { - BM_elem_flag_set(v, BM_ELEM_SELECT, false); -} -i++; + int i; + BM_ITER_MESH_INDEX (v, &iter, bm, BM_VERTS_OF_MESH, i) { +BM_elem_flag_set(v, BM_ELEM_SELECT, mask[i]); } } @@ -1472,15 +1466,9 @@ void BM_select_edges(BMesh *bm, const bool *mask) { BMIter iter; BMEdge *e; - int i = 0; - BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) { -if (mask[i]) { - BM_elem_flag_set(e, BM_ELEM_SELECT, true); -} -else { - BM_elem_flag_set(e, BM_ELEM_SELECT, false); -} -i++; + int i; + BM_ITER_MESH_INDEX (e, &iter, bm, BM_EDGES_OF_MESH, i) { +BM_elem_flag_set(e, BM_ELEM_SELECT, mask[i]); } } @@ -1491,15 +1479,9 @@ void BM_select_faces(BMesh *bm, const bool *mask) { BMIter iter; BMFace *f; - int i = 0; - BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { -if (mask[i]) { - BM_elem_flag_set(f, BM_ELEM_SELECT, true); -} -else { - BM_elem_flag_set(f, BM_ELEM_SELECT, false); -} -i++; + int i; + BM_ITER_MESH_INDEX (f, &iter, bm, BM_FACES_OF_MESH, i) { +BM_elem_flag_set(f, BM_ELEM_SELECT, mask[i]); } } @@ -1507,15 +1489,9 @@ void BM_tag_vertices(BMesh *bm, const bool *mask) { BMIter iter; BMVert *v; - int i = 0; - BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { -if (mask[i]) { - BM_elem_flag_set(v, BM_ELEM_TAG, true); -} -else { - BM_elem_flag_set(v, BM_ELEM_TAG, false); -} -i++; + int i; + BM_ITER_MESH_INDEX (v, &iter, bm, BM_VERTS_OF_MESH, i) { +BM_elem_flag_set(v, BM_ELEM_TAG, mask[i]); } } @@ -1526,15 +1502,9 @@ void BM_tag_edges(BMesh *bm, const bool *mask) { BMIter iter; BMEdge *e; - int i = 0; - BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) { -if (mask[i]) { - BM_elem_flag_set(e, BM_ELEM_TAG, true); -} -else { - BM_elem_flag_set(e, BM_ELEM_TAG, false); -} -i++; + int i; + BM_ITER_MESH_INDEX (e, &iter, bm, BM_EDGES_OF_MESH, i) { +BM_elem_flag_set(e, BM_ELEM_TAG, mask[i]); } } @@ -1545,15 +1515,9 @@ void BM_tag_faces(BMesh *bm, const bool *mask) { BMIter iter; BMFace *f; - int i = 0; - BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { -if (mask[i]) { - BM_elem_flag_set(f, BM_ELEM_TAG, true); -} -else { - BM_elem_flag_set(f, BM_ELEM_TAG, false); -} -i++; + int i; + BM_ITER_MESH_INDEX (f, &iter, bm, BM_FACES_OF_MESH, i) { +BM_elem_flag_set(f, BM_ELEM_TAG, mask[i]); } } /** \} */ diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c index 27f2c564672..349b89d4340 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c @@ -115,8 +115,8 @@ static bool bm_edge_is_delimiter(const BMEdge *e, } } if (delimit & BMO_DELIM_FACE_SELECTION) { - if (BM_elem_flag_test(e->l->f, BM_ELEM_SELECT) != - BM_elem_flag_test(e->l->radial_next->f, BM_ELEM_SELECT)) { + if (BM_elem_flag_test(e->l->f, BM_ELEM_TAG) != + BM_elem_flag_test(e->l->radial_next->f, BM_ELEM_TAG)) { return true; } } @@ -350,6 +350,7 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, BM_elem_index_set(e_iter, -1); /* set dirty */ } bm->elem_index_dirty |= BM_EDGE; + /* build heap */ for (i = 0; i < einput_len; i++) { BMEdge *e = einput_arr[i]; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 30af08db035..97f14b2195d 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_m
[Bf-blender-cvs] [ee7b2e26783] soc-2021-porting-modifiers-to-nodes-decimate: Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-decimate
Commit: ee7b2e267831153817d6f242a3694bf7ecc51079 Author: Fabian Schempp Date: Sat Aug 14 15:03:34 2021 +0200 Branches: soc-2021-porting-modifiers-to-nodes-decimate https://developer.blender.org/rBee7b2e267831153817d6f242a3694bf7ecc51079 Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-decimate # Conflicts: # source/blender/blenkernel/BKE_node.h === === diff --cc source/blender/blenkernel/BKE_node.h index bb73e97e809,caa7ab6de0a..14448bd7c85 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@@ -1466,9 -1475,9 +1475,11 @@@ int ntreeTexExecTree(struct bNodeTree * #define GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL 1070 #define GEO_NODE_CURVE_TRIM 1071 #define GEO_NODE_CURVE_SET_HANDLES 1072 - #define GEO_NODE_COLLAPSE 1073 - #define GEO_NODE_UNSUBDIVIDE 1074 - #define GEO_NODE_DISSOLVE 1075 + #define GEO_NODE_CURVE_SPLINE_TYPE 1073 + #define GEO_NODE_CURVE_SELECT_HANDLES 1074 - ++#define GEO_NODE_COLLAPSE 1075 ++#define GEO_NODE_UNSUBDIVIDE 1076 ++#define GEO_NODE_DISSOLVE 1077 /** \} */ /* */ diff --cc source/blender/nodes/NOD_static_types.h index e6b36f13f29,3852819746e..1ee3d55a324 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@@ -289,27 -289,27 +289,29 @@@ DefNode(GeometryNode, GEO_NODE_ATTRIBUT DefNode(GeometryNode, GEO_NODE_ATTRIBUTE_VECTOR_ROTATE, def_geo_attribute_vector_rotate, "ATTRIBUTE_VECTOR_ROTATE", AttributeVectorRotate, "Attribute Vector Rotate", "") DefNode(GeometryNode, GEO_NODE_BOOLEAN, def_geo_boolean, "BOOLEAN", Boolean, "Boolean", "") DefNode(GeometryNode, GEO_NODE_BOUNDING_BOX, 0, "BOUNDING_BOX", BoundBox, "Bounding Box", "") +DefNode(GeometryNode, GEO_NODE_COLLAPSE, def_geo_collapse, "COLLAPSE", Collapse, "Collapse", "") DefNode(GeometryNode, GEO_NODE_COLLECTION_INFO, def_geo_collection_info, "COLLECTION_INFO", CollectionInfo, "Collection Info", "") DefNode(GeometryNode, GEO_NODE_CONVEX_HULL, 0, "CONVEX_HULL", ConvexHull, "Convex Hull", "") + DefNode(GeometryNode, GEO_NODE_CURVE_ENDPOINTS, 0, "CURVE_ENDPOINTS", CurveEndpoints, "Curve Endpoints", "") DefNode(GeometryNode, GEO_NODE_CURVE_LENGTH, 0, "CURVE_LENGTH", CurveLength, "Curve Length", "") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT, def_geo_curve_primitive_bezier_segment, "CURVE_PRIMITIVE_BEZIER_SEGMENT", CurvePrimitiveBezierSegment, "Bezier Segment", "") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_CIRCLE, def_geo_curve_primitive_circle, "CURVE_PRIMITIVE_CIRCLE", CurvePrimitiveCircle, "Curve Circle", "") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_LINE, def_geo_curve_primitive_line, "CURVE_PRIMITIVE_LINE", CurvePrimitiveLine, "Curve Line", "") - DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL, def_geo_curve_primitive_quadrilateral, "CURVE_PRIMITIVE_QUADRILATERAL", CurvePrimitiveQuadrilateral, "Quadrilateral", "") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER, 0, "CURVE_PRIMITIVE_QUADRATIC_BEZIER", CurveQuadraticBezier, "Quadratic Bezier", "") - DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_STAR, 0, "CURVE_PRIMITIVE_STAR", CurveStar, "Star", "") + DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL, def_geo_curve_primitive_quadrilateral, "CURVE_PRIMITIVE_QUADRILATERAL", CurvePrimitiveQuadrilateral, "Quadrilateral", "") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_SPIRAL, 0, "CURVE_PRIMITIVE_SPIRAL", CurveSpiral, "Curve Spiral", "") + DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_STAR, 0, "CURVE_PRIMITIVE_STAR", CurveStar, "Star", "") DefNode(GeometryNode, GEO_NODE_CURVE_RESAMPLE, def_geo_curve_resample, "CURVE_RESAMPLE", CurveResample, "Resample Curve", "") + DefNode(GeometryNode, GEO_NODE_CURVE_REVERSE, 0, "CURVE_REVERSE", CurveReverse, "Curve Reverse", "") DefNode(GeometryNode, GEO_NODE_CURVE_SET_HANDLES, def_geo_curve_set_handles, "CURVE_SET_HANDLES", CurveSetHandles, "Set Handle Type", "") + DefNode(GeometryNode, GEO_NODE_CURVE_SELECT_HANDLES, def_geo_curve_select_handles, "CURVE_SELECT_HANDLES", CurveSelectHandles, "Select by Handle Type", "") + DefNode(GeometryNode, GEO_NODE_CURVE_SPLINE_TYPE, def_geo_curve_spline_type, "CURVE_SPLINE_TYPE", CurveSplineType, "Set Spline Type", "") DefNode(GeometryNode, GEO_NODE_CURVE_SUBDIVIDE, def_geo_curve_subdivide, "CURVE_SUBDIVIDE", CurveSubdivide, "Curve Subdivide", "") DefNode(GeometryNode, GEO_NODE_CURVE_TO_MESH, 0, "CURVE_TO_MESH", CurveToMesh, "Curve to Mesh", "") - DefNode(GeometryNode, GEO_NODE_CURVE_TRIM, def_geo_curve_trim, "CURVE_TRIM", CurveTrim, "Curve Trim", "") - DefNode(GeometryNode, GEO_NODE_CURVE_REVERSE, 0, "CURVE_REVERSE", CurveReverse, "Curve Reverse", "") DefNode(GeometryNode, GEO_NODE_CURVE_TO_POINTS, def_geo_curve_to_po
[Bf-blender-cvs] [3de92e5f218] soc-2021-vse-strip-thumbnails: Fix pixel errors when drawing first thumb
Commit: 3de92e5f21838902670403207e81bcaa627b938b Author: Aditya Y Jeppu Date: Sat Aug 14 23:42:39 2021 +0530 Branches: soc-2021-vse-strip-thumbnails https://developer.blender.org/rB3de92e5f21838902670403207e81bcaa627b938b Fix pixel errors when drawing first thumb === M source/blender/editors/space_sequencer/sequencer_draw.c M source/blender/imbuf/intern/rectop.c M source/blender/sequencer/intern/render.c === diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 05134910830..04a38c2c3fd 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1321,9 +1321,6 @@ static void thumbnail_call_for_job(const bContext *C, Editing *ed, View2D *v2d, } } -/* TODO(AYJ) : Decrease Opacity of images when overlay over another strip - */ - static void draw_seq_strip_thumbnail(View2D *v2d, const bContext *C, SpaceSeq *sseq, @@ -1403,10 +1400,9 @@ static void draw_seq_strip_thumbnail(View2D *v2d, break; } -// TODO(AYJ) : Fix pixel errors in the first frame when cropping cropx_min = (cut_off / pixelx) / (zoom_y / pixely); cropx_max = ((x2 - x1) / pixelx) / (zoom_y / pixely); -BLI_rcti_init(&crop, (int)(cropx_min), (int)(cropx_max)-1, 0, (int)(image_y)-1); +BLI_rcti_init(&crop, (int)(cropx_min), (int)image_x, 0, (int)(image_y)-1); /* Get the image */ ibuf = SEQ_get_thumbnail(&context, seq, roundf(x1), &crop, clipped, false); diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index 4b5d68b9c13..e3e21cf83ef 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -266,7 +266,7 @@ void IMB_rect_crop(ImBuf *ibuf, const rcti *crop) }; BLI_assert(size_dst[0] > 0 && size_dst[1] > 0); BLI_assert(crop->xmin >= 0 && crop->ymin >= 0); - BLI_assert(crop->xmax < ibuf->x && crop->ymax < ibuf->y); + BLI_assert(crop->xmax <= ibuf->x && crop->ymax <= ibuf->y); if ((size_dst[0] == ibuf->x) && (size_dst[1] == ibuf->y)) { return; diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 3006deb1748..7e43950edca 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -2087,10 +2087,6 @@ ImBuf *SEQ_get_thumbnail(SeqRenderData *context, crop->xmin = 0; crop->ymin = 0; } -if (crop->xmax >= ibuf->x || crop->ymax >= ibuf->y) { - crop->xmax = ibuf->x - 1; - crop->ymax = ibuf->y - 1; -} IMB_rect_crop(temp, crop); if (temp != NULL) { IMB_freeImBuf(ibuf); ___ 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] [b20e00bda7e] soc-2021-vse-strip-thumbnails: Merge branch 'master' into soc-2021-vse-strip-thumbnails
Commit: b20e00bda7e6381583a1f711225cb19381162b3d Author: Aditya Y Jeppu Date: Sat Aug 14 23:47:24 2021 +0530 Branches: soc-2021-vse-strip-thumbnails https://developer.blender.org/rBb20e00bda7e6381583a1f711225cb19381162b3d Merge branch 'master' into soc-2021-vse-strip-thumbnails === === ___ 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] [6f61cd90cc4] soc-2021-uv-edge-select-support: Cleanup: Use utility function
Commit: 6f61cd90cc4cd96c7ecab242e69d62917ca76c68 Author: Siddhartha Jejurkar Date: Sat Aug 14 20:12:38 2021 +0530 Branches: soc-2021-uv-edge-select-support https://developer.blender.org/rB6f61cd90cc4cd96c7ecab242e69d62917ca76c68 Cleanup: Use utility function === M source/blender/editors/uvedit/uvedit_select.c === diff --git a/source/blender/editors/uvedit/uvedit_select.c b/source/blender/editors/uvedit/uvedit_select.c index 45e0ebd796a..98fa6753b61 100644 --- a/source/blender/editors/uvedit/uvedit_select.c +++ b/source/blender/editors/uvedit/uvedit_select.c @@ -312,7 +312,7 @@ void uvedit_face_select_set_with_sticky(const SpaceImage *sima, do { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l_iter, cd_loop_uv_offset); if (select) { -/* Set selection flag for the internal edges of the face that is being selected */ +/* Set selection flag for only the internal edges of the face that is being selected */ luv->flag |= MLOOPUV_EDGESEL; /* Select all shared vertices */ uvedit_uv_select_shared_location( @@ -321,30 +321,8 @@ void uvedit_face_select_set_with_sticky(const SpaceImage *sima, else { luv->flag &= ~MLOOPUV_EDGESEL; -bool do_vert_deselect = true; -BMEdge *e_first = l_iter->e, *e_iter; -e_iter = e_first; -do { - /* If any surrounding UV face is selected then don't deselect the shared UV vertices - * Deselcting the shared UV vertices could deselect the surrounding UV faces as - * well*/ - BMLoop *l_radial_iter = e_iter->l; - do { -MLoopUV *luv_radial_other = BM_ELEM_CD_GET_VOID_P(l_radial_iter, - cd_loop_uv_offset); -if ((l_radial_iter->f != l_iter->f) && -uvedit_face_select_test(scene, l_radial_iter->f, cd_loop_uv_offset) && -equals_v2v2(luv->uv, luv_radial_other->uv)) { - do_vert_deselect = false; - break; -} - } while ((l_radial_iter = l_radial_iter->radial_next) != e_iter->l); - if (!do_vert_deselect) { -break; - } -} while ((e_iter = BM_DISK_EDGE_NEXT(e_iter, l_iter->v)) != e_first); - -if (do_vert_deselect) { +if (!uvedit_vert_is_any_other_face_selected( +scene, l_iter, l_iter->v, cd_loop_uv_offset)) { uvedit_uv_select_shared_location( scene, em, l_iter, select, false, do_history, cd_loop_uv_offset); } ___ 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