[Bf-blender-cvs] [4701421dbe2] master: UI: Remove unused light object panel (Correction)

2022-12-23 Thread Aaron Carlisle
Commit: 4701421dbe239e5d02a5ee367c442b14660c49c0
Author: Aaron Carlisle
Date:   Fri Dec 23 19:06:29 2022 -0500
Branches: master
https://developer.blender.org/rB4701421dbe239e5d02a5ee367c442b14660c49c0

UI: Remove unused light object panel (Correction)

This panel showed a duplication of options that were in the main light panel 
and only mistakenly shows up in the workbench engine where lights should have 
no options.

This panel was also used by the POV-Ray add-on but that was removed recently.

===

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

===

diff --git a/intern/cycles/blender/addon/ui.py 
b/intern/cycles/blender/addon/ui.py
index 6ac97a32f61..102e014297f 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -2360,7 +2360,6 @@ def draw_pause(self, context):
 
 def get_panels():
 exclude_panels = {
-'DATA_PT_area',
 'DATA_PT_camera_dof',
 'DATA_PT_falloff_curve',
 'DATA_PT_light',

___
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] [014d0a8edee] master: Update RNA to User manual mappings

2022-12-23 Thread Aaron Carlisle
Commit: 014d0a8edee42fd3f2c30d55901a3459f41c31bb
Author: Aaron Carlisle
Date:   Fri Dec 23 19:00:02 2022 -0500
Branches: master
https://developer.blender.org/rB014d0a8edee42fd3f2c30d55901a3459f41c31bb

Update RNA to User manual mappings

===

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 dfebf9132d2..7dc62e6270b 100644
--- a/release/scripts/modules/rna_manual_reference.py
+++ b/release/scripts/modules/rna_manual_reference.py
@@ -49,16 +49,17 @@ url_manual_mapping = (
 ("bpy.types.movietrackingsettings.refine_intrinsics_principal_point*", 
"movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-refine-intrinsics-principal-point"),
 ("bpy.types.cyclesobjectsettings.shadow_terminator_geometry_offset*", 
"render/cycles/object_settings/object_data.html#bpy-types-cyclesobjectsettings-shadow-terminator-geometry-offset"),
 ("bpy.types.sequencertoolsettings.use_snap_current_frame_to_strips*", 
"video_editing/edit/montage/editing.html#bpy-types-sequencertoolsettings-use-snap-current-frame-to-strips"),
+("bpy.types.clothcollisionsettings.vertex_group_object_collisions*", 
"physics/cloth/settings/collisions.html#bpy-types-clothcollisionsettings-vertex-group-object-collisions"),
 ("bpy.types.cycleslightsettings.use_multiple_importance_sampling*", 
"render/cycles/light_settings.html#bpy-types-cycleslightsettings-use-multiple-importance-sampling"),
 ("bpy.types.fluiddomainsettings.sndparticle_potential_max_energy*", 
"physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-max-energy"),
 ("bpy.types.fluiddomainsettings.sndparticle_potential_min_energy*", 
"physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-min-energy"),
 ("bpy.types.lineartgpencilmodifier.use_overlap_edge_type_support*", 
"grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-overlap-edge-type-support"),
 ("bpy.types.movietrackingsettings.refine_intrinsics_focal_length*", 
"movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-refine-intrinsics-focal-length"),
 ("bpy.types.rigidbodyconstraint.rigidbodyconstraint.use_breaking*", 
"physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-rigidbodyconstraint-use-breaking"),
+("bpy.types.clothcollisionsettings.vertex_group_self_collisions*", 
"physics/cloth/settings/collisions.html#bpy-types-clothcollisionsettings-vertex-group-self-collisions"),
 ("bpy.types.cyclesrendersettings.preview_denoising_input_passes*", 
"render/cycles/render_settings/sampling.html#bpy-types-cyclesrendersettings-preview-denoising-input-passes"),
 ("bpy.types.cyclesrendersettings.preview_denoising_start_sample*", 
"render/cycles/render_settings/sampling.html#bpy-types-cyclesrendersettings-preview-denoising-start-sample"),
 ("bpy.types.fluiddomainsettings.sndparticle_sampling_trappedair*", 
"physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-sampling-trappedair"),
-("bpy.types.brush.automasking_boundary_edges_propagation_steps*", 
"sculpt_paint/sculpting/controls.html#bpy-types-brush-automasking-boundary-edges-propagation-steps"),
 ("bpy.types.fluiddomainsettings.sndparticle_sampling_wavecrest*", 
"physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-sampling-wavecrest"),
 ("bpy.types.lineartgpencilmodifier.use_image_boundary_trimming*", 
"grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-image-boundary-trimming"),
 ("bpy.types.materiallineart.use_intersection_priority_override*", 
"render/materials/line_art.html#bpy-types-materiallineart-use-intersection-priority-override"),
@@ -70,11 +71,13 @@ url_manual_mapping = (
 ("bpy.types.lineartgpencilmodifier.use_face_mark_keep_contour*", 
"grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-face-mark-keep-contour"),
 ("bpy.types.rendersettings.use_sequencer_override_scene_strip*", 
"editors/video_sequencer/preview/sidebar.html#bpy-types-rendersettings-use-sequencer-override-scene-strip"),
 ("bpy.types.toolsettings.use_transform_correct_keep_connected*", 
"modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-transform-correct-keep-connected"),
+("bpy.types.clothsettings.internal_compression_stiffness_max*", 
"physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-internal-compression-stiffness-max"),
 ("bpy.types.cyclesrendersettings.preview_denoising_prefilter*", 
"render/cycles/render_settings/sampling.html#bpy-types-cyclesrendersettings-preview-denoising-prefilter"),
 

[Bf-blender-cvs] [fea60eccbf4] master: UI: Remove unused light object panel

2022-12-23 Thread Aaron Carlisle
Commit: fea60eccbf49563187ca7025aa68e8547fc2902e
Author: Aaron Carlisle
Date:   Fri Dec 23 18:58:16 2022 -0500
Branches: master
https://developer.blender.org/rBfea60eccbf49563187ca7025aa68e8547fc2902e

UI: Remove unused light object panel

This panel showed a duplication of options that were in the main light panel 
and only mistakenly shows up in the workbench engine where lights should have 
no options.

This panel was also used by the POV-Ray add-on but that was removed recently.

===

M   release/scripts/startup/bl_ui/properties_data_light.py

===

diff --git a/release/scripts/startup/bl_ui/properties_data_light.py 
b/release/scripts/startup/bl_ui/properties_data_light.py
index 2980592ee0b..b313ae4dcb9 100644
--- a/release/scripts/startup/bl_ui/properties_data_light.py
+++ b/release/scripts/startup/bl_ui/properties_data_light.py
@@ -227,32 +227,6 @@ class DATA_PT_EEVEE_shadow_contact(DataButtonsPanel, 
Panel):
 col.prop(light, "contact_shadow_thickness", text="Thickness")
 
 
-class DATA_PT_area(DataButtonsPanel, Panel):
-bl_label = "Area Shape"
-COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_WORKBENCH'}
-
-@classmethod
-def poll(cls, context):
-light = context.light
-engine = context.engine
-return (light and light.type == 'AREA') and (engine in 
cls.COMPAT_ENGINES)
-
-def draw(self, context):
-layout = self.layout
-
-light = context.light
-
-col = layout.column()
-col.row().prop(light, "shape", expand=True)
-sub = col.row(align=True)
-
-if light.shape in {'SQUARE', 'DISK'}:
-sub.prop(light, "size")
-elif light.shape in {'RECTANGLE', 'ELLIPSE'}:
-sub.prop(light, "size", text="Size X")
-sub.prop(light, "size_y", text="Size Y")
-
-
 class DATA_PT_spot(DataButtonsPanel, Panel):
 bl_label = "Spot Shape"
 bl_parent_id = "DATA_PT_EEVEE_light"
@@ -315,7 +289,6 @@ classes = (
 DATA_PT_EEVEE_shadow,
 DATA_PT_EEVEE_shadow_cascaded_shadow_map,
 DATA_PT_EEVEE_shadow_contact,
-DATA_PT_area,
 DATA_PT_spot,
 DATA_PT_falloff_curve,
 DATA_PT_custom_props_light,

___
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] [a44c1284823] master: GPencil: show brush size in Draw tool cursor

2022-12-23 Thread Sietse Brouwer
Commit: a44c1284823a1017283cec5ff58f099956e03abd
Author: Sietse Brouwer
Date:   Fri Dec 23 16:02:01 2022 +0100
Branches: master
https://developer.blender.org/rBa44c1284823a1017283cec5ff58f099956e03abd

GPencil: show brush size in Draw tool cursor

When drawing strokes in Grease Pencil, it was always a bit hard
to predict how thick the strokes would be, because there was
no visual reference of the thickness in the cursor.
This patch adds that visual reference. It shows the brush size
as a circle in the draw cursor.
Showing the brush size can be toggled in the Cursor menu
of the Grease Pencil draw tool.

Request in RCS with 26 upvotes for this option:
https://blender.community/c/rightclickselect/0zfbbc

On the technical side: the brush size is calculated
in 3D space and takes zoom level into account, as well as
object/layer transfrom, layer thickness change (gpl->line_change)
and thickness scale (gpd->pixfactor).

Reviewed By: mendio, antoniov

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

===

M   release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M   source/blender/editors/gpencil/gpencil_utils.c
M   source/blender/makesdna/DNA_brush_enums.h
M   source/blender/makesrna/intern/rna_brush.c

===

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py 
b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 3aa8879c594..1e68b2df97d 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -117,11 +117,13 @@ class GreasePencilDisplayPanel:
 row = layout.row(align=True)
 row.prop(settings, "show_brush", text="Display Cursor")
 
-col = layout.column(align=True)
-col.active = settings.show_brush
-
 if brush.gpencil_tool == 'DRAW':
-col.prop(gp_settings, "show_lasso", text="Show Fill Color 
While Drawing")
+row = layout.row(align=True)
+row.active = settings.show_brush
+row.prop(gp_settings, "show_brush_size", text="Show Brush 
Size")
+row = layout.row(align=True)
+row.active = settings.show_brush
+row.prop(gp_settings, "show_lasso", text="Show Fill Color 
While Drawing")
 
 elif ob.mode == 'SCULPT_GPENCIL':
 col = layout.column(align=True)
diff --git a/source/blender/editors/gpencil/gpencil_utils.c 
b/source/blender/editors/gpencil/gpencil_utils.c
index 7516e84805c..3abb04c6360 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1750,6 +1750,7 @@ static void gpencil_brush_cursor_draw(bContext *C, int x, 
int y, void *customdat
   float color[3] = {1.0f, 1.0f, 1.0f};
   float darkcolor[3];
   float radius = 3.0f;
+  bool fixed_radius = true;
 
   const int mval_i[2] = {x, y};
   /* Check if cursor is in drawing region and has valid data-block. */
@@ -1787,16 +1788,61 @@ static void gpencil_brush_cursor_draw(bContext *C, int 
x, int y, void *customdat
 if (ma) {
   gp_style = ma->gp_style;
 
-  /* after some testing, display the size of the brush is not practical 
because
-   * is too disruptive and the size of cursor does not change with zoom 
factor.
-   * The decision was to use a fix size, instead of brush->thickness value.
+  /* Follow user settings for the size of the draw cursor:
+   * - Fixed size, or
+   * - Brush size (i.e. stroke thickness)
*/
   if ((gp_style) && GPENCIL_PAINT_MODE(gpd) &&
   ((brush->gpencil_settings->flag & GP_BRUSH_STABILIZE_MOUSE) == 0) &&
   ((brush->gpencil_settings->flag & GP_BRUSH_STABILIZE_MOUSE_TEMP) == 
0) &&
   (brush->gpencil_tool == GPAINT_TOOL_DRAW)) {
-radius = 2.0f;
-copy_v3_v3(color, gp_style->stroke_rgba);
+
+/* Check user setting for cursor size. */
+fixed_radius = ((brush->gpencil_settings->flag & 
GP_BRUSH_SHOW_DRAW_SIZE) == 0);
+
+if (fixed_radius) {
+  /* Show fixed radius. */
+  radius = 2.0f;
+  copy_v3_v3(color, gp_style->stroke_rgba);
+}
+else {
+  /* Show brush size. */
+  tGPspoint point2D;
+  float p1[3];
+  float p2[3];
+  float distance;
+
+  /* Strokes in screen space or world space? */
+  if ((gpd->flag & GP_DATA_STROKE_KEEPTHICKNESS) != 0) {
+/* In screen space the cursor radius matches the brush size. */
+radius = (float)brush->size * 0.5f;
+  }
+  else {
+/* To calculate the brush size in world space, we have to 
establish the zoom level.
+ * For this we take two 2D screen coordinates with a fixed offset,
+ * 

[Bf-blender-cvs] [262ea626dfc] refactor-mesh-uv-map-generic: In certain locations where it is unclear if we should check for CD_MLOOPUV or CD_PROP_FLOAT, just do both.

2022-12-23 Thread Martijn Versteegh
Commit: 262ea626dfc3db711454683abf5e0e7e6d971f52
Author: Martijn Versteegh
Date:   Fri Dec 23 14:56:52 2022 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB262ea626dfc3db711454683abf5e0e7e6d971f52

In certain locations where it is unclear if we should check for CD_MLOOPUV or 
CD_PROP_FLOAT, just do both.

===

M   source/blender/blenkernel/intern/customdata.cc
M   source/blender/blenloader/intern/versioning_280.c

===

diff --git a/source/blender/blenkernel/intern/customdata.cc 
b/source/blender/blenkernel/intern/customdata.cc
index cb43a962785..fd623dd6d22 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -4416,8 +4416,7 @@ static bool 
CustomData_layer_ensure_data_exists(CustomDataLayer *layer, size_t c
 /* When more instances of corrupt files are found, add them here. */
 case CD_PROP_BOOL: /* See T84935. */
 case CD_MLOOPUV:   /* See T90620. */
-  /* TODO(@Baardaap) check if this is run before or after versioning. If 
after we need to add
-   * #CD_PROP_FLOAT2 to the list? */
+case CD_PROP_FLOAT2:   /* See T90620. */
   layer->data = MEM_calloc_arrayN(count, typeInfo->size, 
layerType_getName(layer->type));
   BLI_assert(layer->data);
   if (typeInfo->set_default_value) {
diff --git a/source/blender/blenloader/intern/versioning_280.c 
b/source/blender/blenloader/intern/versioning_280.c
index ffb87949234..c12f03ce399 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1798,7 +1798,7 @@ void blo_do_versions_280(FileData *fd, Library 
*UNUSED(lib), Main *bmain)
 if (DNA_struct_find(fd->filesdna, "MTexPoly")) {
   for (Mesh *me = bmain->meshes.first; me; me = me->id.next) {
 /* If we have UV's, so this file will have MTexPoly layers too! */
-if (CustomData_has_layer(>ldata, CD_MLOOPUV)) {
+if (CustomData_has_layer(>ldata, CD_MLOOPUV) || 
CustomData_has_layer(>ldata, CD_PROP_FLOAT2)) {
   CustomData_update_typemap(>pdata);
   CustomData_free_layers(>pdata, CD_MTEXPOLY, me->totpoly);
 }

___
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] [e497f7ccbbf] refactor-mesh-uv-map-generic: Merge branch 'master' into refactor-mesh-uv-map-generic

2022-12-23 Thread Martijn Versteegh
Commit: e497f7ccbbfaeaf0ee48695b54e89b6acd27a915
Author: Martijn Versteegh
Date:   Fri Dec 23 14:50:17 2022 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rBe497f7ccbbfaeaf0ee48695b54e89b6acd27a915

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

===



===

diff --cc source/blender/editors/mesh/mesh_data.cc
index 2cf13dd73d8,a2310dddc61..bd99dc92db3
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@@ -120,7 -117,7 +120,7 @@@ static void delete_customdata_layer(Mes
int layer_index, tot, n;
  
char htype = BM_FACE;
--  if (ELEM(type, CD_PROP_BYTE_COLOR, CD_MLOOPUV)) {
++  if (ELEM(type, CD_PROP_BYTE_COLOR, CD_PROP_FLOAT2)) {
  htype = BM_LOOP;
}
else if (ELEM(type, CD_PROP_COLOR)) {

___
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] [b024577452f] master: Fix: dangling attribute name pointer

2022-12-23 Thread Jacques Lucke
Commit: b024577452f5760b73d2c510cebcfe5459e81bf0
Author: Jacques Lucke
Date:   Fri Dec 23 13:16:42 2022 +0100
Branches: master
https://developer.blender.org/rBb024577452f5760b73d2c510cebcfe5459e81bf0

Fix: dangling attribute name pointer

===

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

===

diff --git a/source/blender/editors/object/object_modifier.cc 
b/source/blender/editors/object/object_modifier.cc
index 3a98108989e..523be5eda13 100644
--- a/source/blender/editors/object/object_modifier.cc
+++ b/source/blender/editors/object/object_modifier.cc
@@ -867,7 +867,7 @@ static void remove_invalid_attribute_strings(Mesh )
 mesh.active_color_attribute);
 if (!meta_data || !(meta_data->domain & ATTR_DOMAIN_MASK_COLOR) ||
 !(meta_data->data_type & CD_MASK_COLOR_ALL)) {
-  MEM_freeN(mesh.active_color_attribute);
+  MEM_SAFE_FREE(mesh.active_color_attribute);
 }
   }
   if (mesh.default_color_attribute) {
@@ -875,7 +875,7 @@ static void remove_invalid_attribute_strings(Mesh )
 mesh.default_color_attribute);
 if (!meta_data || !(meta_data->domain & ATTR_DOMAIN_MASK_COLOR) ||
 !(meta_data->data_type & CD_MASK_COLOR_ALL)) {
-  MEM_freeN(mesh.default_color_attribute);
+  MEM_SAFE_FREE(mesh.default_color_attribute);
 }
   }
 }

___
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] [2838d9324d0] master: Cleanup: clang format

2022-12-23 Thread Philipp Oeser
Commit: 2838d9324d031a8b2024587031ddd4cce213f12b
Author: Philipp Oeser
Date:   Fri Dec 23 12:04:56 2022 +0100
Branches: master
https://developer.blender.org/rB2838d9324d031a8b2024587031ddd4cce213f12b

Cleanup: clang format

Missed in rB15c433d7d564.

===

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

===

diff --git a/source/blender/blenkernel/intern/context.cc 
b/source/blender/blenkernel/intern/context.cc
index 090624a289b..79f4f56b325 100644
--- a/source/blender/blenkernel/intern/context.cc
+++ b/source/blender/blenkernel/intern/context.cc
@@ -190,7 +190,7 @@ const PointerRNA *CTX_store_ptr_lookup(const bContextStore 
*store,
 {
   for (auto entry = store->entries.rbegin(); entry != store->entries.rend(); 
++entry) {
 if (entry->name == name) {
-  if (!type ||(type && RNA_struct_is_a(entry->ptr.type, type))) {
+  if (!type || (type && RNA_struct_is_a(entry->ptr.type, type))) {
 return >ptr;
   }
 }

___
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] [a521960fddf] master: Fix T103426: Crash on Insert Keyframe

2022-12-23 Thread Eimear Crotty
Commit: a521960fddf2544b1eeab1f29e03c8d9d4abf86b
Author: Eimear Crotty
Date:   Fri Dec 23 11:19:43 2022 +0100
Branches: master
https://developer.blender.org/rBa521960fddf2544b1eeab1f29e03c8d9d4abf86b

Fix T103426: Crash on Insert Keyframe

Add required additional_info to shader using 
gpu_shader_point_uniform_color_aa_frag.glsl. This is the only other reference 
to the shader which requires the additional_info to be added.

{F14085803}

Reviewed By: #eevee_viewport, fclem

Maniphest Tasks: T103426

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

===

M   
source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh

===

diff --git 
a/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
 
b/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
index 1b5c9beed48..6d4806580e5 100644
--- 
a/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
+++ 
b/source/blender/gpu/shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
@@ -17,4 +17,5 @@ 
GPU_SHADER_CREATE_INFO(gpu_shader_2D_point_uniform_size_uniform_color_aa)
 .push_constant(Type::FLOAT, "size")
 .vertex_source("gpu_shader_2D_point_uniform_size_aa_vert.glsl")
 .fragment_source("gpu_shader_point_uniform_color_aa_frag.glsl")
+.additional_info("gpu_srgb_to_framebuffer_space")
 .do_static_compilation(true);

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


[Bf-blender-cvs] [a8aae66f0e8] master: Asset Browser: New catalog menu

2022-12-23 Thread Dalai Felinto
Commit: a8aae66f0e8067280fff0db0cefe3d2a6ee2c41a
Author: Dalai Felinto
Date:   Tue Dec 20 13:05:40 2022 +0100
Branches: master
https://developer.blender.org/rBa8aae66f0e8067280fff0db0cefe3d2a6ee2c41a

Asset Browser: New catalog menu

This replaces the old Edit menu, creating a menu only for catalog
operators. The Undo/Redo were already working only for catalogs, so now
this is more clear.

The menu also contains the Save and New catalog operators.

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

===

M   release/scripts/startup/bl_ui/space_filebrowser.py

===

diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py 
b/release/scripts/startup/bl_ui/space_filebrowser.py
index b2eeb4e6cf0..a7e9663d186 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -644,7 +644,7 @@ class ASSETBROWSER_MT_editor_menus(AssetBrowserMenu, Menu):
 
 layout.menu("ASSETBROWSER_MT_view")
 layout.menu("ASSETBROWSER_MT_select")
-layout.menu("ASSETBROWSER_MT_edit")
+layout.menu("ASSETBROWSER_MT_catalog")
 
 
 class ASSETBROWSER_MT_view(AssetBrowserMenu, Menu):
@@ -683,8 +683,8 @@ class ASSETBROWSER_MT_select(AssetBrowserMenu, Menu):
 layout.operator("file.select_box")
 
 
-class ASSETBROWSER_MT_edit(AssetBrowserMenu, Menu):
-bl_label = "Edit"
+class ASSETBROWSER_MT_catalog(AssetBrowserMenu, Menu):
+bl_label = "Catalog"
 
 def draw(self, _context):
 layout = self.layout
@@ -692,6 +692,10 @@ class ASSETBROWSER_MT_edit(AssetBrowserMenu, Menu):
 layout.operator("asset.catalog_undo", text="Undo")
 layout.operator("asset.catalog_redo", text="Redo")
 
+layout.separator()
+layout.operator("asset.catalogs_save")
+layout.operator("asset.catalog_new").parent_path = ""
+
 
 class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
 bl_region_type = 'TOOL_PROPS'
@@ -844,7 +848,7 @@ classes = (
 ASSETBROWSER_MT_editor_menus,
 ASSETBROWSER_MT_view,
 ASSETBROWSER_MT_select,
-ASSETBROWSER_MT_edit,
+ASSETBROWSER_MT_catalog,
 ASSETBROWSER_MT_metadata_preview_menu,
 ASSETBROWSER_PT_metadata,
 ASSETBROWSER_PT_metadata_preview,

___
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] [fb8778a28c9] master: Fix T103394: default/active color status lost after remeshing

2022-12-23 Thread Philipp Oeser
Commit: fb8778a28c932a78b4f680e4b6eccd3441b38752
Author: Philipp Oeser
Date:   Thu Dec 22 15:13:08 2022 +0100
Branches: master
https://developer.blender.org/rBfb8778a28c932a78b4f680e4b6eccd3441b38752

Fix T103394: default/active color status lost after remeshing

Caused by rB6514bb05ea5a.

For the remeshing, we have to make sure these names are brought over
each time a mesh is made from another in the process.

This happens when reprojecting the colors in
`BKE_remesh_reproject_vertex_paint` and also again in
`BKE_mesh_nomain_to_mesh`. A bit unsure if this should happen as deep as
in `BKE_mesh_nomain_to_mesh` (if not, this can be isolated to
`voxel_remesh_exec`), but I would assume other callers of
`BKE_mesh_nomain_to_mesh` would actually benefit from it, too?

Maniphest Tasks: T103394

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

===

M   source/blender/blenkernel/intern/mesh_convert.cc
M   source/blender/blenkernel/intern/mesh_remesh_voxel.cc

===

diff --git a/source/blender/blenkernel/intern/mesh_convert.cc 
b/source/blender/blenkernel/intern/mesh_convert.cc
index 8354de20e20..9f9548a5e4c 100644
--- a/source/blender/blenkernel/intern/mesh_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_convert.cc
@@ -1191,6 +1191,16 @@ void BKE_mesh_nomain_to_mesh(Mesh *mesh_src, Mesh 
*mesh_dst, Object *ob)
   CustomData_copy(_src->pdata, _dst->pdata, mask.pmask, CD_ASSIGN, 
mesh_src->totpoly);
   CustomData_copy(_src->ldata, _dst->ldata, mask.lmask, CD_ASSIGN, 
mesh_src->totloop);
 
+  /* Make sure active/default color attribute (names) are brought over. */
+  if (mesh_src->active_color_attribute) {
+MEM_SAFE_FREE(mesh_dst->active_color_attribute);
+mesh_dst->active_color_attribute = 
BLI_strdup(mesh_src->active_color_attribute);
+  }
+  if (mesh_src->default_color_attribute) {
+MEM_SAFE_FREE(mesh_dst->default_color_attribute);
+mesh_dst->default_color_attribute = 
BLI_strdup(mesh_src->default_color_attribute);
+  }
+
   BLI_freelistN(_dst->vertex_group_names);
   mesh_dst->vertex_group_names = mesh_src->vertex_group_names;
   BLI_listbase_clear(_src->vertex_group_names);
diff --git a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc 
b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc
index a2916c75d51..ddc0625ba6b 100644
--- a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc
+++ b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc
@@ -489,6 +489,16 @@ void BKE_remesh_reproject_vertex_paint(Mesh *target, const 
Mesh *source)
 }
   }
 
+  /* Make sure active/default color attribute (names) are brought over. */
+  if (source->active_color_attribute) {
+MEM_SAFE_FREE(target->active_color_attribute);
+target->active_color_attribute = 
BLI_strdup(source->active_color_attribute);
+  }
+  if (source->default_color_attribute) {
+MEM_SAFE_FREE(target->default_color_attribute);
+target->default_color_attribute = 
BLI_strdup(source->default_color_attribute);
+  }
+
   MEM_SAFE_FREE(source_lmap);
   MEM_SAFE_FREE(source_lmap_mem);
   MEM_SAFE_FREE(target_lmap);

___
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