[Bf-blender-cvs] [ac4abb99e9a] greasepencil-refactor: Merge branch 'greasepencil-object' into greasepencil-refactor

2019-12-30 Thread Antonio Vazquez
Commit: ac4abb99e9a5a2da32bf606c703e219d98c047a2
Author: Antonio Vazquez
Date:   Mon Dec 30 19:44:30 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rBac4abb99e9a5a2da32bf606c703e219d98c047a2

Merge branch 'greasepencil-object' into greasepencil-refactor

 Conflicts:
source/blender/blenloader/intern/versioning_280.c

===



===

diff --cc source/blender/blenloader/intern/versioning_280.c
index 6da703fb6ac,1011f3e1043..55a0fb00963
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -4347,121 -4345,10 +4347,127 @@@ void blo_do_versions_280(FileData *fd, 
}
  }
  
 +/* Update Grease Pencil Materials */
 +/* TODO: This requires version bump!! (we keep as is for testing). */
 +{
 +  LISTBASE_FOREACH (Material *, mat, >materials) {
 +MaterialGPencilStyle *gp_style = mat->gp_style;
 +if (gp_style == NULL) {
 +  continue;
 +}
 +/* Fix Grease Pencil Material colors to Linear. */
 +srgb_to_linearrgb_v4(gp_style->stroke_rgba, gp_style->stroke_rgba);
 +srgb_to_linearrgb_v4(gp_style->fill_rgba, gp_style->fill_rgba);
 +
 +/* Set Checker material as Solid. This fill mode has been removed and 
replaced
 + * by textures. */
 +if (gp_style->fill_style == GP_STYLE_FILL_STYLE_CHECKER) {
 +  gp_style->fill_style = GP_STYLE_FILL_STYLE_SOLID;
 +}
 +/* Update Alpha channel for texture opacity. */
 +if (gp_style->fill_style == GP_STYLE_FILL_STYLE_TEXTURE) {
 +  gp_style->fill_rgba[3] *= gp_style->texture_opacity;
 +}
 +/* Stroke stencil mask to mix = 1. */
 +if (gp_style->flag & GP_STYLE_STROKE_PATTERN) {
 +  gp_style->mix_stroke_factor = 1.0f;
 +  gp_style->flag &= ~GP_STYLE_STROKE_PATTERN;
 +}
 +/* Mix disabled, set mix factor to 0. */
 +else if ((gp_style->flag & GP_STYLE_STROKE_TEX_MIX) == 0) {
 +  gp_style->mix_stroke_factor = 0.0f;
 +}
 +  }
 +
 +  /* Fix Grease Pencil VFX and modifiers. */
 +  LISTBASE_FOREACH (Object *, ob, >objects) {
 +if (ob->type != OB_GPENCIL) {
 +  continue;
 +}
 +/* VFX. */
 +LISTBASE_FOREACH (ShaderFxData *, fx, >shader_fx) {
 +  switch (fx->type) {
 +case eShaderFxType_Colorize: {
 +  ColorizeShaderFxData *vfx = (ColorizeShaderFxData *)fx;
 +  if (ELEM(vfx->mode, eShaderFxColorizeMode_GrayScale, 
eShaderFxColorizeMode_Sepia)) {
 +vfx->factor = 1.0f;
 +  }
 +  srgb_to_linearrgb_v4(vfx->low_color, vfx->low_color);
 +  srgb_to_linearrgb_v4(vfx->high_color, vfx->high_color);
 +  break;
 +}
 +case eShaderFxType_Pixel: {
 +  PixelShaderFxData *vfx = (PixelShaderFxData *)fx;
 +  srgb_to_linearrgb_v4(vfx->rgba, vfx->rgba);
 +  break;
 +}
 +case eShaderFxType_Rim: {
 +  RimShaderFxData *vfx = (RimShaderFxData *)fx;
 +  srgb_to_linearrgb_v3_v3(vfx->rim_rgb, vfx->rim_rgb);
 +  srgb_to_linearrgb_v3_v3(vfx->mask_rgb, vfx->mask_rgb);
 +  break;
 +}
 +case eShaderFxType_Shadow: {
 +  ShadowShaderFxData *vfx = (ShadowShaderFxData *)fx;
 +  srgb_to_linearrgb_v4(vfx->shadow_rgba, vfx->shadow_rgba);
 +  break;
 +}
 +case eShaderFxType_Glow: {
 +  GlowShaderFxData *vfx = (GlowShaderFxData *)fx;
 +  srgb_to_linearrgb_v3_v3(vfx->glow_color, vfx->glow_color);
 +  srgb_to_linearrgb_v3_v3(vfx->select_color, vfx->select_color);
 +  break;
 +}
 +default:
 +  break;
 +  }
 +}
 +
 +/* Modifiers. */
 +LISTBASE_FOREACH (GpencilModifierData *, md, 
>greasepencil_modifiers) {
 +  const GpencilModifierTypeInfo *mti = 
BKE_gpencil_modifierType_getInfo(md->type);
 +  switch (mti->type) {
 +case eGpencilModifierTypeType_Gpencil: {
 +  TintGpencilModifierData *mmd = (TintGpencilModifierData *)md;
 +  srgb_to_linearrgb_v3_v3(mmd->rgb, mmd->rgb);
 +  break;
 +}
 +default:
 +  break;
 +  }
 +}
 +  }
 +
 +  /* Fix Layers Colors and Vertex Colors to Linear. */
 +  LISTBASE_FOREACH (bGPdata *, gpd, >gpencils) {
 +if (gpd->flag & GP_DATA_ANNOTATIONS) {
 +  continue;
 +}
 +/* Onion colors. */
 +srgb_to_linearrgb_v3_v3(gpd->gcolor_prev, gpd->gcolor_prev);
 +srgb_to_linearrgb_v3_v3(gpd->gcolor_next, gpd->gcolor_next);
 +
 +

[Bf-blender-cvs] [433ab9018bf] greasepencil-object: Merge branch 'master' into greasepencil-object

2019-12-30 Thread Antonio Vazquez
Commit: 433ab9018bf37f2e4b9133083abccb68b3a9f10c
Author: Antonio Vazquez
Date:   Mon Dec 30 19:42:06 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB433ab9018bf37f2e4b9133083abccb68b3a9f10c

Merge branch 'master' into greasepencil-object

===



===



___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [56ef761381e] master: Image Editor: Initialize Add Tile options from current tile

2019-12-30 Thread Lukas Stockner
Commit: 56ef761381ecdac6c1c379044ccf8b2fb296a9bd
Author: Lukas Stockner
Date:   Mon Dec 30 19:14:56 2019 +0100
Branches: master
https://developer.blender.org/rB56ef761381ecdac6c1c379044ccf8b2fb296a9bd

Image Editor: Initialize Add Tile options from current tile

Previously, non-default alpha or float settings had be set manually.

With this change, the Add Tile and Fill Tile operators initialize
width, height, alpha and float from the currently selected tile
if it has a vaild ImBuf, otherwise from the first tile.

===

M   source/blender/editors/space_image/image_ops.c

===

diff --git a/source/blender/editors/space_image/image_ops.c 
b/source/blender/editors/space_image/image_ops.c
index 586d7995ed8..061ed978acd 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -4279,6 +4279,33 @@ static void draw_fill_tile(PointerRNA *ptr, uiLayout 
*layout)
   uiItemR(col[1], ptr, "float", 0, NULL, ICON_NONE);
 }
 
+static void initialize_fill_tile(PointerRNA *ptr, Image *ima, ImageTile *tile)
+{
+  ImageUser iuser;
+  BKE_imageuser_default();
+  if (tile != NULL) {
+iuser.tile = tile->tile_number;
+  }
+
+  /* Acquire ibuf to get the default values.
+   * If the specified tile has no ibuf, try acquiring the main tile instead
+   * (unless the specified tile already was the main tile).*/
+  ImBuf *ibuf = BKE_image_acquire_ibuf(ima, , NULL);
+  if (ibuf == NULL && (tile != NULL) && (tile->tile_number != 1001)) {
+ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL);
+  }
+
+  if (ibuf != NULL) {
+/* Initialize properties from reference tile. */
+RNA_int_set(ptr, "width", ibuf->x);
+RNA_int_set(ptr, "height", ibuf->y);
+RNA_boolean_set(ptr, "float", ibuf->rect_float != NULL);
+RNA_boolean_set(ptr, "alpha", ibuf->planes > 24);
+
+BKE_image_release_ibuf(ima, ibuf, NULL);
+  }
+}
+
 static void def_fill_tile(StructOrFunctionRNA *srna)
 {
   PropertyRNA *prop;
@@ -4358,6 +4385,9 @@ static int tile_add_invoke(bContext *C, wmOperator *op, 
const wmEvent *UNUSED(ev
 }
   }
 
+  ImageTile *tile = BLI_findlink(>tiles, ima->active_tile_index);
+  initialize_fill_tile(op->ptr, ima, tile);
+
   RNA_int_set(op->ptr, "number", next_number);
   RNA_int_set(op->ptr, "count", 1);
   RNA_string_set(op->ptr, "label", "");
@@ -4487,17 +4517,7 @@ static int tile_fill_exec(bContext *C, wmOperator *op)
 
 static int tile_fill_invoke(bContext *C, wmOperator *op, const wmEvent 
*UNUSED(event))
 {
-  Image *ima = CTX_data_edit_image(C);
-
-  /* Acquire first tile to get the defaults. */
-  ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL);
-  if (ibuf != NULL) {
-RNA_int_set(op->ptr, "width", ibuf->x);
-RNA_int_set(op->ptr, "height", ibuf->y);
-RNA_boolean_set(op->ptr, "float", ibuf->rect_float != NULL);
-RNA_boolean_set(op->ptr, "alpha", ibuf->planes > 24);
-BKE_image_release_ibuf(ima, ibuf, NULL);
-  }
+  initialize_fill_tile(op->ptr, CTX_data_edit_image(C), NULL);
 
   return WM_operator_props_dialog_popup(C, op, 15 * UI_UNIT_X, 5 * UI_UNIT_Y);
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [a38840a9b82] master: Cleanup: clang-format

2019-12-30 Thread Lukas Stockner
Commit: a38840a9b82e037f645b3340aef761abdc4f4f65
Author: Lukas Stockner
Date:   Mon Dec 30 19:20:28 2019 +0100
Branches: master
https://developer.blender.org/rBa38840a9b82e037f645b3340aef761abdc4f4f65

Cleanup: clang-format

===

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

===

diff --git a/source/blender/makesrna/intern/rna_userdef.c 
b/source/blender/makesrna/intern/rna_userdef.c
index e90aa80df47..b35b1c8b4a1 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4511,8 +4511,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
   prop = RNA_def_property(srna, "lookdev_sphere_size", PROP_INT, PROP_PIXEL);
   RNA_def_property_int_sdna(prop, NULL, "lookdev_sphere_size");
   RNA_def_property_range(prop, 50, 400);
-  RNA_def_property_ui_text(
-  prop, "HDRI Preview Size", "Diameter of the HDRI preview spheres");
+  RNA_def_property_ui_text(prop, "HDRI Preview Size", "Diameter of the HDRI 
preview spheres");
   RNA_def_property_update(prop, 0, "rna_userdef_update");
 
   /* View2D Grid Displays */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [ae9d2763529] undo-experiments: undoexp: do not clear icon_id of re-used IDs.

2019-12-30 Thread Bastien Montagne
Commit: ae9d276352914b9f9f83195b84f5924eb472e50e
Author: Bastien Montagne
Date:   Mon Dec 30 17:58:27 2019 +0100
Branches: undo-experiments
https://developer.blender.org/rBae9d276352914b9f9f83195b84f5924eb472e50e

undoexp: do not clear icon_id of re-used IDs.

Those icon_id's remain valid, and allocated in the preview system,
clearing them here will lead to asserts...

===

M   source/blender/blenloader/intern/readfile.c

===

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 43085480fff..467edb6cc33 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9461,7 +9461,7 @@ static BHead *read_libblock(FileData *fd,
   id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW;
   id->lib = main->curlib;
   id->us = ID_FAKE_USERS(id);
-  id->icon_id = 0;
+  /* Do not reset id->icon_id here, memory allocated for it remains 
valid. */
   id->newid = NULL; /* Needed because .blend may have been saved with 
crap value here... */
   id->orig_id = NULL;

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [03145616843] master: Sculpt: Add color alpha controls to the brush cursor

2019-12-30 Thread Pablo Dobarro
Commit: 03145616843e06ee215d9a06973a2655eb0d486a
Author: Pablo Dobarro
Date:   Mon Dec 30 16:41:20 2019 +0100
Branches: master
https://developer.blender.org/rB03145616843e06ee215d9a06973a2655eb0d486a

Sculpt: Add color alpha controls to the brush cursor

Previously the alpha was hardcoded to 0.7. Now it is possible to control
the cursor alpha by changing the alpha color of the cursor color
property. New alpha default is 0.9. This, with the new saturated colors,
should make the cursor more visible on highdpi screens.

I also removed the cache location preview as it is too visible right now
with the new alpha and color values.

Reviewed By: billreynish

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

===

M   source/blender/blenkernel/intern/brush.c
M   source/blender/blenloader/intern/versioning_280.c
M   source/blender/editors/sculpt_paint/paint_cursor.c
M   source/blender/makesdna/DNA_brush_defaults.h
M   source/blender/makesdna/DNA_brush_types.h
M   source/blender/makesrna/intern/rna_brush.c
M   source/blender/windowmanager/intern/wm_operators.c

===

diff --git a/source/blender/blenkernel/intern/brush.c 
b/source/blender/blenkernel/intern/brush.c
index b5f2ca0f117..e9760f76cfc 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -893,9 +893,11 @@ void BKE_brush_debug_print_state(Brush *br)
   BR_TEST(add_col[0], f);
   BR_TEST(add_col[1], f);
   BR_TEST(add_col[2], f);
+  BR_TEST(add_col[3], f);
   BR_TEST(sub_col[0], f);
   BR_TEST(sub_col[1], f);
   BR_TEST(sub_col[2], f);
+  BR_TEST(sub_col[3], f);
 
   printf("\n");
 
@@ -1006,6 +1008,11 @@ void BKE_brush_sculpt_reset(Brush *br)
   }
 
   /* Cursor colors */
+
+  /* Default Alpha */
+  br->add_col[3] = 0.90f;
+  br->sub_col[3] = 0.90f;
+
   switch (br->sculpt_tool) {
 case SCULPT_TOOL_DRAW:
 case SCULPT_TOOL_DRAW_SHARP:
diff --git a/source/blender/blenloader/intern/versioning_280.c 
b/source/blender/blenloader/intern/versioning_280.c
index 03582990703..bf53d6f216b 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -4317,5 +4317,11 @@ void blo_do_versions_280(FileData *fd, Library 
*UNUSED(lib), Main *bmain)
 }
   }
 }
+
+/* Brush cursor alpha */
+for (Brush *br = bmain->brushes.first; br; br = br->id.next) {
+  br->add_col[3] = 0.9f;
+  br->sub_col[3] = 0.9f;
+}
   }
 }
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c 
b/source/blender/editors/sculpt_paint/paint_cursor.c
index 856072ec47a..9021666c001 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1329,7 +1329,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, 
void *UNUSED(unused))
 
   /* set various defaults */
   const float *outline_col = brush->add_col;
-  const float outline_alpha = 0.7f;
+  const float outline_alpha = brush->add_col[3];
   float translation[2] = {x, y};
   float final_radius = (BKE_brush_size_get(scene, brush) * zoomx);
 
@@ -1547,16 +1547,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, 
void *UNUSED(unused))
   }
   else {
 if (vc.obact->sculpt->cache && !vc.obact->sculpt->cache->first_time) {
-  /* Draw cursor location preview when the stroke is active using the 
data from StrokeCache
-   */
-  float cursor_location[3];
   wmViewport(>winrct);
-  copy_v3_v3(cursor_location, ss->cache->true_location);
-  if (ss->cache->brush->sculpt_tool == SCULPT_TOOL_GRAB) {
-add_v3_v3(cursor_location, ss->cache->grab_delta);
-  }
-  cursor_draw_point_with_symmetry(
-  pos, ar, cursor_location, sd, vc.obact, ss->cache->radius);
 
   /* Draw cached dynamic mesh preview lines */
   if (brush->sculpt_tool == SCULPT_TOOL_GRAB && (brush->flag & 
BRUSH_GRAB_ACTIVE_VERTEX) &&
diff --git a/source/blender/makesdna/DNA_brush_defaults.h 
b/source/blender/makesdna/DNA_brush_defaults.h
index 9d3689ce4ee..f7998fab8db 100644
--- a/source/blender/makesdna/DNA_brush_defaults.h
+++ b/source/blender/makesdna/DNA_brush_defaults.h
@@ -85,10 +85,10 @@
 /* brush appearance  */ \
  \
 /* add mode color is light red */ \
-.add_col = {1.0, 0.39, 0.39}, \
+.add_col = {1.0, 0.39, 0.39, 0.9}, \
  \
 /* subtract mode color is light blue */ \
-.sub_col = {0.39, 0.39, 1.0}, \
+.sub_col = {0.39, 0.39, 1.0, 0.9}, \
  \
 .stencil_pos = {256, 256}, \
 .stencil_dimension = {256, 256}, \
diff --git a/source/blender/makesdna/DNA_brush_types.h 
b/source/blender/makesdna/DNA_brush_types.h
index 3860ea6b312..8cd0b5d55cd 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -357,8 

[Bf-blender-cvs] [394b48029c5] master: Sculpt: Remove partial viewport updates from sculpt stroke code

2019-12-30 Thread Pablo Dobarro
Commit: 394b48029c5335381f774f83524ad6ee5cb986da
Author: Pablo Dobarro
Date:   Wed Dec 18 17:35:03 2019 +0100
Branches: master
https://developer.blender.org/rB394b48029c5335381f774f83524ad6ee5cb986da

Sculpt: Remove partial viewport updates from sculpt stroke code

Partial updates are not currently supported in the Workbench engine, so
we can skip the rect calculation during the stroke.

Reviewed By: jbakker

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

===

M   source/blender/editors/sculpt_paint/sculpt.c

===

diff --git a/source/blender/editors/sculpt_paint/sculpt.c 
b/source/blender/editors/sculpt_paint/sculpt.c
index b26d706bbf4..10772fa68ba 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7212,9 +7212,7 @@ static void sculpt_flush_update_step(bContext *C, 
SculptUpdateType update_flags)
 ED_region_tag_redraw(ar);
   }
   else {
-/* Fast path where we just update the BVH nodes that changed, and redraw
- * only the part of the 3D viewport where changes happened. */
-rcti r;
+/* Fast path where we just update the BVH nodes that changed. */
 
 if (update_flags & SCULPT_UPDATE_COORDS) {
   BKE_pbvh_update_bounds(ss->pbvh, PBVH_UpdateBB);
@@ -7224,21 +7222,7 @@ static void sculpt_flush_update_step(bContext *C, 
SculptUpdateType update_flags)
   sculpt_update_object_bounding_box(ob);
 }
 
-if (sculpt_get_redraw_rect(ar, CTX_wm_region_view3d(C), ob, )) {
-  if (ss->cache) {
-ss->cache->current_r = r;
-  }
-
-  /* previous is not set in the current cache else
-   * the partial rect will always grow */
-  sculpt_extend_redraw_rect_previous(ob, );
-
-  r.xmin += ar->winrct.xmin - 2;
-  r.xmax += ar->winrct.xmin + 2;
-  r.ymin += ar->winrct.ymin - 2;
-  r.ymax += ar->winrct.ymin + 2;
-  ED_region_tag_redraw_partial(ar, , true);
-}
+ED_region_tag_redraw(ar);
   }
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [6a54969cf15] master: Fix T72747: Increase minimum voxel size in the voxel remesher

2019-12-30 Thread Pablo Dobarro
Commit: 6a54969cf15e861e13c654c230a35db8e6f377f9
Author: Pablo Dobarro
Date:   Mon Dec 30 01:24:18 2019 +0100
Branches: master
https://developer.blender.org/rB6a54969cf15e861e13c654c230a35db8e6f377f9

Fix T72747: Increase minimum voxel size in the voxel remesher

This was causing an ArithmeticError in OpenVDB with a voxel size that
small.

Another solution could be scaling both the mesh and the OpenVDB grid
with opposite values to support a larger range of voxel sizes, but I
would like to have a better solution to the voxel remesher compatibility
with small objects.

Reviewed By: JacquesLucke

Maniphest Tasks: T72747

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

===

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

===

diff --git a/source/blender/makesrna/intern/rna_mesh.c 
b/source/blender/makesrna/intern/rna_mesh.c
index 5890c3fe8a2..5e21fc883a9 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -2987,7 +2987,7 @@ static void rna_def_mesh(BlenderRNA *brna)
   /* Remesh */
   prop = RNA_def_property(srna, "remesh_voxel_size", PROP_FLOAT, 
PROP_DISTANCE);
   RNA_def_property_float_sdna(prop, NULL, "remesh_voxel_size");
-  RNA_def_property_range(prop, 0.1f, FLT_MAX);
+  RNA_def_property_range(prop, 0.0001f, FLT_MAX);
   RNA_def_property_ui_range(prop, 0.0001f, FLT_MAX, 0.01, 4);
   RNA_def_property_ui_text(prop,
"Voxel Size",

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [1ea1c1232a2] undo-experiments: Merge branch 'master' into undo-experiments

2019-12-30 Thread Bastien Montagne
Commit: 1ea1c1232a283b880120caae198c1b8f371b31d6
Author: Bastien Montagne
Date:   Mon Dec 30 15:30:59 2019 +0100
Branches: undo-experiments
https://developer.blender.org/rB1ea1c1232a283b880120caae198c1b8f371b31d6

Merge branch 'master' into undo-experiments

===



===



___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [62d131e962d] master: Fix T72792: Crash with Vertex Groups + Weld Modifier after generative modifiers

2019-12-30 Thread mano-wii
Commit: 62d131e962d6e0a4f39db98d4f89243c16c55779
Author: mano-wii
Date:   Mon Dec 30 11:25:09 2019 -0300
Branches: master
https://developer.blender.org/rB62d131e962d6e0a4f39db98d4f89243c16c55779

Fix T72792: Crash with Vertex Groups + Weld Modifier after generative modifiers

Some generative modifiers remove the `CD_MDEFORMVERT` custom layer.
So make sure it exists in the mesh.

===

M   source/blender/modifiers/intern/MOD_weld.c

===

diff --git a/source/blender/modifiers/intern/MOD_weld.c 
b/source/blender/modifiers/intern/MOD_weld.c
index b393cedbd37..9c8579e1cd3 100644
--- a/source/blender/modifiers/intern/MOD_weld.c
+++ b/source/blender/modifiers/intern/MOD_weld.c
@@ -1629,13 +1629,15 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, 
const ModifierEvalContex
   if (defgrp_index != -1) {
 MDeformVert *dvert, *dv;
 dvert = CustomData_get_layer(>vdata, CD_MDEFORMVERT);
-dv = [0];
-v_mask = BLI_BITMAP_NEW(totvert, __func__);
-for (i = 0; i < totvert; i++, dv++) {
-  const bool found = defvert_find_weight(dv, defgrp_index) > 0.0f;
-  if (found) {
-BLI_BITMAP_ENABLE(v_mask, i);
-v_mask_act++;
+if (dvert) {
+  dv = [0];
+  v_mask = BLI_BITMAP_NEW(totvert, __func__);
+  for (i = 0; i < totvert; i++, dv++) {
+const bool found = defvert_find_weight(dv, defgrp_index) > 0.0f;
+if (found) {
+  BLI_BITMAP_ENABLE(v_mask, i);
+  v_mask_act++;
+}
   }
 }
   }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [3b891989ac4] master: Fix T68131: Cycles bake panel code typo

2019-12-30 Thread mano-wii
Commit: 3b891989ac41003be2ef5b3b7534f488d14d65ed
Author: mano-wii
Date:   Mon Dec 30 11:07:17 2019 -0300
Branches: master
https://developer.blender.org/rB3b891989ac41003be2ef5b3b7534f488d14d65ed

Fix T68131: Cycles bake panel code typo

```
NameError: name 'col' is not defined
```

===

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

===

diff --git a/intern/cycles/blender/addon/ui.py 
b/intern/cycles/blender/addon/ui.py
index 011c83d44b8..c4182ba564a 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1949,7 +1949,7 @@ class CYCLES_RENDER_PT_bake_output(CyclesButtonsPanel, 
Panel):
 layout.prop(rd, "use_bake_clear", text="Clear Image")
 
 if rd.bake_type == 'DISPLACEMENT':
-col.prop(rd, "use_bake_lores_mesh")
+layout.prop(rd, "use_bake_lores_mesh")
 else:
 
 layout.prop(cbk, "margin")

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [d4046f8c47c] greasepencil-refactor: Merge branch 'greasepencil-object' into greasepencil-refactor

2019-12-30 Thread Antonio Vazquez
Commit: d4046f8c47cc8d0d0cdc41e7667cdb563746e07a
Author: Antonio Vazquez
Date:   Mon Dec 30 13:42:46 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rBd4046f8c47cc8d0d0cdc41e7667cdb563746e07a

Merge branch 'greasepencil-object' into greasepencil-refactor

===



===



___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [594f3b0cac0] greasepencil-object: Merge branch 'master' into greasepencil-object

2019-12-30 Thread Antonio Vazquez
Commit: 594f3b0cac06fe49bd55d30990645260353ff1c4
Author: Antonio Vazquez
Date:   Mon Dec 30 13:41:49 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB594f3b0cac06fe49bd55d30990645260353ff1c4

Merge branch 'master' into greasepencil-object

===



===



___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [4e0c2a8abd1] functions: Merge branch 'master' into functions

2019-12-30 Thread Jacques Lucke
Commit: 4e0c2a8abd1ebd85f21a5f3b701c849887795436
Author: Jacques Lucke
Date:   Mon Dec 30 13:35:53 2019 +0100
Branches: functions
https://developer.blender.org/rB4e0c2a8abd1ebd85f21a5f3b701c849887795436

Merge branch 'master' into functions

===



===



___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [f7fb1de41b6] master: Fix T72788: Crash Edit Custom Bone Object

2019-12-30 Thread Jeroen Bakker
Commit: f7fb1de41b68d90d971ea9ef1479a9a9a695fa04
Author: Jeroen Bakker
Date:   Mon Dec 30 13:04:09 2019 +0100
Branches: master
https://developer.blender.org/rBf7fb1de41b68d90d971ea9ef1479a9a9a695fa04

Fix T72788: Crash Edit Custom Bone Object

In a recent refactor we splitted the lines extractor in `extract_lines` and
`extract_lines_loose`. When an object is in edit mode the extracted
lines loose also had to include a dummy bmesh edge iterator. This change
adds this missing dummy method.

Reviewed By: antoniov

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

===

M   source/blender/draw/intern/draw_cache_extract_mesh.c

===

diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.c 
b/source/blender/draw/intern/draw_cache_extract_mesh.c
index 4bd0aac1ecc..711be9ee776 100644
--- a/source/blender/draw/intern/draw_cache_extract_mesh.c
+++ b/source/blender/draw/intern/draw_cache_extract_mesh.c
@@ -678,6 +678,18 @@ static void extract_lines_loose_ledge_mesh(const 
MeshRenderData *UNUSED(mr),
* `ibo.lines`. */
 }
 
+static void extract_lines_loose_ledge_bmesh(const MeshRenderData *UNUSED(mr),
+int UNUSED(e),
+BMEdge *UNUSED(eed),
+void *UNUSED(elb))
+{
+  /* This function is intentionally empty. The existence of this functions 
ensures that
+   * `iter_type` `MR_ITER_LVERT` is set when initializing the `MeshRenderData` 
(See
+   * `mesh_extract_iter_type`). This flag ensures that `mr->edge_loose_len` 
field is filled. This
+   * field we use in the `extract_lines_loose_finish` function to create a 
subrange from the
+   * `ibo.lines`. */
+}
+
 static void extract_lines_loose_finish(const MeshRenderData *mr,
void *UNUSED(ibo),
void *UNUSED(elb))
@@ -696,7 +708,7 @@ static const MeshExtract extract_lines_loose = {
 NULL,
 NULL,
 NULL,
-NULL,
+extract_lines_loose_ledge_bmesh,
 extract_lines_loose_ledge_mesh,
 NULL,
 NULL,

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [e6372a6ad67] greasepencil-object: Cleanup: Add missing space line

2019-12-30 Thread Antonio Vazquez
Commit: e6372a6ad67152dc4eddd56818442e2c2bc65b89
Author: Antonio Vazquez
Date:   Mon Dec 30 11:18:58 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBe6372a6ad67152dc4eddd56818442e2c2bc65b89

Cleanup: Add missing space line

===

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

===

diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index b59f5c0448f..4967a4da54f 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4773,6 +4773,7 @@ class VIEW3D_MT_edit_gpencil_stroke(Menu):
 layout.separator()
 layout.operator("gpencil.reset_transform_fill", text="Reset Fill 
Transform")
 
+
 class VIEW3D_MT_edit_gpencil_point(Menu):
 bl_label = "Point"

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [1e9098efc1a] greasepencil-refactor: Merge branch 'greasepencil-object' into greasepencil-refactor

2019-12-30 Thread Antonio Vazquez
Commit: 1e9098efc1ac1ed001611c52a9492d6e9ae0a189
Author: Antonio Vazquez
Date:   Mon Dec 30 11:17:44 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB1e9098efc1ac1ed001611c52a9492d6e9ae0a189

Merge branch 'greasepencil-object' into greasepencil-refactor

===



===



___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [2e5548f25e9] greasepencil-object: Merge branch 'master' into greasepencil-object

2019-12-30 Thread Antonio Vazquez
Commit: 2e5548f25e9da5f1d36910f909060feac15a73e6
Author: Antonio Vazquez
Date:   Mon Dec 30 11:17:08 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB2e5548f25e9da5f1d36910f909060feac15a73e6

Merge branch 'master' into greasepencil-object

===



===



___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [6557695c8cb] greasepencil-object: GPencil: Fix Transform Fill toolbar and menu

2019-12-30 Thread Antonio Vazquez
Commit: 6557695c8cb4ba874dd38f573fd38c399bf1234d
Author: Antonio Vazquez
Date:   Mon Dec 30 11:15:10 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB6557695c8cb4ba874dd38f573fd38c399bf1234d

GPencil: Fix Transform Fill toolbar and menu

This was removed by error in a merge

===

M   release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
M   release/scripts/startup/bl_ui/space_view3d.py

===

diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py 
b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 893ba3bd36d..54b414600d8 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1581,6 +1581,23 @@ class _defs_gpencil_edit:
 
draw_settings=_template_widget.VIEW3D_GGT_xform_extrude.draw_settings,
 )
 
+@ToolDef.from_fn
+def transform_fill():
+def draw_settings(context, layout, tool):
+props = tool.operator_properties("gpencil.transform_fill")
+row = layout.row()
+row.use_property_split = False
+row.prop(props, "mode", expand=True)
+
+return dict(
+idname="builtin.transform_fill",
+label="Transform Fill",
+icon="ops.gpencil.transform_fill",
+cursor='DEFAULT',
+widget=None,
+keymap=(),
+draw_settings=draw_settings,
+)
 
 class _defs_gpencil_sculpt:
 
@@ -2155,7 +2172,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, 
Panel):
 _defs_gpencil_edit.shear,
 _defs_gpencil_edit.tosphere,
 ),
-
+None,
+_defs_gpencil_edit.transform_fill,
 ],
 'SCULPT_GPENCIL': [
 _defs_gpencil_sculpt.generate_from_brushes,
diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index bb223e4f309..b59f5c0448f 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4770,6 +4770,8 @@ class VIEW3D_MT_edit_gpencil_stroke(Menu):
 layout.operator_menu_enum("gpencil.stroke_caps_set", text="Toggle 
Caps", property="type")
 layout.operator("gpencil.stroke_flip", text="Switch Direction")
 
+layout.separator()
+layout.operator("gpencil.reset_transform_fill", text="Reset Fill 
Transform")
 
 class VIEW3D_MT_edit_gpencil_point(Menu):
 bl_label = "Point"

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] [79476a9c0ab] master: Tracking: Selection Crash

2019-12-30 Thread Jeroen Bakker
Commit: 79476a9c0ab9e3f29d32a87aa8f9d859f2961cb9
Author: Jeroen Bakker
Date:   Mon Dec 30 09:21:29 2019 +0100
Branches: master
https://developer.blender.org/rB79476a9c0ab9e3f29d32a87aa8f9d859f2961cb9

Tracking: Selection Crash

Blender crashes when selecting a marker in the 3d viewport that is from the non 
active scene camera. This patch will solve this crash, but introduced a new 
scenario that isn't thought out. In the new scenario it is still hard to select 
a marker via the 3d viewport.

I would expect that when selecting a marker in this case would select the 
camera where the marker belongs to and select the marker that is under the 
mouse button.

Reviewed By: Sergey Sharybin

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

===

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

===

diff --git a/source/blender/editors/space_view3d/view3d_select.c 
b/source/blender/editors/space_view3d/view3d_select.c
index 092142a83cd..85e9a2d7680 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2077,7 +2077,8 @@ static bool ed_object_select_pick(bContext *C,
 
   if (has_bones && basact) {
 if (basact->object->type == OB_CAMERA) {
-  if (oldbasact == basact) {
+  MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, 
false);
+  if (clip != NULL && oldbasact == basact) {
 int i, hitresult;
 bool changed = false;
 
@@ -2094,7 +2095,6 @@ static bool ed_object_select_pick(bContext *C,
* in height word, this buffer value belongs to camera. not to 
bundle
*/
   if (buffer[4 * i + 3] & 0x) {
-MovieClip *clip = BKE_object_movieclip_get(scene, 
basact->object, false);
 MovieTracking *tracking = >tracking;
 ListBase *tracksbase;
 MovieTrackingTrack *track;

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs