[Bf-blender-cvs] [5216dd5fce4] master: Merge branch 'blender2.7'
Commit: 5216dd5fce49efbb7a86a795bbfea664108c65d4 Author: Brecht Van Lommel Date: Thu Dec 27 10:53:02 2018 +0100 Branches: master https://developer.blender.org/rB5216dd5fce49efbb7a86a795bbfea664108c65d4 Merge branch 'blender2.7' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [81ab9ef968d] blender2.7: Fix T56595: Hair Dynamics stop working after saving new file
Commit: 81ab9ef968d392aa8edc79566bf02e23f93da7a8 Author: Sergey Sharybin Date: Thu Dec 27 11:35:31 2018 +0100 Branches: blender2.7 https://developer.blender.org/rB81ab9ef968d392aa8edc79566bf02e23f93da7a8 Fix T56595: Hair Dynamics stop working after saving new file The issue was caused by NaN valid of the average spring length being stored in the file. This caused accumulation in the springs builder to also deliver NaNs, which then caused solver itself to not do anything. Not sure why these values where never initialized prior to the accumulation. Or even, why this runime data is stored in a DNA. Some sanitizing is possible here, but needs to be done with care to not disrupt Spring production. === M source/blender/blenkernel/intern/cloth.c === diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 9666b1ef68f..5396a1905b9 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1285,6 +1285,11 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) if (!edgelist) return 0; + clmd->sim_parms->avg_spring_len = 0.0f; + for (i = 0; i < mvert_num; i++) { + cloth->verts[i].avg_spring_len = 0.0f; + } + // structural springs for ( i = 0; i < numedges; i++ ) { spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6de8ff57969] master: Merge branch 'blender2.7'
Commit: 6de8ff579695f7c831684f1355ff4b1f9494a32b Author: Sergey Sharybin Date: Thu Dec 27 11:43:06 2018 +0100 Branches: master https://developer.blender.org/rB6de8ff579695f7c831684f1355ff4b1f9494a32b Merge branch 'blender2.7' === === diff --cc source/blender/blenkernel/intern/cloth.c index 75e1884f9a3,5396a1905b9..30b5d92bdb7 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@@ -1341,23 -1280,18 +1341,28 @@@ static int cloth_build_springs ( ClothM cloth->springs = NULL; cloth->edgeset = NULL; - edgelist = MEM_callocN(sizeof(*edgelist) * mvert_num, "cloth_edgelist_alloc" ); + if (clmd->sim_parms->bending_model == CLOTH_BENDING_ANGULAR) { + spring_ref = MEM_callocN(sizeof(*spring_ref) * numedges, "temp bend spring reference"); - if (!edgelist) - return 0; + if (!spring_ref) { + return 0; + } + } + else { + edgelist = MEM_callocN(sizeof(*edgelist) * mvert_num, "cloth_edgelist_alloc" ); + + if (!edgelist) { + return 0; + } + } + clmd->sim_parms->avg_spring_len = 0.0f; - for (i = 0; i < mvert_num; i++) { ++ for (int i = 0; i < mvert_num; i++) { + cloth->verts[i].avg_spring_len = 0.0f; + } + - // structural springs - for ( i = 0; i < numedges; i++ ) { + /* Structural springs. */ + for (int i = 0; i < numedges; i++) { spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); if ( spring ) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [097b9019cee] master: Fix T59799: texture paint mode crash for object with no materials.
Commit: 097b9019ceea7e0c9ef399b548dc917b8525c02e Author: Brecht Van Lommel Date: Thu Dec 27 12:18:37 2018 +0100 Branches: master https://developer.blender.org/rB097b9019ceea7e0c9ef399b548dc917b8525c02e Fix T59799: texture paint mode crash for object with no materials. === M source/blender/draw/modes/paint_texture_mode.c === diff --git a/source/blender/draw/modes/paint_texture_mode.c b/source/blender/draw/modes/paint_texture_mode.c index cf6f32170f1..a89616c2cae 100644 --- a/source/blender/draw/modes/paint_texture_mode.c +++ b/source/blender/draw/modes/paint_texture_mode.c @@ -191,12 +191,13 @@ static void PAINT_TEXTURE_cache_init(void *vedata) Scene *scene = draw_ctx->scene; const bool use_material_slots = (scene->toolsettings->imapaint.mode == IMAGEPAINT_MODE_MATERIAL); const Mesh *me = ob->data; + const int mat_nr = max_ii(1, me->totcol); stl->g_data->shgroup_image_array = MEM_mallocN( - sizeof(*stl->g_data->shgroup_image_array) * (use_material_slots ? me->totcol : 1), __func__); + sizeof(*stl->g_data->shgroup_image_array) * (use_material_slots ? mat_nr : 1), __func__); if (use_material_slots) { - for (int i = 0; i < me->totcol; i++) { + for (int i = 0; i < mat_nr; i++) { Material *ma = give_current_material(ob, i + 1); Image *ima = (ma && ma->texpaintslot) ? ma->texpaintslot[ma->paint_active_slot].ima : NULL; GPUTexture *tex = ima ? ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e07b58537c0] master: UI: fix inconsistent icon button widths for popovers and enums.
Commit: e07b58537c05b4370cd0773cc1d63084e4c4a20a Author: Harley Acheson Date: Thu Dec 27 12:48:00 2018 +0100 Branches: master https://developer.blender.org/rBe07b58537c05b4370cd0773cc1d63084e4c4a20a UI: fix inconsistent icon button widths for popovers and enums. Differential Revision: https://developer.blender.org/D4086 === M source/blender/editors/interface/interface_layout.c === diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 9b145fdba92..87927ef7643 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2228,7 +2228,7 @@ static uiBut *ui_item_menu( /* pass */ } else if (force_menu) { - w += UI_UNIT_X; + w += 0.6f * UI_UNIT_X; } else { if (name[0]) { @@ -2237,12 +2237,16 @@ static uiBut *ui_item_menu( } } - if (name[0] && icon) + if (name[0] && icon) { but = uiDefIconTextMenuBut(block, func, arg, icon, name, 0, 0, w, h, tip); - else if (icon) + } + else if (icon) { but = uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, tip); - else + UI_but_drawflag_enable(but, UI_BUT_ICON_LEFT); + } + else { but = uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip); + } if (argN) { /* ugly .. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4f98266cf6c] master: UI: fix display of menu buttons without text and icon, and only a down arrow.
Commit: 4f98266cf6c7c40f1d4de4fb847d3d61644144de Author: Harley Acheson Date: Thu Dec 27 13:58:02 2018 +0100 Branches: master https://developer.blender.org/rB4f98266cf6c7c40f1d4de4fb847d3d61644144de UI: fix display of menu buttons without text and icon, and only a down arrow. Differential Revision: https://developer.blender.org/D4123 === M source/blender/editors/interface/interface_layout.c M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 87927ef7643..eb1b86559bf 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -285,8 +285,8 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, bool bool variable; const int unit_x = UI_UNIT_X * (layout->scale[0] ? layout->scale[0] : 1.0f); - if (icon && !name[0]) - return unit_x; /* icon only */ + if (!name[0]) + return unit_x; /* icon only or empty name */ variable = ui_layout_variable_size(layout); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index a4ab8910c64..47d74660fe3 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -948,16 +948,23 @@ static void widget_draw_vertex_buffer(unsigned int pos, unsigned int col, int mo static void shape_preset_trias_from_rect_menu(uiWidgetTrias *tria, const rcti *rect) { + float width = BLI_rcti_size_x(rect); + float height = BLI_rcti_size_y(rect); float centx, centy, size; - int a; + tria->type = ROUNDBOX_TRIA_MENU; - /* center position and size */ - tria->center[0] = centx = rect->xmax - 0.32f * BLI_rcti_size_y(rect); - tria->center[1] = centy = rect->ymin + 0.50f * BLI_rcti_size_y(rect); - tria->size = size = 0.4f * BLI_rcti_size_y(rect); + /* Center position and size. */ + tria->center[0] = centx = rect->xmin + 0.52f * BLI_rcti_size_y(rect); + tria->center[1] = centy = rect->ymin + 0.52f * BLI_rcti_size_y(rect); + tria->size = size = 0.4f * height; + + if (width > height * 1.1f) { + /* For wider buttons align tighter to the right. */ + tria->center[0] = centx = rect->xmax - 0.32f * height; + } - for (a = 0; a < 6; a++) { + for (int a = 0; a < 6; a++) { tria->vec[a][0] = size * g_shape_preset_menu_arrow_vert[a][0] + centx; tria->vec[a][1] = size * g_shape_preset_menu_arrow_vert[a][1] + centy; } @@ -969,15 +976,15 @@ static void shape_preset_trias_from_rect_menu(uiWidgetTrias *tria, const rcti *r static void shape_preset_trias_from_rect_checkmark(uiWidgetTrias *tria, const rcti *rect) { float centx, centy, size; - int a; + tria->type = ROUNDBOX_TRIA_CHECK; - /* center position and size */ + /* Center position and size. */ tria->center[0] = centx = rect->xmin + 0.5f * BLI_rcti_size_y(rect); tria->center[1] = centy = rect->ymin + 0.5f * BLI_rcti_size_y(rect); tria->size = size = 0.5f * BLI_rcti_size_y(rect); - for (a = 0; a < 6; a++) { + for (int a = 0; a < 6; a++) { tria->vec[a][0] = size * g_shape_preset_checkmark_vert[a][0] + centx; tria->vec[a][1] = size * g_shape_preset_checkmark_vert[a][1] + centy; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f1bf604804f] master: Fix T59389: Solidify Modifier does not work with 'beveled' Curve objects.
Commit: f1bf604804f9652378ecdfb7d5afaa5ee99d4a24 Author: Bastien Montagne Date: Thu Dec 27 15:01:48 2018 +0100 Branches: master https://developer.blender.org/rBf1bf604804f9652378ecdfb7d5afaa5ee99d4a24 Fix T59389: Solidify Modifier does not work with 'beveled' Curve objects. Curve modifier eval code was actually doing nothing to ensure we passed mesh with valid normals when required by the modifier. This is a bit basic, rough code, but think it should cover all cases, time will say... === M source/blender/blenkernel/intern/displist.c === diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index c985de94854..c5dadb1b529 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -965,6 +965,19 @@ static void curve_calc_modifiers_post( if (!modifier_isEnabled(scene, md, required_mode)) continue; + /* If we need normals, no choice, have to convert to mesh now. */ + if (mti->dependsOnNormals != NULL && mti->dependsOnNormals(md) && modified == NULL) { + if (vertCos != NULL) { + displist_apply_allverts(dispbase, vertCos); + } + + if (ELEM(ob->type, OB_CURVE, OB_FONT) && (cu->flag & CU_DEFORM_FILL)) { + curve_to_filledpoly(cu, nurb, dispbase); + } + + modified = BKE_mesh_new_nomain_from_curve_displist(ob, dispbase); + } + if (mti->type == eModifierTypeType_OnlyDeform || (mti->type == eModifierTypeType_DeformOrConstruct && !modified)) { @@ -972,6 +985,9 @@ static void curve_calc_modifiers_post( if (!vertCos) { vertCos = BKE_mesh_vertexCos_get(modified, &totvert); } + if (mti->dependsOnNormals != NULL && mti->dependsOnNormals(md)) { + BKE_mesh_ensure_normals(modified); + } mti->deformVerts(md, &mectx_deform, modified, vertCos, totvert); } else { @@ -1021,6 +1037,9 @@ static void curve_calc_modifiers_post( vertCos = NULL; } + if (mti->dependsOnNormals != NULL && mti->dependsOnNormals(md)) { + BKE_mesh_ensure_normals(modified); + } mesh_applied = mti->applyModifier(md, &mectx_apply, modified); if (mesh_applied) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [be1b32e4e49] master: Fix T59884: Rigidbody Calculate Mass Sets Mass to 0
Commit: be1b32e4e49e6f8b51aca193c8a2399af893008f Author: Philipp Oeser Date: Thu Dec 27 09:58:19 2018 +0100 Branches: master https://developer.blender.org/rBbe1b32e4e49e6f8b51aca193c8a2399af893008f Fix T59884: Rigidbody Calculate Mass Sets Mass to 0 rigidbody_get_mesh() needs an evaluated object Reviewers: sergey, brecht Maniphest Tasks: T59884 Differential Revision: https://developer.blender.org/D4125 === M source/blender/editors/physics/rigidbody_object.c === diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index ff411d4bece..1c0ceed2455 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -51,6 +51,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" +#include "DEG_depsgraph_query.h" #include "RNA_access.h" #include "RNA_define.h" @@ -490,6 +491,7 @@ static const EnumPropertyItem *rigidbody_materials_itemf(bContext *UNUSED(C), Po static int rigidbody_objects_calc_mass_exec(bContext *C, wmOperator *op) { + Depsgraph *depsgraph = CTX_data_depsgraph(C); int material = RNA_enum_get(op->ptr, "material"); float density; bool changed = false; @@ -520,7 +522,8 @@ static int rigidbody_objects_calc_mass_exec(bContext *C, wmOperator *op) /* mass is calculated from the approximate volume of the object, * and the density of the material we're simulating */ - BKE_rigidbody_calc_volume(ob, &volume); + Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); + BKE_rigidbody_calc_volume(ob_eval, &volume); mass = volume * density; /* use RNA-system to change the property and perform all necessary changes */ @@ -561,7 +564,7 @@ void RIGIDBODY_OT_mass_calculate(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA; /* properties */ ot->prop = prop = RNA_def_enum(ot->srna, "material", ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [21e4f3bd8c3] master: Fix T59861: converting GP stroke to curve doesn't immediately work
Commit: 21e4f3bd8c3b797d6b51cafbfb33e2bed9f42269 Author: Philipp Oeser Date: Thu Dec 27 14:41:02 2018 +0100 Branches: master https://developer.blender.org/rB21e4f3bd8c3b797d6b51cafbfb33e2bed9f42269 Fix T59861: converting GP stroke to curve doesn't immediately work Reviewers: antoniov, brecht Maniphest Tasks: T59861 Differential Revision: https://developer.blender.org/D4127 === M source/blender/editors/gpencil/gpencil_convert.c === diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 49ce18753b1..cb3fcba45e1 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -1179,6 +1179,7 @@ static void gp_layer_to_curve( cu = ob->data = BKE_curve_add(bmain, gpl->info, OB_CURVE); BKE_collection_object_add(bmain, collection, ob); base_new = BKE_view_layer_base_find(view_layer, ob); + DEG_relations_tag_update(bmain); /* added object */ cu->flag |= CU_3D; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2c196de56bb] master: cleanup: remove unused passes
Commit: 2c196de56bbb163048b08f321983234a5e72e804 Author: Philipp Oeser Date: Fri Dec 21 23:26:04 2018 +0100 Branches: master https://developer.blender.org/rB2c196de56bbb163048b08f321983234a5e72e804 cleanup: remove unused passes - use_pass_indirect, use_pass_specular from ViewLayer RNA - RGBA, DIFFUSE, SPEC, REFLECT, REFRACT, INDIRECT usages from remaining places Reviewers: brecht Differential Revision: https://developer.blender.org/D4117 === M source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp M source/blender/makesdna/DNA_scene_types.h M source/blender/makesrna/intern/rna_render.c M source/blender/makesrna/intern/rna_scene.c M source/blender/nodes/composite/nodes/node_composite_image.c M source/blender/render/intern/source/bake_api.c M source/blender/render/intern/source/pipeline.c M source/blender/render/intern/source/render_result.c === diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 0548d49dce0..3486980fa65 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -447,7 +447,7 @@ static void prepare(Render *re, ViewLayer *view_layer) RenderLayer *rl = RE_GetRenderLayer(re->result, view_layer->name); bool diffuse = false, z = false; for (RenderPass *rpass = (RenderPass *)rl->passes.first; rpass; rpass = rpass->next) { - if (STREQ(rpass->name, RE_PASSNAME_DIFFUSE)) { + if (STREQ(rpass->name, RE_PASSNAME_DIFFUSE_COLOR)) { controller->setPassDiffuse(rpass->rect, rpass->rectx, rpass->recty); diffuse = true; } diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 467d70ffd81..ad33c57b3c8 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -234,18 +234,18 @@ typedef struct SceneRenderLayer { typedef enum eScenePassType { SCE_PASS_COMBINED = (1 << 0), SCE_PASS_Z= (1 << 1), - SCE_PASS_RGBA = (1 << 2), - SCE_PASS_DIFFUSE = (1 << 3), - SCE_PASS_SPEC = (1 << 4), + SCE_PASS_DEPRECATED_1 = (1 << 2), /* RGBA */ + SCE_PASS_DEPRECATED_2 = (1 << 3), /* DIFFUSE */ + SCE_PASS_DEPRECATED_3 = (1 << 4), /* SPEC */ SCE_PASS_SHADOW = (1 << 5), SCE_PASS_AO = (1 << 6), - SCE_PASS_REFLECT = (1 << 7), + SCE_PASS_DEPRECATED_4 = (1 << 7), /* REFLECT */ SCE_PASS_NORMAL = (1 << 8), SCE_PASS_VECTOR = (1 << 9), - SCE_PASS_REFRACT = (1 << 10), + SCE_PASS_DEPRECATED_5 = (1 << 10), /* REFRACT */ SCE_PASS_INDEXOB = (1 << 11), SCE_PASS_UV = (1 << 12), - SCE_PASS_INDIRECT = (1 << 13), + SCE_PASS_DEPRECATED_6 = (1 << 13), /* INDIRECT */ SCE_PASS_MIST = (1 << 14), SCE_PASS_RAYHITS = (1 << 15), SCE_PASS_EMIT = (1 << 16), @@ -271,17 +271,11 @@ typedef enum eScenePassType { #define RE_PASSNAME_VECTOR "Vector" #define RE_PASSNAME_NORMAL "Normal" #define RE_PASSNAME_UV "UV" -#define RE_PASSNAME_RGBA "Color" #define RE_PASSNAME_EMIT "Emit" -#define RE_PASSNAME_DIFFUSE "Diffuse" -#define RE_PASSNAME_SPEC "Spec" #define RE_PASSNAME_SHADOW "Shadow" #define RE_PASSNAME_AO "AO" #define RE_PASSNAME_ENVIRONMENT "Env" -#define RE_PASSNAME_INDIRECT "Indirect" -#define RE_PASSNAME_REFLECT "Reflect" -#define RE_PASSNAME_REFRACT "Refract" #define RE_PASSNAME_INDEXOB "IndexOB" #define RE_PASSNAME_INDEXMA "IndexMA" #define RE_PASSNAME_MIST "Mist" diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 46b77b80d49..9836dfdfbc9 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -52,15 +52,10 @@ const EnumPropertyItem rna_enum_render_pass_type_items[] = { {SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""}, {SCE_PASS_Z, "Z", 0, "Z", ""}, - {SCE_PASS_RGBA, "COLOR", 0, "Color", ""}, - {SCE_PASS_DIFFUSE, "DIFFUSE", 0, "Diffuse", ""}, - {SCE_PASS_SPEC, "SPECULAR", 0, "Specular", ""}, {SCE_PASS_SHADOW, "SHADOW", 0, "Shadow", ""}, {SCE_PASS_AO, "AO", 0, "Ambient Occlusion", ""}, - {SCE_PASS_REFLECT, "REFLECTION", 0, "Reflection
[Bf-blender-cvs] [53a6a0b2584] master: X11: support multiple tablet devices.
Commit: 53a6a0b2584a6730d6cfc03f3312ff0e5da91a4f Author: Brecht Van Lommel Date: Thu Dec 27 15:22:20 2018 +0100 Branches: master https://developer.blender.org/rB53a6a0b2584a6730d6cfc03f3312ff0e5da91a4f X11: support multiple tablet devices. Previously we would try to guess what the main tablet device is, but this is error prone. Now we keep a list of X11 devices and try to match events to them. On the Blender side there are still some limitations in regards to using multiple devices at the same time, but this should improve things already. Fixes T59645. === M intern/ghost/intern/GHOST_SystemX11.cpp M intern/ghost/intern/GHOST_SystemX11.h M intern/ghost/intern/GHOST_WindowX11.cpp === diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index e53379a4f22..1afffb85037 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -235,9 +235,6 @@ GHOST_SystemX11( } #endif /* USE_XINPUT_HOTPLUG */ - /* initialize incase X11 fails to load */ - memset(&m_xtablet, 0, sizeof(m_xtablet)); - refreshXInputDevices(); #endif /* WITH_X11_XINPUT */ } @@ -252,12 +249,8 @@ GHOST_SystemX11:: #endif #ifdef WITH_X11_XINPUT - /* close tablet devices */ - if (m_xtablet.StylusDevice) - XCloseDevice(m_display, m_xtablet.StylusDevice); - - if (m_xtablet.EraserDevice) - XCloseDevice(m_display, m_xtablet.EraserDevice); + /* Close tablet devices. */ + clearXInputDevices(); #endif /* WITH_X11_XINPUT */ if (m_xkb_descr) { @@ -768,17 +761,6 @@ processEvents( } -#ifdef WITH_X11_XINPUT -/* set currently using tablet mode (stylus or eraser) depending on device ID */ -static void setTabletMode(GHOST_SystemX11 *system, GHOST_WindowX11 *window, XID deviceid) -{ - if (deviceid == system->GetXTablet().StylusID) - window->GetTabletData()->Active = GHOST_kTabletModeStylus; - else if (deviceid == system->GetXTablet().EraserID) - window->GetTabletData()->Active = GHOST_kTabletModeEraser; -} -#endif /* WITH_X11_XINPUT */ - #ifdef WITH_X11_XINPUT static bool checkTabletProximity(Display *display, XDevice *device) { @@ -876,9 +858,15 @@ GHOST_SystemX11::processEvent(XEvent *xe) * but for now enough parts of the code are checking 'Active' * - campbell */ if (window->GetTabletData()->Active != GHOST_kTabletModeNone) { - if (checkTabletProximity(xe->xany.display, m_xtablet.StylusDevice) == false && - checkTabletProximity(xe->xany.display, m_xtablet.EraserDevice) == false) - { + bool any_proximity = false; + + for (GHOST_TabletX11& xtablet: m_xtablets) { + if (checkTabletProximity(xe->xany.display, xtablet.Device)) { + any_proximity = true; + } + } + + if (!any_proximity) { // printf("proximity disable\n"); window->GetTabletData()->Active = GHOST_kTabletModeNone; } @@ -1472,59 +1460,64 @@ GHOST_SystemX11::processEvent(XEvent *xe) default: { #ifdef WITH_X11_XINPUT - if (xe->type == m_xtablet.MotionEvent || - xe->type == m_xtablet.MotionEventEraser || - xe->type == m_xtablet.PressEvent || - xe->type == m_xtablet.PressEventEraser) - { - XDeviceMotionEvent *data = (XDeviceMotionEvent *)xe; - const unsigned char axis_first = data->first_axis; - const unsigned char axes_end = axis_first + data->axes_count; /* after the last */ - int axis_value; - - /* stroke might begin without leading ProxyIn event, -* this happens when window is opened when stylus is already hovering -* around tablet surface */ - setTabletMode(this, window, data->deviceid); - - /* Note: This event might be generated with incomplete dataset (don't exactly know why, looks like in -* some cases, if the value does not change, it is not included in subsequent XDeviceMotionEvent -* events). So we have to check which values this event actually contains! -*/ + for (GHOST_TabletX11& xtablet: m_xtablets) { + if (xe->type == xtablet.MotionEvent || xe->type == xtablet
[Bf-blender-cvs] [357d421ac2e] master: Fix T59864: UV editor missing options in snapping pie menu.
Commit: 357d421ac2eaf093cb62e0e7db8095388a7e0544 Author: Sebastian Parborg Date: Thu Dec 27 16:23:12 2018 +0100 Branches: master https://developer.blender.org/rB357d421ac2eaf093cb62e0e7db8095388a7e0544 Fix T59864: UV editor missing options in snapping pie menu. Differential Revision: https://developer.blender.org/D4128 === M release/scripts/startup/bl_ui/space_image.py === diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 38045a9de5e..69f319b4e03 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -498,8 +498,8 @@ class IMAGE_MT_uvs_snap_pie(Menu): layout.operator_context = 'EXEC_REGION_WIN' pie.operator("uv.snap_selected", text="Selected to Pixels", icon='RESTRICT_SELECT_OFF').target = 'PIXELS' -pie.operator("uv.snap_cursor", text="Cursor to Pixels", icon='CURSOR').target = 'PIXELS' -pie.operator("uv.snap_cursor", text="Cursor to Selected", icon='CURSOR').target = 'SELECTED' +pie.operator("uv.snap_cursor", text="Cursor to Pixels", icon='PIVOT_CURSOR').target = 'PIXELS' +pie.operator("uv.snap_cursor", text="Cursor to Selected", icon='PIVOT_CURSOR').target = 'SELECTED' pie.operator("uv.snap_selected", text="Selected to Cursor", icon='RESTRICT_SELECT_OFF').target = 'CURSOR' pie.operator("uv.snap_selected", text="Selected to Cursor (Offset)", icon='RESTRICT_SELECT_OFF').target = 'CURSOR_OFFSET' pie.operator("uv.snap_selected", text="Selected to Adjacent Unselected", icon='RESTRICT_SELECT_OFF').target = 'ADJACENT_UNSELECTED' ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [29feb215f42] master: X11: support multiple tablet devices.
Commit: 29feb215f42d886659ee72c8166f9b207e127fec Author: Brecht Van Lommel Date: Thu Dec 27 15:22:20 2018 +0100 Branches: master https://developer.blender.org/rB29feb215f42d886659ee72c8166f9b207e127fec X11: support multiple tablet devices. Previously we would try to guess what the main tablet device is, but this is error prone. Now we keep a list of X11 devices and try to match events to them. On the Blender side there are still some limitations in regards to using multiple devices at the same time, but this should improve things already. Fixes T59645. === M intern/ghost/intern/GHOST_SystemX11.cpp M intern/ghost/intern/GHOST_SystemX11.h M intern/ghost/intern/GHOST_WindowX11.cpp === diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 3befb700c55..1791908f670 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -228,9 +228,6 @@ GHOST_SystemX11( } #endif /* USE_XINPUT_HOTPLUG */ - /* initialize incase X11 fails to load */ - memset(&m_xtablet, 0, sizeof(m_xtablet)); - refreshXInputDevices(); #endif /* WITH_X11_XINPUT */ } @@ -245,12 +242,8 @@ GHOST_SystemX11:: #endif #ifdef WITH_X11_XINPUT - /* close tablet devices */ - if (m_xtablet.StylusDevice) - XCloseDevice(m_display, m_xtablet.StylusDevice); - - if (m_xtablet.EraserDevice) - XCloseDevice(m_display, m_xtablet.EraserDevice); + /* Close tablet devices. */ + clearXInputDevices(); #endif /* WITH_X11_XINPUT */ if (m_xkb_descr) { @@ -670,17 +663,6 @@ processEvents( } -#ifdef WITH_X11_XINPUT -/* set currently using tablet mode (stylus or eraser) depending on device ID */ -static void setTabletMode(GHOST_SystemX11 *system, GHOST_WindowX11 *window, XID deviceid) -{ - if (deviceid == system->GetXTablet().StylusID) - window->GetTabletData()->Active = GHOST_kTabletModeStylus; - else if (deviceid == system->GetXTablet().EraserID) - window->GetTabletData()->Active = GHOST_kTabletModeEraser; -} -#endif /* WITH_X11_XINPUT */ - #ifdef WITH_X11_XINPUT static bool checkTabletProximity(Display *display, XDevice *device) { @@ -778,9 +760,15 @@ GHOST_SystemX11::processEvent(XEvent *xe) * but for now enough parts of the code are checking 'Active' * - campbell */ if (window->GetTabletData()->Active != GHOST_kTabletModeNone) { - if (checkTabletProximity(xe->xany.display, m_xtablet.StylusDevice) == false && - checkTabletProximity(xe->xany.display, m_xtablet.EraserDevice) == false) - { + bool any_proximity = false; + + for (GHOST_TabletX11& xtablet: m_xtablets) { + if (checkTabletProximity(xe->xany.display, xtablet.Device)) { + any_proximity = true; + } + } + + if (!any_proximity) { // printf("proximity disable\n"); window->GetTabletData()->Active = GHOST_kTabletModeNone; } @@ -1374,59 +1362,64 @@ GHOST_SystemX11::processEvent(XEvent *xe) default: { #ifdef WITH_X11_XINPUT - if (xe->type == m_xtablet.MotionEvent || - xe->type == m_xtablet.MotionEventEraser || - xe->type == m_xtablet.PressEvent || - xe->type == m_xtablet.PressEventEraser) - { - XDeviceMotionEvent *data = (XDeviceMotionEvent *)xe; - const unsigned char axis_first = data->first_axis; - const unsigned char axes_end = axis_first + data->axes_count; /* after the last */ - int axis_value; - - /* stroke might begin without leading ProxyIn event, -* this happens when window is opened when stylus is already hovering -* around tablet surface */ - setTabletMode(this, window, data->deviceid); - - /* Note: This event might be generated with incomplete dataset (don't exactly know why, looks like in -* some cases, if the value does not change, it is not included in subsequent XDeviceMotionEvent -* events). So we have to check which values this event actually contains! -*/ + for (GHOST_TabletX11& xtablet: m_xtablets) { + if (xe->type == xtablet.MotionEvent || xe->type == xtablet
[Bf-blender-cvs] [97094a1bb4f] master: Merge branch 'blender2.7'
Commit: 97094a1bb4f17bd98705c8f2e5b7fe739a9afca3 Author: Brecht Van Lommel Date: Thu Dec 27 16:32:17 2018 +0100 Branches: master https://developer.blender.org/rB97094a1bb4f17bd98705c8f2e5b7fe739a9afca3 Merge branch 'blender2.7' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7bed048243f] blender2.7: X11: support multiple tablet devices.
Commit: 7bed048243fef51e92b86e4383fa48d1d18d12ac Author: Brecht Van Lommel Date: Thu Dec 27 15:22:20 2018 +0100 Branches: blender2.7 https://developer.blender.org/rB7bed048243fef51e92b86e4383fa48d1d18d12ac X11: support multiple tablet devices. Previously we would try to guess what the main tablet device is, but this is error prone. Now we keep a list of X11 devices and try to match events to them. On the Blender side there are still some limitations in regards to using multiple devices at the same time, but this should improve things already. Fixes T59645. === M intern/ghost/intern/GHOST_SystemX11.cpp M intern/ghost/intern/GHOST_SystemX11.h M intern/ghost/intern/GHOST_WindowX11.cpp === diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 3befb700c55..1791908f670 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -228,9 +228,6 @@ GHOST_SystemX11( } #endif /* USE_XINPUT_HOTPLUG */ - /* initialize incase X11 fails to load */ - memset(&m_xtablet, 0, sizeof(m_xtablet)); - refreshXInputDevices(); #endif /* WITH_X11_XINPUT */ } @@ -245,12 +242,8 @@ GHOST_SystemX11:: #endif #ifdef WITH_X11_XINPUT - /* close tablet devices */ - if (m_xtablet.StylusDevice) - XCloseDevice(m_display, m_xtablet.StylusDevice); - - if (m_xtablet.EraserDevice) - XCloseDevice(m_display, m_xtablet.EraserDevice); + /* Close tablet devices. */ + clearXInputDevices(); #endif /* WITH_X11_XINPUT */ if (m_xkb_descr) { @@ -670,17 +663,6 @@ processEvents( } -#ifdef WITH_X11_XINPUT -/* set currently using tablet mode (stylus or eraser) depending on device ID */ -static void setTabletMode(GHOST_SystemX11 *system, GHOST_WindowX11 *window, XID deviceid) -{ - if (deviceid == system->GetXTablet().StylusID) - window->GetTabletData()->Active = GHOST_kTabletModeStylus; - else if (deviceid == system->GetXTablet().EraserID) - window->GetTabletData()->Active = GHOST_kTabletModeEraser; -} -#endif /* WITH_X11_XINPUT */ - #ifdef WITH_X11_XINPUT static bool checkTabletProximity(Display *display, XDevice *device) { @@ -778,9 +760,15 @@ GHOST_SystemX11::processEvent(XEvent *xe) * but for now enough parts of the code are checking 'Active' * - campbell */ if (window->GetTabletData()->Active != GHOST_kTabletModeNone) { - if (checkTabletProximity(xe->xany.display, m_xtablet.StylusDevice) == false && - checkTabletProximity(xe->xany.display, m_xtablet.EraserDevice) == false) - { + bool any_proximity = false; + + for (GHOST_TabletX11& xtablet: m_xtablets) { + if (checkTabletProximity(xe->xany.display, xtablet.Device)) { + any_proximity = true; + } + } + + if (!any_proximity) { // printf("proximity disable\n"); window->GetTabletData()->Active = GHOST_kTabletModeNone; } @@ -1374,59 +1362,64 @@ GHOST_SystemX11::processEvent(XEvent *xe) default: { #ifdef WITH_X11_XINPUT - if (xe->type == m_xtablet.MotionEvent || - xe->type == m_xtablet.MotionEventEraser || - xe->type == m_xtablet.PressEvent || - xe->type == m_xtablet.PressEventEraser) - { - XDeviceMotionEvent *data = (XDeviceMotionEvent *)xe; - const unsigned char axis_first = data->first_axis; - const unsigned char axes_end = axis_first + data->axes_count; /* after the last */ - int axis_value; - - /* stroke might begin without leading ProxyIn event, -* this happens when window is opened when stylus is already hovering -* around tablet surface */ - setTabletMode(this, window, data->deviceid); - - /* Note: This event might be generated with incomplete dataset (don't exactly know why, looks like in -* some cases, if the value does not change, it is not included in subsequent XDeviceMotionEvent -* events). So we have to check which values this event actually contains! -*/ + for (GHOST_TabletX11& xtablet: m_xtablets) { + if (xe->type == xtablet.MotionEvent || xe->type == xta
[Bf-blender-cvs] [dff011db410] master: Merge branch 'blender2.7'
Commit: dff011db410e1ade13fa0ef36e3fc5b77e56a336 Author: Brecht Van Lommel Date: Thu Dec 27 16:45:01 2018 +0100 Branches: master https://developer.blender.org/rBdff011db410e1ade13fa0ef36e3fc5b77e56a336 Merge branch 'blender2.7' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b2a7aab7db8] master: GP: Enable Brush cursor by default for new brushes
Commit: b2a7aab7db81557ef3f2f8bd1df7ce8e37e137a6 Author: Antonioya Date: Thu Dec 27 17:04:31 2018 +0100 Branches: master https://developer.blender.org/rBb2a7aab7db81557ef3f2f8bd1df7ce8e37e137a6 GP: Enable Brush cursor by default for new brushes === M source/blender/blenkernel/intern/brush.c === diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index b000b3709f2..f9ba8765d04 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -182,6 +182,7 @@ void BKE_brush_init_gpencil_settings(Brush *brush) brush->gpencil_settings->draw_jitter = 0.0f; brush->gpencil_settings->flag |= GP_BRUSH_USE_JITTER_PRESSURE; brush->gpencil_settings->icon_id = GP_BRUSH_ICON_PEN; + brush->gpencil_settings->flag |= GP_BRUSH_ENABLE_CURSOR; /* curves */ brush->gpencil_settings->curve_sensitivity = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [de14ddf3a14] blender2.7: Fix T59900: duplicate font loading error and memory leak.
Commit: de14ddf3a141cb0e2baff00b06dc7d86d3088916 Author: Brecht Van Lommel Date: Thu Dec 27 15:22:20 2018 +0100 Branches: blender2.7 https://developer.blender.org/rBde14ddf3a141cb0e2baff00b06dc7d86d3088916 Fix T59900: duplicate font loading error and memory leak. === M source/blender/blenkernel/intern/font.c === diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index e51b10a97a4..6c716e58e23 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -244,7 +244,6 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath) char filename[FILE_MAXFILE]; VFont *vfont = NULL; PackedFile *pf; - PackedFile *temp_pf = NULL; bool is_builtin; if (STREQ(filepath, FO_BUILTIN_NAME)) { @@ -256,7 +255,6 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath) else { BLI_split_file_part(filepath, filename, sizeof(filename)); pf = newPackedFile(NULL, filepath, BKE_main_blendfile_path(bmain)); - temp_pf = newPackedFile(NULL, filepath, BKE_main_blendfile_path(bmain)); is_builtin = false; } @@ -282,7 +280,7 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath) /* Do not add FO_BUILTIN_NAME to temporary listbase */ if (!STREQ(filename, FO_BUILTIN_NAME)) { - vfont->temp_pf = temp_pf; + vfont->temp_pf = newPackedFile(NULL, filepath, BKE_main_blendfile_path(bmain)); } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c68996c75a8] greasepencil-object: Merge branch 'master' into greasepencil-object
Commit: c68996c75a8cd7ba35bf7e5b19fb8596ec73e45a Author: Antonioya Date: Thu Dec 27 17:07:22 2018 +0100 Branches: greasepencil-object https://developer.blender.org/rBc68996c75a8cd7ba35bf7e5b19fb8596ec73e45a 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] [b3e68a83f30] master: Fix T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8.
Commit: b3e68a83f30f7f9948a384d756aaf43eb055ab46 Author: Bastien Montagne Date: Thu Dec 27 17:18:05 2018 +0100 Branches: master https://developer.blender.org/rBb3e68a83f30f7f9948a384d756aaf43eb055ab46 Fix T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8. Would free evaluated mesh even when it was the one cached in runtime data by depsgraph evaluation! Also fixes the asserts about using non-eval object in some cases. === M source/blender/python/mathutils/mathutils_bvhtree.c === diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c index b247123ecff..fce0dd7d2af 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.c +++ b/source/blender/python/mathutils/mathutils_bvhtree.c @@ -1053,11 +1053,13 @@ static PyObject *C_BVHTree_FromBMesh(PyObject *UNUSED(cls), PyObject *args, PyOb /* return various derived meshes based on requested settings */ static Mesh *bvh_get_mesh( const char *funcname, struct Depsgraph *depsgraph, struct Scene *scene, Object *ob, -bool use_deform, bool use_cage) +const bool use_deform, const bool use_cage, bool *r_free_mesh) { + Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); /* we only need minimum mesh data for topology and vertex locations */ CustomDataMask mask = CD_MASK_BAREMESH; const bool use_render = DEG_get_mode(depsgraph) == DAG_EVAL_RENDER; + *r_free_mesh = false; /* Write the display mesh into the dummy mesh */ if (use_deform) { @@ -1068,17 +1070,23 @@ static Mesh *bvh_get_mesh( return NULL; } else { + *r_free_mesh = true; return mesh_create_eval_final_render(depsgraph, scene, ob, mask); } } - else { + else if (ob_eval != NULL) { if (use_cage) { - return mesh_get_eval_deform(depsgraph, scene, ob, mask); /* ob->derivedDeform */ + return mesh_get_eval_deform(depsgraph, scene, ob_eval, mask); /* ob->derivedDeform */ } else { - return mesh_get_eval_final(depsgraph, scene, ob, mask); /* ob->derivedFinal */ + return mesh_get_eval_final(depsgraph, scene, ob_eval, mask); /* ob->derivedFinal */ } } + else { + PyErr_Format(PyExc_ValueError, +"%s(...): Cannot get evaluated data from given dependency graph / object pair", funcname); + return NULL; + } } else { /* !use_deform */ @@ -1089,6 +1097,7 @@ static Mesh *bvh_get_mesh( return NULL; } else { + *r_free_mesh = true; return mesh_create_eval_no_deform_render(depsgraph, scene, ob, NULL, mask); } } @@ -1099,6 +1108,7 @@ static Mesh *bvh_get_mesh( return NULL; } else { + *r_free_mesh = true; return mesh_create_eval_no_deform(depsgraph, scene, ob, NULL, mask); } } @@ -1132,6 +1142,7 @@ static PyObject *C_BVHTree_FromObject(PyObject *UNUSED(cls), PyObject *args, PyO Mesh *mesh; bool use_deform = true; bool use_cage = false; + bool free_mesh = false; const MLoopTri *lt; const MLoop *mloop; @@ -1154,7 +1165,7 @@ static PyObject *C_BVHTree_FromObject(PyObject *UNUSED(cls), PyObject *args, PyO } scene = DEG_get_evaluated_scene(depsgraph); - mesh = bvh_get_mesh("BVHTree", depsgraph, scene, ob, use_deform, use_cage); + mesh = bvh_get_mesh("BVHTree", depsgraph, scene, ob, use_deform, use_cage, &free_mesh); if (mesh == NULL) { return NULL; @@ -1212,7 +1223,9 @@ static PyObject *C_BVHTree_FromObject(PyObject *UNUSED(cls), PyObject *args, PyO BLI_bvhtree_balance(tree); } - BKE_id_free(NULL, mesh); + if (free_mesh) { + BKE_id_free(NULL, mesh); + } return bvhtree_CreatePyObject( tree, epsilon, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.ble
[Bf-blender-cvs] [c55c15bb775] master: Fix T59870: Can't select "Face area" in average normals operator.
Commit: c55c15bb775095a68ee3f2e68b052d2a8166417a Author: Bastien Montagne Date: Thu Dec 27 17:35:37 2018 +0100 Branches: master https://developer.blender.org/rBc55c15bb775095a68ee3f2e68b052d2a8166417a Fix T59870: Can't select "Face area" in average normals operator. Not sure why the mode prop was hidden at all, tbh... === M source/blender/editors/mesh/editmesh_tools.c === diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index c8b3296d0d7..27ff9333492 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -7940,7 +7940,6 @@ void MESH_OT_average_normals(struct wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "average_type", average_method_items, EDBM_CLNOR_AVERAGE_LOOP, "Type", "Averaging method"); - RNA_def_property_flag(ot->prop, PROP_HIDDEN); RNA_def_int(ot->srna, "weight", 50, 1, 100, "Weight", "Weight applied per face", 1, 100); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a5d66391ab7] greasepencil-object: GP: Mew Merge Strokes operator
Commit: a5d66391ab75be2dcd7477fad59bce1ecd926bd3 Author: Antonioya Date: Thu Dec 27 17:48:28 2018 +0100 Branches: greasepencil-object https://developer.blender.org/rBa5d66391ab75be2dcd7477fad59bce1ecd926bd3 GP: Mew Merge Strokes operator This operator allows to create a new stroke joining several stroke selected points of different strokes. The new stroke will use the current material. To use, first select the points to be merged. Optionally can remove the old points and strokes. The operator is available in Edit mode in the Specials menu and Stroke menu. === M release/scripts/startup/bl_ui/properties_grease_pencil_common.py M release/scripts/startup/bl_ui/space_view3d.py M source/blender/editors/gpencil/CMakeLists.txt M source/blender/editors/gpencil/gpencil_intern.h A source/blender/editors/gpencil/gpencil_merge.c M source/blender/editors/gpencil/gpencil_ops.c === diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index be335469418..8e29e03a8f6 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -217,6 +217,7 @@ class GreasePencilStrokeEditPanel: col.separator() row = col.row(align=True) +row.operator("gpencil.stroke_merge", text="Merge") row.operator("gpencil.stroke_join", text="Join").type = 'JOIN' row.operator("gpencil.stroke_join", text="& Copy").type = 'JOINCOPY' diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 93f772785a5..9c2f25b4fb1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3935,6 +3935,7 @@ class VIEW3D_MT_edit_gpencil(Menu): layout.operator_menu_enum("gpencil.stroke_separate", "mode", text="Separate...") layout.operator("gpencil.stroke_split", text="Split") +layout.operator("gpencil.stroke_merge", text="Merge") layout.operator_menu_enum("gpencil.stroke_join", "type", text="Join...") layout.operator("gpencil.stroke_flip", text="Flip Direction") @@ -5558,6 +5559,7 @@ class VIEW3D_MT_gpencil_edit_specials(Menu): layout.separator() +layout.operator("gpencil.stroke_merge", text="Merge") layout.operator("gpencil.stroke_join", text="Join").type = 'JOIN' layout.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' layout.operator("gpencil.stroke_flip", text="Flip Direction") diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt index cea2e5d4269..576e16077d2 100644 --- a/source/blender/editors/gpencil/CMakeLists.txt +++ b/source/blender/editors/gpencil/CMakeLists.txt @@ -49,6 +49,7 @@ set(SRC gpencil_convert.c gpencil_data.c gpencil_edit.c + gpencil_merge.c gpencil_interpolate.c gpencil_primitive.c gpencil_ops.c diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 991cd52f523..6a944645f5f 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -388,6 +388,10 @@ enum { GP_STROKE_CURVE = 4, }; +enum { + GP_MERGE_STROKE = -1, + GP_MERGE_POINT = 1 +}; void GPENCIL_OT_stroke_arrange(struct wmOperatorType *ot); void GPENCIL_OT_stroke_change_color(struct wmOperatorType *ot); @@ -402,6 +406,7 @@ void GPENCIL_OT_stroke_simplify_fixed(struct wmOperatorType *ot); void GPENCIL_OT_stroke_separate(struct wmOperatorType *ot); void GPENCIL_OT_stroke_split(struct wmOperatorType *ot); void GPENCIL_OT_stroke_smooth(struct wmOperatorType *ot); +void GPENCIL_OT_stroke_merge(struct wmOperatorType *ot); void GPENCIL_OT_brush_presets_create(struct wmOperatorType *ot); diff --git a/source/blender/editors/gpencil/gpencil_merge.c b/source/blender/editors/gpencil/gpencil_merge.c new file mode 100644 index 000..eed34f6831b --- /dev/null +++ b/source/blender/editors/gpencil/gpencil_merge.c @@ -0,0 +1,577 @@ +/* + * * BEGIN GPL LICENSE BLOCK * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of
[Bf-blender-cvs] [5b9440278ee] master: Fix T59865: UV editor vertex snap to active does not make any sense.
Commit: 5b9440278ee9001645e4475436f6899c84d4ba1c Author: Sebastian Parborg Date: Thu Dec 27 18:39:39 2018 +0100 Branches: master https://developer.blender.org/rB5b9440278ee9001645e4475436f6899c84d4ba1c Fix T59865: UV editor vertex snap to active does not make any sense. Differential Revision: https://developer.blender.org/D4129 === M source/blender/editors/transform/transform_generics.c === diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index f1dc5525dbc..943dedabba2 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -2003,12 +2003,13 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3]) { TransDataContainer *tc = TRANS_DATA_CONTAINER_FIRST_OK(t); - bool ok = false; - - if (tc->obedit) { + if (t->spacetype != SPACE_VIEW3D) { + return false; + } + else if (tc->obedit) { if (ED_object_calc_active_center_for_editmode(tc->obedit, select_only, r_center)) { mul_m4_v3(tc->obedit->obmat, r_center); - ok = true; + return true; } } else if (t->flag & T_POSE) { @@ -2016,7 +2017,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3]) Object *ob = OBACT(view_layer) ; if (ED_object_calc_active_center_for_posemode(ob, select_only, r_center)) { mul_m4_v3(ob->obmat, r_center); - ok = true; + return true; } } else if (t->options & CTX_PAINT_CURVE) { @@ -2025,7 +2026,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3]) PaintCurve *pc = br->paint_curve; copy_v3_v3(r_center, pc->points[pc->add_index - 1].bez.vec[1]); r_center[2] = 0.0f; - ok = true; + return true; } else { /* object mode */ @@ -2034,11 +2035,11 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3]) Base *base = BASACT(view_layer); if (ob && ((!select_only) || ((base->flag & BASE_SELECTED) != 0))) { copy_v3_v3(r_center, ob->obmat[3]); - ok = true; + return true; } } - return ok; + return false; } static void calculateCenter_FromAround(TransInfo *t, int around, float r_center[3]) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3e5374bf1ec] master: Merge branch 'blender2.7'
Commit: 3e5374bf1ecda6515808e348a768ed7afa536505 Author: Sergey Sharybin Date: Thu Dec 27 19:13:27 2018 +0100 Branches: master https://developer.blender.org/rB3e5374bf1ecda6515808e348a768ed7afa536505 Merge branch 'blender2.7' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [826d7adde79] blender2.7: Fix T59874: Cycles CPU 25% load only during rendering
Commit: 826d7adde79216d271b78059c05abd10b7559899 Author: Sergey Sharybin Date: Thu Dec 27 19:01:19 2018 +0100 Branches: blender2.7 https://developer.blender.org/rB826d7adde79216d271b78059c05abd10b7559899 Fix T59874: Cycles CPU 25% load only during rendering The issue was introduced by a Threadripper2 commit back in ce927e15e0e3. This boils down to threads inheriting affinity from the parent thread. It is a question how this slipped through the review (we definitely run benchmark round). Quick fix could have been to always set CPU group affinity in Cycles, and it would work for Windows. On other platforms we did not have CPU groups API finished. Ended up making Cycles aware of NUMA topology, so now we bound threads to a specific NUMA node. This required adding an external dependency to Cycles, but made some code there shorter. === M intern/cycles/util/CMakeLists.txt M intern/cycles/util/util_system.cpp M intern/cycles/util/util_system.h M intern/cycles/util/util_task.cpp M intern/cycles/util/util_thread.cpp M intern/cycles/util/util_thread.h D intern/cycles/util/util_windows.cpp M intern/cycles/util/util_windows.h M intern/numaapi/include/numaapi.h M intern/numaapi/source/numaapi_linux.c === diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt index 92dfc9fa85d..42626d05cf9 100644 --- a/intern/cycles/util/CMakeLists.txt +++ b/intern/cycles/util/CMakeLists.txt @@ -25,13 +25,17 @@ set(SRC util_thread.cpp util_time.cpp util_transform.cpp - util_windows.cpp ) -if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI) - list(APPEND SRC - util_view.cpp - ) +if(WITH_CYCLES_STANDALONE) + if (WITH_CYCLES_STANDALONE_GUI) + list(APPEND SRC + util_view.cpp + ) + endif() + list(APPEND INC_SYS ../../third_party/numaapi/include) +else() + list(APPEND INC_SYS ../../numaapi/include) endif() set(SRC_HEADERS diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp index 34f428f111c..cc2d7017fd8 100644 --- a/intern/cycles/util/util_system.cpp +++ b/intern/cycles/util/util_system.cpp @@ -20,6 +20,8 @@ #include "util/util_types.h" #include "util/util_string.h" +#include + #ifdef _WIN32 # if(!defined(FREE_WINDOWS)) #include @@ -34,74 +36,81 @@ CCL_NAMESPACE_BEGIN -int system_cpu_group_count() +bool system_cpu_ensure_initialized() { -#ifdef _WIN32 - util_windows_init_numa_groups(); - return GetActiveProcessorGroupCount(); -#else - /* TODO(sergey): Need to adopt for other platforms. */ - return 1; -#endif + static bool is_initialized = false; + static bool result = false; + if (is_initialized) { + return result; + } + is_initialized = true; + const NUMAAPI_Result numa_result = numaAPI_Initialize(); + result = (numa_result == NUMAAPI_SUCCESS); + return result; } -int system_cpu_group_thread_count(int group) +/* Fallback solution, which doesn't use NUMA/CPU groups. */ +static int system_cpu_thread_count_fallback() { - /* TODO(sergey): Need make other platforms aware of groups. */ #ifdef _WIN32 - util_windows_init_numa_groups(); - return GetActiveProcessorCount(group); + SYSTEM_INFO info; + GetSystemInfo(&info); + return info.dwNumberOfProcessors; #elif defined(__APPLE__) - (void) group; int count; size_t len = sizeof(count); int mib[2] = { CTL_HW, HW_NCPU }; sysctl(mib, 2, &count, &len, NULL, 0); return count; #else - (void) group; return sysconf(_SC_NPROCESSORS_ONLN); #endif } int system_cpu_thread_count() { - static uint count = 0; - - if(count > 0) { - return count; + const int num_nodes = system_cpu_num_numa_nodes(); + int num_threads = 0; + for (int node = 0; node < num_nodes; ++node) { + if (!system_cpu_is_numa_node_available(node)) { + continue; + } + num_threads += system_cpu_num_numa_node_processors(node); } + return num_threads; +} - int max_group = system_cpu_group_count(); - VLOG(1) << "Detected " << max_group << " CPU groups."; - for(int group = 0; group < max_group; ++group) { - int num_threads = system_cpu_group_thread_count(group); - VLOG(1) << "Group " << group - << " has " << num_threads << " threads."; - count += num_threads; +int system_cpu_num_numa_nodes() +{ + if (!system_cpu_ensure_initialized()) { + /* Fallback to a single node with all the threads. */ + return 1; } +
[Bf-blender-cvs] [4a0063664ec] master: GP: Avoid Onion calculation when play animation
Commit: 4a0063664ec7217548182b7527839c1ac2e8fc23 Author: Antonioya Date: Thu Dec 27 22:01:46 2018 +0100 Branches: master https://developer.blender.org/rB4a0063664ec7217548182b7527839c1ac2e8fc23 GP: Avoid Onion calculation when play animation === M source/blender/draw/engines/gpencil/gpencil_draw_utils.c === diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 6c3577c2794..0dc3870b11a 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -74,8 +74,9 @@ static void gpencil_calc_vertex( Object *ob = cache_ob->ob; const DRWContextState *draw_ctx = DRW_context_state_get(); const bool main_onion = draw_ctx->v3d != NULL ? (draw_ctx->v3d->gp_flag & V3D_GP_SHOW_ONION_SKIN) : true; + const bool playing = stl->storage->is_playing; const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) && - main_onion && DRW_gpencil_onion_active(gpd); + main_onion && DRW_gpencil_onion_active(gpd) && !playing; const bool time_remap = BKE_gpencil_has_time_modifiers(ob); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b60e45164d1] greasepencil-object: GP: Remove unused variable
Commit: b60e45164d1eaaad0e1382ddb07a31ffc366434b Author: Antonioya Date: Thu Dec 27 22:22:06 2018 +0100 Branches: greasepencil-object https://developer.blender.org/rBb60e45164d1eaaad0e1382ddb07a31ffc366434b GP: Remove unused variable === M source/blender/editors/gpencil/gpencil_merge.c === diff --git a/source/blender/editors/gpencil/gpencil_merge.c b/source/blender/editors/gpencil/gpencil_merge.c index eed34f6831b..135acb049cb 100644 --- a/source/blender/editors/gpencil/gpencil_merge.c +++ b/source/blender/editors/gpencil/gpencil_merge.c @@ -63,7 +63,6 @@ typedef struct tGPencilPointCache { float factor; /* value to sort */ - float pos2d[2]; bGPDstroke *gps; float x, y, z; float pressure; @@ -289,7 +288,6 @@ static void gpencil_calc_points_factor( tGPencilPointCache *sort_pt = &original_array[i]; bGPDspoint *pt2 = &pt_array[i]; - copy_v2_v2(sort_pt->pos2d, v1); copy_v3_v3(&sort_pt->x, &pt2->x); sort_pt->pressure = pt2->pressure; sort_pt->strength = pt2->strength; @@ -333,7 +331,6 @@ static int gpencil_insert_to_array( dst_elem = &dst_array[last]; last++; - copy_v2_v2(dst_elem->pos2d, src_elem->pos2d); copy_v3_v3(&dst_elem->x, &src_elem->x); dst_elem->gps = src_elem->gps; dst_elem->pressure = src_elem->pressure; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [28e2e688d95] greasepencil-object: GP: More cleanup and renames
Commit: 28e2e688d95ea0d2c8be26ac921bdecb6d646cb0 Author: Antonioya Date: Thu Dec 27 22:29:36 2018 +0100 Branches: greasepencil-object https://developer.blender.org/rB28e2e688d95ea0d2c8be26ac921bdecb6d646cb0 GP: More cleanup and renames === M source/blender/editors/gpencil/gpencil_merge.c === diff --git a/source/blender/editors/gpencil/gpencil_merge.c b/source/blender/editors/gpencil/gpencil_merge.c index 135acb049cb..324b25bfa08 100644 --- a/source/blender/editors/gpencil/gpencil_merge.c +++ b/source/blender/editors/gpencil/gpencil_merge.c @@ -69,7 +69,7 @@ typedef struct tGPencilPointCache { float strength; } tGPencilPointCache; -/* helper function to sort strokes around center */ +/* helper function to sort points */ static int gpencil_sort_points(const void *a1, const void *a2) { const tGPencilPointCache *ps1 = a1, *ps2 = a2; @@ -211,7 +211,7 @@ static void gpencil_dissolve_points(bContext *C) static void gpencil_calc_points_factor( bContext *C, const int mode, int totpoints, const bool clear_point, const bool clear_stroke, - tGPencilPointCache *original_array) + tGPencilPointCache *src_array) { bGPDspoint *pt; int i; @@ -285,7 +285,7 @@ static void gpencil_calc_points_factor( else { angle = (M_PI * 2.0) - angle; } - tGPencilPointCache *sort_pt = &original_array[i]; + tGPencilPointCache *sort_pt = &src_array[i]; bGPDspoint *pt2 = &pt_array[i]; copy_v3_v3(&sort_pt->x, &pt2->x); @@ -343,7 +343,7 @@ static int gpencil_insert_to_array( /* get first and last point location */ static void gpencil_get_extremes( - tGPencilPointCache *original_array, int totpoints, + tGPencilPointCache *src_array, int totpoints, bGPDstroke *gps_filter, float *start, float *end) { tGPencilPointCache *array_pt = NULL; @@ -351,7 +351,7 @@ static void gpencil_get_extremes( /* find first point */ for (i = 0; i < totpoints; i++) { - array_pt = &original_array[i]; + array_pt = &src_array[i]; if (gps_filter == array_pt->gps) { copy_v3_v3(start, &array_pt->x); break; @@ -359,7 +359,7 @@ static void gpencil_get_extremes( } /* find last point */ for (i = totpoints - 1; i >= 0; i--) { - array_pt = &original_array[i]; + array_pt = &src_array[i]; if (gps_filter == array_pt->gps) { copy_v3_v3(end, &array_pt->x); break; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cd36f546114] master: Fix (unreported) broken Cycles tests after numaapi changes today.
Commit: cd36f546114fb3c2608f902487eab4a393245b9a Author: Bastien Montagne Date: Thu Dec 27 22:38:22 2018 +0100 Branches: master https://developer.blender.org/rBcd36f546114fb3c2608f902487eab4a393245b9a Fix (unreported) broken Cycles tests after numaapi changes today. Please always build tests when messing with build system/libs, am tired of fixing that kind of issues... Also, that fix is probably not working for standalone, no idea where's the numaapi lib then, but committing since I need a building blender here (with the tests, yes). === M intern/cycles/test/CMakeLists.txt === diff --git a/intern/cycles/test/CMakeLists.txt b/intern/cycles/test/CMakeLists.txt index 61605535e62..f22992ad79f 100644 --- a/intern/cycles/test/CMakeLists.txt +++ b/intern/cycles/test/CMakeLists.txt @@ -98,8 +98,8 @@ link_directories(${OPENIMAGEIO_LIBPATH} set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}") -CYCLES_TEST(render_graph_finalize "${ALL_CYCLES_LIBRARIES}") +CYCLES_TEST(render_graph_finalize "${ALL_CYCLES_LIBRARIES};bf_intern_numaapi") CYCLES_TEST(util_aligned_malloc "cycles_util") CYCLES_TEST(util_path "cycles_util;${BOOST_LIBRARIES};${OPENIMAGEIO_LIBRARIES}") CYCLES_TEST(util_string "cycles_util;${BOOST_LIBRARIES}") -CYCLES_TEST(util_task "cycles_util;${BOOST_LIBRARIES}") +CYCLES_TEST(util_task "cycles_util;${BOOST_LIBRARIES};bf_intern_numaapi") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [df3e7d0361c] master: Point API doc back to master one.
Commit: df3e7d0361c6e151bc306e1ef71e006e955d1d39 Author: Bastien Montagne Date: Thu Dec 27 22:57:55 2018 +0100 Branches: master https://developer.blender.org/rBdf3e7d0361c6e151bc306e1ef71e006e955d1d39 Point API doc back to master one. Now that 2.8 is master again... Still have to update 2.7 thingy there, now (and update API doc site accordingly, too). === M release/scripts/startup/bl_operators/wm.py === diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 81814f4ffcf..193d9e32870 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1026,7 +1026,7 @@ class WM_OT_doc_view(Operator): if bpy.app.version_cycle == "release": _prefix = ("https://docs.blender.org/api/current";) else: -_prefix = ("https://docs.blender.org/api/blender2.8";) +_prefix = ("https://docs.blender.org/api/master";) def execute(self, context): url = _wm_doc_get_id(self.doc_id, do_url=True, url_prefix=self._prefix) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [83dcdfd356f] blender2.7: API Doc: point to blender2.7 new folder.
Commit: 83dcdfd356fdb47a700f2763a9d0191d998f3586 Author: Bastien Montagne Date: Thu Dec 27 23:02:20 2018 +0100 Branches: blender2.7 https://developer.blender.org/rB83dcdfd356fdb47a700f2763a9d0191d998f3586 API Doc: point to blender2.7 new folder. master is now for 2.8. ;) === M release/scripts/startup/bl_operators/wm.py M source/blender/windowmanager/intern/wm_operators.c === diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index cc40ca2cb66..3fd4e45653f 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1041,7 +1041,7 @@ class WM_OT_doc_view(Operator): if bpy.app.version_cycle == "release": _prefix = ("https://docs.blender.org/api/current";) else: -_prefix = ("https://docs.blender.org/api/master";) +_prefix = ("https://docs.blender.org/api/blender2.7";) def execute(self, context): url = _wm_doc_get_id(self.doc_id, do_url=True, url_prefix=self._prefix) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index ddb9db37054..bc34f40aaa3 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1519,7 +1519,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar BLENDER_VERSION / 100, BLENDER_VERSION % 100); } else { - BLI_snprintf(url, sizeof(url), "https://docs.blender.org/api/master";); + BLI_snprintf(url, sizeof(url), "https://docs.blender.org/api/blender2.7";); } uiItemStringO(col, IFACE_("Python API Reference"), ICON_URL, "WM_OT_url_open", "url", url); uiItemL(col, "", ICON_NONE); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [111179beb0b] blender2.7: Fix (unreported) broken Cycles tests after numaapi changes today.
Commit: 79beb0b12cfcc7075935262241c65f04fb84 Author: Bastien Montagne Date: Thu Dec 27 22:38:22 2018 +0100 Branches: blender2.7 https://developer.blender.org/rB79beb0b12cfcc7075935262241c65f04fb84 Fix (unreported) broken Cycles tests after numaapi changes today. Please always build tests when messing with build system/libs, am tired of fixing that kind of issues... Also, that fix is probably not working for standalone, no idea where's the numaapi lib then, but committing since I need a building blender here (with the tests, yes). === M intern/cycles/test/CMakeLists.txt === diff --git a/intern/cycles/test/CMakeLists.txt b/intern/cycles/test/CMakeLists.txt index 61605535e62..f22992ad79f 100644 --- a/intern/cycles/test/CMakeLists.txt +++ b/intern/cycles/test/CMakeLists.txt @@ -98,8 +98,8 @@ link_directories(${OPENIMAGEIO_LIBPATH} set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}") -CYCLES_TEST(render_graph_finalize "${ALL_CYCLES_LIBRARIES}") +CYCLES_TEST(render_graph_finalize "${ALL_CYCLES_LIBRARIES};bf_intern_numaapi") CYCLES_TEST(util_aligned_malloc "cycles_util") CYCLES_TEST(util_path "cycles_util;${BOOST_LIBRARIES};${OPENIMAGEIO_LIBRARIES}") CYCLES_TEST(util_string "cycles_util;${BOOST_LIBRARIES}") -CYCLES_TEST(util_task "cycles_util;${BOOST_LIBRARIES}") +CYCLES_TEST(util_task "cycles_util;${BOOST_LIBRARIES};bf_intern_numaapi") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0661bcba321] master: Merge branch 'blender2.7'
Commit: 0661bcba3210be9714b1943935ba4cb7e6e04eec Author: Bastien Montagne Date: Thu Dec 27 23:33:42 2018 +0100 Branches: master https://developer.blender.org/rB0661bcba3210be9714b1943935ba4cb7e6e04eec Merge branch 'blender2.7' Conflicts: source/blender/windowmanager/intern/wm_operators.c === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [be0628b7434] soc-2018-npr: Merge branch 'master' into soc-2018-npr
Commit: be0628b743462b7606109dccec2e1d93e51dba0d Author: Yiming Wu Date: Fri Dec 28 10:59:36 2018 +0800 Branches: soc-2018-npr https://developer.blender.org/rBbe0628b743462b7606109dccec2e1d93e51dba0d Merge branch 'master' 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] [61d3c1261c5] soc-2018-npr: Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
Commit: 61d3c1261c5d9e40c41ae540b83952e411670fe8 Author: Nick Wu Date: Sun Dec 23 19:09:42 2018 +0800 Branches: soc-2018-npr https://developer.blender.org/rB61d3c1261c5d9e40c41ae540b83952e411670fe8 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] [644cd00d1a6] soc-2018-npr: Merge branch 'blender2.8' of git://git.blender.org/blender
Commit: 644cd00d1a647eb1e55263722997544a1a2cc91e Author: Nick Wu Date: Mon Apr 30 08:58:47 2018 +0800 Branches: soc-2018-npr https://developer.blender.org/rB644cd00d1a647eb1e55263722997544a1a2cc91e Merge branch 'blender2.8' of git://git.blender.org/blender === === diff --cc source/blender/editors/interface/interface_draw.c index 7583dc654bb,97491d365b7..11cbc448713 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@@ -825,13 -1108,13 +1108,13 @@@ static float polar_to_y(float center, f return center + diam * ampli * sinf(angle); } - static void vectorscope_draw_target(float centerx, float centery, float diam, const float colf[3]) + static void vectorscope_draw_target(unsigned int pos, float centerx, float centery, float diam, const float colf[3]) { float y, u, v; - float tangle = 0.f, tampli; + float tangle = 0.0f, tampli; float dangle, dampli, dangle2, dampli2; - rgb_to_yuv(colf[0], colf[1], colf[2], &y, &u, &v); + rgb_to_yuv(colf[0], colf[1], colf[2], &y, &u, &v, BLI_YUV_ITU_BT709); if (u > 0 && v >= 0) tangle = atanf(v / u); else if (u > 0 && v < 0) tangle = atanf(v / u) + 2.0f * (float)M_PI; else if (u < 0) tangle = atanf(v / u) + (float)M_PI; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [90875f7d94a] soc-2018-npr: Merge remote-tracking branch 'origin/blender2.8' into soc-2018-npr
Commit: 90875f7d94ac477a4b7a0c5a22f06012b917c348 Author: Yiming Wu Date: Tue Dec 18 11:56:01 2018 +0800 Branches: soc-2018-npr https://developer.blender.org/rB90875f7d94ac477a4b7a0c5a22f06012b917c348 Merge remote-tracking branch 'origin/blender2.8' into soc-2018-npr # Conflicts: # source/blender/makesdna/DNA_lamp_types.h # source/blender/makesdna/DNA_scene_types.h === === diff --cc release/scripts/startup/bl_ui/space_view3d.py index c8d48dc0388,bfba36f255b..dd7a628357e --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@@ -3003,10 -3119,9 +3119,10 @@@ class VIEW3D_MT_edit_mesh_edges_data(Me props.use_verts = True props.clear = True - if with_freestyle: + if render.use_freestyle: layout.separator() +#if with_freestyle: we still presere freestyle mark functions. layout.operator("mesh.mark_freestyle_edge").clear = False layout.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True diff --cc source/blender/makesdna/DNA_lamp_types.h index 5a551f602a2,ba1fbf254c7..1baddad5a6e --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@@ -98,21 -98,21 +98,21 @@@ typedef struct Lamp /* LAMP * */ /* flag */ - #define LA_DS_EXPAND1 - /* NOTE: this must have the same value as MA_DS_SHOW_TEXS, - * otherwise anim-editors will not read correctly - */ - #define LA_DS_SHOW_TEXS 4 + #define LA_DS_EXPAND(1 << 0) + /* NOTE: this must have the same value as MA_DS_SHOW_TEXS, +* otherwise anim-editors will not read correctly +*/ + #define LA_DS_SHOW_TEXS (1 << 2) /* type */ -#define LA_LOCAL 0 -#define LA_SUN1 -#define LA_SPOT 2 +#define LA_LOCAL0 +#define LA_SUN 1 +#define LA_SPOT 2 /* #define LA_HEMI3 */ /* not used anymore */ -#define LA_AREA 4 +#define LA_AREA 4 /* mode */ -#define LA_SHADOW (1 << 0) +#define LA_SHADOW (1 << 0) /* #define LA_HALO(1 << 1) */ /* not used anymore */ /* #define LA_LAYER (1 << 2) */ /* not used anymore */ /* #define LA_QUAD(1 << 3) */ /* not used anymore */ diff --cc source/blender/makesdna/DNA_scene_types.h index 5c7ea131df9,8be63add398..5843e5753af --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@@ -1679,48 -1620,44 +1685,44 @@@ typedef struct Scene /* RENDERDATA * */ /* RenderData.flag */ - /* use preview range */ -#define SCER_PRV_RANGE(1<<0) -#define SCER_LOCK_FRAME_SELECTION (1<<1) - /* show/use subframes (for checking motion blur) */ -#define SCER_SHOW_SUBFRAME(1<<3) +/* use preview range */ +#define SCER_PRV_RANGE (1 << 0) +#define SCER_LOCK_FRAME_SELECTION (1 << 1) +/* show/use subframes (for checking motion blur) */ +#define SCER_SHOW_SUBFRAME (1 << 3) /* RenderData.mode */ - #define R_OSA 0x0001 - /* #define R_SHADOW 0x0002 */ - /* #define R_GAMMA0x0004 */ - /* #define R_ORTHO0x0008 */ - /* #define R_ENVMAP 0x0010 */ - /* #define R_EDGE 0x0020 */ - /* #define R_FIELDS 0x0040 */ - /*#define R_FIELDSTILL0x0080 */ - /*#define R_RADIO 0x0100 */ /* deprecated */ - #define R_BORDER 0x0200 - #define R_PANORAMA0x0400 /* deprecated */ - #define R_CROP 0x0800 + #define R_OSA (1 << 0) + #define R_MODE_DEPRECATED_1 (1 << 1) /* cleared */ + #define R_MODE_DEPRECATED_2 (1 << 2) /* cleared */ + #define R_MODE_DEPRECATED_3 (1 << 3) /* cleared */ + #define R_MODE_DEPRECATED_4 (1 << 4) /* cleared */ + #define R_MODE_DEPRECATED_5 (1 << 5) /* cleared */ + #define R_MODE_DEPRECATED_6 (1 << 6) /* cleared */ + #define R_MODE_DEPRECATED_7 (1 << 7) /* cleared */ + #define R_MODE_DEPRECATED_8 (1 << 8) /* cleared */ + #define R_BORDER(1 << 9) + #define R_MODE_DEPRECATED_10(1 << 10) /* cleared */ + #define R_CROP (1 << 11) /* Disable camera switching: runtime (DURIAN_CAMERA_SWITCH) */ - #define R_NO_CAMERA_SWITCH 0x1000 - /* #define R_ODDFIELD 0x2000 */ - #define R_MBLUR 0x4000 - /* unified was here */ - /* #define R_RAYTRACE 0x1 */ - /* R_GAUSS is obsolete, but used to retrieve setting from old files */ - /* #define R_GAUSS 0x2 */ - /* fbuf obsolete... */ - /*#define R_FBUF 0x4*/ - /* threads obsolete... is there for old files, now use for autode
[Bf-blender-cvs] [fdc726eb61d] master: GP: Rename GP_STROKE_RECALC_CACHE to GP_STROKE_RECALC_GEOMETRY
Commit: fdc726eb61d15a51d8deddcb6b7b79859ea9950e Author: Antonioya Date: Fri Dec 28 08:48:37 2018 +0100 Branches: master https://developer.blender.org/rBfdc726eb61d15a51d8deddcb6b7b79859ea9950e GP: Rename GP_STROKE_RECALC_CACHE to GP_STROKE_RECALC_GEOMETRY The GP_STROKE_RECALC_CACHE identifier was changed to GP_STROKE_RECALC_GEOMETRY because the previous name was confusing and could be confused with the recalculation of the Draw Manager cache. === M source/blender/blenkernel/intern/gpencil.c M source/blender/blenkernel/intern/gpencil_modifier.c M source/blender/blenloader/intern/readfile.c M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c M source/blender/draw/engines/gpencil/gpencil_draw_utils.c M source/blender/editors/gpencil/annotate_paint.c M source/blender/editors/gpencil/drawgpencil.c M source/blender/editors/gpencil/gpencil_brush.c M source/blender/editors/gpencil/gpencil_edit.c M source/blender/editors/gpencil/gpencil_fill.c M source/blender/editors/gpencil/gpencil_interpolate.c M source/blender/editors/gpencil/gpencil_paint.c M source/blender/editors/gpencil/gpencil_primitive.c M source/blender/editors/gpencil/gpencil_utils.c M source/blender/editors/transform/transform_generics.c M source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c M source/blender/makesdna/DNA_gpencil_types.h M source/blender/makesrna/intern/rna_gpencil.c === diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index f8dfa82e2a2..d347e10921c 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -476,14 +476,14 @@ bGPDstroke *BKE_gpencil_add_stroke(bGPDframe *gpf, int mat_idx, int totpoints, s gps->inittime = 0; /* enable recalculation flag by default */ - gps->flag = GP_STROKE_RECALC_CACHES | GP_STROKE_3DSPACE; + gps->flag = GP_STROKE_RECALC_GEOMETRY | GP_STROKE_3DSPACE; gps->totpoints = totpoints; gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points"); /* initialize triangle memory to dummy data */ gps->triangles = MEM_callocN(sizeof(bGPDtriangle), "GP Stroke triangulation"); - gps->flag |= GP_STROKE_RECALC_CACHES; + gps->flag |= GP_STROKE_RECALC_GEOMETRY; gps->tot_triangles = 0; gps->mat_nr = mat_idx; @@ -532,7 +532,7 @@ bGPDstroke *BKE_gpencil_stroke_duplicate(bGPDstroke *gps_src) * this data to get recalculated will destroy the data anyway though. */ gps_dst->triangles = MEM_dupallocN(gps_dst->triangles); - /* gps_dst->flag |= GP_STROKE_RECALC_CACHES; */ + /* gps_dst->flag |= GP_STROKE_RECALC_GEOMETRY; */ /* return new stroke */ return gps_dst; @@ -1179,7 +1179,7 @@ void BKE_gpencil_transform(bGPdata *gpd, float mat[4][4]) } /* TODO: Do we need to do this? distortion may mean we need to re-triangulate */ - gps->flag |= GP_STROKE_RECALC_CACHES; + gps->flag |= GP_STROKE_RECALC_GEOMETRY; gps->tot_triangles = 0; } } diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index 534166bf629..6bb47b4685e 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -227,7 +227,7 @@ static void gpencil_rdp_stroke(bGPDstroke *gps, vec2f *points2d, float epsilon) old_dvert = MEM_dupallocN(gps->dvert); } /* resize gps */ - gps->flag |= GP_STROKE_RECALC_CACHES; + gps->flag |= GP_STROKE_RECALC_GEOMETRY; gps->tot_triangles = 0; int j = 0; @@ -302,7 +302,7 @@ void BKE_gpencil_simplify_fixed(bGPDstroke *gps) if (gps->dvert != NULL) { gps->dvert = MEM_recallocN(gps->dvert, sizeof(*gps->dvert) * newtot); } - gps->flag |= GP_STROKE_RECALC_CACHES; + gps->flag |= GP_STROKE_RECALC_GEOMETRY; gps->tot_triangles = 0; int j = 0; @@ -443,7 +443,7 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g eGpencilModifierType_Offset)) { - gps->flag |= GP_STROKE_RECALC_CACHES; + gps->flag |= GP_STROKE_RECALC_GEOMETRY; } } } @@ -743,7 +743,7 @@ void BKE_gpencil_su