[Bf-blender-cvs] [8edd1d8aa59] master: CMake: optionally disable OBJ, STL & GPencil SVG support

2022-06-07 Thread Campbell Barton
Commit: 8edd1d8aa597514d5089f8cf2aa640ec14c1e389
Author: Campbell Barton
Date:   Tue Jun 7 14:21:19 2022 +1000
Branches: master
https://developer.blender.org/rB8edd1d8aa597514d5089f8cf2aa640ec14c1e389

CMake: optionally disable OBJ, STL & GPencil SVG support

The following CMake options have been added (enabled by default),
except for the lite build configuration.

- WITH_IO_STL
- WITH_IO_WAVEFRONT_OBJ
- WITH_IO_GPENCIL (for grease pencil SVG importing).
  Note that it was already possible to disable grease pencil export
  by disabling WITH_PUGIXML & WITH_HARU.

This is intended to keep the lite builds fast and small for building,
linking & execution.

Reviewed By: iyadahmed2001, aras_p, antoniov, mont29

Ref D15141

===

M   CMakeLists.txt
M   build_files/cmake/config/blender_lite.cmake
M   release/scripts/startup/bl_ui/space_topbar.py
M   source/blender/editors/io/CMakeLists.txt
M   source/blender/editors/io/io_gpencil_export.c
M   source/blender/editors/io/io_gpencil_import.c
M   source/blender/editors/io/io_gpencil_utils.c
M   source/blender/editors/io/io_obj.c
M   source/blender/editors/io/io_ops.c
M   source/blender/editors/io/io_stl_ops.c
M   source/blender/io/CMakeLists.txt
M   source/blender/python/intern/CMakeLists.txt
M   source/blender/python/intern/bpy_app_build_options.c

===

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90baadcac8b..31608b0c1ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -300,6 +300,9 @@ option(WITH_USD "Enable Universal Scene 
Description (USD) Suppor
 # 3D format support
 # Disable opencollada when we don't have precompiled libs
 option(WITH_OPENCOLLADA   "Enable OpenCollada Support 
(http://www.opencollada.org)" ON)
+option(WITH_IO_WAVEFRONT_OBJ  "Enable Wavefront-OBJ 3D file format support 
(*.obj)" ON)
+option(WITH_IO_STL"Enable STL 3D file format support (*.stl)" ON)
+option(WITH_IO_GPENCIL"Enable grease-pencil file format IO (*.svg, 
*.pdf)" ON)
 
 # Sound output
 option(WITH_SDL   "Enable SDL for sound" ON)
diff --git a/build_files/cmake/config/blender_lite.cmake 
b/build_files/cmake/config/blender_lite.cmake
index 2f6057ee9c0..5ce344d39e8 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -37,6 +37,9 @@ set(WITH_IMAGE_TIFF  OFF CACHE BOOL "" FORCE)
 set(WITH_IMAGE_WEBP  OFF CACHE BOOL "" FORCE)
 set(WITH_INPUT_NDOF  OFF CACHE BOOL "" FORCE)
 set(WITH_INTERNATIONAL   OFF CACHE BOOL "" FORCE)
+set(WITH_IO_STL  OFF CACHE BOOL "" FORCE)
+set(WITH_IO_WAVEFRONT_OBJOFF CACHE BOOL "" FORCE)
+set(WITH_IO_GPENCIL  OFF CACHE BOOL "" FORCE)
 set(WITH_JACKOFF CACHE BOOL "" FORCE)
 set(WITH_LIBMV   OFF CACHE BOOL "" FORCE)
 set(WITH_LLVMOFF CACHE BOOL "" FORCE)
diff --git a/release/scripts/startup/bl_ui/space_topbar.py 
b/release/scripts/startup/bl_ui/space_topbar.py
index 2980ec9ace7..d8bd724f554 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -453,9 +453,13 @@ class TOPBAR_MT_file_import(Menu):
 self.layout.operator(
 "wm.usd_import", text="Universal Scene Description (.usd, 
.usdc, .usda)")
 
-self.layout.operator("wm.gpencil_import_svg", text="SVG as Grease 
Pencil")
-self.layout.operator("wm.obj_import", text="Wavefront (.obj) 
(experimental)")
-self.layout.operator("wm.stl_import", text="STL (.stl) (experimental)")
+if bpy.app.build_options.io_gpencil:
+self.layout.operator("wm.gpencil_import_svg", text="SVG as Grease 
Pencil")
+
+if bpy.app.build_options.io_wavefront_obj:
+self.layout.operator("wm.obj_import", text="Wavefront (.obj) 
(experimental)")
+if bpy.app.build_options.io_stl:
+self.layout.operator("wm.stl_import", text="STL (.stl) 
(experimental)")
 
 
 class TOPBAR_MT_file_export(Menu):
@@ -472,14 +476,16 @@ class TOPBAR_MT_file_export(Menu):
 self.layout.operator(
 "wm.usd_export", text="Universal Scene Description (.usd, 
.usdc, .usda)")
 
-# Pugixml lib dependency
-if bpy.app.build_options.pugixml:
-self.layout.operator("wm.gpencil_export_svg", text="Grease Pencil 
as SVG")
-# Haru lib dependency
-if bpy.app.build_options.haru:
-self.layout.operator("wm.gpencil_export_pdf", text="Grease Pencil 
as PDF")
+if bpy.app.build_options.io_gpencil:
+# Pugixml lib dependency
+if bpy.app.build_options.pugixml:
+self.layout.operator("wm.gpencil_export_svg", text="Grease 
Pencil as SVG")
+# Haru lib dependency
+if bpy.app.build_options.haru:
+

[Bf-blender-cvs] [a1d2efd1900] master: GHOST/Wayland: draw a software-cursor when wrapping cursor motion

2022-06-07 Thread Campbell Barton
Commit: a1d2efd190038c7615bd3bb459dc86c8b3a8ecdc
Author: Campbell Barton
Date:   Wed Jun 8 13:01:31 2022 +1000
Branches: master
https://developer.blender.org/rBa1d2efd190038c7615bd3bb459dc86c8b3a8ecdc

GHOST/Wayland: draw a software-cursor when wrapping cursor motion

As Wayland doesn't support moving the cursor, draw a cross-hair cursor
at the location used by Blender.

Without this, the cursor was locked at the location where grab started,
making some actions unusable since the cursor location was invisible.

Resolves T77311.

===

M   intern/ghost/GHOST_C-api.h
M   intern/ghost/GHOST_ISystem.h
M   intern/ghost/GHOST_IWindow.h
M   intern/ghost/GHOST_Types.h
M   intern/ghost/intern/GHOST_C-api.cpp
M   intern/ghost/intern/GHOST_System.cpp
M   intern/ghost/intern/GHOST_System.h
M   intern/ghost/intern/GHOST_SystemWayland.cpp
M   intern/ghost/intern/GHOST_SystemWayland.h
M   intern/ghost/intern/GHOST_Window.cpp
M   intern/ghost/intern/GHOST_Window.h
M   source/blender/windowmanager/intern/wm_draw.c

===

diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index ae749eb3b8c..57714083656 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -402,6 +402,10 @@ extern GHOST_TSuccess 
GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
   int32_t x,
   int32_t y);
 
+GHOST_TSuccess GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle,
+GHOST_TAxisFlag *r_wrap_axis,
+int r_bounds[4]);
+
 /**
  * Grabs the cursor for a modal operation, to keep receiving
  * events when the mouse is outside the window. X11 only, others
@@ -896,6 +900,11 @@ extern int setConsoleWindowState(GHOST_TConsoleWindowState 
action);
  */
 extern int GHOST_UseNativePixels(void);
 
+/**
+ * Warp the cursor, if supported.
+ */
+extern int GHOST_SupportsCursorWarp(void);
+
 /**
  * Focus window after opening, or put them in the background.
  */
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h
index bb91abbadec..8a4412403f7 100644
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@ -304,6 +304,11 @@ class GHOST_ISystem {
*/
   virtual bool useNativePixel(void) = 0;
 
+  /**
+   * Return true when warping the cursor is supported.
+   */
+  virtual bool supportsCursorWarp() = 0;
+
   /**
* Focus window after opening, or put them in the background.
*/
diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h
index 183e97a4b55..681ad9c5b07 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -254,6 +254,10 @@ class GHOST_IWindow {
*/
   virtual GHOST_TSuccess setCursorShape(GHOST_TStandardCursor cursorShape) = 0;
 
+  virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect ) = 0;
+
+  virtual GHOST_TSuccess getCursorGrabState(GHOST_TAxisFlag _flag, 
GHOST_Rect ) = 0;
+
   /**
* Test if the standard cursor shape is supported by current platform.
* \return Indication of success.
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index e2ed9830e4e..841c0c33ee1 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -403,6 +403,8 @@ typedef enum {
   GHOST_kGrabHide,
 } GHOST_TGrabCursorMode;
 
+#define GHOST_GRAB_NEEDS_SOFTWARE_CURSOR_FOR_WARP(grab) ((grab) == 
GHOST_kGrabWrap)
+
 typedef enum {
   /** Axis that cursor grab will wrap. */
   GHOST_kGrabAxisNone = 0,
diff --git a/intern/ghost/intern/GHOST_C-api.cpp 
b/intern/ghost/intern/GHOST_C-api.cpp
index 9374d087408..f4c978a88d4 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -376,6 +376,23 @@ GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle 
windowhandle,
   mode, wrap_axis, bounds ? _rect : nullptr, mouse_ungrab_xy ? 
mouse_xy : nullptr);
 }
 
+GHOST_TSuccess GHOST_GetCursorGrabState(GHOST_WindowHandle windowhandle,
+GHOST_TAxisFlag *r_axis_flag,
+int r_bounds[4])
+{
+  GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
+  GHOST_Rect bounds_rect;
+  if (!window->getCursorGrabState(*r_axis_flag, bounds_rect)) {
+return GHOST_kFailure;
+  }
+
+  r_bounds[0] = bounds_rect.m_l;
+  r_bounds[1] = bounds_rect.m_t;
+  r_bounds[2] = bounds_rect.m_r;
+  r_bounds[3] = bounds_rect.m_b;
+  return GHOST_kSuccess;
+}
+
 GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
  GHOST_TModifierKeyMask mask,
  int *isDown)
@@ -815,6 +832,12 @@ int GHOST_UseNativePixels(void)
   return system->useNativePixel();
 }
 
+int GHOST_SupportsCursorWarp(void)

[Bf-blender-cvs] [b3e0101a35b] master: GHOST/Wayland: non-wrapping grab no longer locks the cursor

2022-06-07 Thread Campbell Barton
Commit: b3e0101a35b2885212aa199335564dca98dc50cd
Author: Campbell Barton
Date:   Wed Jun 8 11:28:31 2022 +1000
Branches: master
https://developer.blender.org/rBb3e0101a35b2885212aa199335564dca98dc50cd

GHOST/Wayland: non-wrapping grab no longer locks the cursor

Grab which didn't wrap would lock the cursor, making actions such
as resizing areas lock the cursor in-place.

Confine the cursor to the window instead.

This behavior was also used for X11 when grabbing the cursor was first
supported but could lock the system if Blender froze while grabbing so
it was disabled [0].

For Wayland this shouldn't be a problem as compositors implement grab
in a way that prevents the client from locking the system.

[0]: 3e3d2b7a4cfc38f673bdeb48707b95c7bd50049a

===

M   intern/ghost/intern/GHOST_SystemWayland.cpp

===

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp 
b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 7e74287d6e3..f6eabb60b05 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -112,6 +112,7 @@ struct input_t {
 
   struct zwp_relative_pointer_v1 *relative_pointer;
   struct zwp_locked_pointer_v1 *locked_pointer;
+  struct zwp_confined_pointer_v1 *confined_pointer;
 
   struct xkb_context *xkb_context;
   struct xkb_state *xkb_state;
@@ -1376,6 +1377,7 @@ static void global_add(void *data,
 input->data_source->buffer_out = nullptr;
 input->relative_pointer = nullptr;
 input->locked_pointer = nullptr;
+input->confined_pointer = nullptr;
 input->seat = static_cast(
 wl_registry_bind(wl_registry, name, _seat_interface, 4));
 display->inputs.push_back(input);
@@ -1939,15 +1941,31 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorGrab(const 
GHOST_TGrabCursorMode mo
 
   input_t *input = d->inputs[0];
 
-  if (mode_current == GHOST_kGrabHide) {
+#define MODE_NEEDS_LOCK(m) ((m) == GHOST_kGrabWrap || (m) == GHOST_kGrabHide)
+#define MODE_NEEDS_HIDE(m) ((m) == GHOST_kGrabHide)
+#define MODE_NEEDS_CONFINE(m) ((m) == GHOST_kGrabNormal)
+
+  const bool was_lock = MODE_NEEDS_LOCK(mode_current);
+  const bool use_lock = MODE_NEEDS_LOCK(mode);
+
+  const bool was_hide = MODE_NEEDS_HIDE(mode_current);
+  const bool use_hide = MODE_NEEDS_HIDE(mode);
+
+  const bool was_confine = MODE_NEEDS_CONFINE(mode_current);
+  const bool use_confine = MODE_NEEDS_CONFINE(mode);
+
+#undef MODE_NEEDS_LOCK
+#undef MODE_NEEDS_HIDE
+#undef MODE_NEEDS_CONFINE
+
+  if (!use_hide) {
 setCursorVisibility(true);
   }
 
-  if ((mode == GHOST_kGrabDisable) ||
-  /* Switching from one grab mode to another,
-   * in this case disable the current locks as it makes logic confusing,
-   * postpone changing the cursor to avoid flickering. */
-  (mode_current != GHOST_kGrabDisable)) {
+  /* Switching from one grab mode to another,
+   * in this case disable the current locks as it makes logic confusing,
+   * postpone changing the cursor to avoid flickering. */
+  if (!use_lock) {
 if (input->relative_pointer) {
   zwp_relative_pointer_v1_destroy(input->relative_pointer);
   input->relative_pointer = nullptr;
@@ -1958,23 +1976,44 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorGrab(const 
GHOST_TGrabCursorMode mo
 }
   }
 
+  if (!use_confine) {
+if (input->confined_pointer) {
+  zwp_confined_pointer_v1_destroy(input->confined_pointer);
+  input->confined_pointer = nullptr;
+}
+  }
+
   if (mode != GHOST_kGrabDisable) {
-/* TODO(@campbellbarton): As WAYLAND does not support warping the pointer 
it may not be
- * possible to support #GHOST_kGrabWrap by pragmatically settings it's 
coordinates.
- * An alternative could be to draw the cursor in software (and hide the 
real cursor),
- * or just accept a locked cursor on WAYLAND. */
-input->relative_pointer = 
zwp_relative_pointer_manager_v1_get_relative_pointer(
-d->relative_pointer_manager, input->pointer);
-zwp_relative_pointer_v1_add_listener(
-input->relative_pointer, _pointer_listener, input);
-input->locked_pointer = zwp_pointer_constraints_v1_lock_pointer(
-d->pointer_constraints,
-surface,
-input->pointer,
-nullptr,
-ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT);
-
-if (mode == GHOST_kGrabHide) {
+if (use_lock) {
+  if (!was_lock) {
+/* TODO(@campbellbarton): As WAYLAND does not support warping the 
pointer it may not be
+ * possible to support #GHOST_kGrabWrap by pragmatically settings it's 
coordinates.
+ * An alternative could be to draw the cursor in software (and hide 
the real cursor),
+ * or just accept a locked cursor on WAYLAND. */
+input->relative_pointer = 
zwp_relative_pointer_manager_v1_get_relative_pointer(
+d->relative_pointer_manager, input->pointer);
+  

[Bf-blender-cvs] [2161a892519] blender-v3.2-release: Bump version cycle to release for Blender 3.2.

2022-06-07 Thread Thomas Dinges
Commit: 2161a892519e7f48b08f81a9b281342a48215578
Author: Thomas Dinges
Date:   Tue Jun 7 20:03:28 2022 +0200
Branches: blender-v3.2-release
https://developer.blender.org/rB2161a892519e7f48b08f81a9b281342a48215578

Bump version cycle to release for Blender 3.2.

===

M   source/blender/blenkernel/BKE_blender_version.h

===

diff --git a/source/blender/blenkernel/BKE_blender_version.h 
b/source/blender/blenkernel/BKE_blender_version.h
index 5effd23cd32..7f7ab8c732f 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -21,7 +21,7 @@ extern "C" {
 /* Blender patch version for bugfix releases. */
 #define BLENDER_VERSION_PATCH 0
 /** Blender release cycle stage: alpha/beta/rc/release. */
-#define BLENDER_VERSION_CYCLE rc
+#define BLENDER_VERSION_CYCLE release
 
 /* Blender file format version. */
 #define BLENDER_FILE_VERSION BLENDER_VERSION

___
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] [a857156578c] master: UI: Curves Sculpt density + smooth brushes

2022-06-07 Thread Dalai Felinto
Commit: a857156578c99cbfc8abd658abfeac74d09affa3
Author: Dalai Felinto
Date:   Tue Jun 7 19:06:15 2022 +0200
Branches: master
https://developer.blender.org/rBa857156578c99cbfc8abd658abfeac74d09affa3

UI: Curves Sculpt density + smooth brushes

More information in the svn log. But basically the smooth brush
is re-using the previous one we had for hair, and the density is
representing the hair root points that are removed to reach the
desired density.

Those brushes are used by D15134.

===

A   release/datafiles/icons/ops.curves.density.dat
A   release/datafiles/icons/ops.curves.sculpt_smooth.dat
M   source/blender/editors/datafiles/CMakeLists.txt

===

diff --git a/release/datafiles/icons/ops.curves.density.dat 
b/release/datafiles/icons/ops.curves.density.dat
new file mode 100644
index 000..f336de79082
Binary files /dev/null and b/release/datafiles/icons/ops.curves.density.dat 
differ
diff --git a/release/datafiles/icons/ops.curves.sculpt_smooth.dat 
b/release/datafiles/icons/ops.curves.sculpt_smooth.dat
new file mode 100644
index 000..ba4bd081f33
Binary files /dev/null and 
b/release/datafiles/icons/ops.curves.sculpt_smooth.dat differ
diff --git a/source/blender/editors/datafiles/CMakeLists.txt 
b/source/blender/editors/datafiles/CMakeLists.txt
index 59370b53995..3b975e580ba 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -772,6 +772,7 @@ set_property(GLOBAL PROPERTY ICON_GEOM_NAMES
   ops.curve.pen
   ops.curve.radius
   ops.curve.vertex_random
+  ops.curves.density
   ops.curves.sculpt_add
   ops.curves.sculpt_comb
   ops.curves.sculpt_cut
@@ -779,6 +780,7 @@ set_property(GLOBAL PROPERTY ICON_GEOM_NAMES
   ops.curves.sculpt_grow_shrink
   ops.curves.sculpt_pinch
   ops.curves.sculpt_puff
+  ops.curves.sculpt_smooth
   ops.curves.sculpt_snake_hook
   ops.generic.cursor
   ops.generic.select

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


[Bf-blender-cvs] SVN commit: bf-blender [62947] trunk/lib/resources/icon_geom.blend: Sculpt Curves: Density

2022-06-07 Thread Dalai Felinto
Revision: 62947
  https://developer.blender.org/rBL62947
Author:   dfelinto
Date: 2022-06-07 19:04:56 +0200 (Tue, 07 Jun 2022)
Log Message:
---
Sculpt Curves: Density

This icon represents the root points of the hair curves that
are removed due to the density/distance.

It follows the isometric perspective we have in the edit mesh tools.

(Thank you Pablo Vazquez for pointing/suggesting that out, my original
take had the points going on the other direction).

Modified Paths:
--
trunk/lib/resources/icon_geom.blend

Modified: trunk/lib/resources/icon_geom.blend
===
(Binary files differ)

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


[Bf-blender-cvs] [3e7d977886f] master: IME Cleanup: Removal of BLT_lang_is_ime_supported

2022-06-07 Thread Harley Acheson
Commit: 3e7d977886f467a8d14d0edc49f65000336caa64
Author: Harley Acheson
Date:   Tue Jun 7 10:02:04 2022 -0700
Branches: master
https://developer.blender.org/rB3e7d977886f467a8d14d0edc49f65000336caa64

IME Cleanup: Removal of BLT_lang_is_ime_supported

Removal of BLT_lang_is_ime_supported which is always returns true and
is no longer needed.

See D11800 for more details.

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

Reviewed by Campbell Barton

===

M   source/blender/blentranslation/BLT_translation.h
M   source/blender/blentranslation/intern/blt_lang.c
M   source/blender/editors/interface/interface_handlers.c

===

diff --git a/source/blender/blentranslation/BLT_translation.h 
b/source/blender/blentranslation/BLT_translation.h
index ebb0f604df7..129eba3de2f 100644
--- a/source/blender/blentranslation/BLT_translation.h
+++ b/source/blender/blentranslation/BLT_translation.h
@@ -28,13 +28,6 @@ const char *BLT_translate_do_iface(const char *msgctxt, 
const char *msgid);
 const char *BLT_translate_do_tooltip(const char *msgctxt, const char *msgid);
 const char *BLT_translate_do_new_dataname(const char *msgctxt, const char 
*msgid);
 
-/**
- * Note that "lang" here is the _output_ display language. We used to restrict
- * IME for keyboard _input_ language because our multilingual font was only 
used
- * when some output languages were selected. That font is used all the time 
now.
- */
-bool BLT_lang_is_ime_supported(void);
-
 /* The "translation-marker" macro. */
 #define N_(msgid) msgid
 #define CTX_N_(context, msgid) msgid
diff --git a/source/blender/blentranslation/intern/blt_lang.c 
b/source/blender/blentranslation/intern/blt_lang.c
index b015057ad2d..cb04b3ac0dc 100644
--- a/source/blender/blentranslation/intern/blt_lang.c
+++ b/source/blender/blentranslation/intern/blt_lang.c
@@ -345,12 +345,3 @@ void BLT_lang_locale_explode(const char *locale,
 MEM_freeN(_t);
   }
 }
-
-bool BLT_lang_is_ime_supported(void)
-{
-#ifdef WITH_INPUT_IME
-  return true;
-#else
-  return false;
-#endif
-}
diff --git a/source/blender/editors/interface/interface_handlers.c 
b/source/blender/editors/interface/interface_handlers.c
index 10840c61b02..b06361c7e28 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3507,7 +3507,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, 
uiHandleButtonData *data)
   WM_cursor_modal_set(win, WM_CURSOR_TEXT_EDIT);
 
 #ifdef WITH_INPUT_IME
-  if (is_num_but == false && BLT_lang_is_ime_supported()) {
+  if (!is_num_but) {
 ui_textedit_ime_begin(win, but);
   }
 #endif
@@ -3911,7 +3911,7 @@ static void ui_do_but_textedit(
 
 if ((event->ascii || event->utf8_buf[0]) && (retval == 
WM_UI_HANDLER_CONTINUE)
 #ifdef WITH_INPUT_IME
-&& !is_ime_composing && (!WM_event_is_ime_switch(event) || 
!BLT_lang_is_ime_supported())
+&& !is_ime_composing && !WM_event_is_ime_switch(event)
 #endif
 ) {
   char ascii = event->ascii;

___
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] [9fda2338975] master: Cleanup: Use const pointers in attribute API

2022-06-07 Thread Hans Goudey
Commit: 9fda23389758c80d97439a0f5ee718d0f898ff79
Author: Hans Goudey
Date:   Tue Jun 7 18:55:56 2022 +0200
Branches: master
https://developer.blender.org/rB9fda23389758c80d97439a0f5ee718d0f898ff79

Cleanup: Use const pointers in attribute API

===

M   source/blender/blenkernel/BKE_attribute.h
M   source/blender/blenkernel/BKE_curves.h
M   source/blender/blenkernel/BKE_pointcloud.h
M   source/blender/blenkernel/intern/attribute.cc
M   source/blender/blenkernel/intern/curves.cc
M   source/blender/blenkernel/intern/material.c
M   source/blender/blenkernel/intern/pointcloud.cc
M   source/blender/draw/intern/draw_cache_impl_mesh.cc
M   source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
M   source/blender/editors/geometry/geometry_attributes.cc
M   source/blender/editors/mesh/editmesh_tools.c
M   source/blender/editors/sculpt_paint/paint_vertex.cc
M   source/blender/editors/sculpt_paint/sculpt.c
M   source/blender/editors/sculpt_paint/sculpt_undo.c
M   source/blender/makesrna/intern/rna_attribute.c

===

diff --git a/source/blender/blenkernel/BKE_attribute.h 
b/source/blender/blenkernel/BKE_attribute.h
index 78edb6b95ed..65d93089002 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -50,7 +50,7 @@ typedef enum eAttrDomainMask {
 
 /* Attributes. */
 
-bool BKE_id_attributes_supported(struct ID *id);
+bool BKE_id_attributes_supported(const struct ID *id);
 bool BKE_attribute_allow_procedural_access(const char *attribute_name);
 
 /**
@@ -74,7 +74,7 @@ struct CustomDataLayer *BKE_id_attribute_search(const struct 
ID *id,
 
 eAttrDomain BKE_id_attribute_domain(const struct ID *id, const struct 
CustomDataLayer *layer);
 int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer);
-bool BKE_id_attribute_required(struct ID *id, struct CustomDataLayer *layer);
+bool BKE_id_attribute_required(const struct ID *id, struct CustomDataLayer 
*layer);
 bool BKE_id_attribute_rename(struct ID *id,
  struct CustomDataLayer *layer,
  const char *new_name,
diff --git a/source/blender/blenkernel/BKE_curves.h 
b/source/blender/blenkernel/BKE_curves.h
index 88bb1c67fd1..f86df8b7434 100644
--- a/source/blender/blenkernel/BKE_curves.h
+++ b/source/blender/blenkernel/BKE_curves.h
@@ -25,7 +25,7 @@ void *BKE_curves_add(struct Main *bmain, const char *name);
 
 struct BoundBox *BKE_curves_boundbox_get(struct Object *ob);
 
-bool BKE_curves_customdata_required(struct Curves *curves, struct 
CustomDataLayer *layer);
+bool BKE_curves_customdata_required(const struct Curves *curves, struct 
CustomDataLayer *layer);
 
 /* Depsgraph */
 
diff --git a/source/blender/blenkernel/BKE_pointcloud.h 
b/source/blender/blenkernel/BKE_pointcloud.h
index c238a24f173..50537d982ef 100644
--- a/source/blender/blenkernel/BKE_pointcloud.h
+++ b/source/blender/blenkernel/BKE_pointcloud.h
@@ -30,7 +30,7 @@ struct BoundBox *BKE_pointcloud_boundbox_get(struct Object 
*ob);
 bool BKE_pointcloud_minmax(const struct PointCloud *pointcloud, float 
r_min[3], float r_max[3]);
 
 void BKE_pointcloud_update_customdata_pointers(struct PointCloud *pointcloud);
-bool BKE_pointcloud_customdata_required(struct PointCloud *pointcloud,
+bool BKE_pointcloud_customdata_required(const struct PointCloud *pointcloud,
 struct CustomDataLayer *layer);
 
 /* Dependency Graph */
diff --git a/source/blender/blenkernel/intern/attribute.cc 
b/source/blender/blenkernel/intern/attribute.cc
index 1818befba4c..509161386cd 100644
--- a/source/blender/blenkernel/intern/attribute.cc
+++ b/source/blender/blenkernel/intern/attribute.cc
@@ -105,7 +105,7 @@ static CustomData *attribute_customdata_find(ID *id, 
CustomDataLayer *layer)
   return nullptr;
 }
 
-bool BKE_id_attributes_supported(ID *id)
+bool BKE_id_attributes_supported(const ID *id)
 {
   DomainInfo info[ATTR_DOMAIN_NUM];
   get_domains(id, info);
@@ -382,14 +382,14 @@ int BKE_id_attribute_data_length(ID *id, CustomDataLayer 
*layer)
   return 0;
 }
 
-bool BKE_id_attribute_required(ID *id, CustomDataLayer *layer)
+bool BKE_id_attribute_required(const ID *id, CustomDataLayer *layer)
 {
   switch (GS(id->name)) {
 case ID_PT: {
-  return BKE_pointcloud_customdata_required((PointCloud *)id, layer);
+  return BKE_pointcloud_customdata_required((const PointCloud *)id, layer);
 }
 case ID_CV: {
-  return BKE_curves_customdata_required((Curves *)id, layer);
+  return BKE_curves_customdata_required((const Curves *)id, layer);
 }
 default:
   return false;
diff --git a/source/blender/blenkernel/intern/curves.cc 
b/source/blender/blenkernel/intern/curves.cc
index 9abd5a7fdf0..a348e546e46 100644
--- 

[Bf-blender-cvs] [d39e0f96166] master: Fix: Incorrect logic in attribute search function

2022-06-07 Thread Hans Goudey
Commit: d39e0f9616680042d67979424e400bdf8a4b89f4
Author: Hans Goudey
Date:   Tue Jun 7 18:38:30 2022 +0200
Branches: master
https://developer.blender.org/rBd39e0f9616680042d67979424e400bdf8a4b89f4

Fix: Incorrect logic in attribute search function

If a geometry does not have CustomData for a certain domain,
it may still have CustomData on other domains. In that case
we need to continue to the other domains instead of returning.
This worked for meshes because the domains are all at the
start of the `info` array. It didn't work for curves.

===

M   source/blender/blenkernel/intern/attribute.cc

===

diff --git a/source/blender/blenkernel/intern/attribute.cc 
b/source/blender/blenkernel/intern/attribute.cc
index 4dd25ba1292..1818befba4c 100644
--- a/source/blender/blenkernel/intern/attribute.cc
+++ b/source/blender/blenkernel/intern/attribute.cc
@@ -302,7 +302,7 @@ CustomDataLayer *BKE_id_attribute_search(const ID *id,
 
 CustomData *customdata = info[domain].customdata;
 if (customdata == NULL) {
-  return NULL;
+  continue;
 }
 
 for (int i = 0; i < customdata->totlayer; i++) {

___
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] [15ee45fa029] cycles_oneapi: deps/cmake: cleanup igc build

2022-06-07 Thread Ray Molenkamp
Commit: 15ee45fa029de175b5e366b0b1e9243a89dae543
Author: Ray Molenkamp
Date:   Tue Jun 7 10:24:15 2022 -0600
Branches: cycles_oneapi
https://developer.blender.org/rB15ee45fa029de175b5e366b0b1e9243a89dae543

deps/cmake: cleanup igc build

The way patches were applied was somewhat
fragile, by applying the patches in the
dependencies directly, one can now rebuild
just IGC without having to remove all deps
from disk to get back to a clean slate state.

===

M   build_files/build_environment/cmake/igc.cmake
M   build_files/build_environment/cmake/versions.cmake

===

diff --git a/build_files/build_environment/cmake/igc.cmake 
b/build_files/build_environment/cmake/igc.cmake
index e8ca0d63eb0..faae8d00611 100644
--- a/build_files/build_environment/cmake/igc.cmake
+++ b/build_files/build_environment/cmake/igc.cmake
@@ -1,11 +1,68 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-unpack_only(igc_llvm)
-unpack_only(igc_opencl_clang)
 unpack_only(igc_vcintrinsics)
 unpack_only(igc_spirv_headers)
 unpack_only(igc_spirv_tools)
-unpack_only(igc_spirv_translator)
+
+#
+# igc_opencl_clang contains patches that need to be applied
+# to external_igc_llvm and igc_spirv_translator, we unpack
+# igc_opencl_clang first, then have the patch stages of 
+# external_igc_llvm and igc_spirv_translator apply them.
+#
+
+ExternalProject_Add(external_igc_opencl_clang
+  URL file://${PACKAGE_DIR}/${IGC_OPENCL_CLANG_FILE}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH ${IGC_OPENCL_CLANG_HASH_TYPE}=${IGC_OPENCL_CLANG_HASH}
+  PREFIX ${BUILD_DIR}/igc_opencl_clang
+  CONFIGURE_COMMAND echo .
+  BUILD_COMMAND echo .
+  INSTALL_COMMAND echo .
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -d 
${BUILD_DIR}/igc_opencl_clang/src/external_igc_opencl_clang/ < 
${PATCH_DIR}/igc_opencl_clang.diff
+)
+
+set(IGC_OPENCL_CLANG_PATCH_DIR 
${BUILD_DIR}/igc_opencl_clang/src/external_igc_opencl_clang/patches)
+set(IGC_LLVM_SOURCE_DIR ${BUILD_DIR}/igc_llvm/src/external_igc_llvm)
+set(IGC_SPIRV_TRANSLATOR_SOURCE_DIR 
${BUILD_DIR}/igc_spirv_translator/src/external_igc_spirv_translator)
+
+ExternalProject_Add(external_igc_llvm
+  URL file://${PACKAGE_DIR}/${IGC_LLVM_FILE}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH ${IGC_LLVM_HASH_TYPE}=${IGC_LLVM_HASH}
+  PREFIX ${BUILD_DIR}/igc_llvm
+  CONFIGURE_COMMAND echo .
+  BUILD_COMMAND echo .
+  INSTALL_COMMAND echo .
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0001-OpenCL-3.0-support.patch &&
+${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0002-Remove-__IMAGE_SUPPORT__-macro-for-SPIR.patch
 &&
+${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0003-Avoid-calling-ParseCommandLineOptions-in-BackendUtil.patch
 &&
+${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0004-OpenCL-support-cl_ext_float_atomics.patch
 &&
+${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0005-OpenCL-Add-cl_khr_integer_dot_product.patch
 &&
+${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/llvm/0001-Memory-leak-fix-for-Managed-Static-Mutex.patch
 &&
+${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/llvm/0002-Remove-repo-name-in-LLVM-IR.patch
+)
+add_dependencies(
+  external_igc_llvm
+  external_igc_opencl_clang
+)
+
+ExternalProject_Add(external_igc_spirv_translator
+  URL file://${PACKAGE_DIR}/${IGC_SPIRV_TRANSLATOR_FILE}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH ${IGC_SPIRV_TRANSLATOR_HASH_TYPE}=${IGC_SPIRV_TRANSLATOR_HASH}
+  PREFIX ${BUILD_DIR}/igc_spirv_translator
+  CONFIGURE_COMMAND echo .
+  BUILD_COMMAND echo .
+  INSTALL_COMMAND echo .
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${IGC_SPIRV_TRANSLATOR_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/spirv/0001-update-SPIR-V-headers-for-SPV_INTEL_split_barrier.patch
 &&
+${PATCH_CMD} -p 1 -d ${IGC_SPIRV_TRANSLATOR_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/spirv/0002-Add-support-for-split-barriers-extension-SPV_INTEL_s.patch
 &&
+${PATCH_CMD} -p 1 -d ${IGC_SPIRV_TRANSLATOR_SOURCE_DIR} < 
${IGC_OPENCL_CLANG_PATCH_DIR}/spirv/0003-Support-cl_bf16_conversions.patch
+)
+add_dependencies(
+  external_igc_spirv_translator
+  external_igc_opencl_clang
+)
 
 if(WIN32)
   set(IGC_GENERATOR "Ninja")
@@ -33,18 +90,7 @@ ExternalProject_Add(external_igc
   URL_HASH ${IGC_HASH_TYPE}=${IGC_HASH}
   CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/igc ${DEFAULT_CMAKE_FLAGS} 
${IGC_EXTRA_ARGS}
 
-  #
-  # The patch logic is fragile... the patches live inside external_igc but
-  # are applied to projects outside its base folder, leading into the situation
-  # you have to remove all external igc_ folders if you rebuild igc or it'll 
try
-  # to reapply all patches... and fail...
-  #
-  # Ideally we apply all patches 

[Bf-blender-cvs] [7974d2bff6f] master: CustomData: Add function to free a named layer

2022-06-07 Thread Hans Goudey
Commit: 7974d2bff6f363b75c8317cf1dad3e943fd85df6
Author: Hans Goudey
Date:   Tue Jun 7 18:00:18 2022 +0200
Branches: master
https://developer.blender.org/rB7974d2bff6f363b75c8317cf1dad3e943fd85df6

CustomData: Add function to free a named layer

This can be useful to avoid unnecessary boilerplate in various users
of the CustomData API. Split from D14685 and D14769.

===

M   source/blender/blenkernel/BKE_customdata.h
M   source/blender/blenkernel/intern/customdata.cc

===

diff --git a/source/blender/blenkernel/BKE_customdata.h 
b/source/blender/blenkernel/BKE_customdata.h
index 993ab476830..a1101c1df44 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -225,6 +225,7 @@ void *CustomData_add_layer_anonymous(struct CustomData 
*data,
  * In edit-mode, use #EDBM_data_layer_free instead of this function.
  */
 bool CustomData_free_layer(struct CustomData *data, int type, int totelem, int 
index);
+bool CustomData_free_layer_named(struct CustomData *data, const char *name, 
const int totelem);
 
 /**
  * Frees the layer index with the give type.
diff --git a/source/blender/blenkernel/intern/customdata.cc 
b/source/blender/blenkernel/intern/customdata.cc
index aed570235aa..bb5b2ee0836 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -20,6 +20,7 @@
 #include "BLI_bitmap.h"
 #include "BLI_color.hh"
 #include "BLI_endian_switch.h"
+#include "BLI_index_range.hh"
 #include "BLI_math.h"
 #include "BLI_math_color_blend.h"
 #include "BLI_math_vector.hh"
@@ -27,6 +28,7 @@
 #include "BLI_path_util.h"
 #include "BLI_span.hh"
 #include "BLI_string.h"
+#include "BLI_string_ref.hh"
 #include "BLI_string_utils.h"
 #include "BLI_utildefines.h"
 
@@ -57,6 +59,7 @@
 
 using blender::IndexRange;
 using blender::Span;
+using blender::StringRef;
 using blender::Vector;
 
 /* number of layers to add when growing a CustomData object */
@@ -2899,6 +2902,18 @@ bool CustomData_free_layer(CustomData *data, int type, 
int totelem, int index)
   return true;
 }
 
+bool CustomData_free_layer_named(CustomData *data, const char *name, const int 
totelem)
+{
+  for (const int i : IndexRange(data->totlayer)) {
+const CustomDataLayer  = data->layers[i];
+if (StringRef(layer.name) == name) {
+  CustomData_free_layer(data, layer.type, totelem, i);
+  return true;
+}
+  }
+  return false;
+}
+
 bool CustomData_free_layer_active(CustomData *data, int type, int totelem)
 {
   const int index = CustomData_get_active_layer_index(data, type);

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


[Bf-blender-cvs] SVN commit: bf-blender [62946] trunk/lib/resources/icon_geom.blend: Sculpt Curves: Smooth Icon

2022-06-07 Thread Dalai Felinto
Revision: 62946
  https://developer.blender.org/rBL62946
Author:   dfelinto
Date: 2022-06-07 17:14:52 +0200 (Tue, 07 Jun 2022)
Log Message:
---
Sculpt Curves: Smooth Icon

Re-use the existing icon we have for the old hair system.

Modified Paths:
--
trunk/lib/resources/icon_geom.blend

Modified: trunk/lib/resources/icon_geom.blend
===
(Binary files differ)

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


[Bf-blender-cvs] [9c029a3eb0f] master: Fix T98621: Image does not update when tweaking strip properties

2022-06-07 Thread Richard Antalik
Commit: 9c029a3eb0fa15d7e45e6153af24d7d0fcade201
Author: Richard Antalik
Date:   Tue Jun 7 17:02:40 2022 +0200
Branches: master
https://developer.blender.org/rB9c029a3eb0fa15d7e45e6153af24d7d0fcade201

Fix T98621: Image does not update when tweaking strip properties

Problem was caused by `startdisp` and `enddisp` still being used after changes
implemented in rB7afcfe111aac.

===

M   source/blender/sequencer/intern/image_cache.c

===

diff --git a/source/blender/sequencer/intern/image_cache.c 
b/source/blender/sequencer/intern/image_cache.c
index 59de24930d6..e097de237f2 100644
--- a/source/blender/sequencer/intern/image_cache.c
+++ b/source/blender/sequencer/intern/image_cache.c
@@ -640,12 +640,12 @@ void seq_cache_cleanup_sequence(Scene *scene,
   int range_end = SEQ_time_right_handle_frame_get(seq_changed);
 
   if (!force_seq_changed_range) {
-if (seq->startdisp > range_start) {
-  range_start = seq->startdisp;
+if (SEQ_time_left_handle_frame_get(seq) > range_start) {
+  range_start = SEQ_time_left_handle_frame_get(seq);
 }
 
-if (seq->enddisp < range_end) {
-  range_end = seq->enddisp;
+if (SEQ_time_right_handle_frame_get(seq) < range_end) {
+  range_end = SEQ_time_right_handle_frame_get(seq);
 }
   }

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


[Bf-blender-cvs] SVN commit: bf-blender [62945] trunk/lib/resources/icon_geom.blend: Apply mirror modifier for pinch icon

2022-06-07 Thread Dalai Felinto
Revision: 62945
  https://developer.blender.org/rBL62945
Author:   dfelinto
Date: 2022-06-07 16:09:46 +0200 (Tue, 07 Jun 2022)
Log Message:
---
Apply mirror modifier for pinch icon

There is a strange bug where I get difference results
with different builds of Blender whether the icon is
applied or not applied.

To avoid spend more time on this I am applying the modifier now.
If the problem shows up again into the future I can investigate
this properly.

Modified Paths:
--
trunk/lib/resources/icon_geom.blend

Modified: trunk/lib/resources/icon_geom.blend
===
(Binary files differ)

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


[Bf-blender-cvs] [e62a33e5725] master: Nodes: Show node description in Node add menu

2022-06-07 Thread Monique Dewanchand
Commit: e62a33e57256cb772e6dfce9ba7a3a58c3c08b0a
Author: Monique Dewanchand
Date:   Tue Jun 7 15:40:20 2022 +0200
Branches: master
https://developer.blender.org/rBe62a33e57256cb772e6dfce9ba7a3a58c3c08b0a

Nodes: Show node description in Node add menu

Though no nodes have descriptions currently, this patch makes it
possible to add descriptions that display in the add menu, for
custom node systems and existing builtin nodes.

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

===

M   release/scripts/startup/bl_operators/node.py

===

diff --git a/release/scripts/startup/bl_operators/node.py 
b/release/scripts/startup/bl_operators/node.py
index c64898fdfb9..a99a81e0c63 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -129,6 +129,15 @@ class NodeAddOperator:
 
 return result
 
+@classmethod
+def description(cls, context, properties):
+nodetype = properties["type"]
+bl_rna = bpy.types.Node.bl_rna_get_subclass(nodetype)
+if bl_rna is not None:
+return bl_rna.description
+else:
+return ""
+
 
 # Simple basic operator for adding a node
 class NODE_OT_add_node(NodeAddOperator, Operator):

___
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] [ccf0d22e92c] master: Fix T98626: Mesh Deform modifier stops working on a linked collection upon undo.

2022-06-07 Thread Bastien Montagne
Commit: ccf0d22e92ccd3148326477a3e807261c3e9537c
Author: Bastien Montagne
Date:   Tue Jun 7 15:29:01 2022 +0200
Branches: master
https://developer.blender.org/rBccf0d22e92ccd3148326477a3e807261c3e9537c

Fix T98626: Mesh Deform modifier stops working on a linked collection upon undo.

Regression from rBb66368f3fd9c, we still need to store all data on undo
writes, since overrides are not re-applied after undo/redo.

===

M   source/blender/modifiers/intern/MOD_correctivesmooth.c
M   source/blender/modifiers/intern/MOD_laplaciandeform.c
M   source/blender/modifiers/intern/MOD_meshdeform.c
M   source/blender/modifiers/intern/MOD_surfacedeform.c

===

diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c 
b/source/blender/modifiers/intern/MOD_correctivesmooth.c
index 8b6c306dae8..3698f4403a1 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.c
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c
@@ -801,8 +801,9 @@ static void panelRegister(ARegionType *region_type)
 static void blendWrite(BlendWriter *writer, const ID *id_owner, const 
ModifierData *md)
 {
   CorrectiveSmoothModifierData csmd = *(const CorrectiveSmoothModifierData 
*)md;
+  const bool is_undo = BLO_write_is_undo(writer);
 
-  if (ID_IS_OVERRIDE_LIBRARY(id_owner)) {
+  if (ID_IS_OVERRIDE_LIBRARY(id_owner) && !is_undo) {
 BLI_assert(!ID_IS_LINKED(id_owner));
 const bool is_local = (md->flag & eModifierFlag_OverrideLibrary_Local) != 
0;
 if (!is_local) {
diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.c 
b/source/blender/modifiers/intern/MOD_laplaciandeform.c
index 06ded1c4488..a22f4b35e0d 100644
--- a/source/blender/modifiers/intern/MOD_laplaciandeform.c
+++ b/source/blender/modifiers/intern/MOD_laplaciandeform.c
@@ -846,8 +846,9 @@ static void panelRegister(ARegionType *region_type)
 static void blendWrite(BlendWriter *writer, const ID *id_owner, const 
ModifierData *md)
 {
   LaplacianDeformModifierData lmd = *(const LaplacianDeformModifierData *)md;
+  const bool is_undo = BLO_write_is_undo(writer);
 
-  if (ID_IS_OVERRIDE_LIBRARY(id_owner)) {
+  if (ID_IS_OVERRIDE_LIBRARY(id_owner) && !is_undo) {
 BLI_assert(!ID_IS_LINKED(id_owner));
 const bool is_local = (md->flag & eModifierFlag_OverrideLibrary_Local) != 
0;
 if (!is_local) {
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c 
b/source/blender/modifiers/intern/MOD_meshdeform.c
index 0cff85d30ec..5dac31ac1df 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -584,8 +584,9 @@ static void panelRegister(ARegionType *region_type)
 static void blendWrite(BlendWriter *writer, const ID *id_owner, const 
ModifierData *md)
 {
   MeshDeformModifierData mmd = *(const MeshDeformModifierData *)md;
+  const bool is_undo = BLO_write_is_undo(writer);
 
-  if (ID_IS_OVERRIDE_LIBRARY(id_owner)) {
+  if (ID_IS_OVERRIDE_LIBRARY(id_owner) && !is_undo) {
 BLI_assert(!ID_IS_LINKED(id_owner));
 const bool is_local = (md->flag & eModifierFlag_OverrideLibrary_Local) != 
0;
 if (!is_local) {
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c 
b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 9b0012e3890..20cc9b2392f 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -1672,8 +1672,9 @@ static void panelRegister(ARegionType *region_type)
 static void blendWrite(BlendWriter *writer, const ID *id_owner, const 
ModifierData *md)
 {
   SurfaceDeformModifierData smd = *(const SurfaceDeformModifierData *)md;
+  const bool is_undo = BLO_write_is_undo(writer);
 
-  if (ID_IS_OVERRIDE_LIBRARY(id_owner)) {
+  if (ID_IS_OVERRIDE_LIBRARY(id_owner) && !is_undo) {
 BLI_assert(!ID_IS_LINKED(id_owner));
 const bool is_local = (md->flag & eModifierFlag_OverrideLibrary_Local) != 
0;
 if (!is_local) {

___
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] [b69aad60bda] master: Curves: use root/tip radius of the first curve in the viewport

2022-06-07 Thread Jacques Lucke
Commit: b69aad60bda23a53482b2c2ae98715c23a715bc8
Author: Jacques Lucke
Date:   Tue Jun 7 15:03:38 2022 +0200
Branches: master
https://developer.blender.org/rBb69aad60bda23a53482b2c2ae98715c23a715bc8

Curves: use root/tip radius of the first curve in the viewport

Viewport drawing does not support a per point radius attribute yet.
Instead, it has a fixed set of radius parameters that are used for all
curves in the same object. Now those radii are retrieved from the
radius attribute of the points on the first curve. This allows users
to control the radius of curves to some degree until proper per-point
radius is supported.

===

M   source/blender/draw/intern/draw_curves.cc

===

diff --git a/source/blender/draw/intern/draw_curves.cc 
b/source/blender/draw/intern/draw_curves.cc
index 39d4845994f..749383edc6d 100644
--- a/source/blender/draw/intern/draw_curves.cc
+++ b/source/blender/draw/intern/draw_curves.cc
@@ -13,6 +13,9 @@
 #include "DNA_curves_types.h"
 #include "DNA_customdata_types.h"
 
+#include "BKE_curves.hh"
+#include "BKE_geometry_set.hh"
+
 #include "GPU_batch.h"
 #include "GPU_capabilities.h"
 #include "GPU_compute.h"
@@ -325,6 +328,21 @@ DRWShadingGroup *DRW_shgroup_curves_create_sub(Object 
*object,
   float hair_rad_tip = 0.0f;
   bool hair_close_tip = true;
 
+  /* Use the radius of the root and tip of the first curve for now. This is a 
workaround that we
+   * use for now because we can't use a per-point radius yet. */
+  Curves _id = *static_cast(object->data);
+  const blender::bke::CurvesGeometry  = 
blender::bke::CurvesGeometry::wrap(
+  curves_id.geometry);
+  if (curves.curves_num() >= 1) {
+CurveComponent curves_component;
+curves_component.replace(_id, GeometryOwnershipType::ReadOnly);
+blender::VArray radii = curves_component.attribute_get_for_read(
+"radius", ATTR_DOMAIN_POINT, 0.005f);
+const blender::IndexRange first_curve_points = curves.points_for_curve(0);
+hair_rad_root = radii[first_curve_points.first()];
+hair_rad_tip = radii[first_curve_points.last()];
+  }
+
   DRW_shgroup_uniform_texture(shgrp, "hairPointBuffer", 
curves_cache->final[subdiv].proc_tex);
   if (curves_cache->length_tex) {
 DRW_shgroup_uniform_texture(shgrp, "hairLen", curves_cache->length_tex);

___
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] [1203bd58bef] master: Fix: Make renaming attributes check uniqueness on all domains

2022-06-07 Thread Martijn Versteegh
Commit: 1203bd58beffbfd517818521750cdc3f1d273cd2
Author: Martijn Versteegh
Date:   Tue Jun 7 14:51:52 2022 +0200
Branches: master
https://developer.blender.org/rB1203bd58beffbfd517818521750cdc3f1d273cd2

Fix: Make renaming attributes check uniqueness on all domains

This function only checked for uniqueness in the current domain,
while attribute names should be unique among all domains within
a geometry.

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

===

M   source/blender/blenkernel/intern/attribute.cc

===

diff --git a/source/blender/blenkernel/intern/attribute.cc 
b/source/blender/blenkernel/intern/attribute.cc
index fedcfc5c721..4dd25ba1292 100644
--- a/source/blender/blenkernel/intern/attribute.cc
+++ b/source/blender/blenkernel/intern/attribute.cc
@@ -138,8 +138,10 @@ bool BKE_id_attribute_rename(ID *id,
 return false;
   }
 
-  BLI_strncpy_utf8(layer->name, new_name, sizeof(layer->name));
-  CustomData_set_layer_unique_name(customdata, layer - customdata->layers);
+  char result_name[MAX_CUSTOMDATA_LAYER_NAME];
+  BKE_id_attribute_calc_unique_name(id, new_name, result_name);
+  BLI_strncpy_utf8(layer->name, result_name, sizeof(layer->name));
+
   return true;
 }

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


[Bf-blender-cvs] [8ef03b070d6] temp-T97352-3d-texturing-seam-bleeding-b2: Use edges for borders.

2022-06-07 Thread Jeroen Bakker
Commit: 8ef03b070d6f757d0ed799fb8526db8edb02f9be
Author: Jeroen Bakker
Date:   Tue Jun 7 14:39:08 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB8ef03b070d6f757d0ed799fb8526db8edb02f9be

Use edges for borders.

===

M   source/blender/blenkernel/BKE_uv_islands.hh
M   source/blender/blenkernel/intern/uv_islands.cc

===

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh 
b/source/blender/blenkernel/BKE_uv_islands.hh
index 33aecaceca9..77c430dea7c 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -4,6 +4,7 @@
 #pragma once
 
 #include 
+#include 
 
 #include "BLI_array.hh"
 #include "BLI_edgehash.h"
@@ -71,6 +72,16 @@ struct MeshPrimitive {
 BLI_assert_unreachable();
 return vertices[0];
   }
+
+  MeshUVVert *get_other_uv_vertex(const MeshVertex *v1, const MeshVertex *v2)
+  {
+for (MeshUVVert _vertex : vertices) {
+  if (uv_vertex.vertex != v1 && uv_vertex.vertex != v2) {
+return _vertex;
+  }
+}
+return nullptr;
+  }
 };
 
 /** Wrapper to contain all required mesh data. */
@@ -284,43 +295,51 @@ struct UVPrimitive {
 }
 return false;
   }
+
+  UVBorder extract_border() const;
 };
 
-struct UVBorderVert {
-  UVVertex *uv_vertex;
+struct UVBorderEdge {
+  UVEdge *edge;
+  bool tag = false;
+  UVPrimitive *uv_primitive;
+  /* Should the vertices of the edge be evaluated in reverse order. */
+  bool reverse_order = false;
 
-  /* Indexes of connected border verts. */
-  int64_t index;
-  int64_t prev_index;
-  int64_t next_index;
-  int64_t border_index;
+  int64_t index = -1;
+  int64_t prev_index = -1;
+  int64_t next_index = -1;
+  int64_t border_index = -1;
 
   struct {
-/** Should this vertex still be checked when performing extension. */
+/* Is possible to extend on the `get_uv_vertex(0)` */
 bool extendable : 1;
   } flags;
 
-  explicit UVBorderVert(UVVertex *uv_vertex) : uv_vertex(uv_vertex)
+  explicit UVBorderEdge(UVEdge *edge, UVPrimitive *uv_primitive)
+  : edge(edge), uv_primitive(uv_primitive)
   {
 flags.extendable = true;
   }
-};
-
-struct UVBorderEdge {
-  UVEdge *edge;
-  bool tag = false;
-  UVPrimitive *uv_primitive;
 
-  explicit UVBorderEdge(UVEdge *edge, UVPrimitive *uv_primitive)
-  : edge(edge), uv_primitive(uv_primitive)
+  UVVertex *get_uv_vertex(int index)
+  {
+int actual_index = reverse_order ? 1 - index : index;
+return edge->vertices[actual_index];
+  }
+  const UVVertex *get_uv_vertex(int index) const
   {
+int actual_index = reverse_order ? 1 - index : index;
+return edge->vertices[actual_index];
   }
 };
 
+using UVBorderCorner = std::pair;
+
 struct UVBorder {
   /** Ordered list of UV Verts of the border of this island. */
   // TODO: support multiple rings + order (CW, CCW)
-  Vector verts;
+  Vector edges;
 
   /**
* Flip the order of the verts, changing the order between CW and CCW.
@@ -330,9 +349,11 @@ struct UVBorder {
   /**
* Calculate the outside angle of the given vert.
*/
-  float outside_angle(const UVBorderVert ) const;
+  float outside_angle(const UVBorderEdge ) const;
 
   void update_indexes(uint64_t border_index);
+
+  static std::optional extract_from_edges(Vector 
);
 };
 
 struct UVIsland {
@@ -340,8 +361,8 @@ struct UVIsland {
   Vector uv_edges;
   Vector uv_primitives;
   /**
-   * List of borders of this island. There can be multiple borders per island 
as a border could be
-   * completely encapsulated by another one.
+   * List of borders of this island. There can be multiple borders per island 
as a border could
+   * be completely encapsulated by another one.
*/
   Vector borders;
 
@@ -400,7 +421,7 @@ struct UVIsland {
   }
 
   /** Initialize the border attribute. */
-  void extract_border();
+  void extract_borders();
   /** Iterative extend border to fit the mask. */
   void extend_border(const UVIslandsMask ,
  const short island_index,
@@ -504,8 +525,24 @@ struct UVIslands {
   void extract_borders()
   {
 for (UVIsland  : islands) {
-  island.extract_border();
+  island.extract_borders();
 }
+
+#ifdef DEBUG_SVG
+std::ofstream of;
+of.open("/tmp/borders.svg");
+svg_header(of);
+for (UVIsland  : islands) {
+  int index = 0;
+  for (UVBorder  : island.borders) {
+border.update_indexes(index);
+index++;
+svg(of, border);
+  }
+}
+svg_footer(of);
+of.close();
+#endif
   }
 
   void extend_borders(const UVIslandsMask _mask, const MeshData 
_data)
diff --git a/source/blender/blenkernel/intern/uv_islands.cc 
b/source/blender/blenkernel/intern/uv_islands.cc
index 58e758a56d7..e69f19b7ee8 100644
--- a/source/blender/blenkernel/intern/uv_islands.cc
+++ b/source/blender/blenkernel/intern/uv_islands.cc
@@ 

[Bf-blender-cvs] [6a6e7cb5063] temp-T97352-3d-texturing-seam-bleeding-b2: Fix writing to temp variable.

2022-06-07 Thread Jeroen Bakker
Commit: 6a6e7cb5063d61de523728add997b4dcc5dbf2d2
Author: Jeroen Bakker
Date:   Tue Jun 7 14:45:20 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB6a6e7cb5063d61de523728add997b4dcc5dbf2d2

Fix writing to temp variable.

===

M   source/blender/blenkernel/BKE_uv_islands.hh
M   source/blender/blenkernel/intern/uv_islands.cc

===

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh 
b/source/blender/blenkernel/BKE_uv_islands.hh
index 77c430dea7c..a463d126a4b 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -334,7 +334,7 @@ struct UVBorderEdge {
   }
 };
 
-using UVBorderCorner = std::pair;
+using UVBorderCorner = std::pair;
 
 struct UVBorder {
   /** Ordered list of UV Verts of the border of this island. */
diff --git a/source/blender/blenkernel/intern/uv_islands.cc 
b/source/blender/blenkernel/intern/uv_islands.cc
index e69f19b7ee8..8c1c5298d11 100644
--- a/source/blender/blenkernel/intern/uv_islands.cc
+++ b/source/blender/blenkernel/intern/uv_islands.cc
@@ -44,7 +44,7 @@ static std::optional 
sharpest_border_corner(UVBorder , fl
 float new_radius = border.outside_angle(edge);
 if (new_radius < *r_angle) {
   *r_angle = new_radius;
-  result = UVBorderCorner(border.edges[edge.prev_index], edge);
+  result = UVBorderCorner([edge.prev_index], );
 }
   }
   return result;
@@ -183,8 +183,8 @@ static void print(const Fan )
 
 static void extend_at_vert(UVIsland , UVBorderCorner , const 
MeshData _data)
 {
-  BLI_assert(corner.first.get_uv_vertex(1) == corner.second.get_uv_vertex(0));
-  UVVertex *uv_vertex = corner.second.get_uv_vertex(0);
+  BLI_assert(corner.first->get_uv_vertex(1) == 
corner.second->get_uv_vertex(0));
+  UVVertex *uv_vertex = corner.second->get_uv_vertex(0);
   Fan fan(*(uv_vertex->vertex));
   print(fan);
   fan.init_uv_coordinates(*uv_vertex, island);
@@ -216,7 +216,7 @@ static void extend_at_vert(UVIsland , UVBorderCorner 
, const MeshD
   printf("Found %d new edges to add\n", num_to_add);
 
   if (num_to_add == 0) {
-float2 center_uv = (corner.first.get_uv_vertex(0)->uv + 
corner.second.get_uv_vertex(1)->uv) /
+float2 center_uv = (corner.first->get_uv_vertex(0)->uv + 
corner.second->get_uv_vertex(1)->uv) /
2.0f;
 // no new triangles found. In this case we should extend the existing 
borders.
 UVVertex center_vertex;
@@ -224,46 +224,46 @@ static void extend_at_vert(UVIsland , 
UVBorderCorner , const MeshD
 center_vertex.uv = center_uv;
 center_vertex.uv_edges.clear();
 {
-  MeshPrimitive *mesh_primitive = corner.second.uv_primitive->primitive;
+  MeshPrimitive *mesh_primitive = corner.second->uv_primitive->primitive;
   UVPrimitive prim1(mesh_primitive);
   MeshUVVert *other_uv_vert = mesh_primitive->get_other_uv_vertex(
-  corner.second.edge->vertices[0]->vertex, 
corner.second.edge->vertices[1]->vertex);
+  corner.second->edge->vertices[0]->vertex, 
corner.second->edge->vertices[1]->vertex);
   center_vertex.loop = other_uv_vert->loop;
   center_vertex.vertex = other_uv_vert->vertex;
 
   UVVertex *center_vertex_ptr = island.lookup_or_create(center_vertex);
   UVEdge edge_template;
-  edge_template.vertices[0] = corner.first.get_uv_vertex(1);
-  edge_template.vertices[1] = corner.first.get_uv_vertex(0);
+  edge_template.vertices[0] = corner.first->get_uv_vertex(1);
+  edge_template.vertices[1] = corner.first->get_uv_vertex(0);
   prim1.edges.append(island.lookup_or_create(edge_template));
-  edge_template.vertices[0] = corner.first.get_uv_vertex(0);
+  edge_template.vertices[0] = corner.first->get_uv_vertex(0);
   edge_template.vertices[1] = center_vertex_ptr;
   prim1.edges.append(island.lookup_or_create(edge_template));
   edge_template.vertices[0] = center_vertex_ptr;
-  edge_template.vertices[1] = corner.first.get_uv_vertex(1);
+  edge_template.vertices[1] = corner.first->get_uv_vertex(1);
   prim1.edges.append(island.lookup_or_create(edge_template));
   prim1.append_to_uv_edges();
   prim1.append_to_uv_vertices();
   island.uv_primitives.append(prim1);
 }
 {
-  MeshPrimitive *mesh_primitive = corner.first.uv_primitive->primitive;
+  MeshPrimitive *mesh_primitive = corner.first->uv_primitive->primitive;
   UVPrimitive prim1(mesh_primitive);
   MeshUVVert *other_uv_vert = mesh_primitive->get_other_uv_vertex(
-  corner.first.edge->vertices[0]->vertex, 
corner.first.edge->vertices[1]->vertex);
+  corner.first->edge->vertices[0]->vertex, 
corner.first->edge->vertices[1]->vertex);
   center_vertex.loop = other_uv_vert->loop;
   center_vertex.vertex = other_uv_vert->vertex;
   /* TODO: Should be reversed. */
 

[Bf-blender-cvs] [d176c5789b7] temp-T97352-3d-texturing-seam-bleeding-b2: Temp commit before removing UVBorderVert.

2022-06-07 Thread Jeroen Bakker
Commit: d176c5789b7ac911e83fa789b1b04a3789e03dc3
Author: Jeroen Bakker
Date:   Tue Jun 7 11:37:29 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rBd176c5789b7ac911e83fa789b1b04a3789e03dc3

Temp commit before removing UVBorderVert.

===

M   source/blender/blenkernel/BKE_uv_islands.hh
M   source/blender/blenkernel/intern/uv_islands.cc

===

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh 
b/source/blender/blenkernel/BKE_uv_islands.hh
index b90fee409bb..33aecaceca9 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -31,6 +31,8 @@ struct MeshPrimitive;
 struct UVPrimitive;
 struct UVPrimitiveEdge;
 struct UVBorder;
+struct UVVertex;
+struct UVEdge;
 
 struct MeshEdge;
 struct MeshPrimitive;
@@ -56,8 +58,8 @@ struct MeshEdge {
 struct MeshPrimitive {
   int64_t index;
   int64_t poly;
-  Vector edges;
-  Vector vertices;
+  Vector edges;
+  Vector vertices;
 
   const MeshUVVert _uv_vert(const MeshVertex *vert)
   {
@@ -173,6 +175,9 @@ struct UVVertex {
   /* Position in uv space. */
   float2 uv;
 
+  /* uv edges that are connected to this uvvertex. */
+  Vector uv_edges;
+
   explicit UVVertex()
   {
   }
@@ -207,6 +212,13 @@ struct UVEdge {
   {
 return uv_primitives.size() == 1;
   }
+
+  void append_to_uv_vertices()
+  {
+for (UVVertex *vertex : vertices) {
+  vertex->uv_edges.append_non_duplicates(this);
+}
+  }
 };
 
 struct UVPrimitive {
@@ -220,6 +232,19 @@ struct UVPrimitive {
   {
   }
 
+  void append_to_uv_edges()
+  {
+for (UVEdge *uv_edge : edges) {
+  uv_edge->uv_primitives.append_non_duplicates(this);
+}
+  }
+  void append_to_uv_vertices()
+  {
+for (UVEdge *uv_edge : edges) {
+  uv_edge->append_to_uv_vertices();
+}
+  }
+
   Vector> shared_edges(UVPrimitive )
   {
 Vector> result;
@@ -284,10 +309,10 @@ struct UVBorderVert {
 struct UVBorderEdge {
   UVEdge *edge;
   bool tag = false;
-  int64_t uv_prim_index;
+  UVPrimitive *uv_primitive;
 
-  explicit UVBorderEdge(UVEdge *edge, int64_t uv_prim_index)
-  : edge(edge), uv_prim_index(uv_prim_index)
+  explicit UVBorderEdge(UVEdge *edge, UVPrimitive *uv_primitive)
+  : edge(edge), uv_primitive(uv_primitive)
   {
   }
 };
@@ -340,6 +365,7 @@ struct UVIsland {
   uv_edge_template.vertices[1] = lookup_or_create(UVVertex(v2));
   UVEdge *uv_edge = lookup_or_create(uv_edge_template);
   uv_primitive_ptr->edges.append(uv_edge);
+  uv_edge->append_to_uv_vertices();
   uv_edge->uv_primitives.append(uv_primitive_ptr);
 }
 return uv_primitive_ptr;
@@ -355,6 +381,7 @@ struct UVIsland {
 
 uv_vertices.append(vertex);
 UVVertex *result = _vertices.last();
+result->uv_edges.clear();
 return result;
   }
 
@@ -390,6 +417,7 @@ struct UVIsland {
   uv_edge_template.vertices[0] = 
lookup_or_create(*other_edge->vertices[0]);
   uv_edge_template.vertices[1] = 
lookup_or_create(*other_edge->vertices[1]);
   new_prim_ptr->edges[i] = lookup_or_create(uv_edge_template);
+  new_prim_ptr->edges[i]->append_to_uv_vertices();
   new_prim_ptr->edges[i]->uv_primitives.append(new_prim_ptr);
 }
   }
diff --git a/source/blender/blenkernel/intern/uv_islands.cc 
b/source/blender/blenkernel/intern/uv_islands.cc
index ce66658e757..58e758a56d7 100644
--- a/source/blender/blenkernel/intern/uv_islands.cc
+++ b/source/blender/blenkernel/intern/uv_islands.cc
@@ -15,7 +15,7 @@ void UVIsland::extract_border()
 UVPrimitive  = uv_primitives[prim_index];
 for (UVEdge *edge : prim.edges) {
   if (edge->is_border_edge()) {
-edges.append(UVBorderEdge(edge, prim_index));
+edges.append(UVBorderEdge(edge, ));
   }
 }
   }
@@ -218,36 +218,84 @@ static void extend_at_vert(UVIsland , UVBorderVert 
, const MeshData
   fan.init_uv_coordinates(vert, island);
   print(fan);
 
-#if 0
-  // add all verts that arent connected to the given border vert to the 
UVIsland.
-  for (FanTri  : fan.tris) {
-tri.flags.found = false;
-int2 test_edge(tri.v[0], tri.v[1]);
-for (UVPrimitive  : island.uv_primitives) {
-  for (UVEdge  : prim.edges) {
-if (edge.vertices[0].uv == vert.uv || edge.vertices[1].uv == vert.uv) {
-  int2 o(mesh_data.mloop[edge.vertices[0].loop].v,
- mesh_data.mloop[edge.vertices[1].loop].v);
-  if ((test_edge.x == o.x && test_edge.y == o.y) ||
-  (test_edge.x == o.y && test_edge.y == o.x)) {
-tri.flags.found = true;
-  }
-}
+  for (FanSegment  : fan.segments) {
+segment.flags.found = false;
+MeshVertex *v0 = segment.primitive->vertices[segment.vert_order[0]].vertex;
+MeshVertex *v1 = segment.primitive->vertices[segment.vert_order[1]].vertex;
+for (UVEdge *edge : vert.uv_vertex->uv_edges) 

[Bf-blender-cvs] [fad9241b9fc] temp-T97352-3d-texturing-seam-bleeding-b2: Make UVIsland own UVVertex.

2022-06-07 Thread Jeroen Bakker
Commit: fad9241b9fc3f5eb396e28e126f1a28ef410d461
Author: Jeroen Bakker
Date:   Tue Jun 7 09:07:45 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rBfad9241b9fc3f5eb396e28e126f1a28ef410d461

Make UVIsland own UVVertex.

===

M   source/blender/blenkernel/BKE_uv_islands.hh
M   source/blender/blenkernel/intern/uv_islands.cc

===

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh 
b/source/blender/blenkernel/BKE_uv_islands.hh
index 9992c0da4a9..ec9cf65af66 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -183,19 +183,24 @@ struct UVVertex {
 };
 
 struct UVEdge {
-  UVVertex vertices[2];
+  std::array vertices;
   Vector uv_primitives;
 
-  bool has_shared_edge(const UVEdge ) const
+  bool has_shared_edge(const MeshUVVert , const MeshUVVert ) const
   {
-return (vertices[0].uv == other.vertices[0].uv && vertices[1].uv == 
other.vertices[1].uv) ||
-   (vertices[0].uv == other.vertices[1].uv && vertices[1].uv == 
other.vertices[0].uv);
+return (vertices[0]->uv == v1.uv && vertices[1]->uv == v2.uv) ||
+   (vertices[0]->uv == v2.uv && vertices[1]->uv == v1.uv);
   }
 
-  bool has_shared_edge(const MeshUVVert , const MeshUVVert ) const
+  bool has_shared_edge(const UVVertex , const UVVertex ) const
+  {
+return (vertices[0]->uv == v1.uv && vertices[1]->uv == v2.uv) ||
+   (vertices[0]->uv == v2.uv && vertices[1]->uv == v1.uv);
+  }
+
+  bool has_shared_edge(const UVEdge ) const
   {
-return (vertices[0].uv == v1.uv && vertices[1].uv == v2.uv) ||
-   (vertices[0].uv == v2.uv && vertices[1].uv == v1.uv);
+return has_shared_edge(*other.vertices[0], *other.vertices[1]);
   }
 
   bool is_border_edge() const
@@ -337,8 +342,8 @@ struct UVIsland {
   const MeshUVVert  = primitive.get_uv_vert(edge->vert1);
   const MeshUVVert  = primitive.get_uv_vert(edge->vert2);
   UVEdge uv_edge_template;
-  uv_edge_template.vertices[0] = UVVertex(v1);
-  uv_edge_template.vertices[1] = UVVertex(v2);
+  uv_edge_template.vertices[0] = lookup_or_create(UVVertex(v1));
+  uv_edge_template.vertices[1] = lookup_or_create(UVVertex(v2));
   UVEdge *uv_edge = lookup_or_create(uv_edge_template);
   uv_primitive_ptr->edges.append(uv_edge);
   uv_edge->uv_primitives.append(uv_primitive_ptr);
@@ -346,6 +351,19 @@ struct UVIsland {
 return uv_primitive_ptr;
   }
 
+  UVVertex *lookup_or_create(const UVVertex )
+  {
+for (UVVertex _vertex : uv_vertices) {
+  if (uv_vertex.uv == vertex.uv && uv_vertex.vertex == vertex.vertex) {
+return _vertex;
+  }
+}
+
+uv_vertices.append(vertex);
+UVVertex *result = _vertices.last();
+return result;
+  }
+
   UVEdge *lookup_or_create(const UVEdge )
   {
 for (UVEdge _edge : uv_edges) {
@@ -373,7 +391,11 @@ struct UVIsland {
 uv_primitives.append(primitive);
 UVPrimitive *new_prim_ptr = _primitives.last();
 for (int i = 0; i < 3; i++) {
-  new_prim_ptr->edges[i] = lookup_or_create(*new_prim_ptr->edges[i]);
+  UVEdge *other_edge = primitive.edges[i];
+  UVEdge uv_edge_template;
+  uv_edge_template.vertices[0] = 
lookup_or_create(*other_edge->vertices[0]);
+  uv_edge_template.vertices[1] = 
lookup_or_create(*other_edge->vertices[1]);
+  new_prim_ptr->edges[i] = lookup_or_create(uv_edge_template);
   new_prim_ptr->edges[i]->uv_primitives.append(new_prim_ptr);
 }
   }
@@ -586,7 +608,7 @@ struct UVIslandsMask {
 float2 p;
 for (int i = 0; i < 10; i++) {
   float f = i / 10.0f;
-  interp_v2_v2v2(p, edge.vertices[0].uv, edge.vertices[1].uv, f);
+  interp_v2_v2v2(p, edge.vertices[0]->uv, edge.vertices[1]->uv, f);
   add(island_index, p);
 }
   }
diff --git a/source/blender/blenkernel/intern/uv_islands.cc 
b/source/blender/blenkernel/intern/uv_islands.cc
index 0bf4964aa10..6d592d84f2c 100644
--- a/source/blender/blenkernel/intern/uv_islands.cc
+++ b/source/blender/blenkernel/intern/uv_islands.cc
@@ -35,10 +35,10 @@ void UVIsland::extract_border()
 }
 
 starting_border_edge->tag = true;
-float2 first_uv = starting_border_edge->edge->vertices[0].uv;
-float2 current_uv = starting_border_edge->edge->vertices[1].uv;
-MeshVertex *current_vert = starting_border_edge->edge->vertices[1].vertex;
-border.verts.append(UVBorderVert(first_uv, 
starting_border_edge->edge->vertices[0].vertex));
+float2 first_uv = starting_border_edge->edge->vertices[0]->uv;
+float2 current_uv = starting_border_edge->edge->vertices[1]->uv;
+MeshVertex *current_vert = starting_border_edge->edge->vertices[1]->vertex;
+border.verts.append(UVBorderVert(first_uv, 
starting_border_edge->edge->vertices[0]->vertex));
 while (current_uv != first_uv) {
   for (UVBorderEdge 

[Bf-blender-cvs] [6f7c3f40c3f] temp-T97352-3d-texturing-seam-bleeding-b2: Let Bordervert point to uvvertex.

2022-06-07 Thread Jeroen Bakker
Commit: 6f7c3f40c3f8bcd84f22dae69fd67a4eb72acb86
Author: Jeroen Bakker
Date:   Tue Jun 7 09:25:32 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB6f7c3f40c3f8bcd84f22dae69fd67a4eb72acb86

Let Bordervert point to uvvertex.

===

M   source/blender/blenkernel/BKE_uv_islands.hh
M   source/blender/blenkernel/intern/uv_islands.cc

===

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh 
b/source/blender/blenkernel/BKE_uv_islands.hh
index ec9cf65af66..b90fee409bb 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -262,10 +262,7 @@ struct UVPrimitive {
 };
 
 struct UVBorderVert {
-  float2 uv;
-
-  /* Index of this vert in the vertices of the original mesh. */
-  MeshVertex *vertex;
+  UVVertex *uv_vertex;
 
   /* Indexes of connected border verts. */
   int64_t index;
@@ -273,15 +270,12 @@ struct UVBorderVert {
   int64_t next_index;
   int64_t border_index;
 
-  /** Index of the uv primitive (UVIsland) */
-  int64_t uv_primitive_index;
-
   struct {
 /** Should this vertex still be checked when performing extension. */
 bool extendable : 1;
   } flags;
 
-  explicit UVBorderVert(float2 , MeshVertex *vertex) : uv(uv), 
vertex(vertex)
+  explicit UVBorderVert(UVVertex *uv_vertex) : uv_vertex(uv_vertex)
   {
 flags.extendable = true;
   }
diff --git a/source/blender/blenkernel/intern/uv_islands.cc 
b/source/blender/blenkernel/intern/uv_islands.cc
index 6d592d84f2c..ce66658e757 100644
--- a/source/blender/blenkernel/intern/uv_islands.cc
+++ b/source/blender/blenkernel/intern/uv_islands.cc
@@ -37,8 +37,8 @@ void UVIsland::extract_border()
 starting_border_edge->tag = true;
 float2 first_uv = starting_border_edge->edge->vertices[0]->uv;
 float2 current_uv = starting_border_edge->edge->vertices[1]->uv;
-MeshVertex *current_vert = starting_border_edge->edge->vertices[1]->vertex;
-border.verts.append(UVBorderVert(first_uv, 
starting_border_edge->edge->vertices[0]->vertex));
+UVVertex *current_vert = starting_border_edge->edge->vertices[1];
+border.verts.append(UVBorderVert(starting_border_edge->edge->vertices[0]));
 while (current_uv != first_uv) {
   for (UVBorderEdge _edge : edges) {
 if (border_edge.tag == true) {
@@ -47,9 +47,9 @@ void UVIsland::extract_border()
 int i;
 for (i = 0; i < 2; i++) {
   if (border_edge.edge->vertices[i]->uv == current_uv) {
-border.verts.append(UVBorderVert(current_uv, current_vert));
+border.verts.append(UVBorderVert(current_vert));
 current_uv = border_edge.edge->vertices[1 - i]->uv;
-current_vert = border_edge.edge->vertices[1 - i]->vertex;
+current_vert = border_edge.edge->vertices[1 - i];
 border_edge.tag = true;
 break;
   }
@@ -95,7 +95,7 @@ static UVBorderVert *sharpest_border_vert(UVIsland )
   return result;
 }
 
-struct FanTri {
+struct FanSegment {
   MeshPrimitive *primitive;
   /* UVs order are already applied. So uvs[0] mathes 
primitive->vertices[vert_order[0]]/ */
   float2 uvs[3];
@@ -106,7 +106,7 @@ struct FanTri {
 bool should_be_added : 1;
   } flags;
 
-  FanTri(MeshPrimitive *primitive, MeshVertex *vertex) : primitive(primitive)
+  FanSegment(MeshPrimitive *primitive, MeshVertex *vertex) : 
primitive(primitive)
   {
 flags.found = false;
 flags.should_be_added = false;
@@ -133,7 +133,7 @@ struct FanTri {
 
 struct Fan {
   /* Blades of the fan. */
-  Vector segments;
+  Vector segments;
 
   Fan(MeshVertex )
   {
@@ -154,7 +154,7 @@ struct Fan {
   if (edge == current_edge || (edge->vert1 !=  && edge->vert2 
!= )) {
 continue;
   }
-  segments.append(FanTri(other, ));
+  segments.append(FanSegment(other, ));
   current_edge = edge;
   previous_primitive = other;
   stop = true;
@@ -170,7 +170,7 @@ struct Fan {
 
   void init_uv_coordinates(UVBorderVert , const UVIsland )
   {
-for (FanTri  : segments) {
+for (FanSegment  : segments) {
   int2 test_edge = 
int2(segment.primitive->vertices[segment.vert_order[0]].vertex->v,
 
segment.primitive->vertices[segment.vert_order[1]].vertex->v);
   for (const UVPrimitive _primitive : island.uv_primitives) {
@@ -178,9 +178,9 @@ struct Fan {
   int2 o(edge->vertices[0]->vertex->v, edge->vertices[1]->vertex->v);
   if ((test_edge.x == o.x && test_edge.y == o.y) ||
   (test_edge.x == o.y && test_edge.y == o.x)) {
-segment.uvs[0] = vert.uv;
+segment.uvs[0] = vert.uv_vertex->uv;
 for (int i = 0; i < 2; i++) {
-  if (edge->vertices[i]->uv == vert.uv) {
+  if (edge->vertices[i]->uv == vert.uv_vertex->uv) {
 

[Bf-blender-cvs] [f49efed9533] master: Curves: fix transforms in Add brush

2022-06-07 Thread Jacques Lucke
Commit: f49efed9533bf70cdc863c9bf6e136df0d99ec91
Author: Jacques Lucke
Date:   Tue Jun 7 14:20:39 2022 +0200
Branches: master
https://developer.blender.org/rBf49efed9533bf70cdc863c9bf6e136df0d99ec91

Curves: fix transforms in Add brush

Symmetry should be applied in the space of the curves object,
not in the space of the surface object.

===

M   source/blender/editors/sculpt_paint/curves_sculpt_add.cc
M   source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
M   source/blender/editors/sculpt_paint/curves_sculpt_intern.hh

===

diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc 
b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
index 5f168bd4e05..f013fa05f4c 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
@@ -168,7 +168,7 @@ struct AddOperationExecutor {
 world_to_surface_mat_ = surface_to_world_mat_.inverted();
 surface_to_curves_mat_ = world_to_curves_mat_ * surface_to_world_mat_;
 surface_to_curves_normal_mat_ = 
surface_to_curves_mat_.inverted().transposed();
-curves_to_surface_mat_ = curves_to_world_mat_ * world_to_surface_mat_;
+curves_to_surface_mat_ = world_to_surface_mat_ * curves_to_world_mat_;
 
 if (!CustomData_has_layer(_->ldata, CD_NORMAL)) {
   BKE_mesh_calc_normals_split(surface_);
@@ -269,16 +269,6 @@ struct AddOperationExecutor {
 ED_region_tag_redraw(ctx_.region);
   }
 
-  float3 get_bary_coords(const Mesh , const MLoopTri , const 
float3 position) const
-  {
-const float3  = mesh.mvert[mesh.mloop[looptri.tri[0]].v].co;
-const float3  = mesh.mvert[mesh.mloop[looptri.tri[1]].v].co;
-const float3  = mesh.mvert[mesh.mloop[looptri.tri[2]].v].co;
-float3 bary_coords;
-interp_weights_tri_v3(bary_coords, v0, v1, v2, position);
-return bary_coords;
-  }
-
   /**
* Sample a single point exactly at the mouse position.
*/
@@ -287,15 +277,15 @@ struct AddOperationExecutor {
 float3 ray_start_wo, ray_end_wo;
 ED_view3d_win_to_segment_clipped(
 ctx_.depsgraph, ctx_.region, ctx_.v3d, brush_pos_re_, ray_start_wo, 
ray_end_wo, true);
-const float3 ray_start_su = world_to_surface_mat_ * ray_start_wo;
-const float3 ray_end_su = world_to_surface_mat_ * ray_end_wo;
+const float3 ray_start_cu = world_to_curves_mat_ * ray_start_wo;
+const float3 ray_end_cu = world_to_curves_mat_ * ray_end_wo;
 
 const Vector symmetry_brush_transforms = 
get_symmetry_brush_transforms(
 eCurvesSymmetryType(curves_id_->symmetry));
 
 for (const float4x4 _transform : symmetry_brush_transforms) {
-  this->sample_in_center(
-  r_added_points, brush_transform * ray_start_su, brush_transform * 
ray_end_su);
+  const float4x4 transform = curves_to_surface_mat_ * brush_transform;
+  this->sample_in_center(r_added_points, transform * ray_start_cu, 
transform * ray_end_cu);
 }
   }
 
@@ -322,7 +312,7 @@ struct AddOperationExecutor {
 
 const int looptri_index = ray_hit.index;
 const float3 brush_pos_su = ray_hit.co;
-const float3 bary_coords = this->get_bary_coords(
+const float3 bary_coords = compute_bary_coord_in_triangle(
 *surface_, surface_looptris_[looptri_index], brush_pos_su);
 
 const float3 brush_pos_cu = surface_to_curves_mat_ * brush_pos_su;
@@ -363,8 +353,11 @@ struct AddOperationExecutor {
   float3 ray_start_wo, ray_end_wo;
   ED_view3d_win_to_segment_clipped(
   ctx_.depsgraph, ctx_.region, ctx_.v3d, pos_re, ray_start_wo, 
ray_end_wo, true);
-  const float3 ray_start_su = brush_transform * (world_to_surface_mat_ * 
ray_start_wo);
-  const float3 ray_end_su = brush_transform * (world_to_surface_mat_ * 
ray_end_wo);
+  const float3 ray_start_cu = brush_transform * (world_to_curves_mat_ * 
ray_start_wo);
+  const float3 ray_end_cu = brush_transform * (world_to_curves_mat_ * 
ray_end_wo);
+
+  const float3 ray_start_su = curves_to_surface_mat_ * ray_start_cu;
+  const float3 ray_end_su = curves_to_surface_mat_ * ray_end_cu;
   const float3 ray_direction_su = math::normalize(ray_end_su - 
ray_start_su);
 
   BVHTreeRayHit ray_hit;
@@ -392,7 +385,7 @@ struct AddOperationExecutor {
   const int looptri_index = ray_hit.index;
   const float3 pos_su = ray_hit.co;
 
-  const float3 bary_coords = this->get_bary_coords(
+  const float3 bary_coords = compute_bary_coord_in_triangle(
   *surface_, surface_looptris_[looptri_index], pos_su);
 
   const float3 pos_cu = surface_to_curves_mat_ * pos_su;
@@ -417,8 +410,8 @@ struct AddOperationExecutor {
  brush_ray_start_wo,
  brush_ray_end_wo,
  true);
-const float3 brush_ray_start_su = 

[Bf-blender-cvs] [3b7e314a286] master: Cleanup: remove dead code

2022-06-07 Thread Jacques Lucke
Commit: 3b7e314a2869624a0d42bbeb82d7d99f3056dba5
Author: Jacques Lucke
Date:   Tue Jun 7 14:19:22 2022 +0200
Branches: master
https://developer.blender.org/rB3b7e314a2869624a0d42bbeb82d7d99f3056dba5

Cleanup: remove dead code

===

M   source/blender/editors/sculpt_paint/curves_sculpt_comb.cc

===

diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc 
b/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc
index 71f08cce8ff..ae0a512c5ee 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc
@@ -99,12 +99,9 @@ struct CombOperationExecutor {
   float2 brush_pos_prev_re_;
   float2 brush_pos_re_;
   float2 brush_pos_diff_re_;
-  float brush_pos_diff_length_re_;
 
   float4x4 curves_to_world_mat_;
   float4x4 world_to_curves_mat_;
-  float4x4 surface_to_world_mat_;
-  float4x4 world_to_surface_mat_;
 
   CombOperationExecutor(const bContext ) : ctx_(C)
   {
@@ -141,7 +138,6 @@ struct CombOperationExecutor {
 brush_pos_prev_re_ = self_->brush_pos_last_re_;
 brush_pos_re_ = stroke_extension.mouse_position;
 brush_pos_diff_re_ = brush_pos_re_ - brush_pos_prev_re_;
-brush_pos_diff_length_re_ = math::length(brush_pos_diff_re_);
 
 if (stroke_extension.is_first) {
   if (falloff_shape_ == PAINT_FALLOFF_SHAPE_SPHERE) {

___
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] [1456f30b025] master: Cleanup: potential dereferencing of a NULL pointer

2022-06-07 Thread Germano Cavalcante
Commit: 1456f30b02548a9938aa6c3e07798b0aeedddc4b
Author: Germano Cavalcante
Date:   Tue Jun 7 09:01:46 2022 -0300
Branches: master
https://developer.blender.org/rB1456f30b02548a9938aa6c3e07798b0aeedddc4b

Cleanup: potential dereferencing of a NULL pointer

If `cancel` is `false`, `NULL` `inter` pointer dereferencing could occur.

Currently I haven't found a case where this can happen.

But it's best to avoid.

===

M   source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c

===

diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c 
b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
index 71db88419d5..fca51c264d3 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
@@ -539,10 +539,11 @@ static int gizmo_dial_modal(bContext *C,
 static void gizmo_dial_exit(bContext *C, wmGizmo *gz, const bool cancel)
 {
   DialInteraction *inter = gz->interaction_data;
-  bool use_reset_value = false;
-  float reset_value = 0.0f;
-  if (cancel) {
-if (inter) {
+  if (inter) {
+bool use_reset_value = false;
+float reset_value = 0.0f;
+
+if (cancel) {
   /* Set the property for the operator and call its modal function. */
   wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset");
   if (WM_gizmo_target_property_is_valid(gz_prop)) {
@@ -550,21 +551,21 @@ static void gizmo_dial_exit(bContext *C, wmGizmo *gz, 
const bool cancel)
 reset_value = inter->init.prop_angle;
   }
 }
-  }
-  else {
-if (inter->has_drag == false) {
-  PropertyRNA *prop = RNA_struct_find_property(gz->ptr, "click_value");
-  if (RNA_property_is_set(gz->ptr, prop)) {
-use_reset_value = true;
-reset_value = RNA_property_float_get(gz->ptr, prop);
+else {
+  if (inter->has_drag == false) {
+PropertyRNA *prop = RNA_struct_find_property(gz->ptr, "click_value");
+if (RNA_property_is_set(gz->ptr, prop)) {
+  use_reset_value = true;
+  reset_value = RNA_property_float_get(gz->ptr, prop);
+}
   }
 }
-  }
 
-  if (use_reset_value) {
-wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset");
-if (WM_gizmo_target_property_is_valid(gz_prop)) {
-  WM_gizmo_target_property_float_set(C, gz, gz_prop, reset_value);
+if (use_reset_value) {
+  wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset");
+  if (WM_gizmo_target_property_is_valid(gz_prop)) {
+WM_gizmo_target_property_float_set(C, gz, gz_prop, reset_value);
+  }
 }
   }

___
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] [d4227150949] master: Fix drawing increments after running Spin gizmo

2022-06-07 Thread Germano Cavalcante
Commit: d4227150949afb27064843767d3fc2abf126e9f8
Author: Germano Cavalcante
Date:   Tue Jun 7 09:12:20 2022 -0300
Branches: master
https://developer.blender.org/rBd4227150949afb27064843767d3fc2abf126e9f8

Fix drawing increments after running Spin gizmo

Caused by {ea182deeb9cdd2a9137e98eb0072f57c0fb1e09f}.

===

M   source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c

===

diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c 
b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
index fca51c264d3..9b7b157dc7e 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
@@ -426,7 +426,9 @@ static void dial_draw_intern(
   if (WM_gizmo_target_property_is_valid(gz_prop)) {
 angle_delta = WM_gizmo_target_property_float_get(gz, gz_prop);
   }
-  angle_increment = RNA_float_get(gz->ptr, "incremental_angle");
+  if (gz->state & WM_GIZMO_STATE_MODAL) {
+angle_increment = RNA_float_get(gz->ptr, "incremental_angle");
+  }
 }
   }

___
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] [2918a3a2a37] master: Cleanup: spelling in comments, minor formatting tweaks

2022-06-07 Thread Campbell Barton
Commit: 2918a3a2a374d9ad98923e9f6824534d7872c83f
Author: Campbell Barton
Date:   Tue Jun 7 21:22:11 2022 +1000
Branches: master
https://developer.blender.org/rB2918a3a2a374d9ad98923e9f6824534d7872c83f

Cleanup: spelling in comments, minor formatting tweaks

===

M   source/blender/blenkernel/BKE_fcurve.h
M   source/blender/blenkernel/intern/subsurf_ccg.c
M   source/blender/blenlib/BLI_math_geom.h
M   source/blender/blenlib/BLI_math_matrix.h
M   source/blender/blenlib/BLI_utildefines_iter.h
M   source/blender/bmesh/intern/bmesh_edgeloop.c
M   source/blender/draw/intern/draw_curves_private.h
M   source/blender/editors/armature/armature_add.c
M   source/blender/editors/interface/interface_handlers.c
M   source/blender/makesrna/intern/rna_rna.c
M   source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
M   source/blender/windowmanager/intern/wm_files.c

===

diff --git a/source/blender/blenkernel/BKE_fcurve.h 
b/source/blender/blenkernel/BKE_fcurve.h
index 30c73e0fcc6..4489527fcab 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -263,14 +263,14 @@ struct FCurve *BKE_fcurve_iter_step(struct FCurve 
*fcu_iter, const char rna_path
  * If there is an action assigned to the `id`'s #AnimData, it will be searched 
for a matching
  * F-curve first. Drivers are searched only if no valid action F-curve could 
be found.
  *
- * \note: Return pointer parameter (`r_driven`) is optional and may be NULL.
+ * \note Return pointer parameter (`r_driven`) is optional and may be NULL.
  *
- * \warning: In case no animation (from an Action) F-curve is found, returned 
value is always NULL.
+ * \warning In case no animation (from an Action) F-curve is found, returned 
value is always NULL.
  * This means that this function will set `r_driven` to True in case a valid 
driver F-curve is
  * found, but will not return said F-curve. In other words:
- *   - Animated with FCurve: returns the `FCurve*` and `*r_driven = false`.
- *   - Animated with driver: returns `NULL` and `*r_driven = true`.
- *   - Not animated: returns `NULL` and `*r_driven = false`.
+ * - Animated with FCurve: returns the `FCurve*` and `*r_driven = false`.
+ * - Animated with driver: returns `NULL` and `*r_driven = true`.
+ * - Not animated: returns `NULL` and `*r_driven = false`.
  */
 struct FCurve *id_data_find_fcurve(
 ID *id, void *data, struct StructRNA *type, const char *prop_name, int 
index, bool *r_driven);
@@ -296,11 +296,11 @@ int BKE_fcurves_filter(ListBase *dst, ListBase *src, 
const char *dataPrefix, con
  * If there is an action assigned to the `animdata`, it will be searched for a 
matching F-curve
  * first. Drivers are searched only if no valid action F-curve could be found.
  *
- * \note: Typically, indices in RNA arrays are stored separately in F-curves, 
so the rna_path
+ * \note Typically, indices in RNA arrays are stored separately in F-curves, 
so the rna_path
  * should not include them (e.g. `rna_path='location[0]'` will not match any 
F-Curve on an Object,
  * but `rna_path='location', rna_index=0` will if it exists).
  *
- * \note: Return pointer parameters (`r_action`, `r_driven` and `r_special`) 
are all optional and
+ * \note Return pointer parameters (`r_action`, `r_driven` and `r_special`) 
are all optional and
  * may be NULL.
  */
 struct FCurve *BKE_animadata_fcurve_find_by_rna_path(struct AnimData *animdata,
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c 
b/source/blender/blenkernel/intern/subsurf_ccg.c
index ba2df362b92..efabb4f039a 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -926,11 +926,9 @@ static void ccgDM_copyFinalVertArray(DerivedMesh *dm, 
MVert *mvert)
 int x;
 
 for (x = 1; x < edgeSize - 1; x++) {
-  /* This gives errors with -debug-fpe
-   * the normals don't seem to be unit length.
-   * this is most likely caused by edges with no
-   * faces which are now zerod out, see comment in:
-   * ccgSubSurf__calcVertNormals(), - campbell */
+  /* NOTE(@campbellbarton): This gives errors with `--debug-fpe` the 
normals don't seem to be
+   * unit length. This is most likely caused by edges with no faces which 
are now zeroed out,
+   * see comment in: `ccgSubSurf__calcVertNormals()`. */
   vd = ccgSubSurf_getEdgeData(ss, e, x);
   ccgDM_to_MVert([i++], , vd);
 }
diff --git a/source/blender/blenlib/BLI_math_geom.h 
b/source/blender/blenlib/BLI_math_geom.h
index 5c1b6c8d774..93b413ab755 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -136,7 +136,7 @@ bool is_quad_convex_v2(const float v1[2], const float 
v2[2], const float v3[2],
 bool is_poly_convex_v2(const float verts[][2], unsigned int nr);
 /**
  * Check 

[Bf-blender-cvs] [1e0e1ad20f0] master: Cleanup: note that checking only the left modifiers isn't a mistake

2022-06-07 Thread Campbell Barton
Commit: 1e0e1ad20f07990e8a48020dc944d414b5588ae6
Author: Campbell Barton
Date:   Tue Jun 7 21:21:34 2022 +1000
Branches: master
https://developer.blender.org/rB1e0e1ad20f07990e8a48020dc944d414b5588ae6

Cleanup: note that checking only the left modifiers isn't a mistake

===

M   source/blender/editors/interface/interface_icons_event.c

===

diff --git a/source/blender/editors/interface/interface_icons_event.c 
b/source/blender/editors/interface/interface_icons_event.c
index 00c1bcb5f6e..6ad5fe805ab 100644
--- a/source/blender/editors/interface/interface_icons_event.c
+++ b/source/blender/editors/interface/interface_icons_event.c
@@ -145,10 +145,10 @@ void icon_draw_rect_input(float x,
 SNPRINTF(str, "F%d", 1 + (event_type - EVT_F1KEY));
 icon_draw_rect_input_text(, color, str, event_type > EVT_F9KEY ? 8.0f 
: 10.0f);
   }
-  else if (event_type == EVT_LEFTSHIFTKEY) {
+  else if (event_type == EVT_LEFTSHIFTKEY) { /* Right Shift has already been 
converted to left. */
 icon_draw_rect_input_symbol(, color, (const char[]){0xe2, 0x87, 0xa7, 
0x0});
   }
-  else if (event_type == EVT_LEFTCTRLKEY) {
+  else if (event_type == EVT_LEFTCTRLKEY) { /* Right Shift has already been 
converted to left. */
 if (platform == MACOS) {
   icon_draw_rect_input_symbol(, color, (const char[]){0xe2, 0x8c, 
0x83, 0x0});
 }
@@ -156,7 +156,7 @@ void icon_draw_rect_input(float x,
   icon_draw_rect_input_text(, color, "Ctrl", 9.0f);
 }
   }
-  else if (event_type == EVT_LEFTALTKEY) {
+  else if (event_type == EVT_LEFTALTKEY) { /* Right Alt has already been 
converted to left. */
 if (platform == MACOS) {
   icon_draw_rect_input_symbol(, color, (const char[]){0xe2, 0x8c, 
0xa5, 0x0});
 }

___
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] [3a8a44b3f90] master: Keymap: use both left/right modifier keys

2022-06-07 Thread Campbell Barton
Commit: 3a8a44b3f905850fe82b93b1316e9412f5bb7a8b
Author: Campbell Barton
Date:   Tue Jun 7 20:53:17 2022 +1000
Branches: master
https://developer.blender.org/rB3a8a44b3f905850fe82b93b1316e9412f5bb7a8b

Keymap: use both left/right modifier keys

Use both left/right modifier keys for:

- Fly Mode.
- Walk Mode.
- Area Split.
- Sculpt Detail Map.
- Sculpt Expand.
- Standard Modal Map

Resolves T98638.

===

M   release/scripts/presets/keyconfig/keymap_data/blender_default.py
M   source/blender/editors/screen/screen_ops.c
M   source/blender/editors/sculpt_paint/sculpt_detail.c

===

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py 
b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 0d6532209ef..77890a9800d 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -5924,6 +5924,8 @@ def km_standard_modal_map(_params):
 ("APPLY", {"type": 'NUMPAD_ENTER', "value": 'PRESS', "any": True}, 
None),
 ("SNAP", {"type": 'LEFT_CTRL', "value": 'PRESS', "any": True}, None),
 ("SNAP_OFF", {"type": 'LEFT_CTRL', "value": 'RELEASE', "any": True}, 
None),
+("SNAP", {"type": 'RIGHT_CTRL', "value": 'PRESS', "any": True}, None),
+("SNAP_OFF", {"type": 'RIGHT_CTRL', "value": 'RELEASE', "any": True}, 
None),
 ])
 
 return keymap
@@ -6070,10 +6072,16 @@ def km_view3d_fly_modal(_params):
 ("AXIS_LOCK_Z", {"type": 'Z', "value": 'PRESS'}, None),
 ("PRECISION_ENABLE", {"type": 'LEFT_ALT', "value": 'PRESS', "any": 
True}, None),
 ("PRECISION_DISABLE", {"type": 'LEFT_ALT', "value": 'RELEASE', "any": 
True}, None),
+("PRECISION_ENABLE", {"type": 'RIGHT_ALT', "value": 'PRESS', "any": 
True}, None),
+("PRECISION_DISABLE", {"type": 'RIGHT_ALT', "value": 'RELEASE', "any": 
True}, None),
 ("PRECISION_ENABLE", {"type": 'LEFT_SHIFT', "value": 'PRESS', "any": 
True}, None),
 ("PRECISION_DISABLE", {"type": 'LEFT_SHIFT', "value": 'RELEASE', 
"any": True}, None),
+("PRECISION_ENABLE", {"type": 'RIGHT_SHIFT', "value": 'PRESS', "any": 
True}, None),
+("PRECISION_DISABLE", {"type": 'RIGHT_SHIFT', "value": 'RELEASE', 
"any": True}, None),
 ("FREELOOK_ENABLE", {"type": 'LEFT_CTRL', "value": 'PRESS', "any": 
True}, None),
 ("FREELOOK_DISABLE", {"type": 'LEFT_CTRL', "value": 'RELEASE', "any": 
True}, None),
+("FREELOOK_ENABLE", {"type": 'RIGHT_CTRL', "value": 'PRESS', "any": 
True}, None),
+("FREELOOK_DISABLE", {"type": 'RIGHT_CTRL', "value": 'RELEASE', "any": 
True}, None),
 ])
 
 return keymap
@@ -6095,8 +6103,12 @@ def km_view3d_walk_modal(_params):
 ("CONFIRM", {"type": 'NUMPAD_ENTER', "value": 'PRESS', "any": True}, 
None),
 ("FAST_ENABLE", {"type": 'LEFT_SHIFT', "value": 'PRESS', "any": True}, 
None),
 ("FAST_DISABLE", {"type": 'LEFT_SHIFT', "value": 'RELEASE', "any": 
True}, None),
+("FAST_ENABLE", {"type": 'RIGHT_SHIFT', "value": 'PRESS', "any": 
True}, None),
+("FAST_DISABLE", {"type": 'RIGHT_SHIFT', "value": 'RELEASE', "any": 
True}, None),
 ("SLOW_ENABLE", {"type": 'LEFT_ALT', "value": 'PRESS', "any": True}, 
None),
 ("SLOW_DISABLE", {"type": 'LEFT_ALT', "value": 'RELEASE', "any": 
True}, None),
+("SLOW_ENABLE", {"type": 'RIGHT_ALT', "value": 'PRESS', "any": True}, 
None),
+("SLOW_DISABLE", {"type": 'RIGHT_ALT', "value": 'RELEASE', "any": 
True}, None),
 ("FORWARD", {"type": 'W', "value": 'PRESS', "any": True}, None),
 ("BACKWARD", {"type": 'S', "value": 'PRESS', "any": True}, None),
 ("LEFT", {"type": 'A', "value": 'PRESS', "any": True}, None),
@@ -6146,6 +6158,8 @@ def km_view3d_rotate_modal(_params):
 ("CONFIRM", {"type": 'ESC', "value": 'PRESS', "any": True}, None),
 ("AXIS_SNAP_ENABLE", {"type": 'LEFT_ALT', "value": 'PRESS', "any": 
True}, None),
 ("AXIS_SNAP_DISABLE", {"type": 'LEFT_ALT', "value": 'RELEASE', "any": 
True}, None),
+("AXIS_SNAP_ENABLE", {"type": 'RIGHT_ALT', "value": 'PRESS', "any": 
True}, None),
+("AXIS_SNAP_DISABLE", {"type": 'RIGHT_ALT', "value": 'RELEASE', "any": 
True}, None),
 ])
 
 return keymap
@@ -6235,6 +6249,7 @@ def km_sculpt_expand_modal(_params):
 *((e, {"type": NUMBERS_1[i], "value": 'PRESS', "any": True}, None) for 
i, e in enumerate(
 ("FALLOFF_GEODESICS", "FALLOFF_TOPOLOGY", 
"FALLOFF_TOPOLOGY_DIAGONALS", "FALLOFF_SPHERICAL"))),
 ("SNAP_TOGGLE", {"type": 'LEFT_CTRL', "value": 'ANY'}, None),
+("SNAP_TOGGLE", {"type": 'RIGHT_CTRL', "value": 'ANY'}, None),
 ("LOOP_COUNT_INCREASE", {"type": 'W', "value": 'PRESS', "any": True, 
"repeat": True}, None),
 ("LOOP_COUNT_DECREASE", {"type": 

[Bf-blender-cvs] [16934c198aa] master: LibOverride: Attempt to improve handling of cyclic deps between libraries.

2022-06-07 Thread Bastien Montagne
Commit: 16934c198aab9413b0848c128af3b17a04219f25
Author: Bastien Montagne
Date:   Tue Jun 7 12:50:25 2022 +0200
Branches: master
https://developer.blender.org/rB16934c198aab9413b0848c128af3b17a04219f25

LibOverride: Attempt to improve handling of cyclic deps between libraries.

Those cyclic dependencies (lib_A depends on a texture from lib_B, which
links geometry from lib_A) are bad, but previous code did not always
helped much in idendtifying to actuall issue point.

Now, reduce maximum 'recursion' level to 100 (this should already never
be reached in practice), and additionally report warnings when reaching
level 90, so that user gets more context data to identify more easily
the culprit.

===

M   source/blender/blenkernel/intern/lib_override.cc

===

diff --git a/source/blender/blenkernel/intern/lib_override.cc 
b/source/blender/blenkernel/intern/lib_override.cc
index 168feebedec..aa43ca94c99 100644
--- a/source/blender/blenkernel/intern/lib_override.cc
+++ b/source/blender/blenkernel/intern/lib_override.cc
@@ -2423,7 +2423,7 @@ static int 
lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
   if (id != nullptr && ID_IS_LINKED(id) && id->lib != id_owner->lib) {
 const int owner_library_indirect_level = ID_IS_LINKED(id_owner) ? 
id_owner->lib->temp_index :
   0;
-if (owner_library_indirect_level > 200) {
+if (owner_library_indirect_level > 100) {
   CLOG_ERROR(,
  "Levels of indirect usages of libraries is way too high, 
there are most likely "
  "dependency loops, skipping further building loops (involves 
at least '%s' from "
@@ -2434,6 +2434,16 @@ static int 
lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
  id->lib->filepath);
   return IDWALK_RET_NOP;
 }
+if (owner_library_indirect_level > 90) {
+  CLOG_WARN(
+  ,
+  "Levels of indirect usages of libraries is suspiciously too high, 
there are most likely "
+  "dependency loops (involves at least '%s' from '%s' and '%s' from 
'%s')",
+  id_owner->name,
+  id_owner->lib->filepath,
+  id->name,
+  id->lib->filepath);
+}
 
 if (owner_library_indirect_level >= id->lib->temp_index) {
   id->lib->temp_index = owner_library_indirect_level + 1;

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


[Bf-blender-cvs] [4412e14708c] master: Cycles: Useful Metal backend debug & profiling functionality

2022-06-07 Thread Michael Jones
Commit: 4412e14708c5625c3fe84bc75fce2ca6de6f58c9
Author: Michael Jones
Date:   Tue Jun 7 11:08:21 2022 +0100
Branches: master
https://developer.blender.org/rB4412e14708c5625c3fe84bc75fce2ca6de6f58c9

Cycles: Useful Metal backend debug & profiling functionality

This patch adds some useful debugging & profiling env vars to the Metal backend:

- `CYCLES_METAL_PROFILING`: output a per-kernel timing report at the end of the 
render
- `CYCLES_METAL_DEBUG`: enable per-dispatch tracing (very verbose)
- `CYCLES_DEBUG_METAL_CAPTURE_KERNEL`: enable programatic .gputrace capture for 
a specified kernel index

Here's an example of the timing report with `CYCLES_METAL_PROFILING` enabled:

```
---
Kernel name Total threads   Dispatches Avg. 
T/DTime   Time%
---
integrator_init_from_camera   657,407,232  161
4,083,274   0.24s   0.51%
integrator_intersect_closest1,629,288,440  681
2,392,494  15.18s  32.12%
integrator_intersect_shadow   751,652,291  470
1,599,260   5.80s  12.28%
integrator_shade_background   304,612,074  263
1,158,220   1.16s   2.45%
integrator_shade_surface1,159,764,041  676
1,715,627  20.57s  43.52%
integrator_shade_shadow   598,885,847  418
1,432,741   1.27s   2.69%
integrator_queued_paths_array   2,969,650,130  805
3,689,006   0.35s   0.74%
integrator_queued_shadow_paths_array  593,936,619  379
1,567,115   0.14s   0.29%
integrator_terminated_paths_array  22,205,417  155  
143,260   0.05s   0.10%
integrator_sorted_paths_array   2,517,140,043  676
3,723,579   1.65s   3.50%
integrator_compact_paths_array648,912,748  155
4,186,533   0.03s   0.07%
integrator_compact_states  20,872,687  155  
134,662   0.14s   0.29%
integrator_terminated_shadow_paths_array  374,100,675  438  
854,111   0.16s   0.33%
integrator_compact_shadow_paths_array 503,768,657  438
1,150,156   0.05s   0.10%
integrator_compact_shadow_states   37,664,941  202  
186,460   0.23s   0.50%
integrator_reset   25,165,8246
4,194,304   0.06s   0.12%
film_convert_combined_half_rgba 3,110,4006  
518,400   0.00s   0.01%
prefix_sum676  676  
  1   0.19s   0.40%
---
 6,760  
 47.27s 100.00%
---
```

Reviewed By: brecht

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

===

M   intern/cycles/device/metal/bvh.mm
M   intern/cycles/device/metal/device_impl.h
M   intern/cycles/device/metal/device_impl.mm
M   intern/cycles/device/metal/queue.h
M   intern/cycles/device/metal/queue.mm
M   intern/cycles/device/metal/util.h
M   intern/cycles/kernel/device/gpu/kernel.h

===

diff --git a/intern/cycles/device/metal/bvh.mm 
b/intern/cycles/device/metal/bvh.mm
index 086fbb093ba..09c4ace081e 100644
--- a/intern/cycles/device/metal/bvh.mm
+++ b/intern/cycles/device/metal/bvh.mm
@@ -11,6 +11,7 @@
 #  include "util/progress.h"
 
 #  include "device/metal/bvh.h"
+#  include "device/metal/util.h"
 
 CCL_NAMESPACE_BEGIN
 
@@ -18,6 +19,7 @@ CCL_NAMESPACE_BEGIN
 { \
   string str = string_printf(__VA_ARGS__); \
   progress.set_substatus(str); \
+  metal_printf("%s\n", str.c_str()); \
 }
 
 BVHMetal::BVHMetal(const BVHParams _,
diff --git a/intern/cycles/device/metal/device_impl.h 
b/intern/cycles/device/metal/device_impl.h
index 7506b9b069f..0e6817d94f8 100644
--- a/intern/cycles/device/metal/device_impl.h
+++ b/intern/cycles/device/metal/device_impl.h
@@ -31,6 +31,8 @@ class MetalDevice : public Device {
   string source[PSO_NUM];
   string source_md5[PSO_NUM];
 
+  bool capture_enabled = false;
+
   KernelParamsMetal launch_params = {0};
 
   /* MetalRT members --*/
diff --git a/intern/cycles/device/metal/device_impl.mm 
b/intern/cycles/device/metal/device_impl.mm
index 16aabacb4cf..086bf0af979 100644
--- a/intern/cycles/device/metal/device_impl.mm
+++ b/intern/cycles/device/metal/device_impl.mm
@@ -86,6 +86,10 @@ MetalDevice::MetalDevice(const 

[Bf-blender-cvs] [4fc7e1a8800] master: Cleanup: Correct comments

2022-06-07 Thread Hans Goudey
Commit: 4fc7e1a8800473eb67c5234ab9ec4f20713fe7c3
Author: Hans Goudey
Date:   Tue Jun 7 11:55:52 2022 +0200
Branches: master
https://developer.blender.org/rB4fc7e1a8800473eb67c5234ab9ec4f20713fe7c3

Cleanup: Correct comments

===

M   source/blender/draw/intern/draw_cache_impl_curves.cc
M   source/blender/draw/intern/draw_curves_private.h

===

diff --git a/source/blender/draw/intern/draw_cache_impl_curves.cc 
b/source/blender/draw/intern/draw_cache_impl_curves.cc
index 22b843650ca..2c07b651c7c 100644
--- a/source/blender/draw/intern/draw_cache_impl_curves.cc
+++ b/source/blender/draw/intern/draw_cache_impl_curves.cc
@@ -52,11 +52,14 @@ struct CurvesBatchCache {
 
   GPUBatch *edit_points;
 
-  /* To determine if cache is invalid. */
+  /* Whether the cache is invalid. */
   bool is_dirty;
 
-  /** Needed when updating material data (e.g. attributes) as the same curves 
might be used for
-   * multiple objects with different materials. */
+  /**
+   * The draw cache extraction is currently not multi-threaded for multiple 
objects, but if it was,
+   * some locking would be necessary because multiple objects can use the same 
curves data with
+   * different materials, etc. This is a placeholder to make multi-threading 
easier in the future.
+   */
   ThreadMutex render_mutex;
 };
 
diff --git a/source/blender/draw/intern/draw_curves_private.h 
b/source/blender/draw/intern/draw_curves_private.h
index ed4dd50dfbe..26ecc4d9d12 100644
--- a/source/blender/draw/intern/draw_curves_private.h
+++ b/source/blender/draw/intern/draw_curves_private.h
@@ -35,22 +35,26 @@ typedef struct CurvesEvalFinalCache {
   GPUVertBuf *proc_buf;
   GPUTexture *proc_tex;
 
-  /* Just contains a huge index buffer used to draw the final curves. */
+  /**Just contains a huge index buffer used to draw the final curves. */
   GPUBatch *proc_hairs[MAX_THICKRES];
 
-  /* Points per curve, at least 2. */
+  /** Points per curve, at least 2. */
   int strands_res;
 
-  /* Attributes currently being or about to be drawn. */
+  /** Attributes currently being drawn or about to be drawn. */
   DRW_Attributes attr_used;
 
-  /* Attributes which were used at some point. This is used for garbage 
collection, to remove
-   * attributes which are not used in shaders anymore due to user edits. */
+  /**
+   * Attributes that were used at some point. This is used for garbage 
collection, to remove
+   * attributes that are not used in shaders anymore due to user edits.
+   */
   DRW_Attributes attr_used_over_time;
 
-  /* Last time, in seconds, the `attr_used` and `attr_used_over_time` were 
exactly the same.
+  /**
+   * The last time in seconds that the `attr_used` and `attr_used_over_time` 
were exactly the same.
* If the delta between this time and the current scene time is greater than 
the timeout set in
-   * user preferences (`U.vbotimeout`) then garbage collection is performed. */
+   * user preferences (`U.vbotimeout`) then garbage collection is performed.
+   */
   int last_attr_matching_time;
 
   /* Output of the subdivision stage: vertex buffers sized to subdiv level. 
This is only attributes
@@ -61,7 +65,7 @@ typedef struct CurvesEvalFinalCache {
 
 /* Curves procedural display: Evaluation is done on the GPU. */
 typedef struct CurvesEvalCache {
-  /* Input control points */
+  /* Input control point positions combined with parameter data. */
   GPUVertBuf *proc_point_buf;
   GPUTexture *point_tex;
 
@@ -78,8 +82,8 @@ typedef struct CurvesEvalCache {
 
   CurvesEvalFinalCache final[MAX_HAIR_SUBDIV];
 
-  /* For point attributes, which need subdivision, these are the input data.
-   * For spline attributes, which need not subdivision, these are the final 
data. */
+  /* For point attributes, which need subdivision, these buffers contain the 
input data.
+   * For curve domain attributes, which do not need subdivision, these are the 
final data. */
   GPUVertBuf *proc_attributes_buf[GPU_MAX_ATTR];
   GPUTexture *proc_attributes_tex[GPU_MAX_ATTR];
 
@@ -89,7 +93,7 @@ typedef struct CurvesEvalCache {
 } CurvesEvalCache;
 
 /**
- * Ensure all textures and buffers needed for GPU accelerated drawing.
+ * Ensure all necessary textures and buffers exist for GPU accelerated drawing.
  */
 bool curves_ensure_procedural_data(struct Object *object,
struct CurvesEvalCache **r_hair_cache,

___
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] [dcbbdc89ead] master: Cleanup: Fix missing-braces warning in draw manager

2022-06-07 Thread Sergey Sharybin
Commit: dcbbdc89ead67a1436d565d22f07335881162730
Author: Sergey Sharybin
Date:   Tue Jun 7 10:31:28 2022 +0200
Branches: master
https://developer.blender.org/rBdcbbdc89ead67a1436d565d22f07335881162730

Cleanup: Fix missing-braces warning in draw manager

Good side effect of the change is that it makes it so that the
size of an array is more likely to be calculated at a compile time.

More ideally we'll be using bli::Array instead of the bare array,
but that is outside of the scope of this change.

===

M   source/blender/draw/intern/draw_cache_extract.hh

===

diff --git a/source/blender/draw/intern/draw_cache_extract.hh 
b/source/blender/draw/intern/draw_cache_extract.hh
index 94118be615c..c7127d169e1 100644
--- a/source/blender/draw/intern/draw_cache_extract.hh
+++ b/source/blender/draw/intern/draw_cache_extract.hh
@@ -196,8 +196,8 @@ struct MeshBatchList {
 };
 
 #define MBC_BATCH_LEN (sizeof(MeshBatchList) / sizeof(void *))
-#define MBC_VBO_LEN (sizeof((MeshBufferList{0}).vbo) / sizeof(void *))
-#define MBC_IBO_LEN (sizeof((MeshBufferList{0}).ibo) / sizeof(void *))
+#define MBC_VBO_LEN (sizeof(MeshBufferList::vbo) / sizeof(void *))
+#define MBC_IBO_LEN (sizeof(MeshBufferList::ibo) / sizeof(void *))
 
 #define MBC_BATCH_INDEX(batch) (offsetof(MeshBatchList, batch) / sizeof(void 
*))

___
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] [9ccc21dde37] master: VSE preview transform autokeying improvements

2022-06-07 Thread Philipp Oeser
Commit: 9ccc21dde372d57fa841a494d72527b30d2948d2
Author: Philipp Oeser
Date:   Wed May 25 13:00:18 2022 +0200
Branches: master
https://developer.blender.org/rB9ccc21dde372d57fa841a494d72527b30d2948d2

VSE preview transform autokeying improvements

NOTE: this patch originated in T98015 which was split into multiple
reports. While it could be split into multiple patches these are very
much related so keeping as one for now

This patch fixes the following issues:

[1] autokeying transforms in preview only creates keyframes if there is
an FCurve already
[2] autokeying transforms in preview only creates keyframes for
rotation/scale if rotating/scaling around cursor (should keyframe
position as well)
[3] autokeying transforms in preview does not work during animation
playback

For [1], a param was added to `ED_autokeyframe_property` which can tweak
its default behavior of only creating keyframes on already keyed
properties (which was fine because this is mostly called from buttons
where this behavior is desired). Callers such as gizmos (or the VSE in
our case) can use this additional param so that keyframes are also
created on "not-yet-keyframed" properties.

For [2], the pivot is checked and position properties also keyed if
necessary (which is also consistent with the way objects are keyed in
the 3DView)

For [3], `animrecord_check_state` was changed to be able to work on
scenes as well and the transform system in the VSE preview was made
aware of the screen's `animtimer`.

NOTE: there are still things to be improved for keyframing in the VSE,
the most obvious is probably a `keyframe_insert` operator (with
keyingsets)

Fixes T98429, T98430, T98431

Maniphest Tasks: T98015, T98431, T98430, T98429

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

===

M   source/blender/editors/animation/keyframing.c
M   source/blender/editors/include/ED_keyframing.h
M   source/blender/editors/interface/interface_anim.c
M   source/blender/editors/transform/transform_convert.c
M   source/blender/editors/transform/transform_convert.h
M   source/blender/editors/transform/transform_convert_armature.c
M   source/blender/editors/transform/transform_convert_object.c
M   source/blender/editors/transform/transform_convert_sequencer_image.c
M   source/blender/editors/transform/transform_generics.c
M   source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c

===

diff --git a/source/blender/editors/animation/keyframing.c 
b/source/blender/editors/animation/keyframing.c
index 941125b9ad5..9200a730072 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -3094,8 +3094,13 @@ bool ED_autokeyframe_pchan(
   return false;
 }
 
-bool ED_autokeyframe_property(
-bContext *C, Scene *scene, PointerRNA *ptr, PropertyRNA *prop, int 
rnaindex, float cfra)
+bool ED_autokeyframe_property(bContext *C,
+  Scene *scene,
+  PointerRNA *ptr,
+  PropertyRNA *prop,
+  int rnaindex,
+  float cfra,
+  const bool only_if_property_keyed)
 {
   Main *bmain = CTX_data_main(C);
   Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
@@ -3114,7 +3119,8 @@ bool ED_autokeyframe_property(
   fcu = BKE_fcurve_find_by_rna_context_ui(
   C, ptr, prop, rnaindex_check, NULL, , , );
 
-  if (fcu == NULL) {
+  /* Only early out when we actually want an existing fcurve already (e.g. 
auto-keyframing from buttons). */
+  if (fcu == NULL && (driven || special || only_if_property_keyed)) {
 return changed;
   }
 
@@ -3150,23 +3156,28 @@ bool ED_autokeyframe_property(
   ReportList *reports = CTX_wm_reports(C);
   ToolSettings *ts = scene->toolsettings;
   const eInsertKeyFlags flag = ANIM_get_keyframing_flags(scene, true);
+  char *path = RNA_path_from_ID_to_property(ptr, prop);
 
-  /* NOTE: We use rnaindex instead of fcu->array_index,
-   *   because a button may control all items of an array at once.
-   *   E.g., color wheels (see T42567). */
-  BLI_assert((fcu->array_index == rnaindex) || (rnaindex == -1));
+  if (only_if_property_keyed) {
+/* NOTE: We use rnaindex instead of fcu->array_index,
+ *   because a button may control all items of an array at once.
+ *   E.g., color wheels (see T42567). */
+BLI_assert((fcu->array_index == rnaindex) || (rnaindex == -1));
+  }
   changed = insert_keyframe(bmain,
 reports,
 id,
 action,
-((fcu->grp) ? (fcu->grp->name) : (NULL)),
-fcu->rna_path,
+   

[Bf-blender-cvs] [4580c18c56f] master: Correct error in 7c4826d9717911d31e9b60908e6d3279f997342d

2022-06-07 Thread Campbell Barton
Commit: 4580c18c56f62b1e1dbe35dd50925a21db36e506
Author: Campbell Barton
Date:   Tue Jun 7 17:41:05 2022 +1000
Branches: master
https://developer.blender.org/rB4580c18c56f62b1e1dbe35dd50925a21db36e506

Correct error in 7c4826d9717911d31e9b60908e6d3279f997342d

===

M   release/scripts/presets/keyconfig/keymap_data/blender_default.py

===

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py 
b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index f2dc0e9f69b..0d6532209ef 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -6658,6 +6658,8 @@ def km_3d_view_tool_cursor(params):
 def km_3d_view_tool_select(params, *, fallback):
 if params.use_tweak_select_passthrough:
 operator_props = (("vert_without_handles", True),)
+else:
+operator_props = ()
 
 return (
 _fallback_id("3D View Tool: Tweak", fallback),

___
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] [b77494ec616] master: Fix T98527 : corrected label for Korean language in Blender preferences

2022-06-07 Thread Joseph Faulkner
Commit: b77494ec616065851e61d1beaeee674aaf8af4a0
Author: Joseph Faulkner
Date:   Tue Jun 7 09:35:03 2022 +0200
Branches: master
https://developer.blender.org/rBb77494ec616065851e61d1beaeee674aaf8af4a0

Fix T98527 : corrected label for Korean language in Blender preferences

Patch changes label from '한국 언어' to '한국어'

Reviewed By: persun, PratikPB2123, mont29

Maniphest Tasks: T98527

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

===

M   release/scripts/modules/bl_i18n_utils/settings.py

===

diff --git a/release/scripts/modules/bl_i18n_utils/settings.py 
b/release/scripts/modules/bl_i18n_utils/settings.py
index b317eec7f06..408f8523b8d 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -56,7 +56,7 @@ LANGUAGES = (
 (21, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"),
 (22, "Bulgarian (Български)", "bg_BG"),
 (23, "Greek (Ελληνικά)", "el_GR"),
-(24, "Korean (한국 언어)", "ko_KR"),
+(24, "Korean (한국어)", "ko_KR"),
 (25, "Nepali (नेपाली)", "ne_NP"),
 # Using the utf8 flipped form of Persian (فارسی).
 (26, "Persian (ﯽﺳﺭﺎﻓ)", "fa_IR"),

___
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] [7c4826d9717] master: Fix T98552: Experimental Tweak Select: Curve handle tweak is difficult

2022-06-07 Thread Campbell Barton
Commit: 7c4826d9717911d31e9b60908e6d3279f997342d
Author: Campbell Barton
Date:   Tue Jun 7 16:52:53 2022 +1000
Branches: master
https://developer.blender.org/rB7c4826d9717911d31e9b60908e6d3279f997342d

Fix T98552: Experimental Tweak Select: Curve handle tweak is difficult

The previous fix [0] only resolved the issue for RMB select,
this works for the tweak tool with LMB select.

[0]: 0f73a27b76d789df04158905cba65dec0881bf12

===

M   release/scripts/presets/keyconfig/keymap_data/blender_default.py

===

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py 
b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 1cdb2c8e679..f2dc0e9f69b 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -463,6 +463,7 @@ def _template_items_tool_select(
 # Always use the cursor operator where possible,
 # needed for time-line views where we always want to be able to scrub 
time.
 cursor_prioritize=False,
+operator_props=(),
 fallback=False,
 ):
 if not params.legacy and not fallback:
@@ -479,11 +480,11 @@ def _template_items_tool_select(
 if select_passthrough:
 return [
 (operator, {"type": 'LEFTMOUSE', "value": 'PRESS'},
- {"properties": [("deselect_all", True), 
("select_passthrough", True)]}),
+ {"properties": [("deselect_all", True), 
("select_passthrough", True), *operator_props]}),
 (operator, {"type": 'LEFTMOUSE', "value": 'CLICK'},
- {"properties": [("deselect_all", True)]}),
+ {"properties": [("deselect_all", True), *operator_props]}),
 (operator, {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": 
True},
- {"properties": [("deselect_all", False), ("toggle", True)]}),
+ {"properties": [("deselect_all", False), ("toggle", True), 
*operator_props]}),
 ("transform.translate", {"type": 'LEFTMOUSE', "value": 
'CLICK_DRAG'},
  {"properties": [("release_confirm", True)]}),
 ]
@@ -497,9 +498,9 @@ def _template_items_tool_select(
 # the tool without selecting elements under the cursor.
 return [
 (operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 
'PRESS'},
- {"properties": [("deselect_all", True)]}),
+ {"properties": [("deselect_all", True), *operator_props]}),
 (operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 
'PRESS', "shift": True},
- {"properties": [("toggle", True)]}),
+ {"properties": [("toggle", True), *operator_props]}),
 
 # Fallback key-map must transform as the primary tool is expected
 # to be accessed via gizmos in this case. See: T96885.
@@ -6655,12 +6656,15 @@ def km_3d_view_tool_cursor(params):
 
 
 def km_3d_view_tool_select(params, *, fallback):
+if params.use_tweak_select_passthrough:
+operator_props = (("vert_without_handles", True),)
+
 return (
 _fallback_id("3D View Tool: Tweak", fallback),
 {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
 {"items": [
 *([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else 
_template_items_tool_select(
-params, "view3d.select", "view3d.cursor3d", 
fallback=fallback)),
+params, "view3d.select", "view3d.cursor3d", 
operator_props=operator_props, fallback=fallback)),
 *([] if (not params.use_fallback_tool_rmb) else 
_template_view3d_select(
 type=params.select_mouse,
 value=params.select_mouse_value,

___
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] [99847cd6423] master: OBJ: Use filename as the default object name

2022-06-07 Thread Jesse Yurkovich
Commit: 99847cd642385105e06a486200d377a682b597a0
Author: Jesse Yurkovich
Date:   Mon Jun 6 22:34:06 2022 -0700
Branches: master
https://developer.blender.org/rB99847cd642385105e06a486200d377a682b597a0

OBJ: Use filename as the default object name

To match the existing Python .obj importer, and to make it easier for
the user to determine which object is which, use the filename for the
default object name instead of "New object".

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

===

M   source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
M   source/blender/io/wavefront_obj/tests/obj_importer_tests.cc

===

diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc 
b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
index c7990028312..a627e7261e3 100644
--- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
+++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
@@ -343,9 +343,14 @@ void OBJParser::parse(Vector> 
_all_geometries,
 return;
   }
 
+  /* Use the filename as the default name given to the initial object. */
+  char ob_name[FILE_MAXFILE];
+  BLI_strncpy(ob_name, BLI_path_basename(import_params_.filepath), 
FILE_MAXFILE);
+  BLI_path_extension_replace(ob_name, FILE_MAXFILE, "");
+
   VertexIndexOffset offsets;
   Geometry *curr_geom = create_geometry(
-  nullptr, GEOM_MESH, "", r_global_vertices, r_all_geometries, offsets);
+  nullptr, GEOM_MESH, ob_name, r_global_vertices, r_all_geometries, 
offsets);
 
   /* State variables: once set, they remain the same for the remaining
* elements in the object. */
diff --git a/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc 
b/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc
index 48990975416..235e9ac77e6 100644
--- a/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc
+++ b/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc
@@ -133,7 +133,7 @@ TEST_F(obj_importer_test, import_cube)
 {
   Expectation expect[] = {
   {"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
-  {"OBNew object",
+  {"OBcube",
OB_MESH,
8,
12,
@@ -168,7 +168,7 @@ TEST_F(obj_importer_test, import_nurbs)
 {
   Expectation expect[] = {
   {"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
-  {"OBNew object",
+  {"OBnurbs",
OB_CURVES_LEGACY,
12,
0,
@@ -184,7 +184,7 @@ TEST_F(obj_importer_test, import_nurbs_curves)
 {
   Expectation expect[] = {
   {"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
-  {"OBNew object", OB_CURVES_LEGACY, 4, 0, 4, 0, float3(2, -2, 0), 
float3(-2, -2, 0)},
+  {"OBnurbs_curves", OB_CURVES_LEGACY, 4, 0, 4, 0, float3(2, -2, 0), 
float3(-2, -2, 0)},
   {"OBNurbsCurveDiffWeights",
OB_CURVES_LEGACY,
4,
@@ -211,7 +211,7 @@ TEST_F(obj_importer_test, import_nurbs_cyclic)
 {
   Expectation expect[] = {
   {"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
-  {"OBNew object",
+  {"OBnurbs_cyclic",
OB_CURVES_LEGACY,
31,
0,
@@ -262,7 +262,7 @@ TEST_F(obj_importer_test, import_materials)
 {
   Expectation expect[] = {
   {"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
-  {"OBNew object", OB_MESH, 8, 12, 6, 24, float3(-1, -1, 1), float3(1, -1, 
-1)},
+  {"OBmaterials", OB_MESH, 8, 12, 6, 24, float3(-1, -1, 1), float3(1, -1, 
-1)},
   };
   import_and_check("materials.obj", expect, std::size(expect), 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