[Bf-blender-cvs] [a0bbd65d57f] master: Fix T66713: Walk mode doesn't take scene unit scale into account

2022-10-20 Thread Campbell Barton
Commit: a0bbd65d57f38344fb71565c3c34396363a4be23
Author: Campbell Barton
Date:   Fri Oct 21 16:11:07 2022 +1100
Branches: master
https://developer.blender.org/rBa0bbd65d57f38344fb71565c3c34396363a4be23

Fix T66713: Walk mode doesn't take scene unit scale into account

When changing a scene's unit scale from 1 to something else, 0.1 for
e.g. walk navigation no longer worked properly. Whenever gravity is
enabled, and the user starts to fall or jump, the view-port glitched out
into low earth orbit.

Reviewed By: campbellbarton

Ref D16277

===

M   source/blender/editors/space_view3d/view3d_navigate_walk.c

===

diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c 
b/source/blender/editors/space_view3d/view3d_navigate_walk.c
index aea322d73d9..fcb4f549353 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_walk.c
+++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c
@@ -1231,11 +1231,11 @@ static int walkApply(bContext *C, WalkInfo *walk, bool 
is_confirm)
 /* keep moving if we were moving */
 copy_v2_v2(dvec, walk->teleport.direction);
 
-z_cur = walk->rv3d->viewinv[3][2];
-z_new = walk->teleport.origin[2] - getFreeFallDistance(walk->gravity, 
t) * walk->grid;
+z_cur = walk->rv3d->viewinv[3][2] / walk->grid;
+z_new = (walk->teleport.origin[2] / walk->grid) - 
getFreeFallDistance(walk->gravity, t);
 
 /* jump */
-z_new += t * walk->speed_jump * walk->grid;
+z_new += t * walk->speed_jump;
 
 /* duration is the jump duration */
 if (t > walk->teleport.duration) {

___
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] [dc09cc13ea4] master: deps_builder: add missing OSLNoise library on windows

2022-10-20 Thread Ray Molenkamp
Commit: dc09cc13ea49a0de72aafcb8a48d6189d13aa6d9
Author: Ray Molenkamp
Date:   Thu Oct 20 18:31:15 2022 -0600
Branches: master
https://developer.blender.org/rBdc09cc13ea49a0de72aafcb8a48d6189d13aa6d9

deps_builder: add missing OSLNoise library on windows

OSLNoise is a new library, was missing in the debug
configuration on windows.

===

M   build_files/build_environment/cmake/osl.cmake

===

diff --git a/build_files/build_environment/cmake/osl.cmake 
b/build_files/build_environment/cmake/osl.cmake
index 8bac2c5c1ab..a5d000e4f44 100644
--- a/build_files/build_environment/cmake/osl.cmake
+++ b/build_files/build_environment/cmake/osl.cmake
@@ -83,6 +83,7 @@ if(WIN32)
   COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib 
${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
   COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib 
${HARVEST_TARGET}/osl/lib/oslexec_d.lib
   COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib 
${HARVEST_TARGET}/osl/lib/oslquery_d.lib
+  COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslnoise.lib 
${HARVEST_TARGET}/osl/lib/oslnoise_d.lib
   DEPENDEES install
 )
   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] [65151779811] master: deps_builder: OpenCollada fixes for windows

2022-10-20 Thread Ray Molenkamp
Commit: 65151779811bb68f9afa0fb5d3dfacbd9fd3d6cb
Author: Ray Molenkamp
Date:   Thu Oct 20 18:29:59 2022 -0600
Branches: master
https://developer.blender.org/rB65151779811bb68f9afa0fb5d3dfacbd9fd3d6cb

deps_builder: OpenCollada fixes for windows

- build and use our version of libxml

- the cli tools had a linker error due
to it trying to link a shared version
of libxml, disabled both and zlib 1.2.3
with a patch since we do not want/need
them for blender.

- postfix the libraries with _d for debug
automatically so we don't have to fix that
during the harvest.

due to this only being windows changes no
rebuild needed for the other platforms.

===

M   build_files/build_environment/CMakeLists.txt
M   build_files/build_environment/cmake/opencollada.cmake
M   build_files/build_environment/cmake/xml2.cmake
M   build_files/build_environment/patches/opencollada.diff

===

diff --git a/build_files/build_environment/CMakeLists.txt 
b/build_files/build_environment/CMakeLists.txt
index 4f40f44ad18..023d113b551 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -97,6 +97,8 @@ include(cmake/embree.cmake)
 include(cmake/openpgl.cmake)
 include(cmake/fmt.cmake)
 include(cmake/robinmap.cmake)
+include(cmake/xml2.cmake)
+
 if(NOT APPLE)
   include(cmake/xr_openxr.cmake)
   if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
@@ -149,7 +151,6 @@ if(NOT WIN32 OR ENABLE_MINGW64)
 endif()
 if(UNIX)
   include(cmake/flac.cmake)
-  include(cmake/xml2.cmake)
   if(NOT APPLE)
 include(cmake/spnav.cmake)
 include(cmake/jemalloc.cmake)
diff --git a/build_files/build_environment/cmake/opencollada.cmake 
b/build_files/build_environment/cmake/opencollada.cmake
index b2ae1a1a351..9473aafbe88 100644
--- a/build_files/build_environment/cmake/opencollada.cmake
+++ b/build_files/build_environment/cmake/opencollada.cmake
@@ -4,6 +4,16 @@ if(UNIX)
   set(OPENCOLLADA_EXTRA_ARGS
 -DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
 -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
+else()
+  set(OPENCOLLADA_EXTRA_ARGS
+-DCMAKE_DEBUG_POSTFIX=_d
+-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
+  )
+  if(BUILD_MODE STREQUAL Release)
+list(APPEND  OPENCOLLADA_EXTRA_ARGS 
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2s.lib)
+  else()
+list(APPEND  OPENCOLLADA_EXTRA_ARGS 
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2sd.lib)
+  endif()
 endif()
 
 ExternalProject_Add(external_opencollada
@@ -16,12 +26,11 @@ ExternalProject_Add(external_opencollada
   INSTALL_DIR ${LIBDIR}/opencollada
 )
 
-if(UNIX)
-  add_dependencies(
-external_opencollada
-external_xml2
-  )
-endif()
+
+add_dependencies(
+  external_opencollada
+  external_xml2
+)
 
 if(WIN32)
   if(BUILD_MODE STREQUAL Release)
@@ -32,17 +41,7 @@ if(WIN32)
   endif()
   if(BUILD_MODE STREQUAL Debug)
 ExternalProject_Add_Step(external_opencollada after_install
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/buffer.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/ftoa.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/pcre.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/UTF.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
-  COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/opencollada/lib/opencollada/xml.lib 
${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/lib 

[Bf-blender-cvs] [ff8c0f062a6] master: GHOST/Wayland: code comments, minor improvements

2022-10-20 Thread Campbell Barton
Commit: ff8c0f062a6ac521b13ebbda3103cda4f9a4dc46
Author: Campbell Barton
Date:   Fri Oct 21 10:00:09 2022 +1100
Branches: master
https://developer.blender.org/rBff8c0f062a6ac521b13ebbda3103cda4f9a4dc46

GHOST/Wayland: code comments, minor improvements

- Clarify how data_offer is used for both the clipboard & drag-and-drop.
- Acquire the clipboards mutex lock before freeing.
- Log a warning when creating a pipe fails.
- Add doxy-sections.

===

M   intern/ghost/intern/GHOST_SystemWayland.cpp

===

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp 
b/intern/ghost/intern/GHOST_SystemWayland.cpp
index fb69973eac6..68ad028631c 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -234,7 +234,7 @@ static const GWL_ModifierInfo 
g_modifier_info_table[MOD_INDEX_NUM] = {
 /** \} */
 
 /*  */
-/** \name Private Types & Defines
+/** \name Internal #GWL_SimpleBuffer Type
  * \{ */
 
 struct GWL_SimpleBuffer {
@@ -250,7 +250,9 @@ static void gwl_simple_buffer_free_data(GWL_SimpleBuffer 
*buffer)
   buffer->data_size = 0;
 }
 
-static void gwl_simple_buffer_set(GWL_SimpleBuffer *buffer, const char *data, 
size_t data_size)
+static void gwl_simple_buffer_set_and_take_ownership(GWL_SimpleBuffer *buffer,
+ const char *data,
+ size_t data_size)
 {
   free(const_cast(buffer->data));
   buffer->data = data;
@@ -274,6 +276,12 @@ static char *gwl_simple_buffer_as_string(const 
GWL_SimpleBuffer *buffer)
   return buffer_str;
 }
 
+/** \} */
+
+/*  */
+/** \name Internal #GWL_Cursor Type
+ * \{ */
+
 /**
  * From XKB internals, use for converting a scan-code from WAYLAND to a 
#xkb_keycode_t.
  * Ideally this wouldn't need a local define.
@@ -289,16 +297,26 @@ struct GWL_Cursor {
* the hardware cursor is used.
*/
   bool is_hardware = true;
+  /** When true, a custom image is used to display the cursor (stored in 
`wl_image`). */
   bool is_custom = false;
   struct wl_surface *wl_surface = nullptr;
   struct wl_buffer *wl_buffer = nullptr;
   struct wl_cursor_image wl_image = {0};
   struct wl_cursor_theme *wl_theme = nullptr;
   void *custom_data = nullptr;
+  /** The size of `custom_data` in bytes. */
   size_t custom_data_size = 0;
-  int size = 0;
+  /**
+   * The name of the theme (loaded by DBUS, depends on 
#WITH_GHOST_WAYLAND_DBUS).
+   * When disabled, leave as an empty string and the default theme will be 
used.
+   */
   std::string theme_name;
-
+  /**
+   * The size of the cursor (when looking up a cursor theme).
+   * This must be scaled by the maximum output scale when passing to 
wl_cursor_theme_load.
+   * See #update_cursor_scale.
+   * */
+  int theme_size = 0;
   int custom_scale = 1;
 };
 
@@ -309,6 +327,7 @@ struct GWL_Cursor {
  */
 struct GWL_TabletTool {
   struct GWL_Seat *seat = nullptr;
+  /** Tablets have a separate cursor to the 'pointer', this surface is used 
for cursor drawing. */
   struct wl_surface *wl_surface_cursor = nullptr;
   /** Used to delay clearing tablet focused wl_surface until the frame is 
handled. */
   bool proximity = false;
@@ -316,23 +335,51 @@ struct GWL_TabletTool {
   GHOST_TabletData data = GHOST_TABLET_DATA_NONE;
 };
 
+/** \} */
+
+/*  */
+/** \name Internal #GWL_DataOffer Type
+ * \{ */
+
+/**
+ * Data storage used for clipboard paste & drag-and-drop.
+ */
 struct GWL_DataOffer {
-  std::unordered_set types;
-  uint32_t source_actions = 0;
-  uint32_t dnd_action = 0;
   struct wl_data_offer *id = nullptr;
+  std::unordered_set types;
   std::atomic in_use = false;
+
   struct {
+/**
+ * Bit-mask with available drop options.
+ * #WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY, 
#WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE.. etc.
+ * The application that initializes the drag may set these depending on 
modifiers held
+ * \note when dragging begins. Currently ghost doesn't make use of these.
+ */
+enum wl_data_device_manager_dnd_action source_actions = 
WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
+enum wl_data_device_manager_dnd_action action = 
WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
 /** Compatible with #GWL_Seat.xy coordinates. */
 wl_fixed_t xy[2] = {0, 0};
   } dnd;
 };
 
+/** \} */
+
+/*  */
+/** \name Internal #GWL_DataSource Type
+ * \{ */
+
 struct GWL_DataSource {
-  struct wl_data_source *wl_data_source = nullptr;
+  struct wl_data_source *wl_source = nullptr;
   GWL_SimpleBuffer buffer_out;
 };
 
+/** \} */
+
+/* 

[Bf-blender-cvs] [97f4e076c7f] master: Fix: USD & Alembic importers might not initialize material indices

2022-10-20 Thread Hans Goudey
Commit: 97f4e076c7fcd362c9803dcf1afb303c110c997e
Author: Hans Goudey
Date:   Thu Oct 20 17:23:37 2022 -0500
Branches: master
https://developer.blender.org/rB97f4e076c7fcd362c9803dcf1afb303c110c997e

Fix: USD & Alembic importers might not initialize material indices

f1c0249f34c4171ec incorrectly assumed that the importer functions that
assigned material indices set all of the values, but that isn't true
for all files.

===

M   source/blender/io/alembic/intern/abc_reader_mesh.cc
M   source/blender/io/usd/intern/usd_reader_mesh.cc

===

diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc 
b/source/blender/io/alembic/intern/abc_reader_mesh.cc
index f08514dc45c..2531bd62609 100644
--- a/source/blender/io/alembic/intern/abc_reader_mesh.cc
+++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc
@@ -763,7 +763,7 @@ Mesh *AbcMeshReader::read_mesh(Mesh *existing_mesh,
   std::map mat_map;
   bke::MutableAttributeAccessor attributes = 
new_mesh->attributes_for_write();
   bke::SpanAttributeWriter material_indices =
-  attributes.lookup_or_add_for_write_only_span("material_index", 
ATTR_DOMAIN_FACE);
+  attributes.lookup_or_add_for_write_span("material_index", 
ATTR_DOMAIN_FACE);
   assign_facesets_to_material_indices(sample_sel, material_indices.span, 
mat_map);
   material_indices.finish();
 }
@@ -823,8 +823,8 @@ void AbcMeshReader::readFaceSetsSample(Main *bmain, Mesh 
*mesh, const ISampleSel
 {
   std::map mat_map;
   bke::MutableAttributeAccessor attributes = mesh->attributes_for_write();
-  bke::SpanAttributeWriter material_indices =
-  attributes.lookup_or_add_for_write_only_span("material_index", 
ATTR_DOMAIN_FACE);
+  bke::SpanAttributeWriter material_indices = 
attributes.lookup_or_add_for_write_span(
+  "material_index", ATTR_DOMAIN_FACE);
   assign_facesets_to_material_indices(sample_sel, material_indices.span, 
mat_map);
   material_indices.finish();
   utils::assign_materials(bmain, m_object, mat_map);
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc 
b/source/blender/io/usd/intern/usd_reader_mesh.cc
index 77c79852141..01db6baeb5c 100644
--- a/source/blender/io/usd/intern/usd_reader_mesh.cc
+++ b/source/blender/io/usd/intern/usd_reader_mesh.cc
@@ -804,8 +804,8 @@ void USDMeshReader::readFaceSetsSample(Main *bmain, Mesh 
*mesh, const double mot
   std::map mat_map;
 
   bke::MutableAttributeAccessor attributes = mesh->attributes_for_write();
-  bke::SpanAttributeWriter material_indices =
-  attributes.lookup_or_add_for_write_only_span("material_index", 
ATTR_DOMAIN_FACE);
+  bke::SpanAttributeWriter material_indices = 
attributes.lookup_or_add_for_write_span(
+  "material_index", ATTR_DOMAIN_FACE);
   this->assign_facesets_to_material_indices(motionSampleTime, 
material_indices.span, _map);
   material_indices.finish();
   /* Build material name map if it's not built yet. */
@@ -914,7 +914,7 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
   std::map mat_map;
   bke::MutableAttributeAccessor attributes = 
active_mesh->attributes_for_write();
   bke::SpanAttributeWriter material_indices =
-  attributes.lookup_or_add_for_write_only_span("material_index", 
ATTR_DOMAIN_FACE);
+  attributes.lookup_or_add_for_write_span("material_index", 
ATTR_DOMAIN_FACE);
   assign_facesets_to_material_indices(motionSampleTime, 
material_indices.span, _map);
   material_indices.finish();
 }

___
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] [46839d1f438] sculpt-dev: sculpt-dev: Roll mapping

2022-10-20 Thread Joseph Eagar
Commit: 46839d1f4386f3639caaef6d6c00e9503c9ca396
Author: Joseph Eagar
Date:   Thu Oct 20 15:19:54 2022 -0700
Branches: sculpt-dev
https://developer.blender.org/rB46839d1f4386f3639caaef6d6c00e9503c9ca396

sculpt-dev: Roll mapping

* Fixed errors in second derivative of stroke spline
* Fix error on surfaces at an oblique angle to the viewport
* Fix roll mapping not working for sculpt texture paint

===

M   source/blender/blenkernel/BKE_brush_engine.h
M   source/blender/blenlib/BLI_arc_spline.hh
M   source/blender/editors/sculpt_paint/paint_intern.h
M   source/blender/editors/sculpt_paint/paint_stroke.cc
M   source/blender/editors/sculpt_paint/sculpt.c
M   source/blender/editors/sculpt_paint/sculpt_paint_color.c

===

diff --git a/source/blender/blenkernel/BKE_brush_engine.h 
b/source/blender/blenkernel/BKE_brush_engine.h
index 6c3a3384deb..93be0de672f 100644
--- a/source/blender/blenkernel/BKE_brush_engine.h
+++ b/source/blender/blenkernel/BKE_brush_engine.h
@@ -207,6 +207,7 @@ typedef struct BrushCommand {
   struct BrushChannelSet *params_mapped; /* with pressure etc applied */
 
   BrushTex *texture_slots[MAKE_BRUSHTEX_SLOTS]; /* currently unused */
+  float initial_radius;
 } BrushCommand;
 
 typedef struct BrushCommandList {
diff --git a/source/blender/blenlib/BLI_arc_spline.hh 
b/source/blender/blenlib/BLI_arc_spline.hh
index 8f88c281b5c..9c7078a4970 100644
--- a/source/blender/blenlib/BLI_arc_spline.hh
+++ b/source/blender/blenlib/BLI_arc_spline.hh
@@ -10,6 +10,8 @@
 #include 
 #include 
 
+//#define FINITE_DIFF
+
 /*
  * Arc length parameterized spline library.
  */
@@ -263,7 +265,7 @@ template class CubicBezier {
 #endif
   }
 
-  Vector evaluate(Float s)
+  inline Vector evaluate(Float s)
   {
 Float t = arc_to_t(s);
 Vector r;
@@ -298,13 +300,31 @@ template class CubicBezier {
 
   Vector derivative2(Float s)
   {
+#ifdef FINITE_DIFF
+const Float df = 0.0005;
+Float s1, s2;
+
+if (s >= 1.0 - df) {
+  s1 = s - df;
+  s2 = s;
+}
+else {
+  s1 = s;
+  s2 = s + df;
+}
+
+Vector a = derivative(s1);
+Vector b = derivative(s2);
+
+return (b - a) / df;
+#else
 Float t = arc_to_t(s);
 Vector r;
 
 Float dx = dcubic(ps[0][0], ps[1][0], ps[2][0], ps[3][0], t);
-Float d2x = dcubic(ps[0][0], ps[1][0], ps[2][0], ps[3][0], t);
+Float d2x = d2cubic(ps[0][0], ps[1][0], ps[2][0], ps[3][0], t);
 Float dy = dcubic(ps[0][1], ps[1][1], ps[2][1], ps[3][1], t);
-Float d2y = dcubic(ps[0][1], ps[1][1], ps[2][1], ps[3][1], t);
+Float d2y = d2cubic(ps[0][1], ps[1][1], ps[2][1], ps[3][1], t);
 
 /*
 comment: arc length second derivative;
@@ -344,7 +364,7 @@ template class CubicBezier {
   r[0] = ((d2x * dy - d2y * dx) * dy) / div;
   r[1] = (-(d2x * dy - d2y * dx) * dx) / div;
 }
-else if (constexpr(axes == 3)) {
+else if constexpr (axes == 3) {
   Float dz = dcubic(ps[0][2], ps[1][2], ps[2][2], ps[3][2], t);
   Float d2z = d2cubic(ps[0][2], ps[1][2], ps[2][2], ps[3][2], t);
 
@@ -361,6 +381,7 @@ template class CubicBezier {
 }
 
 return r;
+#endif
   }
 
   Float curvature(Float s)
@@ -510,12 +531,8 @@ template class BezierSpline {
 }
   }
 
-  Vector evaluate(Float s)
+  inline Vector evaluate(Float s)
   {
-if (segments.size() == 0) {
-  return Vector();
-}
-
 if (s == 0.0) {
   return segments[0].bezier.ps[0];
 }
@@ -565,8 +582,16 @@ template class BezierSpline {
 return seg->bezier.curvature(s - seg->start);
   }
 
+  /* Find the closest point on the spline.  Uses a bisecting root finding 
approach.
+   * Note: in thoery we could split the spline into quadratic segments and 
solve
+   * for the closest point directy.
+   */
   Vector closest_point(const Vector p, Float _s, Vector _tan, Float _dis)
   {
+if (segments.size() == 0) {
+  return Vector();
+}
+
 const int steps = 5;
 Float s = 0.0, ds = length / steps;
 Float mindis = FLT_MAX;
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h 
b/source/blender/editors/sculpt_paint/paint_intern.h
index 871d7de0f84..8fbf2ff1804 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -128,7 +128,8 @@ typedef struct PaintStroke {
   /* space distance covered so far */
   int stroke_sample_index;
   float stroke_distance;
-  float stroke_distance_t;  // divided by brush radius
+  float stroke_distance_t; /* Divided by brush radius. */
+  float stroke_distance_world; /* Created by .world_spline. */
 
   /* Set whether any stroke step has yet occurred
* e.g. in sculpt mode, stroke doesn't start until cursor
@@ -656,8 +657,11 @@ void paint_project_spline(struct bContext *C,
   struct StrokeCache *cache,
   

[Bf-blender-cvs] [bd1ff201b1d] master: Buildfix for 078e034 missing include

2022-10-20 Thread Jens Verwiebe
Commit: bd1ff201b1dfb7bd382ed19079bcebddfc5e30d4
Author: Jens Verwiebe
Date:   Thu Oct 20 21:06:44 2022 +0200
Branches: master
https://developer.blender.org/rBbd1ff201b1dfb7bd382ed19079bcebddfc5e30d4

Buildfix for 078e034 missing include

===

M   
source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc

===

diff --git 
a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc 
b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
index 3a021bfe2d7..95173bd23a5 100644
--- 
a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
+++ 
b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
@@ -15,6 +15,8 @@
 #include "UI_interface.h"
 #include "UI_resources.h"
 
+#include "DEG_depsgraph_query.h"
+
 #include "node_geometry_util.hh"
 
 namespace blender::nodes {

___
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] [039eba79067] soc-2022-many-lights-sampling: Fix divisions by zero in adaptive splitting

2022-10-20 Thread Brecht Van Lommel
Commit: 039eba7906758101d0e44a52e7efc13f84f65fc0
Author: Brecht Van Lommel
Date:   Thu Oct 20 20:38:56 2022 +0200
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB039eba7906758101d0e44a52e7efc13f84f65fc0

Fix divisions by zero in adaptive splitting

===

M   intern/cycles/kernel/light/light_tree.h

===

diff --git a/intern/cycles/kernel/light/light_tree.h 
b/intern/cycles/kernel/light/light_tree.h
index 1d64d559c69..da5e4869c3b 100644
--- a/intern/cycles/kernel/light/light_tree.h
+++ b/intern/cycles/kernel/light/light_tree.h
@@ -216,7 +216,7 @@ ccl_device bool light_tree_should_split(KernelGlobals kg,
   const float radius = len(bbox_max - centroid);
   const float distance = len(P - centroid);
 
-  if (distance < radius) {
+  if (distance <= radius) {
 return true;
   }
 
@@ -615,8 +615,6 @@ ccl_device float light_tree_pdf(KernelGlobals kg,
 /* Leaf node */
 if (knode->child_index <= 0) {
 
-  float pdf_emitter_selection = 1.0f;
-
   /* If the leaf node contains the target emitter, we are processing the 
last node.
* We then iterate through the lights to find the target emitter.
* Otherwise, we randomly select one. */
@@ -636,11 +634,18 @@ ccl_device float light_tree_pdf(KernelGlobals kg,
   }
   total_emitter_importance += light_importance;
 }
-pdf_emitter_selection = target_emitter_importance / 
total_emitter_importance;
-const float pdf_reservoir = selected_reservoir_weight / 
total_reservoir_weight;
-pdf *= pdf_emitter_selection * pdf_reservoir;
+
+if (total_emitter_importance > 0.0f) {
+  const float pdf_emitter_selection = target_emitter_importance / 
total_emitter_importance;
+  const float pdf_reservoir = selected_reservoir_weight / 
total_reservoir_weight;
+  pdf *= pdf_emitter_selection * pdf_reservoir;
+}
+else {
+  pdf = 0.0f;
+}
   }
   else {
+float pdf_emitter_selection = 1.0f;
 selected_light = light_tree_cluster_select_emitter(
 kg, , P, N, has_transmission, knode, _emitter_selection);

___
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] [2946bfb6dc2] soc-2022-many-lights-sampling: Fix wrong return value in distant light sampling, triggering asserts

2022-10-20 Thread Brecht Van Lommel
Commit: 2946bfb6dc2f8947463b6d5179f96a07dce07b08
Author: Brecht Van Lommel
Date:   Thu Oct 20 20:34:21 2022 +0200
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB2946bfb6dc2f8947463b6d5179f96a07dce07b08

Fix wrong return value in distant light sampling, triggering asserts

===

M   intern/cycles/kernel/light/light_tree.h

===

diff --git a/intern/cycles/kernel/light/light_tree.h 
b/intern/cycles/kernel/light/light_tree.h
index bbbfa721dc3..1d64d559c69 100644
--- a/intern/cycles/kernel/light/light_tree.h
+++ b/intern/cycles/kernel/light/light_tree.h
@@ -525,7 +525,7 @@ ccl_device bool 
light_tree_sample_distant_lights(KernelGlobals kg,
   }
 
   if (total_importance == 0.0f) {
-return -1;
+return false;
   }
 
   float light_cdf = 0.0f;
@@ -541,7 +541,7 @@ ccl_device bool 
light_tree_sample_distant_lights(KernelGlobals kg,
   const int lamp = kdistant->prim_id;
 
   if (UNLIKELY(light_select_reached_max_bounces(kg, lamp, bounce))) {
-return -1;
+return false;
   }
 
   return light_sample(kg, lamp, *randu, randv, P, 
path_flag, ls);
@@ -552,7 +552,7 @@ ccl_device bool 
light_tree_sample_distant_lights(KernelGlobals kg,
   /* TODO: change implementation so that even under precision issues, we 
always end
* up selecting a light and this can't happen? */
   kernel_assert(false);
-  return -1;
+  return false;
 }
 
 /* We need to be able to find the probability of selecting a given light for 
MIS.

___
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] [31423b25067] soc-2022-many-lights-sampling: Fix assert in some test scenes, make float precision threshold a bit higher

2022-10-20 Thread Brecht Van Lommel
Commit: 31423b25067e5c7dd0f803e61860b504bc9e8d62
Author: Brecht Van Lommel
Date:   Thu Oct 20 19:05:43 2022 +0200
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB31423b25067e5c7dd0f803e61860b504bc9e8d62

Fix assert in some test scenes, make float precision threshold a bit higher

===

M   intern/cycles/kernel/light/light_tree.h

===

diff --git a/intern/cycles/kernel/light/light_tree.h 
b/intern/cycles/kernel/light/light_tree.h
index 4e634fa2659..bbbfa721dc3 100644
--- a/intern/cycles/kernel/light/light_tree.h
+++ b/intern/cycles/kernel/light/light_tree.h
@@ -69,13 +69,13 @@ ccl_device float light_tree_node_importance(const float3 P,
   float cos_theta_prime;
   if ((cos_theta > cos_theta_u) || (cos_theta_minus_theta_u > cos_theta_o)) {
 /* theta - theta_o - theta_u < 0 */
-kernel_assert((fast_acosf(cos_theta) - theta_o - fast_acosf(cos_theta_u)) 
< 1e-4f);
+kernel_assert((fast_acosf(cos_theta) - theta_o - fast_acosf(cos_theta_u)) 
< 5e-4f);
 cos_theta_prime = 1.0f;
   }
   else if ((cos_theta > cos_theta_u) || (theta_o + theta_e > M_PI_F) ||
(cos_theta_minus_theta_u > cos(theta_o + theta_e))) {
 /* theta' = theta - theta_o - theta_u < theta_e */
-kernel_assert((fast_acosf(cos_theta) - theta_o - fast_acosf(cos_theta_u) - 
theta_e) < 1e-4f);
+kernel_assert((fast_acosf(cos_theta) - theta_o - fast_acosf(cos_theta_u) - 
theta_e) < 5e-4f);
 const float sin_theta_minus_theta_u = safe_sqrtf(1.0f - 
sqr(cos_theta_minus_theta_u));
 cos_theta_prime = cos_theta_minus_theta_u * cos_theta_o +
   sin_theta_minus_theta_u * sin_theta_o;

___
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] [6ecbc49d82b] soc-2022-many-lights-sampling: Fix crashes and poor results with many lights on a line or same location

2022-10-20 Thread Brecht Van Lommel
Commit: 6ecbc49d82b2f25cd59ea326d43dab0d7d4706c7
Author: Brecht Van Lommel
Date:   Thu Oct 20 18:56:32 2022 +0200
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB6ecbc49d82b2f25cd59ea326d43dab0d7d4706c7

Fix crashes and poor results with many lights on a line or same location

Better handle such degenerate cases.

===

M   intern/cycles/scene/light_tree.cpp

===

diff --git a/intern/cycles/scene/light_tree.cpp 
b/intern/cycles/scene/light_tree.cpp
index 87e26ba2250..775b4c0bc73 100644
--- a/intern/cycles/scene/light_tree.cpp
+++ b/intern/cycles/scene/light_tree.cpp
@@ -341,7 +341,7 @@ LightTreeBuildNode 
*LightTree::recursive_build(vector 
   float energy_variance = (energy_squared_total / num_prims) - 
sqr(energy_total / num_prims);
 
   bool try_splitting = num_prims > 1 && len(centroid_bounds.size()) > 0.0f;
-  int min_dim, min_bucket;
+  int min_dim = -1, min_bucket = 0;
   bool should_split = false;
   if (try_splitting) {
 /* Find the best place to split the primitives into 2 nodes.
@@ -351,36 +351,46 @@ LightTreeBuildNode 
*LightTree::recursive_build(vector 
 should_split = num_prims > max_lights_in_leaf_ || min_cost < energy_total;
   }
   if (should_split) {
-/* Partition the primitives between start and end into the appropriate 
split,
- * based on the minimum dimension and minimum bucket returned from 
split_saoh.
- * This is an O(n) algorithm where we iterate from the left and right side,
- * and swaps the appropriate left and right elements until complete. */
-int left = start, right = end - 1;
-float bounding_dimension = (min_bucket + 1) * 
(centroid_bounds.size()[min_dim] /
-   
LightTreeBucketInfo::num_buckets) +
-   centroid_bounds.min[min_dim];
-while (left < right) {
-  while (primitive_info[left].centroid[min_dim] <= bounding_dimension && 
left < end) {
-left++;
-  }
+int middle;
+
+if (min_dim != -1) {
+  /* Partition the primitives between start and end into the appropriate 
split,
+   * based on the minimum dimension and minimum bucket returned from 
split_saoh.
+   * This is an O(n) algorithm where we iterate from the left and right 
side,
+   * and swaps the appropriate left and right elements until complete. */
+  int left = start, right = end - 1;
+  float bounding_dimension = (min_bucket + 1) * 
(centroid_bounds.size()[min_dim] /
+ 
LightTreeBucketInfo::num_buckets) +
+ centroid_bounds.min[min_dim];
+  while (left < right) {
+while (primitive_info[left].centroid[min_dim] <= bounding_dimension && 
left < end) {
+  left++;
+}
 
-  while (primitive_info[right].centroid[min_dim] > bounding_dimension && 
right >= start) {
-right--;
-  }
+while (primitive_info[right].centroid[min_dim] > bounding_dimension && 
right >= start) {
+  right--;
+}
 
-  if (left < right) {
-LightTreePrimitiveInfo temp = primitive_info[left];
-primitive_info[left] = primitive_info[right];
-primitive_info[right] = temp;
+if (left < right) {
+  LightTreePrimitiveInfo temp = primitive_info[left];
+  primitive_info[left] = primitive_info[right];
+  primitive_info[right] = temp;
+}
   }
+
+  middle = left;
+}
+else {
+  /* Degenerate case with many lights in the same place. */
+  middle = (start + end) / 2;
 }
 
 /* At this point, we should expect right to be just past left,
  * where left points to the first element that belongs to the right node. 
*/
 LightTreeBuildNode *left_node = recursive_build(
-primitive_info, start, left, total_nodes, ordered_prims, bit_trail, 
depth + 1);
+primitive_info, start, middle, total_nodes, ordered_prims, bit_trail, 
depth + 1);
 LightTreeBuildNode *right_node = recursive_build(primitive_info,
- left,
+ middle,
  end,
  total_nodes,
  ordered_prims,
@@ -417,7 +427,15 @@ float LightTree::min_split_saoh(const BoundBox 
_bbox,
 {
   /* Even though this factor is used for every bucket, we use it to compare
* the min_cost and total_energy (when deciding between creating a leaf or 
interior node. */
-  const float inv_total_cost = 1 / (bbox.area() * bcone.calculate_measure());
+  const float bbox_area = bbox.area();
+  const bool has_area = bbox_area != 0.0f;
+  const float total_area = has_area ? bbox_area : len(bbox.size());
+  const 

[Bf-blender-cvs] [8c361d6f66c] master: deps_builder: fix missing png harvest on windows

2022-10-20 Thread Ray Molenkamp
Commit: 8c361d6f66cf4d87f5fd220ff056ea563a7d8e07
Author: Ray Molenkamp
Date:   Thu Oct 20 11:46:42 2022 -0600
Branches: master
https://developer.blender.org/rB8c361d6f66cf4d87f5fd220ff056ea563a7d8e07

deps_builder: fix missing png harvest on windows

===

M   build_files/build_environment/cmake/png.cmake

===

diff --git a/build_files/build_environment/cmake/png.cmake 
b/build_files/build_environment/cmake/png.cmake
index 890be673cb8..371f2608e2a 100644
--- a/build_files/build_environment/cmake/png.cmake
+++ b/build_files/build_environment/cmake/png.cmake
@@ -24,6 +24,14 @@ add_dependencies(
   external_zlib
 )
 
+if(WIN32 AND BUILD_MODE STREQUAL Release)
+  ExternalProject_Add_Step(external_png after_install
+COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ 
${HARVEST_TARGET}/png/include/
+COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/png/lib/libpng16_static${LIBEXT} 
${HARVEST_TARGET}/png/lib/libpng${LIBEXT}
+DEPENDEES install
+  )
+endif()
+
 if(WIN32 AND BUILD_MODE STREQUAL Debug)
   ExternalProject_Add_Step(external_png after_install
 COMMAND ${CMAKE_COMMAND} -E copy 
${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}

___
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] [5e0e5b13410] master: Fix T101215: Distribute Points in Volume node does not refresh on frame change

2022-10-20 Thread Jacques Lucke
Commit: 5e0e5b13410350166553256272311774acd5aaa4
Author: Jacques Lucke
Date:   Thu Oct 20 18:01:44 2022 +0200
Branches: master
https://developer.blender.org/rB5e0e5b13410350166553256272311774acd5aaa4

Fix T101215: Distribute Points in Volume node does not refresh on frame change

===

M   
source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc

===

diff --git 
a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc 
b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
index 091337c28cf..3a021bfe2d7 100644
--- 
a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
+++ 
b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
@@ -208,6 +208,7 @@ static void 
geo_node_distribute_points_in_volume_exec(GeoNodeExecParams params)
 }
 const VolumeComponent *component = 
geometry_set.get_component_for_read();
 const Volume *volume = component->get_for_read();
+BKE_volume_load(volume, DEG_get_bmain(params.depsgraph()));
 
 Vector positions;

___
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] [24fd8f729a5] master: Fix memory leak when proxy building fails

2022-10-20 Thread Richard Antalik
Commit: 24fd8f729a58b18159912a84525b910b0d4e7ef5
Author: Richard Antalik
Date:   Thu Oct 20 17:54:29 2022 +0200
Branches: master
https://developer.blender.org/rB24fd8f729a58b18159912a84525b910b0d4e7ef5

Fix memory leak when proxy building fails

Leak introduced in recent fix - bf8d4a9bc6fb28.

===

M   source/blender/imbuf/intern/indexer.c

===

diff --git a/source/blender/imbuf/intern/indexer.c 
b/source/blender/imbuf/intern/indexer.c
index e8e4b80ef45..eaa72441fb6 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -909,6 +909,9 @@ static IndexBuildContext 
*index_ffmpeg_create_context(struct anim *anim,
 
   if (context->proxy_ctx[0] == NULL && context->proxy_ctx[1] == NULL &&
   context->proxy_ctx[2] == NULL && context->proxy_ctx[3] == NULL) {
+avformat_close_input(>iFormatCtx);
+avcodec_free_context(>iCodecCtx);
+MEM_freeN(context);
 return NULL; /* Nothing to transcode. */
   }

___
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] [4b30ee773ce] master: Fix T101316: workbench texture mode not working with geometry nodes

2022-10-20 Thread Jacques Lucke
Commit: 4b30ee773ce7f5e423830195e49ca06763ba230a
Author: Jacques Lucke
Date:   Thu Oct 20 17:34:22 2022 +0200
Branches: master
https://developer.blender.org/rB4b30ee773ce7f5e423830195e49ca06763ba230a

Fix T101316: workbench texture mode not working with geometry nodes

The `ED_object_get_active_image` is used from the renderer which deals with
evaluated objects. This means the material api for evaluated objects has
to be used.

===

M   source/blender/editors/uvedit/uvedit_ops.c

===

diff --git a/source/blender/editors/uvedit/uvedit_ops.c 
b/source/blender/editors/uvedit/uvedit_ops.c
index 5e2d9097abd..b65f4889347 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -37,6 +37,7 @@
 #include "BKE_node.h"
 
 #include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
 
 #include "ED_image.h"
 #include "ED_mesh.h"
@@ -113,7 +114,8 @@ bool ED_object_get_active_image(Object *ob,
 bNode **r_node,
 bNodeTree **r_ntree)
 {
-  Material *ma = BKE_object_material_get(ob, mat_nr);
+  Material *ma = DEG_is_evaluated_object(ob) ? 
BKE_object_material_get_eval(ob, mat_nr) :
+   BKE_object_material_get(ob, 
mat_nr);
   bNodeTree *ntree = (ma && ma->use_nodes) ? ma->nodetree : NULL;
   bNode *node = (ntree) ? nodeGetActiveTexture(ntree) : 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] [3bac6f17f1c] master: install_deps: Update Python, OIIO, openPGL and FFMPEG versions.

2022-10-20 Thread Bastien Montagne
Commit: 3bac6f17f1c197d69387e45d0ca8a5f77e8274ac
Author: Bastien Montagne
Date:   Thu Oct 20 17:04:49 2022 +0200
Branches: master
https://developer.blender.org/rB3bac6f17f1c197d69387e45d0ca8a5f77e8274ac

install_deps: Update Python, OIIO, openPGL and FFMPEG versions.

Update libraries for Blender 3.4, according to T101403:
* python: 3.10.8
* OIIO: 2.3.20.0
* OpenPGL: 0.4.0-beta
* FFMpeg: 5.1.2

===

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 f913ac5e73c..ef72ad5b40b 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -394,7 +394,7 @@ CLANG_FORMAT_VERSION="10.0"
 CLANG_FORMAT_VERSION_MIN="6.0"
 CLANG_FORMAT_VERSION_MEX="14.0"
 
-PYTHON_VERSION="3.10.2"
+PYTHON_VERSION="3.10.8"
 PYTHON_VERSION_SHORT="3.10"
 PYTHON_VERSION_MIN="3.10"
 PYTHON_VERSION_MEX="3.12"
@@ -505,7 +505,7 @@ OPENEXR_FORCE_REBUILD=false
 OPENEXR_SKIP=false
 _with_built_openexr=false
 
-OIIO_VERSION="2.3.13.0"
+OIIO_VERSION="2.3.20.0"
 OIIO_VERSION_SHORT="2.3"
 OIIO_VERSION_MIN="2.1.12"
 OIIO_VERSION_MEX="2.4.0"
@@ -602,10 +602,10 @@ LEVEL_ZERO_FORCE_BUILD=false
 LEVEL_ZERO_FORCE_REBUILD=false
 LEVEL_ZERO_SKIP=false
 
-OPENPGL_VERSION="0.3.1"
-OPENPGL_VERSION_SHORT="0.3"
+OPENPGL_VERSION="0.4.0"
+OPENPGL_VERSION_SHORT="0.4"
 OPENPGL_VERSION_MIN="0.3.1"
-OPENPGL_VERSION_MEX="0.3.2"
+OPENPGL_VERSION_MEX="0.5"
 OPENPGL_FORCE_BUILD=false
 OPENPGL_FORCE_REBUILD=false
 OPENPGL_SKIP=false
@@ -618,8 +618,8 @@ XR_OPENXR_FORCE_BUILD=false
 XR_OPENXR_FORCE_REBUILD=false
 XR_OPENXR_SKIP=false
 
-FFMPEG_VERSION="5.0"
-FFMPEG_VERSION_SHORT="5.0"
+FFMPEG_VERSION="5.1.2"
+FFMPEG_VERSION_SHORT="5.1"
 FFMPEG_VERSION_MIN="4.0"
 FFMPEG_VERSION_MEX="6.0"
 FFMPEG_FORCE_BUILD=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] [8415bc9c80a] master: Fix T101554: disable viewer node when corresponding modifier is disabled

2022-10-20 Thread Jacques Lucke
Commit: 8415bc9c80aad878f7b85a48ffd2ae55150f9dc4
Author: Jacques Lucke
Date:   Thu Oct 20 16:54:19 2022 +0200
Branches: master
https://developer.blender.org/rB8415bc9c80aad878f7b85a48ffd2ae55150f9dc4

Fix T101554: disable viewer node when corresponding modifier is disabled

===

M   source/blender/editors/util/ed_viewer_path.cc

===

diff --git a/source/blender/editors/util/ed_viewer_path.cc 
b/source/blender/editors/util/ed_viewer_path.cc
index 5c03367cba8..4da1559b726 100644
--- a/source/blender/editors/util/ed_viewer_path.cc
+++ b/source/blender/editors/util/ed_viewer_path.cc
@@ -249,6 +249,9 @@ bool is_active_geometry_nodes_viewer(const bContext ,
 if (md->type != eModifierType_Nodes) {
   return false;
 }
+if ((md->mode & eModifierMode_Realtime) == 0) {
+  return false;
+}
 modifier = reinterpret_cast(md);
 break;
   }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [84825e4ed2e] master: UI: Icon number indicator for data-blocks

2022-10-20 Thread Dalai Felinto
Commit: 84825e4ed2e098954f0c46adee4d65c8c0ba0e99
Author: Dalai Felinto
Date:   Thu Oct 20 16:37:07 2022 +0200
Branches: master
https://developer.blender.org/rB84825e4ed2e098954f0c46adee4d65c8c0ba0e99

UI: Icon number indicator for data-blocks

Adds the possibility of having a little number on top of icons.

At the moment this is used for:
* Outliner
* Node Editor bread-crumb
* Node Group node header

For the outliner there is almost no functional change. It is mostly a refactor
to handle the indicators as part of the icon shader instead of the outliner
draw code. (note that this was already recently changed in a5d3b648e3e2).

The difference is that now we use rounded border rectangle instead of
circles, and we can go up to 999 elements.

So for the outliner this shows the number of collapsed elements of a
certain type (e.g., mesh objects inside a collapsed collection).

For the node editors is being used to show the use count for the data-block.
This is important for the node editor, so users know whether the node-group
they are editing (or are about to edit) is used elsewhere. This is
particularly important when the Node Options are hidden, which is the
default for node groups appended from the asset libraries.

---

Note: This can be easily enabled for ID templates which can then be part
of T84669. It just need to call UI_but_icon_indicator_number_set in the
function template_add_button_search_menu.

---

Special thanks Clément Foucault for the help figuring out the shader,
Julian Eisel for the help navigating the UI code, and Pablo Vazquez for
the collaboration in this design solution.

For images showing the result check the Differential Revision.
Differential Revision: https://developer.blender.org/D16284

===

M   source/blender/blenlib/BLI_string.h
M   source/blender/blenlib/intern/string.c
M   source/blender/blenlib/tests/BLI_string_test.cc
M   source/blender/editors/include/UI_interface.h
M   source/blender/editors/include/UI_interface.hh
M   source/blender/editors/include/UI_interface_icons.h
M   source/blender/editors/interface/interface.cc
M   source/blender/editors/interface/interface_context_path.cc
M   source/blender/editors/interface/interface_icons.c
M   source/blender/editors/interface/interface_intern.h
M   source/blender/editors/interface/interface_layout.c
M   source/blender/editors/interface/interface_panel.cc
M   source/blender/editors/interface/interface_widgets.c
M   source/blender/editors/screen/area.c
M   source/blender/editors/space_file/file_draw.c
M   source/blender/editors/space_info/textview.c
M   source/blender/editors/space_node/node_draw.cc
M   source/blender/editors/space_node/node_relationships.cc
M   source/blender/editors/space_outliner/outliner_draw.cc
M   source/blender/gpu/CMakeLists.txt
M   source/blender/gpu/GPU_shader.h
M   source/blender/gpu/intern/gpu_shader_builtin.c
A   source/blender/gpu/shaders/gpu_shader_icon_frag.glsl
A   source/blender/gpu/shaders/gpu_shader_icon_vert.glsl
M   source/blender/gpu/shaders/infos/gpu_interface_info.hh
A   source/blender/gpu/shaders/infos/gpu_shader_icon_info.hh
M   source/blender/windowmanager/intern/wm_dragdrop.cc

===

diff --git a/source/blender/blenlib/BLI_string.h 
b/source/blender/blenlib/BLI_string.h
index 15926e8f2d2..17abcf52ecc 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -308,6 +308,28 @@ void BLI_str_format_byte_unit(char dst[15], long long int 
bytes, bool base_10) A
  * Length of 7 is the maximum of the resulting string, for example, `-15.5K\0`.
  */
 void BLI_str_format_decimal_unit(char dst[7], int number_to_format) 
ATTR_NONNULL();
+/**
+ * Format a count to up to 3 places (plus minus sign, plus '\0' terminator) 
string using long
+ * number names abbreviations. Used to produce a compact representation of 
large numbers as
+ * integers.
+ *
+ * It shows a lower bound instead of rounding the number.
+ *
+ * 1 -> 1
+ * 15 -> 15
+ * 155 -> 155
+ * 1555 -> 1K
+ * 1 -> 15K
+ * 15 -> .1M
+ * 155 -> 1M
+ * 1555 -> 15M
+ * 1 -> .1B
+ * 10 -> 1B
+ * ...
+ *
+ * Length of 5 is the maximum of the resulting string, for example, `-15K\0`.
+ */
+void BLI_str_format_integer_unit(char dst[5], int number_to_format) 
ATTR_NONNULL();
 /**
  * Compare two strings without regard to case.
  *
diff --git a/source/blender/blenlib/intern/string.c 
b/source/blender/blenlib/intern/string.c
index 89d31c5e93f..755d2dbd55d 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -1176,4 +1176,34 @@ void BLI_str_format_decimal_unit(char dst[7], int 
number_to_format)
   BLI_snprintf(dst, dst_len, "%.*f%s", decimals, number_to_format_converted, 
units[order]);
 }
 
+void 

[Bf-blender-cvs] [58e25f11ae9] master: Realtime Compositor: Implement normalize node

2022-10-20 Thread Omar Emara
Commit: 58e25f11ae9eb805dd857fae56be1d1a43710091
Author: Omar Emara
Date:   Thu Oct 20 16:31:35 2022 +0200
Branches: master
https://developer.blender.org/rB58e25f11ae9eb805dd857fae56be1d1a43710091

Realtime Compositor: Implement normalize node

This patch implements the normalize node for the realtime compositor.

Differential Revision: https://developer.blender.org/D16279

Reviewed By: Clement Foucault

===

M   
source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
M   
source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
M   source/blender/gpu/CMakeLists.txt
A   source/blender/gpu/shaders/compositor/compositor_normalize.glsl
A   source/blender/gpu/shaders/compositor/infos/compositor_normalize_info.hh
M   
source/blender/gpu/shaders/compositor/infos/compositor_parallel_reduction_info.hh
M   source/blender/nodes/composite/nodes/node_composite_normalize.cc

===

diff --git 
a/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
 
b/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
index b094782c18e..f6d479f9bbe 100644
--- 
a/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
+++ 
b/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
@@ -70,6 +70,17 @@ float sum_luminance_squared_difference(Context ,
  * coefficients to compute the luminance. */
 float maximum_luminance(Context , GPUTexture *texture, float3 
luminance_coefficients);
 
+/* Computes the maximum float of all pixels in the given float texture, 
limited to the given range.
+ * Values outside of the given range are ignored. If non of the pixel values 
are in the range, the
+ * lower bound of the range is returned. For instance, if the given range is 
[-10, 10] and the
+ * image contains the values {2, 5, 11}, the maximum will be 5, since 11 is 
outside of the range.
+ * This is particularly useful for Z Depth normalization, since Z Depth can 
contain near infinite
+ * values, so enforcing an upper bound is beneficial. */
+float maximum_float_in_range(Context ,
+ GPUTexture *texture,
+ float lower_bound,
+ float upper_bound);
+
 /* 
  * Minimum Reductions.
  */
@@ -78,4 +89,15 @@ float maximum_luminance(Context , GPUTexture 
*texture, float3 luminance_
  * coefficients to compute the luminance. */
 float minimum_luminance(Context , GPUTexture *texture, float3 
luminance_coefficients);
 
+/* Computes the minimum float of all pixels in the given float texture, 
limited to the given range.
+ * Values outside of the given range are ignored. If non of the pixel values 
are in the range, the
+ * upper bound of the range is returned. For instance, if the given range is 
[-10, 10] and the
+ * image contains the values {-11, 2, 5}, the minimum will be 2, since -11 is 
outside of the range.
+ * This is particularly useful for Z Depth normalization, since Z Depth can 
contain near infinite
+ * values, so enforcing a lower bound is beneficial. */
+float minimum_float_in_range(Context ,
+ GPUTexture *texture,
+ float lower_bound,
+ float upper_bound);
+
 }  // namespace blender::realtime_compositor
diff --git 
a/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
 
b/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
index 139c58bc190..9672431992d 100644
--- 
a/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
+++ 
b/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
@@ -249,6 +249,25 @@ float maximum_luminance(Context , GPUTexture 
*texture, float3 luminance_
   return maximum;
 }
 
+float maximum_float_in_range(Context ,
+ GPUTexture *texture,
+ float lower_bound,
+ float upper_bound)
+{
+  GPUShader *shader = 
context.shader_manager().get("compositor_maximum_float_in_range");
+  GPU_shader_bind(shader);
+
+  GPU_shader_uniform_1f(shader, "lower_bound", lower_bound);
+  GPU_shader_uniform_1f(shader, "upper_bound", upper_bound);
+
+  float *reduced_value = parallel_reduction_dispatch(context, texture, shader, 
GPU_R32F);
+  const float maximum = *reduced_value;
+  MEM_freeN(reduced_value);
+  GPU_shader_unbind();
+
+  return maximum;
+}
+
 /* 
  * Minimum Reductions.
  */
@@ -268,4 +287,23 @@ float 

[Bf-blender-cvs] [9d710374bda] master: Fix T101645: division by zero in fillet node

2022-10-20 Thread Jacques Lucke
Commit: 9d710374bda41359132f929286f5eea7340441b5
Author: Jacques Lucke
Date:   Thu Oct 20 16:15:02 2022 +0200
Branches: master
https://developer.blender.org/rB9d710374bda41359132f929286f5eea7340441b5

Fix T101645: division by zero in fillet node

===

M   source/blender/geometry/intern/fillet_curves.cc

===

diff --git a/source/blender/geometry/intern/fillet_curves.cc 
b/source/blender/geometry/intern/fillet_curves.cc
index 1bbbee6edef..2479458f88d 100644
--- a/source/blender/geometry/intern/fillet_curves.cc
+++ b/source/blender/geometry/intern/fillet_curves.cc
@@ -148,12 +148,14 @@ static float limit_radius(const float3 _prev,
   const float displacement_prev = radius_prev * std::tan(angle_prev / 2.0f);
   const float segment_length_prev = math::distance(position, position_prev);
   const float total_displacement_prev = displacement_prev + displacement;
-  const float factor_prev = std::clamp(segment_length_prev / 
total_displacement_prev, 0.0f, 1.0f);
+  const float factor_prev = std::clamp(
+  safe_divide(segment_length_prev, total_displacement_prev), 0.0f, 1.0f);
 
   const float displacement_next = radius_next * std::tan(angle_next / 2.0f);
   const float segment_length_next = math::distance(position, position_next);
   const float total_displacement_next = displacement_next + displacement;
-  const float factor_next = std::clamp(segment_length_next / 
total_displacement_next, 0.0f, 1.0f);
+  const float factor_next = std::clamp(
+  safe_divide(segment_length_next, total_displacement_next), 0.0f, 1.0f);
 
   return radius * std::min(factor_prev, factor_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] [f017fdecefc] master: ViewLayer: Reduce object duplication syncing

2022-10-20 Thread Monique Dewanchand
Commit: f017fdecefc41ffe796ccfe9a1cb05772a7ad315
Author: Monique Dewanchand
Date:   Thu Oct 20 16:14:03 2022 +0200
Branches: master
https://developer.blender.org/rBf017fdecefc41ffe796ccfe9a1cb05772a7ad315

ViewLayer: Reduce object duplication syncing

During object duplication the syncing is temporarily disabled.
With {D15885} this isn't useful as when disabled the view_layer
is still accessed to locate bases. This can be improved by first
locating the source bases, then duplicate and sync and locate
the new bases.

This patch removes the resync forbid and improve the times
that resyncing actually must happen.

Reviewed By: mont29

Maniphest Tasks: T73411

Differential Revision: https://developer.blender.org/D15886

===

M   source/blender/editors/object/object_add.cc

===

diff --git a/source/blender/editors/object/object_add.cc 
b/source/blender/editors/object/object_add.cc
index 3ce39b695e0..f6eee7c0c9e 100644
--- a/source/blender/editors/object/object_add.cc
+++ b/source/blender/editors/object/object_add.cc
@@ -3556,11 +3556,62 @@ void OBJECT_OT_convert(wmOperatorType *ot)
 /** \name Duplicate Object Operator
  * \{ */
 
+static void object_add_sync_base_collection(
+Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base_src, Object 
*object_new)
+{
+  if ((base_src != nullptr) && (base_src->flag & 
BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT)) {
+BKE_collection_object_add_from(bmain, scene, base_src->object, object_new);
+  }
+  else {
+LayerCollection *layer_collection = 
BKE_layer_collection_get_active(view_layer);
+BKE_collection_object_add(bmain, layer_collection->collection, object_new);
+  }
+}
+
+static void object_add_sync_local_view(Base *base_src, Base *base_new)
+{
+  base_new->local_view_bits = base_src->local_view_bits;
+}
+
+static void object_add_sync_rigid_body(Main *bmain, Object *object_src, Object 
*object_new)
+{
+  /* 1) duplis should end up in same collection as the original
+   * 2) Rigid Body sim participants MUST always be part of a collection...
+   */
+  /* XXX: is 2) really a good measure here? */
+  if (object_src->rigidbody_object || object_src->rigidbody_constraint) {
+LISTBASE_FOREACH (Collection *, collection, >collections) {
+  if (BKE_collection_has_object(collection, object_src)) {
+BKE_collection_object_add(bmain, collection, object_new);
+  }
+}
+  }
+}
+
 /**
  * - Assumes `id.new` is correct.
  * - Leaves selection of base/object unaltered.
  * - Sets #ID.newid pointers.
  */
+static void object_add_duplicate_internal(Main *bmain,
+  Object *ob,
+  const eDupli_ID_Flags dupflag,
+  const eLibIDDuplicateFlags 
duplicate_options,
+  Object **r_ob_new)
+{
+  if (ob->mode & OB_MODE_POSE) {
+return;
+  }
+
+  Object *obn = static_cast(
+  ID_NEW_SET(ob, BKE_object_duplicate(bmain, ob, dupflag, 
duplicate_options)));
+  if (r_ob_new) {
+*r_ob_new = obn;
+  }
+  DEG_id_tag_update(>id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+  return;
+}
+
 static Base *object_add_duplicate_internal(Main *bmain,
Scene *scene,
ViewLayer *view_layer,
@@ -3569,49 +3620,25 @@ static Base *object_add_duplicate_internal(Main *bmain,
const eLibIDDuplicateFlags 
duplicate_options,
Object **r_ob_new)
 {
-  Base *base, *basen = nullptr;
-  Object *obn;
-
-  if (ob->mode & OB_MODE_POSE) {
-/* nothing? */
+  Object *object_new = nullptr;
+  object_add_duplicate_internal(bmain, ob, dupflag, duplicate_options, 
_new);
+  if (r_ob_new) {
+*r_ob_new = object_new;
+  }
+  if (object_new == nullptr) {
+return nullptr;
   }
-  else {
-obn = static_cast(
-ID_NEW_SET(ob, BKE_object_duplicate(bmain, ob, dupflag, 
duplicate_options)));
-if (r_ob_new) {
-  *r_ob_new = obn;
-}
-DEG_id_tag_update(>id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
-
-BKE_view_layer_synced_ensure(scene, view_layer);
-base = BKE_view_layer_base_find(view_layer, ob);
-if ((base != nullptr) && (base->flag & 
BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT)) {
-  BKE_collection_object_add_from(bmain, scene, ob, obn);
-}
-else {
-  LayerCollection *layer_collection = 
BKE_layer_collection_get_active(view_layer);
-  BKE_collection_object_add(bmain, layer_collection->collection, obn);
-}
-
-BKE_view_layer_synced_ensure(scene, view_layer);
-basen = BKE_view_layer_base_find(view_layer, obn);
-if (base != nullptr && basen != nullptr) {
-  basen->local_view_bits = base->local_view_bits;
-}
 
-/* 1) duplis should end up in same 

[Bf-blender-cvs] [7aaebf31df0] master: Cycles: replace (tm) with unicode equivalent in UI

2022-10-20 Thread Xavier Hallade
Commit: 7aaebf31df034397f3b28ab12daac9d3177c0950
Author: Xavier Hallade
Date:   Thu Oct 20 15:49:36 2022 +0200
Branches: master
https://developer.blender.org/rB7aaebf31df034397f3b28ab12daac9d3177c0950

Cycles: replace (tm) with unicode equivalent in UI

It was already done for (TM) which is present in some GPU names on Windows.
Names on Linux ended up using (tm) instead:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/91fec2657a0dcf9bc2e6d080d84a114ecde44382

===

M   intern/cycles/blender/addon/properties.py

===

diff --git a/intern/cycles/blender/addon/properties.py 
b/intern/cycles/blender/addon/properties.py
index b7ce76d8f44..425d123e9e6 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -1651,6 +1651,7 @@ class CyclesPreferences(bpy.types.AddonPreferences):
 box.prop(
 device, "use", text=device.name
 .replace('(TM)', unicodedata.lookup('TRADE MARK SIGN'))
+.replace('(tm)', unicodedata.lookup('TRADE MARK SIGN'))
 .replace('(R)', unicodedata.lookup('REGISTERED SIGN'))
 .replace('(C)', unicodedata.lookup('COPYRIGHT SIGN'))
 )

___
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] [7f2cd2d969c] master: Realtime Compositor: Implement Tone Map node

2022-10-20 Thread Omar Emara
Commit: 7f2cd2d969cb227fcde406f68492492d97d1322e
Author: Omar Emara
Date:   Thu Oct 20 15:02:41 2022 +0200
Branches: master
https://developer.blender.org/rB7f2cd2d969cb227fcde406f68492492d97d1322e

Realtime Compositor: Implement Tone Map node

This patch implements the tone map node for the realtime compositor
based on the two papers:

Reinhard, Erik, et al. "Photographic tone reproduction for digital
images." Proceedings of the 29th annual conference on Computer graphics
and interactive techniques. 2002.

Reinhard, Erik, and Kate Devlin. "Dynamic range reduction inspired by
photoreceptor physiology." IEEE transactions on visualization and
computer graphics 11.1 (2005): 13-24.

The original implementation should be revisited later due to apparent
incompatibilities with the reference papers, which makes the operation
less useful.

Differential Revision: https://developer.blender.org/D16306

Reviewed By: Clement Foucault

===

M   
source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
M   
source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
M   source/blender/gpu/CMakeLists.txt
A   
source/blender/gpu/shaders/compositor/compositor_tone_map_photoreceptor.glsl
A   source/blender/gpu/shaders/compositor/compositor_tone_map_simple.glsl
M   
source/blender/gpu/shaders/compositor/infos/compositor_parallel_reduction_info.hh
A   
source/blender/gpu/shaders/compositor/infos/compositor_tone_map_photoreceptor_info.hh
A   
source/blender/gpu/shaders/compositor/infos/compositor_tone_map_simple_info.hh
M   source/blender/makesdna/DNA_node_types.h
M   source/blender/nodes/composite/nodes/node_composite_tonemap.cc

===

diff --git 
a/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
 
b/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
index 9d0851eff84..b094782c18e 100644
--- 
a/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
+++ 
b/source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
@@ -27,6 +27,13 @@ float sum_blue(Context , GPUTexture *texture);
  * coefficients to compute the luminance. */
 float sum_luminance(Context , GPUTexture *texture, float3 
luminance_coefficients);
 
+/* Computes the sum of the logarithm of the luminance of all pixels in the 
given texture, using the
+ * given luminance coefficients to compute the luminance. */
+float sum_log_luminance(Context , GPUTexture *texture, float3 
luminance_coefficients);
+
+/* Computes the sum of the colors of all pixels in the given texture. */
+float4 sum_color(Context , GPUTexture *texture);
+
 /* 
  * Sum Of Squared Difference Reductions.
  */
@@ -55,4 +62,20 @@ float sum_luminance_squared_difference(Context ,
float3 luminance_coefficients,
float subtrahend);
 
+/* 
+ * Maximum Reductions.
+ */
+
+/* Computes the maximum luminance of all pixels in the given texture, using 
the given luminance
+ * coefficients to compute the luminance. */
+float maximum_luminance(Context , GPUTexture *texture, float3 
luminance_coefficients);
+
+/* 
+ * Minimum Reductions.
+ */
+
+/* Computes the minimum luminance of all pixels in the given texture, using 
the given luminance
+ * coefficients to compute the luminance. */
+float minimum_luminance(Context , GPUTexture *texture, float3 
luminance_coefficients);
+
 }  // namespace blender::realtime_compositor
diff --git 
a/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
 
b/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
index 3266ccd14eb..139c58bc190 100644
--- 
a/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
+++ 
b/source/blender/compositor/realtime_compositor/algorithms/intern/algorithm_parallel_reduction.cc
@@ -134,6 +134,34 @@ float sum_luminance(Context , GPUTexture *texture, 
float3 luminance_coef
   return sum;
 }
 
+float sum_log_luminance(Context , GPUTexture *texture, float3 
luminance_coefficients)
+{
+  GPUShader *shader = 
context.shader_manager().get("compositor_sum_log_luminance");
+  GPU_shader_bind(shader);
+
+  GPU_shader_uniform_3fv(shader, "luminance_coefficients", 
luminance_coefficients);
+
+  float *reduced_value = parallel_reduction_dispatch(context, texture, shader, 
GPU_R32F);
+  const float sum = *reduced_value;
+  MEM_freeN(reduced_value);
+  GPU_shader_unbind();
+
+  

[Bf-blender-cvs] [21deba56aae] master: Build: update various libraries for 3.4, fixing bugs and security issues

2022-10-20 Thread Ray Molenkamp
Commit: 21deba56aaeccf94d83024a9de4eef49ea05984f
Author: Ray Molenkamp
Date:   Thu Oct 20 13:25:54 2022 +0200
Branches: master
https://developer.blender.org/rB21deba56aaeccf94d83024a9de4eef49ea05984f

Build: update various libraries for 3.4, fixing bugs and security issues

THis is bumping dependencies to fix known CVEs, with the exception of
OpenImageIO which also includes bugfixes for performance and correctness
with some image types.

zlib 1.2.12 -> 1.2.13
freetype 2.11.1 -> 2.12.1
openimageio 2.3.13.0 -> 2.3.20.0
python 3.10.2 -> 3.10.8
openjpeg 2.4.0 -> 2.5.0
ffmpeg 5.0 -> 5.1.2
sndfile 1.0.28 -> 1.1.0
xml2 2.9.10 -> 2.10.3
expat 2.4.4 -> 2.4.9
openssl 1.1.1g/i -> 1.1.1q
sqlite 3.31.1 -> 3.37.2

Notable changes:
* AOM: the hack we had in place to make it not detect pthreads on windows no
  longer worked with a more recent cmake version. Disabled pthreads with a
  diff on Windows.
* Python: embedded copy of zlib 2.1.12 swapped out for our 2.1.13 copy with
  some folder manipulation on Windows.
* Freetype: was harbouring a copy of zlib 2.1.12 as well, so that had to end.
* FFmpeg: patch used to fix D11796 is no longer needed. Add new patch to deal
  with simple_idct.asm generating an object file with no sections in it,
  backport from upstream commit.
* TinyXML: still being downloaded but no longer used by OpenColorIO, removed.
* GMP applied upstream patch to fix CVE-2021-43618, as there is no release yet.
* SQLite and Libsndfile patches no longer needed.

Includes contributes by Ray Molenkamp, Campbell Barton and Brecht Van Lommel.

Ref T101403

Differential Revision: https://developer.blender.org/D16269

===

M   build_files/build_environment/cmake/aom.cmake
M   build_files/build_environment/cmake/download.cmake
M   build_files/build_environment/cmake/ffmpeg.cmake
M   build_files/build_environment/cmake/freetype.cmake
M   build_files/build_environment/cmake/gmp.cmake
M   build_files/build_environment/cmake/llvm.cmake
M   build_files/build_environment/cmake/osl.cmake
M   build_files/build_environment/cmake/python.cmake
M   build_files/build_environment/cmake/sndfile.cmake
M   build_files/build_environment/cmake/sqlite.cmake
M   build_files/build_environment/cmake/ssl.cmake
M   build_files/build_environment/cmake/tiff.cmake
M   build_files/build_environment/cmake/versions.cmake
M   build_files/build_environment/cmake/wayland.cmake
M   build_files/build_environment/dependencies.dot
A   build_files/build_environment/patches/aom.diff
M   build_files/build_environment/patches/ffmpeg.diff
A   build_files/build_environment/patches/gmp.diff
M   build_files/build_environment/patches/osl.diff
D   build_files/build_environment/patches/python_windows.diff
D   build_files/build_environment/patches/sndfile.diff
D   build_files/build_environment/patches/sqlite.diff
A   build_files/build_environment/patches/ssl.diff
M   build_files/cmake/platform/platform_win32.cmake

===

diff --git a/build_files/build_environment/cmake/aom.cmake 
b/build_files/build_environment/cmake/aom.cmake
index 9f64439771f..11c81c3f6e4 100644
--- a/build_files/build_environment/cmake/aom.cmake
+++ b/build_files/build_environment/cmake/aom.cmake
@@ -8,11 +8,6 @@ if(WIN32)
   # building with mingw, it'll have an unhappy time with that and
   # we need to clear them out.
   set(AOM_CMAKE_FLAGS )
-  # CMake will correctly identify phreads being available, however
-  # we do not want to use them, as that gains a dependency on
-  # libpthreadswin.dll which we do not want. when pthreads is not
-  # available oam will use a pthreads emulation layer using win32 threads
-  set(AOM_EXTRA_ARGS_WIN32 -DCMAKE_HAVE_PTHREAD_H=OFF)
 else()
   set(AOM_GENERATOR "Unix Makefiles")
   set(AOM_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
@@ -36,6 +31,7 @@ ExternalProject_Add(external_aom
   DOWNLOAD_DIR ${DOWNLOAD_DIR}
   URL_HASH ${AOM_HASH_TYPE}=${AOM_HASH}
   PREFIX ${BUILD_DIR}/aom
+  PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d 
${BUILD_DIR}/aom/src/external_aom < ${PATCH_DIR}/aom.diff
   CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
 cd ${BUILD_DIR}/aom/src/external_aom-build/ &&
 ${CMAKE_COMMAND} -G "${AOM_GENERATOR}" 
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/aom ${AOM_CMAKE_FLAGS} ${AOM_EXTRA_ARGS} 
${BUILD_DIR}/aom/src/external_aom/
diff --git a/build_files/build_environment/cmake/download.cmake 
b/build_files/build_environment/cmake/download.cmake
index 35bc028a1e3..8d75f0ff0ed 100644
--- a/build_files/build_environment/cmake/download.cmake
+++ b/build_files/build_environment/cmake/download.cmake
@@ -62,7 +62,7 @@ function(download_source dep)
 # since the actual build of the dep will notify the
 # platform maintainer if there is a problem with the
 # source package and refuse to build.
-if(NOT PACKAGE_USE_UPSTREAM_SOURCES)
+

[Bf-blender-cvs] [0d7065504ef] master: Build: mark remaining CVEs reported by cve_check as mitigated or ignored

2022-10-20 Thread Brecht Van Lommel
Commit: 0d7065504effe3fe7f1483e79e39162249fa5099
Author: Brecht Van Lommel
Date:   Thu Oct 20 13:26:47 2022 +0200
Branches: master
https://developer.blender.org/rB0d7065504effe3fe7f1483e79e39162249fa5099

Build: mark remaining CVEs reported by cve_check as mitigated or ignored

After the last library update cve_check still reported some false positives.
One GMP issues was mitigated with a patch in the library update. The others
are ignored, with a description explaining why they do not affect Blender.

Ref D16269, T101403

===

M   build_files/build_environment/cmake/cve_check.cmake
M   build_files/build_environment/cmake/cve_check.csv.in

===

diff --git a/build_files/build_environment/cmake/cve_check.cmake 
b/build_files/build_environment/cmake/cve_check.cmake
index dfb190bcffa..ac42444aef1 100644
--- a/build_files/build_environment/cmake/cve_check.cmake
+++ b/build_files/build_environment/cmake/cve_check.cmake
@@ -27,10 +27,12 @@ get_cmake_property(_variableNames VARIABLES)
 foreach (_variableName ${_variableNames})
   if(_variableName MATCHES "CPE$")
   string(REPLACE ":" ";" CPE_LIST ${${_variableName}})
+  string(REPLACE "_CPE" "_ID" CPE_DEPNAME ${_variableName})
   list(GET CPE_LIST 3 CPE_VENDOR)
   list(GET CPE_LIST 4 CPE_NAME)
   list(GET CPE_LIST 5 CPE_VERSION)
-  set(SBOMCONTENTS 
"${SBOMCONTENTS}${CPE_VENDOR},${CPE_NAME},${CPE_VERSION}\n")
+  set(${CPE_DEPNAME} "${CPE_VENDOR},${CPE_NAME},${CPE_VERSION}")
+  set(SBOMCONTENTS 
"${SBOMCONTENTS}${CPE_VENDOR},${CPE_NAME},${CPE_VERSION},,,\n")
   endif()
 endforeach()
 configure_file(${CMAKE_SOURCE_DIR}/cmake/cve_check.csv.in 
${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv @ONLY)
diff --git a/build_files/build_environment/cmake/cve_check.csv.in 
b/build_files/build_environment/cmake/cve_check.csv.in
index 6e7e8db5609..734a24f8c77 100644
--- a/build_files/build_environment/cmake/cve_check.csv.in
+++ b/build_files/build_environment/cmake/cve_check.csv.in
@@ -1,2 +1,23 @@
-vendor,product,version
+vendor,product,version,cve_number,remarks,comment
+@OPENJPEG_ID@,CVE-2016-9675,Ignored,issue in convert command line tool not 
used by blender
+@PYTHON_ID@,CVE-2009-2940,Ignored,issue in pygresql not used by blender
+@PYTHON_ID@,CVE-2020-29396,Ignored,issue in odoo not used by blender
+@PYTHON_ID@,CVE-2021-32052,Ignored,issue in django not used by blender
+@PYTHON_ID@,CVE-2009-3720,Ignored,already fixed in libexpat version used
+@SSL_ID@,CVE-2009-1390,Ignored,issue in mutt not used by blender
+@SSL_ID@,CVE-2009-3765,Ignored,issue in mutt not used by blender
+@SSL_ID@,CVE-2009-3766,Ignored,issue in mutt not used by blender
+@SSL_ID@,CVE-2009-3767,Ignored,issue in ldap not used by blender
+@SSL_ID@,CVE-2019-0190,Ignored,issue in apache not used by blender
+@TIFF_ID@,CVE-2022-2056,Ignored,issue in tiff command line tool not used by 
blender
+@TIFF_ID@,CVE-2022-2057,Ignored,issue in tiff command line tool not used by 
blender
+@TIFF_ID@,CVE-2022-2058,Ignored,issue in tiff command line tool not used by 
blender
+@TIFF_ID@,CVE-2022-2519,Ignored,issue in tiff command line tool not used by 
blender
+@TIFF_ID@,CVE-2022-2520,Ignored,issue in tiff command line tool not used by 
blender
+@TIFF_ID@,CVE-2022-2521,Ignored,issue in tiff command line tool not used by 
blender
+@TIFF_ID@,CVE-2022-2953,Ignored,issue in tiff command line tool not used by 
blender
+@TIFF_ID@,CVE-2022-34526,Ignored,issue in tiff command line tool not used by 
blender
+@XML2_ID@,CVE-2016-3709,Ignored,not affecting blender and not considered a 
security issue upstream
+@GMP_ID@,CVE-2021-43618,Mitigated,patched using upstream commit 561a9c25298e
+@SQLITE_ID@,CVE-2022-35737,Ignored,only affects SQLITE_ENABLE_STAT4 compile 
option not used by blender or python
 @SBOMCONTENTS@

___
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] [fd7a3e26222] master: Cleanup: compiler warnings

2022-10-20 Thread Brecht Van Lommel
Commit: fd7a3e262224e2936eee1216a8aa57e6e381aba6
Author: Brecht Van Lommel
Date:   Wed Oct 19 15:33:42 2022 +0200
Branches: master
https://developer.blender.org/rBfd7a3e262224e2936eee1216a8aa57e6e381aba6

Cleanup: compiler warnings

===

M   intern/ghost/intern/GHOST_SystemWayland.cpp
M   intern/ghost/intern/GHOST_SystemWayland.h

===

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp 
b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 264476f00bc..fb69973eac6 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -193,42 +193,42 @@ struct GWL_ModifierInfo {
 };
 
 static const GWL_ModifierInfo g_modifier_info_table[MOD_INDEX_NUM] = {
-[MOD_INDEX_SHIFT] =
-{
-.display_name = "Shift",
-.xkb_id = XKB_MOD_NAME_SHIFT,
-.key_l = GHOST_kKeyLeftShift,
-.key_r = GHOST_kKeyRightShift,
-.mod_l = GHOST_kModifierKeyLeftShift,
-.mod_r = GHOST_kModifierKeyRightShift,
-},
-[MOD_INDEX_ALT] =
-{
-.display_name = "Alt",
-.xkb_id = XKB_MOD_NAME_ALT,
-.key_l = GHOST_kKeyLeftAlt,
-.key_r = GHOST_kKeyRightAlt,
-.mod_l = GHOST_kModifierKeyLeftAlt,
-.mod_r = GHOST_kModifierKeyRightAlt,
-},
-[MOD_INDEX_CTRL] =
-{
-.display_name = "Control",
-.xkb_id = XKB_MOD_NAME_CTRL,
-.key_l = GHOST_kKeyLeftControl,
-.key_r = GHOST_kKeyRightControl,
-.mod_l = GHOST_kModifierKeyLeftControl,
-.mod_r = GHOST_kModifierKeyRightControl,
-},
-[MOD_INDEX_OS] =
-{
-.display_name = "OS",
-.xkb_id = XKB_MOD_NAME_LOGO,
-.key_l = GHOST_kKeyLeftOS,
-.key_r = GHOST_kKeyRightOS,
-.mod_l = GHOST_kModifierKeyLeftOS,
-.mod_r = GHOST_kModifierKeyRightOS,
-},
+/* MOD_INDEX_SHIFT */
+{
+/* display_name */ "Shift",
+/* xkb_id */ XKB_MOD_NAME_SHIFT,
+/* key_l */ GHOST_kKeyLeftShift,
+/* key_r */ GHOST_kKeyRightShift,
+/* mod_l */ GHOST_kModifierKeyLeftShift,
+/* mod_r */ GHOST_kModifierKeyRightShift,
+},
+/* MOD_INDEX_ALT */
+{
+/* display_name */ "Alt",
+/* xkb_id */ XKB_MOD_NAME_ALT,
+/* key_l */ GHOST_kKeyLeftAlt,
+/* key_r */ GHOST_kKeyRightAlt,
+/* mod_l */ GHOST_kModifierKeyLeftAlt,
+/* mod_r */ GHOST_kModifierKeyRightAlt,
+},
+/* MOD_INDEX_CTRL */
+{
+/* display_name */ "Control",
+/* xkb_id */ XKB_MOD_NAME_CTRL,
+/* key_l */ GHOST_kKeyLeftControl,
+/* key_r */ GHOST_kKeyRightControl,
+/* mod_l */ GHOST_kModifierKeyLeftControl,
+/* mod_r */ GHOST_kModifierKeyRightControl,
+},
+/* MOD_INDEX_OS */
+{
+/* display_name */ "OS",
+/* xkb_id */ XKB_MOD_NAME_LOGO,
+/* key_l */ GHOST_kKeyLeftOS,
+/* key_r */ GHOST_kKeyRightOS,
+/* mod_l */ GHOST_kModifierKeyLeftOS,
+/* mod_r */ GHOST_kModifierKeyRightOS,
+},
 };
 
 /** \} */
@@ -2989,11 +2989,10 @@ static void keyboard_handle_key(void *data,
 /* Start timer for repeating key, if applicable. */
 if ((seat->key_repeat.rate > 0) && (etype == GHOST_kEventKeyDown) &&
 xkb_keymap_key_repeats(xkb_state_get_keymap(seat->xkb_state), 
key_code)) {
-  key_repeat_payload = new GWL_KeyRepeatPlayload({
-  .seat = seat,
-  .key_code = key_code,
-  .key_data = {.gkey = gkey},
-  });
+  key_repeat_payload = new GWL_KeyRepeatPlayload();
+  key_repeat_payload->seat = seat;
+  key_repeat_payload->key_code = key_code;
+  key_repeat_payload->key_data.gkey = gkey;
 }
   }
 
@@ -4683,11 +4682,10 @@ static GWL_SeatStateGrab 
seat_grab_state_from_mode(const GHOST_TGrabCursorMode m
const bool 
use_software_confine)
 {
   /* Initialize all members. */
-  const struct GWL_SeatStateGrab grab_state = {
-  /* Warping happens to require software cursor which also hides. */
-  .use_lock = ELEM(mode, GHOST_kGrabWrap, GHOST_kGrabHide) || 
use_software_confine,
-  .use_confine = (mode == GHOST_kGrabNormal) && (use_software_confine == 
false),
-  };
+  GWL_SeatStateGrab grab_state;
+  /* Warping happens to require software cursor which also hides. */
+  grab_state.use_lock = ELEM(mode, GHOST_kGrabWrap, GHOST_kGrabHide) || 
use_software_confine;
+  grab_state.use_confine = (mode == GHOST_kGrabNormal) && 
(use_software_confine == false);
   return grab_state;
 }
 
diff --git a/intern/ghost/intern/GHOST_SystemWayland.h 
b/intern/ghost/intern/GHOST_SystemWayland.h
index 4e77c5b9c0b..23ffabf739e 100644
--- 

[Bf-blender-cvs] [303dd263e25] master: Build: update OSL to version 1.12.6.2

2022-10-20 Thread Ray Molenkamp
Commit: 303dd263e2590f981ee1917554cd688dd951ee2c
Author: Ray Molenkamp
Date:   Thu Oct 20 13:33:08 2022 +0200
Branches: master
https://developer.blender.org/rB303dd263e2590f981ee1917554cd688dd951ee2c

Build: update OSL to version 1.12.6.2

Required changes to make OSL pick up the new oslnoise library.

Ref D16269, T101403

===

M   build_files/build_environment/cmake/versions.cmake
M   build_files/cmake/Modules/FindOSL.cmake
M   build_files/cmake/platform/platform_apple.cmake
M   build_files/cmake/platform/platform_win32.cmake

===

diff --git a/build_files/build_environment/cmake/versions.cmake 
b/build_files/build_environment/cmake/versions.cmake
index bfc6d27f74d..469988dab0c 100644
--- a/build_files/build_environment/cmake/versions.cmake
+++ b/build_files/build_environment/cmake/versions.cmake
@@ -189,9 +189,9 @@ set(TIFF_HASH_TYPE MD5)
 set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
 set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
 
-set(OSL_VERSION 1.11.17.0)
-set(OSL_URI 
https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
-set(OSL_HASH 63265472ce14548839ace2e21e401544)
+set(OSL_VERSION 1.12.6.2)
+set(OSL_URI 
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/refs/tags/v${OSL_VERSION}.tar.gz)
+set(OSL_HASH 6fef11548adfdd3e5b25c49d2dae96ee)
 set(OSL_HASH_TYPE MD5)
 set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
 
diff --git a/build_files/cmake/Modules/FindOSL.cmake 
b/build_files/cmake/Modules/FindOSL.cmake
index ab5de53d3c9..a8d8344ae66 100644
--- a/build_files/cmake/Modules/FindOSL.cmake
+++ b/build_files/cmake/Modules/FindOSL.cmake
@@ -20,6 +20,7 @@ IF(NOT OSL_ROOT_DIR AND NOT $ENV{OSL_ROOT_DIR} STREQUAL "")
 ENDIF()
 
 SET(_osl_FIND_COMPONENTS
+  oslnoise
   oslcomp
   oslexec
   oslquery
@@ -39,7 +40,6 @@ FIND_PATH(OSL_INCLUDE_DIR
 include
 )
 
-SET(_osl_LIBRARIES)
 FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
   STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
 
@@ -51,9 +51,20 @@ FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
 PATH_SUFFIXES
   lib64 lib
 )
-  LIST(APPEND _osl_LIBRARIES "${OSL_${UPPERCOMPONENT}_LIBRARY}")
 ENDFOREACH()
 
+# Note linking order matters, and oslnoise existence depends on version.
+SET(_osl_LIBRARIES ${OSL_OSLCOMP_LIBRARY})
+IF(APPLE)
+  list(APPEND _osl_LIBRARIES -force_load ${OSL_OSLEXEC_LIBRARY})
+ELSE()
+  list(APPEND _osl_LIBRARIES ${OSL_OSLEXEC_LIBRARY})
+ENDIF()
+list(APPEND _osl_LIBRARIES ${OSL_OSLQUERY_LIBRARY})
+IF(OSL_OSLNOISE_LIBRARY)
+  list(APPEND _osl_LIBRARIES ${OSL_OSLNOISE_LIBRARY})
+ENDIF()
+
 FIND_PROGRAM(OSL_COMPILER oslc
  HINTS ${_osl_SEARCH_DIRS}
  PATH_SUFFIXES bin)
diff --git a/build_files/cmake/platform/platform_apple.cmake 
b/build_files/cmake/platform/platform_apple.cmake
index 04f5a312030..dbcaf9d02d3 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -331,20 +331,9 @@ if(WITH_LLVM)
 endif()
 
 if(WITH_CYCLES AND WITH_CYCLES_OSL)
-  set(CYCLES_OSL ${LIBDIR}/osl)
-
-  find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
-  find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
-  find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
-  # WARNING! depends on correct order of OSL libs linking
-  list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} 
${OSL_LIB_QUERY})
-  find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
-  find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
-  find_path(OSL_SHADER_DIR NAMES stdosl.h PATHS 
${CYCLES_OSL}/share/OSL/shaders)
-
-  if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER AND OSL_SHADER_DIR)
-set(OSL_FOUND TRUE)
-  else()
+  find_package(OSL)
+
+  if(NOT OSL_FOUND)
 message(WARNING "OSL not found, disabling WITH_CYCLES_OSL")
 set(WITH_CYCLES_OSL OFF)
   endif()
diff --git a/build_files/cmake/platform/platform_win32.cmake 
b/build_files/cmake/platform/platform_win32.cmake
index cfb8bf34b81..4478a2f8051 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -773,9 +773,11 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
   find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
   find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
   find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
+  find_library(OSL_LIB_NOISE NAMES oslnoise PATHS ${CYCLES_OSL}/lib)
   find_library(OSL_LIB_EXEC_DEBUG NAMES oslexec_d PATHS ${CYCLES_OSL}/lib)
   find_library(OSL_LIB_COMP_DEBUG NAMES oslcomp_d PATHS ${CYCLES_OSL}/lib)
   find_library(OSL_LIB_QUERY_DEBUG NAMES oslquery_d PATHS ${CYCLES_OSL}/lib)
+  find_library(OSL_LIB_NOISE_DEBUG NAMES oslnoise_d PATHS ${CYCLES_OSL}/lib)
   list(APPEND OSL_LIBRARIES
 

[Bf-blender-cvs] [debacbfe5c8] master: Build: update OpenPGL hash for re-tagged version without symbols conflicts

2022-10-20 Thread Ray Molenkamp
Commit: debacbfe5c8fb38a01504463b70f590386a3f62c
Author: Ray Molenkamp
Date:   Thu Oct 20 13:37:18 2022 +0200
Branches: master
https://developer.blender.org/rBdebacbfe5c8fb38a01504463b70f590386a3f62c

Build: update OpenPGL hash for re-tagged version without symbols conflicts

Ref D16269, T101403

===

M   build_files/build_environment/cmake/versions.cmake

===

diff --git a/build_files/build_environment/cmake/versions.cmake 
b/build_files/build_environment/cmake/versions.cmake
index 469988dab0c..6f358fd6f86 100644
--- a/build_files/build_environment/cmake/versions.cmake
+++ b/build_files/build_environment/cmake/versions.cmake
@@ -564,7 +564,7 @@ set(BROTLI_CPE 
"cpe:2.3:a:google:brotli:${BROTLI_VERSION}:*:*:*:*:*:*:*")
 set(OPENPGL_VERSION v0.4.0-beta)
 set(OPENPGL_SHORT_VERSION 0.4.0)
 set(OPENPGL_URI 
https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/${OPENPGL_VERSION}.tar.gz)
-set(OPENPGL_HASH 
58d5b65c533ce6cac3f7e1d51cf169a5411adf356abcd85f04049bbcaecc2e77)
+set(OPENPGL_HASH 
1f090f88ab2bad028e8b3619aa926f4f97cf7b2c175b904704d2fec8593dd3cd)
 set(OPENPGL_HASH_TYPE SHA256)
 set(OPENPGL_FILE openpgl-${OPENPGL_VERSION}.tar.gz)

___
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] [a30128a3c1a] master: Fix missing free in 8a43bfd8fd8d08438c5cc58befdf3e661aa17297

2022-10-20 Thread Campbell Barton
Commit: a30128a3c1a2eb7767ec87b99a09f2893e1c5de7
Author: Campbell Barton
Date:   Thu Oct 20 22:25:19 2022 +1100
Branches: master
https://developer.blender.org/rBa30128a3c1a2eb7767ec87b99a09f2893e1c5de7

Fix missing free in 8a43bfd8fd8d08438c5cc58befdf3e661aa17297

===

M   intern/ghost/intern/GHOST_SystemWayland.cpp

===

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp 
b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 42bfc6aa1e7..264476f00bc 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -1695,6 +1695,7 @@ static void data_device_handle_drop(void *data, struct 
wl_data_device * /*wl_dat
 size_t data_buf_len = 0;
 const char *data_buf = read_pipe(data_offer, mime_receive, nullptr, 
_buf_len);
 std::string data = data_buf ? std::string(data_buf, data_buf_len) : "";
+free(const_cast(data_buf));
 
 CLOG_INFO(
 LOG, 2, "drop_read_uris mime_receive=%s, data=%s", 
mime_receive.c_str(), data.c_str());

___
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] [c81bc09876f] master: GPU: Avoid undocumented/fragile dependency on shader enumerator order

2022-10-20 Thread Julian Eisel
Commit: c81bc09876f84753f3c69e024196b70a88c6cebe
Author: Julian Eisel
Date:   Thu Oct 20 12:51:20 2022 +0200
Branches: master
https://developer.blender.org/rBc81bc09876f84753f3c69e024196b70a88c6cebe

GPU: Avoid undocumented/fragile dependency on shader enumerator order

Previously this was using `GPU_SHADER_TEXT` as default value indicating
an "unset" state. This wasn't documented in the definition (and so
D16284 added a new enumerator that broke this). Plus code was assuming
this enumerator would always have the value 0 without specifying this in
the definition either.

In this case it's easy to not rely on the enum value at all, and just
use `std::optional` to add a "unset" state.

Differential Revision: https://developer.blender.org/D16303

===

M   source/blender/gpu/intern/gpu_immediate.cc
M   source/blender/gpu/intern/gpu_immediate_private.hh

===

diff --git a/source/blender/gpu/intern/gpu_immediate.cc 
b/source/blender/gpu/intern/gpu_immediate.cc
index 3b4accf9cc5..81c0a65bb7c 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -45,7 +45,7 @@ void immBindShader(GPUShader *shader)
   BLI_assert(imm->shader == nullptr);
 
   imm->shader = shader;
-  imm->builtin_shader_bound = GPU_SHADER_TEXT; /* Default value. */
+  imm->builtin_shader_bound = std::nullopt;
 
   if (!imm->vertex_format.packed) {
 VertexFormat_pack(>vertex_format);
@@ -125,9 +125,12 @@ static void wide_line_workaround_start(GPUPrimType 
prim_type)
 /* No need to change the shader. */
 return;
   }
+  if (!imm->builtin_shader_bound) {
+return;
+  }
 
   eGPUBuiltinShader polyline_sh;
-  switch (imm->builtin_shader_bound) {
+  switch (*imm->builtin_shader_bound) {
 case GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR:
   polyline_sh = GPU_SHADER_3D_POLYLINE_CLIPPED_UNIFORM_COLOR;
   break;
@@ -180,8 +183,8 @@ static void wide_line_workaround_end()
 }
 immUnbindProgram();
 
-immBindBuiltinProgram(imm->prev_builtin_shader);
-imm->prev_builtin_shader = GPU_SHADER_TEXT;
+immBindBuiltinProgram(*imm->prev_builtin_shader);
+imm->prev_builtin_shader = std::nullopt;
   }
 }
 
diff --git a/source/blender/gpu/intern/gpu_immediate_private.hh 
b/source/blender/gpu/intern/gpu_immediate_private.hh
index 74ebbdc7ae3..c4e11e7082b 100644
--- a/source/blender/gpu/intern/gpu_immediate_private.hh
+++ b/source/blender/gpu/intern/gpu_immediate_private.hh
@@ -9,6 +9,8 @@
 
 #pragma once
 
+#include 
+
 #include "GPU_batch.h"
 #include "GPU_primitive.h"
 #include "GPU_shader.h"
@@ -42,9 +44,9 @@ class Immediate {
   /** Wide Line workaround. */
 
   /** Previously bound shader to restore after drawing. */
-  eGPUBuiltinShader prev_builtin_shader = GPU_SHADER_TEXT;
-  /** Builtin shader index. Used to test if the workaround can be done. */
-  eGPUBuiltinShader builtin_shader_bound = GPU_SHADER_TEXT;
+  std::optional prev_builtin_shader;
+  /** Builtin shader index. Used to test if the line width workaround can be 
done. */
+  std::optional builtin_shader_bound;
   /** Uniform color: Kept here to update the wide-line shader just before 
#immBegin. */
   float uniform_color[4];

___
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] [8a43bfd8fd8] master: GHOST/Wayland: refactor copy/paste buffer storage

2022-10-20 Thread Campbell Barton
Commit: 8a43bfd8fd8d08438c5cc58befdf3e661aa17297
Author: Campbell Barton
Date:   Thu Oct 20 20:44:03 2022 +1100
Branches: master
https://developer.blender.org/rB8a43bfd8fd8d08438c5cc58befdf3e661aa17297

GHOST/Wayland: refactor copy/paste buffer storage

- Improve reporting when reading a file descriptor into a buffer fails,
  also check for failure to allocate memory.
- Store buffers with size in a simple struct.
- Use shared utility functions for simple buffer operations.

===

M   intern/ghost/intern/GHOST_SystemWayland.cpp
M   intern/ghost/intern/GHOST_SystemWayland.h

===

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp 
b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 6db8b9d33f8..42bfc6aa1e7 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -237,6 +237,43 @@ static const GWL_ModifierInfo 
g_modifier_info_table[MOD_INDEX_NUM] = {
 /** \name Private Types & Defines
  * \{ */
 
+struct GWL_SimpleBuffer {
+  /** Constant data, but may be freed. */
+  const char *data = nullptr;
+  size_t data_size = 0;
+};
+
+static void gwl_simple_buffer_free_data(GWL_SimpleBuffer *buffer)
+{
+  free(const_cast(buffer->data));
+  buffer->data = nullptr;
+  buffer->data_size = 0;
+}
+
+static void gwl_simple_buffer_set(GWL_SimpleBuffer *buffer, const char *data, 
size_t data_size)
+{
+  free(const_cast(buffer->data));
+  buffer->data = data;
+  buffer->data_size = data_size;
+}
+
+static void gwl_simple_buffer_set_from_string(GWL_SimpleBuffer *buffer, const 
char *str)
+{
+  free(const_cast(buffer->data));
+  buffer->data_size = strlen(str);
+  char *data = static_cast(malloc(buffer->data_size));
+  std::memcpy(data, str, buffer->data_size);
+  buffer->data = data;
+}
+
+static char *gwl_simple_buffer_as_string(const GWL_SimpleBuffer *buffer)
+{
+  char *buffer_str = static_cast(malloc(buffer->data_size + 1));
+  memcpy(buffer_str, buffer->data, buffer->data_size);
+  buffer_str[buffer->data_size] = '\0';
+  return buffer_str;
+}
+
 /**
  * From XKB internals, use for converting a scan-code from WAYLAND to a 
#xkb_keycode_t.
  * Ideally this wouldn't need a local define.
@@ -293,8 +330,7 @@ struct GWL_DataOffer {
 
 struct GWL_DataSource {
   struct wl_data_source *wl_data_source = nullptr;
-  char *buffer_out = nullptr;
-  size_t buffer_out_len = 0;
+  GWL_SimpleBuffer buffer_out;
 };
 
 /**
@@ -436,8 +472,7 @@ struct GWL_PrimarySelection_DataOffer {
 
 struct GWL_PrimarySelection_DataSource {
   struct zwp_primary_selection_source_v1 *wl_source = nullptr;
-  char *buffer_out = nullptr;
-  size_t buffer_out_len = 0;
+  GWL_SimpleBuffer buffer_out;
 };
 
 /** Primary selection support. */
@@ -466,7 +501,7 @@ static void 
gwl_primary_selection_discard_source(GWL_PrimarySelection *primary)
   if (data_source == nullptr) {
 return;
   }
-  free(data_source->buffer_out);
+  gwl_simple_buffer_free_data(_source->buffer_out);
   if (data_source->wl_source) {
 zwp_primary_selection_source_v1_destroy(data_source->wl_source);
   }
@@ -593,6 +628,9 @@ struct GWL_Display {
   struct zwp_pointer_constraints_v1 *pointer_constraints = nullptr;
 
   struct zwp_primary_selection_device_manager_v1 
*primary_selection_device_manager = nullptr;
+
+  GWL_SimpleBuffer clipboard;
+  GWL_SimpleBuffer clipboard_primary;
 };
 
 #undef LOG
@@ -671,7 +709,7 @@ static void display_destroy(GWL_Display *display)
 {
   std::lock_guard lock{seat->data_source_mutex};
   if (seat->data_source) {
-free(seat->data_source->buffer_out);
+gwl_simple_buffer_free_data(>data_source->buffer_out);
 if (seat->data_source->wl_data_source) {
   wl_data_source_destroy(seat->data_source->wl_data_source);
 }
@@ -795,6 +833,9 @@ static void display_destroy(GWL_Display *display)
 wl_display_disconnect(display->wl_display);
   }
 
+  gwl_simple_buffer_free_data(>clipboard);
+  gwl_simple_buffer_free_data(>clipboard_primary);
+
   delete display;
 }
 
@@ -1294,9 +1335,74 @@ static void dnd_events(const GWL_Seat *const seat, const 
GHOST_TEventType event)
   }
 }
 
-static std::string read_pipe(GWL_DataOffer *data_offer,
+/**
+ * Read from `fd` into a buffer which is returned.
+ * \return the buffer or null on failure.
+ */
+static const char *read_file_as_buffer(const int fd, size_t *r_len)
+{
+  struct ByteChunk {
+ByteChunk *next;
+char data[4096 - sizeof(ByteChunk *)];
+  };
+  ByteChunk *chunk_first = nullptr, **chunk_link_p = _first;
+  bool ok = true;
+  size_t len = 0;
+  while (true) {
+ByteChunk *chunk = static_cast(malloc(sizeof(*chunk)));
+if (UNLIKELY(chunk == nullptr)) {
+  CLOG_WARN(LOG, "unable to allocate chunk for file buffer");
+  ok = false;
+  break;
+}
+chunk->next = nullptr;
+const ssize_t len_chunk = read(fd, chunk->data, sizeof(chunk->data));
+ 

[Bf-blender-cvs] [bd9d68e4dc6] master: Fix (studio-reported) issue with overrides on library relocating.

2022-10-20 Thread Bastien Montagne
Commit: bd9d68e4dc6fcc840afa514cba7975a6bd86386d
Author: Bastien Montagne
Date:   Thu Oct 20 11:22:51 2022 +0200
Branches: master
https://developer.blender.org/rBbd9d68e4dc6fcc840afa514cba7975a6bd86386d

Fix (studio-reported) issue with overrides on library relocating.

Liboverrides that were using a missing linked reference ID would not get
their 'MISSING' tag properly cleared afer relocating, in case their
linked reference is no more missing.

Reported by Andy (@eyecandy) from Blender studio.

===

M   source/blender/blenkernel/intern/blendfile_link_append.c

===

diff --git a/source/blender/blenkernel/intern/blendfile_link_append.c 
b/source/blender/blenkernel/intern/blendfile_link_append.c
index 394469e19a4..a937c74578a 100644
--- a/source/blender/blenkernel/intern/blendfile_link_append.c
+++ b/source/blender/blenkernel/intern/blendfile_link_append.c
@@ -1614,6 +1614,9 @@ void 
BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context,
 (id->tag & LIB_TAG_PRE_EXISTING) == 0) {
   continue;
 }
+if ((id->override_library->reference->tag & LIB_TAG_MISSING) == 0) {
+  id->tag &= ~LIB_TAG_MISSING;
+}
 if ((id->override_library->reference->tag & LIB_TAG_PRE_EXISTING) == 0) {
   BKE_lib_override_library_update(bmain, id);
 }

___
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] [40afb8ae6a0] master: Lib reload/relocate: Improve performances.

2022-10-20 Thread Bastien Montagne
Commit: 40afb8ae6a036d904a10680530a89955248d0e06
Author: Bastien Montagne
Date:   Thu Oct 20 11:29:47 2022 +0200
Branches: master
https://developer.blender.org/rB40afb8ae6a036d904a10680530a89955248d0e06

Lib reload/relocate: Improve performances.

Reduce amounts of viewlayer updates during remapping while relocating
libraries. Gives some improvements on relocating process, depending on
complexity of existing scene and reloaded libraries, whether there is
liboverrides to resync, etc., can give up to 10% speedup.

===

M   source/blender/blenkernel/intern/blendfile_link_append.c

===

diff --git a/source/blender/blenkernel/intern/blendfile_link_append.c 
b/source/blender/blenkernel/intern/blendfile_link_append.c
index a937c74578a..4dd225c09ec 100644
--- a/source/blender/blenkernel/intern/blendfile_link_append.c
+++ b/source/blender/blenkernel/intern/blendfile_link_append.c
@@ -1494,6 +1494,7 @@ void 
BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context,
* code is wrong, we need to redo it here after adding them back to main. */
   BKE_main_id_refcount_recompute(bmain, false);
 
+  BKE_layer_collection_resync_forbid();
   /* Note that in reload case, we also want to replace indirect usages. */
   const short remap_flags = ID_REMAP_SKIP_NEVER_NULL_USAGE |
 (do_reload ? 0 : ID_REMAP_SKIP_INDIRECT_USAGE);
@@ -1523,6 +1524,8 @@ void 
BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context,
   id_us_plus_no_lib(_key->id);
 }
   }
+  BKE_layer_collection_resync_allow();
+  BKE_main_collection_sync_remap(bmain);
 
   BKE_main_unlock(bmain);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [ff157d7ebad] master: Fix incorrect shader state after shader interface creation

2022-10-20 Thread Sergey Sharybin
Commit: ff157d7ebadc39cd027cbc75e67267d78cf1c80a
Author: Sergey Sharybin
Date:   Thu Oct 20 10:09:32 2022 +0200
Branches: master
https://developer.blender.org/rBff157d7ebadc39cd027cbc75e67267d78cf1c80a

Fix incorrect shader state after shader interface creation

Use store-current-and-restore-previous OpenGL program in the OpenGL
Shader Interface. This is a better fix for the initial error, which
additionally solves interface artifacts when opening non-default
startyp files on macOS with AMD GPU.

===

M   source/blender/gpu/opengl/gl_shader.cc
M   source/blender/gpu/opengl/gl_shader_interface.cc

===

diff --git a/source/blender/gpu/opengl/gl_shader.cc 
b/source/blender/gpu/opengl/gl_shader.cc
index f6f14932de7..dafcf4dbf33 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -1004,11 +1004,6 @@ bool GLShader::finalize(const shader::ShaderCreateInfo 
*info)
   else {
 interface = new GLShaderInterface(shader_program_);
   }
-  /**
-   * WORKAROUND: Creating the shader interface changes the active program.
-   * Make sure to update the context, otherwise we might have a missing bind.
-   */
-  Context::get()->shader = this;
 
   return true;
 }
diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc 
b/source/blender/gpu/opengl/gl_shader_interface.cc
index c9432fca561..ef97d74bf81 100644
--- a/source/blender/gpu/opengl/gl_shader_interface.cc
+++ b/source/blender/gpu/opengl/gl_shader_interface.cc
@@ -200,6 +200,9 @@ static Type gpu_type_from_gl_type(int gl_type)
 
 GLShaderInterface::GLShaderInterface(GLuint program)
 {
+  GLuint last_program;
+  glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)_program);
+
   /* Necessary to make #glUniform works. */
   glUseProgram(program);
 
@@ -385,6 +388,8 @@ GLShaderInterface::GLShaderInterface(GLuint program)
   // this->debug_print();
 
   this->sort_inputs();
+
+  glUseProgram(last_program);
 }
 
 GLShaderInterface::GLShaderInterface(GLuint program, const 
shader::ShaderCreateInfo )
@@ -442,6 +447,9 @@ GLShaderInterface::GLShaderInterface(GLuint program, const 
shader::ShaderCreateI
   uint32_t name_buffer_offset = 0;
 
   /* Necessary to make #glUniform works. TODO(fclem) Remove. */
+  GLuint last_program;
+  glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)_program);
+
   glUseProgram(program);
 
   /* Attributes */
@@ -552,6 +560,8 @@ GLShaderInterface::GLShaderInterface(GLuint program, const 
shader::ShaderCreateI
   this->sort_inputs();
 
   // this->debug_print();
+
+  glUseProgram(last_program);
 }
 
 GLShaderInterface::~GLShaderInterface()

___
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] [90686ff6f47] master: Fix WebM naming in the interface

2022-10-20 Thread Sergey Sharybin
Commit: 90686ff6f47ef14e96d94b7ad32f63a7015ca1c8
Author: Sergey Sharybin
Date:   Thu Oct 20 09:52:37 2022 +0200
Branches: master
https://developer.blender.org/rB90686ff6f47ef14e96d94b7ad32f63a7015ca1c8

Fix WebM naming in the interface

Use the official spelling of the WebM codec. Only affects the interface
string and not the identifier used in the Python API. Should not even
affect translations: the current msgstr's do no translate the original
string.

Reported by Anton Raves, thanks!

===

M   source/blender/makesrna/intern/rna_scene.c

===

diff --git a/source/blender/makesrna/intern/rna_scene.c 
b/source/blender/makesrna/intern/rna_scene.c
index 8fc504f192e..0eb168ecd8e 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5945,7 +5945,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA 
*brna)
   {AV_CODEC_ID_PNG, "PNG", 0, "PNG", ""},
   {AV_CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""},
   {AV_CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
-  {AV_CODEC_ID_VP9, "WEBM", 0, "WEBM / VP9", ""},
+  {AV_CODEC_ID_VP9, "WEBM", 0, "WebM / VP9", ""},
   {0, NULL, 0, NULL, 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