From f35ecfdac79cb4e1693562b8d3e46922e4eb0312 Mon Sep 17 00:00:00 2001 From: Douglas Paul Date: Mon, 23 Oct 2023 17:20:53 +0200 Subject: [PATCH 1/3] Fix documentation link for Points to Curves node The Online Manual action in the context menu for the new Points to Curves geometry node was going to the documentation for the Points node instead. Pull Request: https://projects.blender.org/blender/blender/pulls/113727 --- scripts/modules/rna_manual_reference.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/modules/rna_manual_reference.py b/scripts/modules/rna_manual_reference.py index 1b8c408efe7..a45793f9529 100644 --- a/scripts/modules/rna_manual_reference.py +++ b/scripts/modules/rna_manual_reference.py @@ -1335,6 +1335,7 @@ url_manual_mapping = ( ("bpy.types.geometrynodeindexofnearest*", "modeling/geometry_nodes/geometry/sample/index_of_nearest.html#bpy-types-geometrynodeindexofnearest"), ("bpy.types.geometrynodeinputcurvetilt*", "modeling/geometry_nodes/curve/read/curve_tilt.html#bpy-types-geometrynodeinputcurvetilt"), ("bpy.types.geometrynodeinputscenetime*", "modeling/geometry_nodes/input/scene/scene_time.html#bpy-types-geometrynodeinputscenetime"), + ("bpy.types.geometrynodepointstocurves*", "modeling/geometry_nodes/point/points_to_curves.html#bpy-types-geometrynodepointstocurves"), ("bpy.types.geometrynodepointstovolume*", "modeling/geometry_nodes/point/points_to_volume.html#bpy-types-geometrynodepointstovolume"), ("bpy.types.geometrynodescaleinstances*", "modeling/geometry_nodes/instances/scale_instances.html#bpy-types-geometrynodescaleinstances"), ("bpy.types.geometrynodesetcurvenormal*", "modeling/geometry_nodes/curve/write/set_curve_normal.html#bpy-types-geometrynodesetcurvenormal"), From be477f069c5b2b1627ce9ab3bc38695a305062c8 Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Mon, 23 Oct 2023 17:25:11 +0200 Subject: [PATCH 2/3] Fix #113954: Hydra crash if output node for world light is not found Also improve update handling of world data. Pull Request: https://projects.blender.org/blender/blender/pulls/113974 --- .../io/usd/hydra/hydra_scene_delegate.cc | 29 +++---------------- .../io/usd/hydra/hydra_scene_delegate.h | 1 - source/blender/io/usd/hydra/world.cc | 24 ++++++++++++--- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/source/blender/io/usd/hydra/hydra_scene_delegate.cc b/source/blender/io/usd/hydra/hydra_scene_delegate.cc index 524529c9267..6ccb6511f45 100644 --- a/source/blender/io/usd/hydra/hydra_scene_delegate.cc +++ b/source/blender/io/usd/hydra/hydra_scene_delegate.cc @@ -35,6 +35,7 @@ HydraSceneDelegate::HydraSceneDelegate(pxr::HdRenderIndex *parent_index, : HdSceneDelegate(parent_index, delegate_id) { instancer_data_ = std::make_unique(this, instancer_prim_id()); + world_data_ = std::make_unique(this, world_prim_id()); } pxr::HdMeshTopology HydraSceneDelegate::GetMeshTopology(pxr::SdfPath const &id) @@ -214,7 +215,7 @@ void HydraSceneDelegate::populate(Depsgraph *deps, View3D *v3d) set_light_shading_settings(); set_world_shading_settings(); update_collection(); - update_world(); + world_data_->update(); } } @@ -338,26 +339,6 @@ InstancerData *HydraSceneDelegate::instancer_data(pxr::SdfPath const &id, bool c return nullptr; } -void HydraSceneDelegate::update_world() -{ - if (!world_data_) { - if (!shading_settings.use_scene_world || (shading_settings.use_scene_world && scene->world)) { - world_data_ = std::make_unique(this, world_prim_id()); - world_data_->init(); - world_data_->insert(); - } - } - else { - if (!shading_settings.use_scene_world || (shading_settings.use_scene_world && scene->world)) { - world_data_->update(); - } - else { - world_data_->remove(); - world_data_ = nullptr; - } - } -} - void HydraSceneDelegate::check_updates() { bool do_update_collection = false; @@ -406,9 +387,7 @@ void HydraSceneDelegate::check_updates() { do_update_collection = true; } - if (id->recalc & ID_RECALC_AUDIO_VOLUME && - ((scene->world && !world_data_) || (!scene->world && world_data_))) - { + if (id->recalc & ID_RECALC_AUDIO_VOLUME) { do_update_world = true; } break; @@ -421,7 +400,7 @@ void HydraSceneDelegate::check_updates() ITER_END; if (do_update_world) { - update_world(); + world_data_->update(); } if (do_update_collection) { update_collection(); diff --git a/source/blender/io/usd/hydra/hydra_scene_delegate.h b/source/blender/io/usd/hydra/hydra_scene_delegate.h index 47d9781163c..b4de2fbbe98 100644 --- a/source/blender/io/usd/hydra/hydra_scene_delegate.h +++ b/source/blender/io/usd/hydra/hydra_scene_delegate.h @@ -105,7 +105,6 @@ class HydraSceneDelegate : public pxr::HdSceneDelegate { MaterialData *material_data(pxr::SdfPath const &id) const; InstancerData *instancer_data(pxr::SdfPath const &id, bool child_id = false) const; - void update_world(); void check_updates(); void update_collection(); bool set_light_shading_settings(); diff --git a/source/blender/io/usd/hydra/world.cc b/source/blender/io/usd/hydra/world.cc index 2845332d902..f40cce70100 100644 --- a/source/blender/io/usd/hydra/world.cc +++ b/source/blender/io/usd/hydra/world.cc @@ -42,7 +42,6 @@ WorldData::WorldData(HydraSceneDelegate *scene_delegate, pxr::SdfPath const &pri void WorldData::init() { data_.clear(); - data_[pxr::UsdLuxTokens->orientToStageUpAxis] = true; float intensity = 1.0f; float exposure = 1.0f; @@ -58,6 +57,9 @@ void WorldData::init() /* TODO: Create nodes parsing system */ bNode *output_node = ntreeShaderOutputNode(world->nodetree, SHD_OUTPUT_ALL); + if (!output_node) { + return; + } const Span input_sockets = output_node->input_sockets(); bNodeSocket *input_socket = nullptr; @@ -127,6 +129,7 @@ void WorldData::init() } } + data_[pxr::UsdLuxTokens->orientToStageUpAxis] = true; data_[pxr::HdLightTokens->intensity] = intensity; data_[pxr::HdLightTokens->exposure] = exposure; data_[pxr::HdLightTokens->color] = color; @@ -138,9 +141,22 @@ void WorldData::init() void WorldData::update() { ID_LOG(1, ""); - init(); - scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, - pxr::HdLight::AllDirty); + + if (!scene_delegate_->shading_settings.use_scene_world || + (scene_delegate_->shading_settings.use_scene_world && scene_delegate_->scene->world)) + { + init(); + if (data_.empty()) { + remove(); + return; + } + insert(); + scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, + pxr::HdLight::AllDirty); + } + else { + remove(); + } } void WorldData::write_transform() From 3a483004c8ad3985579fb8b0a82659c2f76bf93a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 23 Oct 2023 19:06:47 +0200 Subject: [PATCH 3/3] Fix SSL cert file path not working on second cmake configure Always create the non-cached relatve from the cached absolute path. Ref #102300 --- build_files/cmake/macros.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 0aad121ea98..c942d2d86ac 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1460,12 +1460,15 @@ macro(find_python_module_file ) if(${out_var_abs}) set(_${out_var_abs}_DEPS "${_python_mod_file_deps_test}" CACHE STRING "") - string(LENGTH "${_python_root}" _python_root_len) - string(SUBSTRING ${${out_var_abs}} ${_python_root_len} -1 ${out_var_rel}) - unset(_python_root_len) endif() endif() + if(${out_var_abs}) + string(LENGTH "${_python_root}" _python_root_len) + string(SUBSTRING ${${out_var_abs}} ${_python_root_len} -1 ${out_var_rel}) + unset(_python_root_len) + endif() + unset(_python_mod_file_deps_test) unset(_python_base) unset(_python_root)