[Bf-blender-cvs] [d8a3f3595af] master: Task: Use TBB as Task Scheduler

2020-04-29 Thread Brecht Van Lommel
Commit: d8a3f3595af0fb3ca5937e41c2728fd750d986ef
Author: Brecht Van Lommel
Date:   Thu Apr 30 07:59:23 2020 +0200
Branches: master
https://developer.blender.org/rBd8a3f3595af0fb3ca5937e41c2728fd750d986ef

Task: Use TBB as Task Scheduler

This patch enables TBB as the default task scheduler. TBB stands for Threading 
Building Blocks and is developed by Intel. The library contains several 
threading patters. This patch maps blenders BLI_task_* function to their 
counterpart. After this patch we can add more patterns. A promising one is 
TBB:graph that can be used for depsgraph, draw manager and compositor.

Performance changes depends on the actual hardware. It was tested on different 
hardwares from laptops to workstations and we didn't detected any downgrade of 
the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 
04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 
FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.

Reviewed By: brecht, sergey

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

===

M   build_files/cmake/Modules/GTestTesting.cmake
M   source/blender/blenkernel/BKE_pbvh.h
M   source/blender/blenkernel/CMakeLists.txt
M   source/blender/blenkernel/intern/editmesh_tangent.c
M   source/blender/blenkernel/intern/mesh_evaluate.c
M   source/blender/blenkernel/intern/mesh_tangent.c
M   source/blender/blenkernel/intern/ocean.c
M   source/blender/blenkernel/intern/particle.c
M   source/blender/blenkernel/intern/particle_distribute.c
M   source/blender/blenkernel/intern/pbvh.c
M   source/blender/blenlib/BLI_task.h
M   source/blender/blenlib/BLI_threads.h
M   source/blender/blenlib/CMakeLists.txt
M   source/blender/blenlib/intern/task_iterator.c
M   source/blender/blenlib/intern/task_pool.cc
R058source/blender/blenkernel/intern/pbvh_parallel.cc   
source/blender/blenlib/intern/task_range.cc
A   source/blender/blenlib/intern/task_scheduler.cc
M   source/blender/blenlib/intern/threads.c
M   source/blender/depsgraph/intern/eval/deg_eval.cc
M   source/blender/draw/intern/draw_cache_extract_mesh.c
M   source/blender/editors/mesh/editmesh_undo.c
M   source/blender/editors/physics/particle_edit.c
M   source/blender/editors/render/render_opengl.c
M   source/blender/editors/sculpt_paint/paint_cursor.c
M   source/blender/editors/sculpt_paint/paint_image_proj.c
M   source/blender/editors/sculpt_paint/paint_mask.c
M   source/blender/editors/sculpt_paint/paint_vertex.c
M   source/blender/editors/sculpt_paint/sculpt.c
M   source/blender/editors/sculpt_paint/sculpt_cloth.c
M   source/blender/editors/sculpt_paint/sculpt_face_set.c
M   source/blender/editors/sculpt_paint/sculpt_filter_mask.c
M   source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
M   source/blender/editors/sculpt_paint/sculpt_mask_expand.c
M   source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
M   source/blender/editors/sculpt_paint/sculpt_pose.c
M   source/blender/editors/sculpt_paint/sculpt_smooth.c
M   source/blender/editors/sculpt_paint/sculpt_transform.c
M   source/blender/editors/sculpt_paint/sculpt_undo.c
M   source/blender/editors/space_clip/clip_editor.c
M   source/blender/editors/space_clip/clip_ops.c
M   source/blender/editors/space_file/filelist.c
M   source/blender/imbuf/intern/imageprocess.c
M   source/blender/windowmanager/intern/wm_init_exit.c
M   source/creator/creator.c
M   tests/gtests/blenlib/BLI_linklist_lockfree_test.cc
M   tests/gtests/blenlib/BLI_task_test.cc

===

diff --git a/build_files/cmake/Modules/GTestTesting.cmake 
b/build_files/cmake/Modules/GTestTesting.cmake
index 04e1670aef6..c36b264a300 100644
--- a/build_files/cmake/Modules/GTestTesting.cmake
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -66,6 +66,9 @@ macro(BLENDER_SRC_GTEST_EX)
 if(UNIX AND NOT APPLE)
   target_link_libraries(${TARGET_NAME} bf_intern_libc_compat)
 endif()
+if(WITH_TBB)
+  target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
+endif()
 
 get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY 
GENERATOR_IS_MULTI_CONFIG)
 if(GENERATOR_IS_MULTI_CONFIG)
diff --git a/source/blender/blenkernel/BKE_pbvh.h 
b/source/blender/blenkernel/BKE_pbvh.h
index 94f0e544a6b..6b0861769c3 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -49,6 +49,7 @@ struct PBVH;
 struct PBVHNode;
 struct SubdivCCG;
 struct TaskParallelTLS;
+struct TaskParallelSettings;
 
 typedef struct PBVH PBVH;
 typedef struct PBVHNode PBVHNode;
@@ -456,30 +457,10 @@ bool pbvh_has_face_sets(PBVH *bvh);
 void pbvh_show_face_sets_set(PBVH *bvh, bool show_face_sets);
 
 /* Parallelization */
-t

[Bf-blender-cvs] [a18ad3c3b61] master: CMake: use system include for generated headers

2020-04-29 Thread Campbell Barton
Commit: a18ad3c3b6198964ab7134302afda1afc89da5f4
Author: Campbell Barton
Date:   Thu Apr 30 16:01:41 2020 +1000
Branches: master
https://developer.blender.org/rBa18ad3c3b6198964ab7134302afda1afc89da5f4

CMake: use system include for generated headers

===

M   intern/ghost/CMakeLists.txt

===

diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 601f7f58d7f..3ba6c5d48c7 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -293,7 +293,9 @@ elseif(WITH_X11 OR WITH_GHOST_WAYLAND)
   )
 endmacro()
 
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
+list(APPEND INC_SYS
+  ${CMAKE_CURRENT_BINARY_DIR}
+)
 
 # xdg-shell.
 generate_protocol_bindings(

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


[Bf-blender-cvs] [66e70fe299e] master: GHOST: initial Wayland support

2020-04-29 Thread Christian Rauch
Commit: 66e70fe299e15124d9250a6a24e591cbb733713a
Author: Christian Rauch
Date:   Thu Apr 30 13:46:42 2020 +1000
Branches: master
https://developer.blender.org/rB66e70fe299e15124d9250a6a24e591cbb733713a

GHOST: initial Wayland support

Usable with the CMake option 'WITH_GHOST_WAYLAND'

The following functionality is working:

- Building with X11 and Wayland at the same time,
  wayland is used when available.
- Keyboard, pointer handling.
- Cursor handling.
- Dedicated off-screen windows.
- Drag & drop.
- Copy & paste.
- Pointer grabbing.

See D6567 for further details.

===

M   CMakeLists.txt
M   build_files/cmake/macros.cmake
M   build_files/cmake/platform/platform_unix.cmake
M   intern/ghost/CMakeLists.txt
M   intern/ghost/intern/GHOST_ISystem.cpp
A   intern/ghost/intern/GHOST_SystemWayland.cpp
A   intern/ghost/intern/GHOST_SystemWayland.h
A   intern/ghost/intern/GHOST_WindowWayland.cpp
A   intern/ghost/intern/GHOST_WindowWayland.h

===

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f0ff3d1427..1201ddda333 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,6 +207,10 @@ mark_as_advanced(WITH_GHOST_DEBUG)
 option(WITH_GHOST_SDL"Enable building Blender against SDL for windowing 
rather than the native APIs" OFF)
 mark_as_advanced(WITH_GHOST_SDL)
 
+if(UNIX AND NOT APPLE)
+  option(WITH_GHOST_WAYLAND   "Enable building Blender against Wayland for 
windowing" OFF)
+endif()
+
 if(WITH_X11)
   option(WITH_GHOST_XDND"Enable drag'n'drop support on X11 using XDND 
protocol" ON)
 endif()
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 6287da55580..d99e46ce76e 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -440,6 +440,14 @@ function(SETUP_LIBDIRS)
   link_directories(${HDF5_LIBPATH})
 endif()
 
+if(WITH_GHOST_WAYLAND)
+  link_directories(
+${wayland-client_LIBRARY_DIRS}
+${wayland-egl_LIBRARY_DIRS}
+${xkbcommon_LIBRARY_DIRS}
+${wayland-cursor_LIBRARY_DIRS})
+endif()
+
 if(WIN32 AND NOT UNIX)
   link_directories(${PTHREADS_LIBPATH})
 endif()
diff --git a/build_files/cmake/platform/platform_unix.cmake 
b/build_files/cmake/platform/platform_unix.cmake
index 8a89ce40432..0bd33b93dcf 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -504,6 +504,26 @@ if(WITH_SYSTEM_AUDASPACE)
   endif()
 endif()
 
+if(WITH_GHOST_WAYLAND)
+  find_package(PkgConfig)
+  pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12)
+  pkg_check_modules(wayland-egl REQUIRED wayland-egl)
+  pkg_check_modules(wayland-scanner REQUIRED wayland-scanner)
+  pkg_check_modules(xkbcommon REQUIRED xkbcommon)
+  pkg_check_modules(wayland-cursor REQUIRED wayland-cursor)
+
+  set(WITH_GL_EGL ON)
+
+  if(WITH_GHOST_WAYLAND)
+list(APPEND PLATFORM_LINKLIBS
+  ${wayland-client_LIBRARIES}
+  ${wayland-egl_LIBRARIES}
+  ${xkbcommon_LIBRARIES}
+  ${wayland-cursor_LIBRARIES}
+)
+  endif()
+endif()
+
 if(WITH_X11)
   find_package(X11 REQUIRED)
 
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index cb795bbbc51..601f7f58d7f 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -177,73 +177,141 @@ elseif(APPLE AND NOT WITH_X11)
 )
   endif()
 
-elseif(WITH_X11)
-  list(APPEND INC_SYS
-${X11_X11_INCLUDE_PATH}
-  )
-
-  list(APPEND SRC
-intern/GHOST_DisplayManagerX11.cpp
-intern/GHOST_SystemX11.cpp
-intern/GHOST_TaskbarX11.cpp
-intern/GHOST_WindowX11.cpp
-
-intern/GHOST_DisplayManagerX11.h
-intern/GHOST_IconX11.h
-intern/GHOST_SystemX11.h
-intern/GHOST_TaskbarX11.h
-intern/GHOST_WindowX11.h
-  )
+elseif(WITH_X11 OR WITH_GHOST_WAYLAND)
+  if(WITH_X11)
+list(APPEND INC_SYS
+  ${X11_X11_INCLUDE_PATH}
+)
 
-  if(NOT WITH_GL_EGL)
 list(APPEND SRC
-  intern/GHOST_ContextGLX.cpp
-
-  intern/GHOST_ContextGLX.h
+  intern/GHOST_DisplayManagerX11.cpp
+  intern/GHOST_SystemX11.cpp
+  intern/GHOST_TaskbarX11.cpp
+  intern/GHOST_WindowX11.cpp
+
+  intern/GHOST_DisplayManagerX11.h
+  intern/GHOST_IconX11.h
+  intern/GHOST_SystemX11.h
+  intern/GHOST_TaskbarX11.h
+  intern/GHOST_WindowX11.h
 )
-  endif()
 
-  if(WITH_GHOST_XDND)
-add_definitions(-DWITH_XDND)
+if(NOT WITH_GL_EGL)
+  list(APPEND SRC
+intern/GHOST_ContextGLX.cpp
 
-list(APPEND LIB
-  extern_xdnd
-)
+intern/GHOST_ContextGLX.h
+  )
+endif()
 
-list(APPEND INC
-  ../../extern/xdnd
-)
+if(WITH_GHOST_XDND)
+  add_definitions(-DWITH_XDND)
 
-list(APPEND SRC
-  intern/GHOST_DropTargetX11.cpp
+  list(APPEND LIB
+extern_xdnd
+  )
 
-  intern/GHOST_DropTargetX11.h
-)
+  l

[Bf-blender-cvs] [8ddef923bc1] particle-solver-dev: More experiments

2020-04-29 Thread Sebastian Parborg
Commit: 8ddef923bc1bab5d44249f0638d8432cfa8a33e9
Author: Sebastian Parborg
Date:   Thu Apr 30 04:24:07 2020 +0200
Branches: particle-solver-dev
https://developer.blender.org/rB8ddef923bc1bab5d44249f0638d8432cfa8a33e9

More experiments

===

M   source/blender/simulations/bparticles/simulate.cpp

===

diff --git a/source/blender/simulations/bparticles/simulate.cpp 
b/source/blender/simulations/bparticles/simulate.cpp
index 75c65841ec4..79482a003ab 100644
--- a/source/blender/simulations/bparticles/simulate.cpp
+++ b/source/blender/simulations/bparticles/simulate.cpp
@@ -342,20 +342,30 @@ BLI_NOINLINE static void 
simulate_particle_chunk(SimulationState &UNUSED(simulat
   //
   // dot normal from vt with hit.co - start to see which way to 
deflect the particle
   float3 normal = best_hit.no;
-  float normal_dot = dot_v3v3(velocities[pindex] - best_hit_vel, 
normal);
+  float3 n_v = dot_v3v3(velocities[pindex], normal) * normal;
+  n_v = n_v.normalized();
+  float normal_dot = dot_v3v3(velocities[pindex] - best_hit_vel, n_v);
 
-  if (normal_dot > 0.0f) {
-normal_dot *= -1.0f;
-  }
+  // if (normal_dot > 0.0f) {
+  //  normal_dot *= -1.0f;
+  //}
   // if (normal_dot < 0.0f) {
   // The particle was moving into the collission plane
   // print_v3("normal", normal);
   // printf("normal dir %f\n", normal_dot);
+  // print_v3("n_v", n_v);
   // print_v3("vel hit", best_hit_vel);
   // print_v3("vel_pre", velocities[pindex]);
-  float3 deflect_vel = velocities[pindex] - best_hit_vel - 2 * 
normal_dot * normal;
+  float3 deflect_vel = velocities[pindex] - best_hit_vel - 2.0f * 
normal_dot * n_v;
   // print_v3("deflect_vel", deflect_vel);
-  velocities[pindex] = deflect_vel + best_hit_vel;
+  // float temp = (1.0f + dot_v3v3(deflect_vel, best_hit_vel)) / 2.0f;
+  // printf("temp %f\n", temp);
+  float3 temp;
+  zero_v3(temp);
+  if (dot_v3v3(velocities[pindex], best_hit_vel) <= 0.0f) {
+temp = float3::project(best_hit_vel, normal);
+  }
+  velocities[pindex] = deflect_vel + best_hit_vel - temp;
   // print_v3("vel_post", velocities[pindex]);
   //}

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


[Bf-blender-cvs] [6d493351371] modifier-panels-ui: Array: Avoid redundant label

2020-04-29 Thread Hans Goudey
Commit: 6d493351371c8a8fa7e2a91701a026bcdd0aaffb
Author: Hans Goudey
Date:   Wed Apr 29 16:03:16 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB6d493351371c8a8fa7e2a91701a026bcdd0aaffb

Array: Avoid redundant label

===

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

===

diff --git a/source/blender/modifiers/intern/MOD_array.c 
b/source/blender/modifiers/intern/MOD_array.c
index fd84c47cec3..42d471e5f86 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -942,7 +942,7 @@ static void object_offset_draw(const bContext *C, Panel 
*panel)
   uiLayout *col = uiLayoutColumn(layout, false);
 
   uiLayoutSetActive(col, RNA_boolean_get(&ptr, "use_object_offset"));
-  uiItemR(col, &ptr, "offset_object", 0, NULL, ICON_NONE);
+  uiItemR(col, &ptr, "offset_object", 0, IFACE_("Object"), ICON_NONE);
 }
 
 static void symmetry_panel_header_draw(const bContext *C, Panel *panel)

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


[Bf-blender-cvs] [00e0034b13e] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Bastien Montagne
Commit: 00e0034b13e6a8d88fbdb1a6b2b86d99a9b5a69b
Author: Bastien Montagne
Date:   Wed Apr 29 21:38:18 2020 +0200
Branches: master
https://developer.blender.org/rB00e0034b13e6a8d88fbdb1a6b2b86d99a9b5a69b

Merge branch 'blender-v2.83-release'

===



===



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


[Bf-blender-cvs] [cd833d88799] blender-v2.83-release: Readfile: debug check all IDs are properly linked at the end.

2020-04-29 Thread Bastien Montagne
Commit: cd833d887995d210b5998bd7d17c59cbb8fe0cba
Author: Bastien Montagne
Date:   Wed Apr 29 21:35:13 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBcd833d887995d210b5998bd7d17c59cbb8fe0cba

Readfile: debug check all IDs are properly linked at the end.

Should prevent issue fixed by previous commit to happen again (since
read code, especially in undo case, is not really straight forward to
follow anymore).

===

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

===

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 98e6369b634..cb567147224 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10137,6 +10137,15 @@ static void lib_link_all(FileData *fd, Main *bmain)
  * 'permanently' in our data structures... */
 BKE_main_collections_parent_relations_rebuild(bmain);
   }
+
+#ifndef NDEBUG
+  /* Double check we do not have any 'need link' tag remaining, this should 
never be the case once
+   * this function has run. */
+  FOREACH_MAIN_ID_BEGIN (bmain, id) {
+BLI_assert((id->tag & LIB_TAG_NEED_LINK) == 0);
+  }
+  FOREACH_MAIN_ID_END;
+#endif
 }
 
 /** \} */

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


[Bf-blender-cvs] [a54c1f1e771] blender-v2.83-release: Fix T76155: 'Object lost data' on copy-pasting with new undo code.

2020-04-29 Thread Bastien Montagne
Commit: a54c1f1e77147352dfab1233ef63307e87e9f09c
Author: Bastien Montagne
Date:   Wed Apr 29 18:11:33 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBa54c1f1e77147352dfab1233ef63307e87e9f09c

Fix T76155: 'Object lost data' on copy-pasting with new undo code.

===

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

===

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 8837dccb837..98e6369b634 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9659,7 +9659,9 @@ static bool read_libblock_undo_restore(
 /* Do not add LIB_TAG_NEW here, this should not be needed/used in undo 
case anyway (as
  * this is only for do_version-like code), but for sake of consistency, 
and also because
  * it will tell us which ID is re-used from old Main, and which one is 
actually new. */
-const int id_tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_UNDO_OLD_ID_REUSED;
+/* Also do not add LIB_TAG_NEED_LINK, those IDs will never be 
re-liblinked, hence that tag will
+ * never be cleared, leading to critical issue in link/appemd code. */
+const int id_tag = tag | LIB_TAG_UNDO_OLD_ID_REUSED;
 read_libblock_undo_restore_identical(fd, main, id, id_old, id_tag);
 
 /* Insert into library map for lookup by newly read datablocks (with 
pointer value bhead->old).

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


[Bf-blender-cvs] [391b4dfd371] modifier-panels-ui: ShaderFX UI Panels

2020-04-29 Thread Hans Goudey
Commit: 391b4dfd3711cad330c9fd54e73b7b64fbb8fdf4
Author: Hans Goudey
Date:   Wed Apr 29 14:35:29 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB391b4dfd3711cad330c9fd54e73b7b64fbb8fdf4

ShaderFX UI Panels

===

M   release/scripts/startup/bl_ui/properties_data_shaderfx.py
M   source/blender/blenkernel/BKE_shader_fx.h
M   source/blender/blenkernel/intern/shader_fx.c
M   source/blender/editors/include/ED_object.h
M   source/blender/editors/include/UI_interface.h
M   source/blender/editors/interface/interface_templates.c
M   source/blender/editors/object/object_intern.h
M   source/blender/editors/object/object_ops.c
M   source/blender/editors/object/object_shader_fx.c
M   source/blender/editors/space_buttons/space_buttons.c
M   source/blender/makesdna/DNA_shader_fx_types.h
M   source/blender/makesrna/intern/rna_shader_fx.c
M   source/blender/makesrna/intern/rna_ui_api.c
M   source/blender/shader_fx/CMakeLists.txt
M   source/blender/shader_fx/intern/FX_shader_blur.c
M   source/blender/shader_fx/intern/FX_shader_colorize.c
M   source/blender/shader_fx/intern/FX_shader_flip.c
M   source/blender/shader_fx/intern/FX_shader_glow.c
M   source/blender/shader_fx/intern/FX_shader_light.c
M   source/blender/shader_fx/intern/FX_shader_pixel.c
M   source/blender/shader_fx/intern/FX_shader_rim.c
M   source/blender/shader_fx/intern/FX_shader_shadow.c
M   source/blender/shader_fx/intern/FX_shader_swirl.c
M   source/blender/shader_fx/intern/FX_shader_wave.c
A   source/blender/shader_fx/intern/FX_ui_common.c
A   source/blender/shader_fx/intern/FX_ui_common.h

===

diff --git a/release/scripts/startup/bl_ui/properties_data_shaderfx.py 
b/release/scripts/startup/bl_ui/properties_data_shaderfx.py
index 1d4bf37b282..fba5f143494 100644
--- a/release/scripts/startup/bl_ui/properties_data_shaderfx.py
+++ b/release/scripts/startup/bl_ui/properties_data_shaderfx.py
@@ -24,11 +24,11 @@ class ShaderFxButtonsPanel:
 bl_space_type = 'PROPERTIES'
 bl_region_type = 'WINDOW'
 bl_context = "shaderfx"
-bl_options = {'HIDE_HEADER'}
 
 
 class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
 bl_label = "Effects"
+bl_options = {'HIDE_HEADER', 'LIST_START'}
 
 # Unused: always show for now.
 
@@ -43,118 +43,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
 ob = context.object
 
 layout.operator_menu_enum("object.shaderfx_add", "type")
-
-for fx in ob.shader_effects:
-box = layout.template_shaderfx(fx)
-if box:
-# match enum type to our functions, avoids a lookup table.
-getattr(self, fx.type)(box, fx)
-
-# the mt.type enum is (ab)used for a lookup on function names
-# ...to avoid lengthy if statements
-# so each type must have a function here.
-
-def FX_BLUR(self, layout, fx):
-
-layout.prop(fx, "use_dof_mode", text="Use Depth of Field")
-layout.separator()
-
-col = layout.column()
-col.enabled = not fx.use_dof_mode
-col.prop(fx, "size", text="Size")
-col.separator()
-col.prop(fx, "rotation")
-
-layout.prop(fx, "samples", text="Samples")
-
-
-def FX_COLORIZE(self, layout, fx):
-layout.prop(fx, "mode", text="Mode")
-
-if fx.mode == 'DUOTONE':
-layout.prop(fx, "low_color", text="Low Color")
-if fx.mode == 'CUSTOM':
-layout.prop(fx, "low_color", text="Color")
-
-if fx.mode == 'DUOTONE':
-layout.prop(fx, "high_color", text="High Color")
-
-layout.prop(fx, "factor")
-
-def FX_WAVE(self, layout, fx):
-row = layout.row(align=True)
-row.prop(fx, "orientation", expand=True)
-
-layout.separator()
-layout.prop(fx, "amplitude")
-layout.prop(fx, "period")
-layout.prop(fx, "phase")
-
-def FX_PIXEL(self, layout, fx):
-layout.prop(fx, "size", text="Size")
-
-def FX_RIM(self, layout, fx):
-layout.prop(fx, "offset", text="Offset")
-
-layout.prop(fx, "rim_color")
-layout.prop(fx, "mask_color")
-layout.prop(fx, "mode", text="Blend")
-layout.prop(fx, "blur")
-layout.prop(fx, "samples")
-
-def FX_SHADOW(self, layout, fx):
-layout.prop(fx, "offset", text="Offset")
-
-layout.prop(fx, "shadow_color")
-layout.prop(fx, "scale")
-layout.prop(fx, "rotation")
-
-layout.separator()
-layout.prop(fx, "blur")
-layout.prop(fx, "samples")
-
-layout.separator()
-layout.prop(fx, "use_object", text="Use Object as Pivot")
-if fx.use_object:
-row = layout.row()
-row.prop(fx, "object", text="Object")
-
-layout.separator()
-layout

[Bf-blender-cvs] [57fc9ef7171] modifier-panels-ui: Fix location of gpencil color mode selector

2020-04-29 Thread Hans Goudey
Commit: 57fc9ef7171c4b5ea4b7c2f97be59701309cc33c
Author: Hans Goudey
Date:   Wed Apr 29 10:15:58 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB57fc9ef7171c4b5ea4b7c2f97be59701309cc33c

Fix location of gpencil color mode selector

===

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

===

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
index 11087a5b844..74a10d77ea4 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
@@ -199,12 +199,11 @@ static void panel_draw(const bContext *C, Panel *panel)
 
   uiLayoutSetPropSep(layout, true);
 
+  uiItemR(layout, &ptr, "modify_color", 0, NULL, ICON_NONE);
   uiItemR(layout, &ptr, "hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
   uiItemR(layout, &ptr, "saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
   uiItemR(layout, &ptr, "value", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
-  uiItemR(layout, &ptr, "modify_color", 0, NULL, ICON_NONE);
-
   gpencil_modifier_panel_end(layout, &ptr);
 }

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


[Bf-blender-cvs] [33edd753dcd] modifier-panels-ui: Gpencil modifier: copy expand flag

2020-04-29 Thread Hans Goudey
Commit: 33edd753dcdbe1e5ba642d8401703afc17600251
Author: Hans Goudey
Date:   Wed Apr 29 14:35:00 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB33edd753dcdbe1e5ba642d8401703afc17600251

Gpencil modifier: copy expand flag

===

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

===

diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c 
b/source/blender/blenkernel/intern/gpencil_modifier.c
index 763d6d9f084..c22a0c9c7d3 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -557,6 +557,7 @@ void BKE_gpencil_modifier_copyData_ex(GpencilModifierData 
*md,
 
   target->mode = md->mode;
   target->flag = md->flag;
+  target->ui_expand_flag = md->ui_expand_flag;
 
   if (mti->copyData) {
 mti->copyData(md, target);

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


[Bf-blender-cvs] [d07dab0d612] master: Fix T76225: Cycles View layer filters are grayed out while still working

2020-04-29 Thread Philipp Oeser
Commit: d07dab0d612614998a40e543a19b1f755a8f12a4
Author: Philipp Oeser
Date:   Wed Apr 29 12:53:38 2020 +0200
Branches: master
https://developer.blender.org/rBd07dab0d612614998a40e543a19b1f755a8f12a4

Fix T76225: Cycles View layer filters are grayed out while still working

Mistake in rB7fc60bff14a6.

Maniphest Tasks: T76225

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

===

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

===

diff --git a/intern/cycles/blender/addon/ui.py 
b/intern/cycles/blender/addon/ui.py
index 92f0a8fb830..9c125f7fc9e 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -770,8 +770,9 @@ class CYCLES_RENDER_PT_filter(CyclesButtonsPanel, Panel):
 col.prop(view_layer, "use_strand", text="Hair")
 col.prop(view_layer, "use_volumes", text="Volumes")
 if with_freestyle:
-col.prop(view_layer, "use_freestyle", text="Freestyle")
-col.active = rd.use_freestyle
+sub = col.row(align=True)
+sub.prop(view_layer, "use_freestyle", text="Freestyle")
+sub.active = rd.use_freestyle
 
 
 class CYCLES_RENDER_PT_override(CyclesButtonsPanel, Panel):

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


[Bf-blender-cvs] [7f5367eaae8] master: Windows: Fix RelWithDebInfo missing symbol information

2020-04-29 Thread Ray Molenkamp
Commit: 7f5367eaae873675168fc1603953beaf6ec1279c
Author: Ray Molenkamp
Date:   Wed Apr 29 09:17:34 2020 -0600
Branches: master
https://developer.blender.org/rB7f5367eaae873675168fc1603953beaf6ec1279c

Windows: Fix RelWithDebInfo missing symbol information

issue introduced in rB55a2682348df94d0ff2f57d786b7a557312d0345

===

M   build_files/cmake/platform/platform_win32.cmake

===

diff --git a/build_files/cmake/platform/platform_win32.cmake 
b/build_files/cmake/platform/platform_win32.cmake
index f882ff6238b..90c230f5ce5 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -172,8 +172,8 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} 
/MD")
 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
 set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD")
 set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD 
${SYMBOL_FORMAT}")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD 
${SYMBOL_FORMAT}")
 unset(SYMBOL_FORMAT)
 # JMC is available on msvc 15.8 (1915) and up
 if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)

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


[Bf-blender-cvs] [2893c8c2180] particle-solver-dev: More tweaking to the collision reponse.

2020-04-29 Thread Sebastian Parborg
Commit: 2893c8c21801b3d96e5a405d33131cfa834d71aa
Author: Sebastian Parborg
Date:   Wed Apr 29 17:16:58 2020 +0200
Branches: particle-solver-dev
https://developer.blender.org/rB2893c8c21801b3d96e5a405d33131cfa834d71aa

More tweaking to the collision reponse.

===

M   source/blender/simulations/bparticles/node_frontend.cpp
M   source/blender/simulations/bparticles/simulate.cpp

===

diff --git a/source/blender/simulations/bparticles/node_frontend.cpp 
b/source/blender/simulations/bparticles/node_frontend.cpp
index 0ca10dbdd5a..8b6b34257b8 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -1121,6 +1121,7 @@ static void collect_influences(FunctionTreeData 
&function_tree_data,
 
 AttributesInfoBuilder *attributes = new AttributesInfoBuilder();
 attributes->add("Dead", false);
+attributes->add("Frozen", false);
 attributes->add("ID", 0);
 attributes->add("Birth Time", 0);
 attributes->add("Position", float3(0, 0, 0));
diff --git a/source/blender/simulations/bparticles/simulate.cpp 
b/source/blender/simulations/bparticles/simulate.cpp
index 741027824cf..75c65841ec4 100644
--- a/source/blender/simulations/bparticles/simulate.cpp
+++ b/source/blender/simulations/bparticles/simulate.cpp
@@ -124,7 +124,7 @@ static float collision_newton_rhapson(std::pair &particle_points
   return -1.f;
 }
 
-if (abs(d1) <= COLLISION_ZERO) {
+if (d1 <= COLLISION_ZERO) {
   if (t1 >= -COLLISION_ZERO && t1 <= 1.f) {
 // Save barycentric weight for velocity calculation later
 interp_weights_tri_v3(
@@ -169,6 +169,7 @@ BLI_NOINLINE static void raycast_callback(void *userdata,
   v2 = verts[vt->tri[2]].co;
 
   if (collmd->is_static) {
+zero_v3(rd->hit_vel);
 
 if (ray->radius == 0.0f) {
   // TODO particles probably need to always have somekind of radius, so 
this can probably be
@@ -231,10 +232,12 @@ BLI_NOINLINE static void raycast_callback(void *userdata,
 copy_v3_v3(hit->no, coll_normal);
 
 // Calculate the velocity of the point we hit
+zero_v3(rd->hit_vel);
 for (int i = 0; i < 3; i++) {
   rd->hit_vel += (tri_points[i].second - tri_points[i].first) * 
hit_bary_weights[i] /
  rd->duration;
 }
+// rd->hit_vel = float3(0, 0, 5.0);
   }
 }
 
@@ -259,6 +262,7 @@ BLI_NOINLINE static void 
simulate_particle_chunk(SimulationState &UNUSED(simulat
   MutableArrayRef velocities = attributes.get("Velocity");
   MutableArrayRef positions = attributes.get("Position");
   MutableArrayRef dead_state = attributes.get("Dead");
+  MutableArrayRef frozen_state = attributes.get("Frozen");
 
   // system_info.collision_objects
   // simulation_state.m_depsgraph;
@@ -272,7 +276,7 @@ BLI_NOINLINE static void 
simulate_particle_chunk(SimulationState &UNUSED(simulat
 
 // Update the velocities here so that the potential distance traveled is 
correct in the
 // collision check.
-velocities[pindex] += duration * forces[pindex] / mass;
+velocities[pindex] += duration * forces[pindex] * mass;
 // TODO check if there is issues with moving colliders and particles with 
0 velocity
 
 // Check if any 'collobjs' collide with the particles here
@@ -297,7 +301,8 @@ BLI_NOINLINE static void 
simulate_particle_chunk(SimulationState &UNUSED(simulat
   BVHTreeRayHit hit;
   hit.index = -1;
   hit.dist = max_move;
-  float particle_radius = 0.001f;
+  // TODO the particle radius seems a bit flaky with higher distances?
+  float particle_radius = 0.01f;
   float3 start = positions[pindex];
   float3 dir = velocities[pindex].normalized();
 
@@ -307,7 +312,6 @@ BLI_NOINLINE static void 
simulate_particle_chunk(SimulationState &UNUSED(simulat
   rd.particle_points.first = start;
   rd.particle_points.second = start + duration * velocities[pindex];
 
-  zero_v3(rd.hit_vel);
   rd.duration = duration;
   rd.start_time = 1.0 - duration / remaining_durations[pindex];
 
@@ -330,37 +334,43 @@ BLI_NOINLINE static void 
simulate_particle_chunk(SimulationState &UNUSED(simulat
   best_hit = hit;
   best_hit_vel = rd.hit_vel;
   collided = true;
+  // TODO need to make sure that we do not try to collide with the 
same triangle during the
+  // next subframe. Only applicable for moving colliders of course...
 }
 if (collided) {
-  // XXX TODO we need to notify the moving colliders somehow that the 
new pos is not at t=0
   positions[pindex] = best_hit.co;
   //
   // dot normal from vt with hit.co - start to see which way to 
deflect the particle
-  float normal_dot = dot_v3v3(best_hit.no, velocities[pindex]);
+  float3 norm

[Bf-blender-cvs] [080732ae5cc] master: Fix crash with Orbit Around Selection

2020-04-29 Thread Germano Cavalcante
Commit: 080732ae5cc0ae32be807e608c6687ef685d88c2
Author: Germano Cavalcante
Date:   Wed Apr 29 12:12:28 2020 -0300
Branches: master
https://developer.blender.org/rB080732ae5cc0ae32be807e608c6687ef685d88c2

Fix crash with Orbit Around Selection

Missing check of `NULL` `op` introduced in rBc57e4418bb85.

===

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 19055c8045b..a21df9f66f5 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1596,7 +1596,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator 
*op, const wmEvent *eve
 t->around = V3D_AROUND_CENTER_BOUNDS;
   }
 
-  if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis")) &&
+  if (op && (prop = RNA_struct_find_property(op->ptr, "constraint_axis")) &&
   RNA_property_is_set(op->ptr, prop)) {
 bool constraint_axis[3];

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


[Bf-blender-cvs] [b7bcd0a87c9] master: Tracking: Implement Nuke/Natron distortion model

2020-04-29 Thread Sergey Sharybin
Commit: b7bcd0a87c9df2f11d7249c64768e9526b2048bd
Author: Sergey Sharybin
Date:   Mon Apr 20 17:33:03 2020 +0200
Branches: master
https://developer.blender.org/rBb7bcd0a87c9df2f11d7249c64768e9526b2048bd

Tracking: Implement Nuke/Natron distortion model

Neither Nuke nor Natron support OpenCV's radial distortion model
which makes it impossible to have any kind of interoperability.

The new model is available under the distortion model menu in Lens
settings.

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

===

M   intern/libmv/intern/camera_intrinsics.cc
M   intern/libmv/intern/camera_intrinsics.h
M   intern/libmv/libmv/simple_pipeline/bundle.cc
M   intern/libmv/libmv/simple_pipeline/camera_intrinsics.cc
M   intern/libmv/libmv/simple_pipeline/camera_intrinsics.h
M   intern/libmv/libmv/simple_pipeline/distortion_models.cc
M   intern/libmv/libmv/simple_pipeline/distortion_models.h
M   release/scripts/startup/bl_ui/space_clip.py
M   source/blender/blenkernel/intern/movieclip.c
M   source/blender/blenkernel/intern/tracking_util.c
M   source/blender/makesdna/DNA_tracking_types.h
M   source/blender/makesrna/intern/rna_tracking.c

===

diff --git a/intern/libmv/intern/camera_intrinsics.cc 
b/intern/libmv/intern/camera_intrinsics.cc
index 89e3d0d1178..554c4350b0a 100644
--- a/intern/libmv/intern/camera_intrinsics.cc
+++ b/intern/libmv/intern/camera_intrinsics.cc
@@ -24,6 +24,7 @@
 using libmv::CameraIntrinsics;
 using libmv::DivisionCameraIntrinsics;
 using libmv::PolynomialCameraIntrinsics;
+using libmv::NukeCameraIntrinsics;
 
 libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(
 const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options) {
@@ -55,6 +56,14 @@ libmv_CameraIntrinsics *libmv_cameraIntrinsicsCopy(
   *division_intrinsics);
 break;
   }
+case libmv::DISTORTION_MODEL_NUKE:
+  {
+const NukeCameraIntrinsics *nuke_intrinsics =
+  static_cast(orig_intrinsics);
+new_intrinsics = LIBMV_OBJECT_NEW(NukeCameraIntrinsics,
+  *nuke_intrinsics);
+break;
+  }
 default:
   assert(!"Unknown distortion model");
   }
@@ -136,6 +145,25 @@ void libmv_cameraIntrinsicsUpdate(
 break;
   }
 
+case LIBMV_DISTORTION_MODEL_NUKE:
+  {
+assert(camera_intrinsics->GetDistortionModelType() ==
+   libmv::DISTORTION_MODEL_NUKE);
+
+NukeCameraIntrinsics *nuke_intrinsics =
+  (NukeCameraIntrinsics *) camera_intrinsics;
+
+double k1 = libmv_camera_intrinsics_options->nuke_k1;
+double k2 = libmv_camera_intrinsics_options->nuke_k2;
+
+if (nuke_intrinsics->k1() != k1 ||
+nuke_intrinsics->k2() != k2) {
+  nuke_intrinsics->SetDistortion(k1, k2);
+}
+
+break;
+  }
+
 default:
   assert(!"Unknown distortion model");
   }
@@ -189,6 +217,17 @@ void libmv_cameraIntrinsicsExtractOptions(
 break;
   }
 
+case libmv::DISTORTION_MODEL_NUKE:
+  {
+const NukeCameraIntrinsics *nuke_intrinsics =
+  static_cast(camera_intrinsics);
+camera_intrinsics_options->distortion_model =
+  LIBMV_DISTORTION_MODEL_NUKE;
+camera_intrinsics_options->nuke_k1 = nuke_intrinsics->k1();
+camera_intrinsics_options->nuke_k2 = nuke_intrinsics->k2();
+break;
+  }
+
 default:
   assert(!"Unknown distortion model");
   }
@@ -316,6 +355,17 @@ static void libmv_cameraIntrinsicsFillFromOptions(
 break;
   }
 
+case LIBMV_DISTORTION_MODEL_NUKE:
+  {
+NukeCameraIntrinsics *nuke_intrinsics =
+  static_cast(camera_intrinsics);
+
+nuke_intrinsics->SetDistortion(
+camera_intrinsics_options->nuke_k1,
+camera_intrinsics_options->nuke_k2);
+break;
+  }
+
 default:
   assert(!"Unknown distortion model");
   }
@@ -331,6 +381,9 @@ CameraIntrinsics* libmv_cameraIntrinsicsCreateFromOptions(
 case LIBMV_DISTORTION_MODEL_DIVISION:
   camera_intrinsics = LIBMV_OBJECT_NEW(DivisionCameraIntrinsics);
   break;
+case LIBMV_DISTORTION_MODEL_NUKE:
+  camera_intrinsics = LIBMV_OBJECT_NEW(NukeCameraIntrinsics);
+  break;
 default:
   assert(!"Unknown distortion model");
   }
diff --git a/intern/libmv/intern/camera_intrinsics.h 
b/intern/libmv/intern/camera_intrinsics.h
index 40a5826a9c4..b3d259893bd 100644
--- a/intern/libmv/intern/camera_intrinsics.h
+++ b/intern/libmv/intern/camera_intrinsics.h
@@ -29,6 +29,7 @@ typedef struct libmv_CameraIntrinsics libmv_CameraIntrinsics;
 enum {
   LIBMV_DISTORTION_MODEL_POLYNOMIAL = 0,
   LIBMV_DISTORTION_MODEL_DIVISION = 1,
+  LIBMV_DISTORTION_MODEL_NUKE = 2,
 };
 
 typedef struct libmv_CameraIntrinsi

[Bf-blender-cvs] [0ddf5860f56] blender-v2.83-release: Fix Python bz2 module failing to import on older macOS versions

2020-04-29 Thread Brecht Van Lommel
Commit: 0ddf5860f56e66f62bc3a27d98fedc0edaba371a
Author: Brecht Van Lommel
Date:   Wed Apr 29 16:23:52 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB0ddf5860f56e66f62bc3a27d98fedc0edaba371a

Fix Python bz2 module failing to import on older macOS versions

Found by failing bundled modules test. The bz2 library was compiled without
proper minimum SDK version flags.

===

M   build_files/build_environment/cmake/bzip2.cmake

===

diff --git a/build_files/build_environment/cmake/bzip2.cmake 
b/build_files/build_environment/cmake/bzip2.cmake
index fbf5551e719..bb2be7c634a 100644
--- a/build_files/build_environment/cmake/bzip2.cmake
+++ b/build_files/build_environment/cmake/bzip2.cmake
@@ -25,6 +25,8 @@ if(UNIX AND NOT APPLE)
   set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
   set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export 
LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
 && export PREFIX=${BZIP2_PREFIX})
+else()
+  set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
 endif()
 
 ExternalProject_Add(external_bzip2

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


[Bf-blender-cvs] [6c4ef6159cf] blender-v2.83-release: Fix T71334: top part of render window disappears on repeated renders

2020-04-29 Thread Brecht Van Lommel
Commit: 6c4ef6159cf9323e5f7820003375201d353367ab
Author: Brecht Van Lommel
Date:   Wed Apr 29 14:49:51 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB6c4ef6159cf9323e5f7820003375201d353367ab

Fix T71334: top part of render window disappears on repeated renders

===

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 1e25d73a86d..2a5fdc0ab74 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -807,6 +807,36 @@ void wm_window_ghostwindows_remove_invalid(bContext *C, 
wmWindowManager *wm)
   }
 }
 
+/* Update window size and position based on data from GHOST window. */
+static bool wm_window_update_size_position(wmWindow *win)
+{
+  GHOST_RectangleHandle client_rect;
+  int l, t, r, b, scr_w, scr_h;
+  int sizex, sizey, posx, posy;
+
+  client_rect = GHOST_GetClientBounds(win->ghostwin);
+  GHOST_GetRectangle(client_rect, &l, &t, &r, &b);
+
+  GHOST_DisposeRectangle(client_rect);
+
+  wm_get_desktopsize(&scr_w, &scr_h);
+  sizex = r - l;
+  sizey = b - t;
+  posx = l;
+  posy = scr_h - t - win->sizey;
+
+  if (win->sizex != sizex || win->sizey != sizey || win->posx != posx || 
win->posy != posy) {
+win->sizex = sizex;
+win->sizey = sizey;
+win->posx = posx;
+win->posy = posy;
+return true;
+  }
+  else {
+return false;
+  }
+}
+
 /**
  * new window, no screen yet, but we open ghostwindow for it,
  * also gets the window level handlers
@@ -941,12 +971,19 @@ wmWindow *WM_window_open_temp(bContext *C,
   ED_area_newspace(C, area, space_type, false);
 
   ED_screen_change(C, screen);
-  ED_screen_refresh(wm, win); /* test scale */
 
   if (win->ghostwin) {
+/* Set size in GHOST window and then update size and position from GHOST,
+ * in case they where changed by GHOST to fit the monitor/screen. */
 wm_window_set_size(win, win->sizex, win->sizey);
-wm_window_raise(win);
+wm_window_update_size_position(win);
+  }
+
+  /* Refresh screen dimensions, after the effective window size is known. */
+  ED_screen_refresh(wm, win);
 
+  if (win->ghostwin) {
+wm_window_raise(win);
 GHOST_SetTitle(win->ghostwin, title);
 return win;
   }
@@ -1354,21 +1391,6 @@ static int ghost_event_proc(GHOST_EventHandle evt, 
GHOST_TUserDataPtr C_void_ptr
 
 /* win32: gives undefined window size when minimized */
 if (state != GHOST_kWindowStateMinimized) {
-  GHOST_RectangleHandle client_rect;
-  int l, t, r, b, scr_w, scr_h;
-  int sizex, sizey, posx, posy;
-
-  client_rect = GHOST_GetClientBounds(win->ghostwin);
-  GHOST_GetRectangle(client_rect, &l, &t, &r, &b);
-
-  GHOST_DisposeRectangle(client_rect);
-
-  wm_get_desktopsize(&scr_w, &scr_h);
-  sizex = r - l;
-  sizey = b - t;
-  posx = l;
-  posy = scr_h - t - win->sizey;
-
   /*
* Ghost sometimes send size or move events when the window hasn't 
changed.
* One case of this is using compiz on linux. To alleviate the 
problem
@@ -1377,15 +1399,9 @@ static int ghost_event_proc(GHOST_EventHandle evt, 
GHOST_TUserDataPtr C_void_ptr
* It might be good to eventually do that at Ghost level, but that 
is for
* another time.
*/
-  if (win->sizex != sizex || win->sizey != sizey || win->posx != posx 
||
-  win->posy != posy) {
+  if (wm_window_update_size_position(win)) {
 const bScreen *screen = WM_window_get_active_screen(win);
 
-win->sizex = sizex;
-win->sizey = sizey;
-win->posx = posx;
-win->posy = posy;
-
 /* debug prints */
 if (G.debug & G_DEBUG_EVENTS) {
   const char *state_str;

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


[Bf-blender-cvs] [0cfd2d6f4b2] master: VR: Reset pose offsets when changing base pose

2020-04-29 Thread Julian Eisel
Commit: 0cfd2d6f4b24a7703be4faf615eb47d9448d355c
Author: Julian Eisel
Date:   Tue Apr 28 23:16:29 2020 +0200
Branches: master
https://developer.blender.org/rB0cfd2d6f4b24a7703be4faf615eb47d9448d355c

VR: Reset pose offsets when changing base pose

The offsets are applied after toggling positional tracking off, so that
the view does not jump at that moment. But when changing the base pose,
keeping that offset doesn't make sense. Especially with landmarks, which
are supposed to give precise positions/rotations to jump to. For that
part the VR Scene Inspection Add-on will need a little adjustment
though.

Also exposes an explicit function to the Python API to reset the
offsets, to be used by the Add-on.

This is mostly untested since I don't have access to an HMD currently.

===

M   source/blender/makesrna/intern/rna_xr.c
M   source/blender/windowmanager/WM_api.h
M   source/blender/windowmanager/xr/intern/wm_xr_intern.h
M   source/blender/windowmanager/xr/intern/wm_xr_session.c

===

diff --git a/source/blender/makesrna/intern/rna_xr.c 
b/source/blender/makesrna/intern/rna_xr.c
index b08e48a4b17..04a8500d136 100644
--- a/source/blender/makesrna/intern/rna_xr.c
+++ b/source/blender/makesrna/intern/rna_xr.c
@@ -45,6 +45,16 @@ static bool rna_XrSessionState_is_running(bContext *C)
 #  endif
 }
 
+static void rna_XrSessionState_reset_to_base_pose(bContext *C)
+{
+#  ifdef WITH_XR_OPENXR
+  wmWindowManager *wm = CTX_wm_manager(C);
+  WM_xr_session_base_pose_reset(&wm->xr);
+#  else
+  UNUSED_VARS(C);
+#  endif
+}
+
 #  ifdef WITH_XR_OPENXR
 static wmXrData *rna_XrSessionState_wm_xr_data_get(PointerRNA *ptr)
 {
@@ -197,6 +207,12 @@ static void rna_def_xr_session_state(BlenderRNA *brna)
   parm = RNA_def_boolean(func, "result", 0, "Result", "");
   RNA_def_function_return(func, parm);
 
+  func = RNA_def_function(srna, "reset_to_base_pose", 
"rna_XrSessionState_reset_to_base_pose");
+  RNA_def_function_ui_description(func, "Force resetting of position and 
rotation deltas");
+  RNA_def_function_flag(func, FUNC_NO_SELF);
+  parm = RNA_def_pointer(func, "context", "Context", "", "");
+  RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
+
   prop = RNA_def_property(srna, "viewer_pose_location", PROP_FLOAT, 
PROP_TRANSLATION);
   RNA_def_property_array(prop, 3);
   RNA_def_property_float_funcs(prop, 
"rna_XrSessionState_viewer_pose_location_get", NULL, NULL);
diff --git a/source/blender/windowmanager/WM_api.h 
b/source/blender/windowmanager/WM_api.h
index 2f540262a66..219060933f0 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -872,6 +872,7 @@ void WM_generic_user_data_free(struct wmGenericUserData 
*user_data);
 bool WM_xr_session_exists(const wmXrData *xr);
 bool WM_xr_session_is_ready(const wmXrData *xr);
 struct wmXrSessionState *WM_xr_session_state_handle_get(const wmXrData *xr);
+void WM_xr_session_base_pose_reset(wmXrData *xr);
 bool WM_xr_session_state_viewer_pose_location_get(const wmXrData *xr, float 
r_location[3]);
 bool WM_xr_session_state_viewer_pose_rotation_get(const wmXrData *xr, float 
r_rotation[4]);
 bool WM_xr_session_state_viewer_pose_matrix_info_get(const wmXrData *xr,
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_intern.h 
b/source/blender/windowmanager/xr/intern/wm_xr_intern.h
index b53ae45a29f..9b7e9a15948 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_intern.h
+++ b/source/blender/windowmanager/xr/intern/wm_xr_intern.h
@@ -34,11 +34,16 @@ typedef struct wmXrSessionState {
   float viewer_viewmat[4][4];
   float focal_len;
 
+  /** Copy of XrSessionSettings.base_pose_ data to detect changes that need
+   * resetting to base pose. */
+  char prev_base_pose_type; /* eXRSessionBasePoseType */
+  Object *prev_base_pose_object;
   /** Copy of XrSessionSettings.flag created on the last draw call, stored to 
detect changes. */
   int prev_settings_flag;
   /** Copy of wmXrDrawData.eye_position_ofs. */
   float prev_eye_position_ofs[3];
 
+  bool force_reset_to_base_pose;
   bool is_view_data_set;
 } wmXrSessionState;
 
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.c 
b/source/blender/windowmanager/xr/intern/wm_xr_session.c
index dc228d1b18b..e9ff38c5a92 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_session.c
+++ b/source/blender/windowmanager/xr/intern/wm_xr_session.c
@@ -95,6 +95,11 @@ bool WM_xr_session_exists(const wmXrData *xr)
   return xr->runtime && xr->runtime->context && 
xr->runtime->session_state.is_started;
 }
 
+void WM_xr_session_base_pose_reset(wmXrData *xr)
+{
+  xr->runtime->session_state.force_reset_to_base_pose = true;
+}
+
 /**
  * Check if the session is running, according to the OpenXR definition.
  */
@@ -154,6 +159,17 @@ static void wm_xr_session_draw_data_populate(wmXrData 
*xr_data,
   wm_xr_session_base_pose_calc(r_d

[Bf-blender-cvs] [c57e4418bb8] master: Transform Orientation Refactor

2020-04-29 Thread Germano Cavalcante
Commit: c57e4418bb85aec8bd3615fd775b990badb43d30
Author: Germano Cavalcante
Date:   Wed Apr 29 08:07:25 2020 -0300
Branches: master
https://developer.blender.org/rBc57e4418bb85aec8bd3615fd775b990badb43d30

Transform Orientation Refactor

- Use `t->spacemtx` as the orientation matrix instead `t->orient_matrix`.
- Unify constraint behavior between modal and non-modal.
- Simplify code to remove old workarounds and rearrange struct members.

This fix T66142 since the actual `orient_type` (in the case
`V3D_ORIENT_NORMAL`) is used during Redo instead of always using
`V3D_ORIENT_CUSTOM_MATRIX`).

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

===

M   source/blender/editors/transform/transform.c
M   source/blender/editors/transform/transform.h
M   source/blender/editors/transform/transform_constraints.c
M   source/blender/editors/transform/transform_constraints.h
M   source/blender/editors/transform/transform_generics.c
M   source/blender/editors/transform/transform_gizmo_3d.c
M   source/blender/editors/transform/transform_mode.c
M   source/blender/editors/transform/transform_mode_edge_rotate_normal.c
M   source/blender/editors/transform/transform_mode_rotate.c
M   source/blender/editors/transform/transform_mode_shear.c
M   source/blender/editors/transform/transform_orientations.c

===

diff --git a/source/blender/editors/transform/transform.c 
b/source/blender/editors/transform/transform.c
index d376c71d867..26f108cbf33 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -778,9 +778,10 @@ wmKeyMap *transform_modal_keymap(wmKeyConfig *keyconf)
   return keymap;
 }
 
-static void transform_event_xyz_constraint(TransInfo *t, short key_type, char 
cmode, bool is_plane)
+static void transform_event_xyz_constraint(TransInfo *t, short key_type, bool 
is_plane)
 {
   if (!(t->flag & T_NO_CONSTRAINT)) {
+char cmode = constraintModeToChar(t);
 int constraint_axis, constraint_plane;
 const bool edit_2d = (t->flag & T_2D_EDIT) != 0;
 const char *msg1 = "", *msg2 = "", *msg3 = "";
@@ -824,34 +825,23 @@ static void transform_event_xyz_constraint(TransInfo *t, 
short key_type, char cm
   }
 }
 else if (!edit_2d) {
-  if (cmode != axis) {
-/* First press, constraint to an axis. */
-t->orientation.index = 0;
-const short *orientation_ptr = 
t->orientation.types[t->orientation.index];
-const short orientation = orientation_ptr ? *orientation_ptr : 
V3D_ORIENT_GLOBAL;
-if (is_plane == false) {
-  setUserConstraint(t, orientation, constraint_axis, msg2);
-}
-else {
-  setUserConstraint(t, orientation, constraint_plane, msg3);
-}
-  }
-  else {
+  if (ELEM(cmode, '\0', axis)) {
 /* Successive presses on existing axis, cycle orientation modes. */
 t->orientation.index = (t->orientation.index + 1) % 
ARRAY_SIZE(t->orientation.types);
+BLI_assert(t->orientation.types[0] != V3D_ORIENT_CUSTOM_MATRIX);
+initTransformOrientation(t->context, t, 
t->orientation.types[t->orientation.index]);
+  }
 
-if (t->orientation.index == 0) {
-  stopConstraint(t);
+  if (t->orientation.index == 0) {
+stopConstraint(t);
+  }
+  else {
+const short orientation = t->orientation.types[t->orientation.index];
+if (is_plane == false) {
+  setUserConstraint(t, orientation, constraint_axis, msg2);
 }
 else {
-  const short *orientation_ptr = 
t->orientation.types[t->orientation.index];
-  const short orientation = orientation_ptr ? *orientation_ptr : 
V3D_ORIENT_GLOBAL;
-  if (is_plane == false) {
-setUserConstraint(t, orientation, constraint_axis, msg2);
-  }
-  else {
-setUserConstraint(t, orientation, constraint_plane, msg3);
-  }
+  setUserConstraint(t, orientation, constraint_plane, msg3);
 }
   }
 }
@@ -861,7 +851,6 @@ static void transform_event_xyz_constraint(TransInfo *t, 
short key_type, char cm
 
 int transformEvent(TransInfo *t, const wmEvent *event)
 {
-  char cmode = constraintModeToChar(t);
   bool handled = false;
   const int modifiers_prev = t->modifiers;
   const int mode_prev = t->mode;
@@ -1047,42 +1036,42 @@ int transformEvent(TransInfo *t, const wmEvent *event)
 break;
   case TFM_MODAL_AXIS_X:
 if (!(t->flag & T_NO_CONSTRAINT)) {
-  transform_event_xyz_constraint(t, EVT_XKEY, cmode, false);
+  transform_event_xyz_constraint(t, EVT_XKEY, false);
   t->redraw |= TREDRAW_HARD;
   handled = true;
 }
 break;
   case TFM_MODAL_AXIS_Y:
 if ((t->flag & T_NO_CONSTRAINT) == 0) {
-  transform_even

[Bf-blender-cvs] [980cebc459f] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Philipp Oeser
Commit: 980cebc459fb1990b216b5c5c0935b30f10fedf7
Author: Philipp Oeser
Date:   Wed Apr 29 11:44:56 2020 +0200
Branches: master
https://developer.blender.org/rB980cebc459fb1990b216b5c5c0935b30f10fedf7

Merge branch 'blender-v2.83-release'

===



===



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


[Bf-blender-cvs] [2845b232a77] blender-v2.83-release: Fix T75522: Math node truncate operator tooltip provides no explanation

2020-04-29 Thread Philipp Oeser
Commit: 2845b232a77d37733b20aafd366cf0f2533aff43
Author: Philipp Oeser
Date:   Mon Apr 27 18:49:43 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB2845b232a77d37733b20aafd366cf0f2533aff43

Fix T75522: Math node truncate operator tooltip provides no explanation

===

M   release/scripts/modules/bl_i18n_utils/settings.py
M   source/blender/makesrna/intern/rna_nodetree.c

===

diff --git a/release/scripts/modules/bl_i18n_utils/settings.py 
b/release/scripts/modules/bl_i18n_utils/settings.py
index c736f78d501..c233681dc41 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -377,7 +377,6 @@ WARN_MSGID_NOT_CAPITALIZED_ALLOWED = {
 "normal",
 "right",
 "the lazy dog",
-"trunc(A)",
 "unable to load movie clip",
 "unable to load text",
 "unable to open the file",
diff --git a/source/blender/makesrna/intern/rna_nodetree.c 
b/source/blender/makesrna/intern/rna_nodetree.c
index 31d6ff80f34..71b3f1ee94b 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -174,7 +174,7 @@ const EnumPropertyItem rna_enum_node_math_items[] = {
  "Round A to the nearest integer. Round upward if the fraction part is 
0.5"},
 {NODE_MATH_FLOOR, "FLOOR", 0, "Floor", "The largest integer smaller than 
or equal A"},
 {NODE_MATH_CEIL, "CEIL", 0, "Ceil", "The smallest integer greater than or 
equal A"},
-{NODE_MATH_TRUNC, "TRUNC", 0, "Truncate", "trunc(A)"},
+{NODE_MATH_TRUNC, "TRUNC", 0, "Truncate", "The integer part of A, removing 
fractional digits"},
 {0, "", ICON_NONE, NULL, NULL},
 {NODE_MATH_FRACTION, "FRACT", 0, "Fraction", "The fraction part of A"},
 {NODE_MATH_MODULO, "MODULO", 0, "Modulo", "Modulo using fmod(A,B)"},

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


[Bf-blender-cvs] [157f8364935] master: Depsgraph: use native BLI data structures in registry

2020-04-29 Thread Jacques Lucke
Commit: 157f8364935402aed8024a2bd90348662fbb49b3
Author: Jacques Lucke
Date:   Wed Apr 29 11:37:19 2020 +0200
Branches: master
https://developer.blender.org/rB157f8364935402aed8024a2bd90348662fbb49b3

Depsgraph: use native BLI data structures in registry

Reviewers: sergey

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

===

M   source/blender/depsgraph/intern/depsgraph_registry.cc
M   source/blender/depsgraph/intern/depsgraph_registry.h
M   source/blender/depsgraph/intern/depsgraph_type.h

===

diff --git a/source/blender/depsgraph/intern/depsgraph_registry.cc 
b/source/blender/depsgraph/intern/depsgraph_registry.cc
index ad60b1bc4cf..3b0a0b3ea19 100644
--- a/source/blender/depsgraph/intern/depsgraph_registry.cc
+++ b/source/blender/depsgraph/intern/depsgraph_registry.cc
@@ -29,46 +29,33 @@
 
 namespace DEG {
 
-typedef set DepsgraphStorage;
-typedef map MainDepsgraphMap;
-
-static MainDepsgraphMap g_graph_registry;
+static Map> g_graph_registry;
 
 void register_graph(Depsgraph *depsgraph)
 {
   Main *bmain = depsgraph->bmain;
-  MainDepsgraphMap::iterator it = g_graph_registry.find(bmain);
-  if (it == g_graph_registry.end()) {
-it = g_graph_registry.insert(make_pair(bmain, DepsgraphStorage())).first;
-  }
-  DepsgraphStorage &storage = it->second;
-  storage.insert(depsgraph);
+  g_graph_registry.lookup_or_add_default(bmain).add_new(depsgraph);
 }
 
 void unregister_graph(Depsgraph *depsgraph)
 {
   Main *bmain = depsgraph->bmain;
-  MainDepsgraphMap::iterator it = g_graph_registry.find(bmain);
-  BLI_assert(it != g_graph_registry.end());
-
-  // Remove dependency graph from storage.
-  DepsgraphStorage &storage = it->second;
-  storage.erase(depsgraph);
+  VectorSet &graphs = g_graph_registry.lookup(bmain);
+  graphs.remove(depsgraph);
 
   // If this was the last depsgraph associated with the main, remove the main 
entry as well.
-  if (storage.empty()) {
-g_graph_registry.erase(bmain);
+  if (graphs.is_empty()) {
+g_graph_registry.remove(bmain);
   }
 }
 
-const set &get_all_registered_graphs(Main *bmain)
+ArrayRef get_all_registered_graphs(Main *bmain)
 {
-  MainDepsgraphMap::iterator it = g_graph_registry.find(bmain);
-  if (it == g_graph_registry.end()) {
-static DepsgraphStorage empty_storage;
-return empty_storage;
+  VectorSet *graphs = g_graph_registry.lookup_ptr(bmain);
+  if (graphs != nullptr) {
+return *graphs;
   }
-  return it->second;
+  return {};
 }
 
 }  // namespace DEG
diff --git a/source/blender/depsgraph/intern/depsgraph_registry.h 
b/source/blender/depsgraph/intern/depsgraph_registry.h
index 7517b6a0b2a..f8e5b9543f2 100644
--- a/source/blender/depsgraph/intern/depsgraph_registry.h
+++ b/source/blender/depsgraph/intern/depsgraph_registry.h
@@ -33,6 +33,6 @@ struct Depsgraph;
 
 void register_graph(Depsgraph *depsgraph);
 void unregister_graph(Depsgraph *depsgraph);
-const set &get_all_registered_graphs(Main *bmain);
+ArrayRef get_all_registered_graphs(Main *bmain);
 
 }  // namespace DEG
diff --git a/source/blender/depsgraph/intern/depsgraph_type.h 
b/source/blender/depsgraph/intern/depsgraph_type.h
index 6417f49e1ae..7016d07ae72 100644
--- a/source/blender/depsgraph/intern/depsgraph_type.h
+++ b/source/blender/depsgraph/intern/depsgraph_type.h
@@ -44,6 +44,7 @@
 #include "BLI_set.hh"
 #include "BLI_string_ref.hh"
 #include "BLI_vector.hh"
+#include "BLI_vector_set.hh"
 
 struct Depsgraph;
 
@@ -58,6 +59,7 @@ using BLI::Set;
 using BLI::StringRef;
 using BLI::StringRefNull;
 using BLI::Vector;
+using BLI::VectorSet;
 using std::deque;
 using std::map;
 using std::pair;

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


[Bf-blender-cvs] [657188c1a24] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Philipp Oeser
Commit: 657188c1a240eececd4aec95f97fe1b96c140070
Author: Philipp Oeser
Date:   Wed Apr 29 11:25:08 2020 +0200
Branches: master
https://developer.blender.org/rB657188c1a240eececd4aec95f97fe1b96c140070

Merge branch 'blender-v2.83-release'

===



===



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


[Bf-blender-cvs] [08048f7cceb] blender-v2.83-release: Fix T75810: Child bone frozen when both Auto IK and X-Axis mirror are used

2020-04-29 Thread Philipp Oeser
Commit: 08048f7cceb82826bb520a2ca04f0bc38271faa9
Author: Philipp Oeser
Date:   Tue Apr 28 19:20:07 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB08048f7cceb82826bb520a2ca04f0bc38271faa9

Fix T75810: Child bone frozen when both Auto IK and X-Axis mirror are
used

Caused by {rBa6a9a12e8f32}

Other relevant commits:
rBb8ca806b7798e2f8dd6effca8f0d081b3cd8c23f
rBde530a95dc7b482dc22c933b9b8b2a98c79b5663

The issue is caused by some leftover BONE_TRANSFORM_MIRROR flags on a
bone from previous runs (file in the report had the flag still on
forearm.R).

With these false leftover flags still set, `pose_grab_with_ik()` cannot
work correctly. Culprit commit above removed the early clearing of this
flag on all bones, this should be restored [this happened in
`count_set_pose_transflags()`].

This should only be done in the beginning of the transform process, so
now still clear the flags early in 'createTransPose()' [but dont restore
this in 'count_set_pose_transflags()' -- this will be called from
special_aftertrans_update again, so placing the clearance here only
complicates things (autokeyframe_pose() still needs to work as well)...]

Maniphest Tasks: T75810

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

===

M   source/blender/editors/transform/transform_convert_armature.c

===

diff --git a/source/blender/editors/transform/transform_convert_armature.c 
b/source/blender/editors/transform/transform_convert_armature.c
index 91b8b1ff657..779257ef671 100644
--- a/source/blender/editors/transform/transform_convert_armature.c
+++ b/source/blender/editors/transform/transform_convert_armature.c
@@ -685,6 +685,9 @@ void createTransPose(TransInfo *t)
 if (mirror) {
   int total_mirrored = 0;
   LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
+/* Clear the MIRROR flag from previous runs. */
+pchan->bone->flag &= ~BONE_TRANSFORM_MIRROR;
+
 if ((pchan->bone->flag & BONE_TRANSFORM) &&
 BKE_pose_channel_get_mirrored(ob->pose, pchan->name)) {
   total_mirrored++;

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


[Bf-blender-cvs] [fed5e0ca04b] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Philipp Oeser
Commit: fed5e0ca04b155d9e5ee4a1f64b0a2cac5c4e762
Author: Philipp Oeser
Date:   Wed Apr 29 11:10:24 2020 +0200
Branches: master
https://developer.blender.org/rBfed5e0ca04b155d9e5ee4a1f64b0a2cac5c4e762

Merge branch 'blender-v2.83-release'

===



===



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


[Bf-blender-cvs] [e07b245fe1f] blender-v2.83-release: Armature posemode: add mouse independent "Select Linked" operator

2020-04-29 Thread Philipp Oeser
Commit: e07b245fe1f41cab13d772c3e26adc2521126324
Author: Philipp Oeser
Date:   Mon Apr 27 15:41:22 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBe07b245fe1f41cab13d772c3e26adc2521126324

Armature posemode: add mouse independent "Select Linked" operator

The current "Select Linked" operator works based on mouse position and
makes no sense to call from the menus and was removed in rB536055e1ee0b.

This patch adds an operator independent from mouse position that just
selects all bones in relation to selected bones (and adds back menu
entries, adds keymap entry CTRL+L).

The original operator is renamed to 'select_linked_pick' internally
(this is now more in line to how "Select Linked" works for meshes,
curves etc)

ref T76071

Maniphest Tasks: T76071

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

===

M   release/scripts/presets/keyconfig/keymap_data/blender_default.py
M   release/scripts/startup/bl_ui/space_view3d.py
M   source/blender/editors/armature/armature_intern.h
M   source/blender/editors/armature/armature_ops.c
M   source/blender/editors/armature/pose_select.c

===

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py 
b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 7be6ddb5bca..07916fa9799 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -3859,7 +3859,8 @@ def km_pose(params):
  {"properties": [("direction", 'CHILD'), ("extend", False)]}),
 ("pose.select_hierarchy", {"type": 'RIGHT_BRACKET', "value": 'PRESS', 
"shift": True},
  {"properties": [("direction", 'CHILD'), ("extend", True)]}),
-("pose.select_linked", {"type": 'L', "value": 'PRESS'}, None),
+("pose.select_linked", {"type": 'L', "value": 'PRESS', "ctrl": True}, 
None),
+("pose.select_linked_pick", {"type": 'L', "value": 'PRESS'}, None),
 ("pose.select_grouped", {"type": 'G', "value": 'PRESS', "shift": 
True}, None),
 ("pose.select_mirror", {"type": 'M', "value": 'PRESS', "shift": True, 
"ctrl": True}, None),
 ("pose.constraint_add_with_targets", {"type": 'C', "value": 'PRESS', 
"shift": True, "ctrl": True}, None),
diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index c0a786d9658..5d47566d880 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1469,6 +1469,7 @@ class VIEW3D_MT_select_pose(Menu):
 layout.separator()
 
 layout.operator("pose.select_constraint_target", text="Constraint 
Target")
+layout.operator("pose.select_linked", text="Linked")
 
 layout.separator()
 
diff --git a/source/blender/editors/armature/armature_intern.h 
b/source/blender/editors/armature/armature_intern.h
index 3d41fd5f0c6..08d82bf13c9 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -104,6 +104,7 @@ void POSE_OT_select_all(struct wmOperatorType *ot);
 void POSE_OT_select_parent(struct wmOperatorType *ot);
 void POSE_OT_select_hierarchy(struct wmOperatorType *ot);
 void POSE_OT_select_linked(struct wmOperatorType *ot);
+void POSE_OT_select_linked_pick(struct wmOperatorType *ot);
 void POSE_OT_select_constraint_target(struct wmOperatorType *ot);
 void POSE_OT_select_grouped(struct wmOperatorType *ot);
 void POSE_OT_select_mirror(struct wmOperatorType *ot);
diff --git a/source/blender/editors/armature/armature_ops.c 
b/source/blender/editors/armature/armature_ops.c
index b304ce92a54..da1b29307b1 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -100,6 +100,7 @@ void ED_operatortypes_armature(void)
   WM_operatortype_append(POSE_OT_select_parent);
   WM_operatortype_append(POSE_OT_select_hierarchy);
   WM_operatortype_append(POSE_OT_select_linked);
+  WM_operatortype_append(POSE_OT_select_linked_pick);
   WM_operatortype_append(POSE_OT_select_constraint_target);
   WM_operatortype_append(POSE_OT_select_grouped);
   WM_operatortype_append(POSE_OT_select_mirror);
diff --git a/source/blender/editors/armature/pose_select.c 
b/source/blender/editors/armature/pose_select.c
index 41ad5433931..ce652b0eaf4 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -454,22 +454,22 @@ static int pose_select_connected_invoke(bContext *C, 
wmOperator *op, const wmEve
   return OPERATOR_FINISHED;
 }
 
-static bool pose_select_linked_poll(bContext *C)
+static bool pose_select_linked_pick_poll(bContext *C)
 {
   return (ED_operator_view3d_active(C) && ED_operator_posemode(C));
 }
 
-void POSE_OT_select_linked(wmOperatorType *ot)
+v

[Bf-blender-cvs] [cedf9f5cb79] master: Fix/cleanup: lib_query: missing case handling of new ID_SIM type.

2020-04-29 Thread Bastien Montagne
Commit: cedf9f5cb793af26d72479931ba31db620e1dc30
Author: Bastien Montagne
Date:   Wed Apr 29 11:05:45 2020 +0200
Branches: master
https://developer.blender.org/rBcedf9f5cb793af26d72479931ba31db620e1dc30

Fix/cleanup: lib_query: missing case handling of new ID_SIM type.

Also update comments.

===

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

===

diff --git a/source/blender/blenkernel/intern/lib_query.c 
b/source/blender/blenkernel/intern/lib_query.c
index d755fb2ca49..2e3f72dc788 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -1341,14 +1341,11 @@ void BKE_library_update_ID_link_user(ID *id_dst, ID 
*id_src, const int cb_flag)
 }
 
 /**
- * Say whether given \a id_type_owner can use (in any way) a data-block of \a 
id_type_used.
+ * Say whether given \a id_owner may use (in any way) a data-block of \a 
id_type_used.
  *
  * This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() 
above,
- * quite useful to reduce* useless iterations in some cases.
+ * quite useful to reduce useless iterations in some cases.
  */
-/* XXX This has to be fully rethink, basing check on ID type is not really 
working anymore
- * (and even worth once IDProps will support ID pointers),
- * we'll have to do some quick checks on IDs themselves... */
 bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used)
 {
   /* any type of ID can be used in custom props. */
@@ -1458,6 +1455,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const 
short id_type_used)
 case ID_PAL:
 case ID_PC:
 case ID_CF:
+case ID_SIM:
   /* Those types never use/reference other IDs... */
   return false;
 case ID_IP:

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


[Bf-blender-cvs] [9a9ecad65f1] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Bastien Montagne
Commit: 9a9ecad65f1f1dbb2299b8663bb1cc54e99c423c
Author: Bastien Montagne
Date:   Wed Apr 29 10:57:47 2020 +0200
Branches: master
https://developer.blender.org/rB9a9ecad65f1f1dbb2299b8663bb1cc54e99c423c

Merge branch 'blender-v2.83-release'

Conflicts:
source/blender/blenkernel/intern/lib_query.c

===



===



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


[Bf-blender-cvs] [afeddd42e65] blender-v2.83-release: Cleanup: use LISTBASE_FOREACH iterator everywhere possible in libquery.

2020-04-29 Thread Bastien Montagne
Commit: afeddd42e653be2853515eb364fcd363c9023c3a
Author: Bastien Montagne
Date:   Wed Apr 29 10:52:01 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBafeddd42e653be2853515eb364fcd363c9023c3a

Cleanup: use LISTBASE_FOREACH iterator everywhere possible in libquery.

Done also in 2.83 release branch to avoid too much conflicts on merging
(some of those were already done for nodes in master, and gave me
conflicts yesterday...).

===

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

===

diff --git a/source/blender/blenkernel/intern/lib_query.c 
b/source/blender/blenkernel/intern/lib_query.c
index c93aade7cfa..2ca03fd5d7e 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -251,11 +251,9 @@ static void 
library_foreach_particlesystemsObjectLooper(ParticleSystem *UNUSED(p
 
 static void library_foreach_nla_strip(LibraryForeachIDData *data, NlaStrip 
*strip)
 {
-  NlaStrip *substrip;
-
   FOREACH_CALLBACK_INVOKE(data, strip->act, IDWALK_CB_USER);
 
-  for (substrip = strip->strips.first; substrip; substrip = substrip->next) {
+  LISTBASE_FOREACH (NlaStrip *, substrip, &strip->strips) {
 library_foreach_nla_strip(data, substrip);
   }
 
@@ -264,15 +262,10 @@ static void 
library_foreach_nla_strip(LibraryForeachIDData *data, NlaStrip *stri
 
 static void library_foreach_animationData(LibraryForeachIDData *data, AnimData 
*adt)
 {
-  FCurve *fcu;
-  NlaTrack *nla_track;
-  NlaStrip *nla_strip;
-
-  for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
+  LISTBASE_FOREACH (FCurve *, fcu, &adt->drivers) {
 ChannelDriver *driver = fcu->driver;
-DriverVar *dvar;
 
-for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
+LISTBASE_FOREACH (DriverVar *, dvar, &driver->variables) {
   /* only used targets */
   DRIVER_TARGETS_USED_LOOPER_BEGIN (dvar) {
 FOREACH_CALLBACK_INVOKE_ID(data, dtar->id, IDWALK_CB_NOP);
@@ -284,8 +277,8 @@ static void 
library_foreach_animationData(LibraryForeachIDData *data, AnimData *
   FOREACH_CALLBACK_INVOKE(data, adt->action, IDWALK_CB_USER);
   FOREACH_CALLBACK_INVOKE(data, adt->tmpact, IDWALK_CB_USER);
 
-  for (nla_track = adt->nla_tracks.first; nla_track; nla_track = 
nla_track->next) {
-for (nla_strip = nla_track->strips.first; nla_strip; nla_strip = 
nla_strip->next) {
+  LISTBASE_FOREACH (NlaTrack *, nla_track, &adt->nla_tracks) {
+LISTBASE_FOREACH (NlaStrip *, nla_strip, &nla_track->strips) {
   library_foreach_nla_strip(data, nla_strip);
 }
   }
@@ -462,7 +455,6 @@ static void 
library_foreach_screen_area(LibraryForeachIDData *data, ScrArea *are
   }
   case SPACE_NODE: {
 SpaceNode *snode = (SpaceNode *)sl;
-bNodeTreePath *path;
 
 const bool is_private_nodetree = snode->id != NULL &&
  ntreeFromID(snode->id) == 
snode->nodetree;
@@ -473,7 +465,7 @@ static void 
library_foreach_screen_area(LibraryForeachIDData *data, ScrArea *are
 FOREACH_CALLBACK_INVOKE(
 data, snode->nodetree, is_private_nodetree ? IDWALK_CB_EMBEDDED : 
IDWALK_CB_USER_ONE);
 
-for (path = snode->treepath.first; path; path = path->next) {
+LISTBASE_FOREACH (bNodeTreePath *, path, &snode->treepath) {
   if (path == snode->treepath.first) {
 /* first nodetree in path is same as snode->nodetree */
 FOREACH_CALLBACK_INVOKE(data,
@@ -677,8 +669,7 @@ static void library_foreach_ID_link(Main *bmain,
   library_foreach_collection(&data, scene->master_collection);
 }
 
-ViewLayer *view_layer;
-for (view_layer = scene->view_layers.first; view_layer; view_layer = 
view_layer->next) {
+LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
   CALLBACK_INVOKE(view_layer->mat_override, IDWALK_CB_USER);
 
   LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
@@ -757,7 +748,6 @@ static void library_foreach_ID_link(Main *bmain,
 
   case ID_OB: {
 Object *object = (Object *)id;
-ParticleSystem *psys;
 
 /* Object is special, proxies make things hard... */
 const int data_cb_flag = data.cb_flag;
@@ -813,10 +803,8 @@ static void library_foreach_ID_link(Main *bmain,
 /* Note that ob->effect is deprecated, so no need to handle it here. */
 
 if (object->pose) {
-  bPoseChannel *pchan;
-
   data.cb_flag |= proxy_cb_flag;
-  for (pchan = object->pose->chanbase.first; pchan; pchan = 
pchan->next) {
+  LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
 IDP_foreach_property(
 pchan->prop, IDP_TYPE_FILTER_ID, 
library_foreach_idpropertiesForeachIDLink, &data);
 CALLBACK_INVOKE(pchan->custom, IDWALK_CB_USER);
@@ -8

[Bf-blender-cvs] [3af52c6ec3a] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Philipp Oeser
Commit: 3af52c6ec3aad18e544c30944c472294d905b8d0
Author: Philipp Oeser
Date:   Wed Apr 29 10:27:42 2020 +0200
Branches: master
https://developer.blender.org/rB3af52c6ec3aad18e544c30944c472294d905b8d0

Merge branch 'blender-v2.83-release'

===



===



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


[Bf-blender-cvs] [839fe335d2d] blender-v2.83-release: Fix crash after 475bd6b occuring on each render end, we need another nullcheck here

2020-04-29 Thread Jens Verwiebe
Commit: 839fe335d2d6333830fd7236925c01d9db909bda
Author: Jens Verwiebe
Date:   Tue Apr 28 23:49:52 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB839fe335d2d6333830fd7236925c01d9db909bda

Fix crash after 475bd6b occuring on each render end, we need another nullcheck 
here

(cherry picked from commit 3ea67e08fe8e3edc73daf13769dd631dbf920c45)

===

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

===

diff --git a/source/blender/editors/space_image/image_buttons.c 
b/source/blender/editors/space_image/image_buttons.c
index fcd6baa9582..6f3ef44fe94 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -656,7 +656,7 @@ static void uiblock_layer_pass_buttons(
 /* pass */
 rpass = (rl ? BLI_findlink(&rl->passes, iuser->pass) : NULL);
 
-if (RE_passes_have_name(rl)) {
+if (rl && RE_passes_have_name(rl)) {
   display_name = rpass ? rpass->name : "";
   rnd_pt = ui_imageuser_data_copy(&rnd_pt_local);
   but = uiDefMenuBut(block,

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


[Bf-blender-cvs] [b3ac6d13487] blender-v2.83-release: nstall_deps: USD: Add root usd library directory to build args.

2020-04-29 Thread Anthony Edlin
Commit: b3ac6d13487291a82a8c0bb5b79b471eb75f9223
Author: Anthony Edlin
Date:   Wed Apr 29 10:14:41 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBb3ac6d13487291a82a8c0bb5b79b471eb75f9223

nstall_deps: USD: Add root usd library directory to build args.

Add root usd library directory to build arguments, same as other libraries.
Also fix error/typo in compile_USD regarding _is_building.

Reviewed By: mont29

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

===

M   build_files/build_environment/install_deps.sh

===

diff --git a/build_files/build_environment/install_deps.sh 
b/build_files/build_environment/install_deps.sh
index e8f49c0c75c..6a247e81148 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -2654,7 +2654,7 @@ compile_USD() {
 
 cd $CWD
 INFO "Done compiling USD-$USD_VERSION!"
-_is_building=true
+_is_building=false
   else
 INFO "Own USD-$USD_VERSION is up to date, nothing to do!"
 INFO "If you want to force rebuild of this lib, use the --force-usd 
option."
@@ -5354,6 +5354,11 @@ print_info() {
 _1="-D WITH_USD=ON"
 PRINT "  $_1"
 _buildargs="$_buildargs $_1"
+if [ -d $INST/usd ]; then
+  _1="-D USD_ROOT_DIR=$INST/usd"
+  PRINT "  $_1"
+  _buildargs="$_buildargs $_1"
+fi
   fi
 
   if [ "$NO_SYSTEM_GLEW" = true ]; then

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


[Bf-blender-cvs] [1e58255c404] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Bastien Montagne
Commit: 1e58255c404cc49edd7391f36a6e7c72f4249700
Author: Bastien Montagne
Date:   Wed Apr 29 10:16:42 2020 +0200
Branches: master
https://developer.blender.org/rB1e58255c404cc49edd7391f36a6e7c72f4249700

Merge branch 'blender-v2.83-release'

===



===



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


[Bf-blender-cvs] [3187f0b853a] greasepencil-object: Merge branch 'master' into greasepencil-object

2020-04-29 Thread Antonio Vazquez
Commit: 3187f0b853a3edb8d279361c1c6c20933e216cb5
Author: Antonio Vazquez
Date:   Wed Apr 29 10:15:20 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB3187f0b853a3edb8d279361c1c6c20933e216cb5

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] [601a1a3fdae] blender-v2.83-release: Fix T76185: GPencil from Curve ignores Cyclic when curve has only 2 points

2020-04-29 Thread Antonio Vazquez
Commit: 601a1a3fdae0bb87f6e6b54b594f0f685a94998a
Author: Antonio Vazquez
Date:   Wed Apr 29 10:14:20 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB601a1a3fdae0bb87f6e6b54b594f0f685a94998a

Fix T76185: GPencil from Curve ignores Cyclic when curve has only 2 points

Also changed default thickness to 10 because after draw engine refactor the 
final line was too thin.

===

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

===

diff --git a/source/blender/blenkernel/intern/gpencil_geom.c 
b/source/blender/blenkernel/intern/gpencil_geom.c
index 874672f4a73..413e28c431b 100644
--- a/source/blender/blenkernel/intern/gpencil_geom.c
+++ b/source/blender/blenkernel/intern/gpencil_geom.c
@@ -1710,7 +1710,7 @@ static void gpencil_convert_spline(Main *bmain,
 
   /* Create Stroke. */
   bGPDstroke *gps = MEM_callocN(sizeof(bGPDstroke), "bGPDstroke");
-  gps->thickness = 1.0f;
+  gps->thickness = 10.0f;
   gps->fill_opacity_fac = 1.0f;
   gps->hardeness = 1.0f;
   gps->uv_scale = 1.0f;
@@ -1731,7 +1731,7 @@ static void gpencil_convert_spline(Main *bmain,
   int segments = 0;
   int resolu = nu->resolu + 1;
   segments = nu->pntsu;
-  if (((nu->flagu & CU_NURB_CYCLIC) == 0) || (nu->pntsu == 2)) {
+  if ((nu->flagu & CU_NURB_CYCLIC) == 0) {
 segments--;
 cyclic = false;
   }
@@ -1847,7 +1847,7 @@ static void gpencil_convert_spline(Main *bmain,
   int init = 0;
   resolu = nu->resolu + 1;
   segments = nu->pntsu;
-  if (((nu->flagu & CU_NURB_CYCLIC) == 0) || (nu->pntsu == 2)) {
+  if ((nu->flagu & CU_NURB_CYCLIC) == 0) {
 segments--;
   }
   /* Get all interpolated curve points of Beziert */

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


[Bf-blender-cvs] [770605312fc] master: Merge branch 'blender-v2.83-release'

2020-04-29 Thread Antonio Vazquez
Commit: 770605312fca5a2c8a5838d9a05162c8fe904a05
Author: Antonio Vazquez
Date:   Wed Apr 29 10:14:55 2020 +0200
Branches: master
https://developer.blender.org/rB770605312fca5a2c8a5838d9a05162c8fe904a05

Merge branch 'blender-v2.83-release'

===



===



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