[Bf-blender-cvs] [054cec404b1] master: Cleanup: use booleans

2022-08-25 Thread Campbell Barton
Commit: 054cec404b1b9852892613acf18bf0fbd4ff2e16
Author: Campbell Barton
Date:   Fri Aug 26 15:57:43 2022 +1000
Branches: master
https://developer.blender.org/rB054cec404b1b9852892613acf18bf0fbd4ff2e16

Cleanup: use booleans

===

M   source/blender/blenkernel/BKE_sound.h
M   source/blender/blenkernel/intern/sound.c
M   source/blender/editors/space_sequencer/sequencer_edit.c
M   source/blender/editors/uvedit/uvedit_select.c
M   source/blender/imbuf/intern/openexr/openexr_api.cpp
M   source/blender/makesrna/intern/rna_sequencer_api.c
M   source/blender/python/BPY_extern.h
M   source/blender/python/intern/stubs.c
M   source/blender/sequencer/SEQ_edit.h
M   source/blender/sequencer/SEQ_select.h
M   source/blender/sequencer/intern/strip_edit.c
M   source/blender/sequencer/intern/strip_select.c
M   source/blender/windowmanager/intern/wm_event_system.cc
M   source/blender/windowmanager/intern/wm_window.c

===

diff --git a/source/blender/blenkernel/BKE_sound.h 
b/source/blender/blenkernel/BKE_sound.h
index 9965b6f1351..11c37a74a54 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -134,7 +134,7 @@ void *BKE_sound_add_scene_sound_defaults(struct Scene 
*scene, struct Sequence *s
 
 void BKE_sound_remove_scene_sound(struct Scene *scene, void *handle);
 
-void BKE_sound_mute_scene_sound(void *handle, char mute);
+void BKE_sound_mute_scene_sound(void *handle, bool mute);
 
 void BKE_sound_move_scene_sound(const struct Scene *scene,
 void *handle,
diff --git a/source/blender/blenkernel/intern/sound.c 
b/source/blender/blenkernel/intern/sound.c
index f459b5a82ac..bb0e7a4dd6b 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -756,7 +756,7 @@ void BKE_sound_remove_scene_sound(Scene *scene, void 
*handle)
   AUD_Sequence_remove(scene->sound_scene, handle);
 }
 
-void BKE_sound_mute_scene_sound(void *handle, char mute)
+void BKE_sound_mute_scene_sound(void *handle, bool mute)
 {
   AUD_SequenceEntry_setMuted(handle, mute);
 }
@@ -1346,7 +1346,7 @@ void *BKE_sound_add_scene_sound_defaults(Scene 
*UNUSED(scene), Sequence *UNUSED(
 void BKE_sound_remove_scene_sound(Scene *UNUSED(scene), void *UNUSED(handle))
 {
 }
-void BKE_sound_mute_scene_sound(void *UNUSED(handle), char UNUSED(mute))
+void BKE_sound_mute_scene_sound(void *UNUSED(handle), bool UNUSED(mute))
 {
 }
 void BKE_sound_move_scene_sound(const Scene *UNUSED(scene),
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c 
b/source/blender/editors/space_sequencer/sequencer_edit.c
index 9313e45a1d4..7f23df4c94f 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2637,12 +2637,12 @@ static int sequencer_swap_data_exec(bContext *C, 
wmOperator *op)
   Sequence *seq_other;
   const char *error_msg;
 
-  if (SEQ_select_active_get_pair(scene, _act, _other) == 0) {
+  if (SEQ_select_active_get_pair(scene, _act, _other) == false) {
 BKE_report(op->reports, RPT_ERROR, "Please select two strips");
 return OPERATOR_CANCELLED;
   }
 
-  if (SEQ_edit_sequence_swap(scene, seq_act, seq_other, _msg) == 0) {
+  if (SEQ_edit_sequence_swap(scene, seq_act, seq_other, _msg) == false) {
 BKE_report(op->reports, RPT_ERROR, error_msg);
 return OPERATOR_CANCELLED;
   }
diff --git a/source/blender/editors/uvedit/uvedit_select.c 
b/source/blender/editors/uvedit/uvedit_select.c
index 8fc97dbe0ce..cecf0ff7914 100644
--- a/source/blender/editors/uvedit/uvedit_select.c
+++ b/source/blender/editors/uvedit/uvedit_select.c
@@ -3712,9 +3712,9 @@ void UV_OT_select_box(wmOperatorType *ot)
 /** \name Circle Select Operator
  * \{ */
 
-static int uv_circle_select_is_point_inside(const float uv[2],
-const float offset[2],
-const float ellipse[2])
+static bool uv_circle_select_is_point_inside(const float uv[2],
+ const float offset[2],
+ const float ellipse[2])
 {
   /* normalized ellipse: ell[0] = scaleX, ell[1] = scaleY */
   const float co[2] = {
@@ -3724,10 +3724,10 @@ static int uv_circle_select_is_point_inside(const float 
uv[2],
   return len_squared_v2(co) < 1.0f;
 }
 
-static int uv_circle_select_is_edge_inside(const float uv_a[2],
-   const float uv_b[2],
-   const float offset[2],
-   const float ellipse[2])
+static bool uv_circle_select_is_edge_inside(const float uv_a[2],
+const float uv_b[2],
+

[Bf-blender-cvs] [6bf2c73249b] master: Cleanup: quiet GCC array bounds warning

2022-08-25 Thread Campbell Barton
Commit: 6bf2c73249bd44af49274ae3138a47ebff50be62
Author: Campbell Barton
Date:   Fri Aug 26 15:06:33 2022 +1000
Branches: master
https://developer.blender.org/rB6bf2c73249bd44af49274ae3138a47ebff50be62

Cleanup: quiet GCC array bounds warning

===

M   source/blender/blenkernel/BKE_paint.h
M   source/blender/blenkernel/intern/paint.cc

===

diff --git a/source/blender/blenkernel/BKE_paint.h 
b/source/blender/blenkernel/BKE_paint.h
index 202ff4514d2..92b1aacc300 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -60,10 +60,10 @@ struct bContext;
 struct bToolRef;
 struct tPaletteColorHSV;
 
-extern const char PAINT_CURSOR_SCULPT[3];
-extern const char PAINT_CURSOR_VERTEX_PAINT[3];
-extern const char PAINT_CURSOR_WEIGHT_PAINT[3];
-extern const char PAINT_CURSOR_TEXTURE_PAINT[3];
+extern const uchar PAINT_CURSOR_SCULPT[3];
+extern const uchar PAINT_CURSOR_VERTEX_PAINT[3];
+extern const uchar PAINT_CURSOR_WEIGHT_PAINT[3];
+extern const uchar PAINT_CURSOR_TEXTURE_PAINT[3];
 
 typedef enum ePaintMode {
   PAINT_MODE_SCULPT = 0,
@@ -158,7 +158,7 @@ struct PaintCurve *BKE_paint_curve_add(struct Main *bmain, 
const char *name);
  * Call when entering each respective paint mode.
  */
 bool BKE_paint_ensure(struct ToolSettings *ts, struct Paint **r_paint);
-void BKE_paint_init(struct Main *bmain, struct Scene *sce, ePaintMode mode, 
const char col[3]);
+void BKE_paint_init(struct Main *bmain, struct Scene *sce, ePaintMode mode, 
const uchar col[3]);
 void BKE_paint_free(struct Paint *p);
 /**
  * Called when copying scene settings, so even if 'src' and 'tar' are the same 
still do a
diff --git a/source/blender/blenkernel/intern/paint.cc 
b/source/blender/blenkernel/intern/paint.cc
index 83a6ce72b2f..8c3f3d7bedc 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -216,10 +216,10 @@ IDTypeInfo IDType_ID_PC = {
 /* lib_override_apply_post */ nullptr,
 };
 
-const char PAINT_CURSOR_SCULPT[3] = {255, 100, 100};
-const char PAINT_CURSOR_VERTEX_PAINT[3] = {255, 255, 255};
-const char PAINT_CURSOR_WEIGHT_PAINT[3] = {200, 200, 255};
-const char PAINT_CURSOR_TEXTURE_PAINT[3] = {255, 255, 255};
+const uchar PAINT_CURSOR_SCULPT[3] = {255, 100, 100};
+const uchar PAINT_CURSOR_VERTEX_PAINT[3] = {255, 255, 255};
+const uchar PAINT_CURSOR_WEIGHT_PAINT[3] = {200, 200, 255};
+const uchar PAINT_CURSOR_TEXTURE_PAINT[3] = {255, 255, 255};
 
 static ePaintOverlayControlFlags overlay_flags = (ePaintOverlayControlFlags)0;
 
@@ -1128,7 +1128,7 @@ bool BKE_paint_ensure(ToolSettings *ts, Paint **r_paint)
   return false;
 }
 
-void BKE_paint_init(Main *bmain, Scene *sce, ePaintMode mode, const char 
col[3])
+void BKE_paint_init(Main *bmain, Scene *sce, ePaintMode mode, const uchar 
col[3])
 {
   UnifiedPaintSettings *ups = >toolsettings->unified_paint_settings;
   Paint *paint = BKE_paint_get_active_from_paintmode(sce, mode);
@@ -1149,7 +1149,7 @@ void BKE_paint_init(Main *bmain, Scene *sce, ePaintMode 
mode, const char col[3])
 }
   }
 
-  memcpy(paint->paint_cursor_col, col, 3);
+  copy_v3_v3_uchar(paint->paint_cursor_col, col);
   paint->paint_cursor_col[3] = 128;
   ups->last_stroke_valid = false;
   zero_v3(ups->average_stroke_accum);

___
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] [a66757f1305] tmp_libupdate_34: Merge remote-tracking branch 'origin/master' into tmp_libupdate_34

2022-08-25 Thread Ray Molenkamp
Commit: a66757f130560e190a9cb40cc1e0330c83162a28
Author: Ray Molenkamp
Date:   Thu Aug 25 23:02:26 2022 -0600
Branches: tmp_libupdate_34
https://developer.blender.org/rBa66757f130560e190a9cb40cc1e0330c83162a28

Merge remote-tracking branch 'origin/master' into tmp_libupdate_34

===



===



___
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] [5bd4aea29c0] master: Cleanup: use matching function signatures for RNA callbacks

2022-08-25 Thread Campbell Barton
Commit: 5bd4aea29c00a2d56df7d873764cc3a380ac9e9e
Author: Campbell Barton
Date:   Fri Aug 26 14:37:16 2022 +1000
Branches: master
https://developer.blender.org/rB5bd4aea29c00a2d56df7d873764cc3a380ac9e9e

Cleanup: use matching function signatures for RNA callbacks

Use matching int/float/boo types for RNA callbacks.

===

M   source/blender/makesrna/intern/rna_ID.c
M   source/blender/makesrna/intern/rna_brush.c
M   source/blender/makesrna/intern/rna_depsgraph.c
M   source/blender/makesrna/intern/rna_material.c
M   source/blender/makesrna/intern/rna_mesh.c
M   source/blender/makesrna/intern/rna_object.c
M   source/blender/makesrna/intern/rna_particle.c
M   source/blender/makesrna/intern/rna_rna.c
M   source/blender/makesrna/intern/rna_sequencer.c
M   source/blender/makesrna/intern/rna_space.c
M   source/blender/makesrna/intern/rna_ui.c
M   source/blender/makesrna/intern/rna_wm_gizmo.c
M   source/blender/makesrna/intern/rna_workspace.c

===

diff --git a/source/blender/makesrna/intern/rna_ID.c 
b/source/blender/makesrna/intern/rna_ID.c
index c59e45e1b01..d31a312816a 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -322,7 +322,7 @@ int rna_ID_name_full_length(PointerRNA *ptr)
   return strlen(name);
 }
 
-static int rna_ID_is_evaluated_get(PointerRNA *ptr)
+static bool rna_ID_is_evaluated_get(PointerRNA *ptr)
 {
   ID *id = (ID *)ptr->data;
 
diff --git a/source/blender/makesrna/intern/rna_brush.c 
b/source/blender/makesrna/intern/rna_brush.c
index e0d55050c63..82eb390df52 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -765,11 +765,11 @@ static void rna_Brush_set_size(PointerRNA *ptr, int value)
   brush->size = value;
 }
 
-static void rna_Brush_use_gradient_set(PointerRNA *ptr, bool value)
+static void rna_Brush_use_gradient_set(PointerRNA *ptr, int value)
 {
   Brush *br = (Brush *)ptr->data;
 
-  if (value) {
+  if (value & BRUSH_USE_GRADIENT) {
 br->flag |= BRUSH_USE_GRADIENT;
   }
   else {
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c 
b/source/blender/makesrna/intern/rna_depsgraph.c
index f0d26362cad..ff107d0b833 100644
--- a/source/blender/makesrna/intern/rna_depsgraph.c
+++ b/source/blender/makesrna/intern/rna_depsgraph.c
@@ -67,7 +67,7 @@ static PointerRNA 
rna_DepsgraphObjectInstance_object_get(PointerRNA *ptr)
   return rna_pointer_inherit_refine(ptr, _Object, di->iter.current);
 }
 
-static int rna_DepsgraphObjectInstance_is_instance_get(PointerRNA *ptr)
+static bool rna_DepsgraphObjectInstance_is_instance_get(PointerRNA *ptr)
 {
   RNA_DepsgraphIterator *di = ptr->data;
   DEGObjectIterData *deg_iter = (DEGObjectIterData *)di->iter.data;
@@ -137,12 +137,12 @@ static void 
rna_DepsgraphObjectInstance_persistent_id_get(PointerRNA *ptr, int *
   }
 }
 
-static unsigned int rna_DepsgraphObjectInstance_random_id_get(PointerRNA *ptr)
+static int rna_DepsgraphObjectInstance_random_id_get(PointerRNA *ptr)
 {
   RNA_DepsgraphIterator *di = ptr->data;
   DEGObjectIterData *deg_iter = (DEGObjectIterData *)di->iter.data;
   if (deg_iter->dupli_object_current != NULL) {
-return deg_iter->dupli_object_current->random_id;
+return (int)deg_iter->dupli_object_current->random_id;
   }
   else {
 return 0;
diff --git a/source/blender/makesrna/intern/rna_material.c 
b/source/blender/makesrna/intern/rna_material.c
index 4a9bc608598..252d2e657b5 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -367,13 +367,13 @@ static char *rna_GpencilColorData_path(const PointerRNA 
*UNUSED(ptr))
   return BLI_strdup("grease_pencil");
 }
 
-static int rna_GpencilColorData_is_stroke_visible_get(PointerRNA *ptr)
+static bool rna_GpencilColorData_is_stroke_visible_get(PointerRNA *ptr)
 {
   MaterialGPencilStyle *pcolor = ptr->data;
   return (pcolor->stroke_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH);
 }
 
-static int rna_GpencilColorData_is_fill_visible_get(PointerRNA *ptr)
+static bool rna_GpencilColorData_is_fill_visible_get(PointerRNA *ptr)
 {
   MaterialGPencilStyle *pcolor = (MaterialGPencilStyle *)ptr->data;
   return ((pcolor->fill_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) || 
(pcolor->fill_style > 0));
diff --git a/source/blender/makesrna/intern/rna_mesh.c 
b/source/blender/makesrna/intern/rna_mesh.c
index cd7badae80d..31c2177dd26 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -801,7 +801,7 @@ static bool rna_MPoly_freestyle_face_mark_get(PointerRNA 
*ptr)
   return ffa && (ffa->flag & FREESTYLE_FACE_MARK) != 0;
 }
 
-static void rna_MPoly_freestyle_face_mark_set(PointerRNA *ptr, int value)
+static void rna_MPoly_freestyle_face_mark_set(PointerRNA *ptr, bool value)
 {
   Mesh *me = 

[Bf-blender-cvs] [e77ac31799c] master: makesrna: type check bool/int/float/enum get/set callbacks

2022-08-25 Thread Campbell Barton
Commit: e77ac31799c17677be03f5464cec49dd8d5e2c59
Author: Campbell Barton
Date:   Fri Aug 26 14:43:16 2022 +1000
Branches: master
https://developer.blender.org/rBe77ac31799c17677be03f5464cec49dd8d5e2c59

makesrna: type check bool/int/float/enum get/set callbacks

While converting types from callbacks isn't a bug, it's unlikely
we ever want to do this on purpose and can hide mistakes such as
silently converting floating point values to ints as happened
with Sequencer.frame_start.

===

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

===

diff --git a/source/blender/makesrna/intern/makesrna.c 
b/source/blender/makesrna/intern/makesrna.c
index 2b24bd0b39c..a7b8488c371 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -826,7 +826,23 @@ static char *rna_def_property_get_func(
 fprintf(f, "{\n");
 
 if (manualfunc) {
-  fprintf(f, "%s(ptr, values);\n", manualfunc);
+  /* Assign `fn` to ensure function signatures match. */
+  if (prop->type == PROP_BOOLEAN) {
+fprintf(f, "PropBooleanArrayGetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, values);\n");
+  }
+  else if (prop->type == PROP_INT) {
+fprintf(f, "PropIntArrayGetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, values);\n");
+  }
+  else if (prop->type == PROP_FLOAT) {
+fprintf(f, "PropFloatArrayGetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, values);\n");
+  }
+  else {
+BLI_assert_unreachable(); /* Valid but should be handled by type 
checks. */
+fprintf(f, "%s(ptr, values);\n", manualfunc);
+  }
 }
 else {
   rna_print_data_get(f, dp);
@@ -902,7 +918,27 @@ static char *rna_def_property_get_func(
 fprintf(f, "{\n");
 
 if (manualfunc) {
-  fprintf(f, "return %s(ptr);\n", manualfunc);
+  /* Assign `fn` to ensure function signatures match. */
+  if (prop->type == PROP_BOOLEAN) {
+fprintf(f, "PropBooleanGetFunc fn = %s;\n", manualfunc);
+fprintf(f, "return fn(ptr);\n");
+  }
+  else if (prop->type == PROP_INT) {
+fprintf(f, "PropIntGetFunc fn = %s;\n", manualfunc);
+fprintf(f, "return fn(ptr);\n");
+  }
+  else if (prop->type == PROP_FLOAT) {
+fprintf(f, "PropFloatGetFunc fn = %s;\n", manualfunc);
+fprintf(f, "return fn(ptr);\n");
+  }
+  else if (prop->type == PROP_ENUM) {
+fprintf(f, "PropEnumGetFunc fn = %s;\n", manualfunc);
+fprintf(f, "return fn(ptr);\n");
+  }
+  else {
+BLI_assert_unreachable(); /* Valid but should be handled by type 
checks. */
+fprintf(f, "return %s(ptr);\n", manualfunc);
+  }
 }
 else {
   rna_print_data_get(f, dp);
@@ -1197,7 +1233,23 @@ static char *rna_def_property_set_func(
 fprintf(f, "{\n");
 
 if (manualfunc) {
-  fprintf(f, "%s(ptr, values);\n", manualfunc);
+  /* Assign `fn` to ensure function signatures match. */
+  if (prop->type == PROP_BOOLEAN) {
+fprintf(f, "PropBooleanArraySetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, values);\n");
+  }
+  else if (prop->type == PROP_INT) {
+fprintf(f, "PropIntArraySetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, values);\n");
+  }
+  else if (prop->type == PROP_FLOAT) {
+fprintf(f, "PropFloatArraySetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, values);\n");
+  }
+  else {
+BLI_assert_unreachable(); /* Valid but should be handled by type 
checks. */
+fprintf(f, "%s(ptr, values);\n", manualfunc);
+  }
 }
 else {
   rna_print_data_get(f, dp);
@@ -1289,7 +1341,27 @@ static char *rna_def_property_set_func(
 fprintf(f, "{\n");
 
 if (manualfunc) {
-  fprintf(f, "%s(ptr, value);\n", manualfunc);
+  /* Assign `fn` to ensure function signatures match. */
+  if (prop->type == PROP_BOOLEAN) {
+fprintf(f, "PropBooleanSetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, value);\n");
+  }
+  else if (prop->type == PROP_INT) {
+fprintf(f, "PropIntSetFunc fn = %s;\n", manualfunc);
+fprintf(f, "fn(ptr, value);\n");
+  }
+  else if (prop->type == PROP_FLOAT) {
+fprintf(f, "PropFloatSetFunc fn = %s;\n", manualfunc);
+fprintf(f, "

[Bf-blender-cvs] [4a0dd1d4352] master: Merge branch 'blender-v3.3-release'

2022-08-25 Thread Campbell Barton
Commit: 4a0dd1d4352c4a0573fd3887a8163deeafd3464c
Author: Campbell Barton
Date:   Fri Aug 26 14:26:55 2022 +1000
Branches: master
https://developer.blender.org/rB4a0dd1d4352c4a0573fd3887a8163deeafd3464c

Merge branch 'blender-v3.3-release'

===



===



___
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] [65cd2652357] master: CMake: disable IME for lite configuration

2022-08-25 Thread Campbell Barton
Commit: 65cd26523579f73d6fcae21137853d282fea8f1b
Author: Campbell Barton
Date:   Fri Aug 26 13:28:45 2022 +1000
Branches: master
https://developer.blender.org/rB65cd26523579f73d6fcae21137853d282fea8f1b

CMake: disable IME for lite configuration

===

M   build_files/cmake/config/blender_lite.cmake

===

diff --git a/build_files/cmake/config/blender_lite.cmake 
b/build_files/cmake/config/blender_lite.cmake
index c98dfe27285..060fcc0638b 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -35,6 +35,7 @@ set(WITH_IMAGE_OPENEXR   OFF CACHE BOOL "" FORCE)
 set(WITH_IMAGE_OPENJPEG  OFF CACHE BOOL "" FORCE)
 set(WITH_IMAGE_TIFF  OFF CACHE BOOL "" FORCE)
 set(WITH_IMAGE_WEBP  OFF CACHE BOOL "" FORCE)
+set(WITH_INPUT_IME   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)

___
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] [c9723d9464a] blender-v3.3-release: Fix Sequence.frame_start being rounded to int when assigned

2022-08-25 Thread Campbell Barton
Commit: c9723d9464a3bd16b3a8d425eded285ac92889b8
Author: Campbell Barton
Date:   Fri Aug 26 14:22:58 2022 +1000
Branches: blender-v3.3-release
https://developer.blender.org/rBc9723d9464a3bd16b3a8d425eded285ac92889b8

Fix Sequence.frame_start being rounded to int when assigned

===

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

===

diff --git a/source/blender/makesrna/intern/rna_sequencer.c 
b/source/blender/makesrna/intern/rna_sequencer.c
index 3bcd9cd0441..96a295244ff 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -346,7 +346,7 @@ static void rna_Sequence_end_frame_final_set(PointerRNA 
*ptr, int value)
   SEQ_relations_invalidate_cache_composite(scene, seq);
 }
 
-static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
+static void rna_Sequence_start_frame_set(PointerRNA *ptr, float value)
 {
   Sequence *seq = (Sequence *)ptr->data;
   Scene *scene = (Scene *)ptr->owner_id;

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


[Bf-blender-cvs] [4c1c545efaa] refactor-mesh-uv-map-generic: Merge branch 'master' into refactor-mesh-uv-map-generic

2022-08-25 Thread Hans Goudey
Commit: 4c1c545efaa15e16ee8d3c0c4ba586a5cde7626b
Author: Hans Goudey
Date:   Thu Aug 25 21:57:43 2022 -0500
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB4c1c545efaa15e16ee8d3c0c4ba586a5cde7626b

Merge branch 'master' into refactor-mesh-uv-map-generic

===



===



___
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] [6fc7b37583a] master: Cleanup: reduce variable scope

2022-08-25 Thread Campbell Barton
Commit: 6fc7b37583a2fa0815ae50b8c604f823d863cab1
Author: Campbell Barton
Date:   Fri Aug 26 12:51:46 2022 +1000
Branches: master
https://developer.blender.org/rB6fc7b37583a2fa0815ae50b8c604f823d863cab1

Cleanup: reduce variable scope

===

M   source/blender/blenkernel/intern/particle_child.c
M   source/blender/blenkernel/intern/tracking_detect.c
M   source/blender/blenlib/intern/string_utf8.c
M   source/blender/bmesh/intern/bmesh_delete.c
M   source/blender/bmesh/intern/bmesh_structure.c
M   source/blender/bmesh/operators/bmo_connect_nonplanar.c
M   source/blender/bmesh/operators/bmo_poke.c
M   source/blender/editors/transform/transform_constraints.c
M   source/blender/imbuf/intern/bmp.c
M   source/blender/imbuf/intern/readimage.c
M   source/blender/imbuf/intern/tiff.c
M   source/blender/makesrna/intern/rna_main.c
M   source/blender/modifiers/intern/MOD_shapekey.c
M   source/blender/sequencer/intern/strip_edit.c
M   source/blender/sequencer/intern/strip_transform.c
M   source/creator/creator_signals.c

===

diff --git a/source/blender/blenkernel/intern/particle_child.c 
b/source/blender/blenkernel/intern/particle_child.c
index 2720bdacb3b..a890812cfc4 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -403,7 +403,7 @@ void do_kink(ParticleKey *state,
  float obmat[4][4],
  int smooth_start)
 {
-  float kink[3] = {1.0f, 0.0f, 0.0f}, par_vec[3], q1[4] = {1.0f, 0.0f, 0.0f, 
0.0f};
+  float kink[3] = {1.0f, 0.0f, 0.0f}, par_vec[3];
   float t, dt = 1.0f, result[3];
 
   if (ELEM(type, PART_KINK_NO, PART_KINK_SPIRAL)) {
@@ -453,6 +453,7 @@ void do_kink(ParticleKey *state,
   switch (type) {
 case PART_KINK_CURL: {
   float curl_offset[3];
+  float q1[4] = {1.0f, 0.0f, 0.0f, 0.0f};
 
   /* rotate kink vector around strand tangent */
   mul_v3_v3fl(curl_offset, kink, amplitude);
diff --git a/source/blender/blenkernel/intern/tracking_detect.c 
b/source/blender/blenkernel/intern/tracking_detect.c
index 51ffce4a3e3..540f880905d 100644
--- a/source/blender/blenkernel/intern/tracking_detect.c
+++ b/source/blender/blenkernel/intern/tracking_detect.c
@@ -81,7 +81,6 @@ static void detect_retrieve_libmv_features(MovieTracking 
*tracking,
 
   a = libmv_countFeatures(features);
   while (a--) {
-MovieTrackingTrack *track;
 double x, y, size, score;
 bool ok = true;
 float xu, yu;
@@ -99,7 +98,8 @@ static void detect_retrieve_libmv_features(MovieTracking 
*tracking,
 }
 
 if (ok) {
-  track = BKE_tracking_track_add(tracking, tracksbase, xu, yu, framenr, 
width, height);
+  MovieTrackingTrack *track = BKE_tracking_track_add(
+  tracking, tracksbase, xu, yu, framenr, width, height);
   track->flag |= SELECT;
   track->pat_flag |= SELECT;
   track->search_flag |= SELECT;
diff --git a/source/blender/blenlib/intern/string_utf8.c 
b/source/blender/blenlib/intern/string_utf8.c
index 992a07b2062..17fb451e422 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -786,9 +786,9 @@ int BLI_str_utf8_offset_to_column(const char *str, int 
offset)
 
 int BLI_str_utf8_offset_from_column(const char *str, int column)
 {
-  int offset = 0, pos = 0, col;
+  int offset = 0, pos = 0;
   while (*(str + offset) && pos < column) {
-col = BLI_str_utf8_char_width_safe(str + offset);
+const int col = BLI_str_utf8_char_width_safe(str + offset);
 if (pos + col > column) {
   break;
 }
diff --git a/source/blender/bmesh/intern/bmesh_delete.c 
b/source/blender/bmesh/intern/bmesh_delete.c
index e2436e53099..8ec7dc410d0 100644
--- a/source/blender/bmesh/intern/bmesh_delete.c
+++ b/source/blender/bmesh/intern/bmesh_delete.c
@@ -86,7 +86,6 @@ void BMO_mesh_delete_oflag_tagged(BMesh *bm, const short 
oflag, const char htype
 void BMO_mesh_delete_oflag_context(BMesh *bm, const short oflag, const int 
type)
 {
   BMEdge *e;
-  BMFace *f;
 
   BMIter eiter;
   BMIter fiter;
@@ -128,6 +127,7 @@ void BMO_mesh_delete_oflag_context(BMesh *bm, const short 
oflag, const int type)
 case DEL_FACES:
 case DEL_FACES_KEEP_BOUNDARY: {
   /* go through and mark all edges and all verts of all faces for delete */
+  BMFace *f;
   BM_ITER_MESH (f, , bm, BM_FACES_OF_MESH) {
 if (BMO_face_flag_test(bm, f, oflag)) {
   BMLoop *l_first = BM_FACE_FIRST_LOOP(f);
@@ -257,8 +257,6 @@ void BM_mesh_delete_hflag_tagged(BMesh *bm, const char 
hflag, const char htype)
 
 void BM_mesh_delete_hflag_context(BMesh *bm, const char hflag, const int type)
 {
-  BMEdge *e;
-  BMFace *f;
 
   BMIter eiter;
   BMIter fiter;
@@ -271,6 +269,7 @@ void BM_mesh_delete_hflag_context(BMesh *bm, const char 
hflag, const int type)
 }
 case 

[Bf-blender-cvs] [a3e1a9e2aac] master: Cleanup: spelling in comments, format

2022-08-25 Thread Campbell Barton
Commit: a3e1a9e2aace26a71c2698cd96ce4086db25e94d
Author: Campbell Barton
Date:   Fri Aug 26 12:45:20 2022 +1000
Branches: master
https://developer.blender.org/rBa3e1a9e2aace26a71c2698cd96ce4086db25e94d

Cleanup: spelling in comments, format

===

M   intern/cycles/util/hash.h
M   intern/ghost/intern/GHOST_SystemWin32.cpp
M   source/blender/blenfont/intern/blf_font.c
M   source/blender/blenkernel/BKE_curves.hh
M   source/blender/blenkernel/intern/mesh.cc
M   source/blender/draw/intern/DRW_render.h
M   source/blender/editors/interface/interface_intern.h
M   source/blender/editors/object/object_vgroup.cc

===

diff --git a/intern/cycles/util/hash.h b/intern/cycles/util/hash.h
index 61705276a90..351b8796be7 100644
--- a/intern/cycles/util/hash.h
+++ b/intern/cycles/util/hash.h
@@ -378,7 +378,7 @@ ccl_device_inline avxi hash_avxi4(avxi kx, avxi ky, avxi 
kz, avxi kw)
 
 /* * Hash Prospector Hash Functions *
  *
- * These are based on the high-quality 32-bit hash/mixings functions from
+ * These are based on the high-quality 32-bit hash/mixing functions from
  * https://github.com/skeeto/hash-prospector
  */
 
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp 
b/intern/ghost/intern/GHOST_SystemWin32.cpp
index ddbe8b67742..31483377c73 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1101,7 +1101,7 @@ GHOST_EventCursor 
*GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *wind
   if (window->getCursorGrabModeIsWarp()) {
 /* WORKAROUND:
  * Sometimes Windows ignores `SetCursorPos()` or `SendInput()` calls or 
the mouse event is
- * outdate. Identify these cases by checking if the cursor is not yet 
within bounds. */
+ * outdated. Identify these cases by checking if the cursor is not yet 
within bounds. */
 static bool is_warping_x = false;
 static bool is_warping_y = false;
 
diff --git a/source/blender/blenfont/intern/blf_font.c 
b/source/blender/blenfont/intern/blf_font.c
index a9bc1bc55fe..8941eb01d3a 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -20,7 +20,7 @@
 #include FT_CACHE_H /* FreeType Cache. */
 #include FT_GLYPH_H
 #include FT_MULTIPLE_MASTERS_H /* Variable font support. */
-#include FT_TRUETYPE_IDS_H /* Codepoint coverage constants. */
+#include FT_TRUETYPE_IDS_H /* Code-point coverage constants. */
 #include FT_TRUETYPE_TABLES_H  /* For TT_OS2 */
 
 #include "MEM_guardedalloc.h"
diff --git a/source/blender/blenkernel/BKE_curves.hh 
b/source/blender/blenkernel/BKE_curves.hh
index 8d17fe56156..4b0fc293b54 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -572,8 +572,8 @@ struct Insertion {
  * Compute the insertion of a control point and handles in a Bezier segment 
without changing its
  * shape.
  * \param parameter: Factor in from 0 to 1 defining the insertion point within 
the segment.
- * \return Inserted point paramaters including position, and both new and 
updated handles for
- * neighbouring control points.
+ * \return Inserted point parameters including position, and both new and 
updated handles for
+ * neighboring control points.
  *
  * 
  *   handle_prev handle_next
diff --git a/source/blender/blenkernel/intern/mesh.cc 
b/source/blender/blenkernel/intern/mesh.cc
index 7f2c09f049b..272dd922caa 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -249,7 +249,7 @@ static void mesh_blend_write(BlendWriter *writer, ID *id, 
const void *id_address
 Set names_to_skip;
 if (!BLO_write_is_undo(writer)) {
   BKE_mesh_legacy_convert_hide_layers_to_flags(mesh);
-  /* When converting to the old mesh format, don't save redunant 
attributes. */
+  /* When converting to the old mesh format, don't save redundant 
attributes. */
   names_to_skip.add_multiple_new({".hide_vert", ".hide_edge", 
".hide_poly"});
 }
 
diff --git a/source/blender/draw/intern/DRW_render.h 
b/source/blender/draw/intern/DRW_render.h
index a3097251d35..8745d1100e4 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -409,7 +409,7 @@ void DRW_shgroup_call_ex(DRWShadingGroup *shgroup,
  void *user_data);
 
 /**
- * If ob is NULL, unit modelmatrix is assumed and culling is bypassed.
+ * If ob is NULL, unit model-matrix is assumed and culling is bypassed.
  */
 #define DRW_shgroup_call(shgroup, geom, ob) \
   DRW_shgroup_call_ex(shgroup, ob, NULL, geom, false, NULL)
@@ -420,8 +420,8 @@ void DRW_shgroup_call_ex(DRWShadingGroup *shgroup,
 #define DRW_shgroup_call_obmat(shgroup, geom, obmat) \
   DRW_shgroup_call_ex(shgroup, NULL, obmat, geom, false, NULL)
 
-/* TODO(fclem): remove this when we have 

[Bf-blender-cvs] [ef51825c062] master: Fix incorrect UI scaling after changing monitors DPI under Wayland

2022-08-25 Thread Campbell Barton
Commit: ef51825c06242c12892337f87c82299c2996fa50
Author: Campbell Barton
Date:   Fri Aug 26 11:46:28 2022 +1000
Branches: master
https://developer.blender.org/rBef51825c06242c12892337f87c82299c2996fa50

Fix incorrect UI scaling after changing monitors DPI under Wayland

Add a GHOST_kEventWindowDPIHintChanged event to ensure the UI is
properly updated.

===

M   intern/ghost/intern/GHOST_SystemWayland.cpp
M   intern/ghost/intern/GHOST_WindowWayland.cpp

===

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp 
b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 57b1a9bb434..13357a3d31a 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -2727,8 +2727,6 @@ static void output_handle_scale(void *data, struct 
wl_output * /*wl_output*/, co
 for (GHOST_IWindow *iwin : window_manager->getWindows()) {
   GHOST_WindowWayland *win = static_cast(iwin);
   win->outputs_changed_update_scale();
-  /* TODO(@campbellbarton): support refreshing the UI when the DPI changes.
-   * There are glitches when resizing the monitor which would be nice to 
solve. */
 }
   }
 }
diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp 
b/intern/ghost/intern/GHOST_WindowWayland.cpp
index e303bd5b6aa..d06ec872eca 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.cpp
+++ b/intern/ghost/intern/GHOST_WindowWayland.cpp
@@ -935,6 +935,9 @@ GHOST_TSuccess GHOST_WindowWayland::notify_size()
  * Functionality only used for the WAYLAND implementation.
  * \{ */
 
+/**
+ * Return true when the windows scale or DPI changes.
+ */
 bool GHOST_WindowWayland::outputs_changed_update_scale()
 {
   uint32_t dpi_next;
@@ -963,6 +966,12 @@ bool GHOST_WindowWayland::outputs_changed_update_scale()
  * use a multiplier for the default DPI as workaround. */
 win->dpi = dpi_next;
 changed = true;
+
+/* As this is a low-level function, we might want adding this event to be 
optional,
+ * always add the event unless it causes issues. */
+GHOST_System *system = (GHOST_System *)GHOST_ISystem::getSystem();
+system->pushEvent(
+new GHOST_Event(system->getMilliSeconds(), 
GHOST_kEventWindowDPIHintChanged, this));
   }
 
   return changed;

___
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] [304864219c9] refactor-mesh-selection-generic: Progress

2022-08-25 Thread Hans Goudey
Commit: 304864219c9dac6243983ac57643f360b8daa55b
Author: Hans Goudey
Date:   Thu Aug 25 17:21:08 2022 -0400
Branches: refactor-mesh-selection-generic
https://developer.blender.org/rB304864219c9dac6243983ac57643f360b8daa55b

Progress

===

M   source/blender/blenkernel/intern/mball_tessellate.c
M   source/blender/blenkernel/intern/mesh.cc
M   source/blender/blenkernel/intern/mesh_boolean_convert.cc
M   source/blender/blenkernel/intern/object_deform.c
M   source/blender/blenkernel/intern/subdiv_mesh.cc
M   source/blender/bmesh/intern/bmesh_construct.c
M   source/blender/editors/armature/armature_skinning.c
M   source/blender/editors/armature/meshlaplacian.c
M   source/blender/editors/mesh/mesh_data.cc
M   source/blender/editors/object/object_modifier.cc
M   source/blender/editors/object/object_vgroup.cc
M   source/blender/editors/sculpt_paint/paint_vertex.cc
M   source/blender/editors/space_view3d/view3d_select.cc
M   source/blender/geometry/intern/mesh_merge_by_distance.cc
M   source/blender/makesdna/DNA_meshdata_types.h
M   source/blender/modifiers/intern/MOD_array.c
M   source/blender/modifiers/intern/MOD_explode.c
M   source/blender/modifiers/intern/MOD_solidify_nonmanifold.c

===

diff --git a/source/blender/blenkernel/intern/mball_tessellate.c 
b/source/blender/blenkernel/intern/mball_tessellate.c
index 61f5a5f315f..33c3e9f20df 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.c
+++ b/source/blender/blenkernel/intern/mball_tessellate.c
@@ -1448,7 +1448,6 @@ Mesh *BKE_mball_polygonize(Depsgraph *depsgraph, Scene 
*scene, Object *ob)
   for (int i = 0; i < mesh->totvert; i++) {
 copy_v3_v3(mvert[i].co, process.co[i]);
 mvert->bweight = 0;
-mvert->flag = 0;
   }
   MEM_freeN(process.co);
 
diff --git a/source/blender/blenkernel/intern/mesh.cc 
b/source/blender/blenkernel/intern/mesh.cc
index 7ff00fe700f..8496f37736b 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -250,8 +250,13 @@ static void mesh_blend_write(BlendWriter *writer, ID *id, 
const void *id_address
 if (!BLO_write_is_undo(writer)) {
   BKE_mesh_legacy_convert_hide_layers_to_flags(mesh);
   BKE_mesh_legacy_convert_selection_layers_to_flags(mesh);
-  /* When converting to the old mesh format, don't save redunant 
attributes. */
-  names_to_skip.add_multiple_new({".hide_vert", ".hide_edge", 
".hide_poly"});
+  /* When converting to the old mesh format, don't save redundant 
attributes. */
+  names_to_skip.add_multiple_new({".hide_vert",
+  ".hide_edge",
+  ".hide_poly",
+  ".selection_vert",
+  ".selection_edge",
+  ".selection_poly"});
 }
 
 CustomData_blend_write_prepare(mesh->vdata, vert_layers, names_to_skip);
diff --git a/source/blender/blenkernel/intern/mesh_boolean_convert.cc 
b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
index a1ef2d2e6b5..480a935cb14 100644
--- a/source/blender/blenkernel/intern/mesh_boolean_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
@@ -375,7 +375,6 @@ static void copy_vert_attributes(Mesh *dest_mesh,
  int index_in_orig_me)
 {
   mv->bweight = orig_mv->bweight;
-  mv->flag = orig_mv->flag;
 
   /* For all layers in the orig mesh, copy the layer information. */
   CustomData *target_cd = _mesh->vdata;
diff --git a/source/blender/blenkernel/intern/object_deform.c 
b/source/blender/blenkernel/intern/object_deform.c
index 310ec7678bd..d7509ae99b3 100644
--- a/source/blender/blenkernel/intern/object_deform.c
+++ b/source/blender/blenkernel/intern/object_deform.c
@@ -165,14 +165,14 @@ bool BKE_object_defgroup_clear(Object *ob, bDeformGroup 
*dg, const bool use_sele
 }
 else {
   if (me->dvert) {
-MVert *mv;
+const bool *selection_vert = (const bool *)CustomData_get_layer_named(
+>vdata, CD_PROP_BOOL, ".selection_vert");
 int i;
 
-mv = me->mvert;
 dv = me->dvert;
 
-for (i = 0; i < me->totvert; i++, mv++, dv++) {
-  if (dv->dw && (!use_selection || (mv->flag & SELECT))) {
+for (i = 0; i < me->totvert; i++, dv++) {
+  if (dv->dw && (!use_selection || (selection_vert && 
selection_vert[i]))) {
 MDeformWeight *dw = BKE_defvert_find_index(dv, def_nr);
 BKE_defvert_remove_group(dv, dw); /* dw can be NULL */
 changed = true;
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.cc 
b/source/blender/blenkernel/intern/subdiv_mesh.cc
index e026a013498..b5937709a7e 100644
--- a/source/blender/blenkernel/intern/subdiv_mesh.cc
+++ 

[Bf-blender-cvs] [c8f9b02acd5] refactor-mesh-selection-generic: Progress

2022-08-25 Thread Hans Goudey
Commit: c8f9b02acd5c6c92b34884f551070464e5c36fc5
Author: Hans Goudey
Date:   Thu Aug 25 14:46:35 2022 -0400
Branches: refactor-mesh-selection-generic
https://developer.blender.org/rBc8f9b02acd5c6c92b34884f551070464e5c36fc5

Progress

===

M   source/blender/blenkernel/BKE_mesh_legacy_convert.h
M   source/blender/blenkernel/intern/mesh.cc
M   source/blender/blenkernel/intern/mesh_evaluate.cc
M   source/blender/blenkernel/intern/mesh_legacy_convert.cc
M   source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc
M   source/blender/editors/mesh/mesh_data.cc
M   source/blender/editors/sculpt_paint/paint_image_proj.c
M   source/blender/makesdna/DNA_meshdata_types.h

===

diff --git a/source/blender/blenkernel/BKE_mesh_legacy_convert.h 
b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
index bbc61d5af5e..c9c428e0dec 100644
--- a/source/blender/blenkernel/BKE_mesh_legacy_convert.h
+++ b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
@@ -27,6 +27,16 @@ void BKE_mesh_legacy_convert_hide_layers_to_flags(struct 
Mesh *mesh);
  */
 void BKE_mesh_legacy_convert_flags_to_hide_layers(struct Mesh *mesh);
 
+/**
+ * Convert the selected element attributes to the old flag format for writing.
+ */
+void BKE_mesh_legacy_convert_selection_layers_to_flags(struct Mesh *mesh);
+/**
+ * Convert the old selection flags (#SELECT/#ME_FACE_SEL) to the selected 
element attribute for
+ * reading. Only add the attributes when there are any elements in each domain 
selected.
+ */
+void BKE_mesh_legacy_convert_flags_to_selection_layers(struct Mesh *mesh);
+
 /**
  * Recreate #MFace Tessellation.
  *
diff --git a/source/blender/blenkernel/intern/mesh.cc 
b/source/blender/blenkernel/intern/mesh.cc
index 6aa59834472..7ff00fe700f 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -249,6 +249,7 @@ static void mesh_blend_write(BlendWriter *writer, ID *id, 
const void *id_address
 Set names_to_skip;
 if (!BLO_write_is_undo(writer)) {
   BKE_mesh_legacy_convert_hide_layers_to_flags(mesh);
+  BKE_mesh_legacy_convert_selection_layers_to_flags(mesh);
   /* When converting to the old mesh format, don't save redunant 
attributes. */
   names_to_skip.add_multiple_new({".hide_vert", ".hide_edge", 
".hide_poly"});
 }
@@ -337,6 +338,7 @@ static void mesh_blend_read_data(BlendDataReader *reader, 
ID *id)
 
   if (!BLO_read_data_is_undo(reader)) {
 BKE_mesh_legacy_convert_flags_to_hide_layers(mesh);
+BKE_mesh_legacy_convert_flags_to_selection_layers(mesh);
   }
 
   /* We don't expect to load normals from files, since they are derived data. 
*/
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.cc 
b/source/blender/blenkernel/intern/mesh_evaluate.cc
index 2a3a62731f3..2294cb1c4af 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.cc
+++ b/source/blender/blenkernel/intern/mesh_evaluate.cc
@@ -837,7 +837,7 @@ void BKE_mesh_flush_select_from_polys(Mesh *me)
   ".selection_edge", ATTR_DOMAIN_EDGE);
 
   /* Use generic domain interpolation to read the polygon attribute on the 
other domains.
-   * Assume selected faces are not hidden and none of their verts/edges are 
hidden. */
+   * Assume selected faces are not hidden and none of their vertices/edges are 
hidden. */
   attributes.lookup_or_default(".selection_poly", ATTR_DOMAIN_POINT, 
false)
   .materialize(selection_vert.span);
   attributes.lookup_or_default(".selection_poly", ATTR_DOMAIN_EDGE, 
false)
@@ -856,6 +856,7 @@ static void mesh_flush_select_from_verts(const Span 
edges,
  MutableSpan selection_edge,
  MutableSpan selection_poly)
 {
+  /* Select visible edges that have both of their vertices selected. */
   for (const int i : edges.index_range()) {
 if (!hide_edge[i]) {
   const MEdge  = edges[i];
@@ -863,6 +864,7 @@ static void mesh_flush_select_from_verts(const Span 
edges,
 }
   }
 
+  /* Select visible faces that have all of their vertices selected. */
   for (const int i : polys.index_range()) {
 if (!hide_poly[i]) {
   const MPoly  = polys[i];
diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc 
b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
index cc96a5e8c60..bfe7c588ca0 100644
--- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
@@ -13,6 +13,7 @@
 
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
 
 #include "BLI_edgehash.h"
 #include "BLI_math.h"
@@ -962,3 +963,89 @@ void BKE_mesh_legacy_convert_flags_to_hide_layers(Mesh 
*mesh)
 }
 
 /** \} */
+
+/*  */
+/** \name Selection Attribute and 

[Bf-blender-cvs] [5116bfd51f1] refactor-mesh-selection-generic: Merge branch 'master' into refactor-mesh-selection-generic

2022-08-25 Thread Hans Goudey
Commit: 5116bfd51f173a26dd5f169518f986327d2d2f27
Author: Hans Goudey
Date:   Thu Aug 25 13:23:10 2022 -0400
Branches: refactor-mesh-selection-generic
https://developer.blender.org/rB5116bfd51f173a26dd5f169518f986327d2d2f27

Merge branch 'master' into refactor-mesh-selection-generic

===



===

diff --cc source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc
index 7016b81a8cf,fa39957a7fc..df482a694ad
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc
@@@ -294,11 -283,12 +283,13 @@@ static void extract_edituv_lines_iter_s
const MPoly *coarse_poly)
  {
MeshExtract_EditUvElem_Data *data = static_cast(_data);
-   const int coarse_quad_index = coarse_poly - mr->mpoly;
-   const bool hidden = mr->hide_poly && mr->hide_poly[coarse_quad_index];
 +
int *subdiv_loop_edge_index = (int 
*)GPU_vertbuf_get_data(subdiv_cache->edges_orig_index);
  
+   const BMFace *efa = bm_original_face_get(mr, coarse_poly - mr->mpoly);
+   const bool mp_hidden = (efa) ? BM_elem_flag_test_bool(efa, BM_ELEM_HIDDEN) 
: true;
+   const bool mp_select = (efa) ? BM_elem_flag_test_bool(efa, BM_ELEM_SELECT) 
: false;
+ 
uint start_loop_idx = subdiv_quad_index * 4;
uint end_loop_idx = (subdiv_quad_index + 1) * 4;
for (uint loop_idx = start_loop_idx; loop_idx < end_loop_idx; loop_idx++) {
diff --cc 
source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc
index a5de87bdebd,31e5c515129..f4990a0a020
--- 
a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc
+++ 
b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc
@@@ -124,11 -121,10 +123,10 @@@ static void extract_lines_paint_mask_it
  }
  else {
if (!((mr->use_hide && mr->hide_edge && 
mr->hide_edge[coarse_edge_index]) ||
- ((mr->extract_type == MR_EXTRACT_MAPPED) && (mr->e_origindex) &&
-  (mr->e_origindex[coarse_edge_index] == ORIGINDEX_NONE {
+ ((mr->e_origindex) && (mr->e_origindex[coarse_edge_index] == 
ORIGINDEX_NONE {
  const uint ml_index_other = (loop_idx == (end_loop_idx - 1)) ? 
start_loop_idx :
 
loop_idx + 1;
 -if (coarse_quad->flag & ME_FACE_SEL) {
 +if (mr->selection_poly && mr->selection_poly[coarse_quad_index]) {
if (BLI_BITMAP_TEST_AND_SET_ATOMIC(data->select_map, 
coarse_edge_index)) {
  /* Hide edge as it has more than 2 selected loop. */
  GPU_indexbuf_set_line_restart(>elb, subdiv_edge_index);
diff --cc source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc
index b9749a264a0,01d07fa5f83..7fa14bf5480
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc
@@@ -80,13 -80,13 +80,13 @@@ static void extract_lnor_iter_poly_mesh
  }
  
  /* Flag for paint mode overlay.
-  * Only use MR_EXTRACT_MAPPED in edit mode where it is used to display 
the edge-normals.
+  * Only use origindex in edit mode where it is used to display the 
edge-normals.
   * In paint mode it will use the un-mapped data to draw the wire-frame. */
- if (hidden || (mr->edit_bmesh && mr->extract_type == MR_EXTRACT_MAPPED && 
(mr->v_origindex) &&
-mr->v_origindex[ml->v] == ORIGINDEX_NONE)) {
+ if (hidden ||
+ (mr->edit_bmesh && (mr->v_origindex) && mr->v_origindex[ml->v] == 
ORIGINDEX_NONE)) {
lnor_data->w = -1;
  }
 -else if (mp->flag & ME_FACE_SEL) {
 +else if (mr->selection_poly && mr->selection_poly[mp_index]) {
lnor_data->w = 1;
  }
  else {
@@@ -205,13 -205,13 +205,13 @@@ static void extract_lnor_hq_iter_poly_m
  }
  
  /* Flag for paint mode overlay.
-  * Only use #MR_EXTRACT_MAPPED in edit mode where it is used to display 
the edge-normals.
+  * Only use origindex in edit mode where it is used to display the 
edge-normals.
   * In paint mode it will use the un-mapped data to draw the wire-frame. */
- if (hidden || (mr->edit_bmesh && mr->extract_type == MR_EXTRACT_MAPPED && 
(mr->v_origindex) &&
-mr->v_origindex[ml->v] == ORIGINDEX_NONE)) {
+ if (hidden ||
+ (mr->edit_bmesh && (mr->v_origindex) && mr->v_origindex[ml->v] == 
ORIGINDEX_NONE)) {
lnor_data->w = -1;
  }
 -else if (mp->flag & ME_FACE_SEL) {
 +else if (mr->selection_poly && mr->selection_poly[mp_index]) {
lnor_data->w = 1;
  }
  else {
diff --cc source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc
index b172b5fb252,a822845c688..f13df9614c3
--- 

[Bf-blender-cvs] [eabdf1dc827] refactor-mesh-uv-map-generic: Refactor reading and writing, other changes

2022-08-25 Thread Hans Goudey
Commit: eabdf1dc82729283cfa162211f5f8e21037caf6c
Author: Hans Goudey
Date:   Thu Aug 18 22:00:28 2022 -0400
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rBeabdf1dc82729283cfa162211f5f8e21037caf6c

Refactor reading and writing, other changes

===

M   source/blender/blenkernel/BKE_attribute.h
M   source/blender/blenkernel/BKE_customdata.h
M   source/blender/blenkernel/BKE_mesh_legacy_convert.h
M   source/blender/blenkernel/intern/attribute.cc
M   source/blender/blenkernel/intern/customdata.cc
M   source/blender/blenkernel/intern/mesh.cc
M   source/blender/blenkernel/intern/mesh_legacy_convert.cc
M   source/blender/bmesh/intern/bmesh_interp.c
M   source/blender/io/wavefront_obj/importer/obj_import_mesh.cc
M   source/blender/makesrna/intern/rna_mesh.c

===

diff --git a/source/blender/blenkernel/BKE_attribute.h 
b/source/blender/blenkernel/BKE_attribute.h
index 64019bb7a26..3e2598a6c05 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -20,6 +20,7 @@ struct CustomData;
 struct CustomDataLayer;
 struct ID;
 struct ReportList;
+struct Mesh;
 
 /** #Attribute.domain */
 typedef enum eAttrDomain {
@@ -142,11 +143,11 @@ struct CustomDataLayer 
*BKE_id_attributes_color_find(const struct ID *id, const
 
 bool BKE_id_attribute_calc_unique_name(struct ID *id, const char *name, char 
*outname);
 
-UVMap_Data BKE_id_attributes_create_uvmap_layers(struct ID *id,
+UVMap_Data BKE_id_attributes_create_uvmap_layers(struct Mesh *mesh,
  char const *name,
  struct ReportList *reports,
  uint32_t needed_layer_flags);
-UVMap_Data BKE_id_attributes_ensure_uvmap_layers_index(struct ID *id,
+UVMap_Data BKE_id_attributes_ensure_uvmap_layers_index(struct Mesh *mesh,
int index_of_uvmap,
struct ReportList 
*reports,
uint32_t 
needed_layer_flags);
diff --git a/source/blender/blenkernel/BKE_customdata.h 
b/source/blender/blenkernel/BKE_customdata.h
index b1ec14534f5..f9868d614e5 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -769,7 +769,24 @@ typedef struct UVMap_Data {
 
 #ifdef __cplusplus
 
-std::string UV_sublayer_name(char const *layername, char const *prefix);
+namespace blender::bke {
+
+inline std::string uv_sublayer_name_vert_selection(const StringRef uv_map_name)
+{
+  return std::string(".") + UV_VERTSEL_NAME + "." + uv_map_name;
+}
+
+inline std::string uv_sublayer_name_edge_selection(const StringRef uv_map_name)
+{
+  return std::string(".") + UV_EDGESEL_NAME + "." + uv_map_name;
+}
+
+inline std::string uv_sublayer_name_pin(const StringRef uv_map_name)
+{
+  return std::string(".") + UV_PINNED_NAME + "." + uv_map_name;
+}
+
+}  // namespace blender::bke
 
 #endif
 /**
diff --git a/source/blender/blenkernel/BKE_mesh_legacy_convert.h 
b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
index 0eb94de7929..2d4664bf278 100644
--- a/source/blender/blenkernel/BKE_mesh_legacy_convert.h
+++ b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
@@ -9,6 +9,12 @@
 
 #include "BLI_utildefines.h"
 
+#ifdef __cplusplus
+#  include "BLI_array.hh"
+#  include "BLI_resource_scope.hh"
+#  include "BLI_vector.hh"
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -17,7 +23,15 @@ struct CustomData;
 struct Mesh;
 struct MFace;
 
-void BKE_mesh_legacy_convert_uvs_to_struct(const Mesh *mesh);
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef __cplusplus
+
+void BKE_mesh_legacy_convert_uvs_to_struct(const Mesh *mesh,
+   blender::ResourceScope 
_mloopuv_for_convert,
+   blender::Vector _to_write);
 void BKE_mesh_legacy_convert_uvs_to_generic(Mesh *mesh);
 
 /**
@@ -30,6 +44,12 @@ void BKE_mesh_legacy_convert_hide_layers_to_flags(struct 
Mesh *mesh);
  */
 void BKE_mesh_legacy_convert_flags_to_hide_layers(struct Mesh *mesh);
 
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Recreate #MFace Tessellation.
  *
diff --git a/source/blender/blenkernel/intern/attribute.cc 
b/source/blender/blenkernel/intern/attribute.cc
index 1c1c9f11788..ebd335fc68a 100644
--- a/source/blender/blenkernel/intern/attribute.cc
+++ b/source/blender/blenkernel/intern/attribute.cc
@@ -145,6 +145,7 @@ bool BKE_id_attribute_rename(ID *id,
  const char *new_name,
  ReportList *reports)
 {
+  using namespace blender::bke;
   if (BKE_id_attribute_required(id, old_name)) {
 BLI_assert_msg(0, "Required attribute name is not 

[Bf-blender-cvs] [791d8be685c] refactor-mesh-uv-map-generic: Progress

2022-08-25 Thread Hans Goudey
Commit: 791d8be685c9aab01dddc806abe10eb45843f66b
Author: Hans Goudey
Date:   Wed Aug 17 18:08:01 2022 -0400
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB791d8be685c9aab01dddc806abe10eb45843f66b

Progress

===

M   source/blender/blenkernel/BKE_customdata.h
M   source/blender/blenkernel/BKE_mesh_legacy_convert.h
M   source/blender/blenkernel/intern/customdata.cc
M   source/blender/blenkernel/intern/mesh.cc
M   source/blender/blenkernel/intern/mesh_legacy_convert.cc
M   source/blender/blenloader/intern/versioning_300.c

===

diff --git a/source/blender/blenkernel/BKE_customdata.h 
b/source/blender/blenkernel/BKE_customdata.h
index 02a0afd086e..b1ec14534f5 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -450,6 +450,12 @@ int CustomData_get_stencil_layer(const struct CustomData 
*data, int type);
  */
 const char *CustomData_get_active_layer_name(const struct CustomData *data, 
int type);
 
+/**
+ * Returns name of the default layer of the given type or NULL
+ * if no such active layer is defined.
+ */
+const char *CustomData_get_render_layer_name(const struct CustomData *data, 
int type);
+
 /**
  * Copies the data from source to the data element at index in the first layer 
of type
  * no effect if there is no layer of type.
diff --git a/source/blender/blenkernel/BKE_mesh_legacy_convert.h 
b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
index bbc61d5af5e..0eb94de7929 100644
--- a/source/blender/blenkernel/BKE_mesh_legacy_convert.h
+++ b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
@@ -17,6 +17,9 @@ struct CustomData;
 struct Mesh;
 struct MFace;
 
+void BKE_mesh_legacy_convert_uvs_to_struct(const Mesh *mesh);
+void BKE_mesh_legacy_convert_uvs_to_generic(Mesh *mesh);
+
 /**
  * Convert the hidden element attributes to the old flag format for writing.
  */
diff --git a/source/blender/blenkernel/intern/customdata.cc 
b/source/blender/blenkernel/intern/customdata.cc
index aa1c5c34f34..41cd74f40a6 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -2668,6 +2668,12 @@ const char *CustomData_get_active_layer_name(const 
CustomData *data, const int t
   return layer_index < 0 ? nullptr : data->layers[layer_index].name;
 }
 
+const char *CustomData_get_render_layer_name(const CustomData *data, const int 
type)
+{
+  const int layer_index = CustomData_get_render_layer_index(data, type);
+  return layer_index < 0 ? nullptr : data->layers[layer_index].name;
+}
+
 void CustomData_set_layer_active(CustomData *data, const int type, const int n)
 {
   for (int i = 0; i < data->totlayer; i++) {
diff --git a/source/blender/blenkernel/intern/mesh.cc 
b/source/blender/blenkernel/intern/mesh.cc
index f2057d25882..956dda4985c 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -247,6 +247,7 @@ static void mesh_blend_write(BlendWriter *writer, ID *id, 
const void *id_address
   else {
 if (!BLO_write_is_undo(writer)) {
   BKE_mesh_legacy_convert_hide_layers_to_flags(mesh);
+  BKE_mesh_legacy_convert_uvs_to_struct(mesh);
 }
 
 CustomData_blend_write_prepare(mesh->vdata, vert_layers, {".hide_vert"});
@@ -333,6 +334,7 @@ static void mesh_blend_read_data(BlendDataReader *reader, 
ID *id)
 
   if (!BLO_read_data_is_undo(reader)) {
 BKE_mesh_legacy_convert_flags_to_hide_layers(mesh);
+BKE_mesh_legacy_convert_uvs_to_generic(mesh);
   }
 
   /* We don't expect to load normals from files, since they are derived data. 
*/
diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc 
b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
index 62791032a62..80c14708d78 100644
--- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
@@ -966,3 +966,87 @@ void BKE_mesh_legacy_convert_flags_to_hide_layers(Mesh 
*mesh)
 }
 
 /** \} */
+
+/*  */
+/** \name Generic UV Map Conversion
+ * \{ */
+
+void BKE_mesh_legacy_convert_uvs_to_struct(const Mesh *mesh)
+{
+  using namespace blender;
+  using namespace blender::bke;
+  const AttributeAccessor attributes = mesh_attributes(*mesh);
+}
+
+void BKE_mesh_legacy_convert_uvs_to_generic(Mesh *mesh)
+{
+  using namespace blender;
+  using namespace blender::bke;
+  MutableAttributeAccessor attributes = mesh_attributes_for_write(*mesh);
+
+  int totloop = mesh->totloop;
+
+  /* Store layer names since they will be removed.
+   * Use intermediate #StringRef because the names can be null. */
+  const std::string active_uv = StringRef(
+  CustomData_get_active_layer_name(>ldata, CD_MLOOPUV));
+  const std::string default_uv = StringRef(
+  

[Bf-blender-cvs] [c566feb5c85] refactor-mesh-uv-map-generic: Various fixes and cleanups

2022-08-25 Thread Hans Goudey
Commit: c566feb5c857c7da1c3438adc3b5b82409581f7e
Author: Hans Goudey
Date:   Wed Aug 17 16:54:50 2022 -0400
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rBc566feb5c857c7da1c3438adc3b5b82409581f7e

Various fixes and cleanups

===

M   source/blender/blenkernel/BKE_attribute.h
M   source/blender/blenkernel/BKE_customdata.h
M   source/blender/blenkernel/BKE_mesh.h
M   source/blender/blenkernel/BKE_mesh_mapping.h
M   source/blender/blenkernel/intern/attribute_access.cc
M   source/blender/blenkernel/intern/attribute_access_intern.hh
M   source/blender/blenkernel/intern/layer_utils.c
M   source/blender/blenkernel/intern/mesh.cc
M   source/blender/blenkernel/intern/mesh_evaluate.cc
M   source/blender/blenkernel/intern/mesh_legacy_convert.cc
M   source/blender/blenkernel/intern/object_update.c
M   source/blender/blenkernel/intern/subdiv_mesh.c
M   
source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc
M   source/blender/editors/include/ED_uvedit.h
M   source/blender/editors/mesh/mesh_data.cc
M   source/blender/editors/sculpt_paint/sculpt_uv.c
M   source/blender/editors/uvedit/uvedit_intern.h
M   
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
M   source/blender/makesdna/DNA_mesh_types.h
M   source/blender/makesdna/DNA_meshdata_types.h
M   source/blender/python/bmesh/bmesh_py_types_meshdata.c
M   source/blender/render/intern/texture_margin.cc

===

diff --git a/source/blender/blenkernel/BKE_attribute.h 
b/source/blender/blenkernel/BKE_attribute.h
index 610be64adf6..64019bb7a26 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -99,9 +99,10 @@ CustomDataLayer *BKE_id_attribute_from_index(struct ID *id,
  eAttrDomainMask domain_mask,
  eCustomDataMask layer_mask);
 
-/** Layer is allowed to be nullptr; if so -1 (layer not found) will be 
returned.
+/**
  * Returns the index in the list of attributes of the same type on the same 
domain.
- * note: this is *not* the CustomData layer index.
+ * Note: this is *not* the CustomData layer index.
+ * Layer is allowed to be nullptr; if so -1 (layer not found) will be returned.
  */
 int BKE_id_attribute_to_index(const struct ID *id,
   const CustomDataLayer *layer,
diff --git a/source/blender/blenkernel/BKE_customdata.h 
b/source/blender/blenkernel/BKE_customdata.h
index 4332f711ab6..02a0afd086e 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -734,7 +734,8 @@ void CustomData_blend_write(BlendWriter *writer,
 
 void CustomData_blend_read(struct BlendDataReader *reader, struct CustomData 
*data, int count);
 
-/* Uvmap related customdata offsets for BMesh.
+/**
+ * UV map related customdata offsets for BMesh.
  */
 typedef struct UVMap_Offsets {
   int uv;
@@ -743,7 +744,8 @@ typedef struct UVMap_Offsets {
   int pinned;
 } UVMap_Offsets;
 
-/* UV related CustomData pointers.
+/**
+ * UV related CustomData pointers.
  * The data pointers point directly to the CustomData arrays.
  * The uv_index is also stored for on-demand creation of the bool datalayers.
  */
@@ -764,10 +766,9 @@ typedef struct UVMap_Data {
 std::string UV_sublayer_name(char const *layername, char const *prefix);
 
 #endif
-/* get a descriptor containing offsets for all needed layers for the uvmap
- * \param name: Optional layer name. When name is NULL, the default layer is 
returned
- * \param offsets: Output parameter that will be filled with the offsets
-
+/**
+ * Get a descriptor containing offsets for layers used for user interaction 
with the UV map.
+ * \param name: Optional layer name. When null, the default layer is returned.
  */
 UVMap_Offsets CustomData_get_uvmap_offsets(const struct CustomData *data, char 
const *name);
 UVMap_Data CustomData_get_uvmap_data(const struct CustomData *data, char const 
*name);
diff --git a/source/blender/blenkernel/BKE_mesh.h 
b/source/blender/blenkernel/BKE_mesh.h
index e445ff685d0..6fe7c06fbbc 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -737,7 +737,6 @@ float BKE_mesh_calc_poly_area(const struct MPoly *mpoly,
   const struct MLoop *loopstart,
   const struct MVert *mvarray);
 float BKE_mesh_calc_area(const struct Mesh *me);
-float BKE_mesh_calc_poly_uv_area(const struct MPoly *mpoly, const float 
(*uv_array)[2]);
 void BKE_mesh_calc_poly_angles(const struct MPoly *mpoly,
const struct MLoop *loopstart,
const struct MVert *mvarray,
diff --git 

[Bf-blender-cvs] [78fb2d3d2af] refactor-mesh-uv-map-generic: Merge branch 'master' into refactor-mesh-uv-map-generic

2022-08-25 Thread Hans Goudey
Commit: 78fb2d3d2af735b164c42dfbc459db8fb51de210
Author: Hans Goudey
Date:   Thu Aug 25 17:50:16 2022 -0400
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB78fb2d3d2af735b164c42dfbc459db8fb51de210

Merge branch 'master' into refactor-mesh-uv-map-generic

===



===

diff --cc source/blender/blenkernel/intern/mesh.cc
index 1e587d84f3d,7f2c09f049b..11899d3938f
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@@ -247,18 -246,17 +247,21 @@@ static void mesh_blend_write(BlendWrite
  memset(>pdata, 0, sizeof(mesh->pdata));
}
else {
+ Set names_to_skip;
  if (!BLO_write_is_undo(writer)) {
BKE_mesh_legacy_convert_hide_layers_to_flags(mesh);
+   /* When converting to the old mesh format, don't save redunant 
attributes. */
+   names_to_skip.add_multiple_new({".hide_vert", ".hide_edge", 
".hide_poly"});
  }
  
- CustomData_blend_write_prepare(mesh->vdata, vert_layers, {".hide_vert"});
- CustomData_blend_write_prepare(mesh->edata, edge_layers, {".hide_edge"});
- CustomData_blend_write_prepare(mesh->ldata, loop_layers);
- CustomData_blend_write_prepare(mesh->pdata, poly_layers, {".hide_poly"});
+ CustomData_blend_write_prepare(mesh->vdata, vert_layers, names_to_skip);
+ CustomData_blend_write_prepare(mesh->edata, edge_layers, names_to_skip);
+ CustomData_blend_write_prepare(mesh->ldata, loop_layers, names_to_skip);
+ CustomData_blend_write_prepare(mesh->pdata, poly_layers, names_to_skip);
 +
 +if (!BLO_write_is_undo(writer)) {
 +  BKE_mesh_legacy_convert_uvs_to_struct(mesh, 
temp_arrays_for_legacy_format, loop_layers);
 +}
}
  
BLO_write_id_struct(writer, Mesh, id_address, >id);
diff --cc source/blender/bmesh/tools/bmesh_path_uv.c
index 172fe8c5d0f,6531677fce6..5ba613fd130
--- a/source/blender/bmesh/tools/bmesh_path_uv.c
+++ b/source/blender/bmesh/tools/bmesh_path_uv.c
@@@ -65,10 -65,10 +65,10 @@@ static void verttag_add_adjacent_uv(Hea
  const struct BMCalcPathUVParams *params)
  {
BLI_assert(params->aspect_y != 0.0f);
-   const uint cd_loop_uv_offset = params->cd_loop_uv_offset;
+   const int cd_loop_uv_offset = params->cd_loop_uv_offset;
const int l_a_index = BM_elem_index_get(l_a);
 -  const MLoopUV *luv_a = BM_ELEM_CD_GET_VOID_P(l_a, cd_loop_uv_offset);
 -  const float uv_a[2] = {luv_a->uv[0], luv_a->uv[1] / params->aspect_y};
 +  const float *luv_a = BM_ELEM_CD_GET_FLOAT_P(l_a, cd_loop_uv_offset);
 +  const float uv_a[2] = {luv_a[0], luv_a[1] / params->aspect_y};
  
{
  BMIter liter;
diff --cc source/blender/editors/include/ED_uvedit.h
index 656783d7f57,38e542fc0ca..e7a90daf96e
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@@ -143,34 -139,32 +143,34 @@@ void uvedit_uv_select_set(const struct 
   * use. */
  
  void uvedit_face_select_enable(const struct Scene *scene,
-struct BMEditMesh *em,
+struct BMesh *bm,
 struct BMFace *efa,
 bool do_history,
 -   int cd_loop_uv_offset);
 +   UVMap_Offsets offsets);
  void uvedit_face_select_disable(const struct Scene *scene,
- struct BMEditMesh *em,
+ struct BMesh *bm,
  struct BMFace *efa,
 -int cd_loop_uv_offset);
 +UVMap_Offsets offsets);
 +
  void uvedit_edge_select_enable(const struct Scene *scene,
-struct BMEditMesh *em,
+struct BMesh *bm,
 struct BMLoop *l,
 bool do_history,
 -   int cd_loop_uv_offset);
 +   UVMap_Offsets offsets);
  void uvedit_edge_select_disable(const struct Scene *scene,
- struct BMEditMesh *em,
+ struct BMesh *bm,
  struct BMLoop *l,
 -int cd_loop_uv_offset);
 +UVMap_Offsets offsets);
 +
  void uvedit_uv_select_enable(const struct Scene *scene,
-  struct BMEditMesh *em,
+  struct BMesh *bm,
   struct BMLoop *l,
   bool do_history,
 - int cd_loop_uv_offset);
 + UVMap_Offsets offsets);
  void uvedit_uv_select_disable(const struct Scene *scene,
-   struct BMEditMesh *em,
+  

[Bf-blender-cvs] [68c3c1e519a] refactor-mesh-uv-map-generic: Merge branch 'master' into refactor-mesh-uv-map-generic

2022-08-25 Thread Hans Goudey
Commit: 68c3c1e519a5d908bd866b5bb000697b31f5cbf8
Author: Hans Goudey
Date:   Wed Aug 17 18:14:01 2022 -0400
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB68c3c1e519a5d908bd866b5bb000697b31f5cbf8

Merge branch 'master' into refactor-mesh-uv-map-generic

===



===

diff --cc source/blender/blenkernel/intern/subdiv_mesh.cc
index 3320d84ca74,d914318b8a5..7960d3677b3
--- a/source/blender/blenkernel/intern/subdiv_mesh.cc
+++ b/source/blender/blenkernel/intern/subdiv_mesh.cc
@@@ -11,8 -11,8 +11,9 @@@
  #include "DNA_mesh_types.h"
  #include "DNA_meshdata_types.h"
  
- #include "BLI_alloca.h"
+ #include "BLI_array.hh"
  #include "BLI_bitmap.h"
++#include "BLI_math_vec_types.hh"
  #include "BLI_math_vector.h"
  
  #include "BKE_customdata.h"
@@@ -25,6 -25,6 +26,8 @@@
  
  #include "MEM_guardedalloc.h"
  
++using blender::float2;
++
  /*  */
  /** \name Subdivision Context
   * \{ */
@@@ -42,8 -41,7 +44,8 @@@ struct SubdivMeshContext 
int *poly_origindex;
/* UV layers interpolation. */
int num_uv_layers;
-   uvtype *uv_layers[MAX_MTFACE];
 -  MLoopUV *uv_layers[MAX_MTFACE];
++  blender::float2 *uv_layers[MAX_MTFACE];
 +
/* Original coordinates (ORCO) interpolation. */
float (*orco)[3];
float (*cloth_orco)[3];
@@@ -56,10 -53,10 +58,10 @@@
  static void subdiv_mesh_ctx_cache_uv_layers(SubdivMeshContext *ctx)
  {
Mesh *subdiv_mesh = ctx->subdiv_mesh;
 -  ctx->num_uv_layers = CustomData_number_of_layers(_mesh->ldata, 
CD_MLOOPUV);
 +  ctx->num_uv_layers = CustomData_number_of_layers(_mesh->ldata, 
CD_PROP_FLOAT2);
for (int layer_index = 0; layer_index < ctx->num_uv_layers; layer_index++) {
- ctx->uv_layers[layer_index] = CustomData_get_layer_n(
- _mesh->ldata, CD_PROP_FLOAT2, layer_index);
 -ctx->uv_layers[layer_index] = static_cast(
 -CustomData_get_layer_n(_mesh->ldata, CD_MLOOPUV, layer_index));
++ctx->uv_layers[layer_index] = static_cast(
++CustomData_get_layer_n(_mesh->ldata, CD_PROP_FLOAT2, 
layer_index));
}
  }
  
@@@ -853,8 -856,8 +861,8 @@@ static void subdiv_eval_uv_layer(Subdiv
Subdiv *subdiv = ctx->subdiv;
const int mloop_index = subdiv_loop - ctx->subdiv_mesh->mloop;
for (int layer_index = 0; layer_index < ctx->num_uv_layers; layer_index++) {
- float(*subdiv_loopuv)[2] = >uv_layers[layer_index][mloop_index];
- BKE_subdiv_eval_face_varying(subdiv, layer_index, ptex_face_index, u, v, 
*subdiv_loopuv);
 -MLoopUV *subdiv_loopuv = >uv_layers[layer_index][mloop_index];
 -BKE_subdiv_eval_face_varying(subdiv, layer_index, ptex_face_index, u, v, 
subdiv_loopuv->uv);
++BKE_subdiv_eval_face_varying(
++subdiv, layer_index, ptex_face_index, u, v, 
ctx->uv_layers[layer_index][mloop_index]);
}
  }

___
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] [37eea225329] refactor-mesh-uv-map-generic: Initial patch from Martijn Versteegh

2022-08-25 Thread Hans Goudey
Commit: 37eea2253295602fbff4ba255fdb2ee8f1826df3
Author: Hans Goudey
Date:   Wed Aug 17 13:59:10 2022 -0400
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB37eea2253295602fbff4ba255fdb2ee8f1826df3

Initial patch from Martijn Versteegh

===

M   release/scripts/startup/bl_ui/properties_data_mesh.py
M   source/blender/blenkernel/BKE_attribute.h
M   source/blender/blenkernel/BKE_customdata.h
M   source/blender/blenkernel/BKE_mesh.h
M   source/blender/blenkernel/BKE_mesh_mapping.h
M   source/blender/blenkernel/BKE_mesh_tangent.h
M   source/blender/blenkernel/intern/DerivedMesh.cc
M   source/blender/blenkernel/intern/attribute.cc
M   source/blender/blenkernel/intern/attribute_access.cc
M   source/blender/blenkernel/intern/customdata.cc
M   source/blender/blenkernel/intern/data_transfer.c
M   source/blender/blenkernel/intern/dynamicpaint.c
M   source/blender/blenkernel/intern/editmesh_tangent.c
M   source/blender/blenkernel/intern/fluid.c
M   source/blender/blenkernel/intern/geometry_component_mesh.cc
M   source/blender/blenkernel/intern/layer_utils.c
M   source/blender/blenkernel/intern/mesh.cc
M   source/blender/blenkernel/intern/mesh_convert.cc
M   source/blender/blenkernel/intern/mesh_evaluate.cc
M   source/blender/blenkernel/intern/mesh_legacy_convert.cc
M   source/blender/blenkernel/intern/mesh_mapping.c
M   source/blender/blenkernel/intern/mesh_merge_customdata.cc
M   source/blender/blenkernel/intern/mesh_mirror.c
M   source/blender/blenkernel/intern/mesh_tangent.c
M   source/blender/blenkernel/intern/mesh_validate.cc
M   source/blender/blenkernel/intern/object_dupli.cc
M   source/blender/blenkernel/intern/object_update.c
M   source/blender/blenkernel/intern/paint_canvas.cc
M   source/blender/blenkernel/intern/pbvh_pixels.cc
M   source/blender/blenkernel/intern/subdiv_converter_mesh.c
M   source/blender/blenkernel/intern/subdiv_eval.c
M   source/blender/blenkernel/intern/subdiv_mesh.c
M   source/blender/blenkernel/intern/subsurf_ccg.c
M   source/blender/blenloader/intern/versioning_280.c
M   source/blender/blenloader/intern/versioning_300.c
M   source/blender/blenloader/intern/versioning_defaults.c
M   source/blender/bmesh/bmesh_class.h
M   source/blender/bmesh/intern/bmesh_interp.c
M   source/blender/bmesh/intern/bmesh_interp.h
M   source/blender/bmesh/intern/bmesh_polygon.c
M   source/blender/bmesh/intern/bmesh_query_uv.c
M   source/blender/bmesh/operators/bmo_join_triangles.c
M   source/blender/bmesh/operators/bmo_mirror.c
M   source/blender/bmesh/operators/bmo_primitive.c
M   source/blender/bmesh/operators/bmo_utils.c
M   source/blender/bmesh/tools/bmesh_bevel.c
M   source/blender/bmesh/tools/bmesh_decimate_dissolve.c
M   source/blender/bmesh/tools/bmesh_path_uv.c
M   source/blender/draw/engines/overlay/overlay_edit_uv.c
M   source/blender/draw/engines/workbench/workbench_engine.c
M   source/blender/draw/intern/draw_cache_impl_mesh.cc
M   source/blender/draw/intern/draw_cache_impl_particles.c
M   source/blender/draw/intern/mesh_extractors/extract_mesh.cc
M   source/blender/draw/intern/mesh_extractors/extract_mesh.hh
M   source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edit_data.cc
M   
source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_data.cc
M   
source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc
M   
source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc
M   
source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_edituv_data.cc
M   source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_fdots_uv.cc
M   source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc
M   source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc
M   source/blender/editors/curves/intern/curves_ops.cc
M   source/blender/editors/geometry/geometry_attributes.cc
M   source/blender/editors/include/ED_uvedit.h
M   source/blender/editors/mesh/editmesh_select.c
M   source/blender/editors/mesh/editmesh_utils.c
M   source/blender/editors/mesh/mesh_data.cc
M   source/blender/editors/mesh/meshtools.cc
M   source/blender/editors/object/object_add.cc
M   source/blender/editors/object/object_bake_api.c
M   source/blender/editors/object/object_data_transfer.c
M   source/blender/editors/sculpt_paint/paint_image_proj.c
M   source/blender/editors/sculpt_paint/paint_utils.c
M   source/blender/editors/sculpt_paint/sculpt_uv.c
M   source/blender/editors/space_view3d/view3d_draw.c
M   source/blender/editors/transform/transform_convert_mesh_uv.c
M   source/blender/editors/uvedit/uvedit_buttons.c
M   

[Bf-blender-cvs] [a521860909a] refactor-mesh-uv-map-generic: Merge branch 'master' into refactor-mesh-uv-map-generic

2022-08-25 Thread Hans Goudey
Commit: a521860909a318dcea01185884969636917db7d9
Author: Hans Goudey
Date:   Wed Aug 17 15:14:58 2022 -0400
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rBa521860909a318dcea01185884969636917db7d9

Merge branch 'master' into refactor-mesh-uv-map-generic

===



===

diff --cc source/blender/blenkernel/BKE_customdata.h
index da6a6917957,2ced685884b..4332f711ab6
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@@ -121,7 -123,7 +123,7 @@@ void CustomData_data_mix_value
  
  /**
   * Compares if data1 is equal to data2.  type is a valid CustomData type
-- * enum (e.g. #CD_MLOOPUV). the layer type's equal function is used to compare
++ * enum (e.g. #CD_PROP_FLOAT). the layer type's equal function is used to 
compare
   * the data, if it exists, otherwise #memcmp is used.
   */
  bool CustomData_data_equals(int type, const void *data1, const void *data2);
diff --cc source/blender/blenkernel/BKE_mesh_mapping.h
index 7d76168364a,abe590b6806..d7033e7bf75
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@@ -76,8 -92,9 +91,9 @@@ typedef struct MeshElemMap 
  
  /* mapping */
  UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly,
+const bool *hide_poly,
 const struct MLoop *mloop,
 -   const struct MLoopUV *mloopuv,
 +   const float (*mloopuv)[2],
 unsigned int totpoly,
 unsigned int totvert,
 const float limit[2],
diff --cc source/blender/blenkernel/intern/attribute.cc
index d6188936a08,b6d39486313..1c1c9f11788
--- a/source/blender/blenkernel/intern/attribute.cc
+++ b/source/blender/blenkernel/intern/attribute.cc
@@@ -858,112 -791,3 +868,111 @@@ void BKE_id_attribute_copy_domains_temp
  
*((short *)r_id->name) = id_type;
  }
 +
- UVMap_Data BKE_id_attributes_create_uvmap_layers(struct ID *id,
++UVMap_Data BKE_id_attributes_create_uvmap_layers(ID *id,
 + char const *name,
-  struct ReportList *reports,
++ ReportList *reports,
 + uint32_t needed_layer_flags)
 +{
 +  UVMap_Data data;
 +
 +  bool needvertsel = needed_layer_flags & MLOOPUV_VERTSEL;
 +  bool neededgesel = needed_layer_flags & MLOOPUV_EDGESEL;
 +  bool needpinned = needed_layer_flags & MLOOPUV_PINNED;
 +
 +  CustomDataLayer *uvlayer = BKE_id_attribute_new(
 +  id, name, CD_PROP_FLOAT2, ATTR_DOMAIN_CORNER, reports);
 +
 +  data.uv = (float(*)[2])uvlayer->data;
 +
 +  data.uv_index = attribute_to_layerindex(
 +  id, uvlayer, ATTR_DOMAIN_MASK_CORNER, CD_MASK_PROP_FLOAT2);
 +
 +  std::string vertsel_name = UV_sublayer_name(uvlayer->name, UV_VERTSEL_NAME);
 +  std::string edgesel_name = UV_sublayer_name(uvlayer->name, UV_EDGESEL_NAME);
 +  std::string pinned_name = UV_sublayer_name(uvlayer->name, UV_PINNED_NAME);
 +
 +  //! martijn still need to handle if one of the sublayer names is already 
taken.
 +
 +  if (needvertsel) {
 +CustomDataLayer *layer = BKE_id_attribute_new(
 +id, vertsel_name.c_str(), CD_PROP_BOOL, ATTR_DOMAIN_CORNER, reports);
 +data.vertsel = (bool *)layer->data;
 +  }
 +  else {
 +data.vertsel = nullptr;
- ;
 +  }
 +  if (neededgesel) {
 +CustomDataLayer *layer = BKE_id_attribute_new(
 +id, edgesel_name.c_str(), CD_PROP_BOOL, ATTR_DOMAIN_CORNER, reports);
 +data.edgesel = (bool *)layer->data;
 +  }
 +  else {
 +data.edgesel = nullptr;
 +  }
 +  if (needpinned) {
 +CustomDataLayer *layer = BKE_id_attribute_new(
 +id, pinned_name.c_str(), CD_PROP_BOOL, ATTR_DOMAIN_CORNER, reports);
 +data.pinned = (bool *)layer->data;
 +  }
 +  else {
 +data.pinned = nullptr;
 +  }
 +
 +  return data;
 +}
 +
 +UVMap_Data BKE_id_attributes_ensure_uvmap_layers_index(struct ID *id,
 +   const int 
index_of_uvmap,
 +   struct ReportList 
*reports,
 +   uint32_t 
needed_layer_flags)
 +{
 +  UVMap_Data data;
 +
 +  const bool needvertsel = needed_layer_flags & MLOOPUV_VERTSEL;
 +  const bool neededgesel = needed_layer_flags & MLOOPUV_EDGESEL;
 +  const bool needpinned = needed_layer_flags & MLOOPUV_PINNED;
 +
 +  CustomDataLayer *uvlayer = attribute_from_layerindex(
 +  id, index_of_uvmap, ATTR_DOMAIN_CORNER, CD_MASK_PROP_FLOAT2);
 +
 +  data.uv_index = attribute_to_layerindex(
 +  id, uvlayer, 

[Bf-blender-cvs] [38ea294d013] soc-2022-many-lights-sampling: Cleanup: remove redundant or outdated light tree comments

2022-08-25 Thread Jeffrey Liu
Commit: 38ea294d01390d18ac30dd69c117ca5502fc985e
Author: Jeffrey Liu
Date:   Thu Aug 25 15:47:41 2022 -0500
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB38ea294d01390d18ac30dd69c117ca5502fc985e

Cleanup: remove redundant or outdated light tree comments

===

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

===

diff --git a/intern/cycles/kernel/light/light_tree.h 
b/intern/cycles/kernel/light/light_tree.h
index 0cdc5b58e8f..55b0b43d1db 100644
--- a/intern/cycles/kernel/light/light_tree.h
+++ b/intern/cycles/kernel/light/light_tree.h
@@ -12,7 +12,7 @@ ccl_device float light_tree_bounding_box_angle(const float3 
bbox_min,
const float3 P,
const float3 point_to_centroid)
 {
-  /* Want to iterate through all 8 possible points of the bounding box. */
+  /* Iterate through all 8 possible points of the bounding box. */
   float theta_u = 0;
   float3 corners[8];
   corners[0] = bbox_min;
@@ -32,8 +32,7 @@ ccl_device float light_tree_bounding_box_angle(const float3 
bbox_min,
 }
 
 /* This is the general function for calculating the importance of either a 
cluster or an emitter.
- * Both of the specialized functions obtain the necessary data before calling 
this function.
- * to-do: find a better way to handle this? or rename it to be more clear? */
+ * Both of the specialized functions obtain the necessary data before calling 
this function. */
 ccl_device float light_tree_node_importance(const float3 P,
 const float3 N,
 const float3 bbox_min,
@@ -60,7 +59,6 @@ ccl_device float light_tree_node_importance(const float3 P,
   }
   const float theta_u = light_tree_bounding_box_angle(bbox_min, bbox_max, P, 
point_to_centroid);
 
-  /* to-do: compare this with directly using fmaxf and cosf. */
   /* Avoid using cosine until needed. */
   const float theta_prime = fmaxf(theta - theta_o - theta_u, 0.0f);
   if (theta_prime >= theta_e) {
@@ -75,7 +73,6 @@ ccl_device float light_tree_node_importance(const float3 P,
 
   /* to-do: find a good approximation for this value. */
   const float f_a = 1.0f;
-
   float importance = f_a * cos_theta_i_prime * energy / distance_squared * 
cos_theta_prime;
   return importance;
 }
@@ -97,9 +94,9 @@ ccl_device float 
light_tree_emitter_reservoir_weight(KernelGlobals kg,
 const ccl_global KernelLight *klight = _data_fetch(lights, lamp);
 float3 light_P = make_float3(klight->co[0], klight->co[1], klight->co[2]);
 
+/* We use a special calculation to check if a light is
+ * within the bounds of a spot or area light. */
 if (klight->type == LIGHT_SPOT) {
-  /* to-do: since spot light importance sampling isn't the best,
-   * we have a special case to check that the point is inside the cone. */
   const float radius = klight->spot.radius;
   const float cos_theta = klight->spot.spot_angle;
   const float theta = fast_acosf(cos_theta);
@@ -118,7 +115,6 @@ ccl_device float 
light_tree_emitter_reservoir_weight(KernelGlobals kg,
   }
 }
 else if (klight->type == LIGHT_AREA) {
-  /* area light */
   float3 axisu = make_float3(
   klight->area.axisu[0], klight->area.axisu[1], klight->area.axisu[2]);
   float3 axisv = make_float3(
@@ -152,7 +148,6 @@ ccl_device float 
light_tree_emitter_importance(KernelGlobals kg,
   ccl_global const KernelLightTreeEmitter *kemitter = 
_data_fetch(light_tree_emitters,
  
emitter_index);
 
-  /* Convert the data from the struct into float3 for calculations. */
   const float3 bbox_min = make_float3(kemitter->bounding_box_min[0],
   kemitter->bounding_box_min[1],
   kemitter->bounding_box_min[2]);
@@ -167,8 +162,6 @@ ccl_device float 
light_tree_emitter_importance(KernelGlobals kg,
   P, N, bbox_min, bbox_max, bcone_axis, kemitter->theta_o, 
kemitter->theta_e, kemitter->energy);
 }
 
-/* to-do: this is using a lot of the same calculations as the cluster 
importance,
- * so it may be better to compute these once and then hold on to it somewhere. 
*/
 ccl_device bool light_tree_should_split(KernelGlobals kg,
  const float3 P,
  const ccl_global KernelLightTreeNode 
*knode)
@@ -214,7 +207,6 @@ ccl_device float 
light_tree_cluster_importance(KernelGlobals kg,
const float3 N,
const ccl_global 
KernelLightTreeNode *knode)
 {
-  /* Convert the data from the struct 

[Bf-blender-cvs] [4b0373ce8fa] soc-2022-many-lights-sampling: Merge branch 'master' into soc-2022-many-lights-sampling

2022-08-25 Thread Jeffrey Liu
Commit: 4b0373ce8faeb5282380651008356dd858609504
Author: Jeffrey Liu
Date:   Thu Aug 25 15:48:04 2022 -0500
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB4b0373ce8faeb5282380651008356dd858609504

Merge branch 'master' into soc-2022-many-lights-sampling

===



===



___
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] [1c769820304] cycles_path_guiding: Cleanup: add utility functions for converting to pgl vectors

2022-08-25 Thread Brecht Van Lommel
Commit: 1c76982030425edcc1101fb5c6c823e7c8fb9484
Author: Brecht Van Lommel
Date:   Thu Aug 25 20:12:57 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB1c76982030425edcc1101fb5c6c823e7c8fb9484

Cleanup: add utility functions for converting to pgl vectors

===

M   intern/cycles/kernel/integrator/guiding.h
M   intern/cycles/kernel/integrator/shade_surface.h
M   intern/cycles/kernel/integrator/shade_volume.h
M   intern/cycles/kernel/integrator/shader_eval.h

===

diff --git a/intern/cycles/kernel/integrator/guiding.h 
b/intern/cycles/kernel/integrator/guiding.h
index dfeec9b3471..31e747a592a 100644
--- a/intern/cycles/kernel/integrator/guiding.h
+++ b/intern/cycles/kernel/integrator/guiding.h
@@ -11,6 +11,20 @@
 
 CCL_NAMESPACE_BEGIN
 
+/* Utilities. */
+
+#if defined(__PATH_GUIDING__)
+static pgl_vec3f guiding_vec3f(const float3 v)
+{
+  return openpgl::cpp::Vector3(v.x, v.y, v.z);
+}
+
+static pgl_point3f guiding_point3f(const float3 v)
+{
+  return openpgl::cpp::Point3(v.x, v.y, v.z);
+}
+#endif
+
 /* Path recording for guiding. */
 
 ccl_device_forceinline void guiding_record_light_surface_segment(
@@ -21,26 +35,23 @@ ccl_device_forceinline void 
guiding_record_light_surface_segment(
 return;
   }
 
-  const pgl_vec3f pglZero = openpgl::cpp::Vector3(0.f, 0.f, 0.f);
-  const pgl_vec3f pglOne = openpgl::cpp::Vector3(1.f, 1.f, 1.f);
-  float3 ray_P = INTEGRATOR_STATE(state, ray, P);
-  float3 ray_D = INTEGRATOR_STATE(state, ray, D);
-  float3 p = ray_P + isect->t * ray_D;
-  pgl_point3f pglP = openpgl::cpp::Point3(p[0], p[1], p[2]);
-  pgl_vec3f pglWi = openpgl::cpp::Vector3(-ray_D[0], -ray_D[1], -ray_D[2]);
-  pgl_vec3f pglWo = openpgl::cpp::Vector3(ray_D[0], ray_D[1], ray_D[2]);
+  const pgl_vec3f zero = guiding_vec3f(zero_float3());
+  const pgl_vec3f one = guiding_vec3f(one_float3());
+  const float3 ray_P = INTEGRATOR_STATE(state, ray, P);
+  const float3 ray_D = INTEGRATOR_STATE(state, ray, D);
+  const float3 P = ray_P + isect->t * ray_D;
 
   state->guiding.path_segment = 
state->guiding.path_segment_storage->NextSegment();
-  openpgl::cpp::SetPosition(state->guiding.path_segment, pglP);
-  openpgl::cpp::SetDirectionOut(state->guiding.path_segment, pglWi);
-  openpgl::cpp::SetNormal(state->guiding.path_segment, pglWi);
-  openpgl::cpp::SetDirectionIn(state->guiding.path_segment, pglWo);
+  openpgl::cpp::SetPosition(state->guiding.path_segment, guiding_point3f(P));
+  openpgl::cpp::SetDirectionOut(state->guiding.path_segment, 
guiding_vec3f(-ray_D));
+  openpgl::cpp::SetNormal(state->guiding.path_segment, guiding_vec3f(-ray_D));
+  openpgl::cpp::SetDirectionIn(state->guiding.path_segment, 
guiding_vec3f(ray_D));
   openpgl::cpp::SetPDFDirectionIn(state->guiding.path_segment, 1.0f);
   openpgl::cpp::SetVolumeScatter(state->guiding.path_segment, false);
-  openpgl::cpp::SetScatteredContribution(state->guiding.path_segment, pglZero);
-  openpgl::cpp::SetDirectContribution(state->guiding.path_segment, pglZero);
-  openpgl::cpp::SetTransmittanceWeight(state->guiding.path_segment, pglOne);
-  openpgl::cpp::SetScatteringWeight(state->guiding.path_segment, pglOne);
+  openpgl::cpp::SetScatteredContribution(state->guiding.path_segment, zero);
+  openpgl::cpp::SetDirectContribution(state->guiding.path_segment, zero);
+  openpgl::cpp::SetTransmittanceWeight(state->guiding.path_segment, one);
+  openpgl::cpp::SetScatteringWeight(state->guiding.path_segment, one);
   openpgl::cpp::SetEta(state->guiding.path_segment, 1.0f);
 #endif
 }
@@ -54,18 +65,16 @@ ccl_device_forceinline void 
guiding_record_surface_segment(KernelGlobals kg,
 return;
   }
 
-  const pgl_vec3f pglZero = openpgl::cpp::Vector3(0.f, 0.f, 0.f);
-  const pgl_vec3f pglOne = openpgl::cpp::Vector3(1.f, 1.f, 1.f);
-  pgl_point3f pglP = openpgl::cpp::Point3(sd->P.x, sd->P.y, sd->P.z);
-  pgl_vec3f pglWi = openpgl::cpp::Vector3(sd->I.x, sd->I.y, sd->I.z);
+  const pgl_vec3f zero = guiding_vec3f(zero_float3());
+  const pgl_vec3f one = guiding_vec3f(one_float3());
 
   state->guiding.path_segment = 
state->guiding.path_segment_storage->NextSegment();
-  openpgl::cpp::SetPosition(state->guiding.path_segment, pglP);
-  openpgl::cpp::SetDirectionOut(state->guiding.path_segment, pglWi);
+  openpgl::cpp::SetPosition(state->guiding.path_segment, 
guiding_point3f(sd->P));
+  openpgl::cpp::SetDirectionOut(state->guiding.path_segment, 
guiding_vec3f(sd->I));
   openpgl::cpp::SetVolumeScatter(state->guiding.path_segment, false);
-  openpgl::cpp::SetScatteredContribution(state->guiding.path_segment, pglZero);
-  openpgl::cpp::SetDirectContribution(state->guiding.path_segment, pglZero);
-  openpgl::cpp::SetTransmittanceWeight(state->guiding.path_segment, pglOne);
+  openpgl::cpp::SetScatteredContribution(state->guiding.path_segment, zero);
+  

[Bf-blender-cvs] [9ae8cec47a2] cycles_path_guiding: Fix potential correlation issues with PRNG_GUIDING

2022-08-25 Thread Brecht Van Lommel
Commit: 9ae8cec47a275c285681ed625f9c523b96d74384
Author: Brecht Van Lommel
Date:   Thu Aug 25 21:44:53 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB9ae8cec47a275c285681ed625f9c523b96d74384

Fix potential correlation issues with PRNG_GUIDING

===

M   intern/cycles/kernel/integrator/shade_volume.h
M   intern/cycles/kernel/integrator/shader_eval.h
M   intern/cycles/kernel/types.h

===

diff --git a/intern/cycles/kernel/integrator/shade_volume.h 
b/intern/cycles/kernel/integrator/shade_volume.h
index f3fb0edf2ba..e7bc069b1d8 100644
--- a/intern/cycles/kernel/integrator/shade_volume.h
+++ b/intern/cycles/kernel/integrator/shade_volume.h
@@ -1057,7 +1057,7 @@ ccl_device_inline void 
shader_prepare_volume_guiding(KernelGlobals kg,
   // if (fabsf(mean_cosine) < 0.1f ) { // for now we only support HG phase 
function with very
   // low anisotropy
   if (true) {
-grand = path_state_rng_1D(kg, rng_state, PRNG_GUIDING);
+grand = path_state_rng_1D_hash(kg, rng_state, 0xa172f2f0);
 
 pgl_point3f pgl_P = openpgl::cpp::Point3(P[0], P[1], P[2]);
 pgl_point3f pgl_W = openpgl::cpp::Vector3(W[0], W[1], W[2]);
diff --git a/intern/cycles/kernel/integrator/shader_eval.h 
b/intern/cycles/kernel/integrator/shader_eval.h
index b3f99d752c4..866387cdf1b 100644
--- a/intern/cycles/kernel/integrator/shader_eval.h
+++ b/intern/cycles/kernel/integrator/shader_eval.h
@@ -113,7 +113,7 @@ ccl_device_inline void 
shader_prepare_surface_guiding(KernelGlobals kg,
 
   if (guiding && surface_guiding) {
 
-grand = path_state_rng_1D(kg, rng_state, PRNG_GUIDING);
+grand = path_state_rng_1D_hash(kg, rng_state, 0xa172f2f0);
 
 for (int i = 0; i < sd->num_closure; i++) {
   ShaderClosure *sc = >closure[i];
diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h
index 40907060b8a..746b3bf9231 100644
--- a/intern/cycles/kernel/types.h
+++ b/intern/cycles/kernel/types.h
@@ -174,8 +174,6 @@ enum PathTraceDimension {
   PRNG_SCATTER_DISTANCE = 7,
   PRNG_BOUNCE_NUM = 8,
 
-  PRNG_GUIDING = 9,
-
   PRNG_BEVEL_U = 6, /* reuse volume dimension, correlation won't harm */
   PRNG_BEVEL_V = 7,
 };

___
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] [6362f2d8d1f] cycles_path_guiding: Replace rr_throughput with factor to multiply with throughput

2022-08-25 Thread Brecht Van Lommel
Commit: 6362f2d8d1fdd71bc3c5eea908950283c1e19fc6
Author: Brecht Van Lommel
Date:   Thu Aug 25 18:45:11 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB6362f2d8d1fdd71bc3c5eea908950283c1e19fc6

Replace rr_throughput with factor to multiply with throughput

This seems simpler and more efficient overall.

It also removes a division by albedo of rr_throughput in random walk SSS,
which seems wrong.

===

M   intern/cycles/kernel/integrator/path_state.h
M   intern/cycles/kernel/integrator/shade_surface.h
M   intern/cycles/kernel/integrator/shade_volume.h
M   intern/cycles/kernel/integrator/state_template.h
M   intern/cycles/kernel/integrator/subsurface.h
M   intern/cycles/kernel/integrator/subsurface_disk.h
M   intern/cycles/kernel/integrator/subsurface_random_walk.h

===

diff --git a/intern/cycles/kernel/integrator/path_state.h 
b/intern/cycles/kernel/integrator/path_state.h
index 550ee8e71c7..51a139a219d 100644
--- a/intern/cycles/kernel/integrator/path_state.h
+++ b/intern/cycles/kernel/integrator/path_state.h
@@ -57,7 +57,7 @@ ccl_device_inline void 
path_state_init_integrator(KernelGlobals kg,
   INTEGRATOR_STATE_WRITE(state, path, throughput) = one_spectrum();
 
 #ifdef __PATH_GUIDING__
-  INTEGRATOR_STATE_WRITE(state, path, rr_throughput) = one_spectrum();
+  INTEGRATOR_STATE_WRITE(state, path, guiding_throughput) = 1.0f;
 #endif
 
 #ifdef __MNEE__
@@ -253,11 +253,11 @@ ccl_device_inline float 
path_state_continuation_probability(KernelGlobals kg,
 
   /* Probabilistic termination: use sqrt() to roughly match typical view
* transform and do path termination a bit later on average. */
-#ifdef __PATH_GUIDING__
-  return min(sqrtf(reduce_max(fabs(INTEGRATOR_STATE(state, path, 
rr_throughput, 1.0f);
-#else
-  return min(sqrtf(reduce_max(fabs(INTEGRATOR_STATE(state, path, 
throughput, 1.0f);
+  Spectrum throughput = INTEGRATOR_STATE(state, path, throughput);
+#if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 4
+  throughput *= INTEGRATOR_STATE(state, path, guiding_throughput);
 #endif
+  return min(sqrtf(reduce_max(fabs(throughput))), 1.0f);
 }
 
 ccl_device_inline bool path_state_ao_bounce(KernelGlobals kg, 
ConstIntegratorState state)
diff --git a/intern/cycles/kernel/integrator/shade_surface.h 
b/intern/cycles/kernel/integrator/shade_surface.h
index 9bf8da1bf4c..f8b79d7919b 100644
--- a/intern/cycles/kernel/integrator/shade_surface.h
+++ b/intern/cycles/kernel/integrator/shade_surface.h
@@ -352,7 +352,8 @@ ccl_device_forceinline void 
integrate_surface_direct_light(KernelGlobals kg,
 #  ifdef __PATH_GUIDING__
   INTEGRATOR_STATE_WRITE(
   shadow_state, shadow_path, scattered_contribution) = 
scattered_contribution;
-  INTEGRATOR_STATE_WRITE(shadow_state, shadow_path, path_segment) = 
state->guiding.path_segment;
+  INTEGRATOR_STATE_WRITE(shadow_state, shadow_path, path_segment) = 
INTEGRATOR_STATE(
+  state, guiding, path_segment);
 #  endif
 }
 #endif
@@ -381,7 +382,7 @@ ccl_device_forceinline int 
integrate_surface_bsdf_bssrdf_bounce(
 #endif
 
   /* BSDF closure, sample direction. */
-  float bsdf_pdf;
+  float bsdf_pdf = 0.0f, guided_bsdf_pdf = 0.0f;
   BsdfEval bsdf_eval ccl_optional_struct_init;
   float3 bsdf_omega_in ccl_optional_struct_init;
   int label;
@@ -390,7 +391,6 @@ ccl_device_forceinline int 
integrate_surface_bsdf_bssrdf_bounce(
   float bsdf_eta = 1.0f;
 
 #if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 4
-  float guided_bsdf_pdf;
   if (kernel_data.integrator.use_guiding) {
 label = shader_guided_bsdf_sample_closure(kg,
   state,
@@ -404,8 +404,16 @@ ccl_device_forceinline int 
integrate_surface_bsdf_bssrdf_bounce(
   _pdf,
   _sampled_roughness,
   _eta);
+
+if (guided_bsdf_pdf == 0.0f || bsdf_eval_is_zero(_eval)) {
+  return LABEL_NONE;
+}
+
+INTEGRATOR_STATE_WRITE(state, path, guiding_throughput) *= guided_bsdf_pdf 
/ bsdf_pdf;
   }
-  else {
+  else
+#endif
+  {
 label = shader_bsdf_sample_closure(kg,
sd,
sc,
@@ -416,27 +424,13 @@ ccl_device_forceinline int 
integrate_surface_bsdf_bssrdf_bounce(
_pdf,
_sampled_roughness,
_eta);
+
+if (bsdf_pdf == 0.0f || bsdf_eval_is_zero(_eval)) {
+  return LABEL_NONE;
+}
+
 guided_bsdf_pdf = bsdf_pdf;
   }
-  if (guided_bsdf_pdf == 0.0f || bsdf_eval_is_zero(_eval)) {
-return LABEL_NONE;
-  }
-#else
-  label = shader_bsdf_sample_closure(kg,
- sd,
- sc,
- 

[Bf-blender-cvs] [54a6ae709ff] cycles_path_guiding: Refactor functions to record paths for path guiding:

2022-08-25 Thread Brecht Van Lommel
Commit: 54a6ae709ff03309eed5996253e92270d5ae6a13
Author: Brecht Van Lommel
Date:   Thu Aug 25 17:28:13 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB54a6ae709ff03309eed5996253e92270d5ae6a13

Refactor functions to record paths for path guiding:

* Use guiding_record_ prefix for all, and rename to better match Cycles
  terminology.
* Move #ifdefs into guiding.h where possible to simplify code calling these.
* Fix missing call to guiding_new_virtual_light_segment with volumes in front
  of lights, by moving this into the shade_light kernel.
* Fix missing call to guiding_add_background for distant lights.

===

M   intern/cycles/kernel/integrator/guiding.h
M   intern/cycles/kernel/integrator/intersect_closest.h
M   intern/cycles/kernel/integrator/path_state.h
M   intern/cycles/kernel/integrator/shade_background.h
M   intern/cycles/kernel/integrator/shade_light.h
M   intern/cycles/kernel/integrator/shade_shadow.h
M   intern/cycles/kernel/integrator/shade_surface.h
M   intern/cycles/kernel/integrator/shade_volume.h
M   intern/cycles/kernel/integrator/subsurface_disk.h
M   intern/cycles/kernel/integrator/subsurface_random_walk.h

===

diff --git a/intern/cycles/kernel/integrator/guiding.h 
b/intern/cycles/kernel/integrator/guiding.h
index f9a7f3e8f69..dfeec9b3471 100644
--- a/intern/cycles/kernel/integrator/guiding.h
+++ b/intern/cycles/kernel/integrator/guiding.h
@@ -11,11 +11,16 @@
 
 CCL_NAMESPACE_BEGIN
 
-#if defined(__PATH_GUIDING__)
-#  if PATH_GUIDING_LEVEL >= 1
-ccl_device_forceinline void guiding_new_virtual_light_segment(
-IntegratorState state, ccl_private const Intersection *ccl_restrict isect)
+/* Path recording for guiding. */
+
+ccl_device_forceinline void guiding_record_light_surface_segment(
+KernelGlobals kg, IntegratorState state, ccl_private const Intersection 
*ccl_restrict isect)
 {
+#if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 1
+  if (!kernel_data.integrator.use_guiding) {
+return;
+  }
+
   const pgl_vec3f pglZero = openpgl::cpp::Vector3(0.f, 0.f, 0.f);
   const pgl_vec3f pglOne = openpgl::cpp::Vector3(1.f, 1.f, 1.f);
   float3 ray_P = INTEGRATOR_STATE(state, ray, P);
@@ -37,11 +42,18 @@ ccl_device_forceinline void 
guiding_new_virtual_light_segment(
   openpgl::cpp::SetTransmittanceWeight(state->guiding.path_segment, pglOne);
   openpgl::cpp::SetScatteringWeight(state->guiding.path_segment, pglOne);
   openpgl::cpp::SetEta(state->guiding.path_segment, 1.0f);
+#endif
 }
 
-ccl_device_forceinline void guiding_new_surface_segment(IntegratorState state,
-const ShaderData *sd)
+ccl_device_forceinline void guiding_record_surface_segment(KernelGlobals kg,
+   IntegratorState 
state,
+   ccl_private const 
ShaderData *sd)
 {
+#if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 1
+  if (!kernel_data.integrator.use_guiding) {
+return;
+  }
+
   const pgl_vec3f pglZero = openpgl::cpp::Vector3(0.f, 0.f, 0.f);
   const pgl_vec3f pglOne = openpgl::cpp::Vector3(1.f, 1.f, 1.f);
   pgl_point3f pglP = openpgl::cpp::Point3(sd->P.x, sd->P.y, sd->P.z);
@@ -55,22 +67,30 @@ ccl_device_forceinline void 
guiding_new_surface_segment(IntegratorState state,
   openpgl::cpp::SetDirectContribution(state->guiding.path_segment, pglZero);
   openpgl::cpp::SetTransmittanceWeight(state->guiding.path_segment, pglOne);
   openpgl::cpp::SetEta(state->guiding.path_segment, 1.0);
+#endif
 }
 
-ccl_device_forceinline void guiding_add_bsdf_data(IntegratorState state,
-  const ShaderData *sd,
-  const Spectrum bsdf_weight,
-  const float bsdf_pdf,
-  const float3 
bsdf_shading_normal,
-  const float3 bsdf_omega_in,
-  const float2 bsdf_roughness,
-  const float bsdf_eta,
-  const bool bsdf_is_delta)
+ccl_device_forceinline void guiding_record_surface_bounce(KernelGlobals kg,
+  IntegratorState 
state,
+  ccl_private const 
ShaderData *sd,
+  const Spectrum 
bsdf_weight,
+  const float bsdf_pdf,
+  const float3 
bsdf_shading_normal,
+  

[Bf-blender-cvs] [fe2ec0ae136] cycles_path_guiding: Cleanup: rename/tweak film accumulation functions for consistency with guiding

2022-08-25 Thread Brecht Van Lommel
Commit: fe2ec0ae1367c9464d8315e42f0d385ca9c1da7c
Author: Brecht Van Lommel
Date:   Thu Aug 25 18:19:14 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rBfe2ec0ae1367c9464d8315e42f0d385ca9c1da7c

Cleanup: rename/tweak film accumulation functions for consistency with guiding

===

M   intern/cycles/kernel/film/accumulate.h
M   intern/cycles/kernel/integrator/init_from_bake.h
M   intern/cycles/kernel/integrator/init_from_camera.h
M   intern/cycles/kernel/integrator/shade_background.h
M   intern/cycles/kernel/integrator/shade_light.h
M   intern/cycles/kernel/integrator/shade_shadow.h
M   intern/cycles/kernel/integrator/shade_surface.h
M   intern/cycles/kernel/integrator/shade_volume.h

===

diff --git a/intern/cycles/kernel/film/accumulate.h 
b/intern/cycles/kernel/film/accumulate.h
index 97ec915a8ad..4dde085cc83 100644
--- a/intern/cycles/kernel/film/accumulate.h
+++ b/intern/cycles/kernel/film/accumulate.h
@@ -95,9 +95,7 @@ ccl_device_inline Spectrum 
bsdf_eval_pass_glossy_weight(ccl_private const BsdfEv
  * to render buffers instead of using per-thread memory, and to avoid the
  * impact of clamping on other contributions. */
 
-ccl_device_forceinline void kernel_accum_clamp(KernelGlobals kg,
-   ccl_private Spectrum *L,
-   int bounce)
+ccl_device_forceinline void film_accum_clamp(KernelGlobals kg, ccl_private 
Spectrum *L, int bounce)
 {
 #ifdef __KERNEL_DEBUG_NAN__
   if (!isfinite_safe(*L)) {
@@ -124,7 +122,7 @@ ccl_device_forceinline void 
kernel_accum_clamp(KernelGlobals kg,
  */
 
 /* Get pointer to pixel in render buffer. */
-ccl_device_forceinline ccl_global float *kernel_accum_pixel_render_buffer(
+ccl_device_forceinline ccl_global float *film_accum_pixel_render_buffer(
 KernelGlobals kg, ConstIntegratorState state, ccl_global float 
*ccl_restrict render_buffer)
 {
   const uint32_t render_pixel_index = INTEGRATOR_STATE(state, path, 
render_pixel_index);
@@ -137,27 +135,27 @@ ccl_device_forceinline ccl_global float 
*kernel_accum_pixel_render_buffer(
  * Adaptive sampling.
  */
 
-ccl_device_inline int kernel_accum_sample(KernelGlobals kg,
-  ConstIntegratorState state,
-  ccl_global float *ccl_restrict 
render_buffer,
-  int sample,
-  int sample_offset)
+ccl_device_inline int film_accum_sample(KernelGlobals kg,
+ConstIntegratorState state,
+ccl_global float *ccl_restrict 
render_buffer,
+int sample,
+int sample_offset)
 {
   if (kernel_data.film.pass_sample_count == PASS_UNUSED) {
 return sample;
   }
 
-  ccl_global float *buffer = kernel_accum_pixel_render_buffer(kg, state, 
render_buffer);
+  ccl_global float *buffer = film_accum_pixel_render_buffer(kg, state, 
render_buffer);
 
   return atomic_fetch_and_add_uint32(
  (ccl_global uint *)(buffer) + kernel_data.film.pass_sample_count, 
1) +
  sample_offset;
 }
 
-ccl_device void kernel_accum_adaptive_buffer(KernelGlobals kg,
- const int sample,
- const Spectrum contribution,
- ccl_global float *ccl_restrict 
buffer)
+ccl_device void film_accum_adaptive_buffer(KernelGlobals kg,
+   const int sample,
+   const Spectrum contribution,
+   ccl_global float *ccl_restrict 
buffer)
 {
   /* Adaptive Sampling. Fill the additional buffer with the odd samples and 
calculate our stopping
* criteria. This is the heuristic from "A hierarchical automatic stopping 
condition for Monte
@@ -190,10 +188,10 @@ ccl_device void 
kernel_accum_adaptive_buffer(KernelGlobals kg,
  * Returns truth if the contribution is fully handled here and is not to be 
added to the other
  * passes (like combined, adaptive sampling). */
 
-ccl_device bool kernel_accum_shadow_catcher(KernelGlobals kg,
-const uint32_t path_flag,
-const Spectrum contribution,
-ccl_global float *ccl_restrict 
buffer)
+ccl_device bool film_accum_shadow_catcher(KernelGlobals kg,
+  const uint32_t path_flag,
+  const Spectrum contribution,
+  ccl_global float *ccl_restrict 
buffer)
 {
   if 

[Bf-blender-cvs] [72c90a2dc4e] cycles_path_guiding: Add initial guiding regression tests

2022-08-25 Thread Brecht Van Lommel
Commit: 72c90a2dc4eca9bc4961c9e50d3e64147d1da8b1
Author: Brecht Van Lommel
Date:   Thu Aug 25 21:16:50 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB72c90a2dc4eca9bc4961c9e50d3e64147d1da8b1

Add initial guiding regression tests

===

M   tests/python/CMakeLists.txt

===

diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index ca3070b60ad..07bc50a7b0a 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -644,6 +644,7 @@ if(WITH_CYCLES OR WITH_OPENGL_RENDER_TESTS)
   camera
   bsdf
   hair
+  guiding
   image_colorspace
   image_data_types
   image_mapping

___
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] [cca72b4d2e9] cycles_path_guiding: Merge branch 'master' into cycles_path_guiding

2022-08-25 Thread Brecht Van Lommel
Commit: cca72b4d2e94b2f683d3741f8b0db7020bb8c151
Author: Brecht Van Lommel
Date:   Thu Aug 25 15:32:31 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rBcca72b4d2e94b2f683d3741f8b0db7020bb8c151

Merge branch 'master' into cycles_path_guiding

===



===



___
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] [047d0e6c4a9] master: Merge branch 'blender-v3.3-release'

2022-08-25 Thread Bastien Montagne
Commit: 047d0e6c4a96827a35d10111f08a631c8a2c0b64
Author: Bastien Montagne
Date:   Thu Aug 25 17:26:58 2022 +0200
Branches: master
https://developer.blender.org/rB047d0e6c4a96827a35d10111f08a631c8a2c0b64

Merge branch 'blender-v3.3-release'

===



===



___
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] [500d8154789] blender-v3.3-release: Fix T100255: Make RigidBodyWorld (and effector_weights) collections refcounted.

2022-08-25 Thread Bastien Montagne
Commit: 500d815478966de6ad509c2e6a73c61fce8513a5
Author: Bastien Montagne
Date:   Thu Aug 25 17:21:39 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB500d815478966de6ad509c2e6a73c61fce8513a5

Fix T100255: Make RigidBodyWorld (and effector_weights) collections refcounted.

Those collections were so far mainly just tagged as fake user (even
though a few places in code already incremented usercount on them).

Since we now clear the fakeuser flag when linking/appending data, ensure
that these collections are preserved by making these usages regular ID
refcounting ones.

Reviewed By: brecht

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

===

M   source/blender/blenkernel/intern/object.cc
M   source/blender/blenkernel/intern/particle.c
M   source/blender/blenkernel/intern/rigidbody.c
M   source/blender/editors/physics/rigidbody_constraint.c
M   source/blender/makesrna/intern/rna_object_force.c
M   source/blender/makesrna/intern/rna_rigidbody.c
M   source/blender/modifiers/intern/MOD_cloth.c
M   source/blender/modifiers/intern/MOD_dynamicpaint.c
M   source/blender/modifiers/intern/MOD_fluid.c

===

diff --git a/source/blender/blenkernel/intern/object.cc 
b/source/blender/blenkernel/intern/object.cc
index 62ebb45b0ed..2a85811e2e8 100644
--- a/source/blender/blenkernel/intern/object.cc
+++ b/source/blender/blenkernel/intern/object.cc
@@ -449,7 +449,7 @@ static void object_foreach_id(ID *id, LibraryForeachIDData 
*data)
 
 if (object->soft->effector_weights) {
   BKE_LIB_FOREACHID_PROCESS_IDSUPER(
-  data, object->soft->effector_weights->group, IDWALK_CB_NOP);
+  data, object->soft->effector_weights->group, IDWALK_CB_USER);
 }
   }
 }
diff --git a/source/blender/blenkernel/intern/particle.c 
b/source/blender/blenkernel/intern/particle.c
index 2471d3baa59..c5344997733 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -171,7 +171,7 @@ static void particle_settings_foreach_id(ID *id, 
LibraryForeachIDData *data)
   }
 
   if (psett->effector_weights) {
-BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, psett->effector_weights->group, 
IDWALK_CB_NOP);
+BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, psett->effector_weights->group, 
IDWALK_CB_USER);
   }
 
   if (psett->pd) {
diff --git a/source/blender/blenkernel/intern/rigidbody.c 
b/source/blender/blenkernel/intern/rigidbody.c
index 821976f8e0e..e5fb61bfa2f 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1176,6 +1176,9 @@ RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld 
*rbw, const int flag)
 
   if (rbw->effector_weights) {
 rbw_copy->effector_weights = MEM_dupallocN(rbw->effector_weights);
+if ((flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0) {
+  id_us_plus((ID *)rbw->effector_weights->group);
+}
   }
   if ((flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0) {
 id_us_plus((ID *)rbw_copy->group);
@@ -1205,9 +1208,9 @@ void BKE_rigidbody_world_groups_relink(RigidBodyWorld 
*rbw)
 
 void BKE_rigidbody_world_id_loop(RigidBodyWorld *rbw, RigidbodyWorldIDFunc 
func, void *userdata)
 {
-  func(rbw, (ID **)>group, userdata, IDWALK_CB_NOP);
-  func(rbw, (ID **)>constraints, userdata, IDWALK_CB_NOP);
-  func(rbw, (ID **)>effector_weights->group, userdata, IDWALK_CB_NOP);
+  func(rbw, (ID **)>group, userdata, IDWALK_CB_USER);
+  func(rbw, (ID **)>constraints, userdata, IDWALK_CB_USER);
+  func(rbw, (ID **)>effector_weights->group, userdata, IDWALK_CB_USER);
 
   if (rbw->objects) {
 int i;
@@ -1424,7 +1427,7 @@ static bool rigidbody_add_object_to_scene(Main *bmain, 
Scene *scene, Object *ob)
 
   if (rbw->group == NULL) {
 rbw->group = BKE_collection_add(bmain, NULL, "RigidBodyWorld");
-id_fake_user_set(>group->id);
+id_us_plus(>group->id);
   }
 
   /* Add object to rigid body group. */
@@ -1453,7 +1456,7 @@ static bool rigidbody_add_constraint_to_scene(Main 
*bmain, Scene *scene, Object
 
   if (rbw->constraints == NULL) {
 rbw->constraints = BKE_collection_add(bmain, NULL, "RigidBodyConstraints");
-id_fake_user_set(>constraints->id);
+id_us_plus(>constraints->id);
   }
 
   /* Add object to rigid body group. */
diff --git a/source/blender/editors/physics/rigidbody_constraint.c 
b/source/blender/editors/physics/rigidbody_constraint.c
index 66ae2d323fd..b7c82c18433 100644
--- a/source/blender/editors/physics/rigidbody_constraint.c
+++ b/source/blender/editors/physics/rigidbody_constraint.c
@@ -88,7 +88,7 @@ bool ED_rigidbody_constraint_add(
   /* create constraint group if it doesn't already exits */
   if (rbw->constraints == NULL) {
 rbw->constraints = BKE_collection_add(bmain, NULL, "RigidBodyConstraints");
-id_fake_user_set(>constraints->id);
+

[Bf-blender-cvs] [9b41ac62514] master: Revert "LibOverride: Preserve viewlayers when creating overrides of collecitons."

2022-08-25 Thread Bastien Montagne
Commit: 9b41ac625144b09868229fd3e14f5269d97cf44b
Author: Bastien Montagne
Date:   Thu Aug 25 16:17:34 2022 +0200
Branches: master
https://developer.blender.org/rB9b41ac625144b09868229fd3e14f5269d97cf44b

Revert "LibOverride: Preserve viewlayers when creating overrides of 
collecitons."

Commit is not working as expected in some cases, as revealed by
liboverride testcase entering infinite loop.

Code needs some more thinking.

This reverts commit ee7bd79b54a32d64fe0337695d438ad34990d121.

===

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

===

diff --git a/source/blender/blenkernel/intern/layer.c 
b/source/blender/blenkernel/intern/layer.c
index 69e3fd1f5a4..53a9b6d469d 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -879,10 +879,7 @@ static LayerCollectionResync 
*layer_collection_resync_find(LayerCollectionResync
 current_layer_resync = queue_head;
 queue_head = current_layer_resync->queue_next;
 
-if ((current_layer_resync->collection == child_collection ||
- (ID_IS_OVERRIDE_LIBRARY(child_collection) &&
-  (_layer_resync->collection->id ==
-   child_collection->id.override_library->reference))) &&
+if (current_layer_resync->collection == child_collection &&
 (current_layer_resync->parent_layer_resync == layer_resync ||
  (!current_layer_resync->is_used && 
!current_layer_resync->is_valid_as_child))) {
   /* This layer is a valid candidate, because its collection matches the 
seeked one, AND:
@@ -1051,113 +1048,107 @@ static void layer_collection_sync(ViewLayer 
*view_layer,
 
   BLI_assert(layer_resync->is_used);
 
-  for (int i = 1; i >= 0; i--) {
-LISTBASE_FOREACH (CollectionChild *, child, 
_resync->collection->children) {
-  Collection *child_collection = child->collection;
-  if (ID_IS_OVERRIDE_LIBRARY(child_collection) != (i == 0)) {
-continue;
-  }
-
-  LayerCollectionResync *child_layer_resync = 
layer_collection_resync_find(layer_resync,
-   
child_collection);
-
-  if (child_layer_resync != NULL) {
-BLI_assert(child_layer_resync->collection != NULL);
-BLI_assert(child_layer_resync->layer != NULL);
-BLI_assert(child_layer_resync->is_usable);
-
-if (child_layer_resync->is_used) {
-  CLOG_INFO(,
-4,
-"Found same existing LayerCollection for %s as child of 
%s",
-child_collection->id.name,
-layer_resync->collection->id.name);
-}
-else {
-  CLOG_INFO(,
-4,
-"Found a valid unused LayerCollection for %s as child of 
%s, re-using it",
-child_collection->id.name,
-layer_resync->collection->id.name);
-}
+  LISTBASE_FOREACH (CollectionChild *, child, 
_resync->collection->children) {
+Collection *child_collection = child->collection;
+LayerCollectionResync *child_layer_resync = 
layer_collection_resync_find(layer_resync,
+ 
child_collection);
 
-child_layer_resync->is_used = true;
+if (child_layer_resync != NULL) {
+  BLI_assert(child_layer_resync->collection != NULL);
+  BLI_assert(child_layer_resync->layer != NULL);
+  BLI_assert(child_layer_resync->is_usable);
 
-/* NOTE: Do not move the resync wrapper to match the new layer 
hierarchy, so that the old
- * parenting info remains available. In case a search for a valid 
layer in the children of
- * the current is required again, the old parenting hierarchy is 
needed as reference, not
- * the new one.
- */
-
BLI_remlink(_layer_resync->parent_layer_resync->layer->layer_collections,
-child_layer_resync->layer);
-BLI_addtail(_lb_layer, child_layer_resync->layer);
+  if (child_layer_resync->is_used) {
+CLOG_INFO(,
+  4,
+  "Found same existing LayerCollection for %s as child of %s",
+  child_collection->id.name,
+  layer_resync->collection->id.name);
   }
   else {
 CLOG_INFO(,
   4,
-  "No available LayerCollection for %s as child of %s, 
creating a new one",
+  "Found a valid unused LayerCollection for %s as child of %s, 
re-using it",
   child_collection->id.name,
   layer_resync->collection->id.name);
-
-LayerCollection *child_layer = layer_collection_add(_lb_layer, 
child_collection);
-child_layer->flag = parent_layer_flag;
-
-child_layer_resync = BLI_mempool_calloc(layer_resync_mempool);
-

[Bf-blender-cvs] [252b3ec381a] tmp_libupdate_34: Clarify comment and code for enabling USD OpenGL support.

2022-08-25 Thread Brecht Van Lommel
Commit: 252b3ec381af9d0f121c81da8628ee517b4c050e
Author: Brecht Van Lommel
Date:   Thu Aug 25 15:19:46 2022 +0200
Branches: tmp_libupdate_34
https://developer.blender.org/rB252b3ec381af9d0f121c81da8628ee517b4c050e

Clarify comment and code for enabling USD OpenGL support.

===

M   build_files/build_environment/cmake/usd.cmake

===

diff --git a/build_files/build_environment/cmake/usd.cmake 
b/build_files/build_environment/cmake/usd.cmake
index a8eb6be1231..1183e33a37d 100644
--- a/build_files/build_environment/cmake/usd.cmake
+++ b/build_files/build_environment/cmake/usd.cmake
@@ -58,11 +58,11 @@ set(USD_EXTRA_ARGS
   # cube, etc.) to geometry, it's not necessary. Disabling it will make it
   # simpler to build Blender; currently only Cycles uses OSL.
   -DPXR_ENABLE_OSL_SUPPORT=OFF
-  # Keep OpenGL and Metal enabled for Hydra support. Note that this indirectly 
also
-  # adds an X11 dependency on Linux, which would be good to eliminate for 
headless
-  # and Wayland only builds.
-  #-DPXR_ENABLE_GL_SUPPORT=OFF
-  #-DPXR_ENABLE_METAL_SUPPORT=OFF
+  # Enable OpenGL for Hydra support. Note that this indirectly also adds an X11
+  # dependency on Linux. This would be good to eliminate for headless and 
Wayland
+  # only builds, however is not worse than what Blender already links to for
+  # official releases currently.
+  -DPXR_ENABLE_GL_SUPPORT=ON
   # OIIO is used for loading image textures in Hydra Storm / Embree renderers.
   -DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON
   # USD 22.03 does not support OCIO 2.x

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


[Bf-blender-cvs] [8121fedbf5c] tmp_libupdate_34: Move usercustomize.py to less conspicuous location

2022-08-25 Thread Brecht Van Lommel
Commit: 8121fedbf5cbe1fdb8588746680a88e024261bb4
Author: Brecht Van Lommel
Date:   Thu Aug 25 14:44:11 2022 +0200
Branches: tmp_libupdate_34
https://developer.blender.org/rB8121fedbf5cbe1fdb8588746680a88e024261bb4

Move usercustomize.py to less conspicuous location

===

R072release/scripts/usercustomize.py
release/windows/python/usercustomize.py
M   source/creator/CMakeLists.txt

===

diff --git a/release/scripts/usercustomize.py 
b/release/windows/python/usercustomize.py
similarity index 72%
rename from release/scripts/usercustomize.py
rename to release/windows/python/usercustomize.py
index 09b1be45ed9..8d752581183 100644
--- a/release/scripts/usercustomize.py
+++ b/release/windows/python/usercustomize.py
@@ -1,11 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Make shared libraries needed by modules available in standalone Python 
binary.
 
-#  Filename : usercustomize.py
-#  Author   : Brecht van Lommel
-#  Date : 17/08/2022
-#  Purpose  : make shared libraries  needed by modules available in standalone 
Python binary
 import sys
 import os
+
 if sys.platform == 'win32':
 exe_dir, exe_file = os.path.split(sys.executable)
 if exe_file.startswith('python'):
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 7bb3dfa7d83..35b4fbacc03 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -389,11 +389,10 @@ if(WITH_PYTHON)
 PATTERN "__pycache__" EXCLUDE
 PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE
 PATTERN "${FREESTYLE_EXCLUDE_CONDITIONAL}" EXCLUDE
-PATTERN "*usercustomize.py" EXCLUDE
   )
   if(WIN32)
 install(
-  FILES ${CMAKE_SOURCE_DIR}/release/scripts/usercustomize.py
+  FILES ${CMAKE_SOURCE_DIR}/release/windows/python/usercustomize.py
   DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
 )
   endif()

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


[Bf-blender-cvs] [093607423de] master: Merge branch 'blender-v3.3-release'

2022-08-25 Thread Bastien Montagne
Commit: 093607423debb15809679fd23aa6dfca24c551fd
Author: Bastien Montagne
Date:   Thu Aug 25 12:23:27 2022 +0200
Branches: master
https://developer.blender.org/rB093607423debb15809679fd23aa6dfca24c551fd

Merge branch 'blender-v3.3-release'

===



===



___
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] [b27856f12e3] blender-v3.3-release: Update liboverride operators to manual mapping.

2022-08-25 Thread Bastien Montagne
Commit: b27856f12e35b23b5e30443e2647ac76234c2fa7
Author: Bastien Montagne
Date:   Thu Aug 25 12:04:46 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rBb27856f12e35b23b5e30443e2647ac76234c2fa7

Update liboverride operators to manual mapping.

===

M   release/scripts/modules/rna_manual_reference.py

===

diff --git a/release/scripts/modules/rna_manual_reference.py 
b/release/scripts/modules/rna_manual_reference.py
index bd22b95a996..1232ead8101 100644
--- a/release/scripts/modules/rna_manual_reference.py
+++ b/release/scripts/modules/rna_manual_reference.py
@@ -165,7 +165,7 @@ url_manual_mapping = (
 ("bpy.types.sequencertimelineoverlay.show_strip_source*", 
"editors/video_sequencer/sequencer/display.html#bpy-types-sequencertimelineoverlay-show-strip-source"),
 ("bpy.types.toolsettings.use_gpencil_automerge_strokes*", 
"grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-automerge-strokes"),
 ("bpy.types.toolsettings.use_proportional_edit_objects*", 
"editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-use-proportional-edit-objects"),
-("bpy.ops.outliner.liboverride_troubleshoot_operation*", 
"files/linked_libraries/library_overrides.html#resync-library-override-hierarchy"),
+("bpy.ops.outliner.liboverride_troubleshoot_operation*", 
"files/linked_libraries/library_overrides.html#bpy-ops-outliner-liboverride_troubleshoot_operation"),
 ("bpy.ops.view3d.edit_mesh_extrude_move_shrink_fatten*", 
"modeling/meshes/editing/face/extrude_faces_normal.html#bpy-ops-view3d-edit-mesh-extrude-move-shrink-fatten"),
 ("bpy.types.brushgpencilsettings.active_smooth_factor*", 
"grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-active-smooth-factor"),
 ("bpy.types.brushgpencilsettings.extend_stroke_factor*", 
"grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-extend-stroke-factor"),
@@ -909,7 +909,7 @@ url_manual_mapping = (
 ("bpy.types.view3doverlay.show_wireframes*", 
"editors/3dview/display/overlays.html#bpy-types-view3doverlay-show-wireframes"),
 ("bpy.types.view3dshading.background_type*", 
"editors/3dview/display/shading.html#bpy-types-view3dshading-background-type"),
 ("bpy.types.workspace.use_filter_by_owner*", 
"interface/window_system/workspaces.html#bpy-types-workspace-use-filter-by-owner"),
-("bpy.ops.outliner.liboverride_operation*", 
"files/linked_libraries/library_overrides.html#library-overrides"),
+("bpy.ops.outliner.liboverride_operation*", 
"files/linked_libraries/library_overrides.html#bpy-ops-outliner-liboverride_operation"),
 ("bpy.ops.gpencil.image_to_grease_pencil*", 
"editors/image/editing.html#bpy-ops-gpencil-image-to-grease-pencil"),
 ("bpy.ops.mesh.vertices_smooth_laplacian*", 
"modeling/meshes/editing/vertex/laplacian_smooth.html#bpy-ops-mesh-vertices-smooth-laplacian"),
 ("bpy.ops.object.multires_rebuild_subdiv*", 
"modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-rebuild-subdiv"),
@@ -993,6 +993,8 @@ url_manual_mapping = (
 ("bpy.ops.object.multires_external_save*", 
"modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-external-save"),
 ("bpy.ops.object.vertex_group_normalize*", 
"sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize"),
 ("bpy.ops.object.visual_transform_apply*", 
"scene_layout/object/editing/apply.html#bpy-ops-object-visual-transform-apply"),
+("bpy.ops.object.clear_override_library*", 
"files/linked_libraries/library_overrides.html#bpy-ops-object-clear-override-library"),
+("bpy.ops.object.reset_override_library*", 
"files/linked_libraries/library_overrides.html#bpy-ops-object-reset-override-library"),
 ("bpy.ops.outliner.collection_duplicate*", 
"editors/outliner/editing.html#bpy-ops-outliner-collection-duplicate"),
 ("bpy.ops.pose.select_constraint_target*", 
"animation/armatures/posing/selecting.html#bpy-ops-pose-select-constraint-target"),
 ("bpy.ops.sequencer.change_effect_input*", 
"video_editing/edit/montage/editing.html#bpy-ops-sequencer-change-effect-input"),
@@ -1084,10 +1086,13 @@ url_manual_mapping = (
 ("bpy.ops.object.make_override_library*", 
"files/linked_libraries/library_overrides.html#bpy-ops-object-make-override-library"),
 ("bpy.ops.object.parent_no_inverse_set*", 
"scene_layout/object/editing/parent.html#bpy-ops-object-parent-no-inverse-set"),
 ("bpy.ops.object.vertex_group_quantize*", 
"sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-quantize"),
+("bpy.ops.object.make_override_library*", 
"files/linked_libraries/library_overrides.html#bpy-ops-object-make-override-library"),
 ("bpy.ops.outliner.collection_instance*", 
"editors/outliner/editing.html#bpy-ops-outliner-collection-instance"),
 

[Bf-blender-cvs] [ee7bd79b54a] master: LibOverride: Preserve viewlayers when creating overrides of collecitons.

2022-08-25 Thread Bastien Montagne
Commit: ee7bd79b54a32d64fe0337695d438ad34990d121
Author: Bastien Montagne
Date:   Thu Aug 25 12:18:54 2022 +0200
Branches: master
https://developer.blender.org/rBee7bd79b54a32d64fe0337695d438ad34990d121

LibOverride: Preserve viewlayers when creating overrides of collecitons.

Usually, when overriding collections, the linked reference ones are
removed from the ViewLayer, and the overrides replace them.

This change to `layer_collection_sync` code makes it so that in case
there is a free viewlayer hierarchy matching the linked collection, it
gets re-used for the override one, instead of re-creating everything
from scratch.

To achieve this, resync process is split into two steps, first regular
collections are processed, then the override ones. This should ensure
an override does not steal the layers of its reference if the later is
still instantiated in the view layer.

===

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

===

diff --git a/source/blender/blenkernel/intern/layer.c 
b/source/blender/blenkernel/intern/layer.c
index 53a9b6d469d..69e3fd1f5a4 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -879,7 +879,10 @@ static LayerCollectionResync 
*layer_collection_resync_find(LayerCollectionResync
 current_layer_resync = queue_head;
 queue_head = current_layer_resync->queue_next;
 
-if (current_layer_resync->collection == child_collection &&
+if ((current_layer_resync->collection == child_collection ||
+ (ID_IS_OVERRIDE_LIBRARY(child_collection) &&
+  (_layer_resync->collection->id ==
+   child_collection->id.override_library->reference))) &&
 (current_layer_resync->parent_layer_resync == layer_resync ||
  (!current_layer_resync->is_used && 
!current_layer_resync->is_valid_as_child))) {
   /* This layer is a valid candidate, because its collection matches the 
seeked one, AND:
@@ -1048,107 +1051,113 @@ static void layer_collection_sync(ViewLayer 
*view_layer,
 
   BLI_assert(layer_resync->is_used);
 
-  LISTBASE_FOREACH (CollectionChild *, child, 
_resync->collection->children) {
-Collection *child_collection = child->collection;
-LayerCollectionResync *child_layer_resync = 
layer_collection_resync_find(layer_resync,
- 
child_collection);
+  for (int i = 1; i >= 0; i--) {
+LISTBASE_FOREACH (CollectionChild *, child, 
_resync->collection->children) {
+  Collection *child_collection = child->collection;
+  if (ID_IS_OVERRIDE_LIBRARY(child_collection) != (i == 0)) {
+continue;
+  }
 
-if (child_layer_resync != NULL) {
-  BLI_assert(child_layer_resync->collection != NULL);
-  BLI_assert(child_layer_resync->layer != NULL);
-  BLI_assert(child_layer_resync->is_usable);
+  LayerCollectionResync *child_layer_resync = 
layer_collection_resync_find(layer_resync,
+   
child_collection);
 
-  if (child_layer_resync->is_used) {
-CLOG_INFO(,
-  4,
-  "Found same existing LayerCollection for %s as child of %s",
-  child_collection->id.name,
-  layer_resync->collection->id.name);
+  if (child_layer_resync != NULL) {
+BLI_assert(child_layer_resync->collection != NULL);
+BLI_assert(child_layer_resync->layer != NULL);
+BLI_assert(child_layer_resync->is_usable);
+
+if (child_layer_resync->is_used) {
+  CLOG_INFO(,
+4,
+"Found same existing LayerCollection for %s as child of 
%s",
+child_collection->id.name,
+layer_resync->collection->id.name);
+}
+else {
+  CLOG_INFO(,
+4,
+"Found a valid unused LayerCollection for %s as child of 
%s, re-using it",
+child_collection->id.name,
+layer_resync->collection->id.name);
+}
+
+child_layer_resync->is_used = true;
+
+/* NOTE: Do not move the resync wrapper to match the new layer 
hierarchy, so that the old
+ * parenting info remains available. In case a search for a valid 
layer in the children of
+ * the current is required again, the old parenting hierarchy is 
needed as reference, not
+ * the new one.
+ */
+
BLI_remlink(_layer_resync->parent_layer_resync->layer->layer_collections,
+child_layer_resync->layer);
+BLI_addtail(_lb_layer, child_layer_resync->layer);
   }
   else {
 CLOG_INFO(,
   4,
-  "Found a valid unused LayerCollection for %s as child of %s, 
re-using it",
+  "No available 

[Bf-blender-cvs] SVN commit: bf-blender [63014] trunk/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py: Merge missing DPC++ libraries from 3.3 tag to trunk for Linux

2022-08-25 Thread Sergey Sharybin
Revision: 63014
  https://developer.blender.org/rBL63014
Author:   sergey
Date: 2022-08-25 12:02:25 +0200 (Thu, 25 Aug 2022)
Log Message:
---
Merge missing DPC++ libraries from 3.3 tag to trunk for Linux

Added Paths:
---
trunk/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7
trunk/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py

Property Changed:

trunk/lib/linux_centos7_x86_64/

Index: trunk/lib/linux_centos7_x86_64
===
--- trunk/lib/linux_centos7_x86_64  2022-08-25 10:01:20 UTC (rev 63013)
+++ trunk/lib/linux_centos7_x86_64  2022-08-25 10:02:25 UTC (rev 63014)

Property changes on: trunk/lib/linux_centos7_x86_64
___
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /tags/blender-2.82-release/lib/linux_centos7_x86_64:62341-62360
 /tags/blender-3.0-release/lib/linux_centos7_x86_64:62740-62753
-/tags/blender-3.3-release/lib/linux_centos7_x86_64:62987-63010
\ No newline at end of property
+/tags/blender-3.3-release/lib/linux_centos7_x86_64:62987-63013
\ No newline at end of property
Copied: trunk/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7 (from rev 
63013, 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7)
===
(Binary files differ)

Copied: trunk/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py 
(from rev 63013, 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py)
===
--- trunk/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py  
(rev 0)
+++ trunk/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py  
2022-08-25 10:02:25 UTC (rev 63014)
@@ -0,0 +1,358 @@
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+import re
+import gdb
+import gdb.xmethod
+import gdb.printing
+
+### XMethod implementations ###
+
+
+class Accessor:
+"""Generalized base class for buffer index calculation"""
+
+def memory_range(self, dim):
+pass
+
+def offset(self, dim):
+pass
+
+def data(self):
+pass
+
+def __init__(self, obj, result_type, depth):
+self.obj = obj
+self.result_type = result_type
+self.depth = depth
+
+def index(self, arg):
+if arg.type.unqualified().strip_typedefs().code == gdb.TYPE_CODE_INT:
+return int(arg)
+# unwrap if inside item
+try:
+arg = arg["MImpl"]["MIndex"]
+except:
+pass
+result = 0
+for dim in range(self.depth):
+result = (
+result * self.memory_range(dim)
++ self.offset(dim)
++ arg["common_array"][dim]
+)
+return result
+
+def value(self, arg):
+return self.data().cast(self.result_type.pointer())[self.index(arg)]
+
+
+class HostAccessor(Accessor):
+"""For Host device memory layout"""
+
+def payload(self):
+return self.obj["impl"]["_M_ptr"].dereference()
+
+def memory_range(self, dim):
+return self.payload()["MMemoryRange"]["common_array"][dim]
+
+def offset(self, dim):
+return self.payload()["MOffset"]["common_array"][dim]
+
+def data(self):
+return self.payload()["MData"]
+
+
+class HostAccessorLocal(HostAccessor):
+"""For Host device memory layout"""
+
+def index(self, arg):
+if arg.type.code == gdb.TYPE_CODE_INT:
+return int(arg)
+result = 0
+for dim in range(self.depth):
+result = (
+result * self.payload()["MSize"]["common_array"][dim]
++ arg["common_array"][dim]
+)
+return result
+
+def data(self):
+return self.payload()["MMem"]
+
+
+class DeviceAccessor(Accessor):
+"""For CPU/GPU memory layout"""
+
+def memory_range(self, dim):
+return self.obj["impl"]["MemRange"]["common_array"][dim]
+
+def offset(self, dim):
+return self.obj["impl"]["Offset"]["common_array"][dim]
+
+def data(self):
+return self.obj["MData"]
+
+
+class AccessorOpIndex(gdb.xmethod.XMethodWorker):
+"""Generic implementation for N-dimensional ID"""
+
+def __init__(self, class_type, result_type, depth):
+self.class_type = class_type
+self.result_type = result_type
+self.depth = depth
+
+def get_arg_types(self):
+return gdb.lookup_type("sycl::_V1::id<%s>" % self.depth)
+
+def get_result_type(self, *args):
+return self.result_type
+
+def __call__(self, obj, arg):
+# No way to easily figure out which devices is 

[Bf-blender-cvs] SVN commit: bf-blender [63013] tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib: Add missing Sycl libraries

2022-08-25 Thread Sergey Sharybin
Revision: 63013
  https://developer.blender.org/rBL63013
Author:   sergey
Date: 2022-08-25 12:01:20 +0200 (Thu, 25 Aug 2022)
Log Message:
---
Add missing Sycl libraries

Added Paths:
---

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py

Added: 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7
===
(Binary files differ)

Index: 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7
===
--- 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7  
2022-08-25 09:49:41 UTC (rev 63012)
+++ 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7  
2022-08-25 10:01:20 UTC (rev 63013)

Property changes on: 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7
___
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py
===
--- 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py
   (rev 0)
+++ 
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/lib/libsycl.so.5.7.0-7-gdb.py
   2022-08-25 10:01:20 UTC (rev 63013)
@@ -0,0 +1,358 @@
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+import re
+import gdb
+import gdb.xmethod
+import gdb.printing
+
+### XMethod implementations ###
+
+
+class Accessor:
+"""Generalized base class for buffer index calculation"""
+
+def memory_range(self, dim):
+pass
+
+def offset(self, dim):
+pass
+
+def data(self):
+pass
+
+def __init__(self, obj, result_type, depth):
+self.obj = obj
+self.result_type = result_type
+self.depth = depth
+
+def index(self, arg):
+if arg.type.unqualified().strip_typedefs().code == gdb.TYPE_CODE_INT:
+return int(arg)
+# unwrap if inside item
+try:
+arg = arg["MImpl"]["MIndex"]
+except:
+pass
+result = 0
+for dim in range(self.depth):
+result = (
+result * self.memory_range(dim)
++ self.offset(dim)
++ arg["common_array"][dim]
+)
+return result
+
+def value(self, arg):
+return self.data().cast(self.result_type.pointer())[self.index(arg)]
+
+
+class HostAccessor(Accessor):
+"""For Host device memory layout"""
+
+def payload(self):
+return self.obj["impl"]["_M_ptr"].dereference()
+
+def memory_range(self, dim):
+return self.payload()["MMemoryRange"]["common_array"][dim]
+
+def offset(self, dim):
+return self.payload()["MOffset"]["common_array"][dim]
+
+def data(self):
+return self.payload()["MData"]
+
+
+class HostAccessorLocal(HostAccessor):
+"""For Host device memory layout"""
+
+def index(self, arg):
+if arg.type.code == gdb.TYPE_CODE_INT:
+return int(arg)
+result = 0
+for dim in range(self.depth):
+result = (
+result * self.payload()["MSize"]["common_array"][dim]
++ arg["common_array"][dim]
+)
+return result
+
+def data(self):
+return self.payload()["MMem"]
+
+
+class DeviceAccessor(Accessor):
+"""For CPU/GPU memory layout"""
+
+def memory_range(self, dim):
+return self.obj["impl"]["MemRange"]["common_array"][dim]
+
+def offset(self, dim):
+return self.obj["impl"]["Offset"]["common_array"][dim]
+
+def data(self):
+return self.obj["MData"]
+
+
+class AccessorOpIndex(gdb.xmethod.XMethodWorker):
+"""Generic implementation for N-dimensional ID"""
+
+def __init__(self, class_type, result_type, depth):
+self.class_type = class_type
+self.result_type = result_type
+self.depth = depth
+
+def get_arg_types(self):
+return gdb.lookup_type("sycl::_V1::id<%s>" % self.depth)
+
+def get_result_type(self, *args):
+return self.result_type
+
+def __call__(self, obj, arg):
+# No way to easily figure out which devices is currently being used,
+# try all accessor implementations until one of them works:
+accessors = [
+DeviceAccessor(obj, self.result_type, self.depth),
+

[Bf-blender-cvs] [d4764a385ab] master: Merge branch 'blender-v3.3-release'

2022-08-25 Thread Sergey Sharybin
Commit: d4764a385abb9420e139fffb8909dd914d894d6f
Author: Sergey Sharybin
Date:   Thu Aug 25 11:50:55 2022 +0200
Branches: master
https://developer.blender.org/rBd4764a385abb9420e139fffb8909dd914d894d6f

Merge branch 'blender-v3.3-release'

===



===



___
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] [9c2bc57cbda] blender-v3.3-release: Fix Cycles oneAPI for a newer DPC++ compiler version

2022-08-25 Thread Sergey Sharybin
Commit: 9c2bc57cbda917d58d02f41137f48f6f199ab576
Author: Sergey Sharybin
Date:   Thu Aug 25 11:50:22 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB9c2bc57cbda917d58d02f41137f48f6f199ab576

Fix Cycles oneAPI for a newer DPC++ compiler version

===

M   intern/cycles/kernel/device/oneapi/kernel.cpp

===

diff --git a/intern/cycles/kernel/device/oneapi/kernel.cpp 
b/intern/cycles/kernel/device/oneapi/kernel.cpp
index 7e90c553c44..ca430285144 100644
--- a/intern/cycles/kernel/device/oneapi/kernel.cpp
+++ b/intern/cycles/kernel/device/oneapi/kernel.cpp
@@ -818,7 +818,8 @@ char *oneapi_device_capabilities()
 GET_NUM_ATTR(max_compute_units)
 GET_NUM_ATTR(max_work_item_dimensions)
 
-sycl::id<3> max_work_item_sizes = 
device.get_info();
+sycl::id<3> max_work_item_sizes =
+device.get_info>();
 WRITE_ATTR("max_work_item_sizes_dim0", 
((size_t)max_work_item_sizes.get(0)))
 WRITE_ATTR("max_work_item_sizes_dim1", 
((size_t)max_work_item_sizes.get(1)))
 WRITE_ATTR("max_work_item_sizes_dim2", 
((size_t)max_work_item_sizes.get(2)))

___
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 [63012] trunk/lib/win64_vc15/dpcpp: Merge DPC++ from 3.3 tag to trunk for Windows

2022-08-25 Thread Sergey Sharybin
Revision: 63012
  https://developer.blender.org/rBL63012
Author:   sergey
Date: 2022-08-25 11:49:41 +0200 (Thu, 25 Aug 2022)
Log Message:
---
Merge DPC++ from 3.3 tag to trunk for Windows

Modified Paths:
--
trunk/lib/win64_vc15/dpcpp/bin/append-file.exe
trunk/lib/win64_vc15/dpcpp/bin/clang++.exe
trunk/lib/win64_vc15/dpcpp/bin/clang-offload-bundler.exe
trunk/lib/win64_vc15/dpcpp/bin/clang-offload-deps.exe
trunk/lib/win64_vc15/dpcpp/bin/clang-offload-extract.exe
trunk/lib/win64_vc15/dpcpp/bin/clang-offload-wrapper.exe
trunk/lib/win64_vc15/dpcpp/bin/file-table-tform.exe
trunk/lib/win64_vc15/dpcpp/bin/libsycl-fallback-cassert.spv
trunk/lib/win64_vc15/dpcpp/bin/libsycl-fallback-cstring.spv
trunk/lib/win64_vc15/dpcpp/bin/libsycl-fallback-imf.spv
trunk/lib/win64_vc15/dpcpp/bin/llc.exe
trunk/lib/win64_vc15/dpcpp/bin/llvm-ar.exe
trunk/lib/win64_vc15/dpcpp/bin/llvm-foreach.exe
trunk/lib/win64_vc15/dpcpp/bin/llvm-link.exe
trunk/lib/win64_vc15/dpcpp/bin/llvm-no-spir-kernel.exe
trunk/lib/win64_vc15/dpcpp/bin/llvm-objcopy.exe
trunk/lib/win64_vc15/dpcpp/bin/llvm-spirv.exe
trunk/lib/win64_vc15/dpcpp/bin/opencl-aot.exe
trunk/lib/win64_vc15/dpcpp/bin/pi_level_zero.dll
trunk/lib/win64_vc15/dpcpp/bin/spirv-to-ir-wrapper.exe
trunk/lib/win64_vc15/dpcpp/bin/sycl-ls.exe
trunk/lib/win64_vc15/dpcpp/bin/sycl-post-link.exe
trunk/lib/win64_vc15/dpcpp/bin/sycl.dll
trunk/lib/win64_vc15/dpcpp/bin/sycld.dll
trunk/lib/win64_vc15/dpcpp/bin/xptifw.dll
trunk/lib/win64_vc15/dpcpp/include/sycl/CL/__spirv/spirv_ops.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/CL/__spirv/spirv_types.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/CL/sycl.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/alt_ui.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/common.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/atomic_intrin.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/elem_type_traits.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/host_util.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/intrin.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/math_intrin.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/operators.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/region.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/simd_mask_impl.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/simd_obj_impl.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/simd_view_impl.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/sycl_util.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/test_proxy.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/type_format.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/types.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/util.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/emu/detail/esimd_emulator_device_interface.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/math.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/memory.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/simd.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/simd_view.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/common.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/detail/util.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/kernel_properties.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/math.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/memory.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/fpga_lsu.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/fpga_utils.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/online_compiler.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/pipes.hpp

trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/usm_properties.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/fpga_device_selector.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/fpga_dsp_control.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/fpga_loop_fuse.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/fpga_lsu.hpp
trunk/lib/win64_vc15/dpcpp/include/sycl/ext/intel/fpga_reg.hpp

[Bf-blender-cvs] SVN commit: bf-blender [63011] trunk/lib/linux_centos7_x86_64/dpcpp: Merge DPC++ from 3.3 tag to trunk for Linux

2022-08-25 Thread Sergey Sharybin
Revision: 63011
  https://developer.blender.org/rBL63011
Author:   sergey
Date: 2022-08-25 11:40:25 +0200 (Thu, 25 Aug 2022)
Log Message:
---
Merge DPC++ from 3.3 tag to trunk for Linux

Modified Paths:
--
trunk/lib/linux_centos7_x86_64/dpcpp/bin/append-file
trunk/lib/linux_centos7_x86_64/dpcpp/bin/clang
trunk/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-bundler
trunk/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-deps
trunk/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-extract
trunk/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-wrapper
trunk/lib/linux_centos7_x86_64/dpcpp/bin/file-table-tform
trunk/lib/linux_centos7_x86_64/dpcpp/bin/llc
trunk/lib/linux_centos7_x86_64/dpcpp/bin/llvm-ar
trunk/lib/linux_centos7_x86_64/dpcpp/bin/llvm-foreach
trunk/lib/linux_centos7_x86_64/dpcpp/bin/llvm-link
trunk/lib/linux_centos7_x86_64/dpcpp/bin/llvm-no-spir-kernel
trunk/lib/linux_centos7_x86_64/dpcpp/bin/llvm-objcopy
trunk/lib/linux_centos7_x86_64/dpcpp/bin/llvm-spirv
trunk/lib/linux_centos7_x86_64/dpcpp/bin/opencl-aot
trunk/lib/linux_centos7_x86_64/dpcpp/bin/spirv-to-ir-wrapper
trunk/lib/linux_centos7_x86_64/dpcpp/bin/sycl-ls
trunk/lib/linux_centos7_x86_64/dpcpp/bin/sycl-post-link
trunk/lib/linux_centos7_x86_64/dpcpp/bin/sycl-prof
trunk/lib/linux_centos7_x86_64/dpcpp/bin/sycl-sanitize
trunk/lib/linux_centos7_x86_64/dpcpp/bin/sycl-trace
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/CL/__spirv/spirv_ops.hpp
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/CL/__spirv/spirv_types.hpp
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/CL/sycl.hpp
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/alt_ui.hpp
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/common.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/atomic_intrin.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/elem_type_traits.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/host_util.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/intrin.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/math_intrin.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/operators.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/region.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/simd_mask_impl.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/simd_obj_impl.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/simd_view_impl.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/sycl_util.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/test_proxy.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/type_format.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/types.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/util.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/emu/detail/esimd_emulator_device_interface.hpp
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/math.hpp
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/memory.hpp
trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/simd.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/simd_view.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/common.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/detail/util.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/kernel_properties.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/math.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/memory.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/fpga_lsu.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/fpga_utils.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/online_compiler.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/pipes.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/usm_properties.hpp

trunk/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/fpga_device_selector.hpp


[Bf-blender-cvs] SVN commit: bf-blender [63010] tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp: Update DPC++ to daily 2022-08-12

2022-08-25 Thread Sergey Sharybin
Revision: 63010
  https://developer.blender.org/rBL63010
Author:   sergey
Date: 2022-08-25 11:29:12 +0200 (Thu, 25 Aug 2022)
Log Message:
---
Update DPC++ to daily 2022-08-12

Modified Paths:
--
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/append-file
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/clang

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-bundler

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-deps

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-extract

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/clang-offload-wrapper
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/file-table-tform
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/llc
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/llvm-ar
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/llvm-foreach
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/llvm-link

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/llvm-no-spir-kernel
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/llvm-objcopy
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/llvm-spirv
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/opencl-aot

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/spirv-to-ir-wrapper
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/sycl-ls
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/sycl-post-link
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/sycl-prof
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/sycl-sanitize
tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/bin/sycl-trace

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/CL/__spirv/spirv_ops.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/CL/__spirv/spirv_types.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/CL/sycl.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/alt_ui.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/common.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/atomic_intrin.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/elem_type_traits.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/host_util.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/intrin.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/math_intrin.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/operators.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/region.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/simd_mask_impl.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/simd_obj_impl.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/simd_view_impl.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/sycl_util.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/test_proxy.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/type_format.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/types.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/detail/util.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/emu/detail/esimd_emulator_device_interface.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/math.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/memory.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/simd.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/esimd/simd_view.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/common.hpp

tags/blender-3.3-release/lib/linux_centos7_x86_64/dpcpp/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp


[Bf-blender-cvs] SVN commit: bf-blender [63009] tags/blender-3.3-release/lib/win64_vc15/dpcpp: Update DPC++ to daily 2022-08-12

2022-08-25 Thread Sergey Sharybin
Revision: 63009
  https://developer.blender.org/rBL63009
Author:   sergey
Date: 2022-08-25 11:15:37 +0200 (Thu, 25 Aug 2022)
Log Message:
---
Update DPC++ to daily 2022-08-12

Modified Paths:
--
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/append-file.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/clang++.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/clang-offload-bundler.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/clang-offload-deps.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/clang-offload-extract.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/clang-offload-wrapper.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/file-table-tform.exe

tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/libsycl-fallback-cassert.spv

tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/libsycl-fallback-cstring.spv
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/libsycl-fallback-imf.spv
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/llc.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/llvm-ar.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/llvm-foreach.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/llvm-link.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/llvm-no-spir-kernel.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/llvm-objcopy.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/llvm-spirv.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/opencl-aot.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/pi_level_zero.dll
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/spirv-to-ir-wrapper.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/sycl-ls.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/sycl-post-link.exe
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/sycl.dll
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/sycld.dll
tags/blender-3.3-release/lib/win64_vc15/dpcpp/bin/xptifw.dll

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/CL/__spirv/spirv_ops.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/CL/__spirv/spirv_types.hpp
tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/CL/sycl.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/alt_ui.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/common.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/atomic_intrin.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/elem_type_traits.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/host_util.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/intrin.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/math_intrin.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/operators.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/region.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/simd_mask_impl.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/simd_obj_impl.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/simd_view_impl.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/sycl_util.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/test_proxy.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/type_format.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/types.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/detail/util.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/emu/detail/esimd_emulator_device_interface.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/math.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/memory.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/simd.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/esimd/simd_view.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/common.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp

tags/blender-3.3-release/lib/win64_vc15/dpcpp/include/sycl/ext/intel/experimental/esimd/detail/util.hpp


[Bf-blender-cvs] [e50c7a244b8] master: Merge branch 'blender-v3.3-release'

2022-08-25 Thread Philipp Oeser
Commit: e50c7a244b83fd4f784480f22c3a467b7c50d667
Author: Philipp Oeser
Date:   Thu Aug 25 09:25:22 2022 +0200
Branches: master
https://developer.blender.org/rBe50c7a244b83fd4f784480f22c3a467b7c50d667

Merge branch 'blender-v3.3-release'

===



===



___
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] [714a3739da9] blender-v3.3-release: Fix T100599: dont reset parent inverse setting parent type the same

2022-08-25 Thread Philipp Oeser
Commit: 714a3739da95f867a85c83abe9185d3a0964190a
Author: Philipp Oeser
Date:   Wed Aug 24 13:39:22 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB714a3739da95f867a85c83abe9185d3a0964190a

Fix T100599: dont reset parent inverse setting parent type the same

Since rBb100bdca25b1 the parent inverse was always reset in
ED_object_parent (also for just changing the parent type).

This does make sense (since there is no point keeping it when e.g
changing from "Bone" to "Object" or "Vertex" to "Object", for this to
really make sense it would have to be properly recalculated anyways
which does not happen afaict).

The reported issue was that setting the prop to the same value as it was
before (e.g. from "Object" to "Object") would still reset the parent
inverse which was really unexpected since from a user standpoint,
nothing has changed here.

So in case the value does not really change, we now just early out and
skip `ED_object_parent`.

Maniphest Tasks: T100599

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

===

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

===

diff --git a/source/blender/makesrna/intern/rna_object.c 
b/source/blender/makesrna/intern/rna_object.c
index 103c77fa808..f15ca63268b 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -687,6 +687,11 @@ static void rna_Object_parent_type_set(PointerRNA *ptr, 
int value)
 {
   Object *ob = (Object *)ptr->data;
 
+  /* Skip if type did not change (otherwise we loose parent inverse in 
ED_object_parent). */
+  if (ob->partype == value) {
+return;
+  }
+
   ED_object_parent(ob, ob->parent, value, ob->parsubstr);
 }

___
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] [96d8367924e] master: PyAPI: return faces instead of indices from bmesh_linked_uv_islands

2022-08-25 Thread Campbell Barton
Commit: 96d8367924efce57e27228082e2a35f9dc903ca4
Author: Campbell Barton
Date:   Thu Aug 25 16:59:12 2022 +1000
Branches: master
https://developer.blender.org/rB96d8367924efce57e27228082e2a35f9dc903ca4

PyAPI: return faces instead of indices from bmesh_linked_uv_islands

Return faces instead of face indices from bmesh_linked_uv_islands
since BMesh indices aren't reliable when geometry is added/removed,
where the faces will still be valid.

===

M   release/scripts/modules/bpy_extras/bmesh_utils.py
M   release/scripts/startup/bl_operators/uvcalc_randomize_transform.py

===

diff --git a/release/scripts/modules/bpy_extras/bmesh_utils.py 
b/release/scripts/modules/bpy_extras/bmesh_utils.py
index 5b5437ed358..a24ea253f51 100644
--- a/release/scripts/modules/bpy_extras/bmesh_utils.py
+++ b/release/scripts/modules/bpy_extras/bmesh_utils.py
@@ -16,7 +16,7 @@ def match_uv(face, vert, uv, uv_layer):
 
 def bmesh_linked_uv_islands(bm, uv_layer):
 """
-Returns lists of face indices connected by UV islands.
+Returns lists of faces connected by UV islands.
 
 For meshes use :class:`bpy.types.Mesh.mesh_linked_uv_islands` instead.
 
@@ -29,15 +29,12 @@ def bmesh_linked_uv_islands(bm, uv_layer):
 """
 
 result = []
-bm.faces.ensure_lookup_table()
-
 used = set()
 for seed_face in bm.faces:
-seed_index = seed_face.index
-if seed_index in used:
+if seed_face in used:
 continue  # Face has already been processed.
-used.add(seed_index)
-island = [seed_index]
+used.add(seed_face)
+island = [seed_face]
 stack = [seed_face]  # Faces still to consider on this island.
 while stack:
 current_face = stack.pop()
@@ -45,14 +42,14 @@ def bmesh_linked_uv_islands(bm, uv_layer):
 v = loop.vert
 uv = loop[uv_layer].uv
 for f in v.link_faces:
-if f.index in used:
+if f is current_face or f in used:
 continue
 if not match_uv(f, v, uv, uv_layer):
 continue
 
 # `f` is part of island, add to island and stack
-used.add(f.index)
-island.append(f.index)
+used.add(f)
+island.append(f)
 stack.append(f)
 result.append(island)
 
diff --git a/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py 
b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
index 0c5e20836b7..9b9e016cb9a 100644
--- a/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
@@ -3,7 +3,6 @@
 from bpy.types import Operator
 from mathutils import Vector
 
-import bpy.ops
 import math
 
 
@@ -52,13 +51,14 @@ def get_random_transform(transform_params, entropy):
 
 
 def randomize_uv_transform_island(bm, uv_layer, faces, transform_params):
-entropy = min(faces)  # Ensure consistent random values for island, 
regardless of selection etc.
+# Ensure consistent random values for island, regardless of selection etc.
+entropy = min(f.index for f in faces)
+
 transform = get_random_transform(transform_params, entropy)
 
 # Find bounding box.
 minmax = [1e30, 1e30, -1e30, -1e30]
-for face_index in faces:
-face = bm.faces[face_index]
+for face in faces:
 for loop in face.loops:
 u, v = loop[uv_layer].uv
 minmax[0] = min(minmax[0], u)
@@ -73,8 +73,7 @@ def randomize_uv_transform_island(bm, uv_layer, faces, 
transform_params):
 del_v = transform[1][2] + mid_v - transform[1][0] * mid_u - 
transform[1][1] * mid_v
 
 # Apply transform.
-for face_index in faces:
-face = bm.faces[face_index]
+for face in faces:
 for loop in face.loops:
 pre_uv = loop[uv_layer].uv
 u = transform[0][0] * pre_uv[0] + transform[0][1] * pre_uv[1] + 
del_u
@@ -90,8 +89,8 @@ def is_face_uv_selected(face, uv_layer):
 
 
 def is_island_uv_selected(bm, island, uv_layer):
-for face_index in island:
-if is_face_uv_selected(bm.faces[face_index], uv_layer):
+for face in island:
+if is_face_uv_selected(face, uv_layer):
 return True
 return False
 
@@ -110,9 +109,12 @@ def randomize_uv_transform(context, transform_params):
 ob_list = context.objects_in_mode_unique_data
 for ob in ob_list:
 bm = bmesh.from_edit_mesh(ob.data)
-bm.faces.ensure_lookup_table()
-if bm.loops.layers.uv:
-randomize_uv_transform_bmesh(ob.data, bm, transform_params)
+if not bm.loops.layers.uv:
+continue
+
+# Only needed to access the minimum face index of each island.
+  

[Bf-blender-cvs] [012db9e8204] master: Cleanup: replace dict with set for bmesh_utils.bmesh_linked_uv_islands

2022-08-25 Thread Campbell Barton
Commit: 012db9e820439ddea03048f638bfa112d0ab05b0
Author: Campbell Barton
Date:   Thu Aug 25 16:41:22 2022 +1000
Branches: master
https://developer.blender.org/rB012db9e820439ddea03048f638bfa112d0ab05b0

Cleanup: replace dict with set for bmesh_utils.bmesh_linked_uv_islands

Also correct doc-string syntax.

===

M   release/scripts/modules/bpy_extras/bmesh_utils.py
M   release/scripts/startup/bl_operators/uvcalc_randomize_transform.py

===

diff --git a/release/scripts/modules/bpy_extras/bmesh_utils.py 
b/release/scripts/modules/bpy_extras/bmesh_utils.py
index baf1f9d863f..5b5437ed358 100644
--- a/release/scripts/modules/bpy_extras/bmesh_utils.py
+++ b/release/scripts/modules/bpy_extras/bmesh_utils.py
@@ -6,6 +6,7 @@ __all__ = (
 
 import bmesh
 
+
 def match_uv(face, vert, uv, uv_layer):
 for loop in face.loops:
 if loop.vert == vert:
@@ -17,12 +18,12 @@ def bmesh_linked_uv_islands(bm, uv_layer):
 """
 Returns lists of face indices connected by UV islands.
 
-For `bpy.types.Mesh`, use `mesh_linked_uv_islands` instead.
+For meshes use :class:`bpy.types.Mesh.mesh_linked_uv_islands` instead.
 
 :arg bm: the bmesh used to group with.
-:type bmesh: :class: `BMesh`
+:type bmesh: :class:`BMesh`
 :arg uv_layer: the UV layer to source UVs from.
-:type bmesh: :class: `BMLayerItem`
+:type bmesh: :class:`BMLayerItem`
 :return: list of lists containing polygon indices
 :rtype: list
 """
@@ -30,27 +31,27 @@ def bmesh_linked_uv_islands(bm, uv_layer):
 result = []
 bm.faces.ensure_lookup_table()
 
-used = {}
+used = set()
 for seed_face in bm.faces:
 seed_index = seed_face.index
-if used.get(seed_index):
-continue # Face has already been processed.
-used[seed_index] = True
+if seed_index in used:
+continue  # Face has already been processed.
+used.add(seed_index)
 island = [seed_index]
-stack = [seed_face] # Faces still to consider on this island.
+stack = [seed_face]  # Faces still to consider on this island.
 while stack:
 current_face = stack.pop()
 for loop in current_face.loops:
 v = loop.vert
 uv = loop[uv_layer].uv
 for f in v.link_faces:
-if used.get(f.index):
+if f.index in used:
 continue
 if not match_uv(f, v, uv, uv_layer):
 continue
 
 # `f` is part of island, add to island and stack
-used[f.index] = True
+used.add(f.index)
 island.append(f.index)
 stack.append(f)
 result.append(island)
diff --git a/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py 
b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
index 22ae5ed9a6f..0c5e20836b7 100644
--- a/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
@@ -52,7 +52,7 @@ def get_random_transform(transform_params, entropy):
 
 
 def randomize_uv_transform_island(bm, uv_layer, faces, transform_params):
-entropy = min(faces) # Ensure consistent random values for island, 
regardless of selection etc.
+entropy = min(faces)  # Ensure consistent random values for island, 
regardless of selection etc.
 transform = get_random_transform(transform_params, entropy)
 
 # Find bounding box.

___
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] [de570dc87ed] master: Fix T78406: create uv randomize islands operator

2022-08-25 Thread Chris Blackbourn
Commit: de570dc87ed17cae2d2d1ed4347793c440266b4b
Author: Chris Blackbourn
Date:   Thu Aug 25 17:59:39 2022 +1200
Branches: master
https://developer.blender.org/rBde570dc87ed17cae2d2d1ed4347793c440266b4b

Fix T78406: create uv randomize islands operator

Implement a new operator to randomize the scale, rotation and offset
of selected UV islands.

===

A   release/scripts/modules/bpy_extras/bmesh_utils.py
M   release/scripts/startup/bl_operators/__init__.py
A   release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
M   release/scripts/startup/bl_ui/space_image.py

===

diff --git a/release/scripts/modules/bpy_extras/bmesh_utils.py 
b/release/scripts/modules/bpy_extras/bmesh_utils.py
new file mode 100644
index 000..baf1f9d863f
--- /dev/null
+++ b/release/scripts/modules/bpy_extras/bmesh_utils.py
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+__all__ = (
+"bmesh_linked_uv_islands",
+)
+
+import bmesh
+
+def match_uv(face, vert, uv, uv_layer):
+for loop in face.loops:
+if loop.vert == vert:
+return uv == loop[uv_layer].uv
+return False
+
+
+def bmesh_linked_uv_islands(bm, uv_layer):
+"""
+Returns lists of face indices connected by UV islands.
+
+For `bpy.types.Mesh`, use `mesh_linked_uv_islands` instead.
+
+:arg bm: the bmesh used to group with.
+:type bmesh: :class: `BMesh`
+:arg uv_layer: the UV layer to source UVs from.
+:type bmesh: :class: `BMLayerItem`
+:return: list of lists containing polygon indices
+:rtype: list
+"""
+
+result = []
+bm.faces.ensure_lookup_table()
+
+used = {}
+for seed_face in bm.faces:
+seed_index = seed_face.index
+if used.get(seed_index):
+continue # Face has already been processed.
+used[seed_index] = True
+island = [seed_index]
+stack = [seed_face] # Faces still to consider on this island.
+while stack:
+current_face = stack.pop()
+for loop in current_face.loops:
+v = loop.vert
+uv = loop[uv_layer].uv
+for f in v.link_faces:
+if used.get(f.index):
+continue
+if not match_uv(f, v, uv, uv_layer):
+continue
+
+# `f` is part of island, add to island and stack
+used[f.index] = True
+island.append(f.index)
+stack.append(f)
+result.append(island)
+
+return result
diff --git a/release/scripts/startup/bl_operators/__init__.py 
b/release/scripts/startup/bl_operators/__init__.py
index 14dc72336f6..6f61d7e7129 100644
--- a/release/scripts/startup/bl_operators/__init__.py
+++ b/release/scripts/startup/bl_operators/__init__.py
@@ -31,6 +31,7 @@ _modules = [
 "userpref",
 "uvcalc_follow_active",
 "uvcalc_lightmap",
+"uvcalc_randomize_transform",
 "vertexpaint_dirt",
 "view3d",
 "wm",
diff --git a/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py 
b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
new file mode 100644
index 000..22ae5ed9a6f
--- /dev/null
+++ b/release/scripts/startup/bl_operators/uvcalc_randomize_transform.py
@@ -0,0 +1,210 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from bpy.types import Operator
+from mathutils import Vector
+
+import bpy.ops
+import math
+
+
+def get_random_transform(transform_params, entropy):
+from random import uniform
+from random import seed as random_seed
+
+(seed, loc, rot, scale, scale_even) = transform_params
+
+# First, seed the RNG.
+random_seed(seed + entropy)
+
+# Next, call uniform a known number of times.
+offset_u = uniform(0, 1)
+offset_v = uniform(0, 1)
+angle = uniform(0, 1)
+scale_u = uniform(0, 1)
+scale_v = uniform(0, 1)
+
+# Apply the transform_params.
+if loc:
+offset_u *= loc[0]
+offset_v *= loc[1]
+else:
+offset_u = 0
+offset_v = 0
+
+if rot:
+angle *= rot
+else:
+angle = 0
+
+if scale:
+scale_u *= scale[0]
+scale_v *= scale[1]
+else:
+scale_u = 1
+scale_v = 1
+
+if scale_even:
+scale_v = scale_u
+
+# Results in homogenous co-ordinates.
+return [[scale_u * math.cos(angle), -scale_v * math.sin(angle), offset_u],
+[scale_u * math.sin(angle), scale_v * math.cos(angle), offset_v]]
+
+
+def randomize_uv_transform_island(bm, uv_layer, faces, transform_params):
+entropy = min(faces) # Ensure consistent random values for island, 
regardless of selection etc.
+transform = get_random_transform(transform_params, entropy)
+
+# Find bounding box.
+minmax = [1e30, 1e30, -1e30, -1e30]
+for face_index