[Bf-blender-cvs] [8a5b59ce3ce] asset-greasepencil: Merge master into asset-greasepencil
Antonio Vazquez
noreply at git.blender.org
Thu Nov 4 20:15:07 CET 2021
Commit: 8a5b59ce3ced63c9f4d44f7b47d35cfb07c89ff5
Author: Antonio Vazquez
Date: Thu Nov 4 19:50:59 2021 +0100
Branches: asset-greasepencil
https://developer.blender.org/rB8a5b59ce3ced63c9f4d44f7b47d35cfb07c89ff5
Merge master into asset-greasepencil
===================================================================
M CMakeLists.txt
M build_files/cmake/platform/platform_win32.cmake
M intern/cycles/blender/object.cpp
M intern/cycles/blender/sync.cpp
M intern/cycles/blender/sync.h
M intern/cycles/integrator/pass_accessor.cpp
M intern/cycles/kernel/integrator/intersect_closest.h
M intern/cycles/kernel/integrator/path_state.h
M intern/cycles/kernel/integrator/shade_surface.h
M intern/cycles/kernel/integrator/shade_volume.h
M intern/cycles/kernel/integrator/state_template.h
M release/datafiles/startup.blend
M release/datafiles/userdef/userdef_default_theme.c
M release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py
M release/scripts/startup/bl_ui/properties_data_gpencil.py
M source/blender/blenkernel/intern/customdata.c
M source/blender/blenkernel/intern/node.cc
M source/blender/blenloader/intern/versioning_cycles.c
M source/blender/blenloader/intern/versioning_userdef.c
M source/blender/editors/gpencil/gpencil_data.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/gpencil/gpencil_utils.c
M source/blender/editors/include/ED_gpencil.h
M source/blender/editors/include/ED_screen.h
M source/blender/editors/interface/interface_dropboxes.cc
M source/blender/editors/interface/interface_widgets.c
M source/blender/editors/screen/area_query.c
M source/blender/editors/space_node/drawnode.cc
M source/blender/editors/space_node/node_draw.cc
M source/blender/editors/space_node/node_relationships.cc
M source/blender/editors/space_spreadsheet/space_spreadsheet.cc
M source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
M source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/makesrna/intern/makesrna.c
M source/blender/modifiers/intern/MOD_cloth.c
M source/blender/nodes/NOD_math_functions.hh
M source/blender/nodes/NOD_node_declaration.hh
M source/blender/nodes/geometry/node_geometry_util.hh
M source/blender/nodes/geometry/nodes/node_geo_curve_parameter.cc
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc
M source/blender/nodes/shader/nodes/node_shader_curves.cc
M source/blender/windowmanager/WM_types.h
M source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
M source/blender/windowmanager/intern/wm_dragdrop.c
M source/blender/windowmanager/intern/wm_draw.c
M source/blender/windowmanager/intern/wm_event_system.c
M source/blender/windowmanager/intern/wm_files_link.c
M source/blender/windowmanager/wm_event_system.h
M tests/python/bl_blendfile_liblink.py
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62e7d9b2941..7a5ac1918bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -642,7 +642,7 @@ if(WIN32)
option(WITH_WINDOWS_PDB "Generate a pdb file for client side stacktraces" ON)
mark_as_advanced(WITH_WINDOWS_PDB)
- option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" On)
+ option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" ON)
mark_as_advanced(WITH_WINDOWS_STRIPPED_PDB)
endif()
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index cb4d196d43f..e83eba74fc0 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -27,7 +27,7 @@ if(NOT MSVC)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
- set(MSVC_CLANG On)
+ set(MSVC_CLANG ON)
set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables")
set(MSVC_REDIST_DIR ${VC_TOOLS_DIR})
if(DEFINED MSVC_REDIST_DIR)
@@ -53,7 +53,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
endif()
if(WITH_WINDOWS_STRIPPED_PDB)
message(WARNING "stripped pdb not supported with clang, disabling..")
- set(WITH_WINDOWS_STRIPPED_PDB Off)
+ set(WITH_WINDOWS_STRIPPED_PDB OFF)
endif()
endif()
@@ -159,7 +159,7 @@ endif()
if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28.29828)
#set a flag so we don't have to do this comparison all the time
- SET(MSVC_ASAN On)
+ SET(MSVC_ASAN ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address")
string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO")
@@ -179,22 +179,22 @@ endif()
if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
message(WARNING "Disabling sccache, sccache is not supported with msbuild")
- set(WITH_WINDOWS_SCCACHE Off)
+ set(WITH_WINDOWS_SCCACHE OFF)
endif()
# Debug Symbol format
# sccache # MSVC_ASAN # format # why
-# On # On # Z7 # sccache will only play nice with Z7
-# On # Off # Z7 # sccache will only play nice with Z7
-# Off # On # Zi # Asan will not play nice with Edit and Continue
-# Off # Off # ZI # Neither asan nor sscache is enabled Edit and Continue is available
+# ON # ON # Z7 # sccache will only play nice with Z7
+# ON # OFF # Z7 # sccache will only play nice with Z7
+# OFF # ON # Zi # Asan will not play nice with Edit and Continue
+# OFF # OFF # ZI # Neither asan nor sscache is enabled Edit and Continue is available
# Release Symbol format
# sccache # MSVC_ASAN # format # why
-# On # On # Z7 # sccache will only play nice with Z7
-# On # Off # Z7 # sccache will only play nice with Z7
-# Off # On # Zi # Asan will not play nice with Edit and Continue
-# Off # Off # Zi # Edit and Continue disables some optimizations
+# ON # ON # Z7 # sccache will only play nice with Z7
+# ON # OFF # Z7 # sccache will only play nice with Z7
+# OFF # ON # Zi # Asan will not play nice with Edit and Continue
+# OFF # OFF # Zi # Edit and Continue disables some optimizations
if(WITH_WINDOWS_SCCACHE)
@@ -288,7 +288,7 @@ if(CMAKE_GENERATOR MATCHES "^Visual Studio.+" AND # Only supported in the VS IDE
"EnableMicrosoftCodeAnalysis=false"
"EnableClangTidyCodeAnalysis=true"
)
- set(VS_CLANG_TIDY On)
+ set(VS_CLANG_TIDY ON)
endif()
# Mark libdir as system headers with a lower warn level, to resolve some warnings
@@ -469,7 +469,7 @@ if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/include)
set(PYTHON_NUMPY_INCLUDE_DIRS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/lib/site-packages/numpy/core/include)
- set(NUMPY_FOUND On)
+ set(NUMPY_FOUND ON)
unset(_PYTHON_VERSION_NO_DOTS)
# uncached vars
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
@@ -853,18 +853,18 @@ if(WITH_GMP)
set(GMP_INCLUDE_DIRS ${LIBDIR}/gmp/include)
set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/libgmp-10.lib optimized ${LIBDIR}/gmp/lib/libgmpxx.lib debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib)
set(GMP_ROOT_DIR ${LIBDIR}/gmp)
- set(GMP_FOUND On)
+ set(GMP_FOUND ON)
endif()
if(WITH_POTRACE)
set(POTRACE_INCLUDE_DIRS ${LIBDIR}/potrace/include)
set(POTRACE_LIBRARIES ${LIBDIR}/potrace/lib/potrace.lib)
- set(POTRACE_FOUND On)
+ set(POTRACE_FOUND ON)
endif()
if(WITH_HARU)
if(EXISTS ${LIBDIR}/haru)
- set(HARU_FOUND On)
+ set(HARU_FOUND ON)
set(HARU_ROOT_DIR ${LIBDIR}/haru)
set(HARU_INCLUDE_DIRS ${HARU_ROOT_DIR}/include)
set(HARU_LIBRARIES ${HARU_ROOT_DIR}/lib/libhpdfs.lib)
diff --git a/intern/cycles/blender/object.cpp b/intern/cycles/blender/object.cpp
index 9919b9d1836..3800ea0ecd2 100644
--- a/intern/cycles/blender/object.cpp
+++ b/intern/cycles/blender/object.cpp
@@ -161,6 +161,11 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
if (is_instance) {
persistent_id_array = b_instance.persistent_id();
persistent_id = persistent_id_array.data;
+ if (!b_ob_info.is_real_object_data()) {
+ /* Remember which object data the geometry is coming from, so that we can sync it when the
+ * object has changed. */
+ instance_geometries_by_object[b_ob_info.real_object.ptr.data].insert(b_ob_info.object_data);
+ }
}
/* light is handled separately */
@@ -560,6 +565,7 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
else {
geometry_motion_synced.clear();
}
+ instance_geometries_by_object.clear();
/* initialize culling */
BlenderObjectCulling culling(scene, b_scene);
diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp
index cf0b77a9b16..ffd1e78b7f8 100644
--- a/intern/cycles/blender/sync.cpp
+++ b/intern/cycles/blender/sync.cpp
@@ -183,6 +183,15 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d
(object_subdivision_type(b_ob, preview, experimental) != Mesh::SUBDIVISION_NONE)) {
BL::ID key = BKE_object_is_modified(b_ob) ? b_ob : b_ob.data();
geometry_map.set_recalc(key);
+
+ /* Sync all contained geometry instances as well when the object changed.. */
+ map<void *, set<BL::ID>>::const_iterator instance_geometries =
+ instance_geometries_by_object.find(b_ob.ptr.data);
+ if (instance_geometries != instance_geometries_by_object.end()) {
+ for (BL::ID geometry : instance_geometries->second) {
+ geometry_map.set_recalc(geometry);
+ }
+ }
}
if (updated_geometry) {
diff --git a/intern/cycles/blender/sync.h b/intern/cycles/blender/sync.h
index c2377406876..7e5d0324ca9 100644
--- a/intern/cycles/blender/sync.h
+++ b/intern/cycles/blender/sync.h
@@ -225,6 +225,8 @@ class BlenderSync {
set<Geometry *> geometry_synced;
set<Geometry *> geometry_motion_synced;
set<Geometry *> geometry_motion_attribute_synced;
+ /** Remember which geometries come from which objects to be able to sync them after changes. */
+ map<void *, set<BL::ID>> instance_geometries_by_object;
set<float> motion_times;
void *world_map;
bool world_recalc;
diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp
index 7e19de51daa..4479442df56 100644
--- a/intern/cycles/integrator/pass_accessor.cpp
+++ b/intern/cycles/integrator/pass_accessor.cpp
@@ -138,10 +138,6 @@ bool PassAccessor::get_render_tile_pixels(const RenderBuffers *render_buffers,
return false;
}
- if (pass_access_info_.offset == PASS_UNUSED) {
- return false;
- }
-
const PassType type = pass_access_info_.type;
const PassMode mode = pass_access_info_.mode;
const PassInfo pass_info = Pass::get_info(type, pass_access_info_.include_albedo);
diff --git a/intern/cycles/kernel/integrator/intersect_closest.h b/intern/cycles/kernel/integrator/intersect_closest.h
index 7fb88fc2804..2cac18ed889 100644
--- a/intern/cycles/kernel/integrator/intersect_closest.h
+++ b/intern/cycles/kernel/integrator/intersect_closest.h
@@ -63,6 +63,7 @@ ccl_device_forceinline bool integrator_intersect_terminate(KernelGlobals kg,
* perform MIS as part of indirect rays. */
const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag);
const float probability = path_state_continuation_probability(kg, state, path_flag);
+ INTEGRATOR_STATE_WRITE(state, path, continuation_probability) = probability;
if (probability != 1.0f) {
const float terminate = path_state_rng_1D(kg, &rng_state, PRNG_TERMINATE);
diff --git a/intern/cycles/kernel/integrator/path_state.h b/intern/cycles/kernel/integrator/path_state.h
index 8311b97dedb..c325d829b5c 100644
--- a/intern/cycles/kernel/integrator/path_state.h
+++ b/intern/cycles/kernel/integrator/path_state.h
@@ -67,6 +67,7 @@ ccl_device_inline void path_state_init_integrator(KernelGlobals kg,
INTEGRATOR_STATE_WRITE(state, path, mis_ray_pdf) = 0.0f;
INTEGRATOR_STATE_WRITE(state, path, mis_ray_t) = 0.0f;
INTEGRATOR_STATE_WRITE(state, path, min_ray_pdf) = FLT_MAX;
+ INTEGRATOR_STATE_WRITE(state, path, continuation_probability) = 1.0f;
INTEGRATOR_STATE_WRITE(state, path, throughput) = make_float3(1.0f, 1.0f, 1.0f);
if (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) {
diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h
index cce591eb219..d9006e71ce0 100644
--- a/intern/cycles/kernel/integrator/shade_surface.h
+++ b/intern/cycles/kernel/integrator/shade_surface.h
@@ -479,7 +479,7 @@ ccl_device bool integrate_surface(KernelGlobals kg,
if (!(path_flag & PATH_RAY_SUBSURFACE)) {
const float probability = (path_flag & PATH_RAY_TERMINATE_ON_NEXT_SURFACE) ?
0.0f :
- path_state_continuation_probability(kg, state, path_flag);
+ INTEGRATOR_STATE(state, pat
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list