WIP: Brush assets project #106303
|
@ -278,3 +278,6 @@ StatementMacros:
|
|||
|
||||
MacroBlockBegin: "^OSL_CLOSURE_STRUCT_BEGIN$"
|
||||
MacroBlockEnd: "^OSL_CLOSURE_STRUCT_END$"
|
||||
|
||||
# Ensure lew line at the end of source files.
|
||||
InsertNewlineAtEOF: True
|
||||
|
|
|
@ -849,7 +849,7 @@ function(get_blender_version)
|
|||
# - BLENDER_VERSION_PATCH
|
||||
# - BLENDER_VERSION_CYCLE (alpha, beta, rc, release)
|
||||
|
||||
# So CMAKE depends on `BKE_blender.h`, beware of infinite-loops!
|
||||
# So CMAKE depends on `BKE_blender_version.h`, beware of infinite-loops!
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender_version.h.done
|
||||
|
|
|
@ -27,6 +27,8 @@ from typing import (
|
|||
def man_format(data: str) -> str:
|
||||
data = data.replace("-", "\\-")
|
||||
data = data.replace("\t", " ")
|
||||
# Single quotes prevent text rendering when found at the beginning of lines.
|
||||
data = data.replace("'", "\\(aq")
|
||||
return data
|
||||
|
||||
|
||||
|
|
|
@ -96,11 +96,11 @@ elseif(WIN32 AND MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
# there is no /arch:SSE3, but intrinsics are available anyway
|
||||
if(CMAKE_CL_64)
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE42_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "${CYCLES_AVX2_ARCH_FLAGS} ${CYCLES_KERNEL_FLAGS}")
|
||||
else()
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "/arch:SSE2 ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "/arch:SSE2 ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE42_KERNEL_FLAGS "/arch:SSE2 ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "${CYCLES_AVX2_ARCH_FLAGS} ${CYCLES_KERNEL_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
@ -133,9 +133,9 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
|||
endif()
|
||||
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS} -msse -msse2")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS} -msse3 -mssse3 -msse4.1")
|
||||
set(CYCLES_SSE42_KERNEL_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS} -msse3 -mssse3 -msse4.1 -msse4.2")
|
||||
if(CXX_HAS_AVX2)
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS} -mavx -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mf16c")
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "${CYCLES_SSE42_KERNEL_FLAGS} -mavx -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mf16c")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -147,7 +147,7 @@ elseif(WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
|||
|
||||
if(CXX_HAS_SSE)
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "/QxSSE2")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "/QxSSE4.1")
|
||||
set(CYCLES_SSE42_KERNEL_FLAGS "/QxSSE4.2")
|
||||
|
||||
if(CXX_HAS_AVX2)
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "/QxCORE-AVX2")
|
||||
|
@ -172,7 +172,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
|||
set(CYCLES_SSE2_KERNEL_FLAGS "-xsse2")
|
||||
endif()
|
||||
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "-xsse4.1")
|
||||
set(CYCLES_SSE42_KERNEL_FLAGS "-xsse4.2")
|
||||
|
||||
if(CXX_HAS_AVX2)
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "-xcore-avx2")
|
||||
|
@ -183,7 +183,7 @@ endif()
|
|||
if(CXX_HAS_SSE)
|
||||
add_definitions(
|
||||
-DWITH_KERNEL_SSE2
|
||||
-DWITH_KERNEL_SSE41
|
||||
-DWITH_KERNEL_SSE42
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -969,7 +969,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
|||
return _cycles.debug_flags_update(scene)
|
||||
|
||||
debug_use_cpu_avx2: BoolProperty(name="AVX2", default=True)
|
||||
debug_use_cpu_sse41: BoolProperty(name="SSE41", default=True)
|
||||
debug_use_cpu_sse42: BoolProperty(name="SSE42", default=True)
|
||||
debug_use_cpu_sse2: BoolProperty(name="SSE2", default=True)
|
||||
debug_bvh_layout: EnumProperty(
|
||||
name="BVH Layout",
|
||||
|
|
|
@ -927,6 +927,7 @@ class CYCLES_RENDER_PT_override(CyclesButtonsPanel, Panel):
|
|||
view_layer = context.view_layer
|
||||
|
||||
layout.prop(view_layer, "material_override")
|
||||
layout.prop(view_layer, "world_override")
|
||||
layout.prop(view_layer, "samples")
|
||||
|
||||
|
||||
|
@ -2234,7 +2235,7 @@ class CYCLES_RENDER_PT_debug(CyclesDebugButtonsPanel, Panel):
|
|||
|
||||
row = col.row(align=True)
|
||||
row.prop(cscene, "debug_use_cpu_sse2", toggle=True)
|
||||
row.prop(cscene, "debug_use_cpu_sse41", toggle=True)
|
||||
row.prop(cscene, "debug_use_cpu_sse42", toggle=True)
|
||||
row.prop(cscene, "debug_use_cpu_avx2", toggle=True)
|
||||
col.prop(cscene, "debug_bvh_layout", text="BVH")
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ void BlenderSync::sync_light(BL::Object &b_parent,
|
|||
|
||||
void BlenderSync::sync_background_light(BL::SpaceView3D &b_v3d, bool use_portal)
|
||||
{
|
||||
BL::World b_world = b_scene.world();
|
||||
BL::World b_world = view_layer.world_override ? view_layer.world_override : b_scene.world();
|
||||
|
||||
if (b_world) {
|
||||
PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles");
|
||||
|
|
|
@ -65,7 +65,7 @@ static void debug_flags_sync_from_scene(BL::Scene b_scene)
|
|||
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
||||
/* Synchronize CPU flags. */
|
||||
flags.cpu.avx2 = get_boolean(cscene, "debug_use_cpu_avx2");
|
||||
flags.cpu.sse41 = get_boolean(cscene, "debug_use_cpu_sse41");
|
||||
flags.cpu.sse42 = get_boolean(cscene, "debug_use_cpu_sse42");
|
||||
flags.cpu.sse2 = get_boolean(cscene, "debug_use_cpu_sse2");
|
||||
flags.cpu.bvh_layout = (BVHLayout)get_enum(cscene, "debug_bvh_layout");
|
||||
/* Synchronize CUDA flags. */
|
||||
|
|
|
@ -1592,7 +1592,7 @@ void BlenderSync::sync_world(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d,
|
|||
Integrator *integrator = scene->integrator;
|
||||
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
||||
|
||||
BL::World b_world = b_scene.world();
|
||||
BL::World b_world = view_layer.world_override ? view_layer.world_override : b_scene.world();
|
||||
|
||||
BlenderViewportParameters new_viewport_parameters(b_v3d, use_developer_ui);
|
||||
|
||||
|
|
|
@ -555,6 +555,8 @@ void BlenderSync::sync_view_layer(BL::ViewLayer &b_view_layer)
|
|||
|
||||
/* Material override. */
|
||||
view_layer.material_override = b_view_layer.material_override();
|
||||
/* World override. */
|
||||
view_layer.world_override = b_view_layer.world_override();
|
||||
|
||||
/* Sample override. */
|
||||
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
||||
|
|
|
@ -249,6 +249,7 @@ class BlenderSync {
|
|||
struct RenderLayerInfo {
|
||||
RenderLayerInfo()
|
||||
: material_override(PointerRNA_NULL),
|
||||
world_override(PointerRNA_NULL),
|
||||
use_background_shader(true),
|
||||
use_surfaces(true),
|
||||
use_hair(true),
|
||||
|
@ -261,6 +262,7 @@ class BlenderSync {
|
|||
|
||||
string name;
|
||||
BL::Material material_override;
|
||||
BL::World world_override;
|
||||
bool use_background_shader;
|
||||
bool use_surfaces;
|
||||
bool use_hair;
|
||||
|
|
|
@ -47,7 +47,7 @@ string device_cpu_capabilities()
|
|||
{
|
||||
string capabilities = "";
|
||||
capabilities += system_cpu_support_sse2() ? "SSE2 " : "";
|
||||
capabilities += system_cpu_support_sse41() ? "SSE41 " : "";
|
||||
capabilities += system_cpu_support_sse42() ? "SSE42 " : "";
|
||||
capabilities += system_cpu_support_avx2() ? "AVX2" : "";
|
||||
if (capabilities[capabilities.size() - 1] == ' ') {
|
||||
capabilities.resize(capabilities.size() - 1);
|
||||
|
|
|
@ -10,7 +10,7 @@ CCL_NAMESPACE_BEGIN
|
|||
|
||||
#define KERNEL_FUNCTIONS(name) \
|
||||
KERNEL_NAME_EVAL(cpu, name), KERNEL_NAME_EVAL(cpu_sse2, name), \
|
||||
KERNEL_NAME_EVAL(cpu_sse41, name), KERNEL_NAME_EVAL(cpu_avx2, name)
|
||||
KERNEL_NAME_EVAL(cpu_sse42, name), KERNEL_NAME_EVAL(cpu_avx2, name)
|
||||
|
||||
#define REGISTER_KERNEL(name) name(KERNEL_FUNCTIONS(name))
|
||||
#define REGISTER_KERNEL_FILM_CONVERT(name) \
|
||||
|
|
|
@ -13,15 +13,15 @@ CCL_NAMESPACE_BEGIN
|
|||
*
|
||||
* Provides a function-call-like API which gets routed to the most suitable implementation.
|
||||
*
|
||||
* For example, on a computer which only has SSE4.1 the kernel_sse41 will be used. */
|
||||
* For example, on a computer which only has SSE4.2 the kernel_sse42 will be used. */
|
||||
template<typename FunctionType> class CPUKernelFunction {
|
||||
public:
|
||||
CPUKernelFunction(FunctionType kernel_default,
|
||||
FunctionType kernel_sse2,
|
||||
FunctionType kernel_sse41,
|
||||
FunctionType kernel_sse42,
|
||||
FunctionType kernel_avx2)
|
||||
{
|
||||
kernel_info_ = get_best_kernel_info(kernel_default, kernel_sse2, kernel_sse41, kernel_avx2);
|
||||
kernel_info_ = get_best_kernel_info(kernel_default, kernel_sse2, kernel_sse42, kernel_avx2);
|
||||
}
|
||||
|
||||
template<typename... Args> inline auto operator()(Args... args) const
|
||||
|
@ -56,12 +56,12 @@ template<typename FunctionType> class CPUKernelFunction {
|
|||
|
||||
KernelInfo get_best_kernel_info(FunctionType kernel_default,
|
||||
FunctionType kernel_sse2,
|
||||
FunctionType kernel_sse41,
|
||||
FunctionType kernel_sse42,
|
||||
FunctionType kernel_avx2)
|
||||
{
|
||||
/* Silence warnings about unused variables when compiling without some architectures. */
|
||||
(void)kernel_sse2;
|
||||
(void)kernel_sse41;
|
||||
(void)kernel_sse42;
|
||||
(void)kernel_avx2;
|
||||
|
||||
#ifdef WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
|
||||
|
@ -70,9 +70,9 @@ template<typename FunctionType> class CPUKernelFunction {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
|
||||
if (DebugFlags().cpu.has_sse41() && system_cpu_support_sse41()) {
|
||||
return KernelInfo("SSE4.1", kernel_sse41);
|
||||
#ifdef WITH_CYCLES_OPTIMIZED_KERNEL_SSE42
|
||||
if (DebugFlags().cpu.has_sse42() && system_cpu_support_sse42()) {
|
||||
return KernelInfo("SSE4.2", kernel_sse42);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -86,8 +86,14 @@ Device *Denoiser::get_denoiser_device() const
|
|||
}
|
||||
|
||||
/* Check whether given device is single (not a MultiDevice) and supports requested denoiser. */
|
||||
static bool is_single_supported_device(Device *device, DenoiserType type)
|
||||
static bool is_single_supported_device(const Device *device,
|
||||
const uint device_type_mask,
|
||||
const DenoiserType type)
|
||||
{
|
||||
if (!(device_type_mask & (1 << device->info.type))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (device->info.type == DEVICE_MULTI) {
|
||||
/* Assume multi-device is never created with a single sub-device.
|
||||
* If one requests such configuration it should be checked on the session level. */
|
||||
|
@ -109,11 +115,16 @@ static bool is_single_supported_device(Device *device, DenoiserType type)
|
|||
* multi-device.
|
||||
*
|
||||
* If there is no device available which supports given denoiser type nullptr is returned. */
|
||||
static Device *find_best_device(Device *device, DenoiserType type)
|
||||
static Device *find_best_device(Device *device,
|
||||
const uint device_type_mask,
|
||||
const DenoiserType type)
|
||||
{
|
||||
Device *best_device = nullptr;
|
||||
|
||||
device->foreach_device([&](Device *sub_device) {
|
||||
if (!(device_type_mask & (1 << sub_device->info.type))) {
|
||||
return;
|
||||
}
|
||||
if ((sub_device->info.denoisers & type) == 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -137,7 +148,7 @@ static Device *find_best_device(Device *device, DenoiserType type)
|
|||
}
|
||||
|
||||
static DeviceInfo find_best_denoiser_device_info(const vector<DeviceInfo> &device_infos,
|
||||
DenoiserType denoiser_type)
|
||||
const DenoiserType denoiser_type)
|
||||
{
|
||||
for (const DeviceInfo &device_info : device_infos) {
|
||||
if ((device_info.denoisers & denoiser_type) == 0) {
|
||||
|
@ -159,7 +170,7 @@ static DeviceInfo find_best_denoiser_device_info(const vector<DeviceInfo> &devic
|
|||
|
||||
static unique_ptr<Device> create_denoiser_device(Device *path_trace_device,
|
||||
const uint device_type_mask,
|
||||
DenoiserType denoiser_type)
|
||||
const DenoiserType denoiser_type)
|
||||
{
|
||||
const vector<DeviceInfo> device_infos = Device::available_devices(device_type_mask);
|
||||
if (device_infos.empty()) {
|
||||
|
@ -199,14 +210,16 @@ Device *Denoiser::ensure_denoiser_device(Progress *progress)
|
|||
return denoiser_device_;
|
||||
}
|
||||
|
||||
const uint device_type_mask = get_device_type_mask();
|
||||
|
||||
/* Simple case: rendering happens on a single device which also supports denoiser. */
|
||||
if (is_single_supported_device(path_trace_device_, params_.type)) {
|
||||
if (is_single_supported_device(path_trace_device_, device_type_mask, params_.type)) {
|
||||
denoiser_device_ = path_trace_device_;
|
||||
return denoiser_device_;
|
||||
}
|
||||
|
||||
/* Find best device from the ones which are already used for rendering. */
|
||||
denoiser_device_ = find_best_device(path_trace_device_, params_.type);
|
||||
denoiser_device_ = find_best_device(path_trace_device_, device_type_mask, params_.type);
|
||||
if (denoiser_device_) {
|
||||
return denoiser_device_;
|
||||
}
|
||||
|
@ -217,7 +230,6 @@ Device *Denoiser::ensure_denoiser_device(Progress *progress)
|
|||
|
||||
device_creation_attempted_ = true;
|
||||
|
||||
const uint device_type_mask = get_device_type_mask();
|
||||
local_denoiser_device_ = create_denoiser_device(
|
||||
path_trace_device_, device_type_mask, params_.type);
|
||||
denoiser_device_ = local_denoiser_device_.get();
|
||||
|
|
|
@ -1002,6 +1002,9 @@ void PathTrace::process_full_buffer_from_disk(string_view filename)
|
|||
if (denoise_params.use) {
|
||||
progress_set_status(layer_view_name, "Denoising");
|
||||
|
||||
/* If GPU should be used is not based on file metadata. */
|
||||
denoise_params.use_gpu = render_scheduler_.is_denoiser_gpu_used();
|
||||
|
||||
/* Re-use the denoiser as much as possible, avoiding possible device re-initialization.
|
||||
*
|
||||
* It will not conflict with the regular rendering as:
|
||||
|
|
|
@ -46,6 +46,11 @@ void RenderScheduler::set_denoiser_params(const DenoiseParams ¶ms)
|
|||
denoiser_params_ = params;
|
||||
}
|
||||
|
||||
bool RenderScheduler::is_denoiser_gpu_used() const
|
||||
{
|
||||
return denoiser_params_.use_gpu;
|
||||
}
|
||||
|
||||
void RenderScheduler::set_limit_samples_per_update(const int limit_samples)
|
||||
{
|
||||
limit_samples_per_update_ = limit_samples;
|
||||
|
|
|
@ -99,8 +99,9 @@ class RenderScheduler {
|
|||
bool is_background() const;
|
||||
|
||||
void set_denoiser_params(const DenoiseParams ¶ms);
|
||||
void set_adaptive_sampling(const AdaptiveSampling &adaptive_sampling);
|
||||
bool is_denoiser_gpu_used() const;
|
||||
|
||||
void set_adaptive_sampling(const AdaptiveSampling &adaptive_sampling);
|
||||
bool is_adaptive_sampling_used() const;
|
||||
|
||||
/* Start sample for path tracing.
|
||||
|
|
|
@ -15,7 +15,7 @@ set(INC_SYS
|
|||
set(SRC_KERNEL_DEVICE_CPU
|
||||
device/cpu/kernel.cpp
|
||||
device/cpu/kernel_sse2.cpp
|
||||
device/cpu/kernel_sse41.cpp
|
||||
device/cpu/kernel_sse42.cpp
|
||||
device/cpu/kernel_avx2.cpp
|
||||
)
|
||||
|
||||
|
@ -1165,7 +1165,7 @@ set_source_files_properties(device/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CY
|
|||
|
||||
if(CXX_HAS_SSE)
|
||||
set_source_files_properties(device/cpu/kernel_sse2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS}")
|
||||
set_source_files_properties(device/cpu/kernel_sse41.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS}")
|
||||
set_source_files_properties(device/cpu/kernel_sse42.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE42_KERNEL_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(CXX_HAS_AVX2)
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
# ifdef __SSSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
# endif
|
||||
# ifdef __SSE4_1__
|
||||
# define __KERNEL_SSE41__
|
||||
# ifdef __SSE4_2__
|
||||
# define __KERNEL_SSE42__
|
||||
# endif
|
||||
# ifdef __AVX__
|
||||
# ifndef __KERNEL_SSE__
|
||||
|
|
|
@ -36,7 +36,7 @@ void kernel_global_memory_copy(KernelGlobalsCPU *kg, const char *name, void *mem
|
|||
#define KERNEL_ARCH cpu_sse2
|
||||
#include "kernel/device/cpu/kernel_arch.h"
|
||||
|
||||
#define KERNEL_ARCH cpu_sse41
|
||||
#define KERNEL_ARCH cpu_sse42
|
||||
#include "kernel/device/cpu/kernel_arch.h"
|
||||
|
||||
#define KERNEL_ARCH cpu_avx2
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
# define __KERNEL_SSE41__
|
||||
# define __KERNEL_SSE42__
|
||||
# define __KERNEL_AVX__
|
||||
# define __KERNEL_AVX2__
|
||||
# endif
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "util/optimization.h"
|
||||
|
||||
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
|
||||
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_SSE42
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug #36316. */
|
||||
|
@ -16,10 +16,10 @@
|
|||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
# define __KERNEL_SSE41__
|
||||
# define __KERNEL_SSE42__
|
||||
# endif
|
||||
#endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 */
|
||||
#endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE42 */
|
||||
|
||||
#include "kernel/device/cpu/kernel.h"
|
||||
#define KERNEL_ARCH cpu_sse41
|
||||
#define KERNEL_ARCH cpu_sse42
|
||||
#include "kernel/device/cpu/kernel_arch_impl.h"
|
|
@ -27,7 +27,7 @@ set(SRC
|
|||
time.cpp
|
||||
transform.cpp
|
||||
transform_avx2.cpp
|
||||
transform_sse41.cpp
|
||||
transform_sse42.cpp
|
||||
windows.cpp
|
||||
)
|
||||
|
||||
|
@ -137,7 +137,7 @@ set(SRC_HEADERS
|
|||
)
|
||||
|
||||
if(CXX_HAS_SSE)
|
||||
set_source_files_properties(transform_sse41.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS}")
|
||||
set_source_files_properties(transform_sse42.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE42_KERNEL_FLAGS}")
|
||||
endif()
|
||||
if(CXX_HAS_AVX2)
|
||||
set_source_files_properties(transform_avx2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
|
||||
|
|
|
@ -30,7 +30,7 @@ void DebugFlags::CPU::reset()
|
|||
} while (0)
|
||||
|
||||
CHECK_CPU_FLAGS(avx2, "CYCLES_CPU_NO_AVX2");
|
||||
CHECK_CPU_FLAGS(sse41, "CYCLES_CPU_NO_SSE41");
|
||||
CHECK_CPU_FLAGS(sse42, "CYCLES_CPU_NO_SSE42");
|
||||
CHECK_CPU_FLAGS(sse2, "CYCLES_CPU_NO_SSE2");
|
||||
|
||||
#undef STRINGIFY
|
||||
|
|
|
@ -26,7 +26,7 @@ class DebugFlags {
|
|||
|
||||
/* Flags describing which instructions sets are allowed for use. */
|
||||
bool avx2 = true;
|
||||
bool sse41 = true;
|
||||
bool sse42 = true;
|
||||
bool sse2 = true;
|
||||
|
||||
/* Check functions to see whether instructions up to the given one
|
||||
|
@ -34,11 +34,11 @@ class DebugFlags {
|
|||
*/
|
||||
bool has_avx2()
|
||||
{
|
||||
return has_sse41() && avx2;
|
||||
return has_sse42() && avx2;
|
||||
}
|
||||
bool has_sse41()
|
||||
bool has_sse42()
|
||||
{
|
||||
return has_sse2() && sse41;
|
||||
return has_sse2() && sse42;
|
||||
}
|
||||
bool has_sse2()
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ static int guiding_device_type()
|
|||
if (system_cpu_support_avx2()) {
|
||||
return 8;
|
||||
}
|
||||
if (system_cpu_support_sse41()) {
|
||||
if (system_cpu_support_sse42()) {
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -62,7 +62,7 @@ ccl_device_inline float4 madd4(const float4 a, const float4 b, const float4 c)
|
|||
ccl_device_inline int fast_rint(float x)
|
||||
{
|
||||
/* used by sin/cos/tan range reduction. */
|
||||
#ifdef __KERNEL_SSE41__
|
||||
#ifdef __KERNEL_SSE42__
|
||||
/* Single `roundps` instruction on SSE4.1+ for gcc/clang but not MSVC 19.35:
|
||||
* float_to_int(rintf(x)); so we use the equivalent intrinsics. */
|
||||
__m128 vec = _mm_set_ss(x);
|
||||
|
|
|
@ -200,7 +200,7 @@ ccl_device_inline bool operator!=(const float3 a, const float3 b)
|
|||
|
||||
ccl_device_inline float dot(const float3 a, const float3 b)
|
||||
{
|
||||
# if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
|
||||
# if defined(__KERNEL_SSE42__) && defined(__KERNEL_SSE__)
|
||||
return _mm_cvtss_f32(_mm_dp_ps(a, b, 0x7F));
|
||||
# else
|
||||
return a.x * b.x + a.y * b.y + a.z * b.z;
|
||||
|
@ -211,7 +211,7 @@ ccl_device_inline float dot(const float3 a, const float3 b)
|
|||
|
||||
ccl_device_inline float dot_xy(const float3 a, const float3 b)
|
||||
{
|
||||
#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
|
||||
#if defined(__KERNEL_SSE42__) && defined(__KERNEL_SSE__)
|
||||
return _mm_cvtss_f32(_mm_hadd_ps(_mm_mul_ps(a, b), b));
|
||||
#else
|
||||
return a.x * b.x + a.y * b.y;
|
||||
|
@ -220,7 +220,7 @@ ccl_device_inline float dot_xy(const float3 a, const float3 b)
|
|||
|
||||
ccl_device_inline float len(const float3 a)
|
||||
{
|
||||
#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
|
||||
#if defined(__KERNEL_SSE42__) && defined(__KERNEL_SSE__)
|
||||
return _mm_cvtss_f32(_mm_sqrt_ss(_mm_dp_ps(a.m128, a.m128, 0x7F)));
|
||||
#else
|
||||
return sqrtf(dot(a, a));
|
||||
|
@ -264,7 +264,7 @@ ccl_device_inline float3 cross(const float3 a, const float3 b)
|
|||
|
||||
ccl_device_inline float3 normalize(const float3 a)
|
||||
{
|
||||
# if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
|
||||
# if defined(__KERNEL_SSE42__) && defined(__KERNEL_SSE__)
|
||||
__m128 norm = _mm_sqrt_ps(_mm_dp_ps(a.m128, a.m128, 0x7F));
|
||||
return float3(_mm_div_ps(a.m128, norm));
|
||||
# else
|
||||
|
|
|
@ -364,7 +364,7 @@ ccl_device_inline float reduce_max(const float4 a)
|
|||
#if !defined(__KERNEL_METAL__)
|
||||
ccl_device_inline float dot(const float4 a, const float4 b)
|
||||
{
|
||||
# if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
|
||||
# if defined(__KERNEL_SSE42__) && defined(__KERNEL_SSE__)
|
||||
# if defined(__KERNEL_NEON__)
|
||||
__m128 t = vmulq_f32(a, b);
|
||||
return vaddvq_f32(t);
|
||||
|
@ -534,7 +534,7 @@ ccl_device_inline bool isequal(const float4 a, const float4 b)
|
|||
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
|
||||
{
|
||||
# ifdef __KERNEL_SSE__
|
||||
# ifdef __KERNEL_SSE41__
|
||||
# ifdef __KERNEL_SSE42__
|
||||
return float4(_mm_blendv_ps(b.m128, a.m128, _mm_castsi128_ps(mask.m128)));
|
||||
# else
|
||||
return float4(
|
||||
|
|
|
@ -14,7 +14,7 @@ CCL_NAMESPACE_BEGIN
|
|||
#if !defined(__KERNEL_METAL__)
|
||||
ccl_device_inline int3 min(int3 a, int3 b)
|
||||
{
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE42__)
|
||||
return int3(_mm_min_epi32(a.m128, b.m128));
|
||||
# else
|
||||
return make_int3(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z));
|
||||
|
@ -23,7 +23,7 @@ ccl_device_inline int3 min(int3 a, int3 b)
|
|||
|
||||
ccl_device_inline int3 max(int3 a, int3 b)
|
||||
{
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE42__)
|
||||
return int3(_mm_max_epi32(a.m128, b.m128));
|
||||
# else
|
||||
return make_int3(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z));
|
||||
|
|
|
@ -203,7 +203,7 @@ ccl_device_forceinline const int4 srl(const int4 a, const int32_t b)
|
|||
|
||||
ccl_device_inline int4 min(int4 a, int4 b)
|
||||
{
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE42__)
|
||||
return int4(_mm_min_epi32(a.m128, b.m128));
|
||||
# else
|
||||
return make_int4(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z), min(a.w, b.w));
|
||||
|
@ -212,7 +212,7 @@ ccl_device_inline int4 min(int4 a, int4 b)
|
|||
|
||||
ccl_device_inline int4 max(int4 a, int4 b)
|
||||
{
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
|
||||
# if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE42__)
|
||||
return int4(_mm_max_epi32(a.m128, b.m128));
|
||||
# else
|
||||
return make_int4(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z), max(a.w, b.w));
|
||||
|
|
|
@ -136,7 +136,7 @@ ccl_device_forceinline float ray_triangle_rcp(const float x)
|
|||
|
||||
ccl_device_inline float ray_triangle_dot(const float3 a, const float3 b)
|
||||
{
|
||||
#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
|
||||
#if defined(__KERNEL_SSE42__) && defined(__KERNEL_SSE__)
|
||||
return madd(make_float4(a.x),
|
||||
make_float4(b.x),
|
||||
madd(make_float4(a.y), make_float4(b.y), make_float4(a.z) * make_float4(b.z)))[0];
|
||||
|
@ -147,7 +147,7 @@ ccl_device_inline float ray_triangle_dot(const float3 a, const float3 b)
|
|||
|
||||
ccl_device_inline float3 ray_triangle_cross(const float3 a, const float3 b)
|
||||
{
|
||||
#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
|
||||
#if defined(__KERNEL_SSE42__) && defined(__KERNEL_SSE__)
|
||||
return make_float3(
|
||||
msub(make_float4(a.y), make_float4(b.z), make_float4(a.z) * make_float4(b.y))[0],
|
||||
msub(make_float4(a.z), make_float4(b.x), make_float4(a.x) * make_float4(b.z))[0],
|
||||
|
|
|
@ -20,7 +20,7 @@ static inline bool openimagedenoise_supported()
|
|||
/* Always supported through Accelerate framework BNNS. */
|
||||
return true;
|
||||
# else
|
||||
return system_cpu_support_sse41();
|
||||
return system_cpu_support_sse42();
|
||||
# endif
|
||||
#else
|
||||
return false;
|
||||
|
|
|
@ -21,15 +21,15 @@
|
|||
|
||||
/* x86-64
|
||||
*
|
||||
* Compile a regular (includes SSE2), SSE3, SSE 4.1, AVX and AVX2 kernel. */
|
||||
* Compile a regular (includes SSE2), SSE 4.2 and AVX2 kernel. */
|
||||
|
||||
# elif defined(__x86_64__) || defined(_M_X64)
|
||||
|
||||
/* SSE2 is always available on x86-64 CPUs, so auto enable */
|
||||
# define __KERNEL_SSE2__
|
||||
/* no SSE2 kernel on x86-64, part of regular kernel */
|
||||
# ifdef WITH_KERNEL_SSE41
|
||||
# define WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
|
||||
# ifdef WITH_KERNEL_SSE42
|
||||
# define WITH_CYCLES_OPTIMIZED_KERNEL_SSE42
|
||||
# endif
|
||||
# ifdef WITH_KERNEL_AVX2
|
||||
# define WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
|
||||
|
@ -47,7 +47,7 @@
|
|||
# define __KERNEL_SSE__
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
# define __KERNEL_SSE41__
|
||||
# define __KERNEL_SSE42__
|
||||
|
||||
# endif
|
||||
|
||||
|
|
|
@ -463,10 +463,10 @@ __forceinline uint64_t bitscan(uint64_t value)
|
|||
* implementations. */
|
||||
#ifdef __KERNEL_SSE2__
|
||||
|
||||
/* Test __KERNEL_SSE41__ for MSVC which does not define __SSE4_1__, and test
|
||||
* __SSE4_1__ to avoid OpenImageIO conflicts with our emulation macros on other
|
||||
/* Test __KERNEL_SSE42__ for MSVC which does not define __SSE4_2__, and test
|
||||
* __SSE4_1__ and __SSE4_2__ to avoid OpenImageIO conflicts with our emulation macros on other
|
||||
* platforms when compiling code outside the kernel. */
|
||||
# if !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__))
|
||||
# if !(defined(__KERNEL_SSE42__) || defined(__SSE4_1__) || defined(__SSE4_2__))
|
||||
|
||||
/* Emulation of SSE4 functions with SSE2 */
|
||||
|
||||
|
@ -573,7 +573,7 @@ __forceinline __m128 _mm_round_ps_emu(__m128 value, const int flags)
|
|||
return value;
|
||||
}
|
||||
|
||||
# endif /* !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__)) */
|
||||
# endif /* !(defined(__KERNEL_SSE42__) || defined(__SSE4_1__) || defined(__SSE4_2__)) */
|
||||
|
||||
/* Older GCC versions do not have _mm256_cvtss_f32 yet, so define it ourselves.
|
||||
* _mm256_castps256_ps128 generates no instructions so this is just as efficient. */
|
||||
|
@ -586,7 +586,7 @@ __forceinline __m128 _mm_round_ps_emu(__m128 value, const int flags)
|
|||
|
||||
/* quiet unused define warnings */
|
||||
#if defined(__KERNEL_SSE2__) || defined(__KERNEL_SSE3__) || defined(__KERNEL_SSSE3__) || \
|
||||
defined(__KERNEL_SSE41__) || defined(__KERNEL_AVX__) || defined(__KERNEL_AVX2__)
|
||||
defined(__KERNEL_SSE42__) || defined(__KERNEL_AVX__) || defined(__KERNEL_AVX2__)
|
||||
/* do nothing */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -130,9 +130,7 @@ int system_cpu_bits()
|
|||
|
||||
struct CPUCapabilities {
|
||||
bool sse2;
|
||||
bool sse3;
|
||||
bool sse41;
|
||||
bool avx;
|
||||
bool sse42;
|
||||
bool avx2;
|
||||
};
|
||||
|
||||
|
@ -155,7 +153,7 @@ static CPUCapabilities &system_cpu_capabilities()
|
|||
|
||||
const bool ssse3 = (result[2] & ((int)1 << 9)) != 0;
|
||||
const bool sse41 = (result[2] & ((int)1 << 19)) != 0;
|
||||
// const bool sse42 = (result[2] & ((int)1 << 20)) != 0;
|
||||
const bool sse42 = (result[2] & ((int)1 << 20)) != 0;
|
||||
|
||||
const bool fma3 = (result[2] & ((int)1 << 12)) != 0;
|
||||
const bool os_uses_xsave_xrestore = (result[2] & ((int)1 << 27)) != 0;
|
||||
|
@ -163,8 +161,7 @@ static CPUCapabilities &system_cpu_capabilities()
|
|||
|
||||
/* Simplify to combined capabilities for which we specialize kernels. */
|
||||
caps.sse2 = sse && sse2;
|
||||
caps.sse3 = sse && sse2 && sse3 && ssse3;
|
||||
caps.sse41 = sse && sse2 && sse3 && ssse3 && sse41;
|
||||
caps.sse42 = sse && sse2 && sse3 && ssse3 && sse41 && sse42;
|
||||
|
||||
if (os_uses_xsave_xrestore && cpu_avx_support) {
|
||||
// Check if the OS will save the YMM registers
|
||||
|
@ -187,9 +184,8 @@ static CPUCapabilities &system_cpu_capabilities()
|
|||
bool bmi2 = (result[1] & ((int)1 << 8)) != 0;
|
||||
bool avx2 = (result[1] & ((int)1 << 5)) != 0;
|
||||
|
||||
caps.avx = sse && sse2 && sse3 && ssse3 && sse41 && avx;
|
||||
caps.avx2 = sse && sse2 && sse3 && ssse3 && sse41 && avx && f16c && avx2 && fma3 && bmi1 &&
|
||||
bmi2;
|
||||
caps.avx2 = sse && sse2 && sse3 && ssse3 && sse41 && sse42 && avx && f16c && avx2 &&
|
||||
fma3 && bmi1 && bmi2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,10 +201,10 @@ bool system_cpu_support_sse2()
|
|||
return caps.sse2;
|
||||
}
|
||||
|
||||
bool system_cpu_support_sse41()
|
||||
bool system_cpu_support_sse42()
|
||||
{
|
||||
CPUCapabilities &caps = system_cpu_capabilities();
|
||||
return caps.sse41;
|
||||
return caps.sse42;
|
||||
}
|
||||
|
||||
bool system_cpu_support_avx2()
|
||||
|
@ -223,7 +219,7 @@ bool system_cpu_support_sse2()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool system_cpu_support_sse41()
|
||||
bool system_cpu_support_sse42()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ int system_console_width();
|
|||
std::string system_cpu_brand_string();
|
||||
int system_cpu_bits();
|
||||
bool system_cpu_support_sse2();
|
||||
bool system_cpu_support_sse41();
|
||||
bool system_cpu_support_sse42();
|
||||
bool system_cpu_support_avx2();
|
||||
|
||||
size_t system_physical_ram();
|
||||
|
|
|
@ -405,7 +405,7 @@ ccl_device_inline float4 quat_interpolate(float4 q1, float4 q2, float t)
|
|||
}
|
||||
|
||||
#ifndef __KERNEL_GPU__
|
||||
void transform_inverse_cpu_sse41(const Transform &tfm, Transform &itfm);
|
||||
void transform_inverse_cpu_sse42(const Transform &tfm, Transform &itfm);
|
||||
void transform_inverse_cpu_avx2(const Transform &tfm, Transform &itfm);
|
||||
#endif
|
||||
|
||||
|
@ -418,9 +418,9 @@ ccl_device_inline Transform transform_inverse(const Transform tfm)
|
|||
transform_inverse_cpu_avx2(tfm, itfm);
|
||||
return itfm;
|
||||
}
|
||||
else if (system_cpu_support_sse41()) {
|
||||
else if (system_cpu_support_sse42()) {
|
||||
Transform itfm;
|
||||
transform_inverse_cpu_sse41(tfm, itfm);
|
||||
transform_inverse_cpu_sse42(tfm, itfm);
|
||||
return itfm;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -30,7 +30,7 @@ ccl_device_forceinline float3 transform_inverse_cross(const float3 a_, const flo
|
|||
|
||||
ccl_device_forceinline float transform_inverse_dot(const float3 a_, const float3 b_)
|
||||
{
|
||||
#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
|
||||
#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE42__)
|
||||
const __m128 a = (const __m128 &)a_;
|
||||
const __m128 b = (const __m128 &)b_;
|
||||
return _mm_cvtss_f32(_mm_dp_ps(a, b, 0x7F));
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
void transform_inverse_cpu_sse41(const Transform &tfm, Transform &itfm)
|
||||
void transform_inverse_cpu_sse42(const Transform &tfm, Transform &itfm)
|
||||
{
|
||||
itfm = transform_inverse_impl(tfm);
|
||||
}
|
Binary file not shown.
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "GPU_platform.h"
|
||||
|
||||
#include "BLO_readfile.h" /* own include */
|
||||
#include "BLO_userdef_default.h" /* own include */
|
||||
|
||||
const UserDef U_default = {
|
||||
.versionfile = BLENDER_FILE_VERSION,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "DNA_userdef_types.h"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
#include "BLO_userdef_default.h"
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ def keyconfig_update(keyconfig_data, keyconfig_version):
|
|||
nonlocal has_copy
|
||||
|
||||
changed_items = []
|
||||
for kmi_index, (km_name, _km_parms, km_items_data) in enumerate(keyconfig_data):
|
||||
for km_index, (km_name, _km_parms, km_items_data) in enumerate(keyconfig_data):
|
||||
for kmi_item_index, (item_op, item_event, item_prop) in enumerate(km_items_data["items"]):
|
||||
if item_prop and item_op in op_prop_map:
|
||||
properties = item_prop.get("properties", [])
|
||||
|
@ -41,17 +41,30 @@ def keyconfig_update(keyconfig_data, keyconfig_version):
|
|||
filtered_properties = None
|
||||
|
||||
if filtered_properties is None or len(filtered_properties) < len(properties):
|
||||
changed_items.append((kmi_index, kmi_item_index, filtered_properties))
|
||||
changed_items.append((km_index, kmi_item_index, filtered_properties))
|
||||
|
||||
if changed_items:
|
||||
if not has_copy:
|
||||
keyconfig_data = copy.deepcopy(keyconfig_data)
|
||||
has_copy = True
|
||||
|
||||
for kmi_index, kmi_item_index, filtered_properties in changed_items:
|
||||
item_op, item_event, item_prop = keyconfig_data[kmi_index][2]["items"][kmi_item_index]
|
||||
for km_index, kmi_item_index, filtered_properties in changed_items:
|
||||
item_op, item_event, item_prop = keyconfig_data[km_index][2]["items"][kmi_item_index]
|
||||
item_prop["properties"] = filtered_properties
|
||||
keyconfig_data[kmi_index][2]["items"][kmi_item_index] = (item_op, item_event, item_prop)
|
||||
keyconfig_data[km_index][2]["items"][kmi_item_index] = (item_op, item_event, item_prop)
|
||||
|
||||
def rename_keymap(km_name_map):
|
||||
nonlocal keyconfig_data
|
||||
nonlocal has_copy
|
||||
|
||||
for km_index, (km_name, km_parms, km_items_data) in enumerate(keyconfig_data):
|
||||
km_name_dst = km_name_map.get(km_name)
|
||||
if km_name_dst is None:
|
||||
continue
|
||||
if not has_copy:
|
||||
keyconfig_data = copy.deepcopy(keyconfig_data)
|
||||
has_copy = True
|
||||
keyconfig_data[km_index] = (km_name_dst, km_parms, km_items_data)
|
||||
|
||||
# Default repeat to false.
|
||||
if keyconfig_version <= (2, 92, 0):
|
||||
|
@ -164,4 +177,7 @@ def keyconfig_update(keyconfig_data, keyconfig_version):
|
|||
km_items_data["items"].append(
|
||||
("PASSTHROUGH_NAVIGATE", {"type": 'LEFT_ALT', "value": 'ANY', "any": True}, None))
|
||||
|
||||
if keyconfig_version <= (4, 1, 21):
|
||||
rename_keymap({"NLA Channels": "NLA Tracks"})
|
||||
|
||||
return keyconfig_data
|
||||
|
|
|
@ -205,11 +205,40 @@ def bake_action_iter(
|
|||
"bbone_easeout": 1,
|
||||
}
|
||||
|
||||
def can_be_keyed(value):
|
||||
"""Returns a tri-state boolean.
|
||||
|
||||
- True: known to be keyable.
|
||||
- False: known to not be keyable.
|
||||
- None: unknown, might be an enum property for which RNA uses a string to
|
||||
indicate a specific item (keyable) or an actual string property (not
|
||||
keyable).
|
||||
"""
|
||||
if isinstance(value, (int, float, bool)):
|
||||
# These types are certainly keyable.
|
||||
return True
|
||||
if isinstance(value, (list, tuple, set, dict)):
|
||||
# These types are certainly not keyable.
|
||||
return False
|
||||
# Maybe this could be made stricter, as also ID pointer properties and
|
||||
# some other types cannot be keyed. However, the above checks are enough
|
||||
# to fix the crash that this code was written for (#117988).
|
||||
return None
|
||||
|
||||
# Convert rna_prop types (IDPropertyArray, etc) to python types.
|
||||
def clean_custom_properties(obj):
|
||||
if not bake_options.do_custom_props:
|
||||
# Don't bother remembering any custom properties when they're not
|
||||
# going to be baked anyway.
|
||||
return {}
|
||||
|
||||
# Be careful about which properties to actually consider for baking, as
|
||||
# keeping references to complex Blender datastructures around for too long
|
||||
# can cause crashes. See #117988.
|
||||
clean_props = {
|
||||
key: rna_idprop_value_to_python(value)
|
||||
for key, value in obj.items()
|
||||
if can_be_keyed(value) is not False
|
||||
}
|
||||
return clean_props
|
||||
|
||||
|
@ -339,7 +368,8 @@ def bake_action_iter(
|
|||
lookup_fcurves = {(fcurve.data_path, fcurve.array_index): fcurve for fcurve in action.fcurves}
|
||||
if bake_options.do_pose:
|
||||
for f, armature_custom_properties in armature_info:
|
||||
bake_custom_properties(obj, custom_props=armature_custom_properties, frame=f)
|
||||
bake_custom_properties(obj, custom_props=armature_custom_properties,
|
||||
frame=f, group_name="Armature Custom Properties")
|
||||
|
||||
for name, pbone in obj.pose.bones.items():
|
||||
if bake_options.only_selected and not pbone.bone.select:
|
||||
|
|
|
@ -6965,7 +6965,7 @@ def km_image_editor_tool_generic_sample(params):
|
|||
|
||||
def km_image_editor_tool_uv_cursor(params):
|
||||
return (
|
||||
"Image Editor Tool: UV, Cursor",
|
||||
"Image Editor Tool: Uv, Cursor",
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("uv.cursor_set", {"type": params.tool_mouse, "value": 'PRESS'}, None),
|
||||
|
@ -6978,7 +6978,7 @@ def km_image_editor_tool_uv_cursor(params):
|
|||
|
||||
def km_image_editor_tool_uv_select(params, *, fallback):
|
||||
return (
|
||||
_fallback_id("Image Editor Tool: UV, Tweak", fallback),
|
||||
_fallback_id("Image Editor Tool: Uv, Tweak", fallback),
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
*([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else _template_items_tool_select(
|
||||
|
@ -6996,7 +6996,7 @@ def km_image_editor_tool_uv_select(params, *, fallback):
|
|||
|
||||
def km_image_editor_tool_uv_select_box(params, *, fallback):
|
||||
return (
|
||||
_fallback_id("Image Editor Tool: UV, Select Box", fallback),
|
||||
_fallback_id("Image Editor Tool: Uv, Select Box", fallback),
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
*([] if (fallback and not params.use_fallback_tool) else _template_items_tool_select_actions_simple(
|
||||
|
@ -7010,7 +7010,7 @@ def km_image_editor_tool_uv_select_box(params, *, fallback):
|
|||
|
||||
def km_image_editor_tool_uv_select_circle(params, *, fallback):
|
||||
return (
|
||||
_fallback_id("Image Editor Tool: UV, Select Circle", fallback),
|
||||
_fallback_id("Image Editor Tool: Uv, Select Circle", fallback),
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
*([] if (fallback and not params.use_fallback_tool) else _template_items_tool_select_actions_simple(
|
||||
|
@ -7025,7 +7025,7 @@ def km_image_editor_tool_uv_select_circle(params, *, fallback):
|
|||
|
||||
def km_image_editor_tool_uv_select_lasso(params, *, fallback):
|
||||
return (
|
||||
_fallback_id("Image Editor Tool: UV, Select Lasso", fallback),
|
||||
_fallback_id("Image Editor Tool: Uv, Select Lasso", fallback),
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
|
||||
{"items": [
|
||||
|
@ -7039,7 +7039,7 @@ def km_image_editor_tool_uv_select_lasso(params, *, fallback):
|
|||
|
||||
def km_image_editor_tool_uv_rip_region(params):
|
||||
return (
|
||||
"Image Editor Tool: UV, Rip Region",
|
||||
"Image Editor Tool: Uv, Rip Region",
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("uv.rip_move", {**params.tool_maybe_tweak_event, **params.tool_modifier},
|
||||
|
@ -7050,7 +7050,7 @@ def km_image_editor_tool_uv_rip_region(params):
|
|||
|
||||
def km_image_editor_tool_uv_sculpt_stroke(params):
|
||||
return (
|
||||
"Image Editor Tool: UV, Sculpt Stroke",
|
||||
"Image Editor Tool: Uv, Sculpt Stroke",
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("sculpt.uv_sculpt_stroke", {"type": params.tool_mouse, "value": 'PRESS'}, None),
|
||||
|
@ -7069,7 +7069,7 @@ def km_image_editor_tool_uv_sculpt_stroke(params):
|
|||
|
||||
def km_image_editor_tool_uv_move(params):
|
||||
return (
|
||||
"Image Editor Tool: UV, Move",
|
||||
"Image Editor Tool: Uv, Move",
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("transform.translate", {**params.tool_maybe_tweak_event, **params.tool_modifier},
|
||||
|
@ -7080,7 +7080,7 @@ def km_image_editor_tool_uv_move(params):
|
|||
|
||||
def km_image_editor_tool_uv_rotate(params):
|
||||
return (
|
||||
"Image Editor Tool: UV, Rotate",
|
||||
"Image Editor Tool: Uv, Rotate",
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("transform.rotate", {**params.tool_maybe_tweak_event, **params.tool_modifier},
|
||||
|
@ -7091,7 +7091,7 @@ def km_image_editor_tool_uv_rotate(params):
|
|||
|
||||
def km_image_editor_tool_uv_scale(params):
|
||||
return (
|
||||
"Image Editor Tool: UV, Scale",
|
||||
"Image Editor Tool: Uv, Scale",
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("transform.resize", {**params.tool_maybe_tweak_event, **params.tool_modifier},
|
||||
|
|
|
@ -4373,7 +4373,7 @@ def km_3d_view_tool_select(params):
|
|||
|
||||
def km_image_editor_tool_uv_select(params):
|
||||
return (
|
||||
"Image Editor Tool: UV, Tweak",
|
||||
"Image Editor Tool: Uv, Tweak",
|
||||
{"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": _template_items_tool_select(params, "uv.select", extend="extend")},
|
||||
)
|
||||
|
|
|
@ -100,7 +100,7 @@ class VIEWLAYER_PT_eevee_next_layer_passes_data(ViewLayerButtonsPanel, Panel):
|
|||
col.prop(view_layer, "use_pass_normal")
|
||||
col.prop(view_layer, "use_pass_position")
|
||||
sub = col.column()
|
||||
sub.active = not scene.eevee.use_motion_blur
|
||||
sub.active = not scene.render.use_motion_blur
|
||||
sub.prop(view_layer, "use_pass_vector")
|
||||
|
||||
|
||||
|
@ -342,7 +342,7 @@ class VIEWLAYER_PT_filter(ViewLayerButtonsPanel, Panel):
|
|||
col = layout.column(heading="Use")
|
||||
sub = col.row()
|
||||
sub.prop(view_layer, "use_motion_blur", text="Motion Blur")
|
||||
sub.active = scene.eevee.use_motion_blur
|
||||
sub.active = scene.render.use_motion_blur
|
||||
|
||||
|
||||
class VIEWLAYER_PT_layer_custom_props(PropertyPanel, Panel):
|
||||
|
|
|
@ -867,6 +867,9 @@ class NODE_PT_overlay(Panel):
|
|||
col.prop(overlay, "show_timing", text="Timings")
|
||||
col.prop(overlay, "show_named_attributes", text="Named Attributes")
|
||||
|
||||
if snode.tree_type == 'CompositorNodeTree':
|
||||
col.prop(overlay, "show_timing", text="Timings")
|
||||
|
||||
|
||||
class NODE_MT_node_tree_interface_context_menu(Menu):
|
||||
bl_label = "Node Tree Interface Specials"
|
||||
|
|
|
@ -803,6 +803,7 @@ class _defs_edit_mesh:
|
|||
def draw_settings(_context, layout, tool):
|
||||
props = tool.operator_properties("mesh.spin")
|
||||
layout.prop(props, "steps")
|
||||
layout.prop(props, "dupli")
|
||||
props = tool.gizmo_group_properties("MESH_GGT_spin")
|
||||
layout.prop(props, "axis")
|
||||
|
||||
|
@ -815,23 +816,6 @@ class _defs_edit_mesh:
|
|||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def spin_duplicate():
|
||||
def draw_settings(_context, layout, tool):
|
||||
props = tool.operator_properties("mesh.spin")
|
||||
layout.prop(props, "steps")
|
||||
props = tool.gizmo_group_properties("MESH_GGT_spin")
|
||||
layout.prop(props, "axis")
|
||||
|
||||
return dict(
|
||||
idname="builtin.spin_duplicates",
|
||||
label="Spin Duplicates",
|
||||
icon="ops.mesh.spin.duplicate",
|
||||
widget="MESH_GGT_spin",
|
||||
keymap=(),
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def inset():
|
||||
def draw_settings(_context, layout, tool):
|
||||
|
@ -1863,7 +1847,7 @@ class _defs_image_uv_transform:
|
|||
icon="ops.transform.translate",
|
||||
widget="IMAGE_GGT_gizmo2d_translate",
|
||||
operator="transform.translate",
|
||||
keymap="Image Editor Tool: UV, Move",
|
||||
keymap="Image Editor Tool: Uv, Move",
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -1874,7 +1858,7 @@ class _defs_image_uv_transform:
|
|||
icon="ops.transform.rotate",
|
||||
widget="IMAGE_GGT_gizmo2d_rotate",
|
||||
operator="transform.rotate",
|
||||
keymap="Image Editor Tool: UV, Rotate",
|
||||
keymap="Image Editor Tool: Uv, Rotate",
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -1885,7 +1869,7 @@ class _defs_image_uv_transform:
|
|||
icon="ops.transform.resize",
|
||||
widget="IMAGE_GGT_gizmo2d_resize",
|
||||
operator="transform.resize",
|
||||
keymap="Image Editor Tool: UV, Scale",
|
||||
keymap="Image Editor Tool: Uv, Scale",
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2015,7 +1999,7 @@ class _defs_image_uv_sculpt:
|
|||
attr="uv_sculpt_tool",
|
||||
tooldef_keywords=dict(
|
||||
operator="sculpt.uv_sculpt_stroke",
|
||||
keymap="Image Editor Tool: UV, Sculpt Stroke",
|
||||
keymap="Image Editor Tool: Uv, Sculpt Stroke",
|
||||
draw_cursor=draw_cursor,
|
||||
options={'KEYMAP_FALLBACK'},
|
||||
),
|
||||
|
@ -3005,10 +2989,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
|
|||
_defs_edit_mesh.bisect,
|
||||
),
|
||||
_defs_edit_mesh.poly_build,
|
||||
(
|
||||
_defs_edit_mesh.spin,
|
||||
_defs_edit_mesh.spin_duplicate,
|
||||
),
|
||||
_defs_edit_mesh.spin,
|
||||
(
|
||||
_defs_edit_mesh.vertex_smooth,
|
||||
_defs_edit_mesh.vertex_randomize,
|
||||
|
|
|
@ -240,33 +240,6 @@ class TOPBAR_MT_file_cleanup(Menu):
|
|||
layout.separator()
|
||||
|
||||
props = layout.operator("outliner.orphans_purge", text="Unused Data-Blocks")
|
||||
props.do_local_ids = True
|
||||
props.do_linked_ids = True
|
||||
props.do_recursive = False
|
||||
props = layout.operator("outliner.orphans_purge", text="Recursive Unused Data-Blocks")
|
||||
props.do_local_ids = True
|
||||
props.do_linked_ids = True
|
||||
props.do_recursive = True
|
||||
|
||||
layout.separator()
|
||||
props = layout.operator("outliner.orphans_purge", text="Unused Linked Data-Blocks")
|
||||
props.do_local_ids = False
|
||||
props.do_linked_ids = True
|
||||
props.do_recursive = False
|
||||
props = layout.operator("outliner.orphans_purge", text="Recursive Unused Linked Data-Blocks")
|
||||
props.do_local_ids = False
|
||||
props.do_linked_ids = True
|
||||
props.do_recursive = True
|
||||
|
||||
layout.separator()
|
||||
props = layout.operator("outliner.orphans_purge", text="Unused Local Data-Blocks")
|
||||
props.do_local_ids = True
|
||||
props.do_linked_ids = False
|
||||
props.do_recursive = False
|
||||
props = layout.operator("outliner.orphans_purge", text="Recursive Unused Local Data-Blocks")
|
||||
props.do_local_ids = True
|
||||
props.do_linked_ids = False
|
||||
props.do_recursive = True
|
||||
|
||||
|
||||
class TOPBAR_MT_file(Menu):
|
||||
|
|
|
@ -197,6 +197,7 @@ bool autokeyframe_property(bContext *C,
|
|||
int insert_key_action(Main *bmain,
|
||||
bAction *action,
|
||||
PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
const std::string &rna_path,
|
||||
float frame,
|
||||
Span<float> values,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "DNA_armature_types.h"
|
||||
|
||||
|
@ -133,6 +133,8 @@ static void bonecoll_ensure_name_unique(bArmature *armature, BoneCollection *bco
|
|||
BoneCollection *bcoll;
|
||||
};
|
||||
|
||||
/* Cannot capture armature & bcoll by reference in the lambda, as that would change its signature
|
||||
* and no longer be compatible with BLI_uniquename_cb(). */
|
||||
auto bonecoll_name_is_duplicate = [](void *arg, const char *name) -> bool {
|
||||
DupNameCheckData *data = static_cast<DupNameCheckData *>(arg);
|
||||
for (BoneCollection *bcoll : data->arm->collections_span()) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "BLI_string.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_idtype.hh"
|
||||
#include "BKE_lib_id.hh"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "BLI_dynstr.h"
|
||||
#include "BLI_math_base.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
@ -466,7 +466,7 @@ static bool insert_keyframe_fcurve_value(Main *bmain,
|
|||
|
||||
const bool success = insert_keyframe_value(fcu, fcurve_frame, curval, keytype, flag);
|
||||
|
||||
if (!success) {
|
||||
if (!success && reports != nullptr) {
|
||||
BKE_reportf(reports,
|
||||
RPT_ERROR,
|
||||
"Failed to insert keys on F-Curve with path '%s[%d]', ensure that it is not "
|
||||
|
@ -858,6 +858,7 @@ int clear_keyframe(Main *bmain,
|
|||
int insert_key_action(Main *bmain,
|
||||
bAction *action,
|
||||
PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
const std::string &rna_path,
|
||||
const float frame,
|
||||
const Span<float> values,
|
||||
|
@ -879,10 +880,18 @@ int insert_key_action(Main *bmain,
|
|||
int property_array_index = 0;
|
||||
int inserted_keys = 0;
|
||||
for (float value : values) {
|
||||
FCurve *fcurve = action_fcurve_ensure(
|
||||
bmain, action, group.c_str(), ptr, rna_path.c_str(), property_array_index);
|
||||
const bool inserted_key = insert_keyframe_value(
|
||||
fcurve, frame, value, key_type, insert_key_flag);
|
||||
const bool inserted_key = insert_keyframe_fcurve_value(bmain,
|
||||
nullptr,
|
||||
ptr,
|
||||
prop,
|
||||
action,
|
||||
group.c_str(),
|
||||
rna_path.c_str(),
|
||||
property_array_index,
|
||||
frame,
|
||||
value,
|
||||
key_type,
|
||||
insert_key_flag);
|
||||
if (inserted_key) {
|
||||
inserted_keys++;
|
||||
}
|
||||
|
@ -955,6 +964,7 @@ void insert_key_rna(PointerRNA *rna_pointer,
|
|||
insert_key_count += insert_key_action(bmain,
|
||||
action,
|
||||
rna_pointer,
|
||||
prop,
|
||||
rna_path_id_to_prop->c_str(),
|
||||
nla_frame,
|
||||
rna_values.as_span(),
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
struct IDRemapper;
|
||||
struct Main;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* \ingroup asset_system
|
||||
*/
|
||||
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_preferences.h"
|
||||
|
||||
#include "BLI_path_util.h"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "BLI_string.h"
|
||||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
||||
#include "DNA_asset_types.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "AS_asset_catalog.hh"
|
||||
#include "AS_asset_library.hh"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
#include "asset_library_service.hh"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "asset_library_service.hh"
|
||||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
#include "BLI_fileops.h"
|
||||
#include "BLI_path_util.h"
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
* \brief Blender util stuff
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "BLI_compiler_attrs.h"
|
||||
|
||||
struct Main;
|
||||
|
@ -26,40 +22,35 @@ void BKE_blender_globals_init(void);
|
|||
void BKE_blender_globals_clear(void);
|
||||
|
||||
/** Replace current global Main by the given one, freeing existing one. */
|
||||
void BKE_blender_globals_main_replace(struct Main *bmain);
|
||||
void BKE_blender_globals_main_replace(Main *bmain);
|
||||
/**
|
||||
* Replace current global Main by the given one, returning the old one.
|
||||
*
|
||||
* \warning Advanced, risky workaround addressing the issue that current RNA is not able to process
|
||||
* correctly non-G_MAIN data, use with (a lot of) care.
|
||||
*/
|
||||
struct Main *BKE_blender_globals_main_swap(struct Main *new_gmain);
|
||||
Main *BKE_blender_globals_main_swap(Main *new_gmain);
|
||||
|
||||
void BKE_blender_userdef_data_swap(struct UserDef *userdef_a, struct UserDef *userdef_b);
|
||||
void BKE_blender_userdef_data_set(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_data_set_and_free(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_data_swap(UserDef *userdef_a, UserDef *userdef_b);
|
||||
void BKE_blender_userdef_data_set(UserDef *userdef);
|
||||
void BKE_blender_userdef_data_set_and_free(UserDef *userdef);
|
||||
|
||||
/**
|
||||
* This function defines which settings a template will override for the user preferences.
|
||||
*
|
||||
* \note the order of `userdef_a` & `userdef_b` isn't important as values are simply swapped.
|
||||
*/
|
||||
void BKE_blender_userdef_app_template_data_swap(struct UserDef *userdef_a,
|
||||
struct UserDef *userdef_b);
|
||||
void BKE_blender_userdef_app_template_data_set(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_app_template_data_set_and_free(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_app_template_data_swap(UserDef *userdef_a, UserDef *userdef_b);
|
||||
void BKE_blender_userdef_app_template_data_set(UserDef *userdef);
|
||||
void BKE_blender_userdef_app_template_data_set_and_free(UserDef *userdef);
|
||||
|
||||
/**
|
||||
* When loading a new userdef from file,
|
||||
* or when exiting Blender.
|
||||
*/
|
||||
void BKE_blender_userdef_data_free(struct UserDef *userdef, bool clear_fonts);
|
||||
void BKE_blender_userdef_data_free(UserDef *userdef, bool clear_fonts);
|
||||
|
||||
/* Blenders' own atexit (avoids leaking) */
|
||||
void BKE_blender_atexit_register(void (*func)(void *user_data), void *user_data);
|
||||
void BKE_blender_atexit_unregister(void (*func)(void *user_data), const void *user_data);
|
||||
void BKE_blender_atexit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -29,7 +29,7 @@ void BKE_blendfile_link_append_context_free(BlendfileLinkAppendContext *lapp_con
|
|||
*
|
||||
* \param flag: A combination of:
|
||||
* - #eFileSel_Params_Flag from `DNA_space_types.h` &
|
||||
* - #eBLOLibLinkFlags * from `BLO_readfile.h`.
|
||||
* - #eBLOLibLinkFlags * from `BLO_readfile.hh`.
|
||||
* \param do_set: Set the given \a flag if true, clear it otherwise.
|
||||
*/
|
||||
void BKE_blendfile_link_append_context_flag_set(BlendfileLinkAppendContext *lapp_context,
|
||||
|
|
|
@ -16,10 +16,6 @@
|
|||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct ID;
|
||||
struct Main;
|
||||
struct ReportList;
|
||||
|
@ -27,7 +23,7 @@ struct ReportList;
|
|||
/** \name Core `foreach_path` API.
|
||||
* \{ */
|
||||
|
||||
typedef enum eBPathForeachFlag {
|
||||
enum eBPathForeachFlag {
|
||||
/* Flags controlling the behavior of the generic BPath API. */
|
||||
/**
|
||||
* Ensures the `absolute_base_path` member of #BPathForeachPathData is initialized properly with
|
||||
|
@ -62,7 +58,7 @@ typedef enum eBPathForeachFlag {
|
|||
* \note Only used by Image #IDType currently.
|
||||
*/
|
||||
BKE_BPATH_FOREACH_PATH_RELOAD_EDITED = (1 << 9),
|
||||
} eBPathForeachFlag;
|
||||
};
|
||||
ENUM_OPERATORS(eBPathForeachFlag, BKE_BPATH_FOREACH_PATH_RELOAD_EDITED)
|
||||
|
||||
struct BPathForeachPathData;
|
||||
|
@ -79,14 +75,14 @@ struct BPathForeachPathData;
|
|||
* \return `true` if the path has been changed, and in that case,
|
||||
* result must be written to `path_dst`.
|
||||
*/
|
||||
typedef bool (*BPathForeachPathFunctionCallback)(struct BPathForeachPathData *bpath_data,
|
||||
typedef bool (*BPathForeachPathFunctionCallback)(BPathForeachPathData *bpath_data,
|
||||
char *path_dst,
|
||||
size_t path_dst_maxncpy,
|
||||
const char *path_src);
|
||||
|
||||
/** Storage for common data needed across the BPath 'foreach_path' code. */
|
||||
typedef struct BPathForeachPathData {
|
||||
struct Main *bmain;
|
||||
struct BPathForeachPathData {
|
||||
Main *bmain;
|
||||
|
||||
BPathForeachPathFunctionCallback callback_function;
|
||||
eBPathForeachFlag flag;
|
||||
|
@ -100,16 +96,16 @@ typedef struct BPathForeachPathData {
|
|||
const char *absolute_base_path;
|
||||
|
||||
/** ID owning the path being processed. */
|
||||
struct ID *owner_id;
|
||||
ID *owner_id;
|
||||
|
||||
/**
|
||||
* IDTypeInfo callbacks are responsible to set this boolean if they modified one or more paths.
|
||||
*/
|
||||
bool is_path_modified;
|
||||
} BPathForeachPathData;
|
||||
};
|
||||
|
||||
/** Run `bpath_data.callback_function` on all paths contained in `id`. */
|
||||
void BKE_bpath_foreach_path_id(BPathForeachPathData *bpath_data, struct ID *id);
|
||||
void BKE_bpath_foreach_path_id(BPathForeachPathData *bpath_data, ID *id);
|
||||
|
||||
/** Run `bpath_data.callback_function` on all paths of all IDs in `bmain`. */
|
||||
void BKE_bpath_foreach_path_main(BPathForeachPathData *bpath_data);
|
||||
|
@ -129,7 +125,7 @@ void BKE_bpath_foreach_path_main(BPathForeachPathData *bpath_data);
|
|||
*
|
||||
* \return true is \a path was modified, false otherwise.
|
||||
*/
|
||||
bool BKE_bpath_foreach_path_fixed_process(struct BPathForeachPathData *bpath_data,
|
||||
bool BKE_bpath_foreach_path_fixed_process(BPathForeachPathData *bpath_data,
|
||||
char *path,
|
||||
size_t path_maxncpy);
|
||||
|
||||
|
@ -142,7 +138,7 @@ bool BKE_bpath_foreach_path_fixed_process(struct BPathForeachPathData *bpath_dat
|
|||
*
|
||||
* \return true is \a path_dir and/or \a path_file were modified, false otherwise.
|
||||
*/
|
||||
bool BKE_bpath_foreach_path_dirfile_fixed_process(struct BPathForeachPathData *bpath_data,
|
||||
bool BKE_bpath_foreach_path_dirfile_fixed_process(BPathForeachPathData *bpath_data,
|
||||
char *path_dir,
|
||||
size_t path_dir_maxncpy,
|
||||
char *path_file,
|
||||
|
@ -157,8 +153,7 @@ bool BKE_bpath_foreach_path_dirfile_fixed_process(struct BPathForeachPathData *b
|
|||
*
|
||||
* \return true is \a path was modified and re-allocated, false otherwise.
|
||||
*/
|
||||
bool BKE_bpath_foreach_path_allocated_process(struct BPathForeachPathData *bpath_data,
|
||||
char **path);
|
||||
bool BKE_bpath_foreach_path_allocated_process(BPathForeachPathData *bpath_data, char **path);
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@ -166,7 +161,7 @@ bool BKE_bpath_foreach_path_allocated_process(struct BPathForeachPathData *bpath
|
|||
* \{ */
|
||||
|
||||
/** Check for missing files. */
|
||||
void BKE_bpath_missing_files_check(struct Main *bmain, struct ReportList *reports);
|
||||
void BKE_bpath_missing_files_check(Main *bmain, ReportList *reports);
|
||||
|
||||
/**
|
||||
* Recursively search into given search directory, for all file paths of all IDs in given
|
||||
|
@ -181,33 +176,29 @@ void BKE_bpath_missing_files_check(struct Main *bmain, struct ReportList *report
|
|||
* \param find_all: If `true`, also search for files which current path is still valid, if `false`
|
||||
* skip those still valid paths.
|
||||
*/
|
||||
void BKE_bpath_missing_files_find(struct Main *bmain,
|
||||
void BKE_bpath_missing_files_find(Main *bmain,
|
||||
const char *searchpath,
|
||||
struct ReportList *reports,
|
||||
ReportList *reports,
|
||||
bool find_all);
|
||||
|
||||
/** Rebase all relative file paths in given \a bmain from \a basedir_src to \a basedir_dst. */
|
||||
void BKE_bpath_relative_rebase(struct Main *bmain,
|
||||
void BKE_bpath_relative_rebase(Main *bmain,
|
||||
const char *basedir_src,
|
||||
const char *basedir_dst,
|
||||
struct ReportList *reports);
|
||||
ReportList *reports);
|
||||
|
||||
/** Make all absolute file paths in given \a bmain relative to given \a basedir. */
|
||||
void BKE_bpath_relative_convert(struct Main *bmain,
|
||||
const char *basedir,
|
||||
struct ReportList *reports);
|
||||
void BKE_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports);
|
||||
|
||||
/** Make all relative file paths in given \a bmain absolute, using given \a basedir as root. */
|
||||
void BKE_bpath_absolute_convert(struct Main *bmain,
|
||||
const char *basedir,
|
||||
struct ReportList *reports);
|
||||
void BKE_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports);
|
||||
|
||||
/**
|
||||
* Temp backup of paths from all IDs in given \a bmain.
|
||||
*
|
||||
* \return An opaque handle to pass to #BKE_bpath_list_restore and #BKE_bpath_list_free.
|
||||
*/
|
||||
void *BKE_bpath_list_backup(struct Main *bmain, eBPathForeachFlag flag);
|
||||
void *BKE_bpath_list_backup(Main *bmain, eBPathForeachFlag flag);
|
||||
|
||||
/**
|
||||
* Restore the temp backup of paths from \a path_list_handle into all IDs in given \a bmain.
|
||||
|
@ -216,7 +207,7 @@ void *BKE_bpath_list_backup(struct Main *bmain, eBPathForeachFlag flag);
|
|||
* addition/deletion/re-ordering of IDs, or their file paths) since the call to
|
||||
* #BKE_bpath_list_backup that generated the given \a path_list_handle.
|
||||
*/
|
||||
void BKE_bpath_list_restore(struct Main *bmain, eBPathForeachFlag flag, void *path_list_handle);
|
||||
void BKE_bpath_list_restore(Main *bmain, eBPathForeachFlag flag, void *path_list_handle);
|
||||
|
||||
/**
|
||||
* Free the temp backup of paths in \a path_list_handle.
|
||||
|
@ -227,7 +218,3 @@ void BKE_bpath_list_restore(struct Main *bmain, eBPathForeachFlag flag, void *pa
|
|||
void BKE_bpath_list_free(void *path_list_handle);
|
||||
|
||||
/** \} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,70 +0,0 @@
|
|||
/* SPDX-FileCopyrightText: 2016 Blender Authors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#pragma once
|
||||
|
||||
/** \file
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct CacheFile;
|
||||
struct CacheFileLayer;
|
||||
struct CacheReader;
|
||||
struct Depsgraph;
|
||||
struct Main;
|
||||
struct Object;
|
||||
struct Scene;
|
||||
|
||||
void BKE_cachefiles_init(void);
|
||||
void BKE_cachefiles_exit(void);
|
||||
|
||||
void *BKE_cachefile_add(struct Main *bmain, const char *name);
|
||||
|
||||
void BKE_cachefile_reload(struct Depsgraph *depsgraph, struct CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_eval(struct Main *bmain,
|
||||
struct Depsgraph *depsgraph,
|
||||
struct CacheFile *cache_file);
|
||||
|
||||
bool BKE_cachefile_filepath_get(const struct Main *bmain,
|
||||
const struct Depsgraph *depsgraph,
|
||||
const struct CacheFile *cache_file,
|
||||
char r_filepath[1024]);
|
||||
|
||||
double BKE_cachefile_time_offset(const struct CacheFile *cache_file, double time, double fps);
|
||||
|
||||
/* Modifiers and constraints open and free readers through these. */
|
||||
void BKE_cachefile_reader_open(struct CacheFile *cache_file,
|
||||
struct CacheReader **reader,
|
||||
struct Object *object,
|
||||
const char *object_path);
|
||||
void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader **reader);
|
||||
|
||||
/**
|
||||
* Determine whether the #CacheFile should use a render engine procedural. If so, data is not read
|
||||
* from the file and bounding boxes are used to represent the objects in the Scene.
|
||||
* Render engines will receive the bounding box as a placeholder but can instead
|
||||
* load the data directly if they support it.
|
||||
*/
|
||||
bool BKE_cache_file_uses_render_procedural(const struct CacheFile *cache_file,
|
||||
struct Scene *scene);
|
||||
|
||||
/**
|
||||
* Add a layer to the cache_file. Return NULL if the `filepath` is already that of an existing
|
||||
* layer or if the number of layers exceeds the maximum allowed layer count.
|
||||
*/
|
||||
struct CacheFileLayer *BKE_cachefile_add_layer(struct CacheFile *cache_file,
|
||||
const char filepath[1024]);
|
||||
|
||||
struct CacheFileLayer *BKE_cachefile_get_active_layer(struct CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_remove_layer(struct CacheFile *cache_file, struct CacheFileLayer *layer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,58 @@
|
|||
/* SPDX-FileCopyrightText: 2016 Blender Authors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#pragma once
|
||||
|
||||
/** \file
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
struct CacheFile;
|
||||
struct CacheFileLayer;
|
||||
struct CacheReader;
|
||||
struct Depsgraph;
|
||||
struct Main;
|
||||
struct Object;
|
||||
struct Scene;
|
||||
|
||||
void BKE_cachefiles_init(void);
|
||||
void BKE_cachefiles_exit(void);
|
||||
|
||||
void *BKE_cachefile_add(Main *bmain, const char *name);
|
||||
|
||||
void BKE_cachefile_reload(Depsgraph *depsgraph, CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_eval(Main *bmain, Depsgraph *depsgraph, CacheFile *cache_file);
|
||||
|
||||
bool BKE_cachefile_filepath_get(const Main *bmain,
|
||||
const Depsgraph *depsgraph,
|
||||
const CacheFile *cache_file,
|
||||
char r_filepath[1024]);
|
||||
|
||||
double BKE_cachefile_time_offset(const CacheFile *cache_file, double time, double fps);
|
||||
|
||||
/* Modifiers and constraints open and free readers through these. */
|
||||
void BKE_cachefile_reader_open(CacheFile *cache_file,
|
||||
CacheReader **reader,
|
||||
Object *object,
|
||||
const char *object_path);
|
||||
void BKE_cachefile_reader_free(CacheFile *cache_file, CacheReader **reader);
|
||||
|
||||
/**
|
||||
* Determine whether the #CacheFile should use a render engine procedural. If so, data is not read
|
||||
* from the file and bounding boxes are used to represent the objects in the Scene.
|
||||
* Render engines will receive the bounding box as a placeholder but can instead
|
||||
* load the data directly if they support it.
|
||||
*/
|
||||
bool BKE_cache_file_uses_render_procedural(const CacheFile *cache_file, Scene *scene);
|
||||
|
||||
/**
|
||||
* Add a layer to the cache_file. Return NULL if the `filepath` is already that of an existing
|
||||
* layer or if the number of layers exceeds the maximum allowed layer count.
|
||||
*/
|
||||
CacheFileLayer *BKE_cachefile_add_layer(CacheFile *cache_file, const char filepath[1024]);
|
||||
|
||||
CacheFileLayer *BKE_cachefile_get_active_layer(CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_remove_layer(CacheFile *cache_file, CacheFileLayer *layer);
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct Depsgraph;
|
||||
struct ID;
|
||||
struct Main;
|
||||
|
@ -117,24 +113,18 @@ typedef enum {
|
|||
BKE_CB_EVT_TOT,
|
||||
} eCbEvent;
|
||||
|
||||
typedef struct bCallbackFuncStore {
|
||||
struct bCallbackFuncStore *next, *prev;
|
||||
void (*func)(struct Main *, struct PointerRNA **, int num_pointers, void *arg);
|
||||
struct bCallbackFuncStore {
|
||||
bCallbackFuncStore *next, *prev;
|
||||
void (*func)(Main *, PointerRNA **, int num_pointers, void *arg);
|
||||
void *arg;
|
||||
short alloc;
|
||||
} bCallbackFuncStore;
|
||||
};
|
||||
|
||||
void BKE_callback_exec(struct Main *bmain,
|
||||
struct PointerRNA **pointers,
|
||||
int num_pointers,
|
||||
eCbEvent evt);
|
||||
void BKE_callback_exec_null(struct Main *bmain, eCbEvent evt);
|
||||
void BKE_callback_exec_id(struct Main *bmain, struct ID *id, eCbEvent evt);
|
||||
void BKE_callback_exec_id_depsgraph(struct Main *bmain,
|
||||
struct ID *id,
|
||||
struct Depsgraph *depsgraph,
|
||||
eCbEvent evt);
|
||||
void BKE_callback_exec_string(struct Main *bmain, eCbEvent evt, const char *str);
|
||||
void BKE_callback_exec(Main *bmain, PointerRNA **pointers, int num_pointers, eCbEvent evt);
|
||||
void BKE_callback_exec_null(Main *bmain, eCbEvent evt);
|
||||
void BKE_callback_exec_id(Main *bmain, ID *id, eCbEvent evt);
|
||||
void BKE_callback_exec_id_depsgraph(Main *bmain, ID *id, Depsgraph *depsgraph, eCbEvent evt);
|
||||
void BKE_callback_exec_string(Main *bmain, eCbEvent evt, const char *str);
|
||||
void BKE_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt);
|
||||
void BKE_callback_remove(bCallbackFuncStore *funcstore, eCbEvent evt);
|
||||
|
||||
|
@ -143,7 +133,3 @@ void BKE_callback_global_init(void);
|
|||
* Call on application exit.
|
||||
*/
|
||||
void BKE_callback_global_finalize(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -15,10 +15,6 @@
|
|||
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Structs */
|
||||
|
||||
struct BLI_Iterator;
|
||||
|
@ -35,10 +31,10 @@ struct Object;
|
|||
struct Scene;
|
||||
struct ViewLayer;
|
||||
|
||||
typedef struct CollectionParent {
|
||||
struct CollectionParent {
|
||||
struct CollectionParent *next, *prev;
|
||||
struct Collection *collection;
|
||||
} CollectionParent;
|
||||
};
|
||||
|
||||
/* Collections */
|
||||
|
||||
|
@ -46,38 +42,36 @@ typedef struct CollectionParent {
|
|||
* Add a collection to a collection ListBase and synchronize all render layers
|
||||
* The ListBase is NULL when the collection is to be added to the master collection
|
||||
*/
|
||||
struct Collection *BKE_collection_add(struct Main *bmain,
|
||||
struct Collection *parent,
|
||||
const char *name);
|
||||
Collection *BKE_collection_add(Main *bmain, Collection *parent, const char *name);
|
||||
/**
|
||||
* Add \a collection_dst to all scene collections that reference object \a ob_src is in.
|
||||
* Used to replace an instance object with a collection (library override operator).
|
||||
*
|
||||
* Logic is very similar to #BKE_collection_object_add_from().
|
||||
*/
|
||||
void BKE_collection_add_from_object(struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
const struct Object *ob_src,
|
||||
struct Collection *collection_dst);
|
||||
void BKE_collection_add_from_object(Main *bmain,
|
||||
Scene *scene,
|
||||
const Object *ob_src,
|
||||
Collection *collection_dst);
|
||||
/**
|
||||
* Add \a collection_dst to all scene collections that reference collection \a collection_src is
|
||||
* in.
|
||||
*
|
||||
* Logic is very similar to #BKE_collection_object_add_from().
|
||||
*/
|
||||
void BKE_collection_add_from_collection(struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct Collection *collection_src,
|
||||
struct Collection *collection_dst);
|
||||
void BKE_collection_add_from_collection(Main *bmain,
|
||||
Scene *scene,
|
||||
Collection *collection_src,
|
||||
Collection *collection_dst);
|
||||
/**
|
||||
* Free (or release) any data used by this collection (does not free the collection itself).
|
||||
*/
|
||||
void BKE_collection_free_data(struct Collection *collection);
|
||||
void BKE_collection_free_data(Collection *collection);
|
||||
/**
|
||||
* Remove a collection, optionally removing its child objects or moving
|
||||
* them to parent collections.
|
||||
*/
|
||||
bool BKE_collection_delete(struct Main *bmain, struct Collection *collection, bool hierarchy);
|
||||
bool BKE_collection_delete(Main *bmain, Collection *collection, bool hierarchy);
|
||||
|
||||
/**
|
||||
* Make a deep copy (aka duplicate) of the given collection and all of its children, recursively.
|
||||
|
@ -87,36 +81,33 @@ bool BKE_collection_delete(struct Main *bmain, struct Collection *collection, bo
|
|||
* responsible to reconstruct collection dependencies information's
|
||||
* (i.e. call #BKE_main_collection_sync).
|
||||
*/
|
||||
struct Collection *BKE_collection_duplicate(struct Main *bmain,
|
||||
struct Collection *parent,
|
||||
struct Collection *collection,
|
||||
uint duplicate_flags,
|
||||
uint duplicate_options);
|
||||
Collection *BKE_collection_duplicate(Main *bmain,
|
||||
Collection *parent,
|
||||
Collection *collection,
|
||||
uint duplicate_flags,
|
||||
uint duplicate_options);
|
||||
|
||||
/* Master Collection for Scene */
|
||||
|
||||
#define BKE_SCENE_COLLECTION_NAME "Scene Collection"
|
||||
struct Collection *BKE_collection_master_add(struct Scene *scene);
|
||||
Collection *BKE_collection_master_add(Scene *scene);
|
||||
|
||||
/* Collection Objects */
|
||||
|
||||
bool BKE_collection_has_object(struct Collection *collection, const struct Object *ob);
|
||||
bool BKE_collection_has_object_recursive(struct Collection *collection, struct Object *ob);
|
||||
bool BKE_collection_has_object_recursive_instanced(struct Collection *collection,
|
||||
struct Object *ob);
|
||||
struct Collection *BKE_collection_object_find(struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct Collection *collection,
|
||||
struct Object *ob);
|
||||
bool BKE_collection_is_empty(const struct Collection *collection);
|
||||
bool BKE_collection_has_object(Collection *collection, const Object *ob);
|
||||
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob);
|
||||
bool BKE_collection_has_object_recursive_instanced(Collection *collection, Object *ob);
|
||||
Collection *BKE_collection_object_find(Main *bmain,
|
||||
Scene *scene,
|
||||
Collection *collection,
|
||||
Object *ob);
|
||||
bool BKE_collection_is_empty(const Collection *collection);
|
||||
|
||||
/**
|
||||
* Add object to given collection, ensuring this collection is 'editable' (i.e. local and not a
|
||||
* liboverride), and finding a suitable parent one otherwise.
|
||||
*/
|
||||
bool BKE_collection_object_add(struct Main *bmain,
|
||||
struct Collection *collection,
|
||||
struct Object *ob);
|
||||
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob);
|
||||
|
||||
/**
|
||||
* Add object to given collection, similar to #BKE_collection_object_add.
|
||||
|
@ -124,62 +115,51 @@ bool BKE_collection_object_add(struct Main *bmain,
|
|||
* However, it additionally ensures that the selected collection is also part of the given
|
||||
* `view_layer`, if non-NULL. Otherwise, the object is not added to any collection.
|
||||
*/
|
||||
bool BKE_collection_viewlayer_object_add(struct Main *bmain,
|
||||
const struct ViewLayer *view_layer,
|
||||
struct Collection *collection,
|
||||
struct Object *ob);
|
||||
bool BKE_collection_viewlayer_object_add(Main *bmain,
|
||||
const ViewLayer *view_layer,
|
||||
Collection *collection,
|
||||
Object *ob);
|
||||
|
||||
/**
|
||||
* Same as #BKE_collection_object_add, but unconditionally adds the object to the given collection.
|
||||
*
|
||||
* NOTE: required in certain cases, like do-versioning or complex ID management tasks.
|
||||
*/
|
||||
bool BKE_collection_object_add_notest(struct Main *bmain,
|
||||
struct Collection *collection,
|
||||
struct Object *ob);
|
||||
bool BKE_collection_object_add_notest(Main *bmain, Collection *collection, Object *ob);
|
||||
/**
|
||||
* Add \a ob_dst to all scene collections that reference object \a ob_src is in.
|
||||
* Used for copying objects.
|
||||
*
|
||||
* Logic is very similar to #BKE_collection_add_from_object()
|
||||
*/
|
||||
void BKE_collection_object_add_from(struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct Object *ob_src,
|
||||
struct Object *ob_dst);
|
||||
void BKE_collection_object_add_from(Main *bmain, Scene *scene, Object *ob_src, Object *ob_dst);
|
||||
/**
|
||||
* Remove object from collection.
|
||||
*/
|
||||
bool BKE_collection_object_remove(struct Main *bmain,
|
||||
struct Collection *collection,
|
||||
struct Object *object,
|
||||
bool BKE_collection_object_remove(Main *bmain,
|
||||
Collection *collection,
|
||||
Object *object,
|
||||
bool free_us);
|
||||
/**
|
||||
* Replace one object with another in a collection (managing user counts).
|
||||
*/
|
||||
bool BKE_collection_object_replace(struct Main *bmain,
|
||||
struct Collection *collection,
|
||||
struct Object *ob_old,
|
||||
struct Object *ob_new);
|
||||
bool BKE_collection_object_replace(Main *bmain,
|
||||
Collection *collection,
|
||||
Object *ob_old,
|
||||
Object *ob_new);
|
||||
|
||||
/**
|
||||
* Move object from a collection into another
|
||||
*
|
||||
* If source collection is NULL move it from all the existing collections.
|
||||
*/
|
||||
void BKE_collection_object_move(struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct Collection *collection_dst,
|
||||
struct Collection *collection_src,
|
||||
struct Object *ob);
|
||||
void BKE_collection_object_move(
|
||||
Main *bmain, Scene *scene, Collection *collection_dst, Collection *collection_src, Object *ob);
|
||||
|
||||
/**
|
||||
* Remove object from all collections of scene
|
||||
*/
|
||||
bool BKE_scene_collections_object_remove(struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct Object *object,
|
||||
bool free_us);
|
||||
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *object, bool free_us);
|
||||
|
||||
/**
|
||||
* Check all collections in \a bmain (including embedded ones in scenes) for invalid
|
||||
|
@ -188,7 +168,7 @@ bool BKE_scene_collections_object_remove(struct Main *bmain,
|
|||
* \note In case of duplicates, the first CollectionObject in the list is kept, all others are
|
||||
* removed.
|
||||
*/
|
||||
void BKE_collections_object_remove_invalids(struct Main *bmain);
|
||||
void BKE_collections_object_remove_invalids(Main *bmain);
|
||||
|
||||
/**
|
||||
* Remove all NULL children from parent collections of changed \a collection.
|
||||
|
@ -202,22 +182,20 @@ void BKE_collections_object_remove_invalids(struct Main *bmain);
|
|||
* \param child_collection: The collection that was remapped to another pointer. May be \a NULL,
|
||||
* in which case whole \a bmain database of collections is checked.
|
||||
*/
|
||||
void BKE_collections_child_remove_nulls(struct Main *bmain,
|
||||
struct Collection *parent_collection,
|
||||
struct Collection *child_collection);
|
||||
void BKE_collections_child_remove_nulls(Main *bmain,
|
||||
Collection *parent_collection,
|
||||
Collection *child_collection);
|
||||
|
||||
/* Dependencies. */
|
||||
|
||||
bool BKE_collection_is_in_scene(struct Collection *collection);
|
||||
void BKE_collections_after_lib_link(struct Main *bmain);
|
||||
bool BKE_collection_object_cyclic_check(struct Main *bmain,
|
||||
struct Object *object,
|
||||
struct Collection *collection);
|
||||
bool BKE_collection_is_in_scene(Collection *collection);
|
||||
void BKE_collections_after_lib_link(Main *bmain);
|
||||
bool BKE_collection_object_cyclic_check(Main *bmain, Object *object, Collection *collection);
|
||||
|
||||
/* Object list cache. */
|
||||
|
||||
struct ListBase BKE_collection_object_cache_get(struct Collection *collection);
|
||||
ListBase BKE_collection_object_cache_instanced_get(struct Collection *collection);
|
||||
ListBase BKE_collection_object_cache_get(Collection *collection);
|
||||
ListBase BKE_collection_object_cache_instanced_get(Collection *collection);
|
||||
/** Free the object cache of given `collection` and all of its ancestors (recursively).
|
||||
*
|
||||
* \param bmain: The Main database owning the collection. May be `nullptr`, only used if doing
|
||||
|
@ -225,18 +203,18 @@ ListBase BKE_collection_object_cache_instanced_get(struct Collection *collection
|
|||
* \param id_create_flag: Flags controlling ID creation, used here to enable or
|
||||
* not depsgraph tagging of affected IDs (e.g. #LIB_ID_CREATE_NO_DEG_TAG would prevent depsgraph
|
||||
* tagging). */
|
||||
void BKE_collection_object_cache_free(const struct Main *bmain,
|
||||
struct Collection *collection,
|
||||
void BKE_collection_object_cache_free(const Main *bmain,
|
||||
Collection *collection,
|
||||
const int id_create_flag);
|
||||
/**
|
||||
* Free the object cache of all collections in given `bmain`, including master collections of
|
||||
* scenes.
|
||||
*/
|
||||
void BKE_main_collections_object_cache_free(const struct Main *bmain);
|
||||
void BKE_main_collections_object_cache_free(const Main *bmain);
|
||||
|
||||
struct Base *BKE_collection_or_layer_objects(const struct Scene *scene,
|
||||
struct ViewLayer *view_layer,
|
||||
struct Collection *collection);
|
||||
Base *BKE_collection_or_layer_objects(const Scene *scene,
|
||||
ViewLayer *view_layer,
|
||||
Collection *collection);
|
||||
|
||||
/* Editing. */
|
||||
|
||||
|
@ -245,44 +223,38 @@ struct Base *BKE_collection_or_layer_objects(const struct Scene *scene,
|
|||
*
|
||||
* The index is calculated from top to bottom counting the children before the siblings.
|
||||
*/
|
||||
struct Collection *BKE_collection_from_index(struct Scene *scene, int index);
|
||||
Collection *BKE_collection_from_index(Scene *scene, int index);
|
||||
/**
|
||||
* The automatic/fallback name of a new collection.
|
||||
*/
|
||||
void BKE_collection_new_name_get(struct Collection *collection_parent, char *rname);
|
||||
void BKE_collection_new_name_get(Collection *collection_parent, char *rname);
|
||||
/**
|
||||
* The name to show in the interface.
|
||||
*/
|
||||
const char *BKE_collection_ui_name_get(struct Collection *collection);
|
||||
const char *BKE_collection_ui_name_get(Collection *collection);
|
||||
/**
|
||||
* Select all the objects in this Collection (and its nested collections) for this ViewLayer.
|
||||
* Return true if any object was selected.
|
||||
*/
|
||||
bool BKE_collection_objects_select(const struct Scene *scene,
|
||||
struct ViewLayer *view_layer,
|
||||
struct Collection *collection,
|
||||
bool BKE_collection_objects_select(const Scene *scene,
|
||||
ViewLayer *view_layer,
|
||||
Collection *collection,
|
||||
bool deselect);
|
||||
|
||||
/* Collection children */
|
||||
|
||||
bool BKE_collection_child_add(struct Main *bmain,
|
||||
struct Collection *parent,
|
||||
struct Collection *child);
|
||||
bool BKE_collection_child_add(Main *bmain, Collection *parent, Collection *child);
|
||||
|
||||
bool BKE_collection_child_add_no_sync(struct Main *bmain,
|
||||
struct Collection *parent,
|
||||
struct Collection *child);
|
||||
bool BKE_collection_child_add_no_sync(Main *bmain, Collection *parent, Collection *child);
|
||||
|
||||
bool BKE_collection_child_remove(struct Main *bmain,
|
||||
struct Collection *parent,
|
||||
struct Collection *child);
|
||||
bool BKE_collection_child_remove(Main *bmain, Collection *parent, Collection *child);
|
||||
|
||||
bool BKE_collection_move(struct Main *bmain,
|
||||
struct Collection *to_parent,
|
||||
struct Collection *from_parent,
|
||||
struct Collection *relative,
|
||||
bool BKE_collection_move(Main *bmain,
|
||||
Collection *to_parent,
|
||||
Collection *from_parent,
|
||||
Collection *relative,
|
||||
bool relative_after,
|
||||
struct Collection *collection);
|
||||
Collection *collection);
|
||||
|
||||
/**
|
||||
* Find potential cycles in collections.
|
||||
|
@ -293,34 +265,33 @@ bool BKE_collection_move(struct Main *bmain,
|
|||
* may be NULL if we just want to ensure \a new_ancestor does not already have cycles.
|
||||
* \return true if a cycle is found.
|
||||
*/
|
||||
bool BKE_collection_cycle_find(struct Collection *new_ancestor, struct Collection *collection);
|
||||
bool BKE_collection_cycle_find(Collection *new_ancestor, Collection *collection);
|
||||
/**
|
||||
* Find and fix potential cycles in collections.
|
||||
*
|
||||
* \param collection: The collection to check for existing cycles.
|
||||
* \return true if cycles are found and fixed.
|
||||
*/
|
||||
bool BKE_collection_cycles_fix(struct Main *bmain, struct Collection *collection);
|
||||
bool BKE_collection_cycles_fix(Main *bmain, Collection *collection);
|
||||
|
||||
bool BKE_collection_has_collection(const struct Collection *parent,
|
||||
const struct Collection *collection);
|
||||
bool BKE_collection_has_collection(const Collection *parent, const Collection *collection);
|
||||
|
||||
/**
|
||||
* Rebuild parent relationships from child ones, for all children of given \a collection.
|
||||
*
|
||||
* \note Given collection is assumed to already have valid parents.
|
||||
*/
|
||||
void BKE_collection_parent_relations_rebuild(struct Collection *collection);
|
||||
void BKE_collection_parent_relations_rebuild(Collection *collection);
|
||||
/**
|
||||
* Rebuild parent relationships from child ones, for all collections in given \a bmain.
|
||||
*/
|
||||
void BKE_main_collections_parent_relations_rebuild(struct Main *bmain);
|
||||
void BKE_main_collections_parent_relations_rebuild(Main *bmain);
|
||||
|
||||
/**
|
||||
* Perform some validation on integrity of the data of this collection.
|
||||
*
|
||||
* \return `true` if everything is OK, false if some errors are detected. */
|
||||
bool BKE_collection_validate(struct Collection *collection);
|
||||
bool BKE_collection_validate(Collection *collection);
|
||||
|
||||
/* .blend file I/O */
|
||||
|
||||
|
@ -328,17 +299,14 @@ bool BKE_collection_validate(struct Collection *collection);
|
|||
* Perform some pre-writing cleanup on the COllection data itself (_not_ in any sub-data
|
||||
* referenced by pointers). To be called before writing the Collection struct itself.
|
||||
*/
|
||||
void BKE_collection_blend_write_prepare_nolib(struct BlendWriter *writer,
|
||||
struct Collection *collection);
|
||||
void BKE_collection_blend_write_nolib(struct BlendWriter *writer, struct Collection *collection);
|
||||
void BKE_collection_blend_read_data(struct BlendDataReader *reader,
|
||||
struct Collection *collection,
|
||||
struct ID *owner_id);
|
||||
void BKE_collection_blend_write_prepare_nolib(BlendWriter *writer, Collection *collection);
|
||||
void BKE_collection_blend_write_nolib(BlendWriter *writer, Collection *collection);
|
||||
void BKE_collection_blend_read_data(BlendDataReader *reader, Collection *collection, ID *owner_id);
|
||||
|
||||
/* Iteration callbacks. */
|
||||
|
||||
typedef void (*BKE_scene_objects_Cb)(struct Object *ob, void *data);
|
||||
typedef void (*BKE_scene_collections_Cb)(struct Collection *ob, void *data);
|
||||
typedef void (*BKE_scene_objects_Cb)(Object *ob, void *data);
|
||||
typedef void (*BKE_scene_collections_Cb)(Collection *ob, void *data);
|
||||
|
||||
/* Iteration over objects in collection. */
|
||||
|
||||
|
@ -348,7 +316,8 @@ typedef void (*BKE_scene_collections_Cb)(struct Collection *ob, void *data);
|
|||
int _object_visibility_flag = (_mode == DAG_EVAL_VIEWPORT) ? OB_HIDE_VIEWPORT : \
|
||||
OB_HIDE_RENDER; \
|
||||
int _base_id = 0; \
|
||||
for (Base *_base = (Base *)BKE_collection_object_cache_get(_collection).first; _base; \
|
||||
for (Base *_base = static_cast<Base *>(BKE_collection_object_cache_get(_collection).first); \
|
||||
_base; \
|
||||
_base = _base->next, _base_id++) \
|
||||
{ \
|
||||
Object *_object = _base->object; \
|
||||
|
@ -362,7 +331,8 @@ typedef void (*BKE_scene_collections_Cb)(struct Collection *ob, void *data);
|
|||
((void)0)
|
||||
|
||||
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object) \
|
||||
for (Base *_base = (Base *)BKE_collection_object_cache_get(_collection).first; _base; \
|
||||
for (Base *_base = static_cast<Base *>(BKE_collection_object_cache_get(_collection).first); \
|
||||
_base; \
|
||||
_base = _base->next) \
|
||||
{ \
|
||||
Object *_object = _base->object; \
|
||||
|
@ -378,28 +348,28 @@ typedef void (*BKE_scene_collections_Cb)(struct Collection *ob, void *data);
|
|||
* Only use this in non-performance critical situations
|
||||
* (it iterates over all scene collections twice)
|
||||
*/
|
||||
void BKE_scene_collections_iterator_begin(struct BLI_Iterator *iter, void *data_in);
|
||||
void BKE_scene_collections_iterator_next(struct BLI_Iterator *iter);
|
||||
void BKE_scene_collections_iterator_end(struct BLI_Iterator *iter);
|
||||
void BKE_scene_collections_iterator_begin(BLI_Iterator *iter, void *data_in);
|
||||
void BKE_scene_collections_iterator_next(BLI_Iterator *iter);
|
||||
void BKE_scene_collections_iterator_end(BLI_Iterator *iter);
|
||||
|
||||
void BKE_scene_objects_iterator_begin(struct BLI_Iterator *iter, void *data_in);
|
||||
void BKE_scene_objects_iterator_next(struct BLI_Iterator *iter);
|
||||
void BKE_scene_objects_iterator_end(struct BLI_Iterator *iter);
|
||||
void BKE_scene_objects_iterator_begin(BLI_Iterator *iter, void *data_in);
|
||||
void BKE_scene_objects_iterator_next(BLI_Iterator *iter);
|
||||
void BKE_scene_objects_iterator_end(BLI_Iterator *iter);
|
||||
|
||||
/**
|
||||
* Iterate over objects in the scene based on a flag.
|
||||
*
|
||||
* \note The object->flag is tested against flag.
|
||||
*/
|
||||
typedef struct SceneObjectsIteratorExData {
|
||||
struct Scene *scene;
|
||||
struct SceneObjectsIteratorExData {
|
||||
Scene *scene;
|
||||
int flag;
|
||||
void *iter_data;
|
||||
} SceneObjectsIteratorExData;
|
||||
};
|
||||
|
||||
void BKE_scene_objects_iterator_begin_ex(struct BLI_Iterator *iter, void *data_in);
|
||||
void BKE_scene_objects_iterator_next_ex(struct BLI_Iterator *iter);
|
||||
void BKE_scene_objects_iterator_end_ex(struct BLI_Iterator *iter);
|
||||
void BKE_scene_objects_iterator_begin_ex(BLI_Iterator *iter, void *data_in);
|
||||
void BKE_scene_objects_iterator_next_ex(BLI_Iterator *iter);
|
||||
void BKE_scene_objects_iterator_end_ex(BLI_Iterator *iter);
|
||||
|
||||
/**
|
||||
* Generate a new #GSet (or extend given `objects_gset` if not NULL) with all objects referenced by
|
||||
|
@ -408,7 +378,7 @@ void BKE_scene_objects_iterator_end_ex(struct BLI_Iterator *iter);
|
|||
* \note This will include objects without a base currently
|
||||
* (because they would belong to excluded collections only e.g.).
|
||||
*/
|
||||
struct GSet *BKE_scene_objects_as_gset(struct Scene *scene, struct GSet *objects_gset);
|
||||
GSet *BKE_scene_objects_as_gset(Scene *scene, GSet *objects_gset);
|
||||
|
||||
#define FOREACH_SCENE_COLLECTION_BEGIN(scene, _instance) \
|
||||
ITER_BEGIN (BKE_scene_collections_iterator_begin, \
|
||||
|
@ -430,16 +400,16 @@ struct GSet *BKE_scene_objects_as_gset(struct Scene *scene, struct GSet *objects
|
|||
_instance_next = _scene->master_collection; \
|
||||
} \
|
||||
else { \
|
||||
_instance_next = (Collection *)(_bmain)->collections.first; \
|
||||
_instance_next = static_cast<Collection *>((_bmain)->collections.first); \
|
||||
} \
|
||||
\
|
||||
while ((_instance = _instance_next)) { \
|
||||
if (is_scene_collection) { \
|
||||
_instance_next = (Collection *)(_bmain)->collections.first; \
|
||||
_instance_next = static_cast<Collection *>((_bmain)->collections.first); \
|
||||
is_scene_collection = false; \
|
||||
} \
|
||||
else { \
|
||||
_instance_next = (Collection *)_instance->id.next; \
|
||||
_instance_next = static_cast<Collection *>(_instance->id.next); \
|
||||
}
|
||||
|
||||
#define FOREACH_COLLECTION_END \
|
||||
|
@ -456,7 +426,3 @@ struct GSet *BKE_scene_objects_as_gset(struct Scene *scene, struct GSet *objects
|
|||
_instance)
|
||||
|
||||
#define FOREACH_SCENE_OBJECT_END ITER_END
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_collection.hh"
|
||||
|
||||
#include "DNA_layer_types.h"
|
||||
#include "DNA_listBase.h"
|
||||
|
|
|
@ -19,10 +19,12 @@
|
|||
* - `BKE_lib_query_` should be used for functions in that file.
|
||||
*/
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
struct ID;
|
||||
struct IDProperty;
|
||||
#include <array>
|
||||
|
||||
struct LibraryForeachIDData;
|
||||
struct Main;
|
||||
|
||||
|
@ -316,27 +318,81 @@ void BKE_library_ID_test_usages(Main *bmain,
|
|||
bool *r_is_used_local,
|
||||
bool *r_is_used_linked);
|
||||
|
||||
/** Parameters and result data structure for the 'unused IDs' functions below. */
|
||||
struct LibQueryUnusedIDsData {
|
||||
/** Process local data-blocks. */
|
||||
bool do_local_ids;
|
||||
/** Process linked data-blocks. */
|
||||
bool do_linked_ids;
|
||||
/**
|
||||
* Process all actually unused data-blocks, including these that are currently only used by
|
||||
* other unused data-blocks, and 'dependency islands' of several data-blocks using each-other,
|
||||
* without any external valid user.
|
||||
*/
|
||||
bool do_recursive;
|
||||
|
||||
/**
|
||||
* Amount of detected as unused data-blocks, per type and total as the last value of the array
|
||||
* (#INDEX_ID_NULL).
|
||||
*
|
||||
* \note: Return value, set by the executed function.
|
||||
*/
|
||||
std::array<int, INDEX_ID_MAX> num_total;
|
||||
/**
|
||||
* Amount of detected as unused local data-blocks, per type and total as the last value of the
|
||||
* array (#INDEX_ID_NULL).
|
||||
*
|
||||
* \note: Return value, set by the executed function.
|
||||
*/
|
||||
std::array<int, INDEX_ID_MAX> num_local;
|
||||
/**
|
||||
* Amount of detected as unused linked data-blocks, per type and total as the last value of the
|
||||
* array (#INDEX_ID_NULL).
|
||||
*
|
||||
* \note: Return value, set by the executed function.
|
||||
*/
|
||||
std::array<int, INDEX_ID_MAX> num_linked;
|
||||
};
|
||||
|
||||
/**
|
||||
* Tag all unused IDs (a.k.a 'orphaned').
|
||||
* Compute amount of unused IDs (a.k.a 'orphaned').
|
||||
*
|
||||
* By default only tag IDs with `0` user count.
|
||||
* If `do_tag_recursive` is set, it will check dependencies to detect all IDs that are not actually
|
||||
* By default only consider IDs with `0` user count.
|
||||
* If `do_recursive` is set, it will check dependencies to detect all IDs that are not actually
|
||||
* used in current file, including 'archipelagos` (i.e. set of IDs referencing each other in
|
||||
* loops, but without any 'external' valid usages.
|
||||
*
|
||||
* Valid usages here are defined as ref-counting usages, which are not towards embedded or
|
||||
* loop-back data.
|
||||
*
|
||||
* \param r_num_tagged: If non-NULL, must be a zero-initialized array of #INDEX_ID_MAX integers.
|
||||
* Number of tagged-as-unused IDs is then set for each type, and as total in
|
||||
* \param r_num_total: A zero-initialized array of #INDEX_ID_MAX integers. Number of IDs detected
|
||||
* as unused from given parameters, per ID type in the matching index, and as total in
|
||||
* #INDEX_ID_NULL item.
|
||||
* \param r_num_local: A zero-initialized array of #INDEX_ID_MAX integers. Number of local IDs
|
||||
* detected as unused from given parameters (but assuming \a do_local_ids is true), per ID type in
|
||||
* the matching index, and as total in #INDEX_ID_NULL item.
|
||||
* \param r_num_linked: A zero-initialized array of #INDEX_ID_MAX integers. Number of linked IDs
|
||||
* detected as unused from given parameters (but assuming \a do_linked_ids is true), per ID type in
|
||||
* the matching index, and as total in #INDEX_ID_NULL item.
|
||||
*/
|
||||
void BKE_lib_query_unused_ids_amounts(Main *bmain, LibQueryUnusedIDsData ¶meters);
|
||||
/**
|
||||
* Tag all unused IDs (a.k.a 'orphaned').
|
||||
*
|
||||
* By default only tag IDs with `0` user count.
|
||||
* If `do_recursive` is set, it will check dependencies to detect all IDs that are not actually
|
||||
* used in current file, including 'archipelagos` (i.e. set of IDs referencing each other in
|
||||
* loops, but without any 'external' valid usages.
|
||||
*
|
||||
* Valid usages here are defined as ref-counting usages, which are not towards embedded or
|
||||
* loop-back data.
|
||||
*
|
||||
* \param tag: the ID tag to use to mark the ID as unused. Should never be `0`.
|
||||
* \param r_num_tagged_total: A zero-initialized array of #INDEX_ID_MAX integers. Number of IDs
|
||||
* tagged as unused from given parameters, per ID type in the matching index, and as total in
|
||||
* #INDEX_ID_NULL item.
|
||||
*/
|
||||
void BKE_lib_query_unused_ids_tag(Main *bmain,
|
||||
int tag,
|
||||
bool do_local_ids,
|
||||
bool do_linked_ids,
|
||||
bool do_tag_recursive,
|
||||
int *r_num_tagged);
|
||||
void BKE_lib_query_unused_ids_tag(Main *bmain, int tag, LibQueryUnusedIDsData ¶meters);
|
||||
|
||||
/**
|
||||
* Detect orphaned linked data blocks (i.e. linked data not used (directly or indirectly)
|
||||
|
|
|
@ -4,12 +4,22 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_timeit.hh"
|
||||
#include "BLI_utility_mixins.hh"
|
||||
|
||||
namespace blender::bke {
|
||||
|
||||
/* Runtime data specific to the compositing trees. */
|
||||
struct CompositorRuntime {
|
||||
/* Per-node instance total execution time for the corresponding node, during the last tree
|
||||
* evaluation. */
|
||||
Map<bNodeInstanceKey, timeit::Nanoseconds> per_node_execution_time;
|
||||
};
|
||||
|
||||
class SceneRuntime : NonCopyable, NonMovable {
|
||||
public:
|
||||
CompositorRuntime compositor;
|
||||
};
|
||||
|
||||
} // namespace blender::bke
|
||||
|
|
|
@ -341,7 +341,7 @@ set(SRC
|
|||
BKE_bake_items_paths.hh
|
||||
BKE_bake_items_serialize.hh
|
||||
BKE_bake_items_socket.hh
|
||||
BKE_blender.h
|
||||
BKE_blender.hh
|
||||
BKE_blender_copybuffer.hh
|
||||
BKE_blender_undo.hh
|
||||
BKE_blender_user_menu.hh
|
||||
|
@ -349,16 +349,16 @@ set(SRC
|
|||
BKE_blendfile.hh
|
||||
BKE_blendfile_link_append.hh
|
||||
BKE_boids.h
|
||||
BKE_bpath.h
|
||||
BKE_bpath.hh
|
||||
BKE_brush.hh
|
||||
BKE_bvhutils.hh
|
||||
BKE_cachefile.h
|
||||
BKE_callbacks.h
|
||||
BKE_cachefile.hh
|
||||
BKE_callbacks.hh
|
||||
BKE_camera.h
|
||||
BKE_ccg.h
|
||||
BKE_cdderivedmesh.h
|
||||
BKE_cloth.hh
|
||||
BKE_collection.h
|
||||
BKE_collection.hh
|
||||
BKE_collision.h
|
||||
BKE_colorband.hh
|
||||
BKE_colortools.hh
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_anim_data.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_light_types.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_anim_visualization.h"
|
||||
#include "BKE_report.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "BKE_appdir.hh" /* own include */
|
||||
#include "BKE_blender_version.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "GHOST_Path-api.hh"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "BLI_string.h"
|
||||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "DNA_defaults.h"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_attribute.hh"
|
||||
#include "BKE_curves.hh"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "BLI_math_vector_types.hh"
|
||||
#include "BLI_span.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "FN_field.hh"
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <sstream>
|
||||
|
||||
#include "BKE_bake_geometry_nodes_modifier.hh"
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_collection.hh"
|
||||
#include "BKE_curves.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
#include "IMB_moviecache.hh"
|
||||
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_blender.h" /* own include */
|
||||
#include "BKE_blender.hh" /* own include */
|
||||
#include "BKE_blender_user_menu.hh" /* own include */
|
||||
#include "BKE_blender_version.h" /* own include */
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_brush.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_idprop.h"
|
||||
#include "BKE_image.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
#include "BLO_readfile.hh"
|
||||
#include "BLO_writefile.hh"
|
||||
|
||||
#include "IMB_colormanagement.hh"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "BKE_main.hh"
|
||||
#include "BKE_undo_system.hh"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
#include "BLO_readfile.hh"
|
||||
#include "BLO_undofile.hh"
|
||||
#include "BLO_writefile.hh"
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_blender_version.h"
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_bpath.h"
|
||||
#include "BKE_bpath.hh"
|
||||
#include "BKE_colorband.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
|
@ -57,7 +57,8 @@
|
|||
#include "BKE_undo_system.hh"
|
||||
#include "BKE_workspace.h"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
#include "BLO_readfile.hh"
|
||||
#include "BLO_userdef_default.h"
|
||||
#include "BLO_writefile.hh"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "BLI_memarena.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_idtype.hh"
|
||||
#include "BKE_key.hh"
|
||||
|
@ -53,7 +53,7 @@
|
|||
|
||||
#include "BKE_blendfile_link_append.hh"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
#include "BLO_readfile.hh"
|
||||
#include "BLO_writefile.hh"
|
||||
|
||||
static CLG_LogRef LOG = {"bke.blendfile_link_append"};
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "BKE_particle.h"
|
||||
#include "BLI_kdopbvh.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_modifier.hh"
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#include "BKE_report.h"
|
||||
#include "BKE_vfont.hh"
|
||||
|
||||
#include "BKE_bpath.h" /* own include */
|
||||
#include "BKE_bpath.hh" /* own include */
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "CLG_log.h"
|
||||
|
||||
#include "BKE_bpath.h"
|
||||
#include "BKE_bpath.hh"
|
||||
#include "BKE_idtype.hh"
|
||||
#include "BKE_lib_id.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_rand.h"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
#include "BLO_readfile.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_asset.hh"
|
||||
#include "BKE_blendfile_link_append.hh"
|
||||
#include "BKE_bpath.h"
|
||||
#include "BKE_bpath.hh"
|
||||
#include "BKE_brush.hh"
|
||||
#include "BKE_colortools.hh"
|
||||
#include "BKE_context.hh"
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_anim_data.h"
|
||||
#include "BKE_bpath.h"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_bpath.hh"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_idtype.hh"
|
||||
#include "BKE_lib_id.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "BKE_scene.h"
|
||||
#include "BKE_screen.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#include "BLI_listbase.h"
|
||||
#include "BLI_math_base.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_anim_data.h"
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_collection.hh"
|
||||
#include "BKE_idprop.h"
|
||||
#include "BKE_idtype.hh"
|
||||
#include "BKE_layer.hh"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_cloth.hh"
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_collection.hh"
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_layer.hh"
|
||||
#include "BKE_modifier.hh"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "DNA_action_types.h"
|
||||
#include "DNA_armature_types.h"
|
||||
|
@ -49,7 +49,7 @@
|
|||
#include "BKE_animsys.h"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_bvhutils.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_camera.h"
|
||||
#include "BKE_constraint.h"
|
||||
#include "BKE_curve.hh"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_layer.hh"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "BLI_math_vector_types.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
/* Allow using deprecated functionality for .blend file I/O. */
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "BKE_object.hh"
|
||||
#include "BKE_object_types.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
# include "BLI_dynstr.h"
|
||||
#endif
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_anonymous_attribute_id.hh"
|
||||
#include "BKE_customdata.hh"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_attribute.hh"
|
||||
#include "BKE_customdata.hh"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue