[Bf-blender-cvs] [ff742921389] blender2.8: 3D View: hide object centers in paint modes

2018-08-07 Thread Campbell Barton
Commit: ff7429213899bfa802f3becc4377b4c07192ca64
Author: Campbell Barton
Date:   Wed Aug 8 15:52:25 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBff7429213899bfa802f3becc4377b4c07192ca64

3D View: hide object centers in paint modes

Match 2.7x behavior

===

M   source/blender/draw/modes/object_mode.c

===

diff --git a/source/blender/draw/modes/object_mode.c 
b/source/blender/draw/modes/object_mode.c
index 675a2a02db8..85a56285625 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2090,11 +2090,15 @@ static void 
DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, ViewL
if (v3d->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_ORIGINS) {
return;
}
+   const Object *obact = OBACT(view_layer);
+   if (obact->mode & OB_MODE_ALL_PAINT) {
+   return;
+   }
 
const bool is_library = ob->id.us > 1 || ID_IS_LINKED(ob);
DRWShadingGroup *shgroup;
 
-   if (ob == OBACT(view_layer)) {
+   if (ob == obact) {
shgroup = stl->g_data->center_active;
}
else if (ob->base_flag & BASE_SELECTED) {

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


[Bf-blender-cvs] [e8e812fb1d2] blender2.8: UI: only show vertex select w/ weight paint mode

2018-08-07 Thread Campbell Barton
Commit: e8e812fb1d2014ac62b9224ce74532c7f8d740d9
Author: Campbell Barton
Date:   Wed Aug 8 15:33:11 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBe8e812fb1d2014ac62b9224ce74532c7f8d740d9

UI: only show vertex select w/ weight paint mode

Was being used for vertex paint where it's not supported.

===

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

===

diff --git a/source/blender/editors/space_view3d/view3d_header.c 
b/source/blender/editors/space_view3d/view3d_header.c
index da449fac183..83cabd2a60e 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -321,7 +321,9 @@ static void uiTemplatePaintModeSelection(uiLayout *layout, 
struct bContext *C)
else {
uiLayout *row = uiLayoutRow(layout, true);
uiItemR(row, , "use_paint_mask", 
UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
-   uiItemR(row, , "use_paint_mask_vertex", 
UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+   if (ob->mode & OB_MODE_WEIGHT_PAINT) {
+   uiItemR(row, , "use_paint_mask_vertex", 
UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+   }
}
}
 }

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


[Bf-blender-cvs] [b6dba5caac1] blender2.8: Vertex Paint: use original mesh data

2018-08-07 Thread Campbell Barton
Commit: b6dba5caac17522d695ee2d40699178f32e35444
Author: Campbell Barton
Date:   Wed Aug 8 15:17:30 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBb6dba5caac17522d695ee2d40699178f32e35444

Vertex Paint: use original mesh data

This is already done in weight paint mode,
avoids a mesh refresh on selection changes.

===

M   source/blender/draw/modes/paint_vertex_mode.c

===

diff --git a/source/blender/draw/modes/paint_vertex_mode.c 
b/source/blender/draw/modes/paint_vertex_mode.c
index bbe17415da1..236f76367d4 100644
--- a/source/blender/draw/modes/paint_vertex_mode.c
+++ b/source/blender/draw/modes/paint_vertex_mode.c
@@ -36,6 +36,8 @@
 #include "DNA_mesh_types.h"
 #include "DNA_view3d_types.h"
 
+#include "DEG_depsgraph_query.h"
+
 extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */
 extern struct GlobalsUboStorage ts; /* draw_common.c */
 
@@ -147,6 +149,8 @@ static void PAINT_VERTEX_cache_populate(void *vedata, 
Object *ob)
const View3D *v3d = draw_ctx->v3d;
 
if ((ob->type == OB_MESH) && (ob == draw_ctx->obact)) {
+   /* We're always painting on original, display original data. */
+   ob = DEG_get_original_object(ob);
const Mesh *me = ob->data;
const bool use_wire = (v3d->overlay.paint_flag & 
V3D_OVERLAY_PAINT_WIRE) != 0;
const bool use_surface = v3d->overlay.vertex_paint_mode_opacity 
!= 0.0f;

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


[Bf-blender-cvs] [cb15854bf91] blender2.8: Fix missing uniform for vert/weight/texture paint

2018-08-07 Thread Campbell Barton
Commit: cb15854bf91e0d5229d73b5859b5e132a55217b0
Author: Campbell Barton
Date:   Wed Aug 8 15:08:50 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBcb15854bf91e0d5229d73b5859b5e132a55217b0

Fix missing uniform for vert/weight/texture paint

Entering any of these modes would assert immediately.

===

M   source/blender/draw/modes/paint_texture_mode.c
M   source/blender/draw/modes/paint_vertex_mode.c
M   source/blender/draw/modes/paint_weight_mode.c

===

diff --git a/source/blender/draw/modes/paint_texture_mode.c 
b/source/blender/draw/modes/paint_texture_mode.c
index 8256bb4d0d7..cf8e520323e 100644
--- a/source/blender/draw/modes/paint_texture_mode.c
+++ b/source/blender/draw/modes/paint_texture_mode.c
@@ -227,6 +227,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata)
DRWShadingGroup *grp = 
DRW_shgroup_create(e_data.image_sh, psl->image_faces);

DRW_shgroup_uniform_texture(grp, "image", tex);
DRW_shgroup_uniform_float(grp, 
"alpha", _ctx->v3d->overlay.texture_paint_mode_opacity, 1);
+   DRW_shgroup_uniform_block(grp, 
"globalsBlock", globals_ubo);

stl->g_data->shgroup_image_array[i] = grp;
}
else {
@@ -259,6 +260,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata)
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | 
DRW_STATE_DEPTH_LESS_EQUAL);
 
stl->g_data->lwire_shgrp = 
DRW_shgroup_create(e_data.wire_overlay_shader, psl->wire_overlay);
+   DRW_shgroup_uniform_block(stl->g_data->lwire_shgrp, 
"globalsBlock", globals_ubo);
}
 
{
diff --git a/source/blender/draw/modes/paint_vertex_mode.c 
b/source/blender/draw/modes/paint_vertex_mode.c
index 33af72e8616..bbe17415da1 100644
--- a/source/blender/draw/modes/paint_vertex_mode.c
+++ b/source/blender/draw/modes/paint_vertex_mode.c
@@ -125,6 +125,7 @@ static void PAINT_VERTEX_cache_init(void *vedata)
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | 
DRW_STATE_DEPTH_LESS_EQUAL);
 
stl->g_data->lwire_shgrp = 
DRW_shgroup_create(e_data.wire_overlay_shader, psl->wire_overlay);
+   DRW_shgroup_uniform_block(stl->g_data->lwire_shgrp, 
"globalsBlock", globals_ubo);
}
 
{
diff --git a/source/blender/draw/modes/paint_weight_mode.c 
b/source/blender/draw/modes/paint_weight_mode.c
index d4fc73e7f88..3bbe8911491 100644
--- a/source/blender/draw/modes/paint_weight_mode.c
+++ b/source/blender/draw/modes/paint_weight_mode.c
@@ -154,6 +154,7 @@ static void PAINT_WEIGHT_cache_init(void *vedata)
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | 
DRW_STATE_DEPTH_LESS_EQUAL);
 
stl->g_data->lwire_shgrp = 
DRW_shgroup_create(e_data.wire_overlay_shader, psl->wire_overlay);
+   DRW_shgroup_uniform_block(stl->g_data->lwire_shgrp, 
"globalsBlock", globals_ubo);
}
 
{
@@ -173,6 +174,7 @@ static void PAINT_WEIGHT_cache_init(void *vedata)
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | 
DRW_STATE_DEPTH_LESS_EQUAL);
 
stl->g_data->vert_shgrp = 
DRW_shgroup_create(e_data.vert_overlay_shader, psl->vert_overlay);
+   DRW_shgroup_uniform_block(stl->g_data->vert_shgrp, 
"globalsBlock", globals_ubo);
}
 }

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


[Bf-blender-cvs] [0cd2eb11ee1] blender2.8: UV: stitch multi-object support

2018-08-07 Thread Campbell Barton
Commit: 0cd2eb11ee1762aed076e1f45cbb66d25c90ae17
Author: Campbell Barton
Date:   Wed Aug 8 13:56:53 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB0cd2eb11ee1762aed076e1f45cbb66d25c90ae17

UV: stitch multi-object support

D3561 by @Al

===

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

===

diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c 
b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 18f1bc872c0..a5e18851f12 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -54,6 +54,7 @@
 #include "BKE_customdata.h"
 #include "BKE_mesh_mapping.h"
 #include "BKE_editmesh.h"
+#include "BKE_layer.h"
 
 #include "DEG_depsgraph.h"
 
@@ -150,20 +151,11 @@ typedef struct UvEdge {
 /* stitch state object */
 typedef struct StitchState {
float aspect;
-   /* use limit flag */
-   bool use_limit;
-   /* limit to operator, same as original operator */
-   float limit_dist;
-   /* snap uv islands together during stitching */
-   bool snap_islands;
-   /* stitch at midpoints or at islands */
-   bool midpoints;
/* object for editmesh */
Object *obedit;
/* editmesh, cached for use in modal handler */
BMEditMesh *em;
-   /* clear seams of stitched edges after stitch */
-   bool clear_seams;
+
/* element map for getting info about uv connectivity */
UvElementMap *element_map;
/* edge container */
@@ -178,6 +170,8 @@ typedef struct StitchState {
UvEdge *edges;
/* hash for quick lookup of edges */
GHash *edge_hash;
+   /* which islands to stop at (to make active) when pressing 'I' */
+   bool *island_is_stitchable;
 
/* count of separate uvs and edges */
int total_separate_edges;
@@ -185,18 +179,39 @@ typedef struct StitchState {
/* hold selection related information */
void **selection_stack;
int selection_size;
-   /* island that stays in place */
-   int static_island;
+
/* store number of primitives per face so that we can allocate the 
active island buffer later */
unsigned int *tris_per_island;
+   /* preview data */
+   StitchPreviewer *stitch_preview;
+} StitchState;
 
+/* Stitch state container. */
+typedef struct StitchStateContainer {
+   /* clear seams of stitched edges after stitch */
+   bool clear_seams;
+   /* use limit flag */
+   bool use_limit;
+   /* limit to operator, same as original operator */
+   float limit_dist;
+   /* snap uv islands together during stitching */
+   bool snap_islands;
+   /* stitch at midpoints or at islands */
+   bool midpoints;
/* vert or edge mode used for stitching */
char mode;
/* handle for drawing */
void *draw_handle;
-   /* preview data */
-   StitchPreviewer *stitch_preview;
-} StitchState;
+   /* island that stays in place */
+   int static_island;
+
+   /* Objects and states are aligned. */
+   int  objects_len;
+   Object **objects;
+   StitchState **states;
+
+   int active_object_index;
+} StitchStateContainer;
 
 typedef struct PreviewPosition {
int data_position;
@@ -270,7 +285,7 @@ static void stitch_preview_delete(StitchPreviewer 
*stitch_preview)
 }
 
 /* This function updates the header of the UV editor when the stitch tool 
updates its settings */
-static void stitch_update_header(StitchState *state, bContext *C)
+static void stitch_update_header(StitchStateContainer *ssc, bContext *C)
 {
const char *str = IFACE_(
"Mode(TAB) %s, "
@@ -285,12 +300,13 @@ static void stitch_update_header(StitchState *state, 
bContext *C)
ScrArea *sa = CTX_wm_area(C);
 
if (sa) {
-   BLI_snprintf(msg, sizeof(msg), str,
-state->mode == STITCH_VERT ? IFACE_("Vertex") : 
IFACE_("Edge"),
-WM_bool_as_string(state->snap_islands),
-WM_bool_as_string(state->midpoints),
-state->limit_dist,
-WM_bool_as_string(state->use_limit));
+   BLI_snprintf(
+   msg, sizeof(msg), str,
+   ssc->mode == STITCH_VERT ? IFACE_("Vertex") : 
IFACE_("Edge"),
+   WM_bool_as_string(ssc->snap_islands),
+   WM_bool_as_string(ssc->midpoints),
+   ssc->limit_dist,
+   WM_bool_as_string(ssc->use_limit));
 
ED_workspace_status_text(C, msg);
}
@@ -320,7 +336,9 @@ static void stitch_uv_rotate(float mat[2][2], float 
medianPoint[2], float uv[2],
 }
 
 /* check if two uvelements are stitchable. This should only 

[Bf-blender-cvs] [c252a7c37a3] blender2.8: UI: don't show pie menu w/ no active object

2018-08-07 Thread Campbell Barton
Commit: c252a7c37a3b03799962dd9324fea609648761bc
Author: Campbell Barton
Date:   Wed Aug 8 13:30:27 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBc252a7c37a3b03799962dd9324fea609648761bc

UI: don't show pie menu w/ no active object

Addresses T56272

===

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

===

diff --git a/source/blender/editors/space_view3d/view3d_buttons.c 
b/source/blender/editors/space_view3d/view3d_buttons.c
index 8fa327d8782..38fac7cb37d 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -60,6 +60,7 @@
 #include "BKE_deform.h"
 #include "BKE_object.h"
 #include "BKE_object_deform.h"
+#include "BKE_report.h"
 
 #include "DEG_depsgraph.h"
 
@@ -1223,10 +1224,14 @@ void VIEW3D_OT_properties(wmOperatorType *ot)
ot->flag = 0;
 }
 
-static int view3d_object_mode_menu(bContext *C, wmOperator *UNUSED(op))
+static int view3d_object_mode_menu(bContext *C, wmOperator *op)
 {
Object *ob = CTX_data_active_object(C);
-   if (ob && ((ob->mode & OB_MODE_EDIT) == 0) && (ELEM(ob->type, 
OB_ARMATURE))) {
+   if (ob == NULL) {
+   BKE_report(op->reports, RPT_WARNING, "No active object found");
+   return OPERATOR_CANCELLED;
+   }
+   else if (((ob->mode & OB_MODE_EDIT) == 0) && (ELEM(ob->type, 
OB_ARMATURE))) {
ED_object_mode_toggle(C, OB_MODE_POSE);
return OPERATOR_CANCELLED;
}

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


[Bf-blender-cvs] [81e99bdc75f] blender2.8: Merge branch 'master' into blender2.8

2018-08-07 Thread Campbell Barton
Commit: 81e99bdc75fe03726bb40525dff106dcd3593cbf
Author: Campbell Barton
Date:   Wed Aug 8 13:14:07 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB81e99bdc75fe03726bb40525dff106dcd3593cbf

Merge branch 'master' into blender2.8

===



===



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


[Bf-blender-cvs] [bb8497fd5d4] master: Cleanup: correct header guard

2018-08-07 Thread Campbell Barton
Commit: bb8497fd5d4a647c0b7221ed965dc58c9547a820
Author: Campbell Barton
Date:   Wed Aug 8 13:10:53 2018 +1000
Branches: master
https://developer.blender.org/rBbb8497fd5d4a647c0b7221ed965dc58c9547a820

Cleanup: correct header guard

Header guard was duplicated before renaming.

===

M   source/blender/compositor/operations/COM_MovieClipOperation.h

===

diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.h 
b/source/blender/compositor/operations/COM_MovieClipOperation.h
index fae889ed202..2b696cd5df6 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.h
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.h
@@ -21,8 +21,8 @@
  */
 
 
-#ifndef __COM_IMAGEOPERATION_H__
-#define __COM_IMAGEOPERATION_H__
+#ifndef __COM_MOVIECLIPOPERATION_H__
+#define __COM_MOVIECLIPOPERATION_H__
 
 #include "COM_NodeOperation.h"
 #include "DNA_movieclip_types.h"

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


[Bf-blender-cvs] [e71470e3160] blender2.8: Merge branch 'master' into blender2.8

2018-08-07 Thread Campbell Barton
Commit: e71470e3160ea37df46d4808c3c63d899a997205
Author: Campbell Barton
Date:   Wed Aug 8 11:53:22 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBe71470e3160ea37df46d4808c3c63d899a997205

Merge branch 'master' into blender2.8

===



===



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


[Bf-blender-cvs] [f86c965d7f2] master: Cleanup: use conforming header guard

2018-08-07 Thread Campbell Barton
Commit: f86c965d7f22b1a9b633ac3039e32327030822f3
Author: Campbell Barton
Date:   Wed Aug 8 11:49:51 2018 +1000
Branches: master
https://developer.blender.org/rBf86c965d7f22b1a9b633ac3039e32327030822f3

Cleanup: use conforming header guard

===

M   source/blender/compositor/intern/COM_CPUDevice.h
M   source/blender/compositor/intern/COM_ChunkOrder.h
M   source/blender/compositor/intern/COM_ChunkOrderHotspot.h
M   source/blender/compositor/intern/COM_CompositorContext.h
M   source/blender/compositor/intern/COM_Converter.h
M   source/blender/compositor/intern/COM_Debug.h
M   source/blender/compositor/intern/COM_Device.h
M   source/blender/compositor/intern/COM_ExecutionGroup.h
M   source/blender/compositor/intern/COM_ExecutionSystem.h
M   source/blender/compositor/intern/COM_MemoryBuffer.h
M   source/blender/compositor/intern/COM_MemoryProxy.h
M   source/blender/compositor/intern/COM_NodeConverter.h
M   source/blender/compositor/intern/COM_NodeGraph.h
M   source/blender/compositor/intern/COM_NodeOperation.h
M   source/blender/compositor/intern/COM_NodeOperationBuilder.h
M   source/blender/compositor/intern/COM_OpenCLDevice.h
M   source/blender/compositor/intern/COM_SingleThreadedOperation.h
M   source/blender/compositor/intern/COM_SocketReader.h
M   source/blender/compositor/intern/COM_WorkPackage.h
M   source/blender/compositor/intern/COM_WorkScheduler.h
M   source/blender/compositor/nodes/COM_AlphaOverNode.h
M   source/blender/compositor/nodes/COM_BilateralBlurNode.h
M   source/blender/compositor/nodes/COM_BlurNode.h
M   source/blender/compositor/nodes/COM_BokehBlurNode.h
M   source/blender/compositor/nodes/COM_BokehImageNode.h
M   source/blender/compositor/nodes/COM_BoxMaskNode.h
M   source/blender/compositor/nodes/COM_BrightnessNode.h
M   source/blender/compositor/nodes/COM_ChannelMatteNode.h
M   source/blender/compositor/nodes/COM_ChromaMatteNode.h
M   source/blender/compositor/nodes/COM_ColorBalanceNode.h
M   source/blender/compositor/nodes/COM_ColorCorrectionNode.h
M   source/blender/compositor/nodes/COM_ColorCurveNode.h
M   source/blender/compositor/nodes/COM_ColorMatteNode.h
M   source/blender/compositor/nodes/COM_ColorNode.h
M   source/blender/compositor/nodes/COM_ColorRampNode.h
M   source/blender/compositor/nodes/COM_ColorSpillNode.h
M   source/blender/compositor/nodes/COM_ColorToBWNode.h
M   source/blender/compositor/nodes/COM_CombineColorNode.h
M   source/blender/compositor/nodes/COM_CompositorNode.h
M   source/blender/compositor/nodes/COM_ConvertAlphaNode.h
M   source/blender/compositor/nodes/COM_CornerPinNode.h
M   source/blender/compositor/nodes/COM_CropNode.h
M   source/blender/compositor/nodes/COM_CryptomatteNode.h
M   source/blender/compositor/nodes/COM_DefocusNode.h
M   source/blender/compositor/nodes/COM_DespeckleNode.h
M   source/blender/compositor/nodes/COM_DifferenceMatteNode.h
M   source/blender/compositor/nodes/COM_DilateErodeNode.h
M   source/blender/compositor/nodes/COM_DirectionalBlurNode.h
M   source/blender/compositor/nodes/COM_DisplaceNode.h
M   source/blender/compositor/nodes/COM_DistanceMatteNode.h
M   source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
M   source/blender/compositor/nodes/COM_EllipseMaskNode.h
M   source/blender/compositor/nodes/COM_FlipNode.h
M   source/blender/compositor/nodes/COM_GammaNode.h
M   source/blender/compositor/nodes/COM_GlareNode.h
M   source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
M   source/blender/compositor/nodes/COM_HueSaturationValueNode.h
M   source/blender/compositor/nodes/COM_IDMaskNode.h
M   source/blender/compositor/nodes/COM_InpaintNode.h
M   source/blender/compositor/nodes/COM_InvertNode.h
M   source/blender/compositor/nodes/COM_LensDistortionNode.h
M   source/blender/compositor/nodes/COM_MapUVNode.h
M   source/blender/compositor/nodes/COM_MathNode.h
M   source/blender/compositor/nodes/COM_MixNode.h
M   source/blender/compositor/nodes/COM_MovieDistortionNode.h
M   source/blender/compositor/nodes/COM_NormalNode.h
M   source/blender/compositor/nodes/COM_NormalizeNode.h
M   source/blender/compositor/nodes/COM_OutputFileNode.h
M   source/blender/compositor/nodes/COM_PixelateNode.h
M   source/blender/compositor/nodes/COM_RotateNode.h
M   source/blender/compositor/nodes/COM_ScaleNode.h
M   source/blender/compositor/nodes/COM_SeparateColorNode.h
M   source/blender/compositor/nodes/COM_SetAlphaNode.h
M   source/blender/compositor/nodes/COM_SocketProxyNode.h
M   source/blender/compositor/nodes/COM_SplitViewerNode.h
M   source/blender/compositor/nodes/COM_Stabilize2dNode.h
M   source/blender/compositor/nodes/COM_SunBeamsNode.h
M   

[Bf-blender-cvs] [441177b1c79] blender2.8: Merge branch 'master' into blender2.8

2018-08-07 Thread Campbell Barton
Commit: 441177b1c79f7ee8fb3764feb5a1ee1fc97ec263
Author: Campbell Barton
Date:   Wed Aug 8 11:33:42 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB441177b1c79f7ee8fb3764feb5a1ee1fc97ec263

Merge branch 'master' into blender2.8

===



===



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


[Bf-blender-cvs] [d07d3e0987d] master: Cleanup: indentation

2018-08-07 Thread Campbell Barton
Commit: d07d3e0987d5b4caf86ae1dc4749c0062a5b6189
Author: Campbell Barton
Date:   Wed Aug 8 11:31:28 2018 +1000
Branches: master
https://developer.blender.org/rBd07d3e0987d5b4caf86ae1dc4749c0062a5b6189

Cleanup: indentation

===

M   source/blender/makesrna/intern/rna_mesh.c
M   source/blender/python/bmesh/bmesh_py_types_meshdata.c

===

diff --git a/source/blender/makesrna/intern/rna_mesh.c 
b/source/blender/makesrna/intern/rna_mesh.c
index 0e0e869a340..c97cf2923f2 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -3220,9 +3220,9 @@ static void rna_def_skin_vertices(BlenderRNA *brna, 
PropertyRNA *UNUSED(cprop))
 
prop = RNA_def_property(srna, "use_root", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MVERT_SKIN_ROOT);
-RNA_def_property_ui_text(prop, "Root",
- "Vertex is a root for rotation calculations and 
armature generation, "
- "setting this flag does not clear other roots in 
the same mesh island");
+   RNA_def_property_ui_text(prop, "Root",
+"Vertex is a root for rotation calculations 
and armature generation, "
+"setting this flag does not clear other roots 
in the same mesh island");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
 
prop = RNA_def_property(srna, "use_loose", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c 
b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index fabbfdb94c5..97e64fd376e 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -314,7 +314,7 @@ static int bpy_bmvertskin_flag_set(BPy_BMVertSkin *self, 
PyObject *value, void *
 static PyGetSetDef bpy_bmvertskin_getseters[] = {
/* attributes match rna_mesh_gen  */
{(char *)"radius",(getter)bpy_bmvertskin_radius_get, 
(setter)bpy_bmvertskin_radius_set, (char *)bpy_bmvertskin_radius_doc, NULL},
-{(char *)"use_root",  (getter)bpy_bmvertskin_flag_get,   
(setter)bpy_bmvertskin_flag_set,   (char *)bpy_bmvertskin_flag__use_root_doc,  
(void *)MVERT_SKIN_ROOT},
+   {(char *)"use_root",  (getter)bpy_bmvertskin_flag_get,   
(setter)bpy_bmvertskin_flag_set,   (char *)bpy_bmvertskin_flag__use_root_doc,  
(void *)MVERT_SKIN_ROOT},
{(char *)"use_loose", (getter)bpy_bmvertskin_flag_get,   
(setter)bpy_bmvertskin_flag_set,   (char *)bpy_bmvertskin_flag__use_loose_doc, 
(void *)MVERT_SKIN_LOOSE},
 
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */

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


[Bf-blender-cvs] [6fbd210b915] blender2.8: Merge branch 'master' into blender2.8

2018-08-07 Thread Campbell Barton
Commit: 6fbd210b9151e5c401330ca930b724f4d781bc48
Author: Campbell Barton
Date:   Wed Aug 8 11:05:08 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB6fbd210b9151e5c401330ca930b724f4d781bc48

Merge branch 'master' into blender2.8

===



===



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


[Bf-blender-cvs] [cb58658f414] blender2.8: Cleanup: style

2018-08-07 Thread Campbell Barton
Commit: cb58658f4145239082573aec49f261ce389a03ca
Author: Campbell Barton
Date:   Wed Aug 8 10:59:50 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBcb58658f4145239082573aec49f261ce389a03ca

Cleanup: style

===

M   source/blender/blenkernel/intern/subdiv_eval.c
M   source/blender/blenkernel/intern/subdiv_mesh.c
M   source/blender/compositor/operations/COM_CryptomatteOperation.cpp
M   source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M   source/blender/draw/engines/gpencil/gpencil_engine.c
M   source/blender/editors/gpencil/gpencil_add_stroke.c
M   source/blender/editors/gpencil/gpencil_brush.c
M   source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c

===

diff --git a/source/blender/blenkernel/intern/subdiv_eval.c 
b/source/blender/blenkernel/intern/subdiv_eval.c
index 8621b1f87f9..e23be84ee26 100644
--- a/source/blender/blenkernel/intern/subdiv_eval.c
+++ b/source/blender/blenkernel/intern/subdiv_eval.c
@@ -122,11 +122,11 @@ static void set_face_varying_data_from_uv(Subdiv *subdiv,
 vertex_index < num_face_vertices;
 vertex_index++, mluv++)
{
-   evaluator->setFaceVaryingData(evaluator,
-  layer_index,
- mluv->uv,
- uv_indicies[vertex_index],
- 1);
+   evaluator->setFaceVaryingData(evaluator,
+ layer_index,
+ mluv->uv,
+ uv_indicies[vertex_index],
+ 1);
}
}
 }
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c 
b/source/blender/blenkernel/intern/subdiv_mesh.c
index a58dbdcff84..bb27cb6a31e 100644
--- a/source/blender/blenkernel/intern/subdiv_mesh.c
+++ b/source/blender/blenkernel/intern/subdiv_mesh.c
@@ -2251,7 +2251,7 @@ static void points_for_loose_edges_interpolation_get(
 SubdivMeshContext *ctx,
 const MEdge *coarse_edge,
 const MEdge *neighbors[2],
-   float points_r[4][3])
+float points_r[4][3])
 {
const Mesh *coarse_mesh = ctx->coarse_mesh;
const MVert *coarse_mvert = coarse_mesh->mvert;
diff --git a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp 
b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
index f3fa81075c6..9a1cbdd7a00 100644
--- a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
@@ -22,7 +22,7 @@
 
 CryptomatteOperation::CryptomatteOperation(size_t num_inputs) : NodeOperation()
 {
-   for(size_t i = 0; i < num_inputs; i++) {
+   for (size_t i = 0; i < num_inputs; i++) {
this->addInputSocket(COM_DT_COLOR);
}
inputs.resize(num_inputs);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc 
b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index e20b589bf22..efd57734b48 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -1233,9 +1233,9 @@ void 
DepsgraphNodeBuilder::build_object_data_geometry_datablock(ID *obdata)
 DEG_NODE_TYPE_GEOMETRY,
 
function_bind(BKE_gpencil_eval_geometry,
   _1,
-   
   (bGPdata *)obdata_cow),
-   
   DEG_OPCODE_PLACEHOLDER,
-  "Geometry 
Eval");
+  (bGPdata 
*)obdata_cow),
+DEG_OPCODE_PLACEHOLDER,
+"Geometry Eval");
op_node->set_as_entry();
break;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c 
b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 668869a2f89..3f64d72d354 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -329,7 +329,7 @@ void GPENCIL_cache_init(void *vedata)
/* detect if playing animation */
stl->storage->is_playing = false;
   

[Bf-blender-cvs] [931a279f441] master: Cleanup: use static variables

2018-08-07 Thread Campbell Barton
Commit: 931a279f441f6f9c3266d4789e9aa5aed1c16aa8
Author: Campbell Barton
Date:   Wed Aug 8 11:00:57 2018 +1000
Branches: master
https://developer.blender.org/rB931a279f441f6f9c3266d4789e9aa5aed1c16aa8

Cleanup: use static variables

===

M   intern/clog/clog.c
M   intern/ghost/intern/GHOST_TaskbarX11.cpp

===

diff --git a/intern/clog/clog.c b/intern/clog/clog.c
index 9a80d99fe73..f64e7c19a5f 100644
--- a/intern/clog/clog.c
+++ b/intern/clog/clog.c
@@ -559,7 +559,7 @@ static void CLG_ctx_free(CLogContext *ctx)
  * \{ */
 
 /* We could support multiple at once, for now this seems not needed. */
-struct CLogContext *g_ctx = NULL;
+static struct CLogContext *g_ctx = NULL;
 
 void CLG_init(void)
 {
diff --git a/intern/ghost/intern/GHOST_TaskbarX11.cpp 
b/intern/ghost/intern/GHOST_TaskbarX11.cpp
index 2ef82dc6636..9826ccdfa37 100644
--- a/intern/ghost/intern/GHOST_TaskbarX11.cpp
+++ b/intern/ghost/intern/GHOST_TaskbarX11.cpp
@@ -44,7 +44,7 @@ static unity_event_loop_t unity_event_loop;
 
 static bool libunity_initialized = false;
 static bool libunity_available = false;
-void* libunity_handle = NULL;
+static void *libunity_handle = NULL;
 
 void GHOST_TaskBarX11::free()
 {

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


[Bf-blender-cvs] [5f71093bb64] blender2.8: Cleanup: Fix stupid duplication

2018-08-07 Thread Antonioya
Commit: 5f71093bb64c3cf589f432a8768e772dcbc72aed
Author: Antonioya
Date:   Tue Aug 7 22:26:54 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB5f71093bb64c3cf589f432a8768e772dcbc72aed

Cleanup: Fix stupid duplication

===

M   source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c

===

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index 89d48492e46..08cf1c13692 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -47,7 +47,6 @@
 #include "BKE_material.h"
 #include "BKE_main.h"
 
-#include "DEG_depsgraph.h"
 #include "DEG_depsgraph.h"
 
 #include "MOD_gpencil_util.h"

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


[Bf-blender-cvs] [d2f709b1792] blender2.8: Fix memory leak in previous commit

2018-08-07 Thread Antonioya
Commit: d2f709b1792ba017ba29b7228a706a7bb05622a1
Author: Antonioya
Date:   Tue Aug 7 22:22:03 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd2f709b1792ba017ba29b7228a706a7bb05622a1

Fix memory leak in previous commit

===

M   source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
M   source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c

===

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
index b47987ddbc0..b2df49a8d06 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
@@ -35,8 +35,6 @@
 #include "DNA_gpencil_types.h"
 #include "DNA_gpencil_modifier_types.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "BLI_blenlib.h"
 #include "BLI_ghash.h"
 #include "BLI_math_color.h"
@@ -130,7 +128,6 @@ static void bakeModifier(
if (newmat == NULL) {

BKE_object_material_slot_add(bmain, ob);
newmat = 
BKE_material_copy(bmain, mat);
-   newmat->gp_style = 
MEM_dupallocN(mat->gp_style);
newmat->preview = NULL;
 
assign_material(bmain, ob, 
newmat, ob->totcol, BKE_MAT_ASSIGN_USERPREF);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index 8e2e97abf84..89d48492e46 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -35,8 +35,6 @@
 #include "DNA_gpencil_types.h"
 #include "DNA_gpencil_modifier_types.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "BLI_blenlib.h"
 #include "BLI_ghash.h"
 #include "BLI_math_vector.h"
@@ -49,6 +47,7 @@
 #include "BKE_material.h"
 #include "BKE_main.h"
 
+#include "DEG_depsgraph.h"
 #include "DEG_depsgraph.h"
 
 #include "MOD_gpencil_util.h"
@@ -138,7 +137,6 @@ static void bakeModifier(
if (newmat == NULL) {

BKE_object_material_slot_add(bmain, ob);
newmat = 
BKE_material_copy(bmain, mat);
-   newmat->gp_style = 
MEM_dupallocN(mat->gp_style);
newmat->preview = NULL;
 
assign_material(bmain, ob, 
newmat, ob->totcol, BKE_MAT_ASSIGN_USERPREF);

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


[Bf-blender-cvs] [3884b869277] blender2.8: Fix T56266: Second try to fix material problems

2018-08-07 Thread Antonioya
Commit: 3884b86927747a2662d0852d6d57c043c37d8cb4
Author: Antonioya
Date:   Tue Aug 7 22:13:02 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3884b86927747a2662d0852d6d57c043c37d8cb4

Fix T56266: Second try to fix material problems

===

M   source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
M   source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c

===

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
index 155de7305b7..b47987ddbc0 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
@@ -135,8 +135,8 @@ static void bakeModifier(
 
assign_material(bmain, ob, 
newmat, ob->totcol, BKE_MAT_ASSIGN_USERPREF);
 
-   
copy_v3_v3(newmat->gp_style->stroke_rgba, gps->runtime.tmp_stroke_rgba);
-   
copy_v3_v3(newmat->gp_style->fill_rgba, gps->runtime.tmp_fill_rgba);
+   
copy_v4_v4(newmat->gp_style->stroke_rgba, gps->runtime.tmp_stroke_rgba);
+   
copy_v4_v4(newmat->gp_style->fill_rgba, gps->runtime.tmp_fill_rgba);
 
BLI_ghash_insert(gh_color, 
mat->id.name, newmat);
DEG_id_tag_update(>id, 
DEG_TAG_COPY_ON_WRITE);
@@ -146,9 +146,18 @@ static void bakeModifier(
gps->mat_nr = idx - 1;
}
else {
-   /* reuse existing color */
-   copy_v3_v3(gp_style->stroke_rgba, 
gps->runtime.tmp_stroke_rgba);
-   copy_v3_v3(gp_style->fill_rgba, 
gps->runtime.tmp_fill_rgba);
+   /* reuse existing color (but update 
only first time) */
+   if (BLI_ghash_lookup(gh_color, 
mat->id.name) == NULL) {
+   
copy_v4_v4(gp_style->stroke_rgba, gps->runtime.tmp_stroke_rgba);
+   copy_v4_v4(gp_style->fill_rgba, 
gps->runtime.tmp_fill_rgba);
+   BLI_ghash_insert(gh_color, 
mat->id.name, mat);
+   }
+   /* update previews (icon and thumbnail) 
*/
+   if (mat->preview != NULL) {
+   
mat->preview->flag[ICON_SIZE_ICON] |= PRV_CHANGED;
+   
mat->preview->flag[ICON_SIZE_PREVIEW] |= PRV_CHANGED;
+   }
+   DEG_id_tag_update(>id, 
DEG_TAG_COPY_ON_WRITE);
}
 
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index e937f6454c2..8e2e97abf84 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -143,8 +143,8 @@ static void bakeModifier(
 
assign_material(bmain, ob, 
newmat, ob->totcol, BKE_MAT_ASSIGN_USERPREF);
 
-   
copy_v3_v3(newmat->gp_style->stroke_rgba, gps->runtime.tmp_stroke_rgba);
-   
copy_v3_v3(newmat->gp_style->fill_rgba, gps->runtime.tmp_fill_rgba);
+   
copy_v4_v4(newmat->gp_style->stroke_rgba, gps->runtime.tmp_stroke_rgba);
+   
copy_v4_v4(newmat->gp_style->fill_rgba, gps->runtime.tmp_fill_rgba);
 
BLI_ghash_insert(gh_color, 
mat->id.name, newmat);
DEG_id_tag_update(>id, 
DEG_TAG_COPY_ON_WRITE);
@@ -154,9 +154,18 @@ static void bakeModifier(
gps->mat_nr = idx - 1;
}
else {
-   /* reuse existing color */
-   copy_v3_v3(gp_style->stroke_rgba, 
gps->runtime.tmp_stroke_rgba);
-   copy_v3_v3(gp_style->fill_rgba, 
gps->runtime.tmp_fill_rgba);
+   /* reuse existing color (but update 
only first time) */
+   if 

[Bf-blender-cvs] [95e490889dd] blender2.8: macOS GHOST: use non-deprecated functions for coordinates

2018-08-07 Thread Arto Kitula
Commit: 95e490889dda96768e69ec222b91898f13ef0c1d
Author: Arto Kitula
Date:   Tue Aug 7 21:53:02 2018 +0300
Branches: blender2.8
https://developer.blender.org/rB95e490889dda96768e69ec222b91898f13ef0c1d

macOS GHOST: use non-deprecated functions for coordinates

===

M   intern/ghost/intern/GHOST_WindowCocoa.mm

===

diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm 
b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 2b986428fd3..22dc772fff0 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -865,30 +865,30 @@ void GHOST_WindowCocoa::clientToScreen(GHOST_TInt32 inX, 
GHOST_TInt32 inY, GHOST
 
 void GHOST_WindowCocoa::screenToClientIntern(GHOST_TInt32 inX, GHOST_TInt32 
inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
 {
-   NSPoint screenCoord;
-   NSPoint baseCoord;
+   NSRect screenCoord;
+   NSRect baseCoord;

-   screenCoord.x = inX;
-   screenCoord.y = inY;
+   screenCoord.origin.x = inX;
+   screenCoord.origin.y = inY;

-   baseCoord = [m_window convertScreenToBase:screenCoord];
+   baseCoord = [m_window convertRectFromScreen:screenCoord];

-   outX = baseCoord.x;
-   outY = baseCoord.y;
+   outX = baseCoord.origin.x;
+   outY = baseCoord.origin.y;
 }
 
 void GHOST_WindowCocoa::clientToScreenIntern(GHOST_TInt32 inX, GHOST_TInt32 
inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
 {
-   NSPoint screenCoord;
-   NSPoint baseCoord;
+   NSRect screenCoord;
+   NSRect baseCoord;

-   baseCoord.x = inX;
-   baseCoord.y = inY;
+   baseCoord.origin.x = inX;
+   baseCoord.origin.y = inY;

-   screenCoord = [m_window convertBaseToScreen:baseCoord];
+   screenCoord = [m_window convertRectToScreen:baseCoord];

-   outX = screenCoord.x;
-   outY = screenCoord.y;
+   outX = screenCoord.origin.x;
+   outY = screenCoord.origin.y;
 }

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


[Bf-blender-cvs] [8a035612ee8] blender2.8: Fix T56266: Grease Pencil Tint and Color modifier error when apply

2018-08-07 Thread Antonioya
Commit: 8a035612ee8bd361bf43c8935b03822cf1208435
Author: Antonioya
Date:   Tue Aug 7 20:10:20 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB8a035612ee8bd361bf43c8935b03822cf1208435

Fix T56266: Grease Pencil Tint and Color modifier error when apply

The material created was not right when apply the modifiers.

These errors were related to the material modification from old palette system 
before the merge and for any reason this code was not changed in the right way.

Also changed the "Create Colors" to "Create Materials" to keep UI names aligned.

===

M   release/scripts/startup/bl_ui/properties_data_modifier.py
M   source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
M   source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
M   source/blender/makesrna/intern/rna_gpencil_modifier.c

===

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py 
b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 7eeb45cc52e..3a1801f2a53 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1756,7 +1756,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, 
Panel):
 row.prop(md, "invert_pass", text="", icon="ARROW_LEFTRIGHT")
 
 row = layout.row()
-row.prop(md, "create_colors")
+row.prop(md, "create_materials")
 
 def GP_COLOR(self, layout, ob, md):
 gpd = ob.data
@@ -1778,7 +1778,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, 
Panel):
 row.prop(md, "invert_pass", text="", icon="ARROW_LEFTRIGHT")
 
 row = layout.row()
-row.prop(md, "create_colors")
+row.prop(md, "create_materials")
 
 def GP_OPACITY(self, layout, ob, md):
 gpd = ob.data
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
index 88754f29db3..155de7305b7 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
@@ -35,6 +35,8 @@
 #include "DNA_gpencil_types.h"
 #include "DNA_gpencil_modifier_types.h"
 
+#include "MEM_guardedalloc.h"
+
 #include "BLI_blenlib.h"
 #include "BLI_ghash.h"
 #include "BLI_math_color.h"
@@ -120,18 +122,24 @@ static void bakeModifier(
copy_v4_v4(gps->runtime.tmp_stroke_rgba, 
gp_style->stroke_rgba);
copy_v4_v4(gps->runtime.tmp_fill_rgba, 
gp_style->fill_rgba);
 
+   deformStroke(md, depsgraph, ob, gpl, gps);
+
/* look for color */
-   if (mmd->flag & GP_TINT_CREATE_COLORS) {
+   if (mmd->flag & GP_COLOR_CREATE_COLORS) {
Material *newmat = 
BLI_ghash_lookup(gh_color, mat->id.name);
if (newmat == NULL) {

BKE_object_material_slot_add(bmain, ob);
newmat = 
BKE_material_copy(bmain, mat);
+   newmat->gp_style = 
MEM_dupallocN(mat->gp_style);
+   newmat->preview = NULL;
+
assign_material(bmain, ob, 
newmat, ob->totcol, BKE_MAT_ASSIGN_USERPREF);
 
-   
copy_v4_v4(newmat->gp_style->stroke_rgba, gps->runtime.tmp_stroke_rgba);
-   
copy_v4_v4(newmat->gp_style->fill_rgba, gps->runtime.tmp_fill_rgba);
+   
copy_v3_v3(newmat->gp_style->stroke_rgba, gps->runtime.tmp_stroke_rgba);
+   
copy_v3_v3(newmat->gp_style->fill_rgba, gps->runtime.tmp_fill_rgba);
 
BLI_ghash_insert(gh_color, 
mat->id.name, newmat);
+   DEG_id_tag_update(>id, 
DEG_TAG_COPY_ON_WRITE);
}
/* reasign color index */
int idx = 
BKE_object_material_slot_find_index(ob, newmat);
@@ -139,11 +147,10 @@ static void bakeModifier(
}
else {
/* reuse existing color */
-   copy_v4_v4(gp_style->stroke_rgba, 
gps->runtime.tmp_stroke_rgba);
-   copy_v4_v4(gp_style->fill_rgba, 
gps->runtime.tmp_fill_rgba);
+   copy_v3_v3(gp_style->stroke_rgba, 
gps->runtime.tmp_stroke_rgba);
+ 

[Bf-blender-cvs] [aad16afb56d] temp-benchmark: Benchmark: add link button drawing, with underline on hover.

2018-08-07 Thread Brecht Van Lommel
Commit: aad16afb56d8f4121d4dff115554511075cfc7e8
Author: Brecht Van Lommel
Date:   Tue Aug 7 20:06:04 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rBaad16afb56d8f4121d4dff115554511075cfc7e8

Benchmark: add link button drawing, with underline on hover.

===

M   source/blender/editors/include/UI_interface.h
M   source/blender/editors/interface/interface_widgets.c
M   source/blender/makesrna/intern/rna_ui.c

===

diff --git a/source/blender/editors/include/UI_interface.h 
b/source/blender/editors/include/UI_interface.h
index d174a78ee23..04c14beecdb 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -103,6 +103,7 @@ enum {
UI_EMBOSS_NONE  = 1,  /* Nothing, only icon and/or text */
UI_EMBOSS_PULLDOWN  = 2,  /* Pulldown menu style */
UI_EMBOSS_RADIAL= 3,  /* Pie Menu */
+   UI_EMBOSS_LINK  = 4,  /* Benchmark: special link drawing */
 
UI_EMBOSS_UNDEFINED = 255, /* For layout engine, use emboss from 
block. */
 };
diff --git a/source/blender/editors/interface/interface_widgets.c 
b/source/blender/editors/interface/interface_widgets.c
index d0cdba49536..f9dbd9dec01 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1316,7 +1316,7 @@ static void widget_draw_icon_ex(
/* special case - icon_only pie buttons */
if (ui_block_is_pie_menu(but->block) && 
!ELEM(but->type, UI_BTYPE_MENU, UI_BTYPE_POPOVER) && but->str && but->str[0] == 
'\0')
xs = rect->xmin + 2.0f * ofs;
-   else if (but->dt == UI_EMBOSS_NONE || but->type == 
UI_BTYPE_LABEL)
+   else if (ELEM(but->dt, UI_EMBOSS_NONE, UI_EMBOSS_LINK) 
|| but->type == UI_BTYPE_LABEL)
xs = rect->xmin + 2.0f * ofs;
else
xs = rect->xmin + 4.0f * ofs;
@@ -1954,6 +1954,17 @@ static void widget_draw_text(uiFontStyle *fstyle, 
uiWidgetColors *wcol, uiBut *b
UI_fontstyle_draw_ex(fstyle, rect, drawstr + but->ofs, 
(unsigned char *)wcol->text,
 drawlen, _xofs, _yofs);
 
+   if (but->dt == UI_EMBOSS_LINK && (but->flag & 
UI_ACTIVE)) {
+   float underline_col[4];
+   int underline_width = 
UI_fontstyle_string_width(fstyle, drawstr + but->ofs);
+   int rect_x = BLI_rcti_size_x(rect);
+
+   rgba_uchar_to_float(underline_col, (unsigned 
char *)wcol->text);
+   GPU_blend(true);
+   UI_draw_text_underline(rect->xmin + font_xofs, 
rect->ymin + 8 * U.pixelsize, min_ii(underline_width, rect_x - 2), 1, 
underline_col);
+   GPU_blend(false);
+   }
+
if (but->menu_key != '\0') {
char fixedbuf[128];
const char *str;
@@ -4063,7 +4074,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle 
*style, uiBut *but, rct
break;
}
}
-   else if (but->dt == UI_EMBOSS_NONE) {
+   else if (ELEM(but->dt, UI_EMBOSS_NONE, UI_EMBOSS_LINK)) {
/* "nothing" */
switch (but->type) {
case UI_BTYPE_LABEL:
diff --git a/source/blender/makesrna/intern/rna_ui.c 
b/source/blender/makesrna/intern/rna_ui.c
index a271df464b7..80b49af0e9e 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -997,6 +997,7 @@ static void rna_def_ui_layout(BlenderRNA *brna)
{UI_EMBOSS_NONE, "NONE", 0, "None", "Draw only text and icons"},
{UI_EMBOSS_PULLDOWN, "PULLDOWN_MENU", 0, "Pulldown Menu", "Draw 
pulldown menu style"},
{UI_EMBOSS_RADIAL, "RADIAL_MENU", 0, "Radial Menu", "Draw 
radial menu style"},
+   {UI_EMBOSS_LINK, "LINK", 0, "Link", "Draw button as link"},
{0, NULL, 0, NULL, NULL}
};

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


[Bf-blender-cvs] [dfa2cf6f3d8] temp-benchmark: Benchmark: draw images below buttons.

2018-08-07 Thread Brecht Van Lommel
Commit: dfa2cf6f3d8f78f9ae2254276cd0dbb4fc098f22
Author: Brecht Van Lommel
Date:   Tue Aug 7 20:05:46 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rBdfa2cf6f3d8f78f9ae2254276cd0dbb4fc098f22

Benchmark: draw images below buttons.

===

M   source/blender/editors/screen/area.c

===

diff --git a/source/blender/editors/screen/area.c 
b/source/blender/editors/screen/area.c
index 18bacee98b9..d1d39c76199 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -493,8 +493,6 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
/* XXX test: add convention to end regions always in pixel space, for 
drawing of borders/gestures etc */
ED_region_pixelspace(ar);
 
-   ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
-
region_draw_azones(sa, ar);
 
/* for debugging unneeded area redraws and partial redraw */
@@ -2214,6 +2212,10 @@ void ED_region_panels_draw(const bContext *C, ARegion 
*ar)
/* reset line width for drawing tabs */
GPU_line_width(1.0f);
 
+   /* Benchmark; draw under panels. */
+   ED_region_pixelspace(ar);
+   ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
+
/* set the view */
UI_view2d_view_ortho(v2d);

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


[Bf-blender-cvs] [7617ed972b5] temp-angavrilov-bbone-custom-handles: Fix T56268: display the correct rest shape for B-Bones in Edit Mode.

2018-08-07 Thread Alexander Gavrilov
Commit: 7617ed972b50920726975c897429bdfa45f383fa
Author: Alexander Gavrilov
Date:   Tue Aug 7 21:08:16 2018 +0300
Branches: temp-angavrilov-bbone-custom-handles
https://developer.blender.org/rB7617ed972b50920726975c897429bdfa45f383fa

Fix T56268: display the correct rest shape for B-Bones in Edit Mode.

The rest shape of B-Bones is actually affected by custom handles or
the default connected parent/child mechanism. Ignoring these effects
thus leads to the edit mode shape being different from the actual
rest pose.

This splits the b_bone_spline_setup function that is used to compute
the correct rest and pose shape from pose channels into two parts,
and applies the data structure independent half to edit mode.

===

M   source/blender/blenkernel/BKE_armature.h
M   source/blender/blenkernel/intern/armature.c
M   source/blender/draw/intern/draw_armature.c
M   source/blender/editors/include/ED_armature.h

===

diff --git a/source/blender/blenkernel/BKE_armature.h 
b/source/blender/blenkernel/BKE_armature.h
index 17329beb325..67e7ae368b9 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -140,9 +140,32 @@ typedef struct Mat4 {
float mat[4][4];
 } Mat4;
 
-void equalize_bbone_bezier(float *data, int desired);
+typedef struct BBoneSplineParameters {
+   int segments;
+   float length;
+
+   /* non-uniform scale correction */
+   bool do_scale;
+   float scale[3];
+
+   /* handle control bone data */
+   bool use_prev, prev_bbone;
+   bool use_next, next_bbone;
+
+   float prev_h[3], next_h[3];
+   float prev_mat[4][4], next_mat[4][4];
+
+   /* control values */
+   float ease1, ease2;
+   float roll1, roll2;
+   float scaleIn, scaleOut;
+   float curveInX, curveInY, curveOutX, curveOutY;
+} BBoneSplineParameters;
+
 void b_bone_spline_setup(struct bPoseChannel *pchan, int rest, Mat4 
result_array[MAX_BBONE_SUBDIV]);
 
+void BKE_compute_b_bone_spline(struct BBoneSplineParameters *param, Mat4 
result_array[MAX_BBONE_SUBDIV]);
+
 /* like EBONE_VISIBLE */
 #define PBONE_VISIBLE(arm, bone) ( \
CHECK_TYPE_INLINE(arm, bArmature *), \
diff --git a/source/blender/blenkernel/intern/armature.c 
b/source/blender/blenkernel/intern/armature.c
index 1e9f48d43c2..341c73bb65a 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -393,7 +393,7 @@ int bone_autoside_name(char name[MAXBONENAME], int 
UNUSED(strip_number), short a
 /* * B-Bone support *** */
 
 /* data has MAX_BBONE_SUBDIV+1 interpolated points, will become desired amount 
with equal distances */
-void equalize_bbone_bezier(float *data, int desired)
+static void equalize_bbone_bezier(float *data, int desired)
 {
float *fp, totdist, ddist, dist, fac1, fac2;
float pdist[MAX_BBONE_SUBDIV + 1];
@@ -439,24 +439,23 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, 
Mat4 result_array[MAX_BB
 {
bPoseChannel *next, *prev;
Bone *bone = pchan->bone;
-   float h1[3], h2[3], scale[3], length, roll1 = 0.0f, roll2;
-   float mat3[3][3], imat[4][4], posemat[4][4], scalemat[4][4], 
iscalemat[4][4];
-   float data[MAX_BBONE_SUBDIV + 1][4], *fp;
-   int a;
-   bool do_scale = false;
+   BBoneSplineParameters param;
+   float imat[4][4], posemat[4][4];
 
-   length = bone->length;
+   memset(, 0, sizeof(param));
+
+   param.segments = bone->segments;
+   param.length = bone->length;
 
if (!rest) {
+   float scale[3];
+
/* check if we need to take non-uniform bone scaling into 
account */
mat4_to_size(scale, pchan->pose_mat);
 
if (fabsf(scale[0] - scale[1]) > 1e-6f || fabsf(scale[1] - 
scale[2]) > 1e-6f) {
-   size_to_mat4(scalemat, scale);
-   invert_m4_m4(iscalemat, scalemat);
-
-   length *= scale[1];
-   do_scale = 1;
+   param.do_scale = true;
+   copy_v3_v3(param.scale, scale);
}
}
 
@@ -488,7 +487,7 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, 
Mat4 result_array[MAX_BB
if (rest) {
invert_m4_m4(imat, pchan->bone->arm_mat);
}
-   else if (do_scale) {
+   else if (param.do_scale) {
copy_m4_m4(posemat, pchan->pose_mat);
normalize_m4(posemat);
invert_m4_m4(imat, posemat);
@@ -497,7 +496,11 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, 
Mat4 result_array[MAX_BB
invert_m4_m4(imat, pchan->pose_mat);
 
if (prev) {
-   float difmat[4][4], result[3][3], imat3[3][3];
+   float h1[3];
+   

[Bf-blender-cvs] [0dfacad7bf9] temp-angavrilov-bbone-custom-handles: Move B-Bone custom handle settings to Edit mode.

2018-08-07 Thread Alexander Gavrilov
Commit: 0dfacad7bf9857b090d86a6fd7a9d504921e3d7c
Author: Alexander Gavrilov
Date:   Sun Aug 5 18:48:05 2018 +0300
Branches: temp-angavrilov-bbone-custom-handles
https://developer.blender.org/rB0dfacad7bf9857b090d86a6fd7a9d504921e3d7c

Move B-Bone custom handle settings to Edit mode.

Custom handle settings actually affect the B-Bone rest shape,
so they should be changed in Edit mode rather than Pose mode.
This is necessary to be able to display the correct rest shape
of the bone in Edit Mode.

Also, instead of flags, introduce an enum to specify the handle
operation modes, so that new ones could be added later.

===

M   release/scripts/startup/bl_ui/properties_data_bone.py
M   source/blender/blenkernel/intern/armature.c
M   source/blender/blenloader/intern/readfile.c
M   source/blender/blenloader/intern/versioning_280.c
M   source/blender/editors/armature/armature_add.c
M   source/blender/editors/armature/armature_intern.h
M   source/blender/editors/armature/armature_utils.c
M   source/blender/editors/armature/editarmature_retarget.c
M   source/blender/editors/include/ED_armature.h
M   source/blender/makesdna/DNA_action_types.h
M   source/blender/makesdna/DNA_armature_types.h
M   source/blender/makesrna/intern/rna_armature.c
M   source/blender/makesrna/intern/rna_pose.c

===

diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py 
b/release/scripts/startup/bl_ui/properties_data_bone.py
index 6d364ee6539..58007836df1 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -130,6 +130,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
 bone = context.bone
 # arm = context.armature
 pchan = None
+edit = False
 
 if ob and bone:
 pchan = ob.pose.bones[bone.name]
@@ -137,6 +138,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
 elif bone is None:
 bone = context.edit_bone
 bbone = bone
+edit = True
 else:
 bbone = bone
 
@@ -169,24 +171,29 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
 col.prop(bbone, "bbone_easein", text="Ease In")
 col.prop(bbone, "bbone_easeout", text="Out")
 
-if pchan:
-layout.separator()
-
-col = layout.column()
-col.use_property_split = False
-col.prop(pchan, "use_bbone_custom_handles")
+col = layout.column()
+col.use_property_decorate = False
+col.prop(bone, "bbone_handle_type_start", text="Start Handle")
 
-col = layout.column(align=True)
-col.active = pchan.use_bbone_custom_handles
-col.use_property_split = True
+col = col.column()
+col.active = (bone.bbone_handle_type_start != "AUTO")
+if edit:
+col.prop_search(bone, "bbone_custom_handle_start", ob.data, 
"edit_bones", text="Custom")
+else:
+# read-only
+col.prop(bbone, "bbone_custom_handle_start", text="Custom")
 
-sub = col.column()
-sub.prop_search(pchan, "bbone_custom_handle_start", ob.pose, 
"bones", text="Custom Handle Start")
-sub.prop_search(pchan, "bbone_custom_handle_end", ob.pose, 
"bones", text="End")
+col = layout.column()
+col.use_property_decorate = False
+col.prop(bone, "bbone_handle_type_end", text="End Handle")
 
-sub = col.column(align=True)
-sub.prop(pchan, "use_bbone_relative_start_handle", text="Relative 
Handle Start")
-sub.prop(pchan, "use_bbone_relative_end_handle", text="End")
+col = col.column()
+col.active = (bone.bbone_handle_type_end != "AUTO")
+if edit:
+col.prop_search(bone, "bbone_custom_handle_end", ob.data, 
"edit_bones", text="Custom")
+else:
+# read-only
+col.prop(bbone, "bbone_custom_handle_end", text="Custom")
 
 
 class BONE_PT_relations(BoneButtonsPanel, Panel):
diff --git a/source/blender/blenkernel/intern/armature.c 
b/source/blender/blenkernel/intern/armature.c
index cea81a82f4b..1e9f48d43c2 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -461,20 +461,26 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, 
Mat4 result_array[MAX_BB
}
 
/* get "next" and "prev" bones - these are used for handle calculations 
*/
-   if (pchan->bboneflag & PCHAN_BBONE_CUSTOM_HANDLES) {
-   /* use the provided bones as the next/prev - leave blank to 
eliminate this effect altogether */
-   prev = pchan->bbone_prev;
-   next = pchan->bbone_next;
-   }
-   else {
-   /* evaluate next and prev bones */
+   if 

[Bf-blender-cvs] [0cbd605a3d5] temp-benchmark: Silence strict compiler warning

2018-08-07 Thread Sergey Sharybin
Commit: 0cbd605a3d5c37d964544e24c82bac9a62757b4b
Author: Sergey Sharybin
Date:   Tue Aug 7 17:53:17 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rB0cbd605a3d5c37d964544e24c82bac9a62757b4b

Silence strict compiler warning

===

M   source/blender/blenlib/BLI_hash.h

===

diff --git a/source/blender/blenlib/BLI_hash.h 
b/source/blender/blenlib/BLI_hash.h
index f74010479a9..858916ab350 100644
--- a/source/blender/blenlib/BLI_hash.h
+++ b/source/blender/blenlib/BLI_hash.h
@@ -75,9 +75,9 @@ BLI_INLINE void BLI_hash_pointer_to_color(const void *ptr, 
int *r, int *g, int *
const size_t hash_b = BLI_hash_int((uint)((val & 0x) >> 32));
const size_t hash =
hash_a ^ (hash_b + 0x9e3779b9 + (hash_a << 6) + (hash_a >> 2));
-   *r = (hash & 0xff) >> 16;
-   *g = (hash & 0x00ff00) >> 8;
-   *b = hash & 0xff;
+   *r = (int)((hash & 0xff) >> 16);
+   *g = (int)((hash & 0x00ff00) >> 8);
+   *b = (int)(hash & 0xff);
 }
 
 #endif // __BLI_HASH_H__

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


[Bf-blender-cvs] [f9575ce9eac] temp-benchmark: Benchmark: fixes for macOS.

2018-08-07 Thread Brecht Van Lommel
Commit: f9575ce9eac17ed14b500f14ef29b5a57e2849dc
Author: Brecht Van Lommel
Date:   Tue Aug 7 16:17:29 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rBf9575ce9eac17ed14b500f14ef29b5a57e2849dc

Benchmark: fixes for macOS.

===

M   GNUmakefile
M   release/darwin/blender.app/Contents/Info.plist
M   source/blender/windowmanager/intern/wm_window.c

===

diff --git a/GNUmakefile b/GNUmakefile
index c1be177ddc0..aea1f6a5b81 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -71,6 +71,10 @@ ifneq "$(findstring full, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_full
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) 
-C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
 endif
+ifneq "$(findstring benchmark, $(MAKECMDGOALS))" ""
+   BUILD_DIR:=$(BUILD_DIR)_benchmark
+   BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) 
-C"$(BLENDER_DIR)/build_files/cmake/config/blender_benchmark.cmake"
+endif
 ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_lite
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) 
-C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
@@ -146,6 +150,7 @@ all: .FORCE
 debug: all
 full: all
 lite: all
+benchmark: all
 cycles: all
 headless: all
 bpy: all
diff --git a/release/darwin/blender.app/Contents/Info.plist 
b/release/darwin/blender.app/Contents/Info.plist
index 92e8d8cc761..1f86b31a18d 100644
--- a/release/darwin/blender.app/Contents/Info.plist
+++ b/release/darwin/blender.app/Contents/Info.plist
@@ -26,17 +26,17 @@


CFBundleExecutable
-   blender
+   blender-benchmark
CFBundleGetInfoString
${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender 
Foundation
CFBundleIconFile
blender icon.icns
CFBundleIdentifier
-   org.blenderfoundation.blender
+   org.blenderfoundation.blender-benchmark
CFBundleInfoDictionaryVersion
6.0
CFBundleName
-   Blender
+   Blender Benchmark
CFBundlePackageType
APPL
CFBundleShortVersionString
diff --git a/source/blender/windowmanager/intern/wm_window.c 
b/source/blender/windowmanager/intern/wm_window.c
index b86026623c0..13637a4ea3c 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -694,7 +694,7 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, 
const char *title, wm
 }
 
 /* Benchmark: ugly hack to get DPI before we have opened any windows. */
-static void wm_window_set_startup_dpi(wmWindow *win)
+static void wm_window_set_startup_dpi(wmWindow *win, float *native_pixel_size)
 {
GHOST_GLSettings glSettings = {0};
 
@@ -706,6 +706,8 @@ static void wm_window_set_startup_dpi(wmWindow *win)
 
WM_window_set_dpi(win);
 
+   *native_pixel_size = GHOST_GetNativePixelSize(win->ghostwin);
+
GHOST_DisposeWindow(g_system, win->ghostwin);
win->ghostwin = NULL;
 }
@@ -778,9 +780,10 @@ void wm_window_ghostwindows_ensure(wmWindowManager *wm)
}
 
/* Benchmark: fixed size and centered window. */
-   wm_window_set_startup_dpi(win);
-   win->sizex = 800 * UI_DPI_FAC;
-   win->sizey = 570 * UI_DPI_FAC;
+   float native_pixel_size;
+   wm_window_set_startup_dpi(win, _pixel_size);
+   win->sizex = 800 * UI_DPI_FAC / native_pixel_size;
+   win->sizey = 570 * UI_DPI_FAC / native_pixel_size;
 
int scr_w, scr_h;
wm_get_screensize(_w, _h);

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


[Bf-blender-cvs] [689ef9543a7] temp-benchmark: Fix typo in benchmark configuration

2018-08-07 Thread Sergey Sharybin
Commit: 689ef9543a767a0375dea9b76e846d2e8ec9a9fd
Author: Sergey Sharybin
Date:   Tue Aug 7 17:12:38 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rB689ef9543a767a0375dea9b76e846d2e8ec9a9fd

Fix typo in benchmark configuration

Numpy is supposed to be disabled.

===

M   build_files/cmake/config/blender_benchmark.cmake

===

diff --git a/build_files/cmake/config/blender_benchmark.cmake 
b/build_files/cmake/config/blender_benchmark.cmake
index c64fbb329a3..9f559e7d90f 100644
--- a/build_files/cmake/config/blender_benchmark.cmake
+++ b/build_files/cmake/config/blender_benchmark.cmake
@@ -1,6 +1,6 @@
 include("${CMAKE_CURRENT_LIST_DIR}/blender_lite.cmake")
 
-set(WITH_PYTHON_INSTALL_NUMPY   ON  CACHE BOOL "" FORCE)
+set(WITH_PYTHON_INSTALL_NUMPY   OFF CACHE BOOL "" FORCE)
 # Brecht says: KEEP THIS ENABLED. *SOMETHING* breaks otherwise.
 # Something == DPI. Go figure.
 set(WITH_GHOST_XDND ON  CACHE BOOL "" FORCE)

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


[Bf-blender-cvs] [035d827b5b1] blender2.8: Cleanup: Tag only objects of the scene collections

2018-08-07 Thread Antonioya
Commit: 035d827b5b132627d5ea73e3fa237d8fd2185b4f
Author: Antonioya
Date:   Tue Aug 7 16:41:38 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB035d827b5b132627d5ea73e3fa237d8fd2185b4f

Cleanup: Tag only objects of the scene collections

In previous commit the bmain loop updated all GP objects, but must tag only 
scene collection objects.

===

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

===

diff --git a/source/blender/makesrna/intern/rna_scene.c 
b/source/blender/makesrna/intern/rna_scene.c
index bb87dde06c1..bdb905690f3 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -532,13 +532,22 @@ static const EnumPropertyItem 
transform_orientation_items[] = {
 #endif
 
 /* Grease Pencil update cache */
-static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA 
*UNUSED(ptr))
+static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA 
*UNUSED(ptr))
 {
-   /* mark all grease pencil datablocks */
-   for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) {
-   gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
-   DEG_id_tag_update(>id, OB_RECALC_OB | OB_RECALC_DATA);
+   /* mark all grease pencil datablocks of the scene */
+   FOREACH_SCENE_COLLECTION_BEGIN(scene, collection)
+   {
+   FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(collection, ob)
+   {
+   if (ob->type == OB_GPENCIL) {
+   bGPdata *gpd = (bGPdata *)ob->data;
+   gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
+   DEG_id_tag_update(>id, OB_RECALC_OB | 
OB_RECALC_DATA);
+   }
+   }
+   FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
}
+   FOREACH_SCENE_COLLECTION_END;
 
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 }
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c 
b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 37a5376f5d5..faa879b54b1 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -107,6 +107,7 @@ const EnumPropertyItem 
rna_enum_symmetrize_direction_items[] = {
 #ifdef RNA_RUNTIME
 #include "MEM_guardedalloc.h"
 
+#include "BKE_collection.h"
 #include "BKE_context.h"
 #include "BKE_particle.h"
 #include "BKE_pbvh.h"
@@ -119,13 +120,22 @@ const EnumPropertyItem 
rna_enum_symmetrize_direction_items[] = {
 
 #include "ED_particle.h"
 
-static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA 
*UNUSED(ptr))
+static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA 
*UNUSED(ptr))
 {
-   /* mark all grease pencil datablocks */
-   for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) {
-   gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
-   DEG_id_tag_update(>id, OB_RECALC_OB | OB_RECALC_DATA);
+   /* mark all grease pencil datablocks of the scene */
+   FOREACH_SCENE_COLLECTION_BEGIN(scene, collection)
+   {
+   FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(collection, ob)
+   {
+   if (ob->type == OB_GPENCIL) {
+   bGPdata *gpd = (bGPdata *)ob->data;
+   gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
+   DEG_id_tag_update(>id, OB_RECALC_OB | 
OB_RECALC_DATA);
+   }
+   }
+   FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
}
+   FOREACH_SCENE_COLLECTION_END;
 
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 }

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


[Bf-blender-cvs] [030297209f2] blender2.8: Fix T54799: NDOF events not dispatched on windows.

2018-08-07 Thread mano-wii
Commit: 030297209f2508a704b8851fa5d7d9a6696561b5
Author: mano-wii
Date:   Tue Aug 7 11:41:55 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB030297209f2508a704b8851fa5d7d9a6696561b5

Fix T54799: NDOF events not dispatched on windows.

Caused by commit rB785e8a636a29

===

M   intern/ghost/intern/GHOST_System.cpp
M   intern/ghost/intern/GHOST_SystemWin32.cpp

===

diff --git a/intern/ghost/intern/GHOST_System.cpp 
b/intern/ghost/intern/GHOST_System.cpp
index c3fd87c65af..4a8a8c48018 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -219,10 +219,12 @@ bool GHOST_System::getFullScreen(void)
 void GHOST_System::dispatchEvents()
 {
 #ifdef WITH_INPUT_NDOF
+  #ifndef WIN32
// NDOF Motion event is sent only once per dispatch, so do it now:
if (m_ndofManager) {
m_ndofManager->sendMotionEvent();
}
+  #endif
 #endif
 
if (m_eventManager) {
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp 
b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 17c41e96be4..924173a6c68 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1110,8 +1110,10 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, 
UINT msg, WPARAM wParam,
break;
 #ifdef WITH_INPUT_NDOF
case RIM_TYPEHID:
-   if 
(system->processNDOF(raw))
+   if 
(system->processNDOF(raw)) {
+   
system->m_ndofManager->sendMotionEvent();
eventHandled = 
true;
+   }
break;
 #endif
}

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


[Bf-blender-cvs] [226fd36ce21] temp-benchmark: Tweaks to compilation/installation

2018-08-07 Thread Sergey Sharybin
Commit: 226fd36ce219b851a8e62a13ba1cb5c73c0dd018
Author: Sergey Sharybin
Date:   Tue Aug 7 16:16:55 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rB226fd36ce219b851a8e62a13ba1cb5c73c0dd018

Tweaks to compilation/installation

===

M   build_files/cmake/config/blender_benchmark.cmake
M   source/creator/CMakeLists.txt

===

diff --git a/build_files/cmake/config/blender_benchmark.cmake 
b/build_files/cmake/config/blender_benchmark.cmake
index bbd980e577a..c64fbb329a3 100644
--- a/build_files/cmake/config/blender_benchmark.cmake
+++ b/build_files/cmake/config/blender_benchmark.cmake
@@ -1,3 +1,6 @@
 include("${CMAKE_CURRENT_LIST_DIR}/blender_lite.cmake")
 
 set(WITH_PYTHON_INSTALL_NUMPY   ON  CACHE BOOL "" FORCE)
+# Brecht says: KEEP THIS ENABLED. *SOMETHING* breaks otherwise.
+# Something == DPI. Go figure.
+set(WITH_GHOST_XDND ON  CACHE BOOL "" FORCE)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index f9b978fe1ea..1bae7cae744 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -349,6 +349,9 @@ if(WITH_PYTHON)
PATTERN "addons/*" EXCLUDE
PATTERN "addons_contrib/*" EXCLUDE
PATTERN "freestyle/*" EXCLUDE
+   PATTERN "presets/*" EXCLUDE
+   PATTERN "templates_osl/*" EXCLUDE
+   PATTERN "templates_py/*" EXCLUDE
)
 endif()
 
@@ -409,10 +412,12 @@ if(WITH_OPENCOLORIO)
 endif()
 
 # Add default workspaces.blend to build (under [version]/datafiles
+if (False)
 install(
FILES ${CMAKE_SOURCE_DIR}/release/datafiles/workspaces.blend
DESTINATION ${TARGETDIR_VER}/datafiles
 )
+endif()
 
 
 # helpful tip when using make
@@ -443,7 +448,13 @@ if(UNIX AND NOT APPLE)
endif()
 
# there are a few differences between portable and system install
-   if(WITH_PYTHON_MODULE)
+   if(True)
+   install(
+   TARGETS blender
+   DESTINATION "."
+   )
+   set(BLENDER_TEXT_FILES_DESTINATION "license")
+   elseif(WITH_PYTHON_MODULE)
if(WITH_INSTALL_PORTABLE)
install(
TARGETS blender
@@ -934,6 +945,8 @@ endif()
 
 if(DEFINED BLENDER_TEXT_FILES_DESTINATION)
 
+   if (False)
+
install(
CODE
"
@@ -948,6 +961,8 @@ if(DEFINED BLENDER_TEXT_FILES_DESTINATION)
${CMAKE_BINARY_DIR}/release/text/readme.html
)
 
+   endif()
+
install(
FILES ${BLENDER_TEXT_FILES}
DESTINATION "${BLENDER_TEXT_FILES_DESTINATION}"
@@ -964,6 +979,8 @@ unset(BLENDER_TEXT_FILES_DESTINATION)
 # -
 # Geometry Icons
 
+if(False)
+
 # Geometry icons.
 get_property(_icon_names GLOBAL PROPERTY ICON_GEOM_NAMES)
 set(_icon_files)
@@ -981,14 +998,21 @@ unset(_icon_names)
 unset(_icon_files)
 unset(_f)
 
+endif()
+
 # -
 # Studio Lights
+
+if(False)
+
 install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/datafiles/studiolights
DESTINATION ${TARGETDIR_VER}/datafiles
 )
 
+endif()
+
 # -
 # Setup link libs

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


[Bf-blender-cvs] [b3216ecd68e] temp-benchmark: Benchmark: center window in screen instead of bottom left.

2018-08-07 Thread Brecht Van Lommel
Commit: b3216ecd68eed8ef565ba12822fcd8ac8b29b13b
Author: Brecht Van Lommel
Date:   Tue Aug 7 15:30:03 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rBb3216ecd68eed8ef565ba12822fcd8ac8b29b13b

Benchmark: center window in screen instead of bottom left.

===

M   source/blender/windowmanager/intern/wm_window.c

===

diff --git a/source/blender/windowmanager/intern/wm_window.c 
b/source/blender/windowmanager/intern/wm_window.c
index 2156c19ae2e..b86026623c0 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -777,11 +777,16 @@ void wm_window_ghostwindows_ensure(wmWindowManager *wm)
win->cursor = CURSOR_STD;
}
 
-   /* Benchmark: fixed size window. */
+   /* Benchmark: fixed size and centered window. */
wm_window_set_startup_dpi(win);
win->sizex = 800 * UI_DPI_FAC;
win->sizey = 570 * UI_DPI_FAC;
 
+   int scr_w, scr_h;
+   wm_get_screensize(_w, _h);
+   win->posx = (scr_w - win->sizex) / 2;
+   win->posy = (scr_h - win->sizey) / 2;
+
/* Benchmark: title. */
wm_window_ghostwindow_add(wm, "Blender Benchmark", win);
}

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


[Bf-blender-cvs] [4c712fd17ea] blender2.8: Fix T56263: Crash when sculpting a GP object with animation

2018-08-07 Thread Antonioya
Commit: 4c712fd17eade91d1eac65edae09f39460ae60ea
Author: Antonioya
Date:   Tue Aug 7 14:15:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB4c712fd17eade91d1eac65edae09f39460ae60ea

Fix T56263: Crash when sculpting a GP object with animation

This is a limitation of the current operator design.

I have added a test to be sure the operator is not initializated while play 
animations to avoid segment fault.

In the future, we can enable this option again, but it will need a operator 
redesign.

===

M   source/blender/editors/gpencil/gpencil_brush.c

===

diff --git a/source/blender/editors/gpencil/gpencil_brush.c 
b/source/blender/editors/gpencil/gpencil_brush.c
index 0fadef55b9d..aed55c15b19 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1814,9 +1814,18 @@ static int gpsculpt_brush_invoke(bContext *C, wmOperator 
*op, const wmEvent *eve
 {
tGP_BrushEditData *gso = NULL;
const bool is_modal = RNA_boolean_get(op->ptr, "wait_for_input");
+   const bool is_playing = ED_screen_animation_playing(CTX_wm_manager(C)) 
!= NULL ? true : false;
bool needs_timer = false;
float brush_rate = 0.0f;
 
+   /* the operator cannot work while play animation */
+   if (is_playing) {
+   BKE_report(op->reports, RPT_ERROR,
+   "Cannot sculpt while play animation");
+
+   return OPERATOR_CANCELLED;
+   }
+
/* init painting data */
if (!gpsculpt_brush_init(C, op))
return OPERATOR_CANCELLED;

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


[Bf-blender-cvs] [d9b0c6711ed] soc-2018-npr: Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr

2018-08-07 Thread Nick Wu
Commit: d9b0c6711ed65b5ba2c59ac1ddb9555067d69c0e
Author: Nick Wu
Date:   Tue Aug 7 19:57:07 2018 +0800
Branches: soc-2018-npr
https://developer.blender.org/rBd9b0c6711ed65b5ba2c59ac1ddb9555067d69c0e

Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr

===



===



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


[Bf-blender-cvs] [d04e8f41ae9] blender2.8: Cleanup GP: Change playing field to boolean

2018-08-07 Thread Antonioya
Commit: d04e8f41ae9675a99eb0f7996a12ad64bd03b9cc
Author: Antonioya
Date:   Tue Aug 7 13:56:30 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd04e8f41ae9675a99eb0f7996a12ad64bd03b9cc

Cleanup GP: Change playing field to boolean

===

M   source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M   source/blender/draw/engines/gpencil/gpencil_engine.c
M   source/blender/draw/engines/gpencil/gpencil_engine.h

===

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c 
b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 4d2942e08fd..dba5f7b9c20 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -754,7 +754,7 @@ static void gpencil_draw_strokes(
DRWShadingGroup *strokegrp;
float viewmatrix[4][4];
const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd);
-   const bool playing = (bool)stl->storage->playing;
+   const bool playing = stl->storage->is_playing;
const bool is_render = (bool)stl->storage->is_render;
const bool is_mat_preview = (bool)stl->storage->is_mat_preview;
const bool overlay_multiedit = v3d != NULL ? (v3d->gp_flag & 
V3D_GP_SHOW_MULTIEDIT_LINES) : true;
@@ -1141,7 +1141,7 @@ void DRW_gpencil_populate_multiedit(GPENCIL_e_data 
*e_data, void *vedata, Scene
cache->cache_idx = 0;
 
/* check if playing animation */
-   bool playing = (bool)stl->storage->playing;
+   bool playing = stl->storage->is_playing;
 
/* draw strokes */
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
@@ -1187,7 +1187,7 @@ void DRW_gpencil_populate_datablock(GPENCIL_e_data 
*e_data, void *vedata, Scene
const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & 
V3D_RENDER_OVERRIDE) == 0) : true;
 
/* check if playing animation */
-   bool playing = (bool)stl->storage->playing;
+   bool playing = stl->storage->is_playing;
 
GpencilBatchCache *cache = gpencil_batch_cache_get(ob, cfra_eval);
cache->cache_idx = 0;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c 
b/source/blender/draw/engines/gpencil/gpencil_engine.c
index ae1f853d87c..668869a2f89 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -327,9 +327,9 @@ void GPENCIL_cache_init(void *vedata)
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
 
/* detect if playing animation */
-   stl->storage->playing = 0;
+   stl->storage->is_playing = false;
if (draw_ctx->evil_C) {
-   stl->storage->playing = 
ED_screen_animation_playing(CTX_wm_manager(draw_ctx->evil_C)) != NULL ? 1 : 0;
+   stl->storage->is_playing = 
ED_screen_animation_playing(CTX_wm_manager(draw_ctx->evil_C)) != NULL ? true : 
false;
}
 
if (obact_gpd) {
@@ -337,7 +337,7 @@ void GPENCIL_cache_init(void *vedata)
* and this produces errors. To be sure, we set cache as 
dirty because the frame
* is changing.
*/
-   if (stl->storage->playing == 1) {
+   if (stl->storage->is_playing == true) {
obact_gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
}
/* if render, set as dirty to update all data */
@@ -351,9 +351,9 @@ void GPENCIL_cache_init(void *vedata)
stl->storage->is_mat_preview = (bool)stl->storage->is_render && 
STREQ(scene->id.name + 2, "preview");
 
/* save simplify flags (can change while drawing, so it's 
better to save) */
-   stl->storage->simplify_fill = GP_SIMPLIFY_FILL(scene, 
stl->storage->playing);
-   stl->storage->simplify_modif = GP_SIMPLIFY_MODIF(scene, 
stl->storage->playing);
-   stl->storage->simplify_fx = GP_SIMPLIFY_FX(scene, 
stl->storage->playing);
+   stl->storage->simplify_fill = GP_SIMPLIFY_FILL(scene, 
stl->storage->is_playing);
+   stl->storage->simplify_modif = GP_SIMPLIFY_MODIF(scene, 
stl->storage->is_playing);
+   stl->storage->simplify_fx = GP_SIMPLIFY_FX(scene, 
stl->storage->is_playing);
 
/* save pixsize */
stl->storage->pixsize = DRW_viewport_pixelsize_get();
@@ -364,7 +364,7 @@ void GPENCIL_cache_init(void *vedata)
/* detect if painting session */
if ((obact_gpd) &&
(obact_gpd->flag & GP_DATA_STROKE_PAINTMODE) &&
-   (stl->storage->playing == 0))
+   (stl->storage->is_playing == false))
{
if 

[Bf-blender-cvs] [b274a01e58e] blender2.8: Fix T56261: Grease Pencil simplify options get segment fault

2018-08-07 Thread Antonioya
Commit: b274a01e58e19ef4b6e45b96cfe21c0c2597b3fe
Author: Antonioya
Date:   Tue Aug 7 13:36:30 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBb274a01e58e19ef4b6e45b96cfe21c0c2597b3fe

Fix T56261: Grease Pencil simplify options get segment fault

The depsgraph was not updated as expected with the function used and the cache 
was not set as dirty.

===

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

===

diff --git a/source/blender/makesrna/intern/rna_scene.c 
b/source/blender/makesrna/intern/rna_scene.c
index 6e572b084d4..bb87dde06c1 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -534,7 +534,12 @@ static const EnumPropertyItem 
transform_orientation_items[] = {
 /* Grease Pencil update cache */
 static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA 
*UNUSED(ptr))
 {
-   DEG_id_type_tag(bmain, ID_GD);
+   /* mark all grease pencil datablocks */
+   for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) {
+   gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
+   DEG_id_tag_update(>id, OB_RECALC_OB | OB_RECALC_DATA);
+   }
+
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 }
 
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c 
b/source/blender/makesrna/intern/rna_sculpt_paint.c
index c500c5f261f..37a5376f5d5 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -35,6 +35,7 @@
 #include "rna_internal.h"
 
 #include "DNA_ID.h"
+#include "DNA_gpencil_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_brush_types.h"
 #include "DNA_screen_types.h"
@@ -120,7 +121,12 @@ const EnumPropertyItem 
rna_enum_symmetrize_direction_items[] = {
 
 static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA 
*UNUSED(ptr))
 {
-   DEG_id_type_tag(bmain, ID_GD);
+   /* mark all grease pencil datablocks */
+   for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) {
+   gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
+   DEG_id_tag_update(>id, OB_RECALC_OB | OB_RECALC_DATA);
+   }
+
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 }

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


[Bf-blender-cvs] [84b072d800c] temp-benchmark: Add cmake configuration for benchmark

2018-08-07 Thread Sergey Sharybin
Commit: 84b072d800c67fb2055ea8506221a8fed3f776ab
Author: Sergey Sharybin
Date:   Tue Aug 7 12:23:50 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rB84b072d800c67fb2055ea8506221a8fed3f776ab

Add cmake configuration for benchmark

There might be more tweaks needed in there.

===

A   build_files/cmake/config/blender_benchmark.cmake

===

diff --git a/build_files/cmake/config/blender_benchmark.cmake 
b/build_files/cmake/config/blender_benchmark.cmake
new file mode 100644
index 000..bbd980e577a
--- /dev/null
+++ b/build_files/cmake/config/blender_benchmark.cmake
@@ -0,0 +1,3 @@
+include("${CMAKE_CURRENT_LIST_DIR}/blender_lite.cmake")
+
+set(WITH_PYTHON_INSTALL_NUMPY   ON  CACHE BOOL "" FORCE)

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


[Bf-blender-cvs] [2de0481e1d1] temp-benchmark: Disable useless panels in file browser

2018-08-07 Thread Sergey Sharybin
Commit: 2de0481e1d1811e304f40d4e90bc6b38cb55435d
Author: Sergey Sharybin
Date:   Tue Aug 7 10:49:00 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rB2de0481e1d1811e304f40d4e90bc6b38cb55435d

Disable useless panels in file browser

===

M   release/scripts/startup/bl_ui/space_filebrowser.py
M   source/blender/editors/space_file/space_file.c

===

diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py 
b/release/scripts/startup/bl_ui/space_filebrowser.py
index a85dd591b2f..f9e37deced0 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -156,6 +156,10 @@ class FILEBROWSER_PT_system_bookmarks(Panel):
 class FILEBROWSER_MT_bookmarks_specials(Menu):
 bl_label = "Bookmarks Specials"
 
+@classmethod
+def poll(cls, context):
+return False
+
 def draw(self, context):
 layout = self.layout
 layout.operator("file.bookmark_cleanup", icon='X', text="Cleanup")
@@ -171,6 +175,10 @@ class FILEBROWSER_PT_bookmarks(Panel):
 bl_category = "Bookmarks"
 bl_label = "Bookmarks"
 
+@classmethod
+def poll(cls, context):
+return False
+
 def draw(self, context):
 layout = self.layout
 space = context.space_data
@@ -203,7 +211,8 @@ class FILEBROWSER_PT_recent_folders(Panel):
 
 @classmethod
 def poll(cls, context):
-return not context.user_preferences.filepaths.hide_recent_locations
+# return not context.user_preferences.filepaths.hide_recent_locations
+return False
 
 def draw(self, context):
 layout = self.layout
diff --git a/source/blender/editors/space_file/space_file.c 
b/source/blender/editors/space_file/space_file.c
index 116cd700cc0..a67c65b5317 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -90,10 +90,12 @@ static SpaceLink *file_new(const ScrArea *UNUSED(area), 
const Scene *UNUSED(scen
ar->alignment = RGN_ALIGN_LEFT;
 
/* Tool props (aka operator) region */
+#if 0
ar = MEM_callocN(sizeof(ARegion), "tool props region for file");
BLI_addtail(>regionbase, ar);
ar->regiontype = RGN_TYPE_TOOL_PROPS;
ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
+#endif
 
/* ui list region */
ar = MEM_callocN(sizeof(ARegion), "ui region for file");
@@ -806,6 +808,7 @@ void ED_spacetype_file(void)
BLI_addhead(>regiontypes, art);
 
/* regions: tool properties */
+#if 0
art = MEM_callocN(sizeof(ARegionType), "spacetype file operator 
region");
art->regionid = RGN_TYPE_TOOL_PROPS;
art->prefsizex = 0;
@@ -816,6 +819,7 @@ void ED_spacetype_file(void)
art->draw = file_tools_region_draw;
BLI_addhead(>regiontypes, art);
file_panels_register(art);
+#endif
 
BKE_spacetype_register(st);

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


[Bf-blender-cvs] SVN commit: /data/svn/repos/bf-blender [62079] trunk/lib/benchmarks/cycles: Add render result images

2018-08-07 Thread Sergey Sharybin
Revision: 62079
  https://developer.blender.org/rBL62079
Author:   sergey
Date: 2018-08-07 10:07:19 +0200 (Tue, 07 Aug 2018)
Log Message:
---
Add render result images

Allows to quickly see what result should be.

Added Paths:
---
trunk/lib/benchmarks/cycles/barbershop_interior/barbershop_interior.png
trunk/lib/benchmarks/cycles/bmw27/bmw27.png
trunk/lib/benchmarks/cycles/classroom/classroom.png
trunk/lib/benchmarks/cycles/fishy_cat/fishy_cat.png
trunk/lib/benchmarks/cycles/koro/koro.png
trunk/lib/benchmarks/cycles/pavillon_barcelona/pavillon_barcelona.png
trunk/lib/benchmarks/cycles/victor/victor.png

Added: trunk/lib/benchmarks/cycles/barbershop_interior/barbershop_interior.png
===
(Binary files differ)

Index: trunk/lib/benchmarks/cycles/barbershop_interior/barbershop_interior.png
===
--- trunk/lib/benchmarks/cycles/barbershop_interior/barbershop_interior.png 
2018-08-06 15:08:19 UTC (rev 62078)
+++ trunk/lib/benchmarks/cycles/barbershop_interior/barbershop_interior.png 
2018-08-07 08:07:19 UTC (rev 62079)

Property changes on: 
trunk/lib/benchmarks/cycles/barbershop_interior/barbershop_interior.png
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/benchmarks/cycles/bmw27/bmw27.png
===
(Binary files differ)

Index: trunk/lib/benchmarks/cycles/bmw27/bmw27.png
===
--- trunk/lib/benchmarks/cycles/bmw27/bmw27.png 2018-08-06 15:08:19 UTC (rev 
62078)
+++ trunk/lib/benchmarks/cycles/bmw27/bmw27.png 2018-08-07 08:07:19 UTC (rev 
62079)

Property changes on: trunk/lib/benchmarks/cycles/bmw27/bmw27.png
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/benchmarks/cycles/classroom/classroom.png
===
(Binary files differ)

Index: trunk/lib/benchmarks/cycles/classroom/classroom.png
===
--- trunk/lib/benchmarks/cycles/classroom/classroom.png 2018-08-06 15:08:19 UTC 
(rev 62078)
+++ trunk/lib/benchmarks/cycles/classroom/classroom.png 2018-08-07 08:07:19 UTC 
(rev 62079)

Property changes on: trunk/lib/benchmarks/cycles/classroom/classroom.png
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/benchmarks/cycles/fishy_cat/fishy_cat.png
===
(Binary files differ)

Index: trunk/lib/benchmarks/cycles/fishy_cat/fishy_cat.png
===
--- trunk/lib/benchmarks/cycles/fishy_cat/fishy_cat.png 2018-08-06 15:08:19 UTC 
(rev 62078)
+++ trunk/lib/benchmarks/cycles/fishy_cat/fishy_cat.png 2018-08-07 08:07:19 UTC 
(rev 62079)

Property changes on: trunk/lib/benchmarks/cycles/fishy_cat/fishy_cat.png
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/benchmarks/cycles/koro/koro.png
===
(Binary files differ)

Index: trunk/lib/benchmarks/cycles/koro/koro.png
===
--- trunk/lib/benchmarks/cycles/koro/koro.png   2018-08-06 15:08:19 UTC (rev 
62078)
+++ trunk/lib/benchmarks/cycles/koro/koro.png   2018-08-07 08:07:19 UTC (rev 
62079)

Property changes on: trunk/lib/benchmarks/cycles/koro/koro.png
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/benchmarks/cycles/pavillon_barcelona/pavillon_barcelona.png
===
(Binary files differ)

Index: trunk/lib/benchmarks/cycles/pavillon_barcelona/pavillon_barcelona.png
===
--- trunk/lib/benchmarks/cycles/pavillon_barcelona/pavillon_barcelona.png   
2018-08-06 15:08:19 UTC (rev 62078)
+++ trunk/lib/benchmarks/cycles/pavillon_barcelona/pavillon_barcelona.png   
2018-08-07 08:07:19 UTC (rev 62079)

Property changes on: 
trunk/lib/benchmarks/cycles/pavillon_barcelona/pavillon_barcelona.png
___
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: