[Bf-blender-cvs] [1185259db8b] xr-controller-support: Merge branch 'master' into xr-controller-support
Commit: 1185259db8bf0d9a799f3a2c0b323f5923a0 Author: Peter Kim Date: Sun Jul 4 15:48:26 2021 +0900 Branches: xr-controller-support https://developer.blender.org/rB1185259db8bf0d9a799f3a2c0b323f5923a0 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] [6ee46d5e83f] xr-controller-support: XR: Fix mirror view not matching navigation
Commit: 6ee46d5e83f33206c4b0978914412bfe50779273 Author: Peter Kim Date: Sun Jul 4 15:40:38 2021 +0900 Branches: xr-controller-support https://developer.blender.org/rB6ee46d5e83f33206c4b0978914412bfe50779273 XR: Fix mirror view not matching navigation Forgot to update eye poses with viewer pose. === M source/blender/makesrna/intern/rna_wm.c M source/blender/makesrna/intern/rna_xr.c M source/blender/windowmanager/WM_api.h M source/blender/windowmanager/WM_types.h M source/blender/windowmanager/intern/wm_event_query.c M source/blender/windowmanager/xr/intern/wm_xr_action.c M source/blender/windowmanager/xr/intern/wm_xr_draw.c M source/blender/windowmanager/xr/intern/wm_xr_intern.h M source/blender/windowmanager/xr/intern/wm_xr_session.c === diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index c4507619b8b..ba2b398a5a2 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -882,6 +882,20 @@ static void rna_Event_xr_controller_rotation_other_get(PointerRNA *ptr, float *v } } +static float rna_Event_xr_focal_length_get(PointerRNA *ptr) +{ + const wmEvent *event = ptr->data; + if (WM_event_is_xr(event)) { +float focal_len; +WM_event_xr_data( +event, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &focal_len, NULL, NULL); +return focal_len; + } + else { +return 0.0f; + } +} + static void rna_Event_xr_view_matrix_get(PointerRNA *ptr, float values[16]) { const wmEvent *event = ptr->data; @@ -897,8 +911,8 @@ static void rna_Event_xr_view_matrix_get(PointerRNA *ptr, float values[16]) NULL, NULL, NULL, - (float(*)[4])values, NULL, + (float(*)[4])values, NULL); } else { @@ -906,20 +920,6 @@ static void rna_Event_xr_view_matrix_get(PointerRNA *ptr, float values[16]) } } -static float rna_Event_xr_focal_length_get(PointerRNA *ptr) -{ - const wmEvent *event = ptr->data; - if (WM_event_is_xr(event)) { -float focal_len; -WM_event_xr_data( -event, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &focal_len, NULL); -return focal_len; - } - else { -return 0.0f; - } -} - static bool rna_Event_xr_bimanual_get(PointerRNA *ptr) { const wmEvent *event = ptr->data; @@ -2570,17 +2570,17 @@ static void rna_def_event(BlenderRNA *brna) "XR Controller Rotation Other", "Controller rotation of the other user path for bimanual actions"); + prop = RNA_def_property(srna, "xr_focal_length", PROP_FLOAT, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_float_funcs(prop, "rna_Event_xr_focal_length_get", NULL, NULL); + RNA_def_property_ui_text(prop, "XR Focal Length", "Focal length of the XR selection eye"); + prop = RNA_def_property(srna, "xr_view_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_array(prop, 16); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_float_funcs(prop, "rna_Event_xr_view_matrix_get", NULL, NULL); RNA_def_property_ui_text(prop, "XR View Matrix", "View matrix of the XR selection eye"); - prop = RNA_def_property(srna, "xr_focal_length", PROP_FLOAT, PROP_NONE); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_float_funcs(prop, "rna_Event_xr_focal_length_get", NULL, NULL); - RNA_def_property_ui_text(prop, "XR Focal Length", "Focal length of the XR selection eye"); - prop = RNA_def_property(srna, "xr_bimanual", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_boolean_funcs(prop, "rna_Event_xr_bimanual_get", NULL); diff --git a/source/blender/makesrna/intern/rna_xr.c b/source/blender/makesrna/intern/rna_xr.c index e3a0da7ffca..a1b2a28e2bd 100644 --- a/source/blender/makesrna/intern/rna_xr.c +++ b/source/blender/makesrna/intern/rna_xr.c @@ -1856,7 +1856,7 @@ static void rna_def_xr_session_settings(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, selection_eyes); RNA_def_property_ui_text( - prop, "Selection Eye", "Which eye's perspective to use when selecting in VR"); + prop, "Selection Eye", "Which eye's perspective to use when selecting in VR (GPU select)"); RNA_def_property_update(prop, NC_WM | ND_XR_DATA_CHANGED, NULL); prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE); diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 64f588e6609..22d2860ee82 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/
[Bf-blender-cvs] [1f1589b4dfa] xr-controller-support: XR: Show selection/controller overlays by default
Commit: 1f1589b4dfabf56f0a29658bd68bcfe8738c7562 Author: Peter Kim Date: Sun Jul 4 15:42:55 2021 +0900 Branches: xr-controller-support https://developer.blender.org/rB1f1589b4dfabf56f0a29658bd68bcfe8738c7562 XR: Show selection/controller overlays by default === M source/blender/blenloader/intern/versioning_300.c === diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index ecee14d3d58..cfbf119409a 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -468,6 +468,14 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 300, 7)) { +LISTBASE_FOREACH (wmWindowManager *, wm, &bmain->wm) { + wm->xr.session_settings.draw_flags |= (V3D_OFSDRAW_SHOW_SELECTION | + V3D_OFSDRAW_XR_SHOW_CONTROLLERS | + V3D_OFSDRAW_XR_SHOW_CUSTOM_OVERLAYS); +} + } + /** * Versioning code until next subversion bump goes here. * ___ 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] [442f269a72e] lineart-bvh: Merge remote-tracking branch 'origin/master' into lineart-bvh
Commit: 442f269a72e8f07393fd246f642e210171a1c9bc Author: YimingWu Date: Sun Jul 4 13:23:52 2021 +0800 Branches: lineart-bvh https://developer.blender.org/rB442f269a72e8f07393fd246f642e210171a1c9bc Merge remote-tracking branch 'origin/master' into lineart-bvh === === diff --cc release/scripts/startup/bl_ui/properties_material.py index 6c7837237e4,b217e33de12..5df58f8ac4c --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@@ -291,18 -291,19 +291,24 @@@ class MATERIAL_PT_lineart(MaterialButto mat = context.material lineart = mat.lineart - layout.prop(lineart, "use_transparency") + layout.prop(lineart, "use_material_mask") row = layout.row(align=True, heading="Masks") - row.active = lineart.use_transparency - for i in range(6): - row.prop(lineart, "use_transparency_mask", text=str(i), index=i, toggle=True) + row.active = lineart.use_material_mask + for i in range(8): + row.prop(lineart, "use_material_mask_bits", text=str(i), index=i, toggle=True) + + row = layout.row(align=True, heading="Custom Occlusion") + row.prop(lineart, "use_mat_occlusion", text="") + sub = row.row(align=False) + sub.active = lineart.use_mat_occlusion + sub.prop(lineart, "mat_occlusion", slider=True, text="Levels") +row = layout.row(align=True, heading="Custom occlusion effectiveness") +row.active = lineart.use_occlusion_effectiveness +row.prop(lineart, "use_occlusion_effectiveness", text="") +row.prop(lineart, "occlusion_effectiveness", slider=True) + classes = ( MATERIAL_MT_context_menu, diff --cc source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c index ba5b1a5cb31,9593a1364e7..f58de44b04c --- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c @@@ -258,18 -254,10 +258,11 @@@ static void updateDepsgraph(GpencilModi else { add_this_collection(ctx->scene->master_collection, ctx, mode); } - if (lmd->calculation_flags & LRT_USE_CUSTOM_CAMERA) { - DEG_add_object_relation( - ctx->node, lmd->source_camera, DEG_OB_COMP_TRANSFORM, "Line Art Modifier"); - DEG_add_object_relation( - ctx->node, lmd->source_camera, DEG_OB_COMP_PARAMETERS, "Line Art Modifier"); - } - else { - DEG_add_object_relation( - ctx->node, ctx->scene->camera, DEG_OB_COMP_TRANSFORM, "Line Art Modifier"); - DEG_add_object_relation( - ctx->node, ctx->scene->camera, DEG_OB_COMP_PARAMETERS, "Line Art Modifier"); - } ++ + DEG_add_object_relation( + ctx->node, ctx->scene->camera, DEG_OB_COMP_TRANSFORM, "Line Art Modifier"); + DEG_add_object_relation( + ctx->node, ctx->scene->camera, DEG_OB_COMP_PARAMETERS, "Line Art Modifier"); } static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, void *userData) @@@ -434,28 -425,24 +441,28 @@@ static void occlusion_panel_draw(const } } - static void transparency_panel_draw_header(const bContext *UNUSED(C), Panel *panel) + static void material_mask_panel_draw_header(const bContext *UNUSED(C), Panel *panel) { uiLayout *layout = panel->layout; - PointerRNA ob_ptr; - PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, &ob_ptr); + PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL); const bool is_baked = RNA_boolean_get(ptr, "is_baked"); - const bool show_in_front = RNA_boolean_get(&ob_ptr, "show_in_front"); - uiLayoutSetEnabled(layout, !is_baked); - uiLayoutSetActive(layout, show_in_front); - uiItemR(layout, ptr, "use_transparency", 0, IFACE_("Transparency"), ICON_NONE); + uiItemR(layout, ptr, "use_material_mask", 0, IFACE_("Material Mask"), ICON_NONE); } - static void transparency_panel_draw(const bContext *UNUSED(C), Panel *panel) + static void material_mask_panel_draw(const bContext *UNUSED(C), Panel *panel) { uiLayout *layout = panel->layout; -- PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL); ++ PointerRNA ob_ptr; ++ PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, &ob_ptr); const bool is_baked = RNA_boolean_get(ptr, "is_baked"); ++ const bool show_in_front = RNA_boolean_get(&ob_ptr, "show_in_front"); ++ uiLayoutSetEnabled(layout, !is_baked); ++ uiLayoutSetActive(layout, show_in_front); uiLayoutSetPropSep(layout, true); @@@ -473,24 -460,9 +480,24 @@@ uiItemL(row, "", ICON_BLANK1); /* Space for decorator. */ uiLayout *col = uiLayoutColumn(layout, true); - uiItemR(col, ptr, "use_transparency_match", 0, IFACE_("Match All Masks"), ICON_NONE); + uiIte
[Bf-blender-cvs] [c56ef6fd89c] lineart-bvh: Merge remote-tracking branch 'origin/master' into lineart-bvh
Commit: c56ef6fd89c149a87afe62dffc81c9083dd7a2c2 Author: YimingWu Date: Sun Jul 4 13:25:58 2021 +0800 Branches: lineart-bvh https://developer.blender.org/rBc56ef6fd89c149a87afe62dffc81c9083dd7a2c2 Merge remote-tracking branch 'origin/master' into lineart-bvh === === ___ 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] [0c3451583e3] temp-lineart-contained: Cleanup: Remove unused transform matrix from objects
Commit: 0c3451583e3ab083b4d4f30889c64330193bdf84 Author: Hans Goudey Date: Fri Jul 2 13:27:56 2021 -0500 Branches: temp-lineart-contained https://developer.blender.org/rB0c3451583e3ab083b4d4f30889c64330193bdf84 Cleanup: Remove unused transform matrix from objects This was the only reference to this matrix. https://developer.blender.org/D11770 === M source/blender/makesdna/DNA_object_types.h === diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 8d861647bd2..26a1bea4b3a 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -335,12 +335,6 @@ typedef struct Object { */ float imat[4][4]; - /* Previously 'imat' was used at render time, but as other places use it too - * the interactive ui of 2.5 creates problems. So now only 'imat_ren' should - * be used when ever the inverse of ob->obmat * re->viewmat is needed! - jahka - */ - float imat_ren[4][4]; - /** Copy of Base's layer in the scene. */ unsigned int lay DNA_DEPRECATED; ___ 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] [733dfaadee0] temp-lineart-contained: Merge remote-tracking branch 'origin/master' into temp-lineart-contained
Commit: 733dfaadee075485642c90e5c35600f6386e15cb Author: YimingWu Date: Sun Jul 4 13:27:38 2021 +0800 Branches: temp-lineart-contained https://developer.blender.org/rB733dfaadee075485642c90e5c35600f6386e15cb Merge remote-tracking branch 'origin/master' into temp-lineart-contained === === ___ 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] [b76cafb1919] temp-lineart-contained: Cleanup: Use const mesh to ensure BVH and triangulation cache
Commit: b76cafb1919e31b701f6eb70f24390e7916b22f9 Author: Hans Goudey Date: Fri Jul 2 11:37:01 2021 -0500 Branches: temp-lineart-contained https://developer.blender.org/rBb76cafb1919e31b701f6eb70f24390e7916b22f9 Cleanup: Use const mesh to ensure BVH and triangulation cache As noted in a comment now, these functions only update a cache, so they don't change the logical state of the mesh, which is "it will have the data when necessary." Using a const argument will help const correctness when accessing an object's evaluated mesh. === M source/blender/blenkernel/BKE_bvhutils.h M source/blender/blenkernel/BKE_mesh_runtime.h M source/blender/blenkernel/intern/bvhutils.cc M source/blender/blenkernel/intern/mesh_runtime.c M source/blender/nodes/geometry/nodes/node_geo_attribute_proximity.cc M source/blender/nodes/geometry/nodes/node_geo_attribute_transfer.cc M source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc M source/blender/nodes/geometry/nodes/node_geo_raycast.cc === diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index 78908908343..8be2fcbdb83 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -218,7 +218,7 @@ BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data, ThreadMutex *mesh_eval_mutex); BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, - struct Mesh *mesh, + const struct Mesh *mesh, const BVHCacheType bvh_cache_type, const int tree_type); diff --git a/source/blender/blenkernel/BKE_mesh_runtime.h b/source/blender/blenkernel/BKE_mesh_runtime.h index 67c87e96aff..3efbef94081 100644 --- a/source/blender/blenkernel/BKE_mesh_runtime.h +++ b/source/blender/blenkernel/BKE_mesh_runtime.h @@ -45,7 +45,7 @@ void BKE_mesh_runtime_reset(struct Mesh *mesh); void BKE_mesh_runtime_reset_on_copy(struct Mesh *mesh, const int flag); int BKE_mesh_runtime_looptri_len(const struct Mesh *mesh); void BKE_mesh_runtime_looptri_recalc(struct Mesh *mesh); -const struct MLoopTri *BKE_mesh_runtime_looptri_ensure(struct Mesh *mesh); +const struct MLoopTri *BKE_mesh_runtime_looptri_ensure(const struct Mesh *mesh); bool BKE_mesh_runtime_ensure_edit_data(struct Mesh *mesh); bool BKE_mesh_runtime_clear_edit_data(struct Mesh *mesh); bool BKE_mesh_runtime_reset_edit_data(struct Mesh *mesh); diff --git a/source/blender/blenkernel/intern/bvhutils.cc b/source/blender/blenkernel/intern/bvhutils.cc index c2852426174..3dea49d1953 100644 --- a/source/blender/blenkernel/intern/bvhutils.cc +++ b/source/blender/blenkernel/intern/bvhutils.cc @@ -1438,9 +1438,12 @@ static BLI_bitmap *looptri_no_hidden_map_get(const MPoly *mpoly, /** * Builds or queries a bvhcache for the cache bvhtree of the request type. + * + * \note This function only fills a cache, and therefore the mesh argument can + * be considered logically const. Concurrent access is protected by a mutex. */ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, - struct Mesh *mesh, + const struct Mesh *mesh, const BVHCacheType bvh_cache_type, const int tree_type) { @@ -1448,7 +1451,7 @@ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, BVHCache **bvh_cache_p = (BVHCache **)&mesh->runtime.bvh_cache; ThreadMutex *mesh_eval_mutex = (ThreadMutex *)mesh->runtime.eval_mutex; - bool is_cached = bvhcache_find(bvh_cache_p, bvh_cache_type, &tree, nullptr, nullptr); + const bool is_cached = bvhcache_find(bvh_cache_p, bvh_cache_type, &tree, nullptr, nullptr); if (is_cached && tree == nullptr) { memset(data, 0, sizeof(*data)); diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c index 011dd7e25ee..6ae534012a9 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.c +++ b/source/blender/blenkernel/intern/mesh_runtime.c @@ -158,8 +158,12 @@ static void mesh_runtime_looptri_recalc_isolated(void *userdata) BKE_mesh_runtime_looptri_recalc(mesh); } -/* This is a ported copy of dm_getLoopTriArray(dm). */ -const MLoopTri *BKE_mesh_runtime_looptri_ensure(Mesh *mesh) +/** + * \note This function only fills a cache, and therefore the mesh argument can + * be considered logically const. Concurrent access is protected by a mutex. + * \note This is a ported copy of dm_getLoopTriArray(dm). + */ +const MLoopTri *BKE_mesh_runtime_looptri_ensure(const Mesh *mesh) { ThreadMutex *mesh_eval_mutex = (ThreadMutex *)mesh->runtime.eval_mutex; BL
[Bf-blender-cvs] [7d90de452bd] temp-lineart-contained: Cleanup: Use simpler method to retrieve attribute domain
Commit: 7d90de452bd7524a077d0c1b3767ca48a582a2ec Author: Hans Goudey Date: Fri Jul 2 23:16:39 2021 -0500 Branches: temp-lineart-contained https://developer.blender.org/rB7d90de452bd7524a077d0c1b3767ca48a582a2ec Cleanup: Use simpler method to retrieve attribute domain === M source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc M source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc === diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc index 06a4327a6c5..3b951bda95e 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc @@ -108,15 +108,14 @@ static AttributeDomain get_result_domain(const GeometryComponent &component, StringRef result_name) { /* Use the domain of the result attribute if it already exists. */ - ReadAttributeLookup result_attribute = component.attribute_try_get_for_read(result_name); - if (result_attribute) { -return result_attribute.domain; + std::optional result_info = component.attribute_get_meta_data(result_name); + if (result_info) { +return result_info->domain; } - /* Otherwise use the input attribute's domain if it exists. */ - ReadAttributeLookup input_attribute = component.attribute_try_get_for_read(input_name); - if (input_attribute) { -return input_attribute.domain; + std::optional input_info = component.attribute_get_meta_data(input_name); + if (input_info) { +return input_info->domain; } return ATTR_DOMAIN_POINT; diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc index e2cf6e8b480..e017786ae89 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc @@ -389,9 +389,9 @@ static AttributeDomain get_result_domain(const GeometryComponent &component, StringRef result_name) { /* Use the domain of the result attribute if it already exists. */ - ReadAttributeLookup result_attribute = component.attribute_try_get_for_read(result_name); - if (result_attribute) { -return result_attribute.domain; + std::optional result_info = component.attribute_get_meta_data(result_name); + if (result_info) { +return result_info->domain; } /* Otherwise use the highest priority domain from existing input attributes, or the default. */ ___ 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] [7ee444fc7b6] temp-lineart-contained: Cleanup: use template utility function to handle OpenVDB grid types in Cycles
Commit: 7ee444fc7b68ac64aa3935d851f04954e1bf7fbd Author: Brecht Van Lommel Date: Thu Jul 1 19:49:56 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rB7ee444fc7b68ac64aa3935d851f04954e1bf7fbd Cleanup: use template utility function to handle OpenVDB grid types in Cycles === M intern/cycles/render/image_vdb.cpp M intern/cycles/util/util_openvdb.h === diff --git a/intern/cycles/render/image_vdb.cpp b/intern/cycles/render/image_vdb.cpp index fb6394e8917..13cdda552ba 100644 --- a/intern/cycles/render/image_vdb.cpp +++ b/intern/cycles/render/image_vdb.cpp @@ -16,8 +16,9 @@ #include "render/image_vdb.h" +#include "util/util_openvdb.h" + #ifdef WITH_OPENVDB -# include # include #endif #ifdef WITH_NANOVDB @@ -26,6 +27,51 @@ CCL_NAMESPACE_BEGIN +#ifdef WITH_OPENVDB +struct NumChannelsOp { + int num_channels = 0; + + template + bool operator()(const openvdb::GridBase::ConstPtr &grid) + { +num_channels = channels; +return true; + } +}; + +struct ToDenseOp { + openvdb::CoordBBox bbox; + void *pixels; + + template + bool operator()(const openvdb::GridBase::ConstPtr &grid) + { +openvdb::tools::Dense dense(bbox, + (FloatDataType *)pixels); +openvdb::tools::copyToDense(*openvdb::gridConstPtrCast(grid), dense); +return true; + } +}; + +# ifdef WITH_NANOVDB +struct ToNanoOp { + nanovdb::GridHandle<> nanogrid; + + template + bool operator()(const openvdb::GridBase::ConstPtr &grid) + { +if constexpr (!std::is_same_v) { + nanogrid = nanovdb::openToNanoVDB(FloatGridType(*openvdb::gridConstPtrCast(grid))); + return true; +} +else { + return false; +} + } +}; +# endif +#endif + VDBImageLoader::VDBImageLoader(const string &grid_name) : grid_name(grid_name) { } @@ -41,98 +87,40 @@ bool VDBImageLoader::load_metadata(const ImageDeviceFeatures &features, ImageMet return false; } - bbox = grid->evalActiveVoxelBoundingBox(); - if (bbox.empty()) { + /* Get number of channels from type. */ + NumChannelsOp op; + if (!openvdb::grid_type_operation(grid, op)) { return false; } - /* Set dimensions. */ - openvdb::Coord dim = bbox.dim(); - metadata.width = dim.x(); - metadata.height = dim.y(); - metadata.depth = dim.z(); + metadata.channels = op.num_channels; /* Set data type. */ - if (grid->isType()) { -metadata.channels = 1; -# ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB(*openvdb::gridConstPtrCast(grid)); -} -# endif - } - else if (grid->isType()) { -metadata.channels = 3; -# ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB(*openvdb::gridConstPtrCast(grid)); -} -# endif - } - else if (grid->isType()) { -metadata.channels = 1; -# ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB( - openvdb::FloatGrid(*openvdb::gridConstPtrCast(grid))); -} -# endif - } - else if (grid->isType()) { -metadata.channels = 1; -# ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB( - openvdb::FloatGrid(*openvdb::gridConstPtrCast(grid))); -} -# endif - } - else if (grid->isType()) { -metadata.channels = 1; # ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB( - openvdb::FloatGrid(*openvdb::gridConstPtrCast(grid))); + if (features.has_nanovdb) { +/* NanoVDB expects no inactive leaf nodes. */ +/*openvdb::FloatGrid &pruned_grid = *openvdb::gridPtrCast(grid); +openvdb::tools::pruneInactive(pruned_grid.tree()); +nanogrid = nanovdb::openToNanoVDB(pruned_grid);*/ +ToNanoOp op; +if (!openvdb::grid_type_operation(grid, op)) { + return false; } -# endif - } - else if (grid->isType()) { -metadata.channels = 1; -# ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB( - openvdb::FloatGrid(*openvdb::gridConstPtrCast(grid))); -} -# endif +nanogrid = std::move(op.nanogrid); } - else if (grid->isType()) { -metadata.channels = 3; -# ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB( - openvdb::Vec3fGrid(*openvdb::gridConstPtrCast(grid))); -} -# endif - } - else if (grid->isType()) { -metadata.channels = 3; -# ifdef WITH_NANOVDB -if (features.has_nanovdb) { - nanogrid = nanovdb::openToNanoVDB( - openvdb::Vec3fGrid(*openvdb::gridConstPtrCast(grid))); -} -# endif - } - else if (grid->isType()) { -metadata.channels = 1; -# ifdef WITH_NANOVDB -return false; // Unsupported # endif - } - else { + + /* Set dimens
[Bf-blender-cvs] [589adbc64aa] temp-lineart-contained: Geometry Nodes: Add mesh input warning to curve to mesh node
Commit: 589adbc64aab64618a6a2fe5d39b40a28a4cae18 Author: Hans Goudey Date: Fri Jul 2 13:24:42 2021 -0500 Branches: temp-lineart-contained https://developer.blender.org/rB589adbc64aab64618a6a2fe5d39b40a28a4cae18 Geometry Nodes: Add mesh input warning to curve to mesh node A point of confusion about this node is that it doesn't work on the output of the mesh circle primitive node. This patch adds a warning to help with that. This avoids adding a warning when the geometry set input has no mesh. Differential Revision: https://developer.blender.org/D11771 === M source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc === diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc index c0d817385e2..159c4fffb57 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc @@ -337,7 +337,17 @@ static void geo_node_curve_to_mesh_exec(GeoNodeExecParams params) curve_set = bke::geometry_set_realize_instances(curve_set); profile_set = bke::geometry_set_realize_instances(profile_set); + /* Note: Theoretically an "is empty" check would be more correct for errors. */ + if (profile_set.has_mesh() && !profile_set.has_curve()) { +params.error_message_add(NodeWarningType::Warning, + TIP_("No curve data available in profile input")); + } + if (!curve_set.has_curve()) { +if (curve_set.has_mesh()) { + params.error_message_add(NodeWarningType::Warning, + TIP_("No curve data available in curve input")); +} params.set_output("Mesh", GeometrySet()); return; } ___ 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] [1dbae18bc94] temp-lineart-contained: Cleanup: Remove unused/unneeded code from old Asset Engine design
Commit: 1dbae18bc94b28a5dbb4085d42051f544e2e563b Author: Julian Eisel Date: Fri Jul 2 15:30:00 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rB1dbae18bc94b28a5dbb4085d42051f544e2e563b Cleanup: Remove unused/unneeded code from old Asset Engine design This code was written for the File Browser together with the Asset Engine design, that is not part of the Asset Browser/System design anymore. Updated comments accordingly. `FileDirEntryRevision` was actually used, but I removed it and moved the used members to the parent `FileDirEntry`, since there is no concept of revisions currently. There should be no functional changes. === M source/blender/editors/space_file/file_draw.c M source/blender/editors/space_file/filelist.c M source/blender/makesdna/DNA_space_types.h === diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 29cac294eaf..edef50c15a1 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -727,40 +727,45 @@ static void draw_columnheader_columns(const FileSelectParams *params, /** * Updates the stat string stored in file->entry if necessary. */ -static const char *filelist_get_details_column_string(FileAttributeColumnType column, - const FileDirEntry *file, - const bool small_size, - const bool update_stat_strings) +static const char *filelist_get_details_column_string( +FileAttributeColumnType column, +/* Generated string will be cached in the file, so non-const. */ +FileDirEntry *file, +const bool small_size, +const bool update_stat_strings) { switch (column) { case COLUMN_DATETIME: if (!(file->typeflag & FILE_TYPE_BLENDERLIB) && !FILENAME_IS_CURRPAR(file->relpath)) { -if ((file->entry->datetime_str[0] == '\0') || update_stat_strings) { +if ((file->draw_data.datetime_str[0] == '\0') || update_stat_strings) { char date[FILELIST_DIRENTRY_DATE_LEN], time[FILELIST_DIRENTRY_TIME_LEN]; bool is_today, is_yesterday; BLI_filelist_entry_datetime_to_string( - NULL, file->entry->time, small_size, time, date, &is_today, &is_yesterday); + NULL, file->time, small_size, time, date, &is_today, &is_yesterday); if (is_today || is_yesterday) { BLI_strncpy(date, is_today ? N_("Today") : N_("Yesterday"), sizeof(date)); } - BLI_snprintf( - file->entry->datetime_str, sizeof(file->entry->datetime_str), "%s %s", date, time); + BLI_snprintf(file->draw_data.datetime_str, + sizeof(file->draw_data.datetime_str), + "%s %s", + date, + time); } -return file->entry->datetime_str; +return file->draw_data.datetime_str; } break; case COLUMN_SIZE: if ((file->typeflag & (FILE_TYPE_BLENDER | FILE_TYPE_BLENDER_BACKUP)) || !(file->typeflag & (FILE_TYPE_DIR | FILE_TYPE_BLENDERLIB))) { -if ((file->entry->size_str[0] == '\0') || update_stat_strings) { +if ((file->draw_data.size_str[0] == '\0') || update_stat_strings) { BLI_filelist_entry_size_to_string( - NULL, file->entry->size, small_size, file->entry->size_str); + NULL, file->size, small_size, file->draw_data.size_str); } -return file->entry->size_str; +return file->draw_data.size_str; } break; default: @@ -772,7 +777,7 @@ static const char *filelist_get_details_column_string(FileAttributeColumnType co static void draw_details_columns(const FileSelectParams *params, const FileLayout *layout, - const FileDirEntry *file, + FileDirEntry *file, const int pos_x, const int pos_y, const uchar text_col[4]) diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index a847d60ba52..b81605d6379 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1382,40 +1382,6 @@ static void filelist_entry_clear(FileDirEntry *entry) BKE_icon_delete(entry->preview_icon_id); entry->preview_icon_id = 0; } - /* For now, consider FileDirEntryRevision::poin as not owned here, - * so no need to do anything about it */ - - if (!BLI_listbase_is_empty(&entry->variants)) { -FileDirEntryVariant *var; - -
[Bf-blender-cvs] [ff5a6367011] temp-lineart-contained: Build: upgrade NanoVDB library to latest revision
Commit: ff5a6367011e2895af7934d4c28c23292477bc17 Author: Brecht Van Lommel Date: Fri Jul 2 18:58:31 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rBff5a6367011e2895af7934d4c28c23292477bc17 Build: upgrade NanoVDB library to latest revision This includes improved handling of OpenVDB trees with inactive voxels, which previously could throw an error. Ref T89581, T88438 === M build_files/build_environment/cmake/versions.cmake M build_files/build_environment/install_deps.sh === diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index d93b8463b4b..38cadff2202 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -216,9 +216,9 @@ set(OPENVDB_HASH 01b490be16cc0e15c690f9a153c21461) set(OPENVDB_HASH_TYPE MD5) set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz) -set(NANOVDB_GIT_UID e62f7a0bf1e27397223c61ddeaaf57edf111b77f) +set(NANOVDB_GIT_UID dc37d8a631922e7bef46712947dc19b755f3e841) set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz) -set(NANOVDB_HASH 90919510bc6ccd630fedc56f748cb199) +set(NANOVDB_HASH e7b9e863ec2f3b04ead171dec2322807) set(NANOVDB_HASH_TYPE MD5) set(NANOVDB_FILE nano-vdb-${NANOVDB_GIT_UID}.tar.gz) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 808e154955d..22fb6602d7a 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1073,7 +1073,7 @@ OPENVDB_SOURCE=( "https://github.com/AcademySoftwareFoundation/openvdb/archive/v #~ OPENVDB_SOURCE_REPO_BRANCH="dev" NANOVDB_USE_REPO=false -NANOVDB_SOURCE_REPO_UID="e62f7a0bf1e27397223c61ddeaaf57edf111b77f" +NANOVDB_SOURCE_REPO_UID="dc37d8a631922e7bef46712947dc19b755f3e841" NANOVDB_SOURCE=( "https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_SOURCE_REPO_UID}.tar.gz"; ) ALEMBIC_USE_REPO=false ___ 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] [d74b0c513c0] temp-lineart-contained: Cleanup: Further use of const when accessing evaluated mesh
Commit: d74b0c513c08260738bb3cdf6880324b815aad6c Author: Hans Goudey Date: Fri Jul 2 11:56:29 2021 -0500 Branches: temp-lineart-contained https://developer.blender.org/rBd74b0c513c08260738bb3cdf6880324b815aad6c Cleanup: Further use of const when accessing evaluated mesh Also resolve a warning from the previous commit. The next blocker to using const is `BKE_mesh_wrapper_ensure_mdata`. === M source/blender/blenkernel/intern/constraint.c M source/blender/blenkernel/intern/mesh_runtime.c M source/blender/editors/physics/particle_edit.c M source/blender/editors/transform/transform_snap_object.c === diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index fa6329af33f..fe207f81d7d 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -5099,7 +5099,7 @@ static void followtrack_project_to_depth_object_if_needed(FollowTrackContext *co } Object *depth_object = context->depth_object; - Mesh *depth_mesh = BKE_object_get_evaluated_mesh(depth_object); + const Mesh *depth_mesh = BKE_object_get_evaluated_mesh(depth_object); if (depth_mesh == NULL) { return; } diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c index 6ae534012a9..47d300dc0c2 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.c +++ b/source/blender/blenkernel/intern/mesh_runtime.c @@ -175,7 +175,7 @@ const MLoopTri *BKE_mesh_runtime_looptri_ensure(const Mesh *mesh) } else { /* Must isolate multithreaded tasks while holding a mutex lock. */ -BLI_task_isolate(mesh_runtime_looptri_recalc_isolated, mesh); +BLI_task_isolate(mesh_runtime_looptri_recalc_isolated, (void *)mesh); looptri = mesh->runtime.looptris.array; } diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 3f15d572cdd..ef39641b5f6 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -537,7 +537,7 @@ static void PE_set_view3d_data(bContext *C, PEData *data) static bool PE_create_shape_tree(PEData *data, Object *shapeob) { Object *shapeob_eval = DEG_get_evaluated_object(data->depsgraph, shapeob); - Mesh *mesh = BKE_object_get_evaluated_mesh(shapeob_eval); + const Mesh *mesh = BKE_object_get_evaluated_mesh(shapeob_eval); memset(&data->shape_bvh, 0, sizeof(data->shape_bvh)); diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 4212045a33d..8a4c8f410c0 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -255,7 +255,7 @@ static SnapObjectData *snap_object_data_lookup(SnapObjectContext *sctx, Object * static SnapObjectData *snap_object_data_mesh_get(SnapObjectContext *sctx, Object *ob_eval, - Mesh *me_eval, + const Mesh *me_eval, bool use_hide) { SnapObjectData *sod; @@ -687,7 +687,7 @@ static bool raycastMesh(SnapObjectContext *sctx, const float ray_start[3], const float ray_dir[3], Object *ob_eval, -Mesh *me_eval, +const Mesh *me_eval, const float obmat[4][4], const uint ob_index, bool use_hide, @@ -1088,7 +1088,7 @@ static void raycast_obj_fn(SnapObjectContext *sctx, case OB_SURF: case OB_FONT: { if (!is_object_active) { -Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval); +const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval); if (mesh_eval) { retval = raycastMesh(sctx, dt->ray_start, ___ 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] [a786eae93de] temp-lineart-contained: Fix T89581: Cycles crash rendering some OpenVDB files with inactive voxels
Commit: a786eae93deead6997cb2c7093ef665591098139 Author: Brecht Van Lommel Date: Thu Jul 1 21:18:55 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rBa786eae93deead6997cb2c7093ef665591098139 Fix T89581: Cycles crash rendering some OpenVDB files with inactive voxels Print an error message instead. === M intern/cycles/render/image_vdb.cpp === diff --git a/intern/cycles/render/image_vdb.cpp b/intern/cycles/render/image_vdb.cpp index 13cdda552ba..6202035ba3b 100644 --- a/intern/cycles/render/image_vdb.cpp +++ b/intern/cycles/render/image_vdb.cpp @@ -16,6 +16,7 @@ #include "render/image_vdb.h" +#include "util/util_logging.h" #include "util/util_openvdb.h" #ifdef WITH_OPENVDB @@ -61,7 +62,13 @@ struct ToNanoOp { bool operator()(const openvdb::GridBase::ConstPtr &grid) { if constexpr (!std::is_same_v) { - nanogrid = nanovdb::openToNanoVDB(FloatGridType(*openvdb::gridConstPtrCast(grid))); + try { +nanogrid = nanovdb::openToNanoVDB( +FloatGridType(*openvdb::gridConstPtrCast(grid))); + } + catch (const std::exception &e) { +VLOG(1) << "Error converting OpenVDB to NanoVDB grid: " << e.what(); + } return true; } else { ___ 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] [0a40cfb79a6] temp-lineart-contained: Cleanup: Fix variable redeclaration warning
Commit: 0a40cfb79a67d2f7f8eb4ba151c7c13169988b79 Author: Hans Goudey Date: Fri Jul 2 10:07:43 2021 -0500 Branches: temp-lineart-contained https://developer.blender.org/rB0a40cfb79a67d2f7f8eb4ba151c7c13169988b79 Cleanup: Fix variable redeclaration warning === M source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc === diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc index dbd2ef157af..219d03c1dcd 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc @@ -267,20 +267,20 @@ static void spreadsheet_row_filters_layout(const bContext *C, Panel *panel) } else { /* Assuming there's only one group of instanced panels, update the custom data pointers. */ -Panel *panel = (Panel *)region->panels.first; +Panel *panel_iter = (Panel *)region->panels.first; LISTBASE_FOREACH (SpreadsheetRowFilter *, row_filter, row_filters) { /* Move to the next instanced panel corresponding to the next filter. */ - while ((panel->type == nullptr) || !(panel->type->flag & PANEL_TYPE_INSTANCED)) { -panel = panel->next; -BLI_assert(panel != nullptr); /* There shouldn't be fewer panels than filters. */ + while ((panel_iter->type == nullptr) || !(panel_iter->type->flag & PANEL_TYPE_INSTANCED)) { +panel_iter = panel_iter->next; +BLI_assert(panel_iter != nullptr); /* There shouldn't be fewer panels than filters. */ } PointerRNA *filter_ptr = (PointerRNA *)MEM_mallocN(sizeof(PointerRNA), "panel customdata"); RNA_pointer_create(&screen->id, &RNA_SpreadsheetRowFilter, row_filter, filter_ptr); - UI_panel_custom_data_set(panel, filter_ptr); + UI_panel_custom_data_set(panel_iter, filter_ptr); - panel = panel->next; + panel_iter = panel_iter->next; } } } ___ 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] [41078f22ef7] temp-lineart-contained: GPencil: Fix compiler warnings in previous commit
Commit: 41078f22ef76b81d0c2a67ea190054f2724a4ff9 Author: Antonio Vazquez Date: Fri Jul 2 16:32:01 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rB41078f22ef76b81d0c2a67ea190054f2724a4ff9 GPencil: Fix compiler warnings in previous commit === M source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c M source/blender/gpencil_modifiers/intern/MOD_gpencilweight.c === diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c index 358b5577b97..63546c26068 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c @@ -176,8 +176,8 @@ static void deformStroke(GpencilModifierData *md, /* Use weightened factor. */ if (mmd->flag & GP_TINT_WEIGHT_FACTOR) { /* Use first point for weight. */ - MDeformVert *dvert = (gps->dvert != NULL) ? &gps->dvert[0] : NULL; - float weight = get_modifier_point_weight(dvert, is_inverted, def_nr); + MDeformVert *dvert_fill = (gps->dvert != NULL) ? &gps->dvert[0] : NULL; + float weight = get_modifier_point_weight(dvert_fill, is_inverted, def_nr); if (weight >= 0.0f) { fill_factor = ((mmd->flag & GP_TINT_INVERT_VGROUP) ? 1.0f - weight : weight); } diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilweight.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilweight.c index 76960505395..c7fe20edef7 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilweight.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilweight.c @@ -249,7 +249,7 @@ static bool isDisabled(GpencilModifierData *md, int UNUSED(userRenderParams)) return !(mmd->target_vgname && mmd->target_vgname[0] != '\0'); } -static void distance_panel_draw(const bContext *C, Panel *panel) +static void distance_panel_draw(const bContext *UNUSED(C), Panel *panel) { PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL); ___ 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] [c1fc19ab725] greasepencil-object: Merge branch 'master' into greasepencil-object
Commit: c1fc19ab7259584df8b612240b5599f01375e521 Author: Antonio Vazquez Date: Sat Jul 3 17:41:36 2021 +0200 Branches: greasepencil-object https://developer.blender.org/rBc1fc19ab7259584df8b612240b5599f01375e521 Merge branch 'master' into greasepencil-object === === ___ 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] [b73dc36859e] master: GPencil: Add weight factor to Offset randomize
Commit: b73dc36859e03845f702a3e985b536ac9afef63a Author: Antonio Vazquez Date: Sat Jul 3 17:33:13 2021 +0200 Branches: master https://developer.blender.org/rBb73dc36859e03845f702a3e985b536ac9afef63a GPencil: Add weight factor to Offset randomize Now, The weight is used in the randomize parameters of the offset modifier. This is useful to generate effects like explosions. Related to the new Vertex Weight modifiers. === M source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c === diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c index cd29a006aae..1a38b91a18b 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c @@ -129,14 +129,6 @@ static void deformStroke(GpencilModifierData *md, } } } - /* Calculate Random matrix. */ - float mat_rnd[4][4]; - float rnd_loc[3], rnd_rot[3]; - float rnd_scale[3] = {1.0f, 1.0f, 1.0f}; - mul_v3_v3v3(rnd_loc, mmd->rnd_offset, rand[0]); - mul_v3_v3v3(rnd_rot, mmd->rnd_rot, rand[1]); - madd_v3_v3v3(rnd_scale, mmd->rnd_scale, rand[2]); - loc_eul_size_to_mat4(mat_rnd, rnd_loc, rnd_rot, rnd_scale); bGPdata *gpd = ob->data; @@ -150,6 +142,21 @@ static void deformStroke(GpencilModifierData *md, if (weight < 0.0f) { continue; } + +/* Calculate Random matrix. */ +float mat_rnd[4][4]; +float rnd_loc[3], rnd_rot[3], rnd_scale_weight[3]; +float rnd_scale[3] = {1.0f, 1.0f, 1.0f}; + +mul_v3_v3fl(rnd_loc, rand[0], weight); +mul_v3_v3fl(rnd_rot, rand[1], weight); +mul_v3_v3fl(rnd_scale_weight, rand[2], weight); + +mul_v3_v3v3(rnd_loc, mmd->rnd_offset, rnd_loc); +mul_v3_v3v3(rnd_rot, mmd->rnd_rot, rnd_rot); +madd_v3_v3v3(rnd_scale, mmd->rnd_scale, rnd_scale_weight); + +loc_eul_size_to_mat4(mat_rnd, rnd_loc, rnd_rot, rnd_scale); /* Apply randomness matrix. */ mul_m4_v3(mat_rnd, &pt->x); ___ 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] [b6732c47c1c] temp-lineart-contained: GPencil: Fix bug in previous commit with Scale
Commit: b6732c47c1c2cad79c2035591ec10e12926b0b81 Author: Antonio Vazquez Date: Sat Jul 3 17:15:28 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rBb6732c47c1c2cad79c2035591ec10e12926b0b81 GPencil: Fix bug in previous commit with Scale === M source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c === diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c index 35b4efe1e0f..1a38b91a18b 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c @@ -145,12 +145,17 @@ static void deformStroke(GpencilModifierData *md, /* Calculate Random matrix. */ float mat_rnd[4][4]; -float rnd_loc[3] = {rand[0][0] * weight, rand[0][1] * weight, rand[0][2] * weight}; -float rnd_rot[3] = {rand[1][0] * weight, rand[1][1] * weight, rand[1][2] * weight}; -float rnd_scale[3] = {rand[2][0] * weight, rand[2][1] * weight, rand[2][2] * weight}; +float rnd_loc[3], rnd_rot[3], rnd_scale_weight[3]; +float rnd_scale[3] = {1.0f, 1.0f, 1.0f}; + +mul_v3_v3fl(rnd_loc, rand[0], weight); +mul_v3_v3fl(rnd_rot, rand[1], weight); +mul_v3_v3fl(rnd_scale_weight, rand[2], weight); + mul_v3_v3v3(rnd_loc, mmd->rnd_offset, rnd_loc); mul_v3_v3v3(rnd_rot, mmd->rnd_rot, rnd_rot); -madd_v3_v3v3(rnd_scale, mmd->rnd_scale, rnd_scale); +madd_v3_v3v3(rnd_scale, mmd->rnd_scale, rnd_scale_weight); + loc_eul_size_to_mat4(mat_rnd, rnd_loc, rnd_rot, rnd_scale); /* Apply randomness matrix. */ mul_m4_v3(mat_rnd, &pt->x); ___ 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] [7b1f4a1a89f] temp-lineart-contained: GPencil: Test weight in Offset Randomize
Commit: 7b1f4a1a89fb235e95d6a7298933f6634404d118 Author: Antonio Vazquez Date: Sat Jul 3 17:05:52 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rB7b1f4a1a89fb235e95d6a7298933f6634404d118 GPencil: Test weight in Offset Randomize Test using the vertex weight to modulate randomness === M source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c === diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c index cd29a006aae..35b4efe1e0f 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c @@ -129,14 +129,6 @@ static void deformStroke(GpencilModifierData *md, } } } - /* Calculate Random matrix. */ - float mat_rnd[4][4]; - float rnd_loc[3], rnd_rot[3]; - float rnd_scale[3] = {1.0f, 1.0f, 1.0f}; - mul_v3_v3v3(rnd_loc, mmd->rnd_offset, rand[0]); - mul_v3_v3v3(rnd_rot, mmd->rnd_rot, rand[1]); - madd_v3_v3v3(rnd_scale, mmd->rnd_scale, rand[2]); - loc_eul_size_to_mat4(mat_rnd, rnd_loc, rnd_rot, rnd_scale); bGPdata *gpd = ob->data; @@ -150,6 +142,16 @@ static void deformStroke(GpencilModifierData *md, if (weight < 0.0f) { continue; } + +/* Calculate Random matrix. */ +float mat_rnd[4][4]; +float rnd_loc[3] = {rand[0][0] * weight, rand[0][1] * weight, rand[0][2] * weight}; +float rnd_rot[3] = {rand[1][0] * weight, rand[1][1] * weight, rand[1][2] * weight}; +float rnd_scale[3] = {rand[2][0] * weight, rand[2][1] * weight, rand[2][2] * weight}; +mul_v3_v3v3(rnd_loc, mmd->rnd_offset, rnd_loc); +mul_v3_v3v3(rnd_rot, mmd->rnd_rot, rnd_rot); +madd_v3_v3v3(rnd_scale, mmd->rnd_scale, rnd_scale); +loc_eul_size_to_mat4(mat_rnd, rnd_loc, rnd_rot, rnd_scale); /* Apply randomness matrix. */ mul_m4_v3(mat_rnd, &pt->x); ___ 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] [1482150de27] wl_default7: cmake: add 'wayland-protocols' to 'make deps'
Commit: 1482150de2719e5201fa071c26f9c6d6f75a125c Author: Christian Rauch Date: Tue Jun 29 23:36:23 2021 +0100 Branches: wl_default7 https://developer.blender.org/rB1482150de2719e5201fa071c26f9c6d6f75a125c cmake: add 'wayland-protocols' to 'make deps' === M build_files/build_environment/CMakeLists.txt M build_files/build_environment/cmake/harvest.cmake M build_files/build_environment/cmake/versions.cmake A build_files/build_environment/cmake/wayland_protocols.cmake === diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index fb79eee62be..62b4602a998 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -164,6 +164,7 @@ endif() if(UNIX AND NOT APPLE) include(cmake/libglu.cmake) include(cmake/mesa.cmake) + include(cmake/wayland_protocols.cmake) endif() include(cmake/harvest.cmake) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index fc7e652a028..b94790507b2 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -126,6 +126,8 @@ if(UNIX AND NOT APPLE) harvest(xml2/include xml2/include "*.h") harvest(xml2/lib xml2/lib "*.a") + + harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml") else() harvest(blosc/lib openvdb/lib "*.a") harvest(xml2/lib opencollada/lib "*.a") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 38cadff2202..43217fa9238 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -462,6 +462,12 @@ set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75) set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) +set(WL_PROTOCOLS_VERSION 1.21) +set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) +set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) +set(WL_PROTOCOLS_HASH_TYPE MD5) +set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) + if(BLENDER_PLATFORM_ARM) # Unreleased version with macOS arm support. set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip) diff --git a/build_files/build_environment/cmake/wayland_protocols.cmake b/build_files/build_environment/cmake/wayland_protocols.cmake new file mode 100644 index 000..380c8b6fde1 --- /dev/null +++ b/build_files/build_environment/cmake/wayland_protocols.cmake @@ -0,0 +1,27 @@ +# * BEGIN GPL LICENSE BLOCK * +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# * END GPL LICENSE BLOCK * + +ExternalProject_Add(external_wayland_protocols + URL ${WL_PROTOCOLS_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH} + PREFIX ${BUILD_DIR}/wayland-protocols + CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols ${DEFAULT_CMAKE_FLAGS} + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) ___ 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] [166a83c93d9] wl_default7: cmake: use harvested 'wayland-protocols' if system version is insufficient
Commit: 166a83c93d9dbb49b4a7c2b3dd63115e01afe66c Author: Christian Rauch Date: Wed Jun 23 21:43:04 2021 +0100 Branches: wl_default7 https://developer.blender.org/rB166a83c93d9dbb49b4a7c2b3dd63115e01afe66c cmake: use harvested 'wayland-protocols' if system version is insufficient === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 77ec307e604..0d076bd8dc1 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -294,7 +294,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + +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. macro(generate_protocol_bindings NAME PROT_DEF) ___ 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] [1a4bafecf28] wl_default7: cmake: enable Wayland by default
Commit: 1a4bafecf28de52b033ffe029122c51c38260347 Author: Christian Rauch Date: Sun May 23 16:41:29 2021 +0100 Branches: wl_default7 https://developer.blender.org/rB1a4bafecf28de52b033ffe029122c51c38260347 cmake: enable Wayland by default === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index 297e32bd67e..8c1b92d083f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,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" ON) mark_as_advanced(WITH_GHOST_WAYLAND) 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] [071d1ceadf2] wl_default7: doc: add Wayland dependencies
Commit: 071d1ceadf2bd1310a92c0b3834972bd8b334317 Author: Christian Rauch Date: Sat Jun 5 00:35:24 2021 +0100 Branches: wl_default7 https://developer.blender.org/rB071d1ceadf2bd1310a92c0b3834972bd8b334317 doc: add Wayland dependencies The wayland support requires the following development packages: libwayland-dev, wayland-protocols, libegl-dev, libxkbcommon-dev, libdbus-1-dev, linux-libc-dev === M build_files/build_environment/install_deps.sh === diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 22fb6602d7a..65918777e47 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1128,6 +1128,7 @@ Those libraries should be available as packages in all recent distributions (opt * Basics of dev environment (cmake, gcc, svn , git, ...). * libjpeg, libpng, libtiff, [openjpeg2], [libopenal]. * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). +* libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland) * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. * libsdl2, libglew, libpugixml, libpotrace, [libgmp], [libglewmx], fontconfig, [libharu/libhpdf].\"" @@ -3839,6 +3840,7 @@ install_DEB() { _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \ libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ + libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \ @@ -4508,6 +4510,7 @@ install_RPM() { _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \ libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ + wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \ ___ 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] [702d8c26527] wl_default7: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set
Commit: 702d8c26527ca381218e63378a71e17807cd4617 Author: Christian Rauch Date: Thu Jun 3 21:12:09 2021 +0100 Branches: wl_default7 https://developer.blender.org/rB702d8c26527ca381218e63378a71e17807cd4617 GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set === M intern/ghost/intern/GHOST_ISystem.cpp === diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp index 7c12bfe0306..5ef942efb59 100644 --- a/intern/ghost/intern/GHOST_ISystem.cpp +++ b/intern/ghost/intern/GHOST_ISystem.cpp @@ -55,11 +55,13 @@ 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. */ +if (std::getenv("BLENDER_WAYLAND")) { + try { +m_system = new GHOST_SystemWayland(); + } + catch (const std::runtime_error &) { +/* fallback to X11. */ + } } 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] [64be503a042] wl_default7: GHOST/wayland: define BTN event codes manually
Commit: 64be503a04281700db13a243b0bf60c86feb0e8b Author: Christian Rauch Date: Sat Jul 3 00:14:04 2021 +0100 Branches: wl_default7 https://developer.blender.org/rB64be503a04281700db13a243b0bf60c86feb0e8b GHOST/wayland: define BTN event codes manually === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index f54a022f249..aa830b9a23e 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -47,12 +47,15 @@ #include #include -#include #include #include #include +#define BTN_LEFT0x110 +#define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 + struct buffer_t { void *data; size_t size; ___ 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] [9b89de2571b] master: Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Commit: 9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 Author: Campbell Barton Date: Sat Jul 3 23:08:40 2021 +1000 Branches: master https://developer.blender.org/rB9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX Also use doxy style function reference `#` prefix chars when referencing identifiers. === M intern/cycles/kernel/kernel_bake.h M intern/ghost/intern/GHOST_SystemSDL.cpp M intern/ghost/intern/GHOST_SystemWin32.cpp M intern/ghost/intern/GHOST_SystemX11.cpp M intern/ghost/intern/GHOST_WindowSDL.cpp M source/blender/blenfont/intern/blf_font.c M source/blender/blenfont/intern/blf_glyph.c M source/blender/blenkernel/BKE_DerivedMesh.h M source/blender/blenkernel/BKE_data_transfer.h M source/blender/blenkernel/BKE_key.h M source/blender/blenkernel/BKE_lib_remap.h M source/blender/blenkernel/BKE_main.h M source/blender/blenkernel/BKE_mesh_remap.h M source/blender/blenkernel/BKE_nla.h M source/blender/blenkernel/BKE_node.h M source/blender/blenkernel/BKE_pbvh.h M source/blender/blenkernel/intern/DerivedMesh.cc M source/blender/blenkernel/intern/action.c M source/blender/blenkernel/intern/anim_data.c M source/blender/blenkernel/intern/anim_sys.c M source/blender/blenkernel/intern/anim_visualization.c M source/blender/blenkernel/intern/armature.c M source/blender/blenkernel/intern/bpath.c M source/blender/blenkernel/intern/brush.c M source/blender/blenkernel/intern/bvhutils.cc M source/blender/blenkernel/intern/cdderivedmesh.c M source/blender/blenkernel/intern/cloth.c M source/blender/blenkernel/intern/collection.c M source/blender/blenkernel/intern/colorband.c M source/blender/blenkernel/intern/colortools.c M source/blender/blenkernel/intern/constraint.c M source/blender/blenkernel/intern/curve.c M source/blender/blenkernel/intern/curve_deform.c M source/blender/blenkernel/intern/customdata.c M source/blender/blenkernel/intern/data_transfer.c M source/blender/blenkernel/intern/deform.c M source/blender/blenkernel/intern/displist_tangent.c M source/blender/blenkernel/intern/dynamicpaint.c M source/blender/blenkernel/intern/editmesh.c M source/blender/blenkernel/intern/editmesh_bvh.c M source/blender/blenkernel/intern/editmesh_tangent.c M source/blender/blenkernel/intern/fcurve.c M source/blender/blenkernel/intern/fmodifier.c M source/blender/blenkernel/intern/font.c M source/blender/blenkernel/intern/gpencil.c M source/blender/blenkernel/intern/gpencil_geom.c M source/blender/blenkernel/intern/gpencil_modifier.c M source/blender/blenkernel/intern/idprop.c M source/blender/blenkernel/intern/idprop_utils.c M source/blender/blenkernel/intern/image.c M source/blender/blenkernel/intern/image_save.c M source/blender/blenkernel/intern/ipo.c M source/blender/blenkernel/intern/lib_id.c M source/blender/blenkernel/intern/lib_id_delete.c M source/blender/blenkernel/intern/lib_override.c M source/blender/blenkernel/intern/lib_query.c M source/blender/blenkernel/intern/lib_remap.c M source/blender/blenkernel/intern/library.c M source/blender/blenkernel/intern/main.c M source/blender/blenkernel/intern/mask.c M source/blender/blenkernel/intern/mask_evaluate.c M source/blender/blenkernel/intern/mask_rasterize.c M source/blender/blenkernel/intern/material.c M source/blender/blenkernel/intern/mball.c M source/blender/blenkernel/intern/mball_tessellate.c M source/blender/blenkernel/intern/mesh.c M source/blender/blenkernel/intern/mesh_boolean_convert.cc M source/blender/blenkernel/intern/mesh_convert.c M source/blender/blenkernel/intern/mesh_evaluate.c M source/blender/blenkernel/intern/mesh_mapping.c M source/blender/blenkernel/intern/mesh_merge.c M source/blender/blenkernel/intern/mesh_normals.c M source/blender/blenkernel/intern/mesh_remap.c M source/blender/blenkernel/intern/mesh_runtime.c M source/blender/blenkernel/intern/mesh_tangent.c M source/blender/blenkernel/intern/mesh_validate.c M source/blender/blenkernel/intern/modifier.c M source/blender/blenkernel/intern/movieclip.c M source/blender/blenkernel/intern/node.cc M source/blender/blenkernel/intern/object.c M source/blender/blenkernel/intern/ocean.c M source/blender/blenkernel/intern/packedFile.c M source/blender/blenkernel/intern/paint.c M source/blender/blenkernel/intern/particle.c M source/blender/blenkernel/intern/particle_child.c M source/blender/blenkernel/intern/particle_distribute.c M source/blender/blenkernel/intern/particle_system.c M
[Bf-blender-cvs] [1482150de27] wl_default6: cmake: add 'wayland-protocols' to 'make deps'
Commit: 1482150de2719e5201fa071c26f9c6d6f75a125c Author: Christian Rauch Date: Tue Jun 29 23:36:23 2021 +0100 Branches: wl_default6 https://developer.blender.org/rB1482150de2719e5201fa071c26f9c6d6f75a125c cmake: add 'wayland-protocols' to 'make deps' === M build_files/build_environment/CMakeLists.txt M build_files/build_environment/cmake/harvest.cmake M build_files/build_environment/cmake/versions.cmake A build_files/build_environment/cmake/wayland_protocols.cmake === diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index fb79eee62be..62b4602a998 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -164,6 +164,7 @@ endif() if(UNIX AND NOT APPLE) include(cmake/libglu.cmake) include(cmake/mesa.cmake) + include(cmake/wayland_protocols.cmake) endif() include(cmake/harvest.cmake) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index fc7e652a028..b94790507b2 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -126,6 +126,8 @@ if(UNIX AND NOT APPLE) harvest(xml2/include xml2/include "*.h") harvest(xml2/lib xml2/lib "*.a") + + harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml") else() harvest(blosc/lib openvdb/lib "*.a") harvest(xml2/lib opencollada/lib "*.a") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 38cadff2202..43217fa9238 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -462,6 +462,12 @@ set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75) set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) +set(WL_PROTOCOLS_VERSION 1.21) +set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) +set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) +set(WL_PROTOCOLS_HASH_TYPE MD5) +set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) + if(BLENDER_PLATFORM_ARM) # Unreleased version with macOS arm support. set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip) diff --git a/build_files/build_environment/cmake/wayland_protocols.cmake b/build_files/build_environment/cmake/wayland_protocols.cmake new file mode 100644 index 000..380c8b6fde1 --- /dev/null +++ b/build_files/build_environment/cmake/wayland_protocols.cmake @@ -0,0 +1,27 @@ +# * BEGIN GPL LICENSE BLOCK * +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# * END GPL LICENSE BLOCK * + +ExternalProject_Add(external_wayland_protocols + URL ${WL_PROTOCOLS_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH} + PREFIX ${BUILD_DIR}/wayland-protocols + CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols ${DEFAULT_CMAKE_FLAGS} + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) ___ 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] [a6c9299a049] wl_default6: debug wlp version find
Commit: a6c9299a04965d8326a9a3214a65e8443971388d Author: Christian Rauch Date: Sat Jul 3 14:21:14 2021 +0100 Branches: wl_default6 https://developer.blender.org/rBa6c9299a04965d8326a9a3214a65e8443971388d debug wlp version find === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 09c82139290..98038ef837e 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -296,6 +296,21 @@ 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) +message("wlp found: " ${wayland-protocols_FOUND}) +message("wlp version: " ${wayland-protocols_VERSION}) +if (${wayland-protocols_FOUND}) + if (${wayland-protocols_VERSION} VERSION_GREATER_EQUAL "1.15") +message("wlp version match") + else() +message("wlp version NOT match") + endif() +else() + message("wlp NOT found") +endif() + +if (NOT DEFINED wayland-protocols_FOUND) + message("wlp mssing") +endif() if (${wayland-protocols_FOUND}) pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) else() @@ -303,6 +318,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml PATH_SUFFIXES share/wayland-protocols ) + message("wlp manual found: " ${WAYLAND_PROTOCOLS_DIR}) endif() if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) ___ 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] [74187220e06] wl_default6: check WAYLAND_PROTOCOLS_DIR
Commit: 74187220e06abf62ee896880c83556bedb3dd874 Author: Christian Rauch Date: Sat Jul 3 15:24:54 2021 +0100 Branches: wl_default6 https://developer.blender.org/rB74187220e06abf62ee896880c83556bedb3dd874 check WAYLAND_PROTOCOLS_DIR === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 98038ef837e..04d3c75b2c3 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -321,7 +321,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) message("wlp manual found: " ${WAYLAND_PROTOCOLS_DIR}) endif() -if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) +if (NOT ${WAYLAND_PROTOCOLS_DIR}) message(FATAL_ERROR "path to wayland-protocols not found") 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] [356d3354a08] wl_default6: cmake: use harvested 'wayland-protocols' if system version is insufficient
Commit: 356d3354a085418bbd4681d5ea0b08d55072de67 Author: Christian Rauch Date: Wed Jun 23 21:43:04 2021 +0100 Branches: wl_default6 https://developer.blender.org/rB356d3354a085418bbd4681d5ea0b08d55072de67 cmake: use harvested 'wayland-protocols' if system version is insufficient === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 77ec307e604..09c82139290 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -294,7 +294,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + +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 DEFINED WAYLAND_PROTOCOLS_DIR) + message(FATAL_ERROR "path to wayland-protocols not found") +endif() # Generate protocols bindings. macro(generate_protocol_bindings NAME PROT_DEF) ___ 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] [702d8c26527] wl_default6: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set
Commit: 702d8c26527ca381218e63378a71e17807cd4617 Author: Christian Rauch Date: Thu Jun 3 21:12:09 2021 +0100 Branches: wl_default6 https://developer.blender.org/rB702d8c26527ca381218e63378a71e17807cd4617 GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set === M intern/ghost/intern/GHOST_ISystem.cpp === diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp index 7c12bfe0306..5ef942efb59 100644 --- a/intern/ghost/intern/GHOST_ISystem.cpp +++ b/intern/ghost/intern/GHOST_ISystem.cpp @@ -55,11 +55,13 @@ 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. */ +if (std::getenv("BLENDER_WAYLAND")) { + try { +m_system = new GHOST_SystemWayland(); + } + catch (const std::runtime_error &) { +/* fallback to X11. */ + } } 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] [071d1ceadf2] wl_default6: doc: add Wayland dependencies
Commit: 071d1ceadf2bd1310a92c0b3834972bd8b334317 Author: Christian Rauch Date: Sat Jun 5 00:35:24 2021 +0100 Branches: wl_default6 https://developer.blender.org/rB071d1ceadf2bd1310a92c0b3834972bd8b334317 doc: add Wayland dependencies The wayland support requires the following development packages: libwayland-dev, wayland-protocols, libegl-dev, libxkbcommon-dev, libdbus-1-dev, linux-libc-dev === M build_files/build_environment/install_deps.sh === diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 22fb6602d7a..65918777e47 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1128,6 +1128,7 @@ Those libraries should be available as packages in all recent distributions (opt * Basics of dev environment (cmake, gcc, svn , git, ...). * libjpeg, libpng, libtiff, [openjpeg2], [libopenal]. * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). +* libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland) * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. * libsdl2, libglew, libpugixml, libpotrace, [libgmp], [libglewmx], fontconfig, [libharu/libhpdf].\"" @@ -3839,6 +3840,7 @@ install_DEB() { _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \ libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ + libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \ @@ -4508,6 +4510,7 @@ install_RPM() { _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \ libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ + wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \ ___ 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] [1a4bafecf28] wl_default6: cmake: enable Wayland by default
Commit: 1a4bafecf28de52b033ffe029122c51c38260347 Author: Christian Rauch Date: Sun May 23 16:41:29 2021 +0100 Branches: wl_default6 https://developer.blender.org/rB1a4bafecf28de52b033ffe029122c51c38260347 cmake: enable Wayland by default === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index 297e32bd67e..8c1b92d083f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,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" ON) mark_as_advanced(WITH_GHOST_WAYLAND) 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] [64be503a042] wl_default6: GHOST/wayland: define BTN event codes manually
Commit: 64be503a04281700db13a243b0bf60c86feb0e8b Author: Christian Rauch Date: Sat Jul 3 00:14:04 2021 +0100 Branches: wl_default6 https://developer.blender.org/rB64be503a04281700db13a243b0bf60c86feb0e8b GHOST/wayland: define BTN event codes manually === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index f54a022f249..aa830b9a23e 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -47,12 +47,15 @@ #include #include -#include #include #include #include +#define BTN_LEFT0x110 +#define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 + struct buffer_t { void *data; size_t size; ___ 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] [f8d8b4e8cb3] wl_default2: debug wlp version find
Commit: f8d8b4e8cb31672134c319106157a6e00a15e257 Author: Christian Rauch Date: Sat Jul 3 14:21:14 2021 +0100 Branches: wl_default2 https://developer.blender.org/rBf8d8b4e8cb31672134c319106157a6e00a15e257 debug wlp version find === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 09c82139290..98038ef837e 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -296,6 +296,21 @@ 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) +message("wlp found: " ${wayland-protocols_FOUND}) +message("wlp version: " ${wayland-protocols_VERSION}) +if (${wayland-protocols_FOUND}) + if (${wayland-protocols_VERSION} VERSION_GREATER_EQUAL "1.15") +message("wlp version match") + else() +message("wlp version NOT match") + endif() +else() + message("wlp NOT found") +endif() + +if (NOT DEFINED wayland-protocols_FOUND) + message("wlp mssing") +endif() if (${wayland-protocols_FOUND}) pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) else() @@ -303,6 +318,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml PATH_SUFFIXES share/wayland-protocols ) + message("wlp manual found: " ${WAYLAND_PROTOCOLS_DIR}) endif() if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) ___ 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] [5902fe7f791] wl_default2: cmake: add 'wayland-protocols' to 'deps' make step
Commit: 5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 Author: Christian Rauch Date: Tue Jun 29 23:36:23 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 cmake: add 'wayland-protocols' to 'deps' make step === M build_files/build_environment/CMakeLists.txt M build_files/build_environment/cmake/harvest.cmake M build_files/build_environment/cmake/versions.cmake A build_files/build_environment/cmake/wayland_protocols.cmake === diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index fb79eee62be..b0891ec2559 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -159,6 +159,7 @@ if(UNIX) include(cmake/lzma.cmake) include(cmake/ssl.cmake) include(cmake/sqlite.cmake) + include(cmake/wayland_protocols.cmake) endif() if(UNIX AND NOT APPLE) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index fc7e652a028..50d010cbcdc 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -155,6 +155,7 @@ harvest(openvdb/lib openvdb/lib "*.a") harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h") harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h") harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a") +harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml") harvest(osl/bin osl/bin "oslc") harvest(osl/include osl/include "*.h") harvest(osl/lib osl/lib "*.a") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 38cadff2202..43217fa9238 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -462,6 +462,12 @@ set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75) set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) +set(WL_PROTOCOLS_VERSION 1.21) +set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) +set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) +set(WL_PROTOCOLS_HASH_TYPE MD5) +set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) + if(BLENDER_PLATFORM_ARM) # Unreleased version with macOS arm support. set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip) diff --git a/build_files/build_environment/cmake/wayland_protocols.cmake b/build_files/build_environment/cmake/wayland_protocols.cmake new file mode 100644 index 000..380c8b6fde1 --- /dev/null +++ b/build_files/build_environment/cmake/wayland_protocols.cmake @@ -0,0 +1,27 @@ +# * BEGIN GPL LICENSE BLOCK * +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# * END GPL LICENSE BLOCK * + +ExternalProject_Add(external_wayland_protocols + URL ${WL_PROTOCOLS_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH} + PREFIX ${BUILD_DIR}/wayland-protocols + CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols ${DEFAULT_CMAKE_FLAGS} + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) ___ 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] [1d16fa46e55] wl_default2: check WAYLAND_PROTOCOLS_DIR
Commit: 1d16fa46e5546d5c630f431e8e47b7b327d95f55 Author: Christian Rauch Date: Sat Jul 3 15:24:54 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB1d16fa46e5546d5c630f431e8e47b7b327d95f55 check WAYLAND_PROTOCOLS_DIR === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 98038ef837e..04d3c75b2c3 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -321,7 +321,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) message("wlp manual found: " ${WAYLAND_PROTOCOLS_DIR}) endif() -if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) +if (NOT ${WAYLAND_PROTOCOLS_DIR}) message(FATAL_ERROR "path to wayland-protocols not found") 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] [9d3582f8726] wl_default2: cmake: use harvested 'wayland-protocols' if system version is insufficient
Commit: 9d3582f87267fd2303585cfa970db2dc3570b2e1 Author: Christian Rauch Date: Wed Jun 23 21:43:04 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB9d3582f87267fd2303585cfa970db2dc3570b2e1 cmake: use harvested 'wayland-protocols' if system version is insufficient === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 77ec307e604..09c82139290 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -294,7 +294,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + +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 DEFINED WAYLAND_PROTOCOLS_DIR) + message(FATAL_ERROR "path to wayland-protocols not found") +endif() # Generate protocols bindings. macro(generate_protocol_bindings NAME PROT_DEF) ___ 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] [702d8c26527] wl_default2: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set
Commit: 702d8c26527ca381218e63378a71e17807cd4617 Author: Christian Rauch Date: Thu Jun 3 21:12:09 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB702d8c26527ca381218e63378a71e17807cd4617 GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set === M intern/ghost/intern/GHOST_ISystem.cpp === diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp index 7c12bfe0306..5ef942efb59 100644 --- a/intern/ghost/intern/GHOST_ISystem.cpp +++ b/intern/ghost/intern/GHOST_ISystem.cpp @@ -55,11 +55,13 @@ 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. */ +if (std::getenv("BLENDER_WAYLAND")) { + try { +m_system = new GHOST_SystemWayland(); + } + catch (const std::runtime_error &) { +/* fallback to X11. */ + } } 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] [1a4bafecf28] wl_default2: cmake: enable Wayland by default
Commit: 1a4bafecf28de52b033ffe029122c51c38260347 Author: Christian Rauch Date: Sun May 23 16:41:29 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB1a4bafecf28de52b033ffe029122c51c38260347 cmake: enable Wayland by default === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index 297e32bd67e..8c1b92d083f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,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" ON) mark_as_advanced(WITH_GHOST_WAYLAND) 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] [071d1ceadf2] wl_default2: doc: add Wayland dependencies
Commit: 071d1ceadf2bd1310a92c0b3834972bd8b334317 Author: Christian Rauch Date: Sat Jun 5 00:35:24 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB071d1ceadf2bd1310a92c0b3834972bd8b334317 doc: add Wayland dependencies The wayland support requires the following development packages: libwayland-dev, wayland-protocols, libegl-dev, libxkbcommon-dev, libdbus-1-dev, linux-libc-dev === M build_files/build_environment/install_deps.sh === diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 22fb6602d7a..65918777e47 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1128,6 +1128,7 @@ Those libraries should be available as packages in all recent distributions (opt * Basics of dev environment (cmake, gcc, svn , git, ...). * libjpeg, libpng, libtiff, [openjpeg2], [libopenal]. * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). +* libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland) * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. * libsdl2, libglew, libpugixml, libpotrace, [libgmp], [libglewmx], fontconfig, [libharu/libhpdf].\"" @@ -3839,6 +3840,7 @@ install_DEB() { _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \ libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ + libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \ @@ -4508,6 +4510,7 @@ install_RPM() { _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \ libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ + wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \ ___ 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] [64be503a042] wl_default2: GHOST/wayland: define BTN event codes manually
Commit: 64be503a04281700db13a243b0bf60c86feb0e8b Author: Christian Rauch Date: Sat Jul 3 00:14:04 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB64be503a04281700db13a243b0bf60c86feb0e8b GHOST/wayland: define BTN event codes manually === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index f54a022f249..aa830b9a23e 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -47,12 +47,15 @@ #include #include -#include #include #include #include +#define BTN_LEFT0x110 +#define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 + struct buffer_t { void *data; size_t size; ___ 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] [143ae4f8003] soc-2021-knife-tools: Knife: Moved constrained angle mode to 'A' and moved cut through to 'C'
Commit: 143ae4f80038991ddb3b03fcf5310c7531ee9c0c Author: Cian Jinks Date: Sat Jul 3 15:24:43 2021 +0100 Branches: soc-2021-knife-tools https://developer.blender.org/rB143ae4f80038991ddb3b03fcf5310c7531ee9c0c Knife: Moved constrained angle mode to 'A' and moved cut through to 'C' This change keeps the knife tool default modal key mappings more centered towards the left side of the keyboard, improving the workflow of the tool. === M release/scripts/presets/keyconfig/keymap_data/blender_default.py === diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 8178f52411f..0d96455735a 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -5377,8 +5377,8 @@ def km_knife_tool_modal_map(_params): ("IGNORE_SNAP_OFF", {"type": 'LEFT_SHIFT', "value": 'RELEASE', "any": True}, None), ("IGNORE_SNAP_ON", {"type": 'RIGHT_SHIFT', "value": 'PRESS', "any": True}, None), ("IGNORE_SNAP_OFF", {"type": 'RIGHT_SHIFT', "value": 'RELEASE', "any": True}, None), -("ANGLE_SNAP_TOGGLE", {"type": 'C', "value": 'PRESS'}, None), -("CUT_THROUGH_TOGGLE", {"type": 'T', "value": 'PRESS'}, None), +("ANGLE_SNAP_TOGGLE", {"type": 'A', "value": 'PRESS'}, None), +("CUT_THROUGH_TOGGLE", {"type": 'C', "value": 'PRESS'}, None), ("SHOW_DISTANCE_ANGLE_TOGGLE", {"type": 'D', "value": 'PRESS'}, 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] [5902fe7f791] wl_default5: cmake: add 'wayland-protocols' to 'deps' make step
Commit: 5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 Author: Christian Rauch Date: Tue Jun 29 23:36:23 2021 +0100 Branches: wl_default5 https://developer.blender.org/rB5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 cmake: add 'wayland-protocols' to 'deps' make step === M build_files/build_environment/CMakeLists.txt M build_files/build_environment/cmake/harvest.cmake M build_files/build_environment/cmake/versions.cmake A build_files/build_environment/cmake/wayland_protocols.cmake === diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index fb79eee62be..b0891ec2559 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -159,6 +159,7 @@ if(UNIX) include(cmake/lzma.cmake) include(cmake/ssl.cmake) include(cmake/sqlite.cmake) + include(cmake/wayland_protocols.cmake) endif() if(UNIX AND NOT APPLE) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index fc7e652a028..50d010cbcdc 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -155,6 +155,7 @@ harvest(openvdb/lib openvdb/lib "*.a") harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h") harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h") harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a") +harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml") harvest(osl/bin osl/bin "oslc") harvest(osl/include osl/include "*.h") harvest(osl/lib osl/lib "*.a") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 38cadff2202..43217fa9238 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -462,6 +462,12 @@ set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75) set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) +set(WL_PROTOCOLS_VERSION 1.21) +set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) +set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) +set(WL_PROTOCOLS_HASH_TYPE MD5) +set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) + if(BLENDER_PLATFORM_ARM) # Unreleased version with macOS arm support. set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip) diff --git a/build_files/build_environment/cmake/wayland_protocols.cmake b/build_files/build_environment/cmake/wayland_protocols.cmake new file mode 100644 index 000..380c8b6fde1 --- /dev/null +++ b/build_files/build_environment/cmake/wayland_protocols.cmake @@ -0,0 +1,27 @@ +# * BEGIN GPL LICENSE BLOCK * +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# * END GPL LICENSE BLOCK * + +ExternalProject_Add(external_wayland_protocols + URL ${WL_PROTOCOLS_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH} + PREFIX ${BUILD_DIR}/wayland-protocols + CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols ${DEFAULT_CMAKE_FLAGS} + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) ___ 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] [f8d8b4e8cb3] wl_default5: debug wlp version find
Commit: f8d8b4e8cb31672134c319106157a6e00a15e257 Author: Christian Rauch Date: Sat Jul 3 14:21:14 2021 +0100 Branches: wl_default5 https://developer.blender.org/rBf8d8b4e8cb31672134c319106157a6e00a15e257 debug wlp version find === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 09c82139290..98038ef837e 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -296,6 +296,21 @@ 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) +message("wlp found: " ${wayland-protocols_FOUND}) +message("wlp version: " ${wayland-protocols_VERSION}) +if (${wayland-protocols_FOUND}) + if (${wayland-protocols_VERSION} VERSION_GREATER_EQUAL "1.15") +message("wlp version match") + else() +message("wlp version NOT match") + endif() +else() + message("wlp NOT found") +endif() + +if (NOT DEFINED wayland-protocols_FOUND) + message("wlp mssing") +endif() if (${wayland-protocols_FOUND}) pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) else() @@ -303,6 +318,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml PATH_SUFFIXES share/wayland-protocols ) + message("wlp manual found: " ${WAYLAND_PROTOCOLS_DIR}) endif() if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) ___ 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] [9d3582f8726] wl_default5: cmake: use harvested 'wayland-protocols' if system version is insufficient
Commit: 9d3582f87267fd2303585cfa970db2dc3570b2e1 Author: Christian Rauch Date: Wed Jun 23 21:43:04 2021 +0100 Branches: wl_default5 https://developer.blender.org/rB9d3582f87267fd2303585cfa970db2dc3570b2e1 cmake: use harvested 'wayland-protocols' if system version is insufficient === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 77ec307e604..09c82139290 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -294,7 +294,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + +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 DEFINED WAYLAND_PROTOCOLS_DIR) + message(FATAL_ERROR "path to wayland-protocols not found") +endif() # Generate protocols bindings. macro(generate_protocol_bindings NAME PROT_DEF) ___ 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] [1d16fa46e55] wl_default5: check WAYLAND_PROTOCOLS_DIR
Commit: 1d16fa46e5546d5c630f431e8e47b7b327d95f55 Author: Christian Rauch Date: Sat Jul 3 15:24:54 2021 +0100 Branches: wl_default5 https://developer.blender.org/rB1d16fa46e5546d5c630f431e8e47b7b327d95f55 check WAYLAND_PROTOCOLS_DIR === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 98038ef837e..04d3c75b2c3 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -321,7 +321,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) message("wlp manual found: " ${WAYLAND_PROTOCOLS_DIR}) endif() -if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) +if (NOT ${WAYLAND_PROTOCOLS_DIR}) message(FATAL_ERROR "path to wayland-protocols not found") 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] [702d8c26527] wl_default5: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set
Commit: 702d8c26527ca381218e63378a71e17807cd4617 Author: Christian Rauch Date: Thu Jun 3 21:12:09 2021 +0100 Branches: wl_default5 https://developer.blender.org/rB702d8c26527ca381218e63378a71e17807cd4617 GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set === M intern/ghost/intern/GHOST_ISystem.cpp === diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp index 7c12bfe0306..5ef942efb59 100644 --- a/intern/ghost/intern/GHOST_ISystem.cpp +++ b/intern/ghost/intern/GHOST_ISystem.cpp @@ -55,11 +55,13 @@ 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. */ +if (std::getenv("BLENDER_WAYLAND")) { + try { +m_system = new GHOST_SystemWayland(); + } + catch (const std::runtime_error &) { +/* fallback to X11. */ + } } 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] [64be503a042] wl_default5: GHOST/wayland: define BTN event codes manually
Commit: 64be503a04281700db13a243b0bf60c86feb0e8b Author: Christian Rauch Date: Sat Jul 3 00:14:04 2021 +0100 Branches: wl_default5 https://developer.blender.org/rB64be503a04281700db13a243b0bf60c86feb0e8b GHOST/wayland: define BTN event codes manually === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index f54a022f249..aa830b9a23e 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -47,12 +47,15 @@ #include #include -#include #include #include #include +#define BTN_LEFT0x110 +#define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 + struct buffer_t { void *data; size_t size; ___ 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] [071d1ceadf2] wl_default5: doc: add Wayland dependencies
Commit: 071d1ceadf2bd1310a92c0b3834972bd8b334317 Author: Christian Rauch Date: Sat Jun 5 00:35:24 2021 +0100 Branches: wl_default5 https://developer.blender.org/rB071d1ceadf2bd1310a92c0b3834972bd8b334317 doc: add Wayland dependencies The wayland support requires the following development packages: libwayland-dev, wayland-protocols, libegl-dev, libxkbcommon-dev, libdbus-1-dev, linux-libc-dev === M build_files/build_environment/install_deps.sh === diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 22fb6602d7a..65918777e47 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1128,6 +1128,7 @@ Those libraries should be available as packages in all recent distributions (opt * Basics of dev environment (cmake, gcc, svn , git, ...). * libjpeg, libpng, libtiff, [openjpeg2], [libopenal]. * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). +* libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland) * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. * libsdl2, libglew, libpugixml, libpotrace, [libgmp], [libglewmx], fontconfig, [libharu/libhpdf].\"" @@ -3839,6 +3840,7 @@ install_DEB() { _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \ libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ + libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \ @@ -4508,6 +4510,7 @@ install_RPM() { _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \ libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ + wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \ ___ 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] [1a4bafecf28] wl_default5: cmake: enable Wayland by default
Commit: 1a4bafecf28de52b033ffe029122c51c38260347 Author: Christian Rauch Date: Sun May 23 16:41:29 2021 +0100 Branches: wl_default5 https://developer.blender.org/rB1a4bafecf28de52b033ffe029122c51c38260347 cmake: enable Wayland by default === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index 297e32bd67e..8c1b92d083f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,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" ON) mark_as_advanced(WITH_GHOST_WAYLAND) 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] [2f68bb3a8fb] wl_default2: debug wlp version find
Commit: 2f68bb3a8fbb99b317bcb29263a8f45eebb66fd6 Author: Christian Rauch Date: Sat Jul 3 14:21:14 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB2f68bb3a8fbb99b317bcb29263a8f45eebb66fd6 debug wlp version find === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 09c82139290..7774af5acaf 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -296,6 +296,11 @@ 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) +message("wlp found: " ${wayland-protocols_FOUND}) +message("wlp version: " ${wayland-protocols_VERSION}) +if (NOT DEFINED wayland-protocols_FOUND) + message("wlp mssing") +endif() if (${wayland-protocols_FOUND}) pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) else() ___ 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] [37317f19c64] wl_default2: test wlp version check
Commit: 37317f19c649b1aa7b94862b1631168dc6577088 Author: Christian Rauch Date: Sat Jul 3 14:38:46 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB37317f19c649b1aa7b94862b1631168dc6577088 test wlp version check === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 7774af5acaf..272ca9deee1 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -298,6 +298,16 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) pkg_check_modules(wayland-protocols wayland-protocols>=1.15) message("wlp found: " ${wayland-protocols_FOUND}) message("wlp version: " ${wayland-protocols_VERSION}) +if (${wayland-protocols_FOUND}) + if (${wayland-protocols_VERSION} VERSION_GREATER_EQUAL "1.15") +message("wlp version match") + else() +message("wlp version NOT match") + endif() +else() + message("wlp NOT found") +endif() + if (NOT DEFINED wayland-protocols_FOUND) message("wlp mssing") 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] [5902fe7f791] wl_default4: cmake: add 'wayland-protocols' to 'deps' make step
Commit: 5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 Author: Christian Rauch Date: Tue Jun 29 23:36:23 2021 +0100 Branches: wl_default4 https://developer.blender.org/rB5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 cmake: add 'wayland-protocols' to 'deps' make step === M build_files/build_environment/CMakeLists.txt M build_files/build_environment/cmake/harvest.cmake M build_files/build_environment/cmake/versions.cmake A build_files/build_environment/cmake/wayland_protocols.cmake === diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index fb79eee62be..b0891ec2559 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -159,6 +159,7 @@ if(UNIX) include(cmake/lzma.cmake) include(cmake/ssl.cmake) include(cmake/sqlite.cmake) + include(cmake/wayland_protocols.cmake) endif() if(UNIX AND NOT APPLE) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index fc7e652a028..50d010cbcdc 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -155,6 +155,7 @@ harvest(openvdb/lib openvdb/lib "*.a") harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h") harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h") harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a") +harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml") harvest(osl/bin osl/bin "oslc") harvest(osl/include osl/include "*.h") harvest(osl/lib osl/lib "*.a") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 38cadff2202..43217fa9238 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -462,6 +462,12 @@ set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75) set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) +set(WL_PROTOCOLS_VERSION 1.21) +set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) +set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) +set(WL_PROTOCOLS_HASH_TYPE MD5) +set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) + if(BLENDER_PLATFORM_ARM) # Unreleased version with macOS arm support. set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip) diff --git a/build_files/build_environment/cmake/wayland_protocols.cmake b/build_files/build_environment/cmake/wayland_protocols.cmake new file mode 100644 index 000..380c8b6fde1 --- /dev/null +++ b/build_files/build_environment/cmake/wayland_protocols.cmake @@ -0,0 +1,27 @@ +# * BEGIN GPL LICENSE BLOCK * +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# * END GPL LICENSE BLOCK * + +ExternalProject_Add(external_wayland_protocols + URL ${WL_PROTOCOLS_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH} + PREFIX ${BUILD_DIR}/wayland-protocols + CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols ${DEFAULT_CMAKE_FLAGS} + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) ___ 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] [9d3582f8726] wl_default4: cmake: use harvested 'wayland-protocols' if system version is insufficient
Commit: 9d3582f87267fd2303585cfa970db2dc3570b2e1 Author: Christian Rauch Date: Wed Jun 23 21:43:04 2021 +0100 Branches: wl_default4 https://developer.blender.org/rB9d3582f87267fd2303585cfa970db2dc3570b2e1 cmake: use harvested 'wayland-protocols' if system version is insufficient === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 77ec307e604..09c82139290 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -294,7 +294,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + +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 DEFINED WAYLAND_PROTOCOLS_DIR) + message(FATAL_ERROR "path to wayland-protocols not found") +endif() # Generate protocols bindings. macro(generate_protocol_bindings NAME PROT_DEF) ___ 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] [1a4bafecf28] wl_default4: cmake: enable Wayland by default
Commit: 1a4bafecf28de52b033ffe029122c51c38260347 Author: Christian Rauch Date: Sun May 23 16:41:29 2021 +0100 Branches: wl_default4 https://developer.blender.org/rB1a4bafecf28de52b033ffe029122c51c38260347 cmake: enable Wayland by default === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index 297e32bd67e..8c1b92d083f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,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" ON) mark_as_advanced(WITH_GHOST_WAYLAND) 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] [071d1ceadf2] wl_default4: doc: add Wayland dependencies
Commit: 071d1ceadf2bd1310a92c0b3834972bd8b334317 Author: Christian Rauch Date: Sat Jun 5 00:35:24 2021 +0100 Branches: wl_default4 https://developer.blender.org/rB071d1ceadf2bd1310a92c0b3834972bd8b334317 doc: add Wayland dependencies The wayland support requires the following development packages: libwayland-dev, wayland-protocols, libegl-dev, libxkbcommon-dev, libdbus-1-dev, linux-libc-dev === M build_files/build_environment/install_deps.sh === diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 22fb6602d7a..65918777e47 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1128,6 +1128,7 @@ Those libraries should be available as packages in all recent distributions (opt * Basics of dev environment (cmake, gcc, svn , git, ...). * libjpeg, libpng, libtiff, [openjpeg2], [libopenal]. * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). +* libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland) * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. * libsdl2, libglew, libpugixml, libpotrace, [libgmp], [libglewmx], fontconfig, [libharu/libhpdf].\"" @@ -3839,6 +3840,7 @@ install_DEB() { _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \ libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ + libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \ @@ -4508,6 +4510,7 @@ install_RPM() { _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \ libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ + wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \ ___ 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] [702d8c26527] wl_default4: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set
Commit: 702d8c26527ca381218e63378a71e17807cd4617 Author: Christian Rauch Date: Thu Jun 3 21:12:09 2021 +0100 Branches: wl_default4 https://developer.blender.org/rB702d8c26527ca381218e63378a71e17807cd4617 GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set === M intern/ghost/intern/GHOST_ISystem.cpp === diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp index 7c12bfe0306..5ef942efb59 100644 --- a/intern/ghost/intern/GHOST_ISystem.cpp +++ b/intern/ghost/intern/GHOST_ISystem.cpp @@ -55,11 +55,13 @@ 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. */ +if (std::getenv("BLENDER_WAYLAND")) { + try { +m_system = new GHOST_SystemWayland(); + } + catch (const std::runtime_error &) { +/* fallback to X11. */ + } } 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] [64be503a042] wl_default4: GHOST/wayland: define BTN event codes manually
Commit: 64be503a04281700db13a243b0bf60c86feb0e8b Author: Christian Rauch Date: Sat Jul 3 00:14:04 2021 +0100 Branches: wl_default4 https://developer.blender.org/rB64be503a04281700db13a243b0bf60c86feb0e8b GHOST/wayland: define BTN event codes manually === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index f54a022f249..aa830b9a23e 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -47,12 +47,15 @@ #include #include -#include #include #include #include +#define BTN_LEFT0x110 +#define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 + struct buffer_t { void *data; size_t size; ___ 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] [9d3582f8726] wl_default3: cmake: use harvested 'wayland-protocols' if system version is insufficient
Commit: 9d3582f87267fd2303585cfa970db2dc3570b2e1 Author: Christian Rauch Date: Wed Jun 23 21:43:04 2021 +0100 Branches: wl_default3 https://developer.blender.org/rB9d3582f87267fd2303585cfa970db2dc3570b2e1 cmake: use harvested 'wayland-protocols' if system version is insufficient === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 77ec307e604..09c82139290 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -294,7 +294,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + +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 DEFINED WAYLAND_PROTOCOLS_DIR) + message(FATAL_ERROR "path to wayland-protocols not found") +endif() # Generate protocols bindings. macro(generate_protocol_bindings NAME PROT_DEF) ___ 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] [aa141c5c4f3] wl_default2: test wlp version check
Commit: aa141c5c4f3b3ff0210a0e9ddb1a6a3cb8cd5e26 Author: Christian Rauch Date: Sat Jul 3 14:38:46 2021 +0100 Branches: wl_default2 https://developer.blender.org/rBaa141c5c4f3b3ff0210a0e9ddb1a6a3cb8cd5e26 test wlp version check === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 851383c9629..f00a365acf9 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -298,6 +298,16 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) pkg_check_modules(wayland-protocols wayland-protocols>=1.15) message("wlp found: " ${wayland-protocols_FOUND}) message("wlp version: " ${wayland-protocols_VERSION}) +if (${wayland-protocols_FOUND}) + if (${wayland-protocols_VERSION} VERSION_GREATER_EQUAL "1.15") +message("wlp version match") + else() +message("wlp version NOT match") + endif() +else() + message("wlp NOT found") +endif() + if (NOT DEFINED wayland-protocols_FOUND) message("wlp mssing") 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] [7d9b133e569] wl_default2: debug wlp version find
Commit: 7d9b133e5695843eb05ea48a1425ecf23f083562 Author: Christian Rauch Date: Sat Jul 3 14:21:14 2021 +0100 Branches: wl_default2 https://developer.blender.org/rB7d9b133e5695843eb05ea48a1425ecf23f083562 debug wlp version find === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index a061bb12bb9..851383c9629 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -296,6 +296,11 @@ 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) +message("wlp found: " ${wayland-protocols_FOUND}) +message("wlp version: " ${wayland-protocols_VERSION}) +if (NOT DEFINED wayland-protocols_FOUND) + message("wlp mssing") +endif() if (${wayland-protocols_FOUND}) pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) else() ___ 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] [ec6490b7382] wl_default: cmake: use harvested 'wayland-protocols' if system version is insufficient
Commit: ec6490b7382e57b9f22d56771006cfa733753ca5 Author: Christian Rauch Date: Wed Jun 23 21:43:04 2021 +0100 Branches: wl_default https://developer.blender.org/rBec6490b7382e57b9f22d56771006cfa733753ca5 cmake: use harvested 'wayland-protocols' if system version is insufficient === M intern/ghost/CMakeLists.txt === diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 77ec307e604..a061bb12bb9 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -294,7 +294,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ) pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) -pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) + +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 stable/xdg-shell/xdg-shell.xml +PATH_SUFFIXES share/wayland-protocols + ) +endif() + +if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) + message(FATAL_ERROR "path to wayland-protocols not found") +endif() # Generate protocols bindings. macro(generate_protocol_bindings NAME PROT_DEF) ___ 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] [1a4bafecf28] wl_default: cmake: enable Wayland by default
Commit: 1a4bafecf28de52b033ffe029122c51c38260347 Author: Christian Rauch Date: Sun May 23 16:41:29 2021 +0100 Branches: wl_default https://developer.blender.org/rB1a4bafecf28de52b033ffe029122c51c38260347 cmake: enable Wayland by default === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index 297e32bd67e..8c1b92d083f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,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" ON) mark_as_advanced(WITH_GHOST_WAYLAND) 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] [5902fe7f791] wl_default: cmake: add 'wayland-protocols' to 'deps' make step
Commit: 5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 Author: Christian Rauch Date: Tue Jun 29 23:36:23 2021 +0100 Branches: wl_default https://developer.blender.org/rB5902fe7f791f8e45fffaa23e7e1f3e189d560ac5 cmake: add 'wayland-protocols' to 'deps' make step === M build_files/build_environment/CMakeLists.txt M build_files/build_environment/cmake/harvest.cmake M build_files/build_environment/cmake/versions.cmake A build_files/build_environment/cmake/wayland_protocols.cmake === diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index fb79eee62be..b0891ec2559 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -159,6 +159,7 @@ if(UNIX) include(cmake/lzma.cmake) include(cmake/ssl.cmake) include(cmake/sqlite.cmake) + include(cmake/wayland_protocols.cmake) endif() if(UNIX AND NOT APPLE) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index fc7e652a028..50d010cbcdc 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -155,6 +155,7 @@ harvest(openvdb/lib openvdb/lib "*.a") harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h") harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h") harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a") +harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml") harvest(osl/bin osl/bin "oslc") harvest(osl/include osl/include "*.h") harvest(osl/lib osl/lib "*.a") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 38cadff2202..43217fa9238 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -462,6 +462,12 @@ set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75) set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) +set(WL_PROTOCOLS_VERSION 1.21) +set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) +set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) +set(WL_PROTOCOLS_HASH_TYPE MD5) +set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) + if(BLENDER_PLATFORM_ARM) # Unreleased version with macOS arm support. set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip) diff --git a/build_files/build_environment/cmake/wayland_protocols.cmake b/build_files/build_environment/cmake/wayland_protocols.cmake new file mode 100644 index 000..380c8b6fde1 --- /dev/null +++ b/build_files/build_environment/cmake/wayland_protocols.cmake @@ -0,0 +1,27 @@ +# * BEGIN GPL LICENSE BLOCK * +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# * END GPL LICENSE BLOCK * + +ExternalProject_Add(external_wayland_protocols + URL ${WL_PROTOCOLS_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH} + PREFIX ${BUILD_DIR}/wayland-protocols + CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols ${DEFAULT_CMAKE_FLAGS} + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) ___ 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] [702d8c26527] wl_default: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set
Commit: 702d8c26527ca381218e63378a71e17807cd4617 Author: Christian Rauch Date: Thu Jun 3 21:12:09 2021 +0100 Branches: wl_default https://developer.blender.org/rB702d8c26527ca381218e63378a71e17807cd4617 GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set === M intern/ghost/intern/GHOST_ISystem.cpp === diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp index 7c12bfe0306..5ef942efb59 100644 --- a/intern/ghost/intern/GHOST_ISystem.cpp +++ b/intern/ghost/intern/GHOST_ISystem.cpp @@ -55,11 +55,13 @@ 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. */ +if (std::getenv("BLENDER_WAYLAND")) { + try { +m_system = new GHOST_SystemWayland(); + } + catch (const std::runtime_error &) { +/* fallback to X11. */ + } } 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] [071d1ceadf2] wl_default: doc: add Wayland dependencies
Commit: 071d1ceadf2bd1310a92c0b3834972bd8b334317 Author: Christian Rauch Date: Sat Jun 5 00:35:24 2021 +0100 Branches: wl_default https://developer.blender.org/rB071d1ceadf2bd1310a92c0b3834972bd8b334317 doc: add Wayland dependencies The wayland support requires the following development packages: libwayland-dev, wayland-protocols, libegl-dev, libxkbcommon-dev, libdbus-1-dev, linux-libc-dev === M build_files/build_environment/install_deps.sh === diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 22fb6602d7a..65918777e47 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1128,6 +1128,7 @@ Those libraries should be available as packages in all recent distributions (opt * Basics of dev environment (cmake, gcc, svn , git, ...). * libjpeg, libpng, libtiff, [openjpeg2], [libopenal]. * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). +* libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland) * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. * libsdl2, libglew, libpugixml, libpotrace, [libgmp], [libglewmx], fontconfig, [libharu/libhpdf].\"" @@ -3839,6 +3840,7 @@ install_DEB() { _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \ libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ + libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \ @@ -4508,6 +4510,7 @@ install_RPM() { _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \ libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ + wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \ ___ 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] [64be503a042] wl_default: GHOST/wayland: define BTN event codes manually
Commit: 64be503a04281700db13a243b0bf60c86feb0e8b Author: Christian Rauch Date: Sat Jul 3 00:14:04 2021 +0100 Branches: wl_default https://developer.blender.org/rB64be503a04281700db13a243b0bf60c86feb0e8b GHOST/wayland: define BTN event codes manually === M intern/ghost/intern/GHOST_SystemWayland.cpp === diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index f54a022f249..aa830b9a23e 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -47,12 +47,15 @@ #include #include -#include #include #include #include +#define BTN_LEFT0x110 +#define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 + struct buffer_t { void *data; size_t size; ___ 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] [05f970847e1] master: GPencil: Fix unreported PDF export offset
Commit: 05f970847e12ce30e8c4c624677d94ae239ce2bc Author: Antonio Vazquez Date: Sat Jul 3 12:31:10 2021 +0200 Branches: master https://developer.blender.org/rB05f970847e12ce30e8c4c624677d94ae239ce2bc GPencil: Fix unreported PDF export offset When exporting a PDF, the image was displaced towards top right a few pixels. Also removed is_orthographic variable because is not needed now. === M source/blender/io/gpencil/intern/gpencil_io_base.cc M source/blender/io/gpencil/intern/gpencil_io_base.hh === diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc index 6c369382e0d..294f6bfccb7 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc @@ -100,11 +100,9 @@ void GpencilIO::prepare_camera_params(Scene *scene, const GpencilIOParams *ipara invert_m4_m4(viewmat, cam_ob->obmat); mul_m4_m4m4(persmat_, params.winmat, viewmat); -is_ortho_ = params.is_ortho; } else { unit_m4(persmat_); -is_ortho_ = false; } winx_ = params_.region->winx; @@ -129,7 +127,6 @@ void GpencilIO::prepare_camera_params(Scene *scene, const GpencilIOParams *ipara } else { is_camera_ = false; -is_ortho_ = false; /* Calc selected object boundbox. Need set initial value to some variables. */ camera_ratio_ = 1.0f; offset_.x = 0.0f; @@ -248,19 +245,14 @@ bool GpencilIO::gpencil_3D_point_to_screen_space(const float3 co, float2 &r_co) } /** Convert to render space. */ -float2 GpencilIO::gpencil_3D_point_to_render_space(const float3 co, const bool is_ortho) +float2 GpencilIO::gpencil_3D_point_to_render_space(const float3 co) { float3 parent_co = diff_mat_ * co; - mul_m4_v3(persmat_, parent_co); - - if (!is_ortho) { -parent_co.x = parent_co.x / max_ff(FLT_MIN, parent_co.z); -parent_co.y = parent_co.y / max_ff(FLT_MIN, parent_co.z); - } float2 r_co; - r_co.x = (parent_co.x + 1.0f) / 2.0f * (float)render_x_; - r_co.y = (parent_co.y + 1.0f) / 2.0f * (float)render_y_; + mul_v2_project_m4_v3(&r_co.x, persmat_, &parent_co.x); + r_co.x = (r_co.x + 1.0f) / 2.0f * (float)render_x_; + r_co.y = (r_co.y + 1.0f) / 2.0f * (float)render_y_; /* Invert X axis. */ if (invert_axis_[0]) { @@ -279,7 +271,7 @@ float2 GpencilIO::gpencil_3D_point_to_2D(const float3 co) { const bool is_camera = (bool)(rv3d_->persp == RV3D_CAMOB); if (is_camera) { -return gpencil_3D_point_to_render_space(co, is_orthographic()); +return gpencil_3D_point_to_render_space(co); } float2 result; gpencil_3D_point_to_screen_space(co, result); @@ -346,11 +338,6 @@ bool GpencilIO::is_camera_mode() return is_camera_; } -bool GpencilIO::is_orthographic() -{ - return is_ortho_; -} - /* Calculate selected strokes boundbox. */ void GpencilIO::selected_objects_boundbox_calc() { diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.hh b/source/blender/io/gpencil/intern/gpencil_io_base.hh index c3c6f1156bb..c8d85d08f7b 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.hh +++ b/source/blender/io/gpencil/intern/gpencil_io_base.hh @@ -88,14 +88,13 @@ class GpencilIO { /* Geometry functions. */ bool gpencil_3D_point_to_screen_space(const float3 co, float2 &r_co); - float2 gpencil_3D_point_to_render_space(const float3 co, const bool is_ortho); + float2 gpencil_3D_point_to_render_space(const float3 co); float2 gpencil_3D_point_to_2D(const float3 co); float stroke_point_radius_get(struct bGPDlayer *gpl, struct bGPDstroke *gps); void create_object_list(); bool is_camera_mode(); - bool is_orthographic(); float stroke_average_opacity_get(); @@ -109,7 +108,6 @@ class GpencilIO { private: float avg_opacity_; bool is_camera_; - bool is_ortho_; rctf select_boundbox_; /* Camera matrix. */ ___ 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] [87dae08dd3f] lineart-bvh: LineAer: benchmark
Commit: 87dae08dd3f2a80dd208576b130cabaca21c9912 Author: YimingWu Date: Wed Jun 23 21:26:10 2021 +0800 Branches: lineart-bvh https://developer.blender.org/rB87dae08dd3f2a80dd208576b130cabaca21c9912 LineAer: benchmark === M source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c === diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h index da9d628dbda..18bd524ed2b 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h +++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h @@ -347,6 +347,8 @@ typedef struct LineartRenderBuffer { struct Collection *_source_collection; struct Object *_source_object; + int debug_triangle_isec_test_count; + } LineartRenderBuffer; typedef struct LineartCache { diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index fe3a202e8ed..9a08a093f37 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -65,7 +65,7 @@ #include "lineart_intern.h" -#define LINEART_WITH_BVH +//#define LINEART_WITH_BVH #define LINEART_WITH_BVH_THREAD #define LINEART_BVH_OWN_ISEC @@ -2977,6 +2977,8 @@ static void lineart_triangle_intersect_in_bounding_area(LineartRenderBuffer *rb, continue; } +rb->debug_triangle_isec_test_count++; + /* If we do need to compute intersection, then finally do it. */ lineart_triangle_intersect(rb, tri, testing_triangle); } @@ -4056,6 +4058,7 @@ typedef struct LineartIsecThread { LineartIsecSingle *array; int current; int max; + int count_test; } LineartIsecThread; typedef struct LineartIsecData { LineartRenderBuffer *rb; @@ -4131,6 +4134,8 @@ static bool lineart_bvh_isec_callback(void *userdata, int index_a, int index_b, return false; } + d->threads[thread].count_test++; + #ifdef LINEART_BVH_OWN_ISEC float e1[3], e2[3]; @@ -4227,6 +4232,14 @@ static void lineart_do_intersections(LineartRenderBuffer *rb) BVHTreeOverlap *overlap = BLI_bvhtree_overlap( rb->bvh_main, rb->bvh_main, &overlap_tot, lineart_bvh_isec_callback, &d); + if (G.debug_value == 4000) { +int total_test_count = 0; +for (int i = 0; i < rb->thread_count; i++) { + total_test_count += d.threads[i].count_test; +} +printf("BVH has done %d pairs.\n", total_test_count); + } + lineart_create_edges_from_isec_data(&d); lineart_destroy_isec_thread(&d); #else @@ -4611,6 +4624,10 @@ bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, #ifdef LINEART_WITH_BVH lineart_do_intersections(rb); +#else + if (G.debug_value == 4000) { +printf("Legacy triangle isec pairs: %d\n", rb->debug_triangle_isec_test_count); + } #endif /* Link lines to acceleration structure, this can only be done after perspective division, if ___ 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] [1e816bf837f] lineart-bvh: LineArt: Move type rejection before visibility check
Commit: 1e816bf837fbe66f920650982454c03eda1b685f Author: YimingWu Date: Tue Jun 22 23:03:53 2021 +0800 Branches: lineart-bvh https://developer.blender.org/rB1e816bf837fbe66f920650982454c03eda1b685f LineArt: Move type rejection before visibility check === M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c === diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index dc9d994beb4..fe3a202e8ed 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -2190,6 +2190,10 @@ static void lineart_main_load_geometries( mul_m4db_m4db_m4fl_uniq(obi->model_view_proj, rb->view_projection, ob->obmat); mul_m4db_m4db_m4fl_uniq(obi->model_view, rb->view, ob->obmat); +if (!ELEM(use_ob->type, OB_MESH, OB_MBALL, OB_CURVE, OB_SURF, OB_FONT)) { + continue; +} + if (!lineart_geometry_check_visible(obi->model_view_proj, use_ob)) { if (G.debug_value == 4000) { bound_box_discard_count++; @@ -2197,10 +2201,6 @@ static void lineart_main_load_geometries( continue; } -if (!(use_ob->type == OB_MESH || use_ob->type == OB_MBALL || use_ob->type == OB_CURVE || - use_ob->type == OB_SURF || use_ob->type == OB_FONT)) { - continue; -} if (use_ob->type == OB_MESH) { use_mesh = use_ob->data; } ___ 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] [6521f0cbc67] lineart-bvh: Merge remote-tracking branch 'origin/master' into lineart-bvh
Commit: 6521f0cbc677a965257adfa89ec11168f1703844 Author: YimingWu Date: Wed Jun 23 20:13:39 2021 +0800 Branches: lineart-bvh https://developer.blender.org/rB6521f0cbc677a965257adfa89ec11168f1703844 Merge remote-tracking branch 'origin/master' into lineart-bvh === === ___ 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] [d615f4d65e4] soc-2021-uv-editor-improvements: Fix: Pack islands to area operator
Commit: d615f4d65e44109d1843441e9b3c5f145901c3c7 Author: Siddhartha Jejurkar Date: Sat Jul 3 14:29:56 2021 +0530 Branches: soc-2021-uv-editor-improvements https://developer.blender.org/rBd615f4d65e44109d1843441e9b3c5f145901c3c7 Fix: Pack islands to area operator * Correct packing area coordinates for cases when user sets the maximum coordinates to be lower than the minimum coordinates * Cancel operator when scale option is disabled and packing area is not big enough for selected islands. Also display warning message in UI when this happens === M source/blender/blenlib/BLI_boxpack_2d.h M source/blender/blenlib/intern/boxpack_2d.c M source/blender/editors/include/ED_uvedit.h M source/blender/editors/uvedit/uvedit_islands.c M source/blender/editors/uvedit/uvedit_unwrap_ops.c === diff --git a/source/blender/blenlib/BLI_boxpack_2d.h b/source/blender/blenlib/BLI_boxpack_2d.h index 5b70cd3f410..89339b66021 100644 --- a/source/blender/blenlib/BLI_boxpack_2d.h +++ b/source/blender/blenlib/BLI_boxpack_2d.h @@ -64,7 +64,7 @@ void BLI_box_pack_2d_fixedarea(struct ListBase *boxes, int height, struct ListBase *packed); -void BLI_rect_pack_2d(BoxPack *boxarray, +bool BLI_rect_pack_2d(BoxPack *boxarray, const uint len, const float rect_width, const float rect_height); diff --git a/source/blender/blenlib/intern/boxpack_2d.c b/source/blender/blenlib/intern/boxpack_2d.c index 1679da7fc13..bddb9878a36 100644 --- a/source/blender/blenlib/intern/boxpack_2d.c +++ b/source/blender/blenlib/intern/boxpack_2d.c @@ -786,14 +786,8 @@ void BLI_box_pack_2d_fixedarea(ListBase *boxes, int width, int height, ListBase } /* Similar implementation of BLI_box_pack_2d_fixedarea() that works with BoxPack array and float - * variables. - * A current problem with the algorithm is that boxes that do not fit are not packed (skipped), so - * that finally causes those boxes to be placed at the bottom left position overlapping with other - * boxes. - * TODO : Fix this issue by setting a callback that cancels the operator (and possibly prints an - * error message saying the area is too small for packing islands without scaling) when a - * particular box does not fit any empty space */ -void BLI_rect_pack_2d(BoxPack *boxarray, + * variables */ +bool BLI_rect_pack_2d(BoxPack *boxarray, const uint len, const float rect_width, const float rect_height) @@ -802,11 +796,19 @@ void BLI_rect_pack_2d(BoxPack *boxarray, RectSizeBoxPack *full_rect = MEM_callocN(sizeof(RectSizeBoxPack), __func__); full_rect->w = rect_width; full_rect->h = rect_height; + bool is_box_packed; BLI_addhead(&spaces, full_rect); + /* CHECK : Sorting is probably used incorrectly here */ qsort(boxarray, (size_t)len, sizeof(BoxPack), box_areasort); + /* Rotating islands in uvedits_islands.c doesn't work well with this algorithm + * TODO : Implement heuristic for rotating islands - Rotate islands if they don't fit in any + * empty space, but can fit if they are rotated. A boolean might be needed per island to check if + * islands need to be rotated when they are translated in uvedit_islands.c */ + for (uint i = 0; i < len; i++) { +is_box_packed = false; LISTBASE_FOREACH (RectSizeBoxPack *, space, &spaces) { /* Skip this space if it's too small. */ if (boxarray[i].w > space->w || boxarray[i].h > space->h) { @@ -816,6 +818,7 @@ void BLI_rect_pack_2d(BoxPack *boxarray, /* Pack this box into this space. */ boxarray[i].x = space->x; boxarray[i].y = space->y; + is_box_packed = true; if (boxarray[i].w == space->w && boxarray[i].h == space->h) { /* Box exactly fills space, so just remove the space. */ @@ -867,7 +870,14 @@ void BLI_rect_pack_2d(BoxPack *boxarray, break; } +/* Packing area not big enough to pack all boxes */ +if (!is_box_packed) { + BLI_freelistN(&spaces); + return false; +} } + /* All boxes packed successfully */ BLI_freelistN(&spaces); + return true; } \ No newline at end of file diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 2dc9635a494..269590197ee 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -253,7 +253,7 @@ void ED_uvedit_pack_islands_multi(const struct Scene *scene, bool use_target, const struct UVPackIsland_Params *params); -void ED_uvedit_pack_islands_to_area_multi(const struct Scene *scene, +bool ED_uvedit_pack_islands_to_area_multi(const struct Scene *scene,
[Bf-blender-cvs] [2edc2136a1d] soc-2021-geometry-nodes-regression-test: WIP: Saving work, Mesh Test Abstract class implementattion complete, updating to Win 11
Commit: 2edc2136a1d89e4fdeafa7df127a1e4df18fb9db Author: Himanshi Kalra Date: Sat Jul 3 14:17:38 2021 +0530 Branches: soc-2021-geometry-nodes-regression-test https://developer.blender.org/rB2edc2136a1d89e4fdeafa7df127a1e4df18fb9db WIP: Saving work, Mesh Test Abstract class implementattion complete, updating to Win 11 === M tests/python/modules/base_mesh_test.py A tests/python/modules/spec_classes.py A tests/python/test_classes.py === diff --git a/tests/python/modules/base_mesh_test.py b/tests/python/modules/base_mesh_test.py index d07f5485041..1e8f48b74fc 100644 --- a/tests/python/modules/base_mesh_test.py +++ b/tests/python/modules/base_mesh_test.py @@ -3,6 +3,8 @@ import bpy import os import sys +from modules.spec_classes import ModifierSpec, DeformModifierSpec, OperatorSpecEditMode, OperatorSpecObjectMode + class MeshTest(ABC): def __init__(self, test_object_name, exp_object_name, threshold=None): @@ -10,37 +12,123 @@ class MeshTest(ABC): self.exp_object_name = exp_object_name self.threshold = threshold self.update = os.getenv("BLENDER_TEST_UPDATE") is not None -self.eval_object_name = "evaluated_object" +# self.eval_object_name = "evaluated_object" + +# Private flag to indicate whether the blend file was updated after the test. +self._test_updated = False +objects = bpy.data.objects +self.test_object = objects[self.test_object_name] + +# TODO - create exp object, in case doesn't exist. +self.expected_object = objects[self.exp_object_name] def create_evaluated_object(self): +bpy.context.view_layer.objects.active = self.test_object + +# Duplicate test object. +bpy.ops.object.mode_set(mode="OBJECT") +bpy.ops.object.select_all(action="DESELECT") +bpy.context.view_layer.objects.active = self.test_object + +self.test_object.select_set(True) +bpy.ops.object.duplicate() +evaluated_test_object = bpy.context.active_object +evaluated_test_object.name = "evaluated_object" # Real implementation. -pass +return evaluated_test_object + +@staticmethod +def _print_result(result): +comparison_result, selection_result, validation_result = result +print("Mesh Compariosn: {}".format(comparison_result)) +print("Selection Result: {}".format(selection_result)) +print("Mesh Validation: {}".format(validation_result)) def run_test(self): +evaluated_test_object = self.create_evaluated_object() +self.apply_operations(evaluated_test_object) +result = self.compare_meshes(evaluated_test_object) + +comparison_result, selection_result, validation_result = result + +if comparison_result == "Same" and selection_result == "Same" and validation_result == "Valid": +self.passed_test(result) + +elif self.update: +self.failed_test(result) +self.update_failed_test(evaluated_test_object) + +else: +self.failed_test(result) + # Real implementation. pass -def failed_test(self): +def failed_test(self, result): +print("The test failed with the following: ") +self._print_result(result) # Real implementation. pass -def passed_test(self): +def passed_test(self, result): +print("The tests passed successfully.") +self._print_result(result) # Real implementation pass -def update_failed_test(self): -if self.failed_test() and self.update: -self.create_evaluated_object() -# Real implementation -pass +def do_selection(self, mesh: bpy.types.Mesh, select_mode: str, selection: set): +""" +Do selection on a mesh +:param mesh: bpy.types.Mesh - input mesh +:param: select_mode: str - selection mode. Must be 'VERT', 'EDGE' or 'FACE' +:param: selection: set - indices of selection. + +Example: select_mode='VERT' and selection={1,2,3} selects veritces 1, 2 and 3 of input mesh +""" +# deselect all +bpy.ops.object.mode_set(mode='EDIT') +bpy.ops.mesh.select_all(action='DESELECT') +bpy.ops.object.mode_set(mode='OBJECT') + +bpy.context.tool_settings.mesh_select_mode = (select_mode == 'VERT', + select_mode == 'EDGE', + select_mode == 'FACE') + +items = (mesh.vertices if select_mode == 'VERT' + else mesh.edges if select_mode == 'EDGE' + else mesh.polygons if select_mode == 'FACE' + else None) +if items is None: +raise ValueError("Invalid selection
[Bf-blender-cvs] [fec564b3210] soc-2021-geometry-nodes-regression-test: Refactoring of mesh test in a new file: WIP
Commit: fec564b3210274a4e4340e6a4aa2bd627ee37f2b Author: Himanshi Kalra Date: Thu Jul 1 11:00:29 2021 +0530 Branches: soc-2021-geometry-nodes-regression-test https://developer.blender.org/rBfec564b3210274a4e4340e6a4aa2bd627ee37f2b Refactoring of mesh test in a new file: WIP === A tests/python/modules/base_mesh_test.py A tests/python/modules/mesh_test_prototype.py === diff --git a/tests/python/modules/base_mesh_test.py b/tests/python/modules/base_mesh_test.py new file mode 100644 index 000..d07f5485041 --- /dev/null +++ b/tests/python/modules/base_mesh_test.py @@ -0,0 +1,99 @@ +from abc import ABC, abstractmethod +import bpy +import os +import sys + + +class MeshTest(ABC): +def __init__(self, test_object_name, exp_object_name, threshold=None): +self.test_object_name = test_object_name +self.exp_object_name = exp_object_name +self.threshold = threshold +self.update = os.getenv("BLENDER_TEST_UPDATE") is not None +self.eval_object_name = "evaluated_object" + +def create_evaluated_object(self): +# Real implementation. +pass + +def run_test(self): +# Real implementation. +pass + +def failed_test(self): +# Real implementation. +pass + +def passed_test(self): +# Real implementation +pass + +def update_failed_test(self): +if self.failed_test() and self.update: +self.create_evaluated_object() +# Real implementation +pass + +def compare_meshes(self, evaluated_object, with_selection=True): +objects = bpy.data.objects +evaluated_test_mesh = objects[evaluated_object.name].data +expected_mesh = objects[self.exp_object_name].data +result_codes = [] + +# Mesh Comparison +if self.threshold: +result_mesh = expected_mesh.unit_test_compare( +mesh=evaluated_test_mesh, threshold=self.threshold) +else: +result_mesh = expected_mesh.unit_test_compare( +mesh=evaluated_test_mesh) +result_codes.append(result_mesh) + +# Selection comparison. +if with_selection: +selected_evaluatated_verts = [ +v.index for v in evaluated_test_mesh.vertices if v.select] +selected_expected_verts = [ +v.index for v in expected_mesh.vertices if v.select] + +if selected_evaluatated_verts == selected_expected_verts: +result_selection = "Same" +else: +result_selection = "Selection doesn't match." +else: +result_selection = "NA" + +result_codes.append(result_selection) + +# Validation check. +# TODO + +return result_codes + +@abstractmethod +def apply_operations(self): +pass + +def __repr__(self): +return "MeshTest({}, {} )".format(self.test_object_name, self.exp_object_name) + + +class SpecTest(MeshTest): +def __init__(self, test_object_name, exp_object_name, threshold=None, operation_stack=None): +super.__init__(test_object_name, exp_object_name, threshold=None) +pass + +def apply_operations(self): +pass + + +class BlendFileTest(MeshTest): +def apply_operations(self): +pass + + +geometry_nodes_test = BlendFileTest("test_object", "expected_object") +geometry_nodes_test.run_test() + +modifier_test = SpecTest("test_array", "exp_array", operation_stack=[]) +modifier_test.run_test() diff --git a/tests/python/modules/mesh_test_prototype.py b/tests/python/modules/mesh_test_prototype.py new file mode 100644 index 000..7fcaecfccee --- /dev/null +++ b/tests/python/modules/mesh_test_prototype.py @@ -0,0 +1,82 @@ +from abc import ABC, ABCMeta, abstractmethod + + +class MeshTest(ABC): +def __init__(self, test_object_name, exp_object_name, threshold=None): +self.test_object_name = test_object_name +self.exp_object_name = exp_object_name +self.threshold = threshold +self.update = ENV_VAR + +def create_evaluated_object(self): +# Real implementation. +pass + +def run_test(self): +# Real implementation. +pass + +def failed_test(self): +# Real implementation. +pass + +def passed_test(self): +# Real implementation +pass + +def update_failed_test(self): +if self.failed_test() == True and self.update: +self.create_evaluated_object() +# Real implementation +pass + +def compare_mesh(self, with_selection=True): +# Real implementation. +pass + +@abstractmethod +def apply_operations(self): +pass + +def __repr__(self): +return "MeshTest({}, {} )".format(self.test_object_name, self.exp_object_
[Bf-blender-cvs] [70e8acf0bae] soc-2021-geometry-nodes-regression-test: Merge branch 'master' into soc-2021-geometry-nodes-regression-test
Commit: 70e8acf0bae7d8de582c5d827ea4749b2c6ea92b Author: Himanshi Kalra Date: Mon Jun 28 12:00:15 2021 +0530 Branches: soc-2021-geometry-nodes-regression-test https://developer.blender.org/rB70e8acf0bae7d8de582c5d827ea4749b2c6ea92b Merge branch 'master' into soc-2021-geometry-nodes-regression-test === === ___ 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] [2778211cea4] soc-2021-geometry-nodes-regression-test: Merge branch 'master' into soc-2021-geometry-nodes-regression-test
Commit: 2778211cea4b8c72c02f52a3eb424854b6e57f64 Author: Himanshi Kalra Date: Fri Jun 18 16:56:27 2021 +0530 Branches: soc-2021-geometry-nodes-regression-test https://developer.blender.org/rB2778211cea4b8c72c02f52a3eb424854b6e57f64 Merge branch 'master' into soc-2021-geometry-nodes-regression-test === === ___ 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