Compare commits
80 Commits
temp_test_
...
temp-multi
Author | SHA1 | Date | |
---|---|---|---|
eed93aaa07 | |||
fc0bb6cdee | |||
10f2ad1556 | |||
6d77b87b13 | |||
2101b46802 | |||
34f6765630 | |||
c58d1acba8 | |||
0ee79f304e | |||
e642de3d6f | |||
eca5a8b695 | |||
79c79f3c70 | |||
a9970d3cb9 | |||
b812f289f5 | |||
215ce0fb57 | |||
5154598845 | |||
1ee80d792c | |||
95284d2f1e | |||
7281f3eb56 | |||
607ef8f6c5 | |||
1ce640cc0b | |||
7bed18fdb1 | |||
c827b50d40 | |||
3c7e3c8e44 | |||
98e38ce4f3 | |||
132cf268c0 | |||
fd7edc9b05 | |||
ecf7c90840 | |||
d78a530af1 | |||
3ebe61db9f | |||
86c2f139c6 | |||
3596c348eb | |||
41a81474e4 | |||
aa2822d137 | |||
55b333d3e3 | |||
00cfad8578 | |||
1891c956e5 | |||
249c050757 | |||
a0081046b6 | |||
635f73b7f1 | |||
74fcd50e2f | |||
b04a2a7be7 | |||
083671e8ac | |||
78ea401e19 | |||
f3ca987bce | |||
2245add9f8 | |||
31004d7fac | |||
3d3f66ed41 | |||
c9c0195da5 | |||
70c0403858 | |||
8d4de82c7f | |||
22c51c2d51 | |||
158bd7c6a0 | |||
4a28d0b583 | |||
0501e6e693 | |||
8450ac09c1 | |||
1af00015e8 | |||
b44c3a3125 | |||
d729f1ca37 | |||
0fc9f00c14 | |||
6c9b339af7 | |||
b7a976af01 | |||
a689037917 | |||
313403c1f1 | |||
60409b8823 | |||
773dc2ec94 | |||
2a98c5d06b | |||
6d1b4ce3c6 | |||
0b2d961b70 | |||
d553b70470 | |||
6954f2cdd7 | |||
8cc832110a | |||
7b8c54b5a1 | |||
e850d175b5 | |||
326f79d59b | |||
ec4954ece2 | |||
b30e782c82 | |||
e34fe5d28e | |||
8581a062f1 | |||
b43971e5e9 | |||
855382170e |
@@ -263,7 +263,6 @@ ForEachMacros:
|
||||
- SET_SLOT_PROBING_BEGIN
|
||||
- MAP_SLOT_PROBING_BEGIN
|
||||
- VECTOR_SET_SLOT_PROBING_BEGIN
|
||||
- TGSET_ITER
|
||||
|
||||
StatementMacros:
|
||||
- PyObject_HEAD
|
||||
|
@@ -578,12 +578,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
|
||||
)
|
||||
find_library(
|
||||
COMPILER_ASAN_LIBRARY_THUNK NAMES clang_rt.asan_dll_thunk-x86_64
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
|
||||
)
|
||||
elseif(APPLE)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER}
|
||||
-print-file-name=lib
|
||||
@@ -604,7 +598,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(COMPILER_ASAN_LIBRARY_THUNK)
|
||||
mark_as_advanced(COMPILER_ASAN_LIBRARY)
|
||||
endif()
|
||||
endif()
|
||||
@@ -925,9 +918,9 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
unset(_list_COMPILER_ASAN_CFLAGS)
|
||||
unset(_is_CONFIG_DEBUG)
|
||||
elseif(COMPILER_ASAN_LIBRARY)
|
||||
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};\"${COMPILER_ASAN_LIBRARY}\" \"${COMPILER_ASAN_LIBRARY_THUNK}\"")
|
||||
set(PLATFORM_LINKFLAGS "\"${COMPILER_ASAN_LIBRARY}\" \"${COMPILER_ASAN_LIBRARY_THUNK}\" ${COMPILER_ASAN_LINKER_FLAGS}")
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "\"${COMPILER_ASAN_LIBRARY}\" \"${COMPILER_ASAN_LIBRARY_THUNK}\" ${COMPILER_ASAN_LINKER_FLAGS}")
|
||||
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
|
||||
set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -1605,7 +1598,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
|
||||
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
|
||||
# Using C++20 features while having C++17 as the project language isn't allowed by MSVC.
|
||||
# Designated initializer is a C++20 feature & breaks MSVC build. Dropping MSVC 2019 or
|
||||
# updating to C++20 allows removing this.
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_CXX20_DESIGNATOR -Wc++20-designator)
|
||||
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
|
||||
|
@@ -151,8 +151,8 @@ if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
|
||||
else()
|
||||
string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj /Zc:inline")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj /Zc:inline")
|
||||
string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj")
|
||||
endif()
|
||||
|
||||
# X64 ASAN is available and usable on MSVC 16.9 preview 4 and up)
|
||||
@@ -259,7 +259,7 @@ if(NOT DEFINED LIBDIR)
|
||||
else()
|
||||
message(FATAL_ERROR "32 bit compiler detected, blender no longer provides pre-build libraries for 32 bit windows, please set the LIBDIR cmake variable to your own library folder")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.30.30423)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.29.30130)
|
||||
message(STATUS "Visual Studio 2022 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc15)
|
||||
elseif(MSVC_VERSION GREATER 1919)
|
||||
|
@@ -51,9 +51,9 @@ buildbot:
|
||||
gcc:
|
||||
version: '9.0.0'
|
||||
cuda10:
|
||||
version: '10.1.243'
|
||||
version: '10.1.0'
|
||||
cuda11:
|
||||
version: '11.4.1'
|
||||
version: '11.4.0'
|
||||
optix:
|
||||
version: '7.1.0'
|
||||
cmake:
|
||||
|
@@ -31,7 +31,6 @@ def parse_arguments():
|
||||
parser.add_argument("--no-submodules", action="store_true")
|
||||
parser.add_argument("--use-tests", action="store_true")
|
||||
parser.add_argument("--svn-command", default="svn")
|
||||
parser.add_argument("--svn-branch", default=None)
|
||||
parser.add_argument("--git-command", default="git")
|
||||
parser.add_argument("--use-centos-libraries", action="store_true")
|
||||
return parser.parse_args()
|
||||
@@ -47,7 +46,7 @@ def svn_update(args, release_version):
|
||||
svn_non_interactive = [args.svn_command, '--non-interactive']
|
||||
|
||||
lib_dirpath = os.path.join(get_blender_git_root(), '..', 'lib')
|
||||
svn_url = make_utils.svn_libraries_base_url(release_version, args.svn_branch)
|
||||
svn_url = make_utils.svn_libraries_base_url(release_version)
|
||||
|
||||
# Checkout precompiled libraries
|
||||
if sys.platform == 'darwin':
|
||||
@@ -171,28 +170,26 @@ def submodules_update(args, release_version, branch):
|
||||
sys.stderr.write("git not found, can't update code\n")
|
||||
sys.exit(1)
|
||||
|
||||
# Update submodules to appropriate given branch,
|
||||
# falling back to master if none is given and/or found in a sub-repository.
|
||||
branch_fallback = "master"
|
||||
if not branch:
|
||||
branch = branch_fallback
|
||||
# Update submodules to latest master or appropriate release branch.
|
||||
if not release_version:
|
||||
branch = "master"
|
||||
|
||||
submodules = [
|
||||
("release/scripts/addons", branch, branch_fallback),
|
||||
("release/scripts/addons_contrib", branch, branch_fallback),
|
||||
("release/datafiles/locale", branch, branch_fallback),
|
||||
("source/tools", branch, branch_fallback),
|
||||
("release/scripts/addons", branch),
|
||||
("release/scripts/addons_contrib", branch),
|
||||
("release/datafiles/locale", branch),
|
||||
("source/tools", branch),
|
||||
]
|
||||
|
||||
# Initialize submodules only if needed.
|
||||
for submodule_path, submodule_branch, submodule_branch_fallback in submodules:
|
||||
for submodule_path, submodule_branch in submodules:
|
||||
if not os.path.exists(os.path.join(submodule_path, ".git")):
|
||||
call([args.git_command, "submodule", "update", "--init", "--recursive"])
|
||||
break
|
||||
|
||||
# Checkout appropriate branch and pull changes.
|
||||
skip_msg = ""
|
||||
for submodule_path, submodule_branch, submodule_branch_fallback in submodules:
|
||||
for submodule_path, submodule_branch in submodules:
|
||||
cwd = os.getcwd()
|
||||
try:
|
||||
os.chdir(submodule_path)
|
||||
@@ -204,11 +201,6 @@ def submodules_update(args, release_version, branch):
|
||||
call([args.git_command, "fetch", "origin"])
|
||||
call([args.git_command, "checkout", submodule_branch])
|
||||
call([args.git_command, "pull", "--rebase", "origin", submodule_branch])
|
||||
# If we cannot find the specified branch for this submodule, fallback to default one (aka master).
|
||||
if make_utils.git_branch(args.git_command) != submodule_branch:
|
||||
call([args.git_command, "fetch", "origin"])
|
||||
call([args.git_command, "checkout", submodule_branch_fallback])
|
||||
call([args.git_command, "pull", "--rebase", "origin", submodule_branch_fallback])
|
||||
finally:
|
||||
os.chdir(cwd)
|
||||
|
||||
@@ -222,10 +214,6 @@ if __name__ == "__main__":
|
||||
|
||||
# Test if we are building a specific release version.
|
||||
branch = make_utils.git_branch(args.git_command)
|
||||
if branch == 'HEAD':
|
||||
sys.stderr.write('Blender git repository is in detached HEAD state, must be in a branch\n')
|
||||
sys.exit(1)
|
||||
|
||||
tag = make_utils.git_tag(args.git_command)
|
||||
release_version = make_utils.git_branch_release_version(branch, tag)
|
||||
|
||||
|
@@ -70,11 +70,9 @@ def git_branch_release_version(branch, tag):
|
||||
return release_version
|
||||
|
||||
|
||||
def svn_libraries_base_url(release_version, branch=None):
|
||||
def svn_libraries_base_url(release_version):
|
||||
if release_version:
|
||||
svn_branch = "tags/blender-" + release_version + "-release"
|
||||
elif branch:
|
||||
svn_branch = "branches/" + branch
|
||||
else:
|
||||
svn_branch = "trunk"
|
||||
return "https://svn.blender.org/svnroot/bf-blender/" + svn_branch + "/lib/"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
if EXIST "%PYTHON%" (
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
|
||||
|
@@ -10,4 +10,4 @@ requests==2.26.0
|
||||
|
||||
# Only needed to match the theme used for the official documentation.
|
||||
# Without this theme, the default theme will be used.
|
||||
sphinx_rtd_theme==1.0.0
|
||||
sphinx_rtd_theme==1.0.0rc1
|
||||
|
@@ -1039,17 +1039,13 @@ context_type_map = {
|
||||
# context_member: (RNA type, is_collection)
|
||||
"active_annotation_layer": ("GPencilLayer", False),
|
||||
"active_bone": ("EditBone", False),
|
||||
"active_file": ("FileSelectEntry", False),
|
||||
"active_gpencil_frame": ("GreasePencilLayer", True),
|
||||
"active_gpencil_layer": ("GPencilLayer", True),
|
||||
"active_node": ("Node", False),
|
||||
"active_object": ("Object", False),
|
||||
"active_operator": ("Operator", False),
|
||||
"active_pose_bone": ("PoseBone", False),
|
||||
"active_sequence_strip": ("Sequence", False),
|
||||
"active_editable_fcurve": ("FCurve", False),
|
||||
"active_nla_strip": ("NlaStrip", False),
|
||||
"active_nla_track": ("NlaTrack", False),
|
||||
"annotation_data": ("GreasePencil", False),
|
||||
"annotation_data_owner": ("ID", False),
|
||||
"armature": ("Armature", False),
|
||||
@@ -1078,7 +1074,6 @@ context_type_map = {
|
||||
"gpencil_data": ("GreasePencil", False),
|
||||
"gpencil_data_owner": ("ID", False),
|
||||
"hair": ("Hair", False),
|
||||
"id": ("ID", False),
|
||||
"image_paint_object": ("Object", False),
|
||||
"lattice": ("Lattice", False),
|
||||
"light": ("Light", False),
|
||||
@@ -1107,7 +1102,6 @@ context_type_map = {
|
||||
"selected_editable_keyframes": ("Keyframe", True),
|
||||
"selected_editable_objects": ("Object", True),
|
||||
"selected_editable_sequences": ("Sequence", True),
|
||||
"selected_files": ("FileSelectEntry", True),
|
||||
"selected_nla_strips": ("NlaStrip", True),
|
||||
"selected_nodes": ("Node", True),
|
||||
"selected_objects": ("Object", True),
|
||||
@@ -1204,7 +1198,6 @@ def pycontext2sphinx(basepath):
|
||||
"text_context_dir",
|
||||
"clip_context_dir",
|
||||
"sequencer_context_dir",
|
||||
"file_context_dir",
|
||||
)
|
||||
|
||||
unique = set()
|
||||
@@ -2002,7 +1995,7 @@ def write_rst_importable_modules(basepath):
|
||||
"blf": "Font Drawing",
|
||||
"imbuf": "Image Buffer",
|
||||
"imbuf.types": "Image Buffer Types",
|
||||
"gpu": "GPU Module",
|
||||
"gpu": "GPU Shader Module",
|
||||
"gpu.types": "GPU Types",
|
||||
"gpu.matrix": "GPU Matrix Utilities",
|
||||
"gpu.select": "GPU Select Utilities",
|
||||
|
2
extern/Eigen3/Eigen/src/Core/util/Macros.h
vendored
2
extern/Eigen3/Eigen/src/Core/util/Macros.h
vendored
@@ -389,7 +389,7 @@
|
||||
|
||||
// Does the compiler support result_of?
|
||||
#ifndef EIGEN_HAS_STD_RESULT_OF
|
||||
#if __cplusplus < 201703L && EIGEN_MAX_CPP_VER>=11 && ((__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L && __cplusplus)))
|
||||
#if EIGEN_MAX_CPP_VER>=11 && ((__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L)))
|
||||
#define EIGEN_HAS_STD_RESULT_OF 1
|
||||
#else
|
||||
#define EIGEN_HAS_STD_RESULT_OF 0
|
||||
|
2
extern/audaspace/bindings/C/AUD_Device.cpp
vendored
2
extern/audaspace/bindings/C/AUD_Device.cpp
vendored
@@ -221,7 +221,7 @@ AUD_API void AUD_Device_setListenerVelocity(AUD_Device* device, const float valu
|
||||
AUD_API double AUD_Device_getRate(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
return dev ? dev->getSpecs().rate : 0.0;
|
||||
return dev->getSpecs().rate;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Device_getSpeedOfSound(AUD_Device* device)
|
||||
|
8
extern/audaspace/include/util/ThreadPool.h
vendored
8
extern/audaspace/include/util/ThreadPool.h
vendored
@@ -87,17 +87,11 @@ public:
|
||||
* \param args The arguments of the task.
|
||||
* \return A future of the same type as the return type of the task.
|
||||
*/
|
||||
#if __cplusplus > 201703L
|
||||
template<class T, class... Args>
|
||||
std::future<typename std::invoke_result<T, Args...>::type> enqueue(T&& t, Args&&... args)
|
||||
{
|
||||
using pkgdTask = std::packaged_task<typename std::invoke_result<T, Args...>::type()>;
|
||||
#else
|
||||
template<class T, class... Args>
|
||||
std::future<typename std::result_of<T(Args...)>::type> enqueue(T&& t, Args&&... args)
|
||||
{
|
||||
using pkgdTask = std::packaged_task<typename std::result_of<T(Args...)>::type()>;
|
||||
#endif
|
||||
|
||||
std::shared_ptr<pkgdTask> task = std::make_shared<pkgdTask>(std::bind(std::forward<T>(t), std::forward<Args>(args)...));
|
||||
auto result = task->get_future();
|
||||
|
||||
|
2
extern/mantaflow/UPDATE.sh
vendored
2
extern/mantaflow/UPDATE.sh
vendored
@@ -8,7 +8,7 @@
|
||||
|
||||
# YOUR INSTALLATION PATHS GO HERE:
|
||||
MANTA_INSTALLATION=/Users/sebbas/Developer/Mantaflow/mantaflowDevelop
|
||||
BLENDER_INSTALLATION=/Users/sebbas/Developer/Blender
|
||||
BLENDER_INSTALLATION=/Users/sebbas/Developer/Blender/fluid-mantaflow
|
||||
|
||||
# Try to check out Mantaflow repository before building?
|
||||
CLEAN_REPOSITORY=0
|
||||
|
@@ -28,13 +28,11 @@ extern PyTypeObject PbVec3Type;
|
||||
extern PyTypeObject PbVec4Type;
|
||||
|
||||
struct PbVec3 {
|
||||
PyObject_HEAD
|
||||
float data[3];
|
||||
PyObject_HEAD float data[3];
|
||||
};
|
||||
|
||||
struct PbVec4 {
|
||||
PyObject_HEAD
|
||||
float data[4];
|
||||
PyObject_HEAD float data[4];
|
||||
};
|
||||
|
||||
PyObject *getPyNone()
|
||||
|
6
extern/mantaflow/helper/pwrapper/pvec3.cpp
vendored
6
extern/mantaflow/helper/pwrapper/pvec3.cpp
vendored
@@ -25,8 +25,7 @@ namespace Manta {
|
||||
extern PyTypeObject PbVec3Type;
|
||||
|
||||
struct PbVec3 {
|
||||
PyObject_HEAD
|
||||
float data[3];
|
||||
PyObject_HEAD float data[3];
|
||||
};
|
||||
|
||||
static void PbVec3Dealloc(PbVec3 *self)
|
||||
@@ -294,8 +293,7 @@ inline PyObject *castPy(PyTypeObject *p)
|
||||
extern PyTypeObject PbVec4Type;
|
||||
|
||||
struct PbVec4 {
|
||||
PyObject_HEAD
|
||||
float data[4];
|
||||
PyObject_HEAD float data[4];
|
||||
};
|
||||
|
||||
static PyMethodDef PbVec4Methods[] = {
|
||||
|
@@ -76,8 +76,7 @@ struct ClassData {
|
||||
};
|
||||
|
||||
struct PbObject {
|
||||
PyObject_HEAD
|
||||
Manta::PbClass *instance;
|
||||
PyObject_HEAD Manta::PbClass *instance;
|
||||
ClassData *classdef;
|
||||
};
|
||||
|
||||
|
202
extern/mantaflow/preprocessed/fastmarch.cpp
vendored
202
extern/mantaflow/preprocessed/fastmarch.cpp
vendored
@@ -874,136 +874,6 @@ static const Vec3i nb[6] = {Vec3i(1, 0, 0),
|
||||
Vec3i(0, 0, 1),
|
||||
Vec3i(0, 0, -1)};
|
||||
|
||||
struct knMarkSkipCells : public KernelBase {
|
||||
knMarkSkipCells(Grid<Real> &phi, Grid<int> &tmp, bool inside)
|
||||
: KernelBase(&phi, 1), phi(phi), tmp(tmp), inside(inside)
|
||||
{
|
||||
runMessage();
|
||||
run();
|
||||
}
|
||||
inline void op(int i, int j, int k, Grid<Real> &phi, Grid<int> &tmp, bool inside) const
|
||||
{
|
||||
if (!inside && phi(i, j, k) < 0.) {
|
||||
tmp(i, j, k) = 1;
|
||||
}
|
||||
if (inside && phi(i, j, k) > 0.) {
|
||||
tmp(i, j, k) = 1;
|
||||
}
|
||||
}
|
||||
inline Grid<Real> &getArg0()
|
||||
{
|
||||
return phi;
|
||||
}
|
||||
typedef Grid<Real> type0;
|
||||
inline Grid<int> &getArg1()
|
||||
{
|
||||
return tmp;
|
||||
}
|
||||
typedef Grid<int> type1;
|
||||
inline bool &getArg2()
|
||||
{
|
||||
return inside;
|
||||
}
|
||||
typedef bool type2;
|
||||
void runMessage()
|
||||
{
|
||||
debMsg("Executing kernel knMarkSkipCells ", 3);
|
||||
debMsg("Kernel range"
|
||||
<< " x " << maxX << " y " << maxY << " z " << minZ << " - " << maxZ << " ",
|
||||
4);
|
||||
};
|
||||
void operator()(const tbb::blocked_range<IndexInt> &__r) const
|
||||
{
|
||||
const int _maxX = maxX;
|
||||
const int _maxY = maxY;
|
||||
if (maxZ > 1) {
|
||||
for (int k = __r.begin(); k != (int)__r.end(); k++)
|
||||
for (int j = 1; j < _maxY; j++)
|
||||
for (int i = 1; i < _maxX; i++)
|
||||
op(i, j, k, phi, tmp, inside);
|
||||
}
|
||||
else {
|
||||
const int k = 0;
|
||||
for (int j = __r.begin(); j != (int)__r.end(); j++)
|
||||
for (int i = 1; i < _maxX; i++)
|
||||
op(i, j, k, phi, tmp, inside);
|
||||
}
|
||||
}
|
||||
void run()
|
||||
{
|
||||
if (maxZ > 1)
|
||||
tbb::parallel_for(tbb::blocked_range<IndexInt>(minZ, maxZ), *this);
|
||||
else
|
||||
tbb::parallel_for(tbb::blocked_range<IndexInt>(1, maxY), *this);
|
||||
}
|
||||
Grid<Real> φ
|
||||
Grid<int> &tmp;
|
||||
bool inside;
|
||||
};
|
||||
|
||||
struct knSetFirstLayer : public KernelBase {
|
||||
knSetFirstLayer(Grid<int> &tmp, int dim) : KernelBase(&tmp, 1), tmp(tmp), dim(dim)
|
||||
{
|
||||
runMessage();
|
||||
run();
|
||||
}
|
||||
inline void op(int i, int j, int k, Grid<int> &tmp, int dim) const
|
||||
{
|
||||
Vec3i p(i, j, k);
|
||||
if (tmp(p))
|
||||
return;
|
||||
for (int n = 0; n < 2 * dim; ++n) {
|
||||
if (tmp(p + nb[n]) == 1) {
|
||||
tmp(i, j, k) = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
inline Grid<int> &getArg0()
|
||||
{
|
||||
return tmp;
|
||||
}
|
||||
typedef Grid<int> type0;
|
||||
inline int &getArg1()
|
||||
{
|
||||
return dim;
|
||||
}
|
||||
typedef int type1;
|
||||
void runMessage()
|
||||
{
|
||||
debMsg("Executing kernel knSetFirstLayer ", 3);
|
||||
debMsg("Kernel range"
|
||||
<< " x " << maxX << " y " << maxY << " z " << minZ << " - " << maxZ << " ",
|
||||
4);
|
||||
};
|
||||
void operator()(const tbb::blocked_range<IndexInt> &__r) const
|
||||
{
|
||||
const int _maxX = maxX;
|
||||
const int _maxY = maxY;
|
||||
if (maxZ > 1) {
|
||||
for (int k = __r.begin(); k != (int)__r.end(); k++)
|
||||
for (int j = 1; j < _maxY; j++)
|
||||
for (int i = 1; i < _maxX; i++)
|
||||
op(i, j, k, tmp, dim);
|
||||
}
|
||||
else {
|
||||
const int k = 0;
|
||||
for (int j = __r.begin(); j != (int)__r.end(); j++)
|
||||
for (int i = 1; i < _maxX; i++)
|
||||
op(i, j, k, tmp, dim);
|
||||
}
|
||||
}
|
||||
void run()
|
||||
{
|
||||
if (maxZ > 1)
|
||||
tbb::parallel_for(tbb::blocked_range<IndexInt>(minZ, maxZ), *this);
|
||||
else
|
||||
tbb::parallel_for(tbb::blocked_range<IndexInt>(1, maxY), *this);
|
||||
}
|
||||
Grid<int> &tmp;
|
||||
int dim;
|
||||
};
|
||||
|
||||
template<class S> struct knExtrapolateLsSimple : public KernelBase {
|
||||
knExtrapolateLsSimple(Grid<S> &val, int distance, Grid<int> &tmp, const int d, S direction)
|
||||
: KernelBase(&val, 1), val(val), distance(distance), tmp(tmp), d(d), direction(direction)
|
||||
@@ -1173,12 +1043,39 @@ void extrapolateLsSimple(Grid<Real> &phi, int distance = 4, bool inside = false)
|
||||
tmp.clear();
|
||||
const int dim = (phi.is3D() ? 3 : 2);
|
||||
|
||||
// by default, march outside (ie mark all inside to be skipped)
|
||||
Real direction = (inside) ? -1. : 1.;
|
||||
knMarkSkipCells(phi, tmp, inside);
|
||||
|
||||
// by default, march outside
|
||||
Real direction = 1.;
|
||||
if (!inside) {
|
||||
// mark all inside
|
||||
FOR_IJK_BND(phi, 1)
|
||||
{
|
||||
if (phi(i, j, k) < 0.) {
|
||||
tmp(i, j, k) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
direction = -1.;
|
||||
FOR_IJK_BND(phi, 1)
|
||||
{
|
||||
if (phi(i, j, k) > 0.) {
|
||||
tmp(i, j, k) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// + first layer around
|
||||
knSetFirstLayer(tmp, dim);
|
||||
FOR_IJK_BND(phi, 1)
|
||||
{
|
||||
Vec3i p(i, j, k);
|
||||
if (tmp(p))
|
||||
continue;
|
||||
for (int n = 0; n < 2 * dim; ++n) {
|
||||
if (tmp(p + nb[n]) == 1) {
|
||||
tmp(i, j, k) = 2;
|
||||
n = 2 * dim;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// extrapolate for distance
|
||||
for (int d = 2; d < 1 + distance; ++d) {
|
||||
@@ -1229,12 +1126,37 @@ void extrapolateVec3Simple(Grid<Vec3> &vel, Grid<Real> &phi, int distance = 4, b
|
||||
tmp.clear();
|
||||
const int dim = (vel.is3D() ? 3 : 2);
|
||||
|
||||
// mark initial cells, by default, march outside (ie mark all inside to be skipped)
|
||||
Real direction = (inside) ? -1. : 1.;
|
||||
knMarkSkipCells(phi, tmp, inside);
|
||||
|
||||
// mark initial cells, by default, march outside
|
||||
if (!inside) {
|
||||
// mark all inside
|
||||
FOR_IJK_BND(phi, 1)
|
||||
{
|
||||
if (phi(i, j, k) < 0.) {
|
||||
tmp(i, j, k) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
FOR_IJK_BND(phi, 1)
|
||||
{
|
||||
if (phi(i, j, k) > 0.) {
|
||||
tmp(i, j, k) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// + first layer next to initial cells
|
||||
knSetFirstLayer(tmp, dim);
|
||||
FOR_IJK_BND(vel, 1)
|
||||
{
|
||||
Vec3i p(i, j, k);
|
||||
if (tmp(p))
|
||||
continue;
|
||||
for (int n = 0; n < 2 * dim; ++n) {
|
||||
if (tmp(p + nb[n]) == 1) {
|
||||
tmp(i, j, k) = 2;
|
||||
n = 2 * dim;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int d = 2; d < 1 + distance; ++d) {
|
||||
knExtrapolateLsSimple<Vec3>(vel, distance, tmp, d, Vec3(0.));
|
||||
|
2
extern/mantaflow/preprocessed/gitinfo.h
vendored
2
extern/mantaflow/preprocessed/gitinfo.h
vendored
@@ -1,3 +1,3 @@
|
||||
|
||||
|
||||
#define MANTA_GIT_VERSION "commit d5d9a6c28daa8f21426d7a285f48639c0d8fd13f"
|
||||
#define MANTA_GIT_VERSION "commit 8fbebe02459b7f72575872c20961f7cb757db408"
|
||||
|
@@ -67,7 +67,7 @@ SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
|
||||
SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
|
||||
SET(LEMON_ENABLE_SOPLEX YES CACHE STRING "Enable SoPlex solver backend.")
|
||||
|
||||
IF(LEMON_ENABLE_GLPK)
|
||||
IF(LEMON_ENABLE_GLPK)
|
||||
FIND_PACKAGE(GLPK 4.33)
|
||||
ENDIF(LEMON_ENABLE_GLPK)
|
||||
IF(LEMON_ENABLE_ILOG)
|
||||
|
@@ -4,7 +4,7 @@ FIND_PATH(ILOG_ROOT_DIR
|
||||
PATHS /opt/ibm/ILOG /usr/local/ibm/ILOG /usr/local/ILOG /usr/local/ilog
|
||||
PATHS "$ENV{HOME}/ILOG" "$ENV{HOME}/.local/ILOG"
|
||||
PATHS "$ENV{HOME}/ibm/ILOG" "$ENV{HOME}/.local/ibm/ILOG"
|
||||
PATHS "C:/Program Files/IBM/ILOG"
|
||||
PATHS "C:/Program Files/IBM/ILOG"
|
||||
PATH_SUFFIXES "CPLEX_Studio126" "CPLEX_Studio125"
|
||||
"CPLEX_Studio124" "CPLEX_Studio123" "CPLEX_Studio122"
|
||||
NO_DEFAULT_PATH
|
||||
|
@@ -16,4 +16,3 @@ LINK_DIRECTORIES(
|
||||
|
||||
# ADD_EXECUTABLE(myprog myprog-main.cc)
|
||||
# TARGET_LINK_LIBRARIES(myprog lemon)
|
||||
|
||||
|
@@ -88,4 +88,3 @@ INSTALL(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
|
||||
DESTINATION lib/pkgconfig
|
||||
)
|
||||
|
||||
|
3
extern/quadriflow/src/loader.cpp
vendored
3
extern/quadriflow/src/loader.cpp
vendored
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <unordered_map>
|
||||
#include <functional>
|
||||
|
||||
namespace qflow {
|
||||
|
||||
@@ -70,7 +69,7 @@ void load(const char* filename, MatrixXd& V, MatrixXi& F)
|
||||
};
|
||||
|
||||
/// Hash function for obj_vertex
|
||||
struct obj_vertexHash : std::function<size_t(obj_vertex)> {
|
||||
struct obj_vertexHash {
|
||||
std::size_t operator()(const obj_vertex &v) const {
|
||||
size_t hash = std::hash<uint32_t>()(v.p);
|
||||
hash = hash * 37 + std::hash<uint32_t>()(v.uv);
|
||||
|
BIN
icon_geom.blend
BIN
icon_geom.blend
Binary file not shown.
@@ -49,27 +49,27 @@
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint64_t atomic_add_and_fetch_uint64(uint64_t *p, uint64_t x)
|
||||
{
|
||||
return (uint64_t)(InterlockedExchangeAdd64((int64_t *)p, (int64_t)x) + (int64_t)x);
|
||||
return InterlockedExchangeAdd64((int64_t *)p, (int64_t)x) + x;
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint64_t atomic_sub_and_fetch_uint64(uint64_t *p, uint64_t x)
|
||||
{
|
||||
return (uint64_t)(InterlockedExchangeAdd64((int64_t *)p, -((int64_t)x)) - (int64_t)x);
|
||||
return InterlockedExchangeAdd64((int64_t *)p, -((int64_t)x)) - x;
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint64_t atomic_cas_uint64(uint64_t *v, uint64_t old, uint64_t _new)
|
||||
{
|
||||
return (uint64_t)(InterlockedCompareExchange64((int64_t *)v, _new, old));
|
||||
return InterlockedCompareExchange64((int64_t *)v, _new, old);
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint64_t atomic_fetch_and_add_uint64(uint64_t *p, uint64_t x)
|
||||
{
|
||||
return (uint64_t)InterlockedExchangeAdd64((int64_t *)p, (int64_t)x);
|
||||
return InterlockedExchangeAdd64((int64_t *)p, (int64_t)x);
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint64_t atomic_fetch_and_sub_uint64(uint64_t *p, uint64_t x)
|
||||
{
|
||||
return (uint64_t)InterlockedExchangeAdd64((int64_t *)p, -((int64_t)x));
|
||||
return InterlockedExchangeAdd64((int64_t *)p, -((int64_t)x));
|
||||
}
|
||||
|
||||
/* Signed */
|
||||
@@ -103,32 +103,32 @@ ATOMIC_INLINE int64_t atomic_fetch_and_sub_int64(int64_t *p, int64_t x)
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint32_t atomic_add_and_fetch_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
return (uint32_t)InterlockedExchangeAdd(p, x) + x;
|
||||
return InterlockedExchangeAdd(p, x) + x;
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint32_t atomic_sub_and_fetch_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
return (uint32_t)InterlockedExchangeAdd(p, -((int32_t)x)) - x;
|
||||
return InterlockedExchangeAdd(p, -((int32_t)x)) - x;
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint32_t atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
|
||||
{
|
||||
return (uint32_t)InterlockedCompareExchange((long *)v, _new, old);
|
||||
return InterlockedCompareExchange((long *)v, _new, old);
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint32_t atomic_fetch_and_add_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
return (uint32_t)InterlockedExchangeAdd(p, x);
|
||||
return InterlockedExchangeAdd(p, x);
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint32_t atomic_fetch_and_or_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
return (uint32_t)InterlockedOr((long *)p, x);
|
||||
return InterlockedOr((long *)p, x);
|
||||
}
|
||||
|
||||
ATOMIC_INLINE uint32_t atomic_fetch_and_and_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
return (uint32_t)InterlockedAnd((long *)p, x);
|
||||
return InterlockedAnd((long *)p, x);
|
||||
}
|
||||
|
||||
/* Signed */
|
||||
@@ -205,9 +205,9 @@ ATOMIC_INLINE uint8_t atomic_fetch_and_or_uint8(uint8_t *p, uint8_t b)
|
||||
ATOMIC_INLINE int8_t atomic_fetch_and_and_int8(int8_t *p, int8_t b)
|
||||
{
|
||||
#if (LG_SIZEOF_PTR == 8 || LG_SIZEOF_INT == 8)
|
||||
return (int8_t)InterlockedAnd8((char *)p, (char)b);
|
||||
return InterlockedAnd8((char *)p, (char)b);
|
||||
#else
|
||||
return (int8_t)_InterlockedAnd8((char *)p, (char)b);
|
||||
return _InterlockedAnd8((char *)p, (char)b);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -215,9 +215,9 @@ ATOMIC_INLINE int8_t atomic_fetch_and_and_int8(int8_t *p, int8_t b)
|
||||
ATOMIC_INLINE int8_t atomic_fetch_and_or_int8(int8_t *p, int8_t b)
|
||||
{
|
||||
#if (LG_SIZEOF_PTR == 8 || LG_SIZEOF_INT == 8)
|
||||
return (int8_t)InterlockedOr8((char *)p, (char)b);
|
||||
return InterlockedOr8((char *)p, (char)b);
|
||||
#else
|
||||
return (int8_t)_InterlockedOr8((char *)p, (char)b);
|
||||
return _InterlockedOr8((char *)p, (char)b);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -60,108 +60,9 @@
|
||||
# define JE_FORCE_SYNC_COMPARE_AND_SWAP_8
|
||||
#endif
|
||||
|
||||
/* Define the `ATOMIC_FORCE_USE_FALLBACK` to force lock-based fallback implementation to be used
|
||||
* (even on platforms where there is native implementation available via compiler.
|
||||
* Useful for development purposes. */
|
||||
#undef ATOMIC_FORCE_USE_FALLBACK
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Spin-lock implementation
|
||||
*
|
||||
* Used to implement atomics on unsupported platforms.
|
||||
* The spin implementation is shared for all platforms to make sure it compiles and tested.
|
||||
* \{ */
|
||||
|
||||
typedef struct AtomicSpinLock {
|
||||
volatile int lock;
|
||||
|
||||
/* Pad the structure size to a cache-line, to avoid unwanted sharing with other data. */
|
||||
int pad[32 - sizeof(int)];
|
||||
} __attribute__((aligned(32))) AtomicSpinLock;
|
||||
|
||||
ATOMIC_INLINE void atomic_spin_lock(volatile AtomicSpinLock *lock)
|
||||
{
|
||||
while (__sync_lock_test_and_set(&lock->lock, 1)) {
|
||||
while (lock->lock) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ATOMIC_INLINE void atomic_spin_unlock(volatile AtomicSpinLock *lock)
|
||||
{
|
||||
__sync_lock_release(&lock->lock);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Common part of locking fallback implementation
|
||||
* \{ */
|
||||
|
||||
/* Global lock, shared by all atomic operations implementations.
|
||||
*
|
||||
* Could be split into per-size locks, although added complexity and being more error-proone does
|
||||
* not seem to worth it for a fall-back implementation. */
|
||||
static _ATOMIC_MAYBE_UNUSED AtomicSpinLock _atomic_global_lock = {0};
|
||||
|
||||
#define ATOMIC_LOCKING_OP_AND_FETCH_DEFINE(_type, _op_name, _op) \
|
||||
ATOMIC_INLINE _type##_t atomic_##_op_name##_and_fetch_##_type(_type##_t *p, _type##_t x) \
|
||||
{ \
|
||||
atomic_spin_lock(&_atomic_global_lock); \
|
||||
const _type##_t original_value = *(p); \
|
||||
const _type##_t new_value = original_value _op(x); \
|
||||
*(p) = new_value; \
|
||||
atomic_spin_unlock(&_atomic_global_lock); \
|
||||
return new_value; \
|
||||
}
|
||||
|
||||
#define ATOMIC_LOCKING_FETCH_AND_OP_DEFINE(_type, _op_name, _op) \
|
||||
ATOMIC_INLINE _type##_t atomic_fetch_and_##_op_name##_##_type(_type##_t *p, _type##_t x) \
|
||||
{ \
|
||||
atomic_spin_lock(&_atomic_global_lock); \
|
||||
const _type##_t original_value = *(p); \
|
||||
*(p) = original_value _op(x); \
|
||||
atomic_spin_unlock(&_atomic_global_lock); \
|
||||
return original_value; \
|
||||
}
|
||||
|
||||
#define ATOMIC_LOCKING_ADD_AND_FETCH_DEFINE(_type) \
|
||||
ATOMIC_LOCKING_OP_AND_FETCH_DEFINE(_type, add, +)
|
||||
|
||||
#define ATOMIC_LOCKING_SUB_AND_FETCH_DEFINE(_type) \
|
||||
ATOMIC_LOCKING_OP_AND_FETCH_DEFINE(_type, sub, -)
|
||||
|
||||
#define ATOMIC_LOCKING_FETCH_AND_ADD_DEFINE(_type) \
|
||||
ATOMIC_LOCKING_FETCH_AND_OP_DEFINE(_type, add, +)
|
||||
|
||||
#define ATOMIC_LOCKING_FETCH_AND_SUB_DEFINE(_type) \
|
||||
ATOMIC_LOCKING_FETCH_AND_OP_DEFINE(_type, sub, -)
|
||||
|
||||
#define ATOMIC_LOCKING_FETCH_AND_OR_DEFINE(_type) ATOMIC_LOCKING_FETCH_AND_OP_DEFINE(_type, or, |)
|
||||
|
||||
#define ATOMIC_LOCKING_FETCH_AND_AND_DEFINE(_type) \
|
||||
ATOMIC_LOCKING_FETCH_AND_OP_DEFINE(_type, and, &)
|
||||
|
||||
#define ATOMIC_LOCKING_CAS_DEFINE(_type) \
|
||||
ATOMIC_INLINE _type##_t atomic_cas_##_type(_type##_t *v, _type##_t old, _type##_t _new) \
|
||||
{ \
|
||||
atomic_spin_lock(&_atomic_global_lock); \
|
||||
const _type##_t original_value = *v; \
|
||||
if (*v == old) { \
|
||||
*v = _new; \
|
||||
} \
|
||||
atomic_spin_unlock(&_atomic_global_lock); \
|
||||
return original_value; \
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name 64-bit operations
|
||||
* \{ */
|
||||
|
||||
#if !defined(ATOMIC_FORCE_USE_FALLBACK) && \
|
||||
(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_8))
|
||||
/******************************************************************************/
|
||||
/* 64-bit operations. */
|
||||
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_8))
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint64_t atomic_add_and_fetch_uint64(uint64_t *p, uint64_t x)
|
||||
{
|
||||
@@ -214,7 +115,7 @@ ATOMIC_INLINE int64_t atomic_cas_int64(int64_t *v, int64_t old, int64_t _new)
|
||||
return __sync_val_compare_and_swap(v, old, _new);
|
||||
}
|
||||
|
||||
#elif !defined(ATOMIC_FORCE_USE_FALLBACK) && (defined(__amd64__) || defined(__x86_64__))
|
||||
#elif (defined(__amd64__) || defined(__x86_64__))
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint64_t atomic_fetch_and_add_uint64(uint64_t *p, uint64_t x)
|
||||
{
|
||||
@@ -289,36 +190,12 @@ ATOMIC_INLINE int64_t atomic_cas_int64(int64_t *v, int64_t old, int64_t _new)
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
|
||||
/* Unsigned */
|
||||
|
||||
ATOMIC_LOCKING_ADD_AND_FETCH_DEFINE(uint64)
|
||||
ATOMIC_LOCKING_SUB_AND_FETCH_DEFINE(uint64)
|
||||
|
||||
ATOMIC_LOCKING_FETCH_AND_ADD_DEFINE(uint64)
|
||||
ATOMIC_LOCKING_FETCH_AND_SUB_DEFINE(uint64)
|
||||
|
||||
ATOMIC_LOCKING_CAS_DEFINE(uint64)
|
||||
|
||||
/* Signed */
|
||||
ATOMIC_LOCKING_ADD_AND_FETCH_DEFINE(int64)
|
||||
ATOMIC_LOCKING_SUB_AND_FETCH_DEFINE(int64)
|
||||
|
||||
ATOMIC_LOCKING_FETCH_AND_ADD_DEFINE(int64)
|
||||
ATOMIC_LOCKING_FETCH_AND_SUB_DEFINE(int64)
|
||||
|
||||
ATOMIC_LOCKING_CAS_DEFINE(int64)
|
||||
|
||||
# error "Missing implementation for 64-bit atomic operations"
|
||||
#endif
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name 32-bit operations
|
||||
* \{ */
|
||||
|
||||
#if !defined(ATOMIC_FORCE_USE_FALLBACK) && \
|
||||
(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4))
|
||||
/******************************************************************************/
|
||||
/* 32-bit operations. */
|
||||
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4))
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint32_t atomic_add_and_fetch_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
@@ -351,8 +228,7 @@ ATOMIC_INLINE int32_t atomic_cas_int32(int32_t *v, int32_t old, int32_t _new)
|
||||
return __sync_val_compare_and_swap(v, old, _new);
|
||||
}
|
||||
|
||||
#elif !defined(ATOMIC_FORCE_USE_FALLBACK) && \
|
||||
(defined(__i386__) || defined(__amd64__) || defined(__x86_64__))
|
||||
#elif (defined(__i386__) || defined(__amd64__) || defined(__x86_64__))
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint32_t atomic_add_and_fetch_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
@@ -410,25 +286,10 @@ ATOMIC_INLINE int32_t atomic_cas_int32(int32_t *v, int32_t old, int32_t _new)
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* Unsigned */
|
||||
|
||||
ATOMIC_LOCKING_ADD_AND_FETCH_DEFINE(uint32)
|
||||
ATOMIC_LOCKING_SUB_AND_FETCH_DEFINE(uint32)
|
||||
|
||||
ATOMIC_LOCKING_CAS_DEFINE(uint32)
|
||||
|
||||
/* Signed */
|
||||
|
||||
ATOMIC_LOCKING_ADD_AND_FETCH_DEFINE(int32)
|
||||
ATOMIC_LOCKING_SUB_AND_FETCH_DEFINE(int32)
|
||||
|
||||
ATOMIC_LOCKING_CAS_DEFINE(int32)
|
||||
|
||||
# error "Missing implementation for 32-bit atomic operations"
|
||||
#endif
|
||||
|
||||
#if !defined(ATOMIC_FORCE_USE_FALLBACK) && \
|
||||
(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4))
|
||||
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4))
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint32_t atomic_fetch_and_add_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
||||
@@ -462,27 +323,12 @@ ATOMIC_INLINE int32_t atomic_fetch_and_and_int32(int32_t *p, int32_t x)
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* Unsigned */
|
||||
ATOMIC_LOCKING_FETCH_AND_ADD_DEFINE(uint32)
|
||||
ATOMIC_LOCKING_FETCH_AND_OR_DEFINE(uint32)
|
||||
ATOMIC_LOCKING_FETCH_AND_AND_DEFINE(uint32)
|
||||
|
||||
/* Signed */
|
||||
ATOMIC_LOCKING_FETCH_AND_ADD_DEFINE(int32)
|
||||
ATOMIC_LOCKING_FETCH_AND_OR_DEFINE(int32)
|
||||
ATOMIC_LOCKING_FETCH_AND_AND_DEFINE(int32)
|
||||
|
||||
# error "Missing implementation for 32-bit atomic operations"
|
||||
#endif
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name 16-bit operations
|
||||
* \{ */
|
||||
|
||||
#if !defined(ATOMIC_FORCE_USE_FALLBACK) && \
|
||||
(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_2))
|
||||
/******************************************************************************/
|
||||
/* 16-bit operations. */
|
||||
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_2))
|
||||
|
||||
/* Signed */
|
||||
ATOMIC_INLINE int16_t atomic_fetch_and_and_int16(int16_t *p, int16_t b)
|
||||
@@ -495,21 +341,12 @@ ATOMIC_INLINE int16_t atomic_fetch_and_or_int16(int16_t *p, int16_t b)
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
ATOMIC_LOCKING_FETCH_AND_AND_DEFINE(int16)
|
||||
ATOMIC_LOCKING_FETCH_AND_OR_DEFINE(int16)
|
||||
|
||||
# error "Missing implementation for 16-bit atomic operations"
|
||||
#endif
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name 8-bit operations
|
||||
* \{ */
|
||||
|
||||
#if !defined(ATOMIC_FORCE_USE_FALLBACK) && \
|
||||
(defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_1))
|
||||
|
||||
/******************************************************************************/
|
||||
/* 8-bit operations. */
|
||||
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) || defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_1))
|
||||
/* Unsigned */
|
||||
ATOMIC_INLINE uint8_t atomic_fetch_and_and_uint8(uint8_t *p, uint8_t b)
|
||||
{
|
||||
@@ -531,27 +368,7 @@ ATOMIC_INLINE int8_t atomic_fetch_and_or_int8(int8_t *p, int8_t b)
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* Unsigned */
|
||||
ATOMIC_LOCKING_FETCH_AND_AND_DEFINE(uint8)
|
||||
ATOMIC_LOCKING_FETCH_AND_OR_DEFINE(uint8)
|
||||
|
||||
/* Signed */
|
||||
ATOMIC_LOCKING_FETCH_AND_AND_DEFINE(int8)
|
||||
ATOMIC_LOCKING_FETCH_AND_OR_DEFINE(int8)
|
||||
|
||||
# error "Missing implementation for 8-bit atomic operations"
|
||||
#endif
|
||||
|
||||
/** \} */
|
||||
|
||||
#undef ATOMIC_LOCKING_OP_AND_FETCH_DEFINE
|
||||
#undef ATOMIC_LOCKING_FETCH_AND_OP_DEFINE
|
||||
#undef ATOMIC_LOCKING_ADD_AND_FETCH_DEFINE
|
||||
#undef ATOMIC_LOCKING_SUB_AND_FETCH_DEFINE
|
||||
#undef ATOMIC_LOCKING_FETCH_AND_ADD_DEFINE
|
||||
#undef ATOMIC_LOCKING_FETCH_AND_SUB_DEFINE
|
||||
#undef ATOMIC_LOCKING_FETCH_AND_OR_DEFINE
|
||||
#undef ATOMIC_LOCKING_FETCH_AND_AND_DEFINE
|
||||
#undef ATOMIC_LOCKING_CAS_DEFINE
|
||||
|
||||
#endif /* __ATOMIC_OPS_UNIX_H__ */
|
||||
|
@@ -64,11 +64,9 @@
|
||||
#ifdef __GNUC__
|
||||
# define _ATOMIC_LIKELY(x) __builtin_expect(!!(x), 1)
|
||||
# define _ATOMIC_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||
# define _ATOMIC_MAYBE_UNUSED __attribute__((unused))
|
||||
#else
|
||||
# define _ATOMIC_LIKELY(x) (x)
|
||||
# define _ATOMIC_UNLIKELY(x) (x)
|
||||
# define _ATOMIC_MAYBE_UNUSED
|
||||
#endif
|
||||
|
||||
#if defined(__SIZEOF_POINTER__)
|
||||
|
@@ -526,13 +526,8 @@ bool BlenderSync::object_has_particle_hair(BL::Object b_ob)
|
||||
|
||||
/* Old particle hair. */
|
||||
void BlenderSync::sync_particle_hair(
|
||||
Hair *hair, BL::Mesh &b_mesh, BObjectInfo &b_ob_info, bool motion, int motion_step)
|
||||
Hair *hair, BL::Mesh &b_mesh, BL::Object &b_ob, bool motion, int motion_step)
|
||||
{
|
||||
if (!b_ob_info.is_real_object_data()) {
|
||||
return;
|
||||
}
|
||||
BL::Object b_ob = b_ob_info.real_object;
|
||||
|
||||
/* obtain general settings */
|
||||
if (b_ob.mode() == b_ob.mode_PARTICLE_EDIT || b_ob.mode() == b_ob.mode_EDIT) {
|
||||
return;
|
||||
@@ -793,10 +788,10 @@ static void export_hair_curves_motion(Hair *hair, BL::Hair b_hair, int motion_st
|
||||
}
|
||||
|
||||
/* Hair object. */
|
||||
void BlenderSync::sync_hair(Hair *hair, BObjectInfo &b_ob_info, bool motion, int motion_step)
|
||||
void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motion_step)
|
||||
{
|
||||
/* Convert Blender hair to Cycles curves. */
|
||||
BL::Hair b_hair(b_ob_info.object_data);
|
||||
BL::Hair b_hair(b_ob.data());
|
||||
if (motion) {
|
||||
export_hair_curves_motion(hair, b_hair, motion_step);
|
||||
}
|
||||
@@ -805,16 +800,16 @@ void BlenderSync::sync_hair(Hair *hair, BObjectInfo &b_ob_info, bool motion, int
|
||||
}
|
||||
}
|
||||
#else
|
||||
void BlenderSync::sync_hair(Hair *hair, BObjectInfo &b_ob_info, bool motion, int motion_step)
|
||||
void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motion_step)
|
||||
{
|
||||
(void)hair;
|
||||
(void)b_ob_info;
|
||||
(void)b_ob;
|
||||
(void)motion;
|
||||
(void)motion_step;
|
||||
}
|
||||
#endif
|
||||
|
||||
void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, Hair *hair)
|
||||
void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *hair)
|
||||
{
|
||||
/* make a copy of the shaders as the caller in the main thread still need them for syncing the
|
||||
* attributes */
|
||||
@@ -824,19 +819,19 @@ void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, H
|
||||
new_hair.set_used_shaders(used_shaders);
|
||||
|
||||
if (view_layer.use_hair) {
|
||||
if (b_ob_info.object_data.is_a(&RNA_Hair)) {
|
||||
if (b_ob.type() == BL::Object::type_HAIR) {
|
||||
/* Hair object. */
|
||||
sync_hair(&new_hair, b_ob_info, false);
|
||||
sync_hair(&new_hair, b_ob, false);
|
||||
}
|
||||
else {
|
||||
/* Particle hair. */
|
||||
bool need_undeformed = new_hair.need_attribute(scene, ATTR_STD_GENERATED);
|
||||
BL::Mesh b_mesh = object_to_mesh(
|
||||
b_data, b_ob_info, b_depsgraph, need_undeformed, Mesh::SUBDIVISION_NONE);
|
||||
b_data, b_ob, b_depsgraph, need_undeformed, Mesh::SUBDIVISION_NONE);
|
||||
|
||||
if (b_mesh) {
|
||||
sync_particle_hair(&new_hair, b_mesh, b_ob_info, false);
|
||||
free_object_to_mesh(b_data, b_ob_info, b_mesh);
|
||||
sync_particle_hair(&new_hair, b_mesh, b_ob, false);
|
||||
free_object_to_mesh(b_data, b_ob, b_mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -864,7 +859,7 @@ void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, H
|
||||
}
|
||||
|
||||
void BlenderSync::sync_hair_motion(BL::Depsgraph b_depsgraph,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object b_ob,
|
||||
Hair *hair,
|
||||
int motion_step)
|
||||
{
|
||||
@@ -874,19 +869,18 @@ void BlenderSync::sync_hair_motion(BL::Depsgraph b_depsgraph,
|
||||
}
|
||||
|
||||
/* Export deformed coordinates. */
|
||||
if (ccl::BKE_object_is_deform_modified(b_ob_info, b_scene, preview)) {
|
||||
if (b_ob_info.object_data.is_a(&RNA_Hair)) {
|
||||
if (ccl::BKE_object_is_deform_modified(b_ob, b_scene, preview)) {
|
||||
if (b_ob.type() == BL::Object::type_HAIR) {
|
||||
/* Hair object. */
|
||||
sync_hair(hair, b_ob_info, true, motion_step);
|
||||
sync_hair(hair, b_ob, true, motion_step);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
/* Particle hair. */
|
||||
BL::Mesh b_mesh = object_to_mesh(
|
||||
b_data, b_ob_info, b_depsgraph, false, Mesh::SUBDIVISION_NONE);
|
||||
BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_depsgraph, false, Mesh::SUBDIVISION_NONE);
|
||||
if (b_mesh) {
|
||||
sync_particle_hair(hair, b_mesh, b_ob_info, true, motion_step);
|
||||
free_object_to_mesh(b_data, b_ob_info, b_mesh);
|
||||
sync_particle_hair(hair, b_mesh, b_ob, true, motion_step);
|
||||
free_object_to_mesh(b_data, b_ob, b_mesh);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -29,15 +29,13 @@
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
static Geometry::Type determine_geom_type(BObjectInfo &b_ob_info, bool use_particle_hair)
|
||||
static Geometry::Type determine_geom_type(BL::Object &b_ob, bool use_particle_hair)
|
||||
{
|
||||
if (b_ob_info.object_data.is_a(&RNA_Hair) || use_particle_hair) {
|
||||
if (b_ob.type() == BL::Object::type_HAIR || use_particle_hair) {
|
||||
return Geometry::HAIR;
|
||||
}
|
||||
|
||||
if (b_ob_info.object_data.is_a(&RNA_Volume) ||
|
||||
(b_ob_info.object_data == b_ob_info.real_object.data() &&
|
||||
object_fluid_gas_domain_find(b_ob_info.real_object))) {
|
||||
if (b_ob.type() == BL::Object::type_VOLUME || object_fluid_gas_domain_find(b_ob)) {
|
||||
return Geometry::VOLUME;
|
||||
}
|
||||
|
||||
@@ -73,17 +71,20 @@ array<Node *> BlenderSync::find_used_shaders(BL::Object &b_ob)
|
||||
}
|
||||
|
||||
Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
BL::Object &b_ob_instance,
|
||||
bool object_updated,
|
||||
bool use_particle_hair,
|
||||
TaskPool *task_pool)
|
||||
{
|
||||
/* Test if we can instance or if the object is modified. */
|
||||
Geometry::Type geom_type = determine_geom_type(b_ob_info, use_particle_hair);
|
||||
GeometryKey key(b_ob_info.object_data, geom_type);
|
||||
BL::ID b_ob_data = b_ob.data();
|
||||
BL::ID b_key_id = (BKE_object_is_modified(b_ob)) ? b_ob_instance : b_ob_data;
|
||||
Geometry::Type geom_type = determine_geom_type(b_ob, use_particle_hair);
|
||||
GeometryKey key(b_key_id.ptr.data, geom_type);
|
||||
|
||||
/* Find shader indices. */
|
||||
array<Node *> used_shaders = find_used_shaders(b_ob_info.iter_object);
|
||||
array<Node *> used_shaders = find_used_shaders(b_ob);
|
||||
|
||||
/* Ensure we only sync instanced geometry once. */
|
||||
Geometry *geom = geometry_map.find(key);
|
||||
@@ -110,7 +111,7 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
}
|
||||
else {
|
||||
/* Test if we need to update existing geometry. */
|
||||
sync = geometry_map.update(geom, b_ob_info.object_data);
|
||||
sync = geometry_map.update(geom, b_key_id);
|
||||
}
|
||||
|
||||
if (!sync) {
|
||||
@@ -143,7 +144,7 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
|
||||
geometry_synced.insert(geom);
|
||||
|
||||
geom->name = ustring(b_ob_info.object_data.name().c_str());
|
||||
geom->name = ustring(b_ob_data.name().c_str());
|
||||
|
||||
/* Store the shaders immediately for the object attribute code. */
|
||||
geom->set_used_shaders(used_shaders);
|
||||
@@ -152,19 +153,19 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
if (progress.get_cancel())
|
||||
return;
|
||||
|
||||
progress.set_sync_status("Synchronizing object", b_ob_info.real_object.name());
|
||||
progress.set_sync_status("Synchronizing object", b_ob.name());
|
||||
|
||||
if (geom_type == Geometry::HAIR) {
|
||||
Hair *hair = static_cast<Hair *>(geom);
|
||||
sync_hair(b_depsgraph, b_ob_info, hair);
|
||||
sync_hair(b_depsgraph, b_ob, hair);
|
||||
}
|
||||
else if (geom_type == Geometry::VOLUME) {
|
||||
Volume *volume = static_cast<Volume *>(geom);
|
||||
sync_volume(b_ob_info, volume);
|
||||
sync_volume(b_ob, volume);
|
||||
}
|
||||
else {
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
sync_mesh(b_depsgraph, b_ob_info, mesh);
|
||||
sync_mesh(b_depsgraph, b_ob, mesh);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -180,7 +181,7 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
}
|
||||
|
||||
void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
Object *object,
|
||||
float motion_time,
|
||||
bool use_particle_hair,
|
||||
@@ -189,10 +190,8 @@ void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph,
|
||||
/* Ensure we only sync instanced geometry once. */
|
||||
Geometry *geom = object->get_geometry();
|
||||
|
||||
if (geometry_motion_synced.find(geom) != geometry_motion_synced.end() ||
|
||||
geometry_motion_attribute_synced.find(geom) != geometry_motion_attribute_synced.end()) {
|
||||
if (geometry_motion_synced.find(geom) != geometry_motion_synced.end())
|
||||
return;
|
||||
}
|
||||
|
||||
geometry_motion_synced.insert(geom);
|
||||
|
||||
@@ -211,17 +210,16 @@ void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph,
|
||||
if (progress.get_cancel())
|
||||
return;
|
||||
|
||||
if (b_ob_info.object_data.is_a(&RNA_Hair) || use_particle_hair) {
|
||||
if (b_ob.type() == BL::Object::type_HAIR || use_particle_hair) {
|
||||
Hair *hair = static_cast<Hair *>(geom);
|
||||
sync_hair_motion(b_depsgraph, b_ob_info, hair, motion_step);
|
||||
sync_hair_motion(b_depsgraph, b_ob, hair, motion_step);
|
||||
}
|
||||
else if (b_ob_info.object_data.is_a(&RNA_Volume) ||
|
||||
object_fluid_gas_domain_find(b_ob_info.real_object)) {
|
||||
else if (b_ob.type() == BL::Object::type_VOLUME || object_fluid_gas_domain_find(b_ob)) {
|
||||
/* No volume motion blur support yet. */
|
||||
}
|
||||
else {
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
sync_mesh_motion(b_depsgraph, b_ob_info, mesh, motion_step);
|
||||
sync_mesh_motion(b_depsgraph, b_ob, mesh, motion_step);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -27,14 +27,15 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
void BlenderSync::sync_light(BL::Object &b_parent,
|
||||
int persistent_id[OBJECT_PERSISTENT_ID_SIZE],
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
BL::Object &b_ob_instance,
|
||||
int random_id,
|
||||
Transform &tfm,
|
||||
bool *use_portal)
|
||||
{
|
||||
/* test if we need to sync */
|
||||
ObjectKey key(b_parent, persistent_id, b_ob_info.real_object, false);
|
||||
BL::Light b_light(b_ob_info.object_data);
|
||||
ObjectKey key(b_parent, persistent_id, b_ob_instance, false);
|
||||
BL::Light b_light(b_ob.data());
|
||||
|
||||
Light *light = light_map.find(key);
|
||||
|
||||
@@ -43,7 +44,7 @@ void BlenderSync::sync_light(BL::Object &b_parent,
|
||||
const bool tfm_updated = (light && light->get_tfm() != tfm);
|
||||
|
||||
/* Update if either object or light data changed. */
|
||||
if (!light_map.add_or_update(&light, b_ob_info.real_object, b_parent, key) && !tfm_updated) {
|
||||
if (!light_map.add_or_update(&light, b_ob, b_parent, key) && !tfm_updated) {
|
||||
Shader *shader;
|
||||
if (!shader_map.add_or_update(&shader, b_light)) {
|
||||
if (light->get_is_portal())
|
||||
@@ -138,11 +139,11 @@ void BlenderSync::sync_light(BL::Object &b_parent,
|
||||
|
||||
light->set_max_bounces(get_int(clight, "max_bounces"));
|
||||
|
||||
if (b_ob_info.real_object != b_ob_info.iter_object) {
|
||||
if (b_ob != b_ob_instance) {
|
||||
light->set_random_id(random_id);
|
||||
}
|
||||
else {
|
||||
light->set_random_id(hash_uint2(hash_string(b_ob_info.real_object.name().c_str()), 0));
|
||||
light->set_random_id(hash_uint2(hash_string(b_ob.name().c_str()), 0));
|
||||
}
|
||||
|
||||
if (light->get_light_type() == LIGHT_AREA)
|
||||
@@ -154,7 +155,7 @@ void BlenderSync::sync_light(BL::Object &b_parent,
|
||||
*use_portal = true;
|
||||
|
||||
/* visibility */
|
||||
uint visibility = object_ray_visibility(b_ob_info.real_object);
|
||||
uint visibility = object_ray_visibility(b_ob);
|
||||
light->set_use_diffuse((visibility & PATH_RAY_DIFFUSE) != 0);
|
||||
light->set_use_glossy((visibility & PATH_RAY_GLOSSY) != 0);
|
||||
light->set_use_transmission((visibility & PATH_RAY_TRANSMIT) != 0);
|
||||
|
@@ -347,57 +347,16 @@ static void fill_generic_attribute(BL::Mesh &b_mesh,
|
||||
}
|
||||
}
|
||||
|
||||
static void attr_create_motion(Mesh *mesh, BL::Attribute &b_attribute, const float motion_scale)
|
||||
{
|
||||
if (!(b_attribute.domain() == BL::Attribute::domain_POINT) &&
|
||||
(b_attribute.data_type() == BL::Attribute::data_type_FLOAT_VECTOR)) {
|
||||
return;
|
||||
}
|
||||
|
||||
BL::FloatVectorAttribute b_vector_attribute(b_attribute);
|
||||
const int numverts = mesh->get_verts().size();
|
||||
|
||||
/* Find or add attribute */
|
||||
float3 *P = &mesh->get_verts()[0];
|
||||
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
|
||||
if (!attr_mP) {
|
||||
attr_mP = mesh->attributes.add(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
}
|
||||
|
||||
/* Only export previous and next frame, we don't have any in between data. */
|
||||
float motion_times[2] = {-1.0f, 1.0f};
|
||||
for (int step = 0; step < 2; step++) {
|
||||
const float relative_time = motion_times[step] * 0.5f * motion_scale;
|
||||
float3 *mP = attr_mP->data_float3() + step * numverts;
|
||||
|
||||
for (int i = 0; i < numverts; i++) {
|
||||
mP[i] = P[i] + get_float3(b_vector_attribute.data[i].vector()) * relative_time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void attr_create_generic(Scene *scene,
|
||||
Mesh *mesh,
|
||||
BL::Mesh &b_mesh,
|
||||
const bool subdivision,
|
||||
const bool need_motion,
|
||||
const float motion_scale)
|
||||
static void attr_create_generic(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool subdivision)
|
||||
{
|
||||
if (subdivision) {
|
||||
/* TODO: Handle subdivision correctly. */
|
||||
return;
|
||||
}
|
||||
AttributeSet &attributes = mesh->attributes;
|
||||
static const ustring u_velocity("velocity");
|
||||
|
||||
for (BL::Attribute &b_attribute : b_mesh.attributes) {
|
||||
const ustring name{b_attribute.name().c_str()};
|
||||
|
||||
if (need_motion && name == u_velocity) {
|
||||
attr_create_motion(mesh, b_attribute, motion_scale);
|
||||
}
|
||||
|
||||
if (!mesh->need_attribute(scene, name)) {
|
||||
continue;
|
||||
}
|
||||
@@ -900,10 +859,8 @@ static void create_mesh(Scene *scene,
|
||||
Mesh *mesh,
|
||||
BL::Mesh &b_mesh,
|
||||
const array<Node *> &used_shaders,
|
||||
const bool need_motion,
|
||||
const float motion_scale,
|
||||
const bool subdivision = false,
|
||||
const bool subdivide_uvs = true)
|
||||
bool subdivision = false,
|
||||
bool subdivide_uvs = true)
|
||||
{
|
||||
/* count vertices and faces */
|
||||
int numverts = b_mesh.vertices.length();
|
||||
@@ -1017,7 +974,7 @@ static void create_mesh(Scene *scene,
|
||||
attr_create_vertex_color(scene, mesh, b_mesh, subdivision);
|
||||
attr_create_sculpt_vertex_color(scene, mesh, b_mesh, subdivision);
|
||||
attr_create_random_per_island(scene, mesh, b_mesh, subdivision);
|
||||
attr_create_generic(scene, mesh, b_mesh, subdivision, need_motion, motion_scale);
|
||||
attr_create_generic(scene, mesh, b_mesh, subdivision);
|
||||
|
||||
if (subdivision) {
|
||||
attr_create_subd_uv_map(scene, mesh, b_mesh, subdivide_uvs);
|
||||
@@ -1042,20 +999,16 @@ static void create_mesh(Scene *scene,
|
||||
|
||||
static void create_subd_mesh(Scene *scene,
|
||||
Mesh *mesh,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
BL::Mesh &b_mesh,
|
||||
const array<Node *> &used_shaders,
|
||||
const bool need_motion,
|
||||
const float motion_scale,
|
||||
float dicing_rate,
|
||||
int max_subdivisions)
|
||||
{
|
||||
BL::Object b_ob = b_ob_info.real_object;
|
||||
|
||||
BL::SubsurfModifier subsurf_mod(b_ob.modifiers[b_ob.modifiers.length() - 1]);
|
||||
bool subdivide_uvs = subsurf_mod.uv_smooth() != BL::SubsurfModifier::uv_smooth_NONE;
|
||||
|
||||
create_mesh(scene, mesh, b_mesh, used_shaders, need_motion, motion_scale, true, subdivide_uvs);
|
||||
create_mesh(scene, mesh, b_mesh, used_shaders, true, subdivide_uvs);
|
||||
|
||||
/* export creases */
|
||||
size_t num_creases = 0;
|
||||
@@ -1090,7 +1043,7 @@ static void create_subd_mesh(Scene *scene,
|
||||
*
|
||||
* NOTE: This code is run prior to object motion blur initialization. so can not access properties
|
||||
* set by `sync_object_motion_init()`. */
|
||||
static bool mesh_need_motion_attribute(BObjectInfo &b_ob_info, Scene *scene)
|
||||
static bool mesh_need_motion_attribute(BL::Object &b_ob, Scene *scene)
|
||||
{
|
||||
const Scene::MotionType need_motion = scene->need_motion();
|
||||
if (need_motion == Scene::MOTION_NONE) {
|
||||
@@ -1107,7 +1060,7 @@ static bool mesh_need_motion_attribute(BObjectInfo &b_ob_info, Scene *scene)
|
||||
* - Motion attribute expects non-zero time steps.
|
||||
*
|
||||
* Avoid adding motion attributes if the motion blur will enforce 0 motion steps. */
|
||||
PointerRNA cobject = RNA_pointer_get(&b_ob_info.real_object.ptr, "cycles");
|
||||
PointerRNA cobject = RNA_pointer_get(&b_ob.ptr, "cycles");
|
||||
const bool use_motion = get_boolean(cobject, "use_motion_blur");
|
||||
if (!use_motion) {
|
||||
return false;
|
||||
@@ -1119,7 +1072,92 @@ static bool mesh_need_motion_attribute(BObjectInfo &b_ob_info, Scene *scene)
|
||||
return true;
|
||||
}
|
||||
|
||||
void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, Mesh *mesh)
|
||||
static void sync_mesh_cached_velocities(BL::Object &b_ob, Scene *scene, Mesh *mesh)
|
||||
{
|
||||
if (!mesh_need_motion_attribute(b_ob, scene)) {
|
||||
return;
|
||||
}
|
||||
|
||||
BL::MeshSequenceCacheModifier b_mesh_cache = object_mesh_cache_find(b_ob, true, nullptr);
|
||||
|
||||
if (!b_mesh_cache) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!MeshSequenceCacheModifier_read_velocity_get(&b_mesh_cache.ptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const size_t numverts = mesh->get_verts().size();
|
||||
|
||||
if (b_mesh_cache.vertex_velocities.length() != numverts) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Find or add attribute */
|
||||
float3 *P = &mesh->get_verts()[0];
|
||||
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
|
||||
if (!attr_mP) {
|
||||
attr_mP = mesh->attributes.add(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
}
|
||||
|
||||
/* Only export previous and next frame, we don't have any in between data. */
|
||||
float motion_times[2] = {-1.0f, 1.0f};
|
||||
for (int step = 0; step < 2; step++) {
|
||||
const float relative_time = motion_times[step] * scene->motion_shutter_time() * 0.5f;
|
||||
float3 *mP = attr_mP->data_float3() + step * numverts;
|
||||
|
||||
BL::MeshSequenceCacheModifier::vertex_velocities_iterator vvi;
|
||||
int i = 0;
|
||||
|
||||
for (b_mesh_cache.vertex_velocities.begin(vvi); vvi != b_mesh_cache.vertex_velocities.end();
|
||||
++vvi, ++i) {
|
||||
mP[i] = P[i] + get_float3(vvi->velocity()) * relative_time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sync_mesh_fluid_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
|
||||
{
|
||||
if (!mesh_need_motion_attribute(b_ob, scene)) {
|
||||
return;
|
||||
}
|
||||
|
||||
BL::FluidDomainSettings b_fluid_domain = object_fluid_liquid_domain_find(b_ob);
|
||||
|
||||
if (!b_fluid_domain)
|
||||
return;
|
||||
|
||||
/* If the mesh has modifiers following the fluid domain we can't export motion. */
|
||||
if (b_fluid_domain.mesh_vertices.length() != mesh->get_verts().size())
|
||||
return;
|
||||
|
||||
/* Find or add attribute */
|
||||
float3 *P = &mesh->get_verts()[0];
|
||||
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
|
||||
if (!attr_mP) {
|
||||
attr_mP = mesh->attributes.add(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
}
|
||||
|
||||
/* Only export previous and next frame, we don't have any in between data. */
|
||||
float motion_times[2] = {-1.0f, 1.0f};
|
||||
for (int step = 0; step < 2; step++) {
|
||||
float relative_time = motion_times[step] * scene->motion_shutter_time() * 0.5f;
|
||||
float3 *mP = attr_mP->data_float3() + step * mesh->get_verts().size();
|
||||
|
||||
BL::FluidDomainSettings::mesh_vertices_iterator svi;
|
||||
int i = 0;
|
||||
|
||||
for (b_fluid_domain.mesh_vertices.begin(svi); svi != b_fluid_domain.mesh_vertices.end();
|
||||
++svi, ++i) {
|
||||
mP[i] = P[i] + get_float3(svi->velocity()) * relative_time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *mesh)
|
||||
{
|
||||
/* make a copy of the shaders as the caller in the main thread still need them for syncing the
|
||||
* attributes */
|
||||
@@ -1132,47 +1170,37 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, M
|
||||
/* Adaptive subdivision setup. Not for baking since that requires
|
||||
* exact mapping to the Blender mesh. */
|
||||
if (!scene->bake_manager->get_baking()) {
|
||||
new_mesh.set_subdivision_type(
|
||||
object_subdivision_type(b_ob_info.real_object, preview, experimental));
|
||||
new_mesh.set_subdivision_type(object_subdivision_type(b_ob, preview, experimental));
|
||||
}
|
||||
|
||||
/* For some reason, meshes do not need this... */
|
||||
bool need_undeformed = new_mesh.need_attribute(scene, ATTR_STD_GENERATED);
|
||||
BL::Mesh b_mesh = object_to_mesh(
|
||||
b_data, b_ob_info, b_depsgraph, need_undeformed, new_mesh.get_subdivision_type());
|
||||
b_data, b_ob, b_depsgraph, need_undeformed, new_mesh.get_subdivision_type());
|
||||
|
||||
if (b_mesh) {
|
||||
/* Motion blur attribute is relative to seconds, we need it relative to frames. */
|
||||
const bool need_motion = mesh_need_motion_attribute(b_ob_info, scene);
|
||||
const float motion_scale = (need_motion) ?
|
||||
scene->motion_shutter_time() /
|
||||
(b_scene.render().fps() / b_scene.render().fps_base()) :
|
||||
0.0f;
|
||||
|
||||
/* Sync mesh itself. */
|
||||
if (new_mesh.get_subdivision_type() != Mesh::SUBDIVISION_NONE)
|
||||
create_subd_mesh(scene,
|
||||
&new_mesh,
|
||||
b_ob_info,
|
||||
b_ob,
|
||||
b_mesh,
|
||||
new_mesh.get_used_shaders(),
|
||||
need_motion,
|
||||
motion_scale,
|
||||
dicing_rate,
|
||||
max_subdivisions);
|
||||
else
|
||||
create_mesh(scene,
|
||||
&new_mesh,
|
||||
b_mesh,
|
||||
new_mesh.get_used_shaders(),
|
||||
need_motion,
|
||||
motion_scale,
|
||||
false);
|
||||
create_mesh(scene, &new_mesh, b_mesh, new_mesh.get_used_shaders(), false);
|
||||
|
||||
free_object_to_mesh(b_data, b_ob_info, b_mesh);
|
||||
free_object_to_mesh(b_data, b_ob, b_mesh);
|
||||
}
|
||||
}
|
||||
|
||||
/* cached velocities (e.g. from alembic archive) */
|
||||
sync_mesh_cached_velocities(b_ob, scene, &new_mesh);
|
||||
|
||||
/* mesh fluid motion mantaflow */
|
||||
sync_mesh_fluid_motion(b_ob, scene, &new_mesh);
|
||||
|
||||
/* update original sockets */
|
||||
|
||||
mesh->clear_non_sockets();
|
||||
@@ -1202,10 +1230,22 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, M
|
||||
}
|
||||
|
||||
void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object b_ob,
|
||||
Mesh *mesh,
|
||||
int motion_step)
|
||||
{
|
||||
/* Fluid motion blur already exported. */
|
||||
BL::FluidDomainSettings b_fluid_domain = object_fluid_liquid_domain_find(b_ob);
|
||||
if (b_fluid_domain) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Cached motion blur already exported. */
|
||||
BL::MeshSequenceCacheModifier mesh_cache = object_mesh_cache_find(b_ob, true, nullptr);
|
||||
if (mesh_cache) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Skip if no vertices were exported. */
|
||||
size_t numverts = mesh->get_verts().size();
|
||||
if (numverts == 0) {
|
||||
@@ -1215,13 +1255,11 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
||||
/* Skip objects without deforming modifiers. this is not totally reliable,
|
||||
* would need a more extensive check to see which objects are animated. */
|
||||
BL::Mesh b_mesh(PointerRNA_NULL);
|
||||
if (ccl::BKE_object_is_deform_modified(b_ob_info, b_scene, preview)) {
|
||||
if (ccl::BKE_object_is_deform_modified(b_ob, b_scene, preview)) {
|
||||
/* get derived mesh */
|
||||
b_mesh = object_to_mesh(b_data, b_ob_info, b_depsgraph, false, Mesh::SUBDIVISION_NONE);
|
||||
b_mesh = object_to_mesh(b_data, b_ob, b_depsgraph, false, Mesh::SUBDIVISION_NONE);
|
||||
}
|
||||
|
||||
const std::string ob_name = b_ob_info.real_object.name();
|
||||
|
||||
/* TODO(sergey): Perform preliminary check for number of vertices. */
|
||||
if (b_mesh) {
|
||||
/* Export deformed coordinates. */
|
||||
@@ -1257,17 +1295,17 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
||||
memcmp(mP, &mesh->get_verts()[0], sizeof(float3) * numverts) == 0) {
|
||||
/* no motion, remove attributes again */
|
||||
if (b_mesh.vertices.length() != numverts) {
|
||||
VLOG(1) << "Topology differs, disabling motion blur for object " << ob_name;
|
||||
VLOG(1) << "Topology differs, disabling motion blur for object " << b_ob.name();
|
||||
}
|
||||
else {
|
||||
VLOG(1) << "No actual deformation motion for object " << ob_name;
|
||||
VLOG(1) << "No actual deformation motion for object " << b_ob.name();
|
||||
}
|
||||
mesh->attributes.remove(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
if (attr_mN)
|
||||
mesh->attributes.remove(ATTR_STD_MOTION_VERTEX_NORMAL);
|
||||
}
|
||||
else if (motion_step > 0) {
|
||||
VLOG(1) << "Filling deformation motion for object " << ob_name;
|
||||
VLOG(1) << "Filling deformation motion for object " << b_ob.name();
|
||||
/* motion, fill up previous steps that we might have skipped because
|
||||
* they had no motion, but we need them anyway now */
|
||||
float3 *P = &mesh->get_verts()[0];
|
||||
@@ -1281,8 +1319,8 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
||||
}
|
||||
else {
|
||||
if (b_mesh.vertices.length() != numverts) {
|
||||
VLOG(1) << "Topology differs, discarding motion blur for object " << ob_name << " at time "
|
||||
<< motion_step;
|
||||
VLOG(1) << "Topology differs, discarding motion blur for object " << b_ob.name()
|
||||
<< " at time " << motion_step;
|
||||
memcpy(mP, &mesh->get_verts()[0], sizeof(float3) * numverts);
|
||||
if (mN != NULL) {
|
||||
memcpy(mN, attr_N->data_float3(), sizeof(float3) * numverts);
|
||||
@@ -1290,7 +1328,7 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
||||
}
|
||||
}
|
||||
|
||||
free_object_to_mesh(b_data, b_ob_info, b_mesh);
|
||||
free_object_to_mesh(b_data, b_ob, b_mesh);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -154,7 +154,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
const bool is_instance = b_instance.is_instance();
|
||||
BL::Object b_ob = b_instance.object();
|
||||
BL::Object b_parent = is_instance ? b_instance.parent() : b_instance.object();
|
||||
BObjectInfo b_ob_info{b_ob, is_instance ? b_instance.instance_object() : b_ob, b_ob.data()};
|
||||
BL::Object b_ob_instance = is_instance ? b_instance.instance_object() : b_ob;
|
||||
const bool motion = motion_time != 0.0f;
|
||||
/*const*/ Transform tfm = get_transform(b_ob.matrix_world());
|
||||
int *persistent_id = NULL;
|
||||
@@ -178,7 +178,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
{
|
||||
sync_light(b_parent,
|
||||
persistent_id,
|
||||
b_ob_info,
|
||||
b_ob,
|
||||
b_ob_instance,
|
||||
is_instance ? b_instance.random_id() : 0,
|
||||
tfm,
|
||||
use_portal);
|
||||
@@ -230,7 +231,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
TaskPool *object_geom_task_pool = (is_instance) ? NULL : geom_task_pool;
|
||||
|
||||
/* key to lookup object */
|
||||
ObjectKey key(b_parent, persistent_id, b_ob_info.real_object, use_particle_hair);
|
||||
ObjectKey key(b_parent, persistent_id, b_ob_instance, use_particle_hair);
|
||||
Object *object;
|
||||
|
||||
/* motion vector case */
|
||||
@@ -248,8 +249,12 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
|
||||
/* mesh deformation */
|
||||
if (object->get_geometry())
|
||||
sync_geometry_motion(
|
||||
b_depsgraph, b_ob_info, object, motion_time, use_particle_hair, object_geom_task_pool);
|
||||
sync_geometry_motion(b_depsgraph,
|
||||
b_ob_instance,
|
||||
object,
|
||||
motion_time,
|
||||
use_particle_hair,
|
||||
object_geom_task_pool);
|
||||
}
|
||||
|
||||
return object;
|
||||
@@ -260,8 +265,15 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
(tfm != object->get_tfm());
|
||||
|
||||
/* mesh sync */
|
||||
Geometry *geometry = sync_geometry(
|
||||
b_depsgraph, b_ob_info, object_updated, use_particle_hair, object_geom_task_pool);
|
||||
/* b_ob is owned by the iterator and will go out of scope at the end of the block.
|
||||
* b_ob_instance is the original object and will remain valid for deferred geometry
|
||||
* sync. */
|
||||
Geometry *geometry = sync_geometry(b_depsgraph,
|
||||
b_ob_instance,
|
||||
b_ob_instance,
|
||||
object_updated,
|
||||
use_particle_hair,
|
||||
object_geom_task_pool);
|
||||
object->set_geometry(geometry);
|
||||
|
||||
/* special case not tracked by object update flags */
|
||||
@@ -364,7 +376,7 @@ static bool lookup_property(BL::ID b_id, const string &name, float4 *r_value)
|
||||
if (type == PROP_FLOAT)
|
||||
value = RNA_property_float_get(&ptr, prop);
|
||||
else if (type == PROP_INT)
|
||||
value = static_cast<float>(RNA_property_int_get(&ptr, prop));
|
||||
value = RNA_property_int_get(&ptr, prop);
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -492,14 +504,14 @@ void BlenderSync::sync_procedural(BL::Object &b_ob,
|
||||
procedural_map.used(procedural);
|
||||
}
|
||||
|
||||
float current_frame = static_cast<float>(b_scene.frame_current());
|
||||
float current_frame = b_scene.frame_current();
|
||||
if (cache_file.override_frame()) {
|
||||
current_frame = cache_file.frame();
|
||||
}
|
||||
|
||||
if (!cache_file.override_frame()) {
|
||||
procedural->set_start_frame(static_cast<float>(b_scene.frame_start()));
|
||||
procedural->set_end_frame(static_cast<float>(b_scene.frame_end()));
|
||||
procedural->set_start_frame(b_scene.frame_start());
|
||||
procedural->set_end_frame(b_scene.frame_end());
|
||||
}
|
||||
|
||||
procedural->set_frame(current_frame);
|
||||
@@ -535,7 +547,6 @@ void BlenderSync::sync_procedural(BL::Object &b_ob,
|
||||
#else
|
||||
(void)b_ob;
|
||||
(void)b_mesh_cache;
|
||||
(void)has_subdivision_modifier;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -604,7 +615,7 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
|
||||
* only available in preview renders since currently do not have a good cache policy, the
|
||||
* data being loaded at once for all the frames. */
|
||||
if (experimental && b_v3d) {
|
||||
b_mesh_cache = object_mesh_cache_find(b_ob, &has_subdivision_modifier);
|
||||
b_mesh_cache = object_mesh_cache_find(b_ob, false, &has_subdivision_modifier);
|
||||
use_procedural = b_mesh_cache && b_mesh_cache.cache_file().use_render_procedural();
|
||||
}
|
||||
|
||||
@@ -719,14 +730,6 @@ void BlenderSync::sync_motion(BL::RenderSettings &b_render,
|
||||
}
|
||||
}
|
||||
|
||||
/* Check which geometry already has motion blur so it can be skipped. */
|
||||
geometry_motion_attribute_synced.clear();
|
||||
for (Geometry *geom : scene->geometry) {
|
||||
if (geom->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION)) {
|
||||
geometry_motion_attribute_synced.insert(geom);
|
||||
}
|
||||
}
|
||||
|
||||
/* note iteration over motion_times set happens in sorted order */
|
||||
foreach (float relative_time, motion_times) {
|
||||
/* center time is already handled. */
|
||||
@@ -757,8 +760,6 @@ void BlenderSync::sync_motion(BL::RenderSettings &b_render,
|
||||
sync_objects(b_depsgraph, b_v3d, relative_time);
|
||||
}
|
||||
|
||||
geometry_motion_attribute_synced.clear();
|
||||
|
||||
/* we need to set the python thread state again because this
|
||||
* function assumes it is being executed from python and will
|
||||
* try to save the thread state */
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include "RNA_types.h"
|
||||
|
||||
#include "blender/blender_id_map.h"
|
||||
#include "blender/blender_util.h"
|
||||
#include "blender/blender_viewport.h"
|
||||
|
||||
#include "render/scene.h"
|
||||
@@ -159,24 +158,18 @@ class BlenderSync {
|
||||
bool sync_object_attributes(BL::DepsgraphObjectInstance &b_instance, Object *object);
|
||||
|
||||
/* Volume */
|
||||
void sync_volume(BObjectInfo &b_ob_info, Volume *volume);
|
||||
void sync_volume(BL::Object &b_ob, Volume *volume);
|
||||
|
||||
/* Mesh */
|
||||
void sync_mesh(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, Mesh *mesh);
|
||||
void sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
||||
BObjectInfo &b_ob_info,
|
||||
Mesh *mesh,
|
||||
int motion_step);
|
||||
void sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *mesh);
|
||||
void sync_mesh_motion(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *mesh, int motion_step);
|
||||
|
||||
/* Hair */
|
||||
void sync_hair(BL::Depsgraph b_depsgraph, BObjectInfo &b_ob_info, Hair *hair);
|
||||
void sync_hair_motion(BL::Depsgraph b_depsgraph,
|
||||
BObjectInfo &b_ob_info,
|
||||
Hair *hair,
|
||||
int motion_step);
|
||||
void sync_hair(Hair *hair, BObjectInfo &b_ob_info, bool motion, int motion_step = 0);
|
||||
void sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *hair);
|
||||
void sync_hair_motion(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *hair, int motion_step);
|
||||
void sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motion_step = 0);
|
||||
void sync_particle_hair(
|
||||
Hair *hair, BL::Mesh &b_mesh, BObjectInfo &b_ob_info, bool motion, int motion_step = 0);
|
||||
Hair *hair, BL::Mesh &b_mesh, BL::Object &b_ob, bool motion, int motion_step = 0);
|
||||
bool object_has_particle_hair(BL::Object b_ob);
|
||||
|
||||
/* Camera */
|
||||
@@ -185,13 +178,14 @@ class BlenderSync {
|
||||
|
||||
/* Geometry */
|
||||
Geometry *sync_geometry(BL::Depsgraph &b_depsgrpah,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
BL::Object &b_ob_instance,
|
||||
bool object_updated,
|
||||
bool use_particle_hair,
|
||||
TaskPool *task_pool);
|
||||
|
||||
void sync_geometry_motion(BL::Depsgraph &b_depsgraph,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
Object *object,
|
||||
float motion_time,
|
||||
bool use_particle_hair,
|
||||
@@ -200,7 +194,8 @@ class BlenderSync {
|
||||
/* Light */
|
||||
void sync_light(BL::Object &b_parent,
|
||||
int persistent_id[OBJECT_PERSISTENT_ID_SIZE],
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
BL::Object &b_ob_instance,
|
||||
int random_id,
|
||||
Transform &tfm,
|
||||
bool *use_portal);
|
||||
@@ -236,7 +231,6 @@ class BlenderSync {
|
||||
id_map<ParticleSystemKey, ParticleSystem> particle_system_map;
|
||||
set<Geometry *> geometry_synced;
|
||||
set<Geometry *> geometry_motion_synced;
|
||||
set<Geometry *> geometry_motion_attribute_synced;
|
||||
set<float> motion_times;
|
||||
void *world_map;
|
||||
bool world_recalc;
|
||||
|
@@ -40,28 +40,6 @@ float *BKE_image_get_float_pixels_for_frame(void *image, int frame, int tile);
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
struct BObjectInfo {
|
||||
/* Object directly provided by the depsgraph iterator. This object is only valid during one
|
||||
* iteration and must not be accessed afterwards. Transforms and visibility should be checked on
|
||||
* this object. */
|
||||
BL::Object iter_object;
|
||||
|
||||
/* This object remains alive even after the object iterator is done. It corresponds to one
|
||||
* original object. It is the object that owns the object data below. */
|
||||
BL::Object real_object;
|
||||
|
||||
/* The object-data referenced by the iter object. This is still valid after the depsgraph
|
||||
* iterator is done. It might have a different type compared to real_object.data(). */
|
||||
BL::ID object_data;
|
||||
|
||||
/* True when the current geometry is the data of the referenced object. False when it is a
|
||||
* geometry instance that does not have a 1-to-1 relationship with an object. */
|
||||
bool is_real_object_data() const
|
||||
{
|
||||
return const_cast<BL::Object &>(real_object).data() == object_data;
|
||||
}
|
||||
};
|
||||
|
||||
typedef BL::ShaderNodeAttribute::attribute_type_enum BlenderAttributeType;
|
||||
BlenderAttributeType blender_attribute_name_split_type(ustring name, string *r_real_name);
|
||||
|
||||
@@ -69,7 +47,7 @@ void python_thread_state_save(void **python_thread_state);
|
||||
void python_thread_state_restore(void **python_thread_state);
|
||||
|
||||
static inline BL::Mesh object_to_mesh(BL::BlendData & /*data*/,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &object,
|
||||
BL::Depsgraph & /*depsgraph*/,
|
||||
bool /*calc_undeformed*/,
|
||||
Mesh::SubdivisionType subdivision_type)
|
||||
@@ -91,9 +69,9 @@ static inline BL::Mesh object_to_mesh(BL::BlendData & /*data*/,
|
||||
#endif
|
||||
|
||||
BL::Mesh mesh(PointerRNA_NULL);
|
||||
if (b_ob_info.object_data.is_a(&RNA_Mesh)) {
|
||||
if (object.type() == BL::Object::type_MESH) {
|
||||
/* TODO: calc_undeformed is not used. */
|
||||
mesh = BL::Mesh(b_ob_info.object_data);
|
||||
mesh = BL::Mesh(object.data());
|
||||
|
||||
/* Make a copy to split faces if we use autosmooth, otherwise not needed.
|
||||
* Also in edit mode do we need to make a copy, to ensure data layers like
|
||||
@@ -101,15 +79,12 @@ static inline BL::Mesh object_to_mesh(BL::BlendData & /*data*/,
|
||||
if (mesh.is_editmode() ||
|
||||
(mesh.use_auto_smooth() && subdivision_type == Mesh::SUBDIVISION_NONE)) {
|
||||
BL::Depsgraph depsgraph(PointerRNA_NULL);
|
||||
assert(b_ob_info.is_real_object_data());
|
||||
mesh = b_ob_info.real_object.to_mesh(false, depsgraph);
|
||||
mesh = object.to_mesh(false, depsgraph);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BL::Depsgraph depsgraph(PointerRNA_NULL);
|
||||
if (b_ob_info.is_real_object_data()) {
|
||||
mesh = b_ob_info.real_object.to_mesh(false, depsgraph);
|
||||
}
|
||||
mesh = object.to_mesh(false, depsgraph);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -133,14 +108,10 @@ static inline BL::Mesh object_to_mesh(BL::BlendData & /*data*/,
|
||||
}
|
||||
|
||||
static inline void free_object_to_mesh(BL::BlendData & /*data*/,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &object,
|
||||
BL::Mesh &mesh)
|
||||
{
|
||||
if (!b_ob_info.is_real_object_data()) {
|
||||
return;
|
||||
}
|
||||
/* Free mesh if we didn't just use the existing one. */
|
||||
BL::Object object = b_ob_info.real_object;
|
||||
if (object.data().ptr.data != mesh.ptr.data) {
|
||||
object.to_mesh_clear();
|
||||
}
|
||||
@@ -248,13 +219,9 @@ static inline bool BKE_object_is_modified(BL::Object &self, BL::Scene &scene, bo
|
||||
return self.is_modified(scene, (preview) ? (1 << 0) : (1 << 1)) ? true : false;
|
||||
}
|
||||
|
||||
static inline bool BKE_object_is_deform_modified(BObjectInfo &self, BL::Scene &scene, bool preview)
|
||||
static inline bool BKE_object_is_deform_modified(BL::Object &self, BL::Scene &scene, bool preview)
|
||||
{
|
||||
if (!self.is_real_object_data()) {
|
||||
return false;
|
||||
}
|
||||
return self.real_object.is_deform_modified(scene, (preview) ? (1 << 0) : (1 << 1)) ? true :
|
||||
false;
|
||||
return self.is_deform_modified(scene, (preview) ? (1 << 0) : (1 << 1)) ? true : false;
|
||||
}
|
||||
|
||||
static inline int render_resolution_x(BL::RenderSettings &b_render)
|
||||
@@ -457,7 +424,7 @@ static inline void set_enum(PointerRNA &ptr, const char *name, const string &ide
|
||||
static inline string get_string(PointerRNA &ptr, const char *name)
|
||||
{
|
||||
char cstrbuf[1024];
|
||||
char *cstr = RNA_string_get_alloc(&ptr, name, cstrbuf, sizeof(cstrbuf), NULL);
|
||||
char *cstr = RNA_string_get_alloc(&ptr, name, cstrbuf, sizeof(cstrbuf));
|
||||
string str(cstr);
|
||||
if (cstr != cstrbuf)
|
||||
MEM_freeN(cstr);
|
||||
@@ -573,6 +540,22 @@ static inline bool object_use_deform_motion(BL::Object &b_parent, BL::Object &b_
|
||||
return use_deform_motion;
|
||||
}
|
||||
|
||||
static inline BL::FluidDomainSettings object_fluid_liquid_domain_find(BL::Object &b_ob)
|
||||
{
|
||||
for (BL::Modifier &b_mod : b_ob.modifiers) {
|
||||
if (b_mod.is_a(&RNA_FluidModifier)) {
|
||||
BL::FluidModifier b_mmd(b_mod);
|
||||
|
||||
if (b_mmd.fluid_type() == BL::FluidModifier::fluid_type_DOMAIN &&
|
||||
b_mmd.domain_settings().domain_type() == BL::FluidDomainSettings::domain_type_LIQUID) {
|
||||
return b_mmd.domain_settings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return BL::FluidDomainSettings(PointerRNA_NULL);
|
||||
}
|
||||
|
||||
static inline BL::FluidDomainSettings object_fluid_gas_domain_find(BL::Object &b_ob)
|
||||
{
|
||||
for (BL::Modifier &b_mod : b_ob.modifiers) {
|
||||
@@ -590,6 +573,7 @@ static inline BL::FluidDomainSettings object_fluid_gas_domain_find(BL::Object &b
|
||||
}
|
||||
|
||||
static inline BL::MeshSequenceCacheModifier object_mesh_cache_find(BL::Object &b_ob,
|
||||
bool check_velocity,
|
||||
bool *has_subdivision_modifier)
|
||||
{
|
||||
for (int i = b_ob.modifiers.length() - 1; i >= 0; --i) {
|
||||
@@ -597,6 +581,13 @@ static inline BL::MeshSequenceCacheModifier object_mesh_cache_find(BL::Object &b
|
||||
|
||||
if (b_mod.type() == BL::Modifier::type_MESH_SEQUENCE_CACHE) {
|
||||
BL::MeshSequenceCacheModifier mesh_cache = BL::MeshSequenceCacheModifier(b_mod);
|
||||
|
||||
if (check_velocity) {
|
||||
if (!MeshSequenceCacheModifier_has_velocity_get(&mesh_cache.ptr)) {
|
||||
return BL::MeshSequenceCacheModifier(PointerRNA_NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return mesh_cache;
|
||||
}
|
||||
|
||||
@@ -605,7 +596,9 @@ static inline BL::MeshSequenceCacheModifier object_mesh_cache_find(BL::Object &b
|
||||
continue;
|
||||
}
|
||||
|
||||
if (b_mod.type() == BL::Modifier::type_SUBSURF) {
|
||||
/* Only skip the subsurf modifier if we are not checking for the mesh sequence cache modifier
|
||||
* for motion blur. */
|
||||
if (b_mod.type() == BL::Modifier::type_SUBSURF && !check_velocity) {
|
||||
if (has_subdivision_modifier) {
|
||||
*has_subdivision_modifier = true;
|
||||
}
|
||||
|
@@ -181,12 +181,9 @@ class BlenderSmokeLoader : public ImageLoader {
|
||||
AttributeStandard attribute;
|
||||
};
|
||||
|
||||
static void sync_smoke_volume(Scene *scene, BObjectInfo &b_ob_info, Volume *volume, float frame)
|
||||
static void sync_smoke_volume(Scene *scene, BL::Object &b_ob, Volume *volume, float frame)
|
||||
{
|
||||
if (!b_ob_info.is_real_object_data()) {
|
||||
return;
|
||||
}
|
||||
BL::FluidDomainSettings b_domain = object_fluid_gas_domain_find(b_ob_info.real_object);
|
||||
BL::FluidDomainSettings b_domain = object_fluid_gas_domain_find(b_ob);
|
||||
if (!b_domain) {
|
||||
return;
|
||||
}
|
||||
@@ -209,7 +206,7 @@ static void sync_smoke_volume(Scene *scene, BObjectInfo &b_ob_info, Volume *volu
|
||||
|
||||
Attribute *attr = volume->attributes.add(std);
|
||||
|
||||
ImageLoader *loader = new BlenderSmokeLoader(b_ob_info.real_object, std);
|
||||
ImageLoader *loader = new BlenderSmokeLoader(b_ob, std);
|
||||
ImageParams params;
|
||||
params.frame = frame;
|
||||
|
||||
@@ -247,11 +244,11 @@ class BlenderVolumeLoader : public VDBImageLoader {
|
||||
};
|
||||
|
||||
static void sync_volume_object(BL::BlendData &b_data,
|
||||
BObjectInfo &b_ob_info,
|
||||
BL::Object &b_ob,
|
||||
Scene *scene,
|
||||
Volume *volume)
|
||||
{
|
||||
BL::Volume b_volume(b_ob_info.object_data);
|
||||
BL::Volume b_volume(b_ob.data());
|
||||
b_volume.grids.load(b_data.ptr.data);
|
||||
|
||||
BL::VolumeRender b_render(b_volume.render());
|
||||
@@ -299,19 +296,19 @@ static void sync_volume_object(BL::BlendData &b_data,
|
||||
}
|
||||
}
|
||||
|
||||
void BlenderSync::sync_volume(BObjectInfo &b_ob_info, Volume *volume)
|
||||
void BlenderSync::sync_volume(BL::Object &b_ob, Volume *volume)
|
||||
{
|
||||
volume->clear(true);
|
||||
|
||||
if (view_layer.use_volumes) {
|
||||
if (b_ob_info.object_data.is_a(&RNA_Volume)) {
|
||||
if (b_ob.type() == BL::Object::type_VOLUME) {
|
||||
/* Volume object. Create only attributes, bounding mesh will then
|
||||
* be automatically generated later. */
|
||||
sync_volume_object(b_data, b_ob_info, scene, volume);
|
||||
sync_volume_object(b_data, b_ob, scene, volume);
|
||||
}
|
||||
else {
|
||||
/* Smoke domain. */
|
||||
sync_smoke_volume(scene, b_ob_info, volume, b_scene.frame_current());
|
||||
sync_smoke_volume(scene, b_ob, volume, b_scene.frame_current());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1050,7 +1050,7 @@ ccl_device int bsdf_microfacet_beckmann_sample(KernelGlobals *kg,
|
||||
float D, G1i;
|
||||
|
||||
if (alpha_x == alpha_y) {
|
||||
/* Isotropic distribution. */
|
||||
/* istropic distribution */
|
||||
float cosThetaM2 = cosThetaM * cosThetaM;
|
||||
float cosThetaM4 = cosThetaM2 * cosThetaM2;
|
||||
float tanThetaM2 = 1 / (cosThetaM2)-1;
|
||||
|
@@ -36,10 +36,10 @@ static_assert(sizeof(ShaderClosure) >= sizeof(PrincipledDiffuseBsdf),
|
||||
ccl_device float3 calculate_principled_diffuse_brdf(
|
||||
const PrincipledDiffuseBsdf *bsdf, float3 N, float3 V, float3 L, float3 H, float *pdf)
|
||||
{
|
||||
float NdotL = dot(N, L);
|
||||
float NdotV = dot(N, V);
|
||||
float NdotL = max(dot(N, L), 0.0f);
|
||||
float NdotV = max(dot(N, V), 0.0f);
|
||||
|
||||
if (NdotL <= 0 || NdotV <= 0) {
|
||||
if (NdotL < 0 || NdotV < 0) {
|
||||
*pdf = 0.0f;
|
||||
return make_float3(0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
@@ -107,8 +107,8 @@ triangle_smooth_normal(KernelGlobals *kg, float3 Ng, int prim, float u, float v)
|
||||
return is_zero(N) ? Ng : N;
|
||||
}
|
||||
|
||||
ccl_device_inline float3 triangle_smooth_normal_unnormalized(
|
||||
KernelGlobals *kg, ShaderData *sd, float3 Ng, int prim, float u, float v)
|
||||
ccl_device_inline float3
|
||||
triangle_smooth_normal_unnormalized(KernelGlobals *kg, float3 Ng, int prim, float u, float v)
|
||||
{
|
||||
/* load triangle vertices */
|
||||
const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, prim);
|
||||
@@ -116,13 +116,6 @@ ccl_device_inline float3 triangle_smooth_normal_unnormalized(
|
||||
float3 n1 = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.y));
|
||||
float3 n2 = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.z));
|
||||
|
||||
/* ensure that the normals are in object space */
|
||||
if (sd->object_flag & SD_OBJECT_TRANSFORM_APPLIED) {
|
||||
object_inverse_normal_transform(kg, sd, &n0);
|
||||
object_inverse_normal_transform(kg, sd, &n1);
|
||||
object_inverse_normal_transform(kg, sd, &n2);
|
||||
}
|
||||
|
||||
float3 N = (1.0f - u - v) * n2 + u * n0 + v * n1;
|
||||
|
||||
return is_zero(N) ? Ng : N;
|
||||
|
@@ -289,7 +289,7 @@ ccl_device void svm_node_normal_map(KernelGlobals *kg, ShaderData *sd, float *st
|
||||
float3 normal;
|
||||
|
||||
if (sd->shader & SHADER_SMOOTH_NORMAL) {
|
||||
normal = triangle_smooth_normal_unnormalized(kg, sd, sd->Ng, sd->prim, sd->u, sd->v);
|
||||
normal = triangle_smooth_normal_unnormalized(kg, sd->Ng, sd->prim, sd->u, sd->v);
|
||||
}
|
||||
else {
|
||||
normal = sd->Ng;
|
||||
|
@@ -89,10 +89,10 @@ class Hair : public Geometry {
|
||||
float4 r_keys[4]) const;
|
||||
};
|
||||
|
||||
NODE_SOCKET_API_ARRAY(array<float3>, curve_keys)
|
||||
NODE_SOCKET_API_ARRAY(array<float>, curve_radius)
|
||||
NODE_SOCKET_API_ARRAY(array<int>, curve_first_key)
|
||||
NODE_SOCKET_API_ARRAY(array<int>, curve_shader)
|
||||
NODE_SOCKET_API(array<float3>, curve_keys)
|
||||
NODE_SOCKET_API(array<float>, curve_radius)
|
||||
NODE_SOCKET_API(array<int>, curve_first_key)
|
||||
NODE_SOCKET_API(array<int>, curve_shader)
|
||||
|
||||
/* BVH */
|
||||
size_t curvekey_offset;
|
||||
|
@@ -410,39 +410,38 @@ void LightManager::device_update_distribution(Device *,
|
||||
}
|
||||
|
||||
float trianglearea = totarea;
|
||||
|
||||
/* point lights */
|
||||
float lightarea = (totarea > 0.0f) ? totarea / num_lights : 1.0f;
|
||||
bool use_lamp_mis = false;
|
||||
|
||||
int light_index = 0;
|
||||
foreach (Light *light, scene->lights) {
|
||||
if (!light->is_enabled)
|
||||
continue;
|
||||
|
||||
if (num_lights > 0) {
|
||||
float lightarea = (totarea > 0.0f) ? totarea / num_lights : 1.0f;
|
||||
foreach (Light *light, scene->lights) {
|
||||
if (!light->is_enabled)
|
||||
continue;
|
||||
distribution[offset].totarea = totarea;
|
||||
distribution[offset].prim = ~light_index;
|
||||
distribution[offset].lamp.pad = 1.0f;
|
||||
distribution[offset].lamp.size = light->size;
|
||||
totarea += lightarea;
|
||||
|
||||
distribution[offset].totarea = totarea;
|
||||
distribution[offset].prim = ~light_index;
|
||||
distribution[offset].lamp.pad = 1.0f;
|
||||
distribution[offset].lamp.size = light->size;
|
||||
totarea += lightarea;
|
||||
|
||||
if (light->light_type == LIGHT_DISTANT) {
|
||||
use_lamp_mis |= (light->angle > 0.0f && light->use_mis);
|
||||
}
|
||||
else if (light->light_type == LIGHT_POINT || light->light_type == LIGHT_SPOT) {
|
||||
use_lamp_mis |= (light->size > 0.0f && light->use_mis);
|
||||
}
|
||||
else if (light->light_type == LIGHT_AREA) {
|
||||
use_lamp_mis |= light->use_mis;
|
||||
}
|
||||
else if (light->light_type == LIGHT_BACKGROUND) {
|
||||
num_background_lights++;
|
||||
background_mis |= light->use_mis;
|
||||
}
|
||||
|
||||
light_index++;
|
||||
offset++;
|
||||
if (light->light_type == LIGHT_DISTANT) {
|
||||
use_lamp_mis |= (light->angle > 0.0f && light->use_mis);
|
||||
}
|
||||
else if (light->light_type == LIGHT_POINT || light->light_type == LIGHT_SPOT) {
|
||||
use_lamp_mis |= (light->size > 0.0f && light->use_mis);
|
||||
}
|
||||
else if (light->light_type == LIGHT_AREA) {
|
||||
use_lamp_mis |= light->use_mis;
|
||||
}
|
||||
else if (light->light_type == LIGHT_BACKGROUND) {
|
||||
num_background_lights++;
|
||||
background_mis |= light->use_mis;
|
||||
}
|
||||
|
||||
light_index++;
|
||||
offset++;
|
||||
}
|
||||
|
||||
/* normalize cumulative distribution functions */
|
||||
|
@@ -128,7 +128,7 @@ class ImageTextureNode : public ImageSlotTextureNode {
|
||||
NODE_SOCKET_API(float, projection_blend)
|
||||
NODE_SOCKET_API(bool, animated)
|
||||
NODE_SOCKET_API(float3, vector)
|
||||
NODE_SOCKET_API_ARRAY(array<int>, tiles)
|
||||
NODE_SOCKET_API(array<int>, tiles)
|
||||
|
||||
protected:
|
||||
void cull_tiles(Scene *scene, ShaderGraph *graph);
|
||||
@@ -1554,7 +1554,7 @@ class CurvesNode : public ShaderNode {
|
||||
return NODE_GROUP_LEVEL_3;
|
||||
}
|
||||
|
||||
NODE_SOCKET_API_ARRAY(array<float3>, curves)
|
||||
NODE_SOCKET_API(array<float3>, curves)
|
||||
NODE_SOCKET_API(float, min_x)
|
||||
NODE_SOCKET_API(float, max_x)
|
||||
NODE_SOCKET_API(float, fac)
|
||||
@@ -1588,8 +1588,8 @@ class RGBRampNode : public ShaderNode {
|
||||
return NODE_GROUP_LEVEL_1;
|
||||
}
|
||||
|
||||
NODE_SOCKET_API_ARRAY(array<float3>, ramp)
|
||||
NODE_SOCKET_API_ARRAY(array<float>, ramp_alpha)
|
||||
NODE_SOCKET_API(array<float3>, ramp)
|
||||
NODE_SOCKET_API(array<float>, ramp_alpha)
|
||||
NODE_SOCKET_API(float, fac)
|
||||
NODE_SOCKET_API(bool, interpolate)
|
||||
};
|
||||
|
@@ -652,11 +652,6 @@ typedef struct {
|
||||
enum {
|
||||
GHOST_kXrContextDebug = (1 << 0),
|
||||
GHOST_kXrContextDebugTime = (1 << 1),
|
||||
# ifdef WIN32
|
||||
/* Needed to avoid issues with the SteamVR OpenGL graphics binding (use DirectX fallback
|
||||
instead). */
|
||||
GHOST_kXrContextGpuNVIDIA = (1 << 2),
|
||||
# endif
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
@@ -424,7 +424,7 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
|
||||
{
|
||||
/* TODO: implement graceful termination through Cocoa mechanism
|
||||
* to avoid session log off to be canceled. */
|
||||
/* Note that Cmd+Q is already handled by key-handler. */
|
||||
/* Note that Cmd+Q is already handled by keyhandler. */
|
||||
systemCocoa->handleQuitRequest();
|
||||
return NSTerminateCancel;
|
||||
}
|
||||
|
@@ -1922,7 +1922,7 @@ static GHOST_TKey ghost_key_from_keycode(const XkbDescPtr xkb_descr, const KeyCo
|
||||
|
||||
#undef MAKE_ID
|
||||
|
||||
/* From `xclip.c` #xcout() v0.11. */
|
||||
/* from xclip.c xcout() v0.11 */
|
||||
|
||||
#define XCLIB_XCOUT_NONE 0 /* no context */
|
||||
#define XCLIB_XCOUT_SENTCONVSEL 1 /* sent a request */
|
||||
|
@@ -20,7 +20,6 @@
|
||||
* Abstraction for XR (VR, AR, MR, ..) access via OpenXR.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@@ -99,7 +98,7 @@ void GHOST_XrContext::initialize(const GHOST_XrContextCreateInfo *create_info)
|
||||
storeInstanceProperties();
|
||||
|
||||
/* Multiple bindings may be enabled. Now that we know the runtime in use, settle for one. */
|
||||
m_gpu_binding_type = determineGraphicsBindingTypeToUse(graphics_binding_types, create_info);
|
||||
m_gpu_binding_type = determineGraphicsBindingTypeToUse(graphics_binding_types);
|
||||
|
||||
printInstanceInfo();
|
||||
if (isDebugMode()) {
|
||||
@@ -136,8 +135,7 @@ void GHOST_XrContext::storeInstanceProperties()
|
||||
{"Monado(XRT) by Collabora et al", OPENXR_RUNTIME_MONADO},
|
||||
{"Oculus", OPENXR_RUNTIME_OCULUS},
|
||||
{"SteamVR/OpenXR", OPENXR_RUNTIME_STEAMVR},
|
||||
{"Windows Mixed Reality Runtime", OPENXR_RUNTIME_WMR},
|
||||
{"Varjo OpenXR Runtime", OPENXR_RUNTIME_VARJO}};
|
||||
{"Windows Mixed Reality Runtime", OPENXR_RUNTIME_WMR}};
|
||||
decltype(runtime_map)::const_iterator runtime_map_iter;
|
||||
|
||||
m_oxr->instance_properties.type = XR_TYPE_INSTANCE_PROPERTIES;
|
||||
@@ -412,17 +410,6 @@ void GHOST_XrContext::getExtensionsToEnable(
|
||||
try_ext.push_back(XR_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
/* Try enabling interaction profile extensions. */
|
||||
try_ext.push_back(XR_EXT_HP_MIXED_REALITY_CONTROLLER_EXTENSION_NAME);
|
||||
try_ext.push_back(XR_HTC_VIVE_COSMOS_CONTROLLER_INTERACTION_EXTENSION_NAME);
|
||||
try_ext.push_back(XR_HUAWEI_CONTROLLER_INTERACTION_EXTENSION_NAME);
|
||||
|
||||
/* Varjo quad view extension. */
|
||||
try_ext.push_back(XR_VARJO_QUAD_VIEWS_EXTENSION_NAME);
|
||||
|
||||
/* Varjo foveated extension. */
|
||||
try_ext.push_back(XR_VARJO_FOVEATED_RENDERING_EXTENSION_NAME);
|
||||
|
||||
r_ext_names.reserve(try_ext.size() + graphics_binding_types.size());
|
||||
|
||||
/* Add graphics binding extensions (may be multiple ones, we'll settle for one to use later, once
|
||||
@@ -473,20 +460,16 @@ std::vector<GHOST_TXrGraphicsBinding> GHOST_XrContext::determineGraphicsBindingT
|
||||
}
|
||||
|
||||
GHOST_TXrGraphicsBinding GHOST_XrContext::determineGraphicsBindingTypeToUse(
|
||||
const std::vector<GHOST_TXrGraphicsBinding> &enabled_types,
|
||||
const GHOST_XrContextCreateInfo *create_info)
|
||||
const std::vector<GHOST_TXrGraphicsBinding> &enabled_types)
|
||||
{
|
||||
/* Return the first working type. */
|
||||
for (GHOST_TXrGraphicsBinding type : enabled_types) {
|
||||
#ifdef WIN32
|
||||
/* The SteamVR OpenGL backend currently fails for NVIDIA GPU's. Disable it and allow falling
|
||||
* back to the DirectX one. */
|
||||
if ((m_runtime_id == OPENXR_RUNTIME_STEAMVR) && (type == GHOST_kXrGraphicsOpenGL) &&
|
||||
((create_info->context_flag & GHOST_kXrContextGpuNVIDIA) != 0)) {
|
||||
/* The SteamVR OpenGL backend fails currently. Disable it and allow falling back to the DirectX
|
||||
* one. */
|
||||
if ((m_runtime_id == OPENXR_RUNTIME_STEAMVR) && (type == GHOST_kXrGraphicsOpenGL)) {
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
((void)create_info);
|
||||
#endif
|
||||
|
||||
assert(type != GHOST_kXrGraphicsUnknown);
|
||||
@@ -625,11 +608,4 @@ bool GHOST_XrContext::isDebugTimeMode() const
|
||||
return m_debug_time;
|
||||
}
|
||||
|
||||
bool GHOST_XrContext::isExtensionEnabled(const char *ext) const
|
||||
{
|
||||
bool contains = std::find(m_enabled_extensions.begin(), m_enabled_extensions.end(), ext) !=
|
||||
m_enabled_extensions.end();
|
||||
return contains;
|
||||
}
|
||||
|
||||
/** \} */ /* Ghost Internal Accessors and Mutators */
|
||||
|
@@ -51,7 +51,6 @@ enum GHOST_TXrOpenXRRuntimeID {
|
||||
OPENXR_RUNTIME_OCULUS,
|
||||
OPENXR_RUNTIME_STEAMVR,
|
||||
OPENXR_RUNTIME_WMR, /* Windows Mixed Reality */
|
||||
OPENXR_RUNTIME_VARJO,
|
||||
|
||||
OPENXR_RUNTIME_UNKNOWN
|
||||
};
|
||||
@@ -95,8 +94,6 @@ class GHOST_XrContext : public GHOST_IXrContext {
|
||||
bool isDebugMode() const;
|
||||
bool isDebugTimeMode() const;
|
||||
|
||||
bool isExtensionEnabled(const char *ext) const;
|
||||
|
||||
private:
|
||||
static GHOST_XrErrorHandlerFn s_error_handler;
|
||||
static void *s_error_handler_customdata;
|
||||
@@ -139,6 +136,5 @@ class GHOST_XrContext : public GHOST_IXrContext {
|
||||
std::vector<GHOST_TXrGraphicsBinding> determineGraphicsBindingTypesToEnable(
|
||||
const GHOST_XrContextCreateInfo *create_info);
|
||||
GHOST_TXrGraphicsBinding determineGraphicsBindingTypeToUse(
|
||||
const std::vector<GHOST_TXrGraphicsBinding> &enabled_types,
|
||||
const GHOST_XrContextCreateInfo *create_info);
|
||||
const std::vector<GHOST_TXrGraphicsBinding> &enabled_types);
|
||||
};
|
||||
|
@@ -41,13 +41,10 @@ struct OpenXRSessionData {
|
||||
XrSession session = XR_NULL_HANDLE;
|
||||
XrSessionState session_state = XR_SESSION_STATE_UNKNOWN;
|
||||
|
||||
/* Use stereo rendering by default. */
|
||||
XrViewConfigurationType view_type = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO;
|
||||
bool foveation_supported = false;
|
||||
|
||||
/* Only stereo rendering supported now. */
|
||||
const XrViewConfigurationType view_type = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO;
|
||||
XrSpace reference_space;
|
||||
XrSpace view_space;
|
||||
XrSpace combined_eye_space;
|
||||
std::vector<XrView> views;
|
||||
std::vector<GHOST_XrSwapchain> swapchains;
|
||||
|
||||
@@ -61,9 +58,6 @@ struct GHOST_XrDrawInfo {
|
||||
std::chrono::high_resolution_clock::time_point frame_begin_time;
|
||||
/* Time previous frames took for rendering (in ms). */
|
||||
std::list<double> last_frame_times;
|
||||
|
||||
/* Whether foveation is active for the frame. */
|
||||
bool foveation_active;
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
@@ -88,9 +82,6 @@ GHOST_XrSession::~GHOST_XrSession()
|
||||
if (m_oxr->view_space != XR_NULL_HANDLE) {
|
||||
CHECK_XR_ASSERT(xrDestroySpace(m_oxr->view_space));
|
||||
}
|
||||
if (m_oxr->combined_eye_space != XR_NULL_HANDLE) {
|
||||
CHECK_XR_ASSERT(xrDestroySpace(m_oxr->combined_eye_space));
|
||||
}
|
||||
if (m_oxr->session != XR_NULL_HANDLE) {
|
||||
CHECK_XR_ASSERT(xrDestroySession(m_oxr->session));
|
||||
}
|
||||
@@ -157,12 +148,13 @@ static void create_reference_spaces(OpenXRSessionData &oxr, const GHOST_XrPose &
|
||||
|
||||
if (XR_FAILED(result)) {
|
||||
/* One of the rare cases where we don't want to immediately throw an exception on failure,
|
||||
* since runtimes are not required to support the stage reference space. If the runtime
|
||||
* doesn't support it then just fall back to the local space. */
|
||||
* since run-times are not required to support the stage reference space. Although we need the
|
||||
* stage reference space for absolute tracking, if the runtime doesn't support it then just
|
||||
* fallback to the local space. */
|
||||
if (result == XR_ERROR_REFERENCE_SPACE_UNSUPPORTED) {
|
||||
printf(
|
||||
"Warning: XR runtime does not support stage reference space, falling back to local "
|
||||
"reference space.\n");
|
||||
"Warning: XR runtime does not support stage reference space, disabling absolute "
|
||||
"tracking.\n");
|
||||
|
||||
create_info.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_LOCAL;
|
||||
CHECK_XR(xrCreateReferenceSpace(oxr.session, &create_info, &oxr.reference_space),
|
||||
@@ -180,9 +172,8 @@ static void create_reference_spaces(OpenXRSessionData &oxr, const GHOST_XrPose &
|
||||
"Failed to get stage reference space bounds.");
|
||||
if (extents.width == 0.0f || extents.height == 0.0f) {
|
||||
printf(
|
||||
"Warning: Invalid stage reference space bounds, falling back to local reference space. "
|
||||
"To use the stage reference space, please define a tracking space via the XR "
|
||||
"runtime.\n");
|
||||
"Warning: Invalid stage reference space bounds, disabling absolute tracking. To enable "
|
||||
"absolute tracking, please define a tracking space via the XR runtime.\n");
|
||||
|
||||
/* Fallback to local space. */
|
||||
if (oxr.reference_space != XR_NULL_HANDLE) {
|
||||
@@ -198,13 +189,6 @@ static void create_reference_spaces(OpenXRSessionData &oxr, const GHOST_XrPose &
|
||||
create_info.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_VIEW;
|
||||
CHECK_XR(xrCreateReferenceSpace(oxr.session, &create_info, &oxr.view_space),
|
||||
"Failed to create view reference space.");
|
||||
|
||||
/* Foveation reference spaces. */
|
||||
if (oxr.foveation_supported) {
|
||||
create_info.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_COMBINED_EYE_VARJO;
|
||||
CHECK_XR(xrCreateReferenceSpace(oxr.session, &create_info, &oxr.combined_eye_space),
|
||||
"Failed to create combined eye reference space.");
|
||||
}
|
||||
}
|
||||
|
||||
void GHOST_XrSession::start(const GHOST_XrSessionBeginInfo *begin_info)
|
||||
@@ -308,19 +292,9 @@ GHOST_XrSession::LifeExpectancy GHOST_XrSession::handleStateChangeEvent(
|
||||
|
||||
void GHOST_XrSession::prepareDrawing()
|
||||
{
|
||||
assert(m_context->getInstance() != XR_NULL_HANDLE);
|
||||
|
||||
std::vector<XrViewConfigurationView> view_configs;
|
||||
uint32_t view_count;
|
||||
|
||||
/* Attempt to use quad view if supported. */
|
||||
if (m_context->isExtensionEnabled(XR_VARJO_QUAD_VIEWS_EXTENSION_NAME)) {
|
||||
m_oxr->view_type = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_QUAD_VARJO;
|
||||
}
|
||||
|
||||
m_oxr->foveation_supported = m_context->isExtensionEnabled(
|
||||
XR_VARJO_FOVEATED_RENDERING_EXTENSION_NAME);
|
||||
|
||||
CHECK_XR(
|
||||
xrEnumerateViewConfigurationViews(
|
||||
m_context->getInstance(), m_oxr->system_id, m_oxr->view_type, 0, &view_count, nullptr),
|
||||
@@ -332,36 +306,7 @@ void GHOST_XrSession::prepareDrawing()
|
||||
view_configs.size(),
|
||||
&view_count,
|
||||
view_configs.data()),
|
||||
"Failed to get view configurations.");
|
||||
|
||||
/* If foveated rendering is used, query the foveated views. */
|
||||
if (m_oxr->foveation_supported) {
|
||||
std::vector<XrFoveatedViewConfigurationViewVARJO> request_foveated_config{
|
||||
view_count, {XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO, nullptr, XR_TRUE}};
|
||||
|
||||
auto foveated_views = std::vector<XrViewConfigurationView>(view_count,
|
||||
{XR_TYPE_VIEW_CONFIGURATION_VIEW});
|
||||
|
||||
for (uint32_t i = 0; i < view_count; i++) {
|
||||
foveated_views[i].next = &request_foveated_config[i];
|
||||
}
|
||||
CHECK_XR(xrEnumerateViewConfigurationViews(m_context->getInstance(),
|
||||
m_oxr->system_id,
|
||||
m_oxr->view_type,
|
||||
view_configs.size(),
|
||||
&view_count,
|
||||
foveated_views.data()),
|
||||
"Failed to get foveated view configurations.");
|
||||
|
||||
/* Ensure swapchains have correct size even when foveation is being used. */
|
||||
for (uint32_t i = 0; i < view_count; i++) {
|
||||
view_configs[i].recommendedImageRectWidth = std::max(
|
||||
view_configs[i].recommendedImageRectWidth, foveated_views[i].recommendedImageRectWidth);
|
||||
view_configs[i].recommendedImageRectHeight = std::max(
|
||||
view_configs[i].recommendedImageRectHeight,
|
||||
foveated_views[i].recommendedImageRectHeight);
|
||||
}
|
||||
}
|
||||
"Failed to get count of view configurations.");
|
||||
|
||||
for (const XrViewConfigurationView &view_config : view_configs) {
|
||||
m_oxr->swapchains.emplace_back(*m_gpu_binding, m_oxr->session, view_config);
|
||||
@@ -382,20 +327,6 @@ void GHOST_XrSession::beginFrameDrawing()
|
||||
CHECK_XR(xrWaitFrame(m_oxr->session, &wait_info, &frame_state),
|
||||
"Failed to synchronize frame rates between Blender and the device.");
|
||||
|
||||
/* Check if we have foveation available for the current frame. */
|
||||
m_draw_info->foveation_active = false;
|
||||
if (m_oxr->foveation_supported) {
|
||||
XrSpaceLocation render_gaze_location{XR_TYPE_SPACE_LOCATION};
|
||||
CHECK_XR(xrLocateSpace(m_oxr->combined_eye_space,
|
||||
m_oxr->view_space,
|
||||
frame_state.predictedDisplayTime,
|
||||
&render_gaze_location),
|
||||
"Failed to locate combined eye space.");
|
||||
|
||||
m_draw_info->foveation_active = (render_gaze_location.locationFlags &
|
||||
XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT) != 0;
|
||||
}
|
||||
|
||||
CHECK_XR(xrBeginFrame(m_oxr->session, &begin_info),
|
||||
"Failed to submit frame rendering start state.");
|
||||
|
||||
@@ -511,8 +442,6 @@ XrCompositionLayerProjection GHOST_XrSession::drawLayer(
|
||||
std::vector<XrCompositionLayerProjectionView> &r_proj_layer_views, void *draw_customdata)
|
||||
{
|
||||
XrViewLocateInfo viewloc_info = {XR_TYPE_VIEW_LOCATE_INFO};
|
||||
XrViewLocateFoveatedRenderingVARJO foveated_info{
|
||||
XR_TYPE_VIEW_LOCATE_FOVEATED_RENDERING_VARJO, nullptr, true};
|
||||
XrViewState view_state = {XR_TYPE_VIEW_STATE};
|
||||
XrCompositionLayerProjection layer = {XR_TYPE_COMPOSITION_LAYER_PROJECTION};
|
||||
XrSpaceLocation view_location{XR_TYPE_SPACE_LOCATION};
|
||||
@@ -522,10 +451,6 @@ XrCompositionLayerProjection GHOST_XrSession::drawLayer(
|
||||
viewloc_info.displayTime = m_draw_info->frame_state.predictedDisplayTime;
|
||||
viewloc_info.space = m_oxr->reference_space;
|
||||
|
||||
if (m_draw_info->foveation_active) {
|
||||
viewloc_info.next = &foveated_info;
|
||||
}
|
||||
|
||||
CHECK_XR(xrLocateViews(m_oxr->session,
|
||||
&viewloc_info,
|
||||
&view_state,
|
||||
@@ -533,7 +458,6 @@ XrCompositionLayerProjection GHOST_XrSession::drawLayer(
|
||||
&view_count,
|
||||
m_oxr->views.data()),
|
||||
"Failed to query frame view and projection state.");
|
||||
|
||||
assert(m_oxr->swapchains.size() == view_count);
|
||||
|
||||
CHECK_XR(
|
||||
|
@@ -21,7 +21,6 @@
|
||||
set(INC
|
||||
.
|
||||
../atomic
|
||||
../../source/blender/blenlib
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
|
@@ -409,7 +409,7 @@ static void print_memhead_backtrace(MemHead *memh)
|
||||
(void)memh; /* Ignored. */
|
||||
}
|
||||
# endif /* defined(__linux__) || defined(__APPLE__) */
|
||||
#endif /* DEBUG_BACKTRACE */
|
||||
#endif /* DEBUG_BACKTRACE */
|
||||
|
||||
static void make_memhead_header(MemHead *memh, size_t len, const char *str)
|
||||
{
|
||||
|
@@ -30,7 +30,6 @@
|
||||
|
||||
/* to ensure strict conversions */
|
||||
#include "../../source/blender/blenlib/BLI_strict_flags.h"
|
||||
#include "../../source/blender/blenlib/BLI_asan.h"
|
||||
|
||||
#include "atomic_ops.h"
|
||||
#include "mallocn_intern.h"
|
||||
@@ -60,9 +59,6 @@ enum {
|
||||
#define MEMHEAD_ALIGNED_FROM_PTR(ptr) (((MemHeadAligned *)ptr) - 1)
|
||||
#define MEMHEAD_IS_ALIGNED(memhead) ((memhead)->len & (size_t)MEMHEAD_ALIGN_FLAG)
|
||||
|
||||
#define MEM_POISON_MEMHEAD(vmemh) BLI_asan_poison(MEMHEAD_FROM_PTR(vmemh), sizeof(MemHead))
|
||||
#define MEM_UNPOISON_MEMHEAD(vmemh) BLI_asan_unpoison(MEMHEAD_FROM_PTR(vmemh), sizeof(MemHead))
|
||||
|
||||
/* Uncomment this to have proper peak counter. */
|
||||
#define USE_ATOMIC_MAX
|
||||
|
||||
@@ -97,13 +93,7 @@ print_error(const char *str, ...)
|
||||
size_t MEM_lockfree_allocN_len(const void *vmemh)
|
||||
{
|
||||
if (vmemh) {
|
||||
size_t ret;
|
||||
|
||||
MEM_UNPOISON_MEMHEAD(vmemh);
|
||||
ret = MEMHEAD_FROM_PTR(vmemh)->len & ~((size_t)(MEMHEAD_ALIGN_FLAG));
|
||||
MEM_POISON_MEMHEAD(vmemh);
|
||||
|
||||
return ret;
|
||||
return MEMHEAD_FROM_PTR(vmemh)->len & ~((size_t)(MEMHEAD_ALIGN_FLAG));
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -129,8 +119,6 @@ void MEM_lockfree_freeN(void *vmemh)
|
||||
atomic_sub_and_fetch_u(&totblock, 1);
|
||||
atomic_sub_and_fetch_z(&mem_in_use, len);
|
||||
|
||||
MEM_UNPOISON_MEMHEAD(vmemh);
|
||||
|
||||
if (UNLIKELY(malloc_debug_memset && len)) {
|
||||
memset(memh + 1, 255, len);
|
||||
}
|
||||
@@ -149,9 +137,6 @@ void *MEM_lockfree_dupallocN(const void *vmemh)
|
||||
if (vmemh) {
|
||||
MemHead *memh = MEMHEAD_FROM_PTR(vmemh);
|
||||
const size_t prev_size = MEM_lockfree_allocN_len(vmemh);
|
||||
|
||||
MEM_UNPOISON_MEMHEAD(vmemh);
|
||||
|
||||
if (UNLIKELY(MEMHEAD_IS_ALIGNED(memh))) {
|
||||
MemHeadAligned *memh_aligned = MEMHEAD_ALIGNED_FROM_PTR(vmemh);
|
||||
newp = MEM_lockfree_mallocN_aligned(
|
||||
@@ -160,8 +145,6 @@ void *MEM_lockfree_dupallocN(const void *vmemh)
|
||||
else {
|
||||
newp = MEM_lockfree_mallocN(prev_size, "dupli_malloc");
|
||||
}
|
||||
|
||||
MEM_POISON_MEMHEAD(vmemh);
|
||||
memcpy(newp, vmemh, prev_size);
|
||||
}
|
||||
return newp;
|
||||
@@ -175,8 +158,6 @@ void *MEM_lockfree_reallocN_id(void *vmemh, size_t len, const char *str)
|
||||
MemHead *memh = MEMHEAD_FROM_PTR(vmemh);
|
||||
size_t old_len = MEM_lockfree_allocN_len(vmemh);
|
||||
|
||||
MEM_UNPOISON_MEMHEAD(vmemh);
|
||||
|
||||
if (LIKELY(!MEMHEAD_IS_ALIGNED(memh))) {
|
||||
newp = MEM_lockfree_mallocN(len, "realloc");
|
||||
}
|
||||
@@ -185,8 +166,6 @@ void *MEM_lockfree_reallocN_id(void *vmemh, size_t len, const char *str)
|
||||
newp = MEM_lockfree_mallocN_aligned(len, (size_t)memh_aligned->alignment, "realloc");
|
||||
}
|
||||
|
||||
MEM_POISON_MEMHEAD(vmemh);
|
||||
|
||||
if (newp) {
|
||||
if (len < old_len) {
|
||||
/* shrink */
|
||||
@@ -215,8 +194,6 @@ void *MEM_lockfree_recallocN_id(void *vmemh, size_t len, const char *str)
|
||||
MemHead *memh = MEMHEAD_FROM_PTR(vmemh);
|
||||
size_t old_len = MEM_lockfree_allocN_len(vmemh);
|
||||
|
||||
MEM_UNPOISON_MEMHEAD(vmemh);
|
||||
|
||||
if (LIKELY(!MEMHEAD_IS_ALIGNED(memh))) {
|
||||
newp = MEM_lockfree_mallocN(len, "recalloc");
|
||||
}
|
||||
@@ -224,7 +201,6 @@ void *MEM_lockfree_recallocN_id(void *vmemh, size_t len, const char *str)
|
||||
MemHeadAligned *memh_aligned = MEMHEAD_ALIGNED_FROM_PTR(vmemh);
|
||||
newp = MEM_lockfree_mallocN_aligned(len, (size_t)memh_aligned->alignment, "recalloc");
|
||||
}
|
||||
MEM_POISON_MEMHEAD(vmemh);
|
||||
|
||||
if (newp) {
|
||||
if (len < old_len) {
|
||||
@@ -265,7 +241,6 @@ void *MEM_lockfree_callocN(size_t len, const char *str)
|
||||
atomic_add_and_fetch_z(&mem_in_use, len);
|
||||
update_maximum(&peak_mem, mem_in_use);
|
||||
|
||||
MEM_POISON_MEMHEAD(PTR_FROM_MEMHEAD(memh));
|
||||
return PTR_FROM_MEMHEAD(memh);
|
||||
}
|
||||
print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
|
||||
@@ -311,8 +286,6 @@ void *MEM_lockfree_mallocN(size_t len, const char *str)
|
||||
atomic_add_and_fetch_z(&mem_in_use, len);
|
||||
update_maximum(&peak_mem, mem_in_use);
|
||||
|
||||
MEM_POISON_MEMHEAD(PTR_FROM_MEMHEAD(memh));
|
||||
|
||||
return PTR_FROM_MEMHEAD(memh);
|
||||
}
|
||||
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
|
||||
@@ -384,8 +357,6 @@ void *MEM_lockfree_mallocN_aligned(size_t len, size_t alignment, const char *str
|
||||
atomic_add_and_fetch_z(&mem_in_use, len);
|
||||
update_maximum(&peak_mem, mem_in_use);
|
||||
|
||||
MEM_POISON_MEMHEAD(PTR_FROM_MEMHEAD(memh));
|
||||
|
||||
return PTR_FROM_MEMHEAD(memh);
|
||||
}
|
||||
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
|
||||
|
@@ -70,9 +70,9 @@ static int check_if_canceled(float progress,
|
||||
return cancel;
|
||||
}
|
||||
|
||||
ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
void (*update_cb)(void *, float progress, int *cancel),
|
||||
void *update_cb_data)
|
||||
void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
void (*update_cb)(void *, float progress, int *cancel),
|
||||
void *update_cb_data)
|
||||
{
|
||||
Parametrizer field;
|
||||
VertexMap vertexMap;
|
||||
@@ -80,12 +80,6 @@ ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
/* Get remeshing parameters. */
|
||||
int faces = qrd->target_faces;
|
||||
|
||||
field.flag_adaptive_scale = 1;
|
||||
field.flag_minimum_cost_flow = 1;
|
||||
field.flag_preserve_boundary = 1;
|
||||
field.flag_preserve_sharp = 1;
|
||||
// field.flag_aggresive_sat = 1;
|
||||
|
||||
if (qrd->preserve_sharp) {
|
||||
field.flag_preserve_sharp = 1;
|
||||
}
|
||||
@@ -112,7 +106,6 @@ ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
/* Copy mesh to quadriflow data structures. */
|
||||
std::vector<Vector3d> positions;
|
||||
std::vector<uint32_t> indices;
|
||||
std::vector<uint32_t> eflags;
|
||||
std::vector<ObjVertex> vertices;
|
||||
|
||||
for (int i = 0; i < qrd->totverts; i++) {
|
||||
@@ -121,18 +114,16 @@ ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
}
|
||||
|
||||
for (int q = 0; q < qrd->totfaces; q++) {
|
||||
Vector3i f(qrd->faces[q].v[0], qrd->faces[q].v[1], qrd->faces[q].v[2]);
|
||||
Vector3i f(qrd->faces[q * 3], qrd->faces[q * 3 + 1], qrd->faces[q * 3 + 2]);
|
||||
|
||||
ObjVertex tri[6];
|
||||
const int nVertices = 3;
|
||||
int nVertices = 3;
|
||||
|
||||
tri[0] = ObjVertex(f[0]);
|
||||
tri[1] = ObjVertex(f[1]);
|
||||
tri[2] = ObjVertex(f[2]);
|
||||
|
||||
for (int i = 0; i < nVertices; ++i) {
|
||||
eflags.push_back(qrd->faces[q].eflag[i]);
|
||||
|
||||
const ObjVertex &v = tri[i];
|
||||
VertexMap::const_iterator it = vertexMap.find(v);
|
||||
if (it == vertexMap.end()) {
|
||||
@@ -147,10 +138,7 @@ ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
}
|
||||
|
||||
field.F.resize(3, indices.size() / 3);
|
||||
// field.FF.resize(3, indices.size() / 3);
|
||||
|
||||
memcpy(field.F.data(), indices.data(), sizeof(uint32_t) * indices.size());
|
||||
// memcpy(field.FF.data(), eflags.data(), sizeof(uint32_t) * eflags.size());
|
||||
|
||||
field.V.resize(3, vertices.size());
|
||||
for (uint32_t i = 0; i < vertices.size(); ++i) {
|
||||
@@ -169,17 +157,12 @@ ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
return;
|
||||
}
|
||||
|
||||
const int steps = 2;
|
||||
|
||||
/* Setup mesh boundary constraints if needed */
|
||||
#if 0
|
||||
if (true) { // field.flag_preserve_boundary) {
|
||||
if (field.flag_preserve_boundary) {
|
||||
Hierarchy &mRes = field.hierarchy;
|
||||
mRes.clearConstraints();
|
||||
|
||||
for (uint32_t i = 0; i < 3 * mRes.mF.cols(); ++i) {
|
||||
if (mRes.mFF((i) % 3, i / 3) & QFLOW_CONSTRAINED) {
|
||||
// if (mRes.mE2E[i] == -1) {
|
||||
if (mRes.mE2E[i] == -1) {
|
||||
uint32_t i0 = mRes.mF(i % 3, i / 3);
|
||||
uint32_t i1 = mRes.mF((i + 1) % 3, i / 3);
|
||||
Vector3d p0 = mRes.mV[0].col(i0), p1 = mRes.mV[0].col(i1);
|
||||
@@ -189,20 +172,15 @@ ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
mRes.mCO[0].col(i0) = p0;
|
||||
mRes.mCO[0].col(i1) = p1;
|
||||
mRes.mCQ[0].col(i0) = mRes.mCQ[0].col(i1) = edge;
|
||||
mRes.mCQw[0][i0] = mRes.mCQw[0][i1] = mRes.mCOw[0][i0] = mRes.mCOw[0][i1] = 0.1;
|
||||
mRes.mCQw[0][i0] = mRes.mCQw[0][i1] = mRes.mCOw[0][i0] = mRes.mCOw[0][i1] = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < 10; j++) {
|
||||
mRes.propagateConstraints();
|
||||
}
|
||||
mRes.propagateConstraints();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Optimize the mesh field orientations (tangental field etc) */
|
||||
for (int i = 0; i < steps; i++) {
|
||||
Optimizer::optimize_orientations(field.hierarchy);
|
||||
}
|
||||
Optimizer::optimize_orientations(field.hierarchy);
|
||||
field.ComputeOrientationSingularities();
|
||||
|
||||
if (check_if_canceled(0.3f, update_cb, update_cb_data)) {
|
||||
@@ -217,13 +195,11 @@ ATTR_NO_OPT void QFLOW_quadriflow_remesh(QuadriflowRemeshData *qrd,
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < steps; i++) {
|
||||
Optimizer::optimize_scale(field.hierarchy, field.rho, field.flag_adaptive_scale);
|
||||
}
|
||||
Optimizer::optimize_scale(field.hierarchy, field.rho, field.flag_adaptive_scale);
|
||||
field.flag_adaptive_scale = 1;
|
||||
|
||||
Optimizer::optimize_positions(field.hierarchy, field.flag_adaptive_scale);
|
||||
|
||||
for (int i = 0; i < steps; i++) {
|
||||
Optimizer::optimize_positions(field.hierarchy, field.flag_adaptive_scale);
|
||||
}
|
||||
field.ComputePositionSingularities();
|
||||
|
||||
if (check_if_canceled(0.5f, update_cb, update_cb_data)) {
|
||||
|
@@ -23,16 +23,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum { QFLOW_CONSTRAINED = 1 };
|
||||
|
||||
typedef struct QuadriflowFace {
|
||||
int v[3];
|
||||
char eflag[3];
|
||||
} QuadriflowFace;
|
||||
|
||||
typedef struct QuadriflowRemeshData {
|
||||
float *verts;
|
||||
QuadriflowFace *faces;
|
||||
int *faces;
|
||||
int totfaces;
|
||||
int totverts;
|
||||
|
||||
|
@@ -74,9 +74,8 @@ size_t count_utf_16_from_8(const char *string8)
|
||||
char type = 0;
|
||||
unsigned int u32 = 0;
|
||||
|
||||
if (!string8) {
|
||||
if (!string8)
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (; (u = *string8); string8++) {
|
||||
if (type == 0) {
|
||||
@@ -102,22 +101,22 @@ size_t count_utf_16_from_8(const char *string8)
|
||||
} // 4 utf-8 char
|
||||
continue;
|
||||
}
|
||||
if ((u & 0xC0) == 0x80) {
|
||||
u32 = (u32 << 6) | (u & 0x3F);
|
||||
type--;
|
||||
}
|
||||
else {
|
||||
u32 = 0;
|
||||
type = 0;
|
||||
if ((u & 0xC0) == 0x80) {
|
||||
u32 = (u32 << 6) | (u & 0x3F);
|
||||
type--;
|
||||
}
|
||||
else {
|
||||
u32 = 0;
|
||||
type = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == 0) {
|
||||
if ((0 < u32 && u32 < 0xD800) || (0xE000 <= u32 && u32 < 0x10000)) {
|
||||
if ((0 < u32 && u32 < 0xD800) || (0xE000 <= u32 && u32 < 0x10000))
|
||||
count++;
|
||||
}
|
||||
else if (0x10000 <= u32 && u32 < 0x110000) {
|
||||
else if (0x10000 <= u32 && u32 < 0x110000)
|
||||
count += 2;
|
||||
}
|
||||
u32 = 0;
|
||||
}
|
||||
}
|
||||
@@ -130,9 +129,8 @@ int conv_utf_16_to_8(const wchar_t *in16, char *out8, size_t size8)
|
||||
char *out8end = out8 + size8;
|
||||
wchar_t u = 0;
|
||||
int err = 0;
|
||||
if (!size8 || !in16 || !out8) {
|
||||
if (!size8 || !in16 || !out8)
|
||||
return UTF_ERROR_NULL_IN;
|
||||
}
|
||||
out8end--;
|
||||
|
||||
for (; out8 < out8end && (u = *in16); in16++, out8++) {
|
||||
@@ -140,16 +138,14 @@ int conv_utf_16_to_8(const wchar_t *in16, char *out8, size_t size8)
|
||||
*out8 = u;
|
||||
}
|
||||
else if (u < 0x0800) {
|
||||
if (out8 + 1 >= out8end) {
|
||||
if (out8 + 1 >= out8end)
|
||||
break;
|
||||
}
|
||||
*out8++ = (0x3 << 6) | (0x1F & (u >> 6));
|
||||
*out8 = (0x1 << 7) | (0x3F & (u));
|
||||
}
|
||||
else if (u < 0xD800 || u >= 0xE000) {
|
||||
if (out8 + 2 >= out8end) {
|
||||
if (out8 + 2 >= out8end)
|
||||
break;
|
||||
}
|
||||
*out8++ = (0x7 << 5) | (0xF & (u >> 12));
|
||||
*out8++ = (0x1 << 7) | (0x3F & (u >> 6));
|
||||
*out8 = (0x1 << 7) | (0x3F & (u));
|
||||
@@ -157,19 +153,19 @@ int conv_utf_16_to_8(const wchar_t *in16, char *out8, size_t size8)
|
||||
else if (u < 0xDC00) {
|
||||
wchar_t u2 = *++in16;
|
||||
|
||||
if (!u2) {
|
||||
if (!u2)
|
||||
break;
|
||||
}
|
||||
if (u2 >= 0xDC00 && u2 < 0xE000) {
|
||||
if (out8 + 3 >= out8end) {
|
||||
if (out8 + 3 >= out8end)
|
||||
break;
|
||||
}
|
||||
unsigned int uc = 0x10000 + (u2 - 0xDC00) + ((u - 0xD800) << 10);
|
||||
else {
|
||||
unsigned int uc = 0x10000 + (u2 - 0xDC00) + ((u - 0xD800) << 10);
|
||||
|
||||
*out8++ = (0xF << 4) | (0x7 & (uc >> 18));
|
||||
*out8++ = (0x1 << 7) | (0x3F & (uc >> 12));
|
||||
*out8++ = (0x1 << 7) | (0x3F & (uc >> 6));
|
||||
*out8 = (0x1 << 7) | (0x3F & (uc));
|
||||
*out8++ = (0xF << 4) | (0x7 & (uc >> 18));
|
||||
*out8++ = (0x1 << 7) | (0x3F & (uc >> 12));
|
||||
*out8++ = (0x1 << 7) | (0x3F & (uc >> 6));
|
||||
*out8 = (0x1 << 7) | (0x3F & (uc));
|
||||
}
|
||||
}
|
||||
else {
|
||||
out8--;
|
||||
@@ -184,9 +180,8 @@ int conv_utf_16_to_8(const wchar_t *in16, char *out8, size_t size8)
|
||||
|
||||
*out8 = *out8end = 0;
|
||||
|
||||
if (*in16) {
|
||||
if (*in16)
|
||||
err |= UTF_ERROR_SMALL;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -198,9 +193,8 @@ int conv_utf_8_to_16(const char *in8, wchar_t *out16, size_t size16)
|
||||
unsigned int u32 = 0;
|
||||
wchar_t *out16end = out16 + size16;
|
||||
int err = 0;
|
||||
if (!size16 || !in8 || !out16) {
|
||||
if (!size16 || !in8 || !out16)
|
||||
return UTF_ERROR_NULL_IN;
|
||||
}
|
||||
out16end--;
|
||||
|
||||
for (; out16 < out16end && (u = *in8); in8++) {
|
||||
@@ -229,25 +223,25 @@ int conv_utf_8_to_16(const char *in8, wchar_t *out16, size_t size16)
|
||||
err |= UTF_ERROR_ILLCHAR;
|
||||
continue;
|
||||
}
|
||||
if ((u & 0xC0) == 0x80) {
|
||||
u32 = (u32 << 6) | (u & 0x3F);
|
||||
type--;
|
||||
}
|
||||
else {
|
||||
u32 = 0;
|
||||
type = 0;
|
||||
err |= UTF_ERROR_ILLSEQ;
|
||||
if ((u & 0xC0) == 0x80) {
|
||||
u32 = (u32 << 6) | (u & 0x3F);
|
||||
type--;
|
||||
}
|
||||
else {
|
||||
u32 = 0;
|
||||
type = 0;
|
||||
err |= UTF_ERROR_ILLSEQ;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == 0) {
|
||||
if ((0 < u32 && u32 < 0xD800) || (0xE000 <= u32 && u32 < 0x10000)) {
|
||||
*out16 = u32;
|
||||
out16++;
|
||||
}
|
||||
else if (0x10000 <= u32 && u32 < 0x110000) {
|
||||
if (out16 + 1 >= out16end) {
|
||||
if (out16 + 1 >= out16end)
|
||||
break;
|
||||
}
|
||||
u32 -= 0x10000;
|
||||
*out16 = 0xD800 + (u32 >> 10);
|
||||
out16++;
|
||||
@@ -260,9 +254,8 @@ int conv_utf_8_to_16(const char *in8, wchar_t *out16, size_t size16)
|
||||
|
||||
*out16 = *out16end = 0;
|
||||
|
||||
if (*in8) {
|
||||
if (*in8)
|
||||
err |= UTF_ERROR_SMALL;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -293,9 +286,8 @@ char *alloc_utf_8_from_16(const wchar_t *in16, size_t add)
|
||||
{
|
||||
size_t bsize = count_utf_8_from_16(in16);
|
||||
char *out8 = NULL;
|
||||
if (!bsize) {
|
||||
if (!bsize)
|
||||
return NULL;
|
||||
}
|
||||
out8 = (char *)malloc(sizeof(char) * (bsize + add));
|
||||
conv_utf_16_to_8(in16, out8, bsize);
|
||||
return out8;
|
||||
@@ -305,9 +297,8 @@ wchar_t *alloc_utf16_from_8(const char *in8, size_t add)
|
||||
{
|
||||
size_t bsize = count_utf_16_from_8(in8);
|
||||
wchar_t *out16 = NULL;
|
||||
if (!bsize) {
|
||||
if (!bsize)
|
||||
return NULL;
|
||||
}
|
||||
out16 = (wchar_t *)malloc(sizeof(wchar_t) * (bsize + add));
|
||||
conv_utf_8_to_16(in8, out16, bsize);
|
||||
return out16;
|
||||
|
@@ -17321,58 +17321,6 @@
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:fill markers stroke;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new"
|
||||
d="m 368.30892,141.58547 c -0.27613,4e-5 -0.49997,0.22388 -0.5,0.5 v 1.26473 h -4.76715 v 1.4911 h 4.76715 v 1.24417 c 3e-5,0.27613 0.22387,0.49997 0.5,0.5 0.63583,0.004 3.43318,-0.006 3.9995,-0.006 0.24106,0 0.46127,-0.0485 0.46127,-0.50967 4e-5,-0.85242 -8.9e-4,-2.98571 -8.9e-4,-3.95935 0,-0.30244 -0.19636,-0.51552 -0.46153,-0.51552 -0.82724,0 -3.36276,-0.009 -3.99823,-0.009 v 2e-5 z m 2.30359,-4.68113 -0.005,4.25868 c 0.48989,0.002 1.39549,0.005 1.88538,0.007 0.44541,0.0357 0.71675,0.47423 0.71675,0.85988 -6.6e-4,1.00616 -0.009,2.97018 -0.009,4.15122 0,0.46073 -0.24756,0.84994 -0.6533,0.84994 -0.48399,0.0143 -1.44986,-1.1e-4 -1.93405,-1.6e-4 v 3.87356 l -7.75691,-0.0669 v -14.00001 z"
|
||||
sodipodi:nodetypes="cccccccccccccccccccccccccc" />
|
||||
<g
|
||||
transform="translate(230.76791,210.17135)"
|
||||
style="display:inline;enable-background:new"
|
||||
id="g4087_GP_lineart">
|
||||
<g
|
||||
id="g4082">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path12456-6"
|
||||
mask="none"
|
||||
d="m 198.0253,98.27163 v 1.5 h 1 v -1.5 z m 0,2.5 v 2 h 1 v -2 z m 0,3 v 1.2793 l -2.58594,2.35156 0.67188,0.73828 2.60351,-2.36719 0.49027,-0.002 c 0.82475,0 0.82408,-1 0,-1 h -0.17972 v -1 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.6;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
id="path4185"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.10423;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 207.2397,99.568306 c -0.33768,-0.02992 -0.70751,0.105959 -1.01625,0.406518 l -0.51139,0.495896 c -0.13287,0.12942 -0.13287,0.34092 0,0.47035 l 2.04339,1.98784 c 0.13292,0.12938 0.3479,0.12938 0.48082,0 l 0.50922,-0.49802 c 0.3087,-0.30067 0.44811,-0.65869 0.41741,-0.98755 -0.0307,-0.32884 -0.20718,-0.60186 -0.41741,-0.80663 l -0.67969,-0.661886 c -0.21026,-0.204768 -0.48842,-0.37662 -0.8261,-0.406518 z m -2.31222,1.800554 c -0.0883,9.4e-4 -0.17353,0.0367 -0.23603,0.0979 l -4.25293,4.14168 c -0.0434,0.0426 -0.0749,0.095 -0.0896,0.15324 l -0.67969,2.65189 c -0.0614,0.24217 0.16235,0.46285 0.41088,0.40225 l 2.72308,-0.66402 c 0.0599,-0.0144 0.11363,-0.0428 0.15735,-0.0851 l 4.2551,-4.14382 c 0.13286,-0.12943 0.13286,-0.33881 0,-0.46825 l -2.0434,-1.98784 c -0.0651,-0.0634 -0.15267,-0.0994 -0.24478,-0.0979 z" />
|
||||
<path
|
||||
id="path12458-7"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 198.52539,94.771484 c -0.1326,2.7e-5 -0.25978,0.05272 -0.35351,0.146485 l -3,3 c -0.0938,0.09376 -0.14646,0.220915 -0.14649,0.353515 v 9.999996 c 3e-5,0.27613 0.22387,0.49997 0.5,0.5 h 2.50158 c 0.72806,0 0.76638,-1.01916 0,-1 h -2.00158 v -8.999996 h 9 v 0.186392 c 0,0.766385 1,0.767345 1,0 v -0.47936 l 2,-2 v 0.907841 c 0,0.708905 1,0.709935 1,0 v -2.114873 c -3e-5,-0.276131 -0.22387,-0.499972 -0.5,-0.5 z m 0.20703,1 h 8.58594 l -2,2 h -8.58594 z"
|
||||
sodipodi:nodetypes="ccccccsccccssccsscccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(167.42608,209.69482)"
|
||||
style="display:inline;enable-background:new"
|
||||
id="g7880_GP_lenght">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 224.38607,100.78271 c -0.15574,0.005 -0.30353,0.0699 -0.41211,0.18164 l -2.05673,2.00254 c -0.62065,0.56444 0.28322,1.46831 0.84766,0.84765 l 2.05673,-2.00254 c 0.39088,-0.38144 0.1104,-1.04428 -0.43555,-1.02929 z"
|
||||
id="path15289-7-6"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path15289-7-6-5"
|
||||
d="m 225.6621,95.349988 c -0.67621,-0.0096 -0.67621,1.009611 0,1 h 2.79493 c -1.0479,1.117288 -1.7641,1.668027 -2.82812,2.732043 -0.62065,0.56444 0.28321,1.468319 0.84765,0.847657 1.06063,-1.101282 1.59202,-1.777197 2.68554,-2.870716 v 2.791016 c -0.01,0.676162 1.00956,0.676162 1,0 v -4 c -3e-5,-0.276131 -0.22387,-0.499973 -0.5,-0.5 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path15289-7-6-5-2"
|
||||
d="m 221.03217,109.33958 c 0.67621,0.01 0.67621,-1.00961 0,-1 h -2.79493 c 1.0479,-1.11729 1.7641,-1.66802 2.82812,-2.73204 0.62065,-0.56444 -0.28321,-1.46832 -0.84765,-0.84766 -1.06063,1.10128 -1.59202,1.7772 -2.68554,2.87072 v -2.79102 c 0.01,-0.67616 -1.00956,-0.67616 -1,0 v 4 c 3e-5,0.27613 0.22387,0.49998 0.5,0.5 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</g>
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
||||
d="m 417.92349,304.73964 c -0.7818,-0.0644 -0.86293,1.09626 -0.0796,1.1383 l 0.41758,0.0202 c 0.78182,0.0644 0.86296,-1.09626 0.0796,-1.13831 z m -7.87437,1.29265 c -0.65325,0.42724 0.0163,1.38626 0.65667,0.94062 l 0.34001,-0.23929 c 0.65327,-0.42727 -0.0163,-1.38631 -0.65662,-0.94061 z m 5.26412,-0.10772 c 0.785,-0.0185 0.73895,-1.18175 -0.0451,-1.14009 -0.6811,-0.0652 -1.43225,-0.0213 -2.22341,0.0851 -0.785,0.0185 -0.73896,1.18176 0.0451,1.14011 0.8585,-0.10954 1.60282,-0.14009 2.22342,-0.0852 z m -5.74172,5.34858 c -0.17789,-0.75187 -1.32618,-0.47161 -1.12597,0.27482 -0.008,0.72815 0.18352,1.43475 0.53595,2.12392 0.17789,0.75187 1.32617,0.47159 1.12598,-0.27483 -0.40688,-0.70818 -0.47775,-1.41605 -0.53596,-2.12391 z m 1.14987,4.81425 c 0.55238,0.5479 1.3799,-0.2833 0.81165,-0.81524 l -0.30437,-0.28193 c -0.55238,-0.54789 -1.37991,0.2833 -0.81163,0.81524 z m 2.55883,0.11471 c -0.78112,0.0716 -0.65484,1.22767 0.12391,1.13446 0.79706,0.0708 1.5429,0.0136 2.2124,-0.23372 0.7811,-0.0716 0.65482,-1.22768 -0.12391,-1.13445 -0.66955,0.35373 -1.42049,0.37687 -2.2124,0.23371 z m 4.35036,-1.24066 c 0.39775,-0.66505 -0.63058,-1.23994 -1.00859,-0.56384 l -0.19953,0.36135 c -0.39776,0.66506 0.63057,1.23995 1.00857,0.56383 z m -1.53457,-4.82813 c -0.44444,-0.63566 -1.409,0.0364 -0.94666,0.65956 0.53116,0.53126 0.99257,1.10609 1.28624,1.78569 0.44445,0.63565 1.40902,-0.0364 0.94667,-0.65956 -0.24301,-0.74231 -0.69323,-1.32054 -1.28625,-1.78569 z m -2.73483,-1.49223 c -0.72218,-0.30138 -1.16808,0.7761 -0.43732,1.05681 l 0.39025,0.14758 c 0.7222,0.30141 1.1681,-0.7761 0.43732,-1.0568 z m -7.60223,1.91562 c -0.52109,0.57678 0.37464,1.33651 0.87855,0.74515 l 0.26685,-0.31654 c 0.52111,-0.57679 -0.37465,-1.33654 -0.87854,-0.74516 z m 1.15912,7.09355 c -0.1906,-0.74845 -1.33363,-0.44917 -1.12109,0.29354 l 0.11543,0.39523 c 0.19062,0.74845 1.33365,0.44917 1.12109,-0.29354 z m -0.68592,-4.36328 c -0.0858,-0.76698 -1.25912,-0.62352 -1.15127,0.14077 -0.065,0.75431 -0.008,1.50847 0.28594,2.26232 0.0859,0.76696 1.25912,0.62352 1.15129,-0.14076 -0.28468,-0.81162 -0.29126,-1.53878 -0.28596,-2.26233 z m 1.97398,-4.7241 c -0.77314,0.13162 -0.55483,1.27463 0.21417,1.12135 0.7762,-0.30633 1.5005,-0.42412 2.18687,-0.40397 0.77313,-0.13163 0.55482,-1.27462 -0.21418,-1.12137 -0.74152,0.0229 -1.4733,0.13255 -2.18686,0.40399 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.15052;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:2.2;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new"
|
||||
id="path4101-2-6-9-1_GP_dotdash" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
release/datafiles/icons/brush.sculpt.displacement_smear.dat
Normal file
BIN
release/datafiles/icons/brush.sculpt.displacement_smear.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
release/datafiles/icons/ops.armature.extrude.cursor.dat
Normal file
BIN
release/datafiles/icons/ops.armature.extrude.cursor.dat
Normal file
Binary file not shown.
BIN
release/datafiles/icons/ops.armature.extrude.dat
Normal file
BIN
release/datafiles/icons/ops.armature.extrude.dat
Normal file
Binary file not shown.
BIN
release/datafiles/icons/ops.curve.dupli_extrude_cursor.dat
Normal file
BIN
release/datafiles/icons/ops.curve.dupli_extrude_cursor.dat
Normal file
Binary file not shown.
Submodule release/datafiles/locale updated: 94c39b5832...8a05b618f0
@@ -33,8 +33,8 @@
|
||||
const UserDef U_default = {
|
||||
.versionfile = BLENDER_FILE_VERSION,
|
||||
.subversionfile = BLENDER_FILE_SUBVERSION,
|
||||
.flag = (USER_AUTOSAVE | USER_TOOLTIPS | USER_RELPATHS | USER_RELEASECONFIRM |
|
||||
USER_SCRIPT_AUTOEXEC_DISABLE | USER_NONEGFRAMES),
|
||||
.flag = (USER_AUTOSAVE | USER_TOOLTIPS | USER_SAVE_PREVIEWS | USER_RELPATHS |
|
||||
USER_RELEASECONFIRM | USER_SCRIPT_AUTOEXEC_DISABLE | USER_NONEGFRAMES),
|
||||
.dupflag = USER_DUP_MESH | USER_DUP_CURVE | USER_DUP_SURF | USER_DUP_FONT | USER_DUP_MBALL |
|
||||
USER_DUP_LAMP | USER_DUP_ARM | USER_DUP_ACT | USER_DUP_LIGHTPROBE |
|
||||
USER_DUP_GPENCIL,
|
||||
@@ -231,7 +231,6 @@ const UserDef U_default = {
|
||||
.collection_instance_empty_size = 1.0f,
|
||||
|
||||
.statusbar_flag = STATUSBAR_SHOW_VERSION,
|
||||
.file_preview_type = USER_FILE_PREVIEW_AUTO,
|
||||
|
||||
.runtime =
|
||||
{
|
||||
|
Submodule release/scripts/addons updated: e7f2213435...67f1fbca14
Submodule release/scripts/addons_contrib updated: 42da56aa73...ef6ef414d2
@@ -48,7 +48,6 @@ class SpellChecker:
|
||||
"equi", # equi-angular, etc.
|
||||
"fader",
|
||||
"globbing",
|
||||
"gridded",
|
||||
"haptics",
|
||||
"hasn", # hasn't
|
||||
"hetero",
|
||||
@@ -65,14 +64,12 @@ class SpellChecker:
|
||||
"mplayer",
|
||||
"ons", # add-ons
|
||||
"pong", # ping pong
|
||||
"resumable",
|
||||
"scalable",
|
||||
"shadeless",
|
||||
"shouldn", # shouldn't
|
||||
"smoothen",
|
||||
"spacings",
|
||||
"teleport", "teleporting",
|
||||
"tangency",
|
||||
"vertices",
|
||||
"wasn", # wasn't
|
||||
|
||||
@@ -176,13 +173,11 @@ class SpellChecker:
|
||||
"precalculate",
|
||||
"precomputing",
|
||||
"prefetch",
|
||||
"preload",
|
||||
"premultiply", "premultiplied",
|
||||
"prepass",
|
||||
"prepend",
|
||||
"preprocess", "preprocessing", "preprocessor", "preprocessed",
|
||||
"preprocess", "preprocessing", "preprocessor",
|
||||
"preseek",
|
||||
"preselect", "preselected",
|
||||
"promillage",
|
||||
"pushdown",
|
||||
"raytree",
|
||||
@@ -190,10 +185,8 @@ class SpellChecker:
|
||||
"realtime",
|
||||
"reinject", "reinjected",
|
||||
"rekey",
|
||||
"relink",
|
||||
"remesh",
|
||||
"reprojection", "reproject", "reprojecting",
|
||||
"resample",
|
||||
"resize",
|
||||
"restpose",
|
||||
"resync", "resynced",
|
||||
@@ -233,7 +226,6 @@ class SpellChecker:
|
||||
"todo",
|
||||
"tradeoff",
|
||||
"un",
|
||||
"unadjust", "unadjusted",
|
||||
"unassociate", "unassociated",
|
||||
"unbake",
|
||||
"uncheck",
|
||||
@@ -396,7 +388,6 @@ class SpellChecker:
|
||||
"boid", "boids",
|
||||
"ceil",
|
||||
"compressibility",
|
||||
"coplanar",
|
||||
"curvilinear",
|
||||
"equiangular",
|
||||
"equisolid",
|
||||
@@ -405,7 +396,6 @@ class SpellChecker:
|
||||
"gettext",
|
||||
"hashable",
|
||||
"hotspot",
|
||||
"hydrostatic",
|
||||
"interocular",
|
||||
"intrinsics",
|
||||
"irradiance",
|
||||
@@ -505,7 +495,6 @@ class SpellChecker:
|
||||
"perlin",
|
||||
"phong",
|
||||
"pinlight",
|
||||
"posterize",
|
||||
"qi",
|
||||
"radiosity",
|
||||
"raycast", "raycasting",
|
||||
|
@@ -22,7 +22,6 @@
|
||||
# Export Functions
|
||||
|
||||
__all__ = (
|
||||
"_init_properties_from_data", # Shared with gizmo default property initialization.
|
||||
"keyconfig_export_as_data",
|
||||
"keyconfig_import_from_data",
|
||||
"keyconfig_init_from_data",
|
||||
@@ -63,11 +62,16 @@ def kmi_args_as_data(kmi):
|
||||
if kmi.any:
|
||||
s.append("\"any\": True")
|
||||
else:
|
||||
for attr in ("shift", "ctrl", "alt", "oskey"):
|
||||
if mod := getattr(kmi, attr):
|
||||
s.append(f"\"{attr:s}\": " + ("-1" if mod == -1 else "True"))
|
||||
if (mod := kmi.key_modifier) and (mod != 'NONE'):
|
||||
s.append(f"\"key_modifier\": '{mod:s}'")
|
||||
if kmi.shift:
|
||||
s.append("\"shift\": True")
|
||||
if kmi.ctrl:
|
||||
s.append("\"ctrl\": True")
|
||||
if kmi.alt:
|
||||
s.append("\"alt\": True")
|
||||
if kmi.oskey:
|
||||
s.append("\"oskey\": True")
|
||||
if kmi.key_modifier and kmi.key_modifier != 'NONE':
|
||||
s.append(f"\"key_modifier\": '{kmi.key_modifier}'")
|
||||
|
||||
if kmi.repeat:
|
||||
if (
|
||||
@@ -240,24 +244,20 @@ def keyconfig_export_as_data(wm, kc, filepath, *, all_keymaps=False):
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Import Functions
|
||||
#
|
||||
# NOTE: unlike export, this runs on startup.
|
||||
# Take care making changes that could impact performance.
|
||||
|
||||
def _init_properties_from_data(base_props, base_value):
|
||||
assert(type(base_value) is list)
|
||||
for attr, value in base_value:
|
||||
if type(value) is list:
|
||||
base_props.property_unset(attr)
|
||||
props = getattr(base_props, attr)
|
||||
_init_properties_from_data(props, value)
|
||||
else:
|
||||
try:
|
||||
setattr(base_props, attr, value)
|
||||
except AttributeError:
|
||||
print(f"Warning: property '{attr}' not found in item '{base_props.__class__.__name__}'")
|
||||
except Exception as ex:
|
||||
print(f"Warning: {ex!r}")
|
||||
def _kmi_props_setattr(kmi_props, attr, value):
|
||||
if type(value) is list:
|
||||
kmi_subprop = getattr(kmi_props, attr)
|
||||
for subattr, subvalue in value:
|
||||
_kmi_props_setattr(kmi_subprop, subattr, subvalue)
|
||||
return
|
||||
|
||||
try:
|
||||
setattr(kmi_props, attr, value)
|
||||
except AttributeError:
|
||||
print(f"Warning: property '{attr}' not found in keymap item '{kmi_props.__class__.__name__}'")
|
||||
except Exception as ex:
|
||||
print(f"Warning: {ex!r}")
|
||||
|
||||
|
||||
def keymap_init_from_data(km, km_items, is_modal=False):
|
||||
@@ -271,7 +271,8 @@ def keymap_init_from_data(km, km_items, is_modal=False):
|
||||
if kmi_props_data is not None:
|
||||
kmi_props = kmi.properties
|
||||
assert type(kmi_props_data) is list
|
||||
_init_properties_from_data(kmi_props, kmi_props_data)
|
||||
for attr, value in kmi_props_data:
|
||||
_kmi_props_setattr(kmi_props, attr, value)
|
||||
|
||||
|
||||
def keyconfig_init_from_data(kc, keyconfig_data):
|
||||
|
@@ -859,7 +859,6 @@ def register_tool(tool_cls, *, after=None, separator=False, group=False):
|
||||
"icon": getattr(tool_cls, "bl_icon", None),
|
||||
"cursor": getattr(tool_cls, "bl_cursor", None),
|
||||
"widget": getattr(tool_cls, "bl_widget", None),
|
||||
"widget_properties": getattr(tool_cls, "bl_widget_properties", None),
|
||||
"keymap": getattr(tool_cls, "bl_keymap", None),
|
||||
"data_block": getattr(tool_cls, "bl_data_block", None),
|
||||
"operator": getattr(tool_cls, "bl_operator", None),
|
||||
|
@@ -199,12 +199,10 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
|
||||
subrow = sub.row()
|
||||
subrow.scale_x = 0.75
|
||||
subrow.prop(kmi, "any", toggle=True)
|
||||
# Use `*_ui` properties as integers aren't practical.
|
||||
subrow.prop(kmi, "shift_ui", toggle=True)
|
||||
subrow.prop(kmi, "ctrl_ui", toggle=True)
|
||||
subrow.prop(kmi, "alt_ui", toggle=True)
|
||||
subrow.prop(kmi, "oskey_ui", text="Cmd", toggle=True)
|
||||
|
||||
subrow.prop(kmi, "shift", toggle=True)
|
||||
subrow.prop(kmi, "ctrl", toggle=True)
|
||||
subrow.prop(kmi, "alt", toggle=True)
|
||||
subrow.prop(kmi, "oskey", text="Cmd", toggle=True)
|
||||
subrow.prop(kmi, "key_modifier", text="", event=True)
|
||||
|
||||
# Operator properties
|
||||
|
@@ -47,7 +47,6 @@ url_manual_mapping = (
|
||||
("bpy.types.fluiddomainsettings.sndparticle_potential_min_wavecrest*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-min-wavecrest"),
|
||||
("bpy.types.movietrackingsettings.refine_intrinsics_principal_point*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-refine-intrinsics-principal-point"),
|
||||
("bpy.types.cyclesrenderlayersettings.denoising_optix_input_passes*", "render/layers/denoising.html#bpy-types-cyclesrenderlayersettings-denoising-optix-input-passes"),
|
||||
("bpy.types.sequencertoolsettings.use_snap_current_frame_to_strips*", "video_editing/sequencer/editing.html#bpy-types-sequencertoolsettings-use-snap-current-frame-to-strips"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_potential_max_energy*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-max-energy"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_potential_min_energy*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-min-energy"),
|
||||
("bpy.types.movietrackingsettings.refine_intrinsics_focal_length*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-refine-intrinsics-focal-length"),
|
||||
@@ -57,7 +56,6 @@ url_manual_mapping = (
|
||||
("bpy.types.fluiddomainsettings.sndparticle_sampling_wavecrest*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-sampling-wavecrest"),
|
||||
("bpy.types.rigidbodyconstraint.use_override_solver_iterations*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-use-override-solver-iterations"),
|
||||
("bpy.types.toolsettings.use_transform_correct_face_attributes*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-transform-correct-face-attributes"),
|
||||
("bpy.types.rendersettings.use_sequencer_override_scene_strip*", "video_editing/preview/sidebar.html#bpy-types-rendersettings-use-sequencer-override-scene-strip"),
|
||||
("bpy.types.toolsettings.use_transform_correct_keep_connected*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-transform-correct-keep-connected"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_potential_radius*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-radius"),
|
||||
("bpy.types.fluiddomainsettings.openvdb_cache_compress_type*", "physics/fluid/type/domain/cache.html#bpy-types-fluiddomainsettings-openvdb-cache-compress-type"),
|
||||
@@ -67,8 +65,6 @@ url_manual_mapping = (
|
||||
("bpy.types.fluiddomainsettings.vector_scale_with_magnitude*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-vector-scale-with-magnitude"),
|
||||
("bpy.types.movietrackingstabilization.use_2d_stabilization*", "movie_clip/tracking/clip/sidebar/stabilization/panel.html#bpy-types-movietrackingstabilization-use-2d-stabilization"),
|
||||
("bpy.types.spacespreadsheet.display_context_path_collapsed*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-display-context-path-collapsed"),
|
||||
("bpy.types.toolsettings.annotation_stroke_placement_view2d*", "interface/annotate_tool.html#bpy-types-toolsettings-annotation-stroke-placement-view2d"),
|
||||
("bpy.types.toolsettings.annotation_stroke_placement_view3d*", "interface/annotate_tool.html#bpy-types-toolsettings-annotation-stroke-placement-view3d"),
|
||||
("bpy.types.fluiddomainsettings.use_collision_border_front*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-use-collision-border-front"),
|
||||
("bpy.types.fluiddomainsettings.use_collision_border_right*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-use-collision-border-right"),
|
||||
("bpy.types.cyclesobjectsettings.use_adaptive_subdivision*", "render/cycles/object_settings/adaptive_subdiv.html#bpy-types-cyclesobjectsettings-use-adaptive-subdivision"),
|
||||
@@ -89,15 +85,11 @@ url_manual_mapping = (
|
||||
("bpy.types.fluiddomainsettings.sndparticle_bubble_drag*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-bubble-drag"),
|
||||
("bpy.types.linestylegeometrymodifier_backbonestretcher*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/backbone_stretcher.html#bpy-types-linestylegeometrymodifier-backbonestretcher"),
|
||||
("bpy.types.linestylegeometrymodifier_sinusdisplacement*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/sinus_displacement.html#bpy-types-linestylegeometrymodifier-sinusdisplacement"),
|
||||
("bpy.types.sequencertoolsettings.snap_to_current_frame*", "video_editing/sequencer/editing.html#bpy-types-sequencertoolsettings-snap-to-current-frame"),
|
||||
("bpy.types.colormanageddisplaysettings.display_device*", "render/color_management.html#bpy-types-colormanageddisplaysettings-display-device"),
|
||||
("bpy.types.colormanagedviewsettings.use_curve_mapping*", "render/color_management.html#bpy-types-colormanagedviewsettings-use-curve-mapping"),
|
||||
("bpy.types.fluiddomainsettings.color_ramp_field_scale*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-color-ramp-field-scale"),
|
||||
("bpy.types.fluiddomainsettings.use_adaptive_timesteps*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-use-adaptive-timesteps"),
|
||||
("bpy.types.fluiddomainsettings.use_dissolve_smoke_log*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-use-dissolve-smoke-log"),
|
||||
("bpy.types.gpencillayer.annotation_onion_before_color*", "interface/annotate_tool.html#bpy-types-gpencillayer-annotation-onion-before-color"),
|
||||
("bpy.types.gpencillayer.annotation_onion_before_range*", "interface/annotate_tool.html#bpy-types-gpencillayer-annotation-onion-before-range"),
|
||||
("bpy.types.gpencillayer.use_annotation_onion_skinning*", "interface/annotate_tool.html#bpy-types-gpencillayer-use-annotation-onion-skinning"),
|
||||
("bpy.types.greasepencil.use_adaptive_curve_resolution*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-use-adaptive-curve-resolution"),
|
||||
("bpy.types.linestylegeometrymodifier_polygonalization*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/polygonization.html#bpy-types-linestylegeometrymodifier-polygonalization"),
|
||||
("bpy.types.toolsettings.use_gpencil_automerge_strokes*", "grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-automerge-strokes"),
|
||||
@@ -110,13 +102,10 @@ url_manual_mapping = (
|
||||
("bpy.types.fluiddomainsettings.gridlines_lower_bound*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-gridlines-lower-bound"),
|
||||
("bpy.types.fluiddomainsettings.gridlines_range_color*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-gridlines-range-color"),
|
||||
("bpy.types.fluiddomainsettings.gridlines_upper_bound*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-gridlines-upper-bound"),
|
||||
("bpy.types.gpencillayer.annotation_onion_after_color*", "interface/annotate_tool.html#bpy-types-gpencillayer-annotation-onion-after-color"),
|
||||
("bpy.types.gpencillayer.annotation_onion_after_range*", "interface/annotate_tool.html#bpy-types-gpencillayer-annotation-onion-after-range"),
|
||||
("bpy.types.materialgpencilstyle.use_fill_texture_mix*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-fill-texture-mix"),
|
||||
("bpy.types.rendersettings_simplify_gpencil_shader_fx*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-shader-fx"),
|
||||
("bpy.types.rendersettings_simplify_gpencil_view_fill*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-view-fill"),
|
||||
("bpy.types.sequencertoolsettings.snap_to_hold_offset*", "video_editing/sequencer/editing.html#bpy-types-sequencertoolsettings-snap-to-hold-offset"),
|
||||
("bpy.types.spacesequenceeditor.waveform_display_type*", "editors/video_sequencer/sequencer/display.html#bpy-types-spacesequenceeditor-waveform-display-type"),
|
||||
("bpy.types.spacesequenceeditor.waveform_display_type*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-waveform-display-type"),
|
||||
("bpy.types.toolsettings.use_mesh_automerge_and_split*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-mesh-automerge-and-split"),
|
||||
("bpy.types.brush.cloth_constraint_softbody_strength*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-constraint-softbody-strength"),
|
||||
("bpy.types.brush.elastic_deform_volume_preservation*", "sculpt_paint/sculpting/tools/elastic_deform.html#bpy-types-brush-elastic-deform-volume-preservation"),
|
||||
@@ -156,11 +145,9 @@ url_manual_mapping = (
|
||||
("bpy.types.materialgpencilstyle.use_stroke_holdout*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-stroke-holdout"),
|
||||
("bpy.types.movietrackingsettings.use_tripod_solver*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-use-tripod-solver"),
|
||||
("bpy.types.rendersettings.use_high_quality_normals*", "render/eevee/render_settings/performance.html#bpy-types-rendersettings-use-high-quality-normals"),
|
||||
("bpy.types.sequencertoolsettings.snap_ignore_muted*", "video_editing/sequencer/editing.html#bpy-types-sequencertoolsettings-snap-ignore-muted"),
|
||||
("bpy.types.sequencertoolsettings.snap_ignore_sound*", "video_editing/sequencer/editing.html#bpy-types-sequencertoolsettings-snap-ignore-sound"),
|
||||
("bpy.types.spaceoutliner.use_filter_case_sensitive*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-case-sensitive"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_content*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-content"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_duration*", "editors/video_sequencer/sequencer/display.html#bpy-types-spacesequenceeditor-show-strip-duration"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_duration*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-duration"),
|
||||
("bpy.types.toolsettings.use_proportional_connected*", "editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-use-proportional-connected"),
|
||||
("bpy.types.toolsettings.use_proportional_projected*", "editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-use-proportional-projected"),
|
||||
("bpy.types.view3doverlay.vertex_paint_mode_opacity*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-vertex-paint-mode-opacity"),
|
||||
@@ -169,7 +156,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.gpencil.vertex_color_brightness_contrast*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-vertex-color-brightness-contrast"),
|
||||
("bpy.ops.view3d.edit_mesh_extrude_individual_move*", "modeling/meshes/editing/face/extrude_faces.html#bpy-ops-view3d-edit-mesh-extrude-individual-move"),
|
||||
("bpy.ops.view3d.edit_mesh_extrude_manifold_normal*", "modeling/meshes/tools/extrude_manifold.html#bpy-ops-view3d-edit-mesh-extrude-manifold-normal"),
|
||||
("bpy.types.cyclesobjectsettings.use_distance_cull*", "render/cycles/object_settings/object_data.html#bpy-types-cyclesobjectsettings-use-distance-cull"),
|
||||
("bpy.types.cyclesrendersettings.ao_bounces_render*", "render/cycles/render_settings/light_paths.html#bpy-types-cyclesrendersettings-ao-bounces-render"),
|
||||
("bpy.types.cyclesrendersettings.use_distance_cull*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-use-distance-cull"),
|
||||
("bpy.types.fluiddomainsettings.cache_frame_offset*", "physics/fluid/type/domain/cache.html#bpy-types-fluiddomainsettings-cache-frame-offset"),
|
||||
@@ -194,7 +180,6 @@ url_manual_mapping = (
|
||||
("bpy.types.spacedopesheeteditor.show_pose_markers*", "animation/markers.html#bpy-types-spacedopesheeteditor-show-pose-markers"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_camera*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-camera"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_others*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-others"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_overlay*", "editors/video_sequencer/sequencer/display.html#bpy-types-spacesequenceeditor-show-strip-overlay"),
|
||||
("bpy.types.toolsettings.proportional_edit_falloff*", "editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-proportional-edit-falloff"),
|
||||
("bpy.types.toolsettings.use_edge_path_live_unwrap*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-edge-path-live-unwrap"),
|
||||
("bpy.types.toolsettings.use_gpencil_draw_additive*", "grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-draw-additive"),
|
||||
@@ -229,8 +214,8 @@ url_manual_mapping = (
|
||||
("bpy.types.spaceoutliner.use_filter_object_empty*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-empty"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_light*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-light"),
|
||||
("bpy.types.spacesequenceeditor.proxy_render_size*", "video_editing/preview/sidebar.html#bpy-types-spacesequenceeditor-proxy-render-size"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_offset*", "editors/video_sequencer/sequencer/display.html#bpy-types-spacesequenceeditor-show-strip-offset"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_source*", "editors/video_sequencer/sequencer/display.html#bpy-types-spacesequenceeditor-show-strip-source"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_offset*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-offset"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_source*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-source"),
|
||||
("bpy.types.spacespreadsheetrowfilter.column_name*", "editors/spreadsheet.html#bpy-types-spacespreadsheetrowfilter-column-name"),
|
||||
("bpy.types.toolsettings.gpencil_stroke_placement*", "grease_pencil/modes/draw/stroke_placement.html#bpy-types-toolsettings-gpencil-stroke-placement"),
|
||||
("bpy.types.toolsettings.use_keyframe_cycle_aware*", "editors/timeline.html#bpy-types-toolsettings-use-keyframe-cycle-aware"),
|
||||
@@ -238,7 +223,6 @@ url_manual_mapping = (
|
||||
("bpy.types.viewlayer.use_pass_cryptomatte_object*", "render/layers/passes.html#bpy-types-viewlayer-use-pass-cryptomatte-object"),
|
||||
("bpy.ops.armature.rigify_apply_selection_colors*", "addons/rigging/rigify/metarigs.html#bpy-ops-armature-rigify-apply-selection-colors"),
|
||||
("bpy.types.brushgpencilsettings.fill_layer_mode*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-layer-mode"),
|
||||
("bpy.types.cyclesobjectsettings.use_camera_cull*", "render/cycles/object_settings/object_data.html#bpy-types-cyclesobjectsettings-use-camera-cull"),
|
||||
("bpy.types.cyclesrendersettings.use_camera_cull*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-use-camera-cull"),
|
||||
("bpy.types.editbone.bbone_handle_use_ease_start*", "animation/armatures/bones/properties/bendy_bones.html#bpy-types-editbone-bbone-handle-use-ease-start"),
|
||||
("bpy.types.fluiddomainsettings.color_ramp_field*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-color-ramp-field"),
|
||||
@@ -248,7 +232,7 @@ url_manual_mapping = (
|
||||
("bpy.types.linestylegeometrymodifier_tipremover*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/tip_remover.html#bpy-types-linestylegeometrymodifier-tipremover"),
|
||||
("bpy.types.movieclipuser.use_render_undistorted*", "editors/clip/display/clip_display.html#bpy-types-movieclipuser-use-render-undistorted"),
|
||||
("bpy.types.movietrackingcamera.distortion_model*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-distortion-model"),
|
||||
("bpy.types.rendersettings.resolution_percentage*", "render/output/properties/format.html#bpy-types-rendersettings-resolution-percentage"),
|
||||
("bpy.types.rendersettings.resolution_percentage*", "render/output/properties/dimensions.html#bpy-types-rendersettings-resolution-percentage"),
|
||||
("bpy.types.rendersettings_simplify_gpencil_tint*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-tint"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_mesh*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-mesh"),
|
||||
("bpy.types.spaceoutliner.use_filter_view_layers*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-view-layers"),
|
||||
@@ -283,7 +267,6 @@ url_manual_mapping = (
|
||||
("bpy.types.linestylegeometrymodifier_blueprint*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/blueprint.html#bpy-types-linestylegeometrymodifier-blueprint"),
|
||||
("bpy.types.materialgpencilstyle.alignment_mode*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-alignment-mode"),
|
||||
("bpy.types.particlesettings.use_modifier_stack*", "physics/particles/emitter/emission.html#bpy-types-particlesettings-use-modifier-stack"),
|
||||
("bpy.types.rendersettings.sequencer_gl_preview*", "video_editing/preview/sidebar.html#bpy-types-rendersettings-sequencer-gl-preview"),
|
||||
("bpy.types.rendersettings.simplify_subdivision*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-subdivision"),
|
||||
("bpy.types.spacegrapheditor.show_extrapolation*", "editors/graph_editor/introduction.html#bpy-types-spacegrapheditor-show-extrapolation"),
|
||||
("bpy.types.spaceoutliner.use_filter_collection*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-collection"),
|
||||
@@ -291,7 +274,7 @@ url_manual_mapping = (
|
||||
("bpy.types.spacesequenceeditor.show_annotation*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-annotation"),
|
||||
("bpy.types.spacesequenceeditor.show_region_hud*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-region-hud"),
|
||||
("bpy.types.spacesequenceeditor.show_safe_areas*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-safe-areas"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_name*", "editors/video_sequencer/sequencer/display.html#bpy-types-spacesequenceeditor-show-strip-name"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_name*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-name"),
|
||||
("bpy.types.spacespreadsheet.show_only_selected*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-show-only-selected"),
|
||||
("bpy.types.spacespreadsheetrowfilter.operation*", "editors/spreadsheet.html#bpy-types-spacespreadsheetrowfilter-operation"),
|
||||
("bpy.types.spacespreadsheetrowfilter.threshold*", "editors/spreadsheet.html#bpy-types-spacespreadsheetrowfilter-threshold"),
|
||||
@@ -330,7 +313,6 @@ url_manual_mapping = (
|
||||
("bpy.types.linestylegeometrymodifier_sampling*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/sampling.html#bpy-types-linestylegeometrymodifier-sampling"),
|
||||
("bpy.types.nodesocketinterface*.default_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-default-value"),
|
||||
("bpy.types.rendersettings.use_persistent_data*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-use-persistent-data"),
|
||||
("bpy.types.sequencertoolsettings.overlap_mode*", "video_editing/sequencer/editing.html#bpy-types-sequencertoolsettings-overlap-mode"),
|
||||
("bpy.types.spaceclipeditor.show_green_channel*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-show-green-channel"),
|
||||
("bpy.types.spaceoutliner.show_restrict_column*", "editors/outliner/interface.html#bpy-types-spaceoutliner-show-restrict-column"),
|
||||
("bpy.types.spacespreadsheet.object_eval_state*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-object-eval-state"),
|
||||
@@ -357,10 +339,10 @@ url_manual_mapping = (
|
||||
("bpy.types.materialgpencilstyle.stroke_style*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-stroke-style"),
|
||||
("bpy.types.objectlineart.use_crease_override*", "scene_layout/object/properties/line_art.html#bpy-types-objectlineart-use-crease-override"),
|
||||
("bpy.types.rendersettings.preview_pixel_size*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-preview-pixel-size"),
|
||||
("bpy.types.rendersettings.use_crop_to_border*", "render/output/properties/format.html#bpy-types-rendersettings-use-crop-to-border"),
|
||||
("bpy.types.rendersettings.use_crop_to_border*", "render/output/properties/dimensions.html#bpy-types-rendersettings-use-crop-to-border"),
|
||||
("bpy.types.rendersettings.use_file_extension*", "render/output/properties/output.html#bpy-types-rendersettings-use-file-extension"),
|
||||
("bpy.types.sculpt.constant_detail_resolution*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-constant-detail-resolution"),
|
||||
("bpy.types.spaceclipeditor.annotation_source*", "movie_clip/tracking/clip/sidebar/view.html#bpy-types-spaceclipeditor-annotation-source"),
|
||||
("bpy.types.spaceclipeditor.annotation_source*", "movie_clip/tracking/clip/sidebar/annotation.html#bpy-types-spaceclipeditor-annotation-source"),
|
||||
("bpy.types.spaceclipeditor.show_blue_channel*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-show-blue-channel"),
|
||||
("bpy.types.spaceoutliner.use_filter_children*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-children"),
|
||||
("bpy.types.spaceoutliner.use_filter_complete*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-complete"),
|
||||
@@ -406,7 +388,7 @@ url_manual_mapping = (
|
||||
("bpy.types.spaceclipeditor.show_red_channel*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-show-red-channel"),
|
||||
("bpy.types.spaceclipeditor.use_mute_footage*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-use-mute-footage"),
|
||||
("bpy.types.spacesequenceeditor.overlay_type*", "video_editing/preview/sidebar.html#bpy-types-spacesequenceeditor-overlay-type"),
|
||||
("bpy.types.spacesequenceeditor.show_fcurves*", "editors/video_sequencer/sequencer/display.html#bpy-types-spacesequenceeditor-show-fcurves"),
|
||||
("bpy.types.spacesequenceeditor.show_fcurves*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-fcurves"),
|
||||
("bpy.types.spaceuveditor.sticky_select_mode*", "editors/uv/selecting.html#bpy-types-spaceuveditor-sticky-select-mode"),
|
||||
("bpy.types.spaceview3d.show_object_viewport*", "editors/3dview/display/visibility.html#bpy-types-spaceview3d-show-object-viewport"),
|
||||
("bpy.types.view3doverlay.show_fade_inactive*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-show-fade-inactive"),
|
||||
@@ -414,7 +396,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.clip.stabilize_2d_rotation_select*", "movie_clip/tracking/clip/selecting.html#bpy-ops-clip-stabilize-2d-rotation-select"),
|
||||
("bpy.ops.constraint.disable_keep_transform*", "animation/constraints/interface/common.html#bpy-ops-constraint-disable-keep-transform"),
|
||||
("bpy.ops.gpencil.stroke_reset_vertex_color*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-stroke-reset-vertex-color"),
|
||||
("bpy.ops.object.modifier_apply_as_shapekey*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-apply-as-shapekey"),
|
||||
("bpy.ops.object.vertex_group_normalize_all*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize-all"),
|
||||
("bpy.ops.outliner.collection_color_tag_set*", "editors/outliner/editing.html#bpy-ops-outliner-collection-color-tag-set"),
|
||||
("bpy.ops.outliner.collection_enable_render*", "editors/outliner/editing.html#bpy-ops-outliner-collection-enable-render"),
|
||||
@@ -436,7 +417,6 @@ url_manual_mapping = (
|
||||
("bpy.types.fluidflowsettings.flow_behavior*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-flow-behavior"),
|
||||
("bpy.types.fluidflowsettings.noise_texture*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-noise-texture"),
|
||||
("bpy.types.geometrynodeattributevectormath*", "modeling/geometry_nodes/attribute/attribute_vector_math.html#bpy-types-geometrynodeattributevectormath"),
|
||||
("bpy.types.gpencillayer.annotation_opacity*", "interface/annotate_tool.html#bpy-types-gpencillayer-annotation-opacity"),
|
||||
("bpy.types.gpencillayer.use_onion_skinning*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-use-onion-skinning"),
|
||||
("bpy.types.gpencilsculptguide.use_snapping*", "grease_pencil/modes/draw/guides.html#bpy-types-gpencilsculptguide-use-snapping"),
|
||||
("bpy.types.gpencilsculptsettings.lock_axis*", "grease_pencil/modes/draw/drawing_planes.html#bpy-types-gpencilsculptsettings-lock-axis"),
|
||||
@@ -463,7 +443,6 @@ url_manual_mapping = (
|
||||
("bpy.types.toolsettings.gpencil_selectmode*", "grease_pencil/selecting.html#bpy-types-toolsettings-gpencil-selectmode"),
|
||||
("bpy.types.toolsettings.use_auto_normalize*", "sculpt_paint/weight_paint/tool_settings/options.html#bpy-types-toolsettings-use-auto-normalize"),
|
||||
("bpy.types.toolsettings.use_mesh_automerge*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-mesh-automerge"),
|
||||
("bpy.types.toolsettings.use_snap_sequencer*", "video_editing/sequencer/editing.html#bpy-types-toolsettings-use-snap-sequencer"),
|
||||
("bpy.types.toolsettings.use_snap_translate*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-translate"),
|
||||
("bpy.types.toolsettings.use_uv_select_sync*", "editors/uv/selecting.html#bpy-types-toolsettings-use-uv-select-sync"),
|
||||
("bpy.types.view3doverlay.wireframe_opacity*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-wireframe-opacity"),
|
||||
@@ -490,6 +469,7 @@ url_manual_mapping = (
|
||||
("bpy.types.fluiddomainsettings.flip_ratio*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-flip-ratio"),
|
||||
("bpy.types.fluiddomainsettings.guide_beta*", "physics/fluid/type/domain/guides.html#bpy-types-fluiddomainsettings-guide-beta"),
|
||||
("bpy.types.fluiddomainsettings.mesh_scale*", "physics/fluid/type/domain/liquid/mesh.html#bpy-types-fluiddomainsettings-mesh-scale"),
|
||||
("bpy.types.fluiddomainsettings.noise_type*", "physics/fluid/type/domain/gas/noise.html#bpy-types-fluiddomainsettings-noise-type"),
|
||||
("bpy.types.fluiddomainsettings.slice_axis*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-slice-axis"),
|
||||
("bpy.types.fluiddomainsettings.time_scale*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-time-scale"),
|
||||
("bpy.types.fluidflowsettings.texture_size*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-texture-size"),
|
||||
@@ -554,7 +534,7 @@ url_manual_mapping = (
|
||||
("bpy.types.fluidflowsettings.smoke_color*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-smoke-color"),
|
||||
("bpy.types.fluidflowsettings.temperature*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-temperature"),
|
||||
("bpy.types.fluidflowsettings.use_texture*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-use-texture"),
|
||||
("bpy.types.fmodifierenvelopecontrolpoint*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierenvelopecontrolpoint"),
|
||||
("bpy.types.fmodifierenvelopecontrolpoint*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifierenvelopecontrolpoint"),
|
||||
("bpy.types.geometrynodeattributecurvemap*", "modeling/geometry_nodes/attribute/attribute_curve_map.html#bpy-types-geometrynodeattributecurvemap"),
|
||||
("bpy.types.geometrynodeattributemaprange*", "modeling/geometry_nodes/attribute/attribute_map_range.html#bpy-types-geometrynodeattributemaprange"),
|
||||
("bpy.types.geometrynodeattributetransfer*", "modeling/geometry_nodes/attribute/attribute_transfer.html#bpy-types-geometrynodeattributetransfer"),
|
||||
@@ -563,15 +543,13 @@ url_manual_mapping = (
|
||||
("bpy.types.material.use_sss_translucency*", "render/eevee/materials/settings.html#bpy-types-material-use-sss-translucency"),
|
||||
("bpy.types.movietrackingcamera.principal*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-principal"),
|
||||
("bpy.types.object.use_camera_lock_parent*", "scene_layout/object/properties/relations.html#bpy-types-object-use-camera-lock-parent"),
|
||||
("bpy.types.object.visible_volume_scatter*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-volume-scatter"),
|
||||
("bpy.types.rendersettings.pixel_aspect_x*", "render/output/properties/format.html#bpy-types-rendersettings-pixel-aspect-x"),
|
||||
("bpy.types.rendersettings.pixel_aspect_y*", "render/output/properties/format.html#bpy-types-rendersettings-pixel-aspect-y"),
|
||||
("bpy.types.rendersettings.pixel_aspect_x*", "render/output/properties/dimensions.html#bpy-types-rendersettings-pixel-aspect-x"),
|
||||
("bpy.types.rendersettings.pixel_aspect_y*", "render/output/properties/dimensions.html#bpy-types-rendersettings-pixel-aspect-y"),
|
||||
("bpy.types.rigidbodyconstraint.use_limit*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-use-limit"),
|
||||
("bpy.types.sceneeevee.taa_render_samples*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-taa-render-samples"),
|
||||
("bpy.types.spaceoutliner.use_sync_select*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-sync-select"),
|
||||
("bpy.types.spaceproperties.outliner_sync*", "editors/properties_editor.html#bpy-types-spaceproperties-outliner-sync"),
|
||||
("bpy.types.spaceproperties.search_filter*", "editors/properties_editor.html#bpy-types-spaceproperties-search-filter"),
|
||||
("bpy.types.spacesequenceeditor.view_type*", "editors/video_sequencer/introduction.html#bpy-types-spacesequenceeditor-view-type"),
|
||||
("bpy.types.spacetexteditor.margin_column*", "editors/text_editor.html#bpy-types-spacetexteditor-margin-column"),
|
||||
("bpy.types.spacetexteditor.use_find_wrap*", "editors/text_editor.html#bpy-types-spacetexteditor-use-find-wrap"),
|
||||
("bpy.types.spaceuveditor.pixel_snap_mode*", "modeling/meshes/uv/editing.html#bpy-types-spaceuveditor-pixel-snap-mode"),
|
||||
@@ -608,10 +586,9 @@ url_manual_mapping = (
|
||||
("bpy.types.material.preview_render_type*", "render/materials/preview.html#bpy-types-material-preview-render-type"),
|
||||
("bpy.types.materialgpencilstyle.pattern*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-pattern"),
|
||||
("bpy.types.materialgpencilstyle.texture*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-texture"),
|
||||
("bpy.types.modifier.use_apply_on_spline*", "modeling/modifiers/introduction.html#bpy-types-modifier-use-apply-on-spline"),
|
||||
("bpy.types.object.use_empty_image_alpha*", "modeling/empties.html#bpy-types-object-use-empty-image-alpha"),
|
||||
("bpy.types.rendersettings.frame_map_new*", "render/output/properties/frame_range.html#bpy-types-rendersettings-frame-map-new"),
|
||||
("bpy.types.rendersettings.frame_map_old*", "render/output/properties/frame_range.html#bpy-types-rendersettings-frame-map-old"),
|
||||
("bpy.types.rendersettings.frame_map_new*", "render/output/properties/dimensions.html#bpy-types-rendersettings-frame-map-new"),
|
||||
("bpy.types.rendersettings.frame_map_old*", "render/output/properties/dimensions.html#bpy-types-rendersettings-frame-map-old"),
|
||||
("bpy.types.rendersettings.use_overwrite*", "render/output/properties/output.html#bpy-types-rendersettings-use-overwrite"),
|
||||
("bpy.types.rendersettings.use_sequencer*", "render/output/properties/post_processing.html#bpy-types-rendersettings-use-sequencer"),
|
||||
("bpy.types.sceneeevee.volumetric_shadow*", "render/eevee/render_settings/volumetrics.html#bpy-types-sceneeevee-volumetric-shadow"),
|
||||
@@ -636,7 +613,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.mesh.primitive_ico_sphere_add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-ico-sphere-add"),
|
||||
("bpy.ops.object.gpencil_modifier_apply*", "grease_pencil/modifiers/introduction.html#bpy-ops-object-gpencil-modifier-apply"),
|
||||
("bpy.ops.object.material_slot_deselect*", "render/materials/assignment.html#bpy-ops-object-material-slot-deselect"),
|
||||
("bpy.ops.object.modifier_move_to_index*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-move-to-index"),
|
||||
("bpy.ops.object.multires_external_save*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-external-save"),
|
||||
("bpy.ops.object.vertex_group_normalize*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize"),
|
||||
("bpy.ops.object.visual_transform_apply*", "scene_layout/object/editing/apply.html#bpy-ops-object-visual-transform-apply"),
|
||||
@@ -669,12 +645,11 @@ url_manual_mapping = (
|
||||
("bpy.types.linestyle*modifier_material*", "render/freestyle/parameter_editor/line_style/modifiers/color/material.html#bpy-types-linestyle-modifier-material"),
|
||||
("bpy.types.movietrackingcamera.brown_k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-brown-k"),
|
||||
("bpy.types.movietrackingcamera.brown_p*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-brown-p"),
|
||||
("bpy.types.object.visible_transmission*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-transmission"),
|
||||
("bpy.types.particlesettingstextureslot*", "physics/particles/texture_influence.html#bpy-types-particlesettingstextureslot"),
|
||||
("bpy.types.posebone.ik_rotation_weight*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-posebone-ik-rotation-weight"),
|
||||
("bpy.types.regionview3d.show_sync_view*", "editors/3dview/navigate/views.html#bpy-types-regionview3d-show-sync-view"),
|
||||
("bpy.types.rendersettings.resolution_x*", "render/output/properties/format.html#bpy-types-rendersettings-resolution-x"),
|
||||
("bpy.types.rendersettings.resolution_y*", "render/output/properties/format.html#bpy-types-rendersettings-resolution-y"),
|
||||
("bpy.types.rendersettings.resolution_x*", "render/output/properties/dimensions.html#bpy-types-rendersettings-resolution-x"),
|
||||
("bpy.types.rendersettings.resolution_y*", "render/output/properties/dimensions.html#bpy-types-rendersettings-resolution-y"),
|
||||
("bpy.types.rendersettings.threads_mode*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-threads-mode"),
|
||||
("bpy.types.rigidbodyconstraint.enabled*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-enabled"),
|
||||
("bpy.types.rigidbodyconstraint.object1*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-object1"),
|
||||
@@ -725,7 +700,7 @@ url_manual_mapping = (
|
||||
("bpy.types.compositornodekeyingscreen*", "compositing/types/matte/keying_screen.html#bpy-types-compositornodekeyingscreen"),
|
||||
("bpy.types.dynamicpaintcanvassettings*", "physics/dynamic_paint/canvas.html#bpy-types-dynamicpaintcanvassettings"),
|
||||
("bpy.types.fluidflowsettings.use_flow*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-use-flow"),
|
||||
("bpy.types.fmodifierfunctiongenerator*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierfunctiongenerator"),
|
||||
("bpy.types.fmodifierfunctiongenerator*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifierfunctiongenerator"),
|
||||
("bpy.types.geometrynodeattributeclamp*", "modeling/geometry_nodes/attribute/attribute_clamp.html#bpy-types-geometrynodeattributeclamp"),
|
||||
("bpy.types.geometrynodecollectioninfo*", "modeling/geometry_nodes/input/collection_info.html#bpy-types-geometrynodecollectioninfo"),
|
||||
("bpy.types.geometrynodecurveendpoints*", "modeling/geometry_nodes/curve/curve_endpoints.html#bpy-types-geometrynodecurveendpoints"),
|
||||
@@ -735,7 +710,6 @@ url_manual_mapping = (
|
||||
("bpy.types.geometrynodepointstovolume*", "modeling/geometry_nodes/volume/points_to_volume.html#bpy-types-geometrynodepointstovolume"),
|
||||
("bpy.types.geometrynodepointtranslate*", "modeling/geometry_nodes/point/point_translate.html#bpy-types-geometrynodepointtranslate"),
|
||||
("bpy.types.greasepencil.use_multiedit*", "grease_pencil/multiframe.html#bpy-types-greasepencil-use-multiedit"),
|
||||
("bpy.types.keyframe.handle_right_type*", "editors/graph_editor/fcurves/properties.html#bpy-types-keyframe-handle-right-type"),
|
||||
("bpy.types.materialgpencilstyle.color*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-color"),
|
||||
("bpy.types.movietrackingcamera.nuke_k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-nuke-k"),
|
||||
("bpy.types.movietrackingstabilization*", "movie_clip/tracking/clip/sidebar/stabilization/index.html#bpy-types-movietrackingstabilization"),
|
||||
@@ -754,7 +728,6 @@ url_manual_mapping = (
|
||||
("bpy.types.toolsettings.use_snap_self*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-self"),
|
||||
("bpy.types.viewlayer.active_aov_index*", "render/layers/passes.html#bpy-types-viewlayer-active-aov-index"),
|
||||
("bpy.ops.anim.channels_enable_toggle*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-enable-toggle"),
|
||||
("bpy.ops.constraint.copy_to_selected*", "animation/constraints/interface/header.html#bpy-ops-constraint-copy-to-selected"),
|
||||
("bpy.ops.gpencil.bake_mesh_animation*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-bake-mesh-animation"),
|
||||
("bpy.ops.gpencil.select_vertex_color*", "grease_pencil/selecting.html#bpy-ops-gpencil-select-vertex-color"),
|
||||
("bpy.ops.gpencil.set_active_material*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-set-active-material"),
|
||||
@@ -805,15 +778,13 @@ url_manual_mapping = (
|
||||
("bpy.types.geometrynodepointinstance*", "modeling/geometry_nodes/point/point_instance.html#bpy-types-geometrynodepointinstance"),
|
||||
("bpy.types.geometrynodepointseparate*", "modeling/geometry_nodes/point/point_separate.html#bpy-types-geometrynodepointseparate"),
|
||||
("bpy.types.geometrynoderesamplecurve*", "modeling/geometry_nodes/curve/resample_curve.html#bpy-types-geometrynoderesamplecurve"),
|
||||
("bpy.types.keyframe.handle_left_type*", "editors/graph_editor/fcurves/properties.html#bpy-types-keyframe-handle-left-type"),
|
||||
("bpy.types.light.use_custom_distance*", "render/eevee/lighting.html#bpy-types-light-use-custom-distance"),
|
||||
("bpy.types.materialgpencilstyle.flip*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-flip"),
|
||||
("bpy.types.materialgpencilstyle.mode*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-mode"),
|
||||
("bpy.types.modifier.show_in_editmode*", "modeling/modifiers/introduction.html#bpy-types-modifier-show-in-editmode"),
|
||||
("bpy.types.object.empty_display_size*", "modeling/empties.html#bpy-types-object-empty-display-size"),
|
||||
("bpy.types.object.empty_display_type*", "modeling/empties.html#bpy-types-object-empty-display-type"),
|
||||
("bpy.types.regionview3d.use_box_clip*", "editors/3dview/navigate/views.html#bpy-types-regionview3d-use-box-clip"),
|
||||
("bpy.types.rendersettings.use_border*", "render/output/properties/format.html#bpy-types-rendersettings-use-border"),
|
||||
("bpy.types.rendersettings.use_border*", "render/output/properties/dimensions.html#bpy-types-rendersettings-use-border"),
|
||||
("bpy.types.rigidbodyconstraint.limit*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-limit"),
|
||||
("bpy.types.rigidbodyobject.kinematic*", "physics/rigid_body/properties/settings.html#bpy-types-rigidbodyobject-kinematic"),
|
||||
("bpy.types.scene.audio_doppler_speed*", "scene_layout/scene/properties.html#bpy-types-scene-audio-doppler-speed"),
|
||||
@@ -877,6 +848,7 @@ url_manual_mapping = (
|
||||
("bpy.types.copytransformsconstraint*", "animation/constraints/transform/copy_transforms.html#bpy-types-copytransformsconstraint"),
|
||||
("bpy.types.correctivesmoothmodifier*", "modeling/modifiers/deform/corrective_smooth.html#bpy-types-correctivesmoothmodifier"),
|
||||
("bpy.types.curve.bevel_factor_start*", "modeling/curves/properties/geometry.html#bpy-types-curve-bevel-factor-start"),
|
||||
("bpy.types.cyclesvisibilitysettings*", "render/cycles/object_settings/object_data.html#bpy-types-cyclesvisibilitysettings"),
|
||||
("bpy.types.fluiddomainsettings.beta*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-beta"),
|
||||
("bpy.types.fluidmodifier.fluid_type*", "physics/fluid/type/index.html#bpy-types-fluidmodifier-fluid-type"),
|
||||
("bpy.types.functionnodefloatcompare*", "modeling/geometry_nodes/utilities/float_compare.html#bpy-types-functionnodefloatcompare"),
|
||||
@@ -893,7 +865,6 @@ url_manual_mapping = (
|
||||
("bpy.types.mesh.use_mirror_topology*", "modeling/meshes/tools/tool_settings.html#bpy-types-mesh-use-mirror-topology"),
|
||||
("bpy.types.movieclip.display_aspect*", "editors/clip/display/clip_display.html#bpy-types-movieclip-display-aspect"),
|
||||
("bpy.types.nodesocketinterface.name*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-name"),
|
||||
("bpy.types.object.is_shadow_catcher*", "render/cycles/object_settings/object_data.html#bpy-types-object-is-shadow-catcher"),
|
||||
("bpy.types.particleinstancemodifier*", "modeling/modifiers/physics/particle_instance.html#bpy-types-particleinstancemodifier"),
|
||||
("bpy.types.sequencetransform.offset*", "video_editing/sequencer/sidebar/strip.html#bpy-types-sequencetransform-offset"),
|
||||
("bpy.types.shadernodebrightcontrast*", "render/shader_nodes/color/bright_contrast.html#bpy-types-shadernodebrightcontrast"),
|
||||
@@ -984,7 +955,7 @@ url_manual_mapping = (
|
||||
("bpy.types.limitrotationconstraint*", "animation/constraints/transform/limit_rotation.html#bpy-types-limitrotationconstraint"),
|
||||
("bpy.types.multiplygpencilmodifier*", "grease_pencil/modifiers/generate/multiple_strokes.html#bpy-types-multiplygpencilmodifier"),
|
||||
("bpy.types.rendersettings.filepath*", "render/output/properties/output.html#bpy-types-rendersettings-filepath"),
|
||||
("bpy.types.rendersettings.fps_base*", "render/output/properties/format.html#bpy-types-rendersettings-fps-base"),
|
||||
("bpy.types.rendersettings.fps_base*", "render/output/properties/dimensions.html#bpy-types-rendersettings-fps-base"),
|
||||
("bpy.types.rigidbodyobject.enabled*", "physics/rigid_body/properties/settings.html#bpy-types-rigidbodyobject-enabled"),
|
||||
("bpy.types.sceneeevee.use_overscan*", "render/eevee/render_settings/film.html#bpy-types-sceneeevee-use-overscan"),
|
||||
("bpy.types.sequencetransform.scale*", "video_editing/sequencer/sidebar/strip.html#bpy-types-sequencetransform-scale"),
|
||||
@@ -994,13 +965,13 @@ url_manual_mapping = (
|
||||
("bpy.types.shadernodevolumescatter*", "render/shader_nodes/shader/volume_scatter.html#bpy-types-shadernodevolumescatter"),
|
||||
("bpy.types.simplifygpencilmodifier*", "grease_pencil/modifiers/generate/simplify.html#bpy-types-simplifygpencilmodifier"),
|
||||
("bpy.types.spacegrapheditor.cursor*", "editors/graph_editor/introduction.html#bpy-types-spacegrapheditor-cursor"),
|
||||
("bpy.types.toolsettings.annotation*", "interface/annotate_tool.html#bpy-types-toolsettings-annotation"),
|
||||
("bpy.types.vertexweightmixmodifier*", "modeling/modifiers/modify/weight_mix.html#bpy-types-vertexweightmixmodifier"),
|
||||
("bpy.types.viewlayer.use_freestyle*", "render/freestyle/view_layer.html#bpy-types-viewlayer-use-freestyle"),
|
||||
("bpy.types.volumedisplay.use_slice*", "modeling/volumes/properties.html#bpy-types-volumedisplay-use-slice"),
|
||||
("bpy.ops.armature.armature_layers*", "animation/armatures/bones/editing/change_layers.html#bpy-ops-armature-armature-layers"),
|
||||
("bpy.ops.armature.select_linked()*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-linked"),
|
||||
("bpy.ops.clip.stabilize_2d_select*", "movie_clip/tracking/clip/selecting.html#bpy-ops-clip-stabilize-2d-select"),
|
||||
("bpy.ops.constraint.move_to_index*", "animation/constraints/interface/header.html#bpy-ops-constraint-move-to-index"),
|
||||
("bpy.ops.gpencil.frame_clean_fill*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-frame-clean-fill"),
|
||||
("bpy.ops.gpencil.stroke_subdivide*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-subdivide"),
|
||||
("bpy.ops.gpencil.vertex_color_hsv*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-vertex-color-hsv"),
|
||||
@@ -1023,7 +994,7 @@ url_manual_mapping = (
|
||||
("bpy.ops.outliner.collection_hide*", "editors/outliner/editing.html#bpy-ops-outliner-collection-hide"),
|
||||
("bpy.ops.outliner.collection_show*", "editors/outliner/editing.html#bpy-ops-outliner-collection-show"),
|
||||
("bpy.ops.paint.mask_lasso_gesture*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-paint-mask-lasso-gesture"),
|
||||
("bpy.ops.rigidbody.mass_calculate*", "scene_layout/object/editing/rigid_body.html#bpy-ops-rigidbody-mass-calculate"),
|
||||
("bpy.ops.rigidbody.mass_calculate*", "physics/rigid_body/editing.html#bpy-ops-rigidbody-mass-calculate"),
|
||||
("bpy.ops.screen.spacedata_cleanup*", "advanced/operators.html#bpy-ops-screen-spacedata-cleanup"),
|
||||
("bpy.ops.sculpt.detail_flood_fill*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-ops-sculpt-detail-flood-fill"),
|
||||
("bpy.ops.sequencer.duplicate_move*", "video_editing/sequencer/editing.html#bpy-ops-sequencer-duplicate-move"),
|
||||
@@ -1074,12 +1045,9 @@ url_manual_mapping = (
|
||||
("bpy.types.geometrynodepointscale*", "modeling/geometry_nodes/point/point_scale.html#bpy-types-geometrynodepointscale"),
|
||||
("bpy.types.imagepaint.use_occlude*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-use-occlude"),
|
||||
("bpy.types.imagesequence.use_flip*", "video_editing/sequencer/sidebar/strip.html#bpy-types-imagesequence-use-flip"),
|
||||
("bpy.types.keyframe.interpolation*", "editors/graph_editor/fcurves/properties.html#bpy-types-keyframe-interpolation"),
|
||||
("bpy.types.latticegpencilmodifier*", "grease_pencil/modifiers/deform/lattice.html#bpy-types-latticegpencilmodifier"),
|
||||
("bpy.types.lineartgpencilmodifier*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier"),
|
||||
("bpy.types.mesh.auto_smooth_angle*", "modeling/meshes/structure.html#bpy-types-mesh-auto-smooth-angle"),
|
||||
("bpy.types.modifier.show_viewport*", "modeling/modifiers/introduction.html#bpy-types-modifier-show-viewport"),
|
||||
("bpy.types.object.visible_diffuse*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-diffuse"),
|
||||
("bpy.types.objectsolverconstraint*", "animation/constraints/motion_tracking/object_solver.html#bpy-types-objectsolverconstraint"),
|
||||
("bpy.types.opacitygpencilmodifier*", "grease_pencil/modifiers/color/opacity.html#bpy-types-opacitygpencilmodifier"),
|
||||
("bpy.types.particlesystemmodifier*", "physics/particles/index.html#bpy-types-particlesystemmodifier"),
|
||||
@@ -1175,7 +1143,6 @@ url_manual_mapping = (
|
||||
("bpy.types.dopesheet.filter_text*", "editors/graph_editor/channels.html#bpy-types-dopesheet-filter-text"),
|
||||
("bpy.types.editbone.bbone_easein*", "animation/armatures/bones/properties/bendy_bones.html#bpy-types-editbone-bbone-easein"),
|
||||
("bpy.types.editbone.bbone_rollin*", "animation/armatures/bones/properties/bendy_bones.html#bpy-types-editbone-bbone-rollin"),
|
||||
("bpy.types.fcurve.auto_smoothing*", "editors/graph_editor/fcurves/properties.html#bpy-types-fcurve-auto-smoothing"),
|
||||
("bpy.types.fluideffectorsettings*", "physics/fluid/type/effector.html#bpy-types-fluideffectorsettings"),
|
||||
("bpy.types.followtrackconstraint*", "animation/constraints/motion_tracking/follow_track.html#bpy-types-followtrackconstraint"),
|
||||
("bpy.types.geometrynodecurveline*", "modeling/geometry_nodes/curve_primitives/line.html#bpy-types-geometrynodecurveline"),
|
||||
@@ -1184,17 +1151,12 @@ url_manual_mapping = (
|
||||
("bpy.types.geometrynodeedgesplit*", "modeling/geometry_nodes/mesh/edge_split.html#bpy-types-geometrynodeedgesplit"),
|
||||
("bpy.types.geometrynodetransform*", "modeling/geometry_nodes/geometry/transform.html#bpy-types-geometrynodetransform"),
|
||||
("bpy.types.gpencilsculptsettings*", "grease_pencil/properties/index.html#bpy-types-gpencilsculptsettings"),
|
||||
("bpy.types.keyframe.handle_right*", "editors/graph_editor/fcurves/properties.html#bpy-types-keyframe-handle-right"),
|
||||
("bpy.types.light.cutoff_distance*", "render/eevee/lighting.html#bpy-types-light-cutoff-distance"),
|
||||
("bpy.types.lockedtrackconstraint*", "animation/constraints/tracking/locked_track.html#bpy-types-lockedtrackconstraint"),
|
||||
("bpy.types.material.blend_method*", "render/eevee/materials/settings.html#bpy-types-material-blend-method"),
|
||||
("bpy.types.mirrorgpencilmodifier*", "grease_pencil/modifiers/generate/mirror.html#bpy-types-mirrorgpencilmodifier"),
|
||||
("bpy.types.modifier.show_on_cage*", "modeling/modifiers/introduction.html#bpy-types-modifier-show-on-cage"),
|
||||
("bpy.types.movietrackingcamera.k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-k"),
|
||||
("bpy.types.node.use_custom_color*", "interface/controls/nodes/sidebar.html#bpy-types-node-use-custom-color"),
|
||||
("bpy.types.object.visible_camera*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-camera"),
|
||||
("bpy.types.object.visible_glossy*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-glossy"),
|
||||
("bpy.types.object.visible_shadow*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-shadow"),
|
||||
("bpy.types.offsetgpencilmodifier*", "grease_pencil/modifiers/deform/offset.html#bpy-types-offsetgpencilmodifier"),
|
||||
("bpy.types.posebone.custom_shape*", "animation/armatures/bones/properties/display.html#bpy-types-posebone-custom-shape"),
|
||||
("bpy.types.rendersettings.tile_x*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-tile-x"),
|
||||
@@ -1230,7 +1192,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.mesh.vert_connect_path*", "modeling/meshes/editing/vertex/connect_vertex_path.html#bpy-ops-mesh-vert-connect-path"),
|
||||
("bpy.ops.nla.action_sync_length*", "editors/nla/editing.html#bpy-ops-nla-action-sync-length"),
|
||||
("bpy.ops.object.make_links_data*", "scene_layout/object/editing/link_transfer/link_data.html#bpy-ops-object-make-links-data"),
|
||||
("bpy.ops.object.modifier_remove*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-remove"),
|
||||
("bpy.ops.object.paths_calculate*", "animation/motion_paths.html#bpy-ops-object-paths-calculate"),
|
||||
("bpy.ops.object.transform_apply*", "scene_layout/object/editing/apply.html#bpy-ops-object-transform-apply"),
|
||||
("bpy.ops.outliner.lib_operation*", "files/linked_libraries/link_append.html#bpy-ops-outliner-lib-operation"),
|
||||
@@ -1271,13 +1232,11 @@ url_manual_mapping = (
|
||||
("bpy.types.geometrynodemeshline*", "modeling/geometry_nodes/mesh_primitives/line.html#bpy-types-geometrynodemeshline"),
|
||||
("bpy.types.gpencillayer.opacity*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-opacity"),
|
||||
("bpy.types.image.display_aspect*", "editors/image/sidebar.html#bpy-types-image-display-aspect"),
|
||||
("bpy.types.keyframe.handle_left*", "editors/graph_editor/fcurves/properties.html#bpy-types-keyframe-handle-left"),
|
||||
("bpy.types.keyingsetsall.active*", "editors/timeline.html#bpy-types-keyingsetsall-active"),
|
||||
("bpy.types.limitscaleconstraint*", "animation/constraints/transform/limit_scale.html#bpy-types-limitscaleconstraint"),
|
||||
("bpy.types.materialgpencilstyle*", "grease_pencil/materials/index.html#bpy-types-materialgpencilstyle"),
|
||||
("bpy.types.mesh.use_auto_smooth*", "modeling/meshes/structure.html#bpy-types-mesh-use-auto-smooth"),
|
||||
("bpy.types.meshtovolumemodifier*", "modeling/modifiers/generate/mesh_to_volume.html#bpy-types-meshtovolumemodifier"),
|
||||
("bpy.types.modifier.show_render*", "modeling/modifiers/introduction.html#bpy-types-modifier-show-render"),
|
||||
("bpy.types.noisegpencilmodifier*", "grease_pencil/modifiers/deform/noise.html#bpy-types-noisegpencilmodifier"),
|
||||
("bpy.types.object.hide_viewport*", "scene_layout/object/properties/visibility.html#bpy-types-object-hide-viewport"),
|
||||
("bpy.types.posebone.rigify_type*", "addons/rigging/rigify/rig_types/index.html#bpy-types-posebone-rigify-type"),
|
||||
@@ -1332,7 +1291,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.node.tree_socket_move*", "interface/controls/nodes/groups.html#bpy-ops-node-tree-socket-move"),
|
||||
("bpy.ops.object.duplicate_move*", "scene_layout/object/editing/duplicate.html#bpy-ops-object-duplicate-move"),
|
||||
("bpy.ops.object.hook_add_selob*", "modeling/meshes/editing/vertex/hooks.html#bpy-ops-object-hook-add-selob"),
|
||||
("bpy.ops.object.modifier_apply*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-apply"),
|
||||
("bpy.ops.object.select_by_type*", "scene_layout/object/selecting.html#bpy-ops-object-select-by-type"),
|
||||
("bpy.ops.object.select_grouped*", "scene_layout/object/selecting.html#bpy-ops-object-select-grouped"),
|
||||
("bpy.ops.object.select_pattern*", "scene_layout/object/selecting.html#bpy-ops-object-select-pattern"),
|
||||
@@ -1444,7 +1402,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.node.read_viewlayers*", "interface/controls/nodes/editing.html#bpy-ops-node-read-viewlayers"),
|
||||
("bpy.ops.node.tree_socket_add*", "interface/controls/nodes/groups.html#bpy-ops-node-tree-socket-add"),
|
||||
("bpy.ops.object.data_transfer*", "scene_layout/object/editing/link_transfer/transfer_mesh_data.html#bpy-ops-object-data-transfer"),
|
||||
("bpy.ops.object.modifier_copy*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-copy"),
|
||||
("bpy.ops.object.select_camera*", "scene_layout/object/selecting.html#bpy-ops-object-select-camera"),
|
||||
("bpy.ops.object.select_linked*", "scene_layout/object/selecting.html#bpy-ops-object-select-linked"),
|
||||
("bpy.ops.object.select_mirror*", "scene_layout/object/selecting.html#bpy-ops-object-select-mirror"),
|
||||
@@ -1479,15 +1436,13 @@ url_manual_mapping = (
|
||||
("bpy.types.compositornodemask*", "compositing/types/input/mask.html#bpy-types-compositornodemask"),
|
||||
("bpy.types.compositornodemath*", "compositing/types/converter/math.html#bpy-types-compositornodemath"),
|
||||
("bpy.types.compositornodetime*", "compositing/types/input/time.html#bpy-types-compositornodetime"),
|
||||
("bpy.types.constraint.enabled*", "animation/constraints/interface/header.html#bpy-types-constraint-enabled"),
|
||||
("bpy.types.curve.bevel_object*", "modeling/curves/properties/geometry.html#bpy-types-curve-bevel-object"),
|
||||
("bpy.types.curve.resolution_u*", "modeling/curves/properties/shape.html#bpy-types-curve-resolution-u"),
|
||||
("bpy.types.curve.resolution_v*", "modeling/surfaces/properties/shape.html#bpy-types-curve-resolution-v"),
|
||||
("bpy.types.curve.taper_object*", "modeling/curves/properties/geometry.html#bpy-types-curve-taper-object"),
|
||||
("bpy.types.curve.twist_smooth*", "modeling/curves/properties/shape.html#bpy-types-curve-twist-smooth"),
|
||||
("bpy.types.curvepaintsettings*", "modeling/curves/tools/draw.html#bpy-types-curvepaintsettings"),
|
||||
("bpy.types.fcurve.array_index*", "editors/graph_editor/fcurves/properties.html#bpy-types-fcurve-array-index"),
|
||||
("bpy.types.fmodifiergenerator*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiergenerator"),
|
||||
("bpy.types.fmodifiergenerator*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifiergenerator"),
|
||||
("bpy.types.freestylelinestyle*", "render/freestyle/parameter_editor/line_style/index.html#bpy-types-freestylelinestyle"),
|
||||
("bpy.types.gammacrosssequence*", "video_editing/sequencer/strips/transitions/gamma_cross.html#bpy-types-gammacrosssequence"),
|
||||
("bpy.types.geometrynodeswitch*", "modeling/geometry_nodes/utilities/switch.html#bpy-types-geometrynodeswitch"),
|
||||
@@ -1504,7 +1459,7 @@ url_manual_mapping = (
|
||||
("bpy.types.object.hide_select*", "scene_layout/object/properties/visibility.html#bpy-types-object-hide-select"),
|
||||
("bpy.types.object.parent_type*", "scene_layout/object/properties/relations.html#bpy-types-object-parent-type"),
|
||||
("bpy.types.object.show_bounds*", "scene_layout/object/properties/display.html#bpy-types-object-show-bounds"),
|
||||
("bpy.types.rendersettings.fps*", "render/output/properties/format.html#bpy-types-rendersettings-fps"),
|
||||
("bpy.types.rendersettings.fps*", "render/output/properties/dimensions.html#bpy-types-rendersettings-fps"),
|
||||
("bpy.types.scene.audio_volume*", "scene_layout/scene/properties.html#bpy-types-scene-audio-volume"),
|
||||
("bpy.types.sculpt.detail_size*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-detail-size"),
|
||||
("bpy.types.shadernodebsdfhair*", "render/shader_nodes/shader/hair.html#bpy-types-shadernodebsdfhair"),
|
||||
@@ -1603,9 +1558,8 @@ url_manual_mapping = (
|
||||
("bpy.types.curve.bevel_depth*", "modeling/curves/properties/geometry.html#bpy-types-curve-bevel-depth"),
|
||||
("bpy.types.curve.use_stretch*", "modeling/curves/properties/shape.html#bpy-types-curve-use-stretch"),
|
||||
("bpy.types.edgesplitmodifier*", "modeling/modifiers/generate/edge_split.html#bpy-types-edgesplitmodifier"),
|
||||
("bpy.types.fcurve.color_mode*", "editors/graph_editor/fcurves/properties.html#bpy-types-fcurve-color-mode"),
|
||||
("bpy.types.fluidflowsettings*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings"),
|
||||
("bpy.types.fmodifierenvelope*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierenvelope"),
|
||||
("bpy.types.fmodifierenvelope*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifierenvelope"),
|
||||
("bpy.types.freestylesettings*", "render/freestyle/view_layer.html#bpy-types-freestylesettings"),
|
||||
("bpy.types.geometrynodegroup*", "modeling/geometry_nodes/group.html#bpy-types-geometrynodegroup"),
|
||||
("bpy.types.gpencillayer.hide*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-hide"),
|
||||
@@ -1619,13 +1573,12 @@ url_manual_mapping = (
|
||||
("bpy.types.meshcachemodifier*", "modeling/modifiers/modify/mesh_cache.html#bpy-types-meshcachemodifier"),
|
||||
("bpy.types.movieclipsequence*", "video_editing/sequencer/strips/clip.html#bpy-types-movieclipsequence"),
|
||||
("bpy.types.object.dimensions*", "scene_layout/object/properties/transforms.html#bpy-types-object-dimensions"),
|
||||
("bpy.types.object.is_holdout*", "scene_layout/object/properties/visibility.html#bpy-types-object-is-holdout"),
|
||||
("bpy.types.object.pass_index*", "scene_layout/object/properties/relations.html#bpy-types-object-pass-index"),
|
||||
("bpy.types.object.track_axis*", "scene_layout/object/properties/relations.html#bpy-types-object-track-axis"),
|
||||
("bpy.types.pose.use_mirror_x*", "animation/armatures/posing/tool_settings.html#bpy-types-pose-use-mirror-x"),
|
||||
("bpy.types.preferencessystem*", "editors/preferences/system.html#bpy-types-preferencessystem"),
|
||||
("bpy.types.scene.active_clip*", "scene_layout/scene/properties.html#bpy-types-scene-active-clip"),
|
||||
("bpy.types.scene.frame_start*", "render/output/properties/frame_range.html#bpy-types-scene-frame-start"),
|
||||
("bpy.types.scene.frame_start*", "render/output/properties/dimensions.html#bpy-types-scene-frame-start"),
|
||||
("bpy.types.sceneeevee.shadow*", "render/eevee/render_settings/shadows.html#bpy-types-sceneeevee-shadow"),
|
||||
("bpy.types.screen.use_follow*", "editors/timeline.html#bpy-types-screen-use-follow"),
|
||||
("bpy.types.sequencetransform*", "video_editing/sequencer/sidebar/strip.html#bpy-types-sequencetransform"),
|
||||
@@ -1708,8 +1661,7 @@ url_manual_mapping = (
|
||||
("bpy.types.displaysafeareas*", "render/cameras.html#bpy-types-displaysafeareas"),
|
||||
("bpy.types.editbone.bbone_x*", "animation/armatures/bones/properties/bendy_bones.html#bpy-types-editbone-bbone-x"),
|
||||
("bpy.types.editbone.bbone_z*", "animation/armatures/bones/properties/bendy_bones.html#bpy-types-editbone-bbone-z"),
|
||||
("bpy.types.fcurve.data_path*", "editors/graph_editor/fcurves/properties.html#bpy-types-fcurve-data-path"),
|
||||
("bpy.types.fmodifierstepped*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierstepped"),
|
||||
("bpy.types.fmodifierstepped*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifierstepped"),
|
||||
("bpy.types.freestylelineset*", "render/freestyle/parameter_editor/line_set.html#bpy-types-freestylelineset"),
|
||||
("bpy.types.mask.frame_start*", "movie_clip/masking/sidebar.html#bpy-types-mask-frame-start"),
|
||||
("bpy.types.mesh.*customdata*", "modeling/meshes/properties/custom_data.html#bpy-types-mesh-customdata"),
|
||||
@@ -1723,7 +1675,7 @@ url_manual_mapping = (
|
||||
("bpy.types.pose.use_auto_ik*", "animation/armatures/posing/tool_settings.html#bpy-types-pose-use-auto-ik"),
|
||||
("bpy.types.preferencesinput*", "editors/preferences/input.html#bpy-types-preferencesinput"),
|
||||
("bpy.types.rigifyparameters*", "addons/rigging/rigify/rig_types/index.html#bpy-types-rigifyparameters"),
|
||||
("bpy.types.scene.frame_step*", "render/output/properties/frame_range.html#bpy-types-scene-frame-step"),
|
||||
("bpy.types.scene.frame_step*", "render/output/properties/dimensions.html#bpy-types-scene-frame-step"),
|
||||
("bpy.types.sceneeevee.bloom*", "render/eevee/render_settings/bloom.html#bpy-types-sceneeevee-bloom"),
|
||||
("bpy.types.sculpt.show_mask*", "sculpt_paint/sculpting/editing/mask.html#bpy-types-sculpt-show-mask"),
|
||||
("bpy.types.sequence.channel*", "video_editing/sequencer/sidebar/strip.html#bpy-types-sequence-channel"),
|
||||
@@ -1756,7 +1708,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.clip.clean_tracks*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-clean-tracks"),
|
||||
("bpy.ops.clip.delete_track*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-delete-track"),
|
||||
("bpy.ops.clip.solve_camera*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-solve-camera"),
|
||||
("bpy.ops.constraint.delete*", "animation/constraints/interface/header.html#bpy-ops-constraint-delete"),
|
||||
("bpy.ops.curve.smooth_tilt*", "modeling/curves/editing/control_points.html#bpy-ops-curve-smooth-tilt"),
|
||||
("bpy.ops.fluid.bake_guides*", "physics/fluid/type/domain/guides.html#bpy-ops-fluid-bake-guides"),
|
||||
("bpy.ops.fluid.free_guides*", "physics/fluid/type/domain/guides.html#bpy-ops-fluid-free-guides"),
|
||||
@@ -1800,16 +1751,15 @@ url_manual_mapping = (
|
||||
("bpy.types.booleanmodifier*", "modeling/modifiers/generate/booleans.html#bpy-types-booleanmodifier"),
|
||||
("bpy.types.brush.mask_tool*", "sculpt_paint/sculpting/tools/mask.html#bpy-types-brush-mask-tool"),
|
||||
("bpy.types.constraint.mute*", "animation/constraints/interface/header.html#bpy-types-constraint-mute"),
|
||||
("bpy.types.constraint.name*", "animation/constraints/interface/header.html#bpy-types-constraint-name"),
|
||||
("bpy.types.curve.eval_time*", "modeling/curves/properties/path_animation.html#bpy-types-curve-eval-time"),
|
||||
("bpy.types.curve.fill_mode*", "modeling/curves/properties/shape.html#bpy-types-curve-fill-mode"),
|
||||
("bpy.types.editbone.layers*", "animation/armatures/bones/properties/relations.html#bpy-types-editbone-layers"),
|
||||
("bpy.types.editbone.parent*", "animation/armatures/bones/properties/relations.html#bpy-types-editbone-parent"),
|
||||
("bpy.types.explodemodifier*", "modeling/modifiers/physics/explode.html#bpy-types-explodemodifier"),
|
||||
("bpy.types.fcurvemodifiers*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fcurvemodifiers"),
|
||||
("bpy.types.fcurvemodifiers*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fcurvemodifiers"),
|
||||
("bpy.types.floorconstraint*", "animation/constraints/relationship/floor.html#bpy-types-floorconstraint"),
|
||||
("bpy.types.fmodifiercycles*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiercycles"),
|
||||
("bpy.types.fmodifierlimits*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierlimits"),
|
||||
("bpy.types.fmodifiercycles*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifiercycles"),
|
||||
("bpy.types.fmodifierlimits*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifierlimits"),
|
||||
("bpy.types.imagepaint.mode*", "sculpt_paint/texture_paint/tool_settings/texture_slots.html#bpy-types-imagepaint-mode"),
|
||||
("bpy.types.latticemodifier*", "modeling/modifiers/deform/lattice.html#bpy-types-latticemodifier"),
|
||||
("bpy.types.musgravetexture*", "render/materials/legacy_textures/types/musgrave.html#bpy-types-musgravetexture"),
|
||||
@@ -1820,7 +1770,7 @@ url_manual_mapping = (
|
||||
("bpy.types.preferencesedit*", "editors/preferences/editing.html#bpy-types-preferencesedit"),
|
||||
("bpy.types.preferencesview*", "editors/preferences/interface.html#bpy-types-preferencesview"),
|
||||
("bpy.types.rigidbodyobject*", "physics/rigid_body/index.html#bpy-types-rigidbodyobject"),
|
||||
("bpy.types.scene.frame_end*", "render/output/properties/frame_range.html#bpy-types-scene-frame-end"),
|
||||
("bpy.types.scene.frame_end*", "render/output/properties/dimensions.html#bpy-types-scene-frame-end"),
|
||||
("bpy.types.sceneeevee.gtao*", "render/eevee/render_settings/ambient_occlusion.html#bpy-types-sceneeevee-gtao"),
|
||||
("bpy.types.screen.use_play*", "editors/timeline.html#bpy-types-screen-use-play"),
|
||||
("bpy.types.shadernodebevel*", "render/shader_nodes/input/bevel.html#bpy-types-shadernodebevel"),
|
||||
@@ -1836,7 +1786,6 @@ url_manual_mapping = (
|
||||
("bpy.types.texturenodemath*", "editors/texture_node/types/converter/math.html#bpy-types-texturenodemath"),
|
||||
("bpy.types.volume.filepath*", "modeling/volumes/properties.html#bpy-types-volume-filepath"),
|
||||
("bpy.ops.clip.join_tracks*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-join-tracks"),
|
||||
("bpy.ops.constraint.apply*", "animation/constraints/interface/header.html#bpy-ops-constraint-apply"),
|
||||
("bpy.ops.curve.select_row*", "modeling/surfaces/selecting.html#bpy-ops-curve-select-row"),
|
||||
("bpy.ops.curve.tilt_clear*", "modeling/curves/editing/control_points.html#bpy-ops-curve-tilt-clear"),
|
||||
("bpy.ops.curve.vertex_add*", "modeling/curves/editing/other.html#bpy-ops-curve-vertex-add"),
|
||||
@@ -1880,8 +1829,7 @@ url_manual_mapping = (
|
||||
("bpy.types.brush.hardness*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-hardness"),
|
||||
("bpy.types.curvesmodifier*", "video_editing/sequencer/sidebar/modifiers.html#bpy-types-curvesmodifier"),
|
||||
("bpy.types.ffmpegsettings*", "render/output/properties/output.html#bpy-types-ffmpegsettings"),
|
||||
("bpy.types.fmodifiernoise*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiernoise"),
|
||||
("bpy.types.keyframe.co_ui*", "editors/graph_editor/fcurves/properties.html#bpy-types-keyframe-co-ui"),
|
||||
("bpy.types.fmodifiernoise*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifiernoise"),
|
||||
("bpy.types.mask.frame_end*", "movie_clip/masking/sidebar.html#bpy-types-mask-frame-end"),
|
||||
("bpy.types.material.paint*", "sculpt_paint/texture_paint/index.html#bpy-types-material-paint"),
|
||||
("bpy.types.mirrormodifier*", "modeling/modifiers/generate/mirror.html#bpy-types-mirrormodifier"),
|
||||
@@ -1913,7 +1861,6 @@ url_manual_mapping = (
|
||||
("bpy.ops.clip.select_all*", "movie_clip/tracking/clip/selecting.html#bpy-ops-clip-select-all"),
|
||||
("bpy.ops.clip.select_box*", "movie_clip/tracking/clip/selecting.html#bpy-ops-clip-select-box"),
|
||||
("bpy.ops.clip.set_origin*", "movie_clip/tracking/clip/editing/reconstruction.html#bpy-ops-clip-set-origin"),
|
||||
("bpy.ops.constraint.copy*", "animation/constraints/interface/header.html#bpy-ops-constraint-copy"),
|
||||
("bpy.ops.curve.subdivide*", "modeling/curves/editing/segments.html#bpy-ops-curve-subdivide"),
|
||||
("bpy.ops.ed.undo_history*", "interface/undo_redo.html#bpy-ops-ed-undo-history"),
|
||||
("bpy.ops.file.unpack_all*", "files/blend/packed_data.html#bpy-ops-file-unpack-all"),
|
||||
@@ -1977,7 +1924,6 @@ url_manual_mapping = (
|
||||
("bpy.types.fieldsettings*", "physics/forces/force_fields/index.html#bpy-types-fieldsettings"),
|
||||
("bpy.types.imagesequence*", "video_editing/sequencer/strips/image.html#bpy-types-imagesequence"),
|
||||
("bpy.types.marbletexture*", "render/materials/legacy_textures/types/marble.html#bpy-types-marbletexture"),
|
||||
("bpy.types.modifier.name*", "modeling/modifiers/introduction.html#bpy-types-modifier-name"),
|
||||
("bpy.types.modifier.show*", "modeling/modifiers/introduction.html#bpy-types-modifier-show"),
|
||||
("bpy.types.moviesequence*", "video_editing/sequencer/strips/movie.html#bpy-types-moviesequence"),
|
||||
("bpy.types.movietracking*", "movie_clip/tracking/index.html#bpy-types-movietracking"),
|
||||
@@ -2160,7 +2106,6 @@ url_manual_mapping = (
|
||||
("bpy.types.compositor*", "compositing/index.html#bpy-types-compositor"),
|
||||
("bpy.types.constraint*", "animation/constraints/index.html#bpy-types-constraint"),
|
||||
("bpy.types.imagepaint*", "sculpt_paint/texture_paint/index.html#bpy-types-imagepaint"),
|
||||
("bpy.types.keymapitem*", "editors/preferences/keymap.html#bpy-types-keymapitem"),
|
||||
("bpy.types.lightprobe*", "render/eevee/light_probes/index.html#bpy-types-lightprobe"),
|
||||
("bpy.types.maskparent*", "movie_clip/masking/sidebar.html#bpy-types-maskparent"),
|
||||
("bpy.types.maskspline*", "movie_clip/masking/sidebar.html#bpy-types-maskspline"),
|
||||
@@ -2197,7 +2142,7 @@ url_manual_mapping = (
|
||||
("bpy.types.bone.hide*", "animation/armatures/bones/properties/display.html#bpy-types-bone-hide"),
|
||||
("bpy.types.colorramp*", "interface/controls/templates/color_ramp.html#bpy-types-colorramp"),
|
||||
("bpy.types.dopesheet*", "editors/dope_sheet/index.html#bpy-types-dopesheet"),
|
||||
("bpy.types.fmodifier*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifier"),
|
||||
("bpy.types.fmodifier*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifier"),
|
||||
("bpy.types.freestyle*", "render/freestyle/index.html#bpy-types-freestyle"),
|
||||
("bpy.types.masklayer*", "movie_clip/masking/sidebar.html#bpy-types-masklayer"),
|
||||
("bpy.types.movieclip*", "movie_clip/index.html#bpy-types-movieclip"),
|
||||
|
@@ -30,6 +30,24 @@ ARRAY_TYPES = (list, tuple, IDPropertyArray, Vector)
|
||||
MAX_DISPLAY_ROWS = 4
|
||||
|
||||
|
||||
def rna_idprop_ui_get(item, *, create=True):
|
||||
try:
|
||||
return item['_RNA_UI']
|
||||
except:
|
||||
if create:
|
||||
item['_RNA_UI'] = {}
|
||||
return item['_RNA_UI']
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def rna_idprop_ui_del(item):
|
||||
try:
|
||||
del item['_RNA_UI']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
def rna_idprop_quote_path(prop):
|
||||
return "[\"%s\"]" % bpy.utils.escape_identifier(prop)
|
||||
|
||||
@@ -41,9 +59,32 @@ def rna_idprop_ui_prop_update(item, prop):
|
||||
prop_rna.update()
|
||||
|
||||
|
||||
def rna_idprop_ui_prop_clear(item, prop):
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
ui_data.clear()
|
||||
def rna_idprop_ui_prop_get(item, prop, *, create=True):
|
||||
|
||||
rna_ui = rna_idprop_ui_get(item, create=create)
|
||||
|
||||
if rna_ui is None:
|
||||
return None
|
||||
|
||||
try:
|
||||
return rna_ui[prop]
|
||||
except:
|
||||
rna_ui[prop] = {}
|
||||
return rna_ui[prop]
|
||||
|
||||
|
||||
def rna_idprop_ui_prop_clear(item, prop, *, remove=True):
|
||||
rna_ui = rna_idprop_ui_get(item, create=False)
|
||||
|
||||
if rna_ui is None:
|
||||
return
|
||||
|
||||
try:
|
||||
del rna_ui[prop]
|
||||
except KeyError:
|
||||
pass
|
||||
if remove and len(item.keys()) == 1:
|
||||
rna_idprop_ui_del(item)
|
||||
|
||||
|
||||
def rna_idprop_context_value(context, context_member, property_type):
|
||||
@@ -65,7 +106,8 @@ def rna_idprop_context_value(context, context_member, property_type):
|
||||
|
||||
def rna_idprop_has_properties(rna_item):
|
||||
keys = rna_item.keys()
|
||||
return bool(keys)
|
||||
nbr_props = len(keys)
|
||||
return (nbr_props > 1) or (nbr_props and '_RNA_UI' not in keys)
|
||||
|
||||
|
||||
def rna_idprop_value_to_python(value):
|
||||
@@ -84,8 +126,31 @@ def rna_idprop_value_item_type(value):
|
||||
|
||||
|
||||
def rna_idprop_ui_prop_default_set(item, prop, value):
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
ui_data.update(default=value)
|
||||
defvalue = None
|
||||
try:
|
||||
prop_type, is_array = rna_idprop_value_item_type(item[prop])
|
||||
|
||||
if prop_type in {int, float, str}:
|
||||
if is_array and isinstance(value, ARRAY_TYPES):
|
||||
value = [prop_type(item) for item in value]
|
||||
if any(value):
|
||||
defvalue = value
|
||||
else:
|
||||
defvalue = prop_type(value)
|
||||
except KeyError:
|
||||
pass
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if defvalue:
|
||||
rna_ui = rna_idprop_ui_prop_get(item, prop, create=True)
|
||||
rna_ui["default"] = defvalue
|
||||
else:
|
||||
rna_ui = rna_idprop_ui_prop_get(item, prop)
|
||||
if rna_ui:
|
||||
rna_ui.pop("default", None)
|
||||
|
||||
return defvalue
|
||||
|
||||
|
||||
def rna_idprop_ui_create(
|
||||
@@ -98,7 +163,7 @@ def rna_idprop_ui_create(
|
||||
):
|
||||
"""Create and initialize a custom property with limits, defaults and other settings."""
|
||||
|
||||
proptype, _ = rna_idprop_value_item_type(default)
|
||||
proptype, is_array = rna_idprop_value_item_type(default)
|
||||
|
||||
# Sanitize limits
|
||||
if proptype is bool:
|
||||
@@ -115,22 +180,35 @@ def rna_idprop_ui_create(
|
||||
|
||||
rna_idprop_ui_prop_update(item, prop)
|
||||
|
||||
# Update the UI settings.
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
ui_data.update(
|
||||
subtype=subtype,
|
||||
min=min,
|
||||
max=max,
|
||||
soft_min=soft_min,
|
||||
soft_max=soft_max,
|
||||
description=description,
|
||||
default=default,
|
||||
)
|
||||
# Clear the UI settings
|
||||
rna_ui_group = rna_idprop_ui_get(item, create=True)
|
||||
rna_ui_group[prop] = {}
|
||||
rna_ui = rna_ui_group[prop]
|
||||
|
||||
# Assign limits and default
|
||||
if proptype in {int, float, bool}:
|
||||
# The type must be exactly the same
|
||||
rna_ui["min"] = proptype(min)
|
||||
rna_ui["soft_min"] = proptype(soft_min)
|
||||
rna_ui["max"] = proptype(max)
|
||||
rna_ui["soft_max"] = proptype(soft_max)
|
||||
|
||||
if default and (not is_array or any(default)):
|
||||
rna_ui["default"] = default
|
||||
|
||||
if is_array and subtype and subtype != 'NONE':
|
||||
rna_ui["subtype"] = subtype
|
||||
|
||||
# Assign other settings
|
||||
if description is not None:
|
||||
rna_ui["description"] = description
|
||||
|
||||
prop_path = rna_idprop_quote_path(prop)
|
||||
|
||||
item.property_overridable_library_set(prop_path, overridable)
|
||||
|
||||
return rna_ui
|
||||
|
||||
|
||||
def draw(layout, context, context_member, property_type, *, use_edit=True):
|
||||
|
||||
@@ -176,6 +254,10 @@ def draw(layout, context, context_member, property_type, *, use_edit=True):
|
||||
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
|
||||
|
||||
for key, val in items:
|
||||
|
||||
if key == '_RNA_UI':
|
||||
continue
|
||||
|
||||
is_rna = (key in rna_properties)
|
||||
|
||||
# only show API defined for developers
|
||||
|
@@ -796,11 +796,11 @@ def km_outliner(params):
|
||||
("outliner.item_rename", {"type": 'F2', "value": 'PRESS'},
|
||||
{"properties": [("use_active", True)]}),
|
||||
("outliner.item_activate", {"type": 'LEFTMOUSE', "value": 'CLICK'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
|
||||
("outliner.item_activate", {"type": 'LEFTMOUSE', "value": 'CLICK', "ctrl": True},
|
||||
{"properties": [("extend", True), ("deselect_all", not params.legacy)]}),
|
||||
("outliner.item_activate", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True},
|
||||
{"properties": [("extend_range", True), ("deselect_all", not params.legacy)]}),
|
||||
{"properties": [("extend", False), ("extend_range", True), ("deselect_all", not params.legacy)]}),
|
||||
("outliner.item_activate", {"type": 'LEFTMOUSE', "value": 'CLICK', "ctrl": True, "shift": True},
|
||||
{"properties": [("extend", True), ("extend_range", True), ("deselect_all", not params.legacy)]}),
|
||||
("outliner.select_box", {"type": 'B', "value": 'PRESS'}, None),
|
||||
@@ -884,13 +884,15 @@ def km_uv_editor(params):
|
||||
*_template_items_uv_select_mode(params),
|
||||
("uv.mark_seam", {"type": 'E', "value": 'PRESS', "ctrl": True}, None),
|
||||
("uv.select", {"type": params.select_mouse, "value": params.select_mouse_value},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
|
||||
("uv.select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("uv.select_loop", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True}, None),
|
||||
("uv.select_loop", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("uv.select_loop", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "alt": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("uv.select_edge_ring", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "alt": True}, None),
|
||||
("uv.select_edge_ring", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "alt": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("uv.select_edge_ring", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "shift": True, "alt": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("uv.shortest_path_pick", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True},
|
||||
@@ -911,7 +913,7 @@ def km_uv_editor(params):
|
||||
("uv.select_linked_pick", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("extend", True), ("deselect", False)]}),
|
||||
("uv.select_linked_pick", {"type": 'L', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("deselect", True)]}),
|
||||
{"properties": [("extend", False), ("deselect", True)]}),
|
||||
("uv.select_more", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
("uv.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
*_template_items_select_actions(params, "uv.select_all"),
|
||||
@@ -955,7 +957,8 @@ def km_uv_editor(params):
|
||||
# Fallback for MMB emulation
|
||||
if params.use_mouse_emulate_3_button and params.select_mouse == 'LEFTMOUSE':
|
||||
items.extend([
|
||||
("uv.select_loop", {"type": params.select_mouse, "value": 'DOUBLE_CLICK'}, None),
|
||||
("uv.select_loop", {"type": params.select_mouse, "value": 'DOUBLE_CLICK'},
|
||||
{"properties": [("extend", False)]}),
|
||||
("uv.select_loop", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "alt": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
])
|
||||
@@ -1351,7 +1354,9 @@ def km_mask_editing(params):
|
||||
# click select keymap it's fine to have the context menu instead.
|
||||
items.extend([
|
||||
("mask.select", {"type": 'RIGHTMOUSE', "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [
|
||||
("extend", False), ("deselect", False), ("toggle", False),
|
||||
("deselect_all", not params.legacy)]}),
|
||||
("transform.translate", {"type": 'EVT_TWEAK_R', "value": 'ANY'}, None),
|
||||
])
|
||||
|
||||
@@ -1365,7 +1370,7 @@ def km_mask_editing(params):
|
||||
("mask.delete", {"type": 'X', "value": 'PRESS'}, None),
|
||||
("mask.delete", {"type": 'DEL', "value": 'PRESS'}, None),
|
||||
("mask.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("toggle", True)]}),
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", True)]}),
|
||||
*_template_items_select_actions(params, "mask.select_all"),
|
||||
("mask.select_linked", {"type": 'L', "value": 'PRESS', "ctrl": True}, None),
|
||||
("mask.select_linked_pick", {"type": 'L', "value": 'PRESS'},
|
||||
@@ -1385,7 +1390,8 @@ def km_mask_editing(params):
|
||||
{"properties": [("unselected", False)]}),
|
||||
("mask.hide_view_set", {"type": 'H', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("unselected", True)]}),
|
||||
("clip.select", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True}, None),
|
||||
("clip.select", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("mask.cyclic_toggle", {"type": 'C', "value": 'PRESS', "alt": True}, None),
|
||||
("mask.slide_point", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("mask.slide_spline_curvature", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
@@ -1440,7 +1446,7 @@ def km_markers(params):
|
||||
("marker.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("marker.select", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("camera", True)]}),
|
||||
{"properties": [("extend", False), ("camera", True)]}),
|
||||
("marker.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("extend", True), ("camera", True)]}),
|
||||
("marker.select_box", {"type": params.select_tweak, "value": 'ANY'},
|
||||
@@ -1525,27 +1531,29 @@ def km_graph_editor(params):
|
||||
("wm.context_toggle", {"type": 'H', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'space_data.show_handles')]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [
|
||||
("extend", False), ("deselect_all", not params.legacy),
|
||||
("column", False), ("curves", False)]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "alt": True},
|
||||
{"properties": [("column", True)]}),
|
||||
{"properties": [("extend", False), ("column", True), ("curves", False)]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
{"properties": [("extend", True), ("column", False), ("curves", False)]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True},
|
||||
{"properties": [("extend", True), ("column", True)]}),
|
||||
{"properties": [("extend", True), ("column", True), ("curves", False)]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("curves", True)]}),
|
||||
{"properties": [("extend", False), ("column", False), ("curves", True)]}),
|
||||
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True},
|
||||
{"properties": [("extend", True), ("curves", True)]}),
|
||||
{"properties": [("extend", True), ("column", False), ("curves", True)]}),
|
||||
("graph.select_leftright",
|
||||
{"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True},
|
||||
{"properties": [("mode", 'CHECK')]}),
|
||||
{"properties": [("mode", 'CHECK'), ("extend", False)]}),
|
||||
("graph.select_leftright",
|
||||
{"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True, "shift": True},
|
||||
{"properties": [("mode", 'CHECK'), ("extend", True)]}),
|
||||
("graph.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'LEFT')]}),
|
||||
{"properties": [("mode", 'LEFT'), ("extend", False)]}),
|
||||
("graph.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'RIGHT')]}),
|
||||
{"properties": [("mode", 'RIGHT'), ("extend", False)]}),
|
||||
*_template_items_select_actions(params, "graph.select_all"),
|
||||
("graph.select_box", {"type": 'B', "value": 'PRESS'}, None),
|
||||
("graph.select_box", {"type": 'B', "value": 'PRESS', "alt": True},
|
||||
@@ -1589,7 +1597,8 @@ def km_graph_editor(params):
|
||||
("graph.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("confirm", False)]}),
|
||||
("graph.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),
|
||||
("graph.keyframe_insert", {"type": 'I', "value": 'PRESS'}, None),
|
||||
("graph.click_insert", {"type": params.action_mouse, "value": 'CLICK', "ctrl": True}, None),
|
||||
("graph.click_insert", {"type": params.action_mouse, "value": 'CLICK', "ctrl": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("graph.click_insert", {"type": params.action_mouse, "value": 'CLICK', "shift": True, "ctrl": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("graph.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
|
||||
@@ -1795,10 +1804,13 @@ def km_node_editor(params):
|
||||
def node_select_ops(select_mouse):
|
||||
return [
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", True)]}),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True}, None),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "alt": True}, None),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True, "alt": True}, None),
|
||||
{"properties": [("extend", False), ("deselect_all", True)]}),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "alt": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
@@ -1820,7 +1832,7 @@ def km_node_editor(params):
|
||||
items.extend(node_select_ops('RIGHTMOUSE'))
|
||||
items.extend([
|
||||
("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", False)]}),
|
||||
{"properties": [("extend", False), ("deselect_all", False)]}),
|
||||
("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
])
|
||||
@@ -1875,7 +1887,8 @@ def km_node_editor(params):
|
||||
*_template_items_select_actions(params, "node.select_all"),
|
||||
("node.select_linked_to", {"type": 'L', "value": 'PRESS', "shift": True}, None),
|
||||
("node.select_linked_from", {"type": 'L', "value": 'PRESS'}, None),
|
||||
("node.select_grouped", {"type": 'G', "value": 'PRESS', "shift": True}, None),
|
||||
("node.select_grouped", {"type": 'G', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", False)]}),
|
||||
("node.select_grouped", {"type": 'G', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("node.select_same_type_step", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True},
|
||||
@@ -1896,19 +1909,19 @@ def km_node_editor(params):
|
||||
("node.clipboard_paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None),
|
||||
("node.viewer_border", {"type": 'B', "value": 'PRESS', "ctrl": True}, None),
|
||||
("node.clear_viewer_border", {"type": 'B', "value": 'PRESS', "ctrl": True, "alt": True}, None),
|
||||
("node.translate_attach", {"type": 'G', "value": 'PRESS'}, {"properties": [("TRANSFORM_OT_translate", [("view2d_edge_pan", True)])]}),
|
||||
("node.translate_attach", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, {"properties": [("TRANSFORM_OT_translate", [("view2d_edge_pan", True)])]}),
|
||||
("node.translate_attach", {"type": params.select_tweak, "value": 'ANY'}, {"properties": [("TRANSFORM_OT_translate", [("view2d_edge_pan", True)])]}),
|
||||
("transform.translate", {"type": 'G', "value": 'PRESS'}, {"properties": [("view2d_edge_pan", True)]}),
|
||||
("node.translate_attach", {"type": 'G', "value": 'PRESS'}, None),
|
||||
("node.translate_attach", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, None),
|
||||
("node.translate_attach", {"type": params.select_tweak, "value": 'ANY'}, None),
|
||||
("transform.translate", {"type": 'G', "value": 'PRESS'}, None),
|
||||
("transform.translate", {"type": 'EVT_TWEAK_L', "value": 'ANY'},
|
||||
{"properties": [("release_confirm", True), ("view2d_edge_pan", True)]}),
|
||||
{"properties": [("release_confirm", True)]}),
|
||||
("transform.translate", {"type": params.select_tweak, "value": 'ANY'},
|
||||
{"properties": [("release_confirm", True), ("view2d_edge_pan", True)]}),
|
||||
{"properties": [("release_confirm", True)]}),
|
||||
("transform.rotate", {"type": 'R', "value": 'PRESS'}, None),
|
||||
("transform.resize", {"type": 'S', "value": 'PRESS'}, None),
|
||||
("node.move_detach_links", {"type": 'D', "value": 'PRESS', "alt": True}, {"properties": [("TRANSFORM_OT_translate", [("view2d_edge_pan", True)])]}),
|
||||
("node.move_detach_links_release", {"type": params.action_tweak, "value": 'ANY', "alt": True}, {"properties": [("NODE_OT_translate_attach", [("TRANSFORM_OT_translate", [("view2d_edge_pan", True)])])]}),
|
||||
("node.move_detach_links", {"type": params.select_tweak, "value": 'ANY', "alt": True}, {"properties": [("TRANSFORM_OT_translate", [("view2d_edge_pan", True)])]}),
|
||||
("node.move_detach_links", {"type": 'D', "value": 'PRESS', "alt": True}, None),
|
||||
("node.move_detach_links_release", {"type": params.action_tweak, "value": 'ANY', "alt": True}, None),
|
||||
("node.move_detach_links", {"type": params.select_tweak, "value": 'ANY', "alt": True}, None),
|
||||
("wm.context_toggle", {"type": 'TAB', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_snap')]}),
|
||||
("wm.context_menu_enum", {"type": 'TAB', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
@@ -2118,27 +2131,29 @@ def km_dopesheet(params):
|
||||
|
||||
items.extend([
|
||||
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [
|
||||
("extend", False), ("deselect_all", not params.legacy),
|
||||
("column", False), ("channel", False)]}),
|
||||
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "alt": True},
|
||||
{"properties": [("column", True)]}),
|
||||
{"properties": [("extend", False), ("column", True), ("channel", False)]}),
|
||||
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
{"properties": [("extend", True), ("column", False), ("channel", False)]}),
|
||||
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True},
|
||||
{"properties": [("extend", True), ("column", True)]}),
|
||||
{"properties": [("extend", True), ("column", True), ("channel", False)]}),
|
||||
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("channel", True)]}),
|
||||
{"properties": [("extend", False), ("column", False), ("channel", True)]}),
|
||||
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True},
|
||||
{"properties": [("extend", True), ("channel", True)]}),
|
||||
{"properties": [("extend", True), ("column", False), ("channel", True)]}),
|
||||
("action.select_leftright",
|
||||
{"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True},
|
||||
{"properties": [("mode", 'CHECK')]}),
|
||||
{"properties": [("mode", 'CHECK'), ("extend", False)]}),
|
||||
("action.select_leftright",
|
||||
{"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True, "shift": True},
|
||||
{"properties": [("mode", 'CHECK'), ("extend", True)]}),
|
||||
("action.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'LEFT')]}),
|
||||
{"properties": [("mode", 'LEFT'), ("extend", False)]}),
|
||||
("action.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'RIGHT')]}),
|
||||
{"properties": [("mode", 'RIGHT'), ("extend", False)]}),
|
||||
*_template_items_select_actions(params, "action.select_all"),
|
||||
("action.select_box", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("axis_range", False)]}),
|
||||
@@ -2249,7 +2264,8 @@ def km_nla_channels(params):
|
||||
)
|
||||
|
||||
items.extend([
|
||||
("nla.channels_click", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("nla.channels_click", {"type": 'LEFTMOUSE', "value": 'PRESS'},
|
||||
{"properties": [("extend", False)]}),
|
||||
("nla.channels_click", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("nla.tracks_add", {"type": 'A', "value": 'PRESS', "shift": True},
|
||||
@@ -2274,19 +2290,19 @@ def km_nla_editor(params):
|
||||
|
||||
items.extend([
|
||||
("nla.click_select", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
|
||||
("nla.click_select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("nla.select_leftright",
|
||||
{"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True},
|
||||
{"properties": [("mode", 'CHECK')]}),
|
||||
{"properties": [("mode", 'CHECK'), ("extend", False)]}),
|
||||
("nla.select_leftright",
|
||||
{"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True, "shift": True},
|
||||
{"properties": [("mode", 'CHECK'), ("extend", True)]}),
|
||||
("nla.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'LEFT')]}),
|
||||
{"properties": [("mode", 'LEFT'), ("extend", False)]}),
|
||||
("nla.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'RIGHT')]}),
|
||||
{"properties": [("mode", 'RIGHT'), ("extend", False)]}),
|
||||
*_template_items_select_actions(params, "nla.select_all"),
|
||||
("nla.select_box", {"type": 'B', "value": 'PRESS'},
|
||||
{"properties": [("axis_range", False)]}),
|
||||
@@ -2482,7 +2498,7 @@ def km_text(params):
|
||||
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
|
||||
("text.delete", {"type": 'DEL', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
{"properties": [("type", 'NEXT_WORD')]}),
|
||||
("text.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True, "repeat": True},
|
||||
("text.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("type", 'PREVIOUS_WORD')]}),
|
||||
("text.overwrite_toggle", {"type": 'INSERT', "value": 'PRESS'}, None),
|
||||
("text.scroll_bar", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
@@ -2606,7 +2622,8 @@ def km_sequencer(params):
|
||||
for i in range(10)
|
||||
)
|
||||
),
|
||||
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS'}, None),
|
||||
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", True)]}),
|
||||
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "alt": True},
|
||||
@@ -2621,7 +2638,8 @@ def km_sequencer(params):
|
||||
{"properties": [("side_of_frame", True), ("linked_time", True), ("extend", True)]}),
|
||||
("sequencer.select_more", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
("sequencer.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
|
||||
("sequencer.select_linked_pick", {"type": 'L', "value": 'PRESS'}, None),
|
||||
("sequencer.select_linked_pick", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("extend", False)]}),
|
||||
("sequencer.select_linked_pick", {"type": 'L', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("sequencer.select_linked", {"type": 'L', "value": 'PRESS', "ctrl": True}, None),
|
||||
@@ -2844,7 +2862,7 @@ def km_clip_editor(params):
|
||||
{"properties": [("position", 'PATHSTART')]}),
|
||||
("clip.change_frame", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("clip.select", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
|
||||
("clip.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
*_template_items_select_actions(params, "clip.select_all"),
|
||||
@@ -2930,7 +2948,8 @@ def km_clip_graph_editor(params):
|
||||
)
|
||||
|
||||
items.extend([
|
||||
("clip.graph_select", {"type": params.select_mouse, "value": 'PRESS'}, None),
|
||||
("clip.graph_select", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("extend", False)]}),
|
||||
("clip.graph_select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
*_template_items_select_actions(params, "clip.graph_select_all_markers"),
|
||||
@@ -4222,7 +4241,8 @@ def km_paint_curve(params):
|
||||
|
||||
items.extend([
|
||||
("paintcurve.add_point_slide", {"type": params.action_mouse, "value": 'PRESS', "ctrl": True}, None),
|
||||
("paintcurve.select", {"type": params.select_mouse, "value": 'PRESS'}, None),
|
||||
("paintcurve.select", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("extend", False)]}),
|
||||
("paintcurve.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("paintcurve.slide", {"type": params.action_mouse, "value": 'PRESS'},
|
||||
@@ -4299,28 +4319,6 @@ def km_curve(params):
|
||||
|
||||
# Radial control setup helpers, this operator has a lot of properties.
|
||||
|
||||
def radial_control_properties_channels(paint, prop, secondary_prop, secondary_rotation=False, color=False, zoom=False, type="float"):
|
||||
brush_path = 'tool_settings.' + paint + '.brush'
|
||||
channels_path = brush_path + ".channels.channels"
|
||||
unified = "tool_settings." + paint + ".channels.channels"
|
||||
|
||||
rotation = 'mask_texture_slot_angle' if secondary_rotation else 'texture_slot_angle'
|
||||
return {
|
||||
"properties": [
|
||||
("data_path_primary", '%s["%s"].%s_value' % (channels_path, prop, type)),
|
||||
("data_path_secondary", '%s["%s"].%s_value' % (unified, prop, type) if secondary_prop else ''),
|
||||
("use_secondary", '%s["%s"].inherit' % (channels_path, prop) if secondary_prop else ''),
|
||||
#("rotation_path", '%s["%s"].float_value' % (channels_path, rotation)),
|
||||
#("color_path", brush_path + '.cursor_color_add'),
|
||||
#("fill_color_path", brush_path + '.color' if color else ''),
|
||||
#("fill_color_override_path", unified_path + '.color' if color else ''),
|
||||
#("fill_color_override_test_path", unified_path + '.use_unified_color' if color else ''),
|
||||
#("zoom_path", 'space_data.zoom' if zoom else ''),
|
||||
#("image_id", brush_path + ''),
|
||||
#("secondary_tex", secondary_rotation),
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def radial_control_properties(paint, prop, secondary_prop, secondary_rotation=False, color=False, zoom=False):
|
||||
brush_path = 'tool_settings.' + paint + '.brush'
|
||||
@@ -4370,32 +4368,6 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal
|
||||
return items
|
||||
|
||||
|
||||
def _template_paint_radial_control_channels(paint, rotation=False, secondary_rotation=False, color=False, zoom=False):
|
||||
items = []
|
||||
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS'},
|
||||
radial_control_properties_channels(paint, 'radius', 'use_unified_size', type="float", secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
radial_control_properties_channels(paint, 'strength', 'use_unified_strength', type="factor", secondary_rotation=secondary_rotation, color=color)),
|
||||
])
|
||||
|
||||
"""
|
||||
if rotation:
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
radial_control_properties_channels(paint, 'texture_slot_angle', None, color=color)),
|
||||
])
|
||||
|
||||
if secondary_rotation:
|
||||
items.extend([
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
radial_control_properties_channels(paint, 'mask_texture_slot_angle', None, secondary_rotation=secondary_rotation, color=color)),
|
||||
])
|
||||
"""
|
||||
|
||||
return items
|
||||
|
||||
def km_image_paint(params):
|
||||
items = []
|
||||
keymap = (
|
||||
@@ -4563,9 +4535,6 @@ def km_sculpt(params):
|
||||
{"properties": [("mode", 'INVERT')]}),
|
||||
("sculpt.brush_stroke", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SMOOTH')]}),
|
||||
# Face Set by Topology
|
||||
("sculpt.face_set_by_topology", {"type": 'W', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("mode", "POLY_LOOP"), ("repeat_previous", True)]}),
|
||||
# Expand
|
||||
("sculpt.expand", {"type": 'A', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("target", "MASK"), ("falloff_type", "GEODESIC"), ("invert", True)]}),
|
||||
@@ -4575,8 +4544,6 @@ def km_sculpt(params):
|
||||
{"properties": [("target", "FACE_SETS"), ("falloff_type", "GEODESIC"), ("invert", False), ("use_modify_active", False)]}),
|
||||
("sculpt.expand", {"type": 'W', "value": 'PRESS', "shift": True, "alt": True},
|
||||
{"properties": [("target", "FACE_SETS"), ("falloff_type", "BOUNDARY_FACE_SET"),("invert", False), ("use_modify_active", True)]}),
|
||||
("sculpt.expand", {"type": 'W', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("target", "FACE_SETS"), ("falloff_type", "POLY_LOOP"), ("invert", False), ("use_modify_active", False)]}),
|
||||
# Partial Visibility Show/hide
|
||||
("sculpt.face_set_change_visibility", {"type": 'H', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'TOGGLE')]}),
|
||||
@@ -4584,6 +4551,10 @@ def km_sculpt(params):
|
||||
{"properties": [("mode", 'HIDE_ACTIVE')]}),
|
||||
("sculpt.face_set_change_visibility", {"type": 'H', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("mode", 'SHOW_ALL')]}),
|
||||
("sculpt.face_set_edit", {"type": 'W', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("mode", 'GROW')]}),
|
||||
("sculpt.face_set_edit", {"type": 'W', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("mode", 'SHRINK')]}),
|
||||
# Subdivision levels
|
||||
*_template_items_object_subdivision_set(),
|
||||
("object.subdivision_set", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
|
||||
@@ -4615,8 +4586,7 @@ def km_sculpt(params):
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
*_template_paint_radial_control_channels("sculpt", rotation=True),
|
||||
#*_template_paint_radial_control("sculpt", rotation=True),
|
||||
*_template_paint_radial_control("sculpt", rotation=True),
|
||||
# Stencil
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'TRANSLATION')]}),
|
||||
@@ -4694,13 +4664,15 @@ def km_mesh(params):
|
||||
# Selection modes.
|
||||
*_template_items_editmode_mesh_select_mode(params),
|
||||
# Loop Select with alt. Double click in case MMB emulation is on (below).
|
||||
("mesh.loop_select", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True}, None),
|
||||
("mesh.loop_select", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True},
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", False)]}),
|
||||
("mesh.loop_select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "alt": True},
|
||||
{"properties": [("toggle", True)]}),
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", True)]}),
|
||||
# Selection
|
||||
("mesh.edgering_select", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "alt": True}, None),
|
||||
("mesh.edgering_select", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "alt": True},
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", False)]}),
|
||||
("mesh.edgering_select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "ctrl": True, "alt": True},
|
||||
{"properties": [("toggle", True)]}),
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", True)]}),
|
||||
("mesh.shortest_path_pick", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True},
|
||||
{"properties": [("use_fill", False)]}),
|
||||
("mesh.shortest_path_pick", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "ctrl": True},
|
||||
@@ -4782,14 +4754,16 @@ def km_mesh(params):
|
||||
|
||||
if params.use_mouse_emulate_3_button and params.select_mouse == 'LEFTMOUSE':
|
||||
items.extend([
|
||||
("mesh.loop_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK'}, None),
|
||||
("mesh.loop_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK'},
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", False)]}),
|
||||
("mesh.loop_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
{"properties": [("extend", True), ("deselect", False), ("toggle", False)]}),
|
||||
("mesh.loop_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "alt": True},
|
||||
{"properties": [("deselect", True)]}),
|
||||
("mesh.edgering_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "ctrl": True}, None),
|
||||
{"properties": [("extend", False), ("deselect", True), ("toggle", False)]}),
|
||||
("mesh.edgering_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "ctrl": True},
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", False)]}),
|
||||
("mesh.edgering_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "shift": True, "ctrl": True},
|
||||
{"properties": [("toggle", True)]}),
|
||||
{"properties": [("extend", False), ("deselect", False), ("toggle", True)]}),
|
||||
])
|
||||
|
||||
if params.legacy:
|
||||
@@ -5690,8 +5664,7 @@ def km_sculpt_expand_modal(_params):
|
||||
("FALLOFF_TOPOLOGY", {"type": 'TWO', "value": 'PRESS', "any": True}, None),
|
||||
("FALLOFF_TOPOLOGY_DIAGONALS", {"type": 'THREE', "value": 'PRESS', "any": True}, None),
|
||||
("FALLOFF_SPHERICAL", {"type": 'FOUR', "value": 'PRESS', "any": True}, None),
|
||||
("SNAP_ENABLE", {"type": 'LEFT_CTRL', "value": 'PRESS'}, None),
|
||||
("SNAP_DISABLE", {"type": 'LEFT_CTRL', "value": 'RELEASE'}, None),
|
||||
("SNAP_TOGGLE", {"type": 'LEFT_CTRL', "value": 'ANY'}, None),
|
||||
("LOOP_COUNT_INCREASE", {"type": 'W', "value": 'PRESS', "any": True, "repeat": True}, None),
|
||||
("LOOP_COUNT_DECREASE", {"type": 'Q', "value": 'PRESS', "any": True, "repeat": True}, None),
|
||||
("BRUSH_GRADIENT_TOGGLE", {"type": 'B', "value": 'PRESS', "any": True}, None),
|
||||
@@ -5980,7 +5953,7 @@ def km_node_editor_tool_select(params):
|
||||
{"space_type": 'NODE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("node.select", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", not params.legacy)]}),
|
||||
{"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
|
||||
]},
|
||||
)
|
||||
|
||||
@@ -6679,26 +6652,6 @@ def km_3d_view_tool_sculpt_line_project(params):
|
||||
]},
|
||||
)
|
||||
|
||||
def km_3d_view_tool_sculpt_lasso_project(params):
|
||||
return (
|
||||
"3D View Tool: Sculpt, Lasso Project",
|
||||
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("sculpt.project_lasso_gesture", {"type": params.tool_tweak, "value": 'ANY'},
|
||||
None),
|
||||
]},
|
||||
)
|
||||
|
||||
def km_3d_view_tool_sculpt_box_project(params):
|
||||
return (
|
||||
"3D View Tool: Sculpt, Box Project",
|
||||
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("sculpt.project_box_gesture", {"type": params.tool_tweak, "value": 'ANY'},
|
||||
None),
|
||||
]},
|
||||
)
|
||||
|
||||
|
||||
def km_3d_view_tool_sculpt_mesh_filter(params):
|
||||
return (
|
||||
@@ -6710,16 +6663,6 @@ def km_3d_view_tool_sculpt_mesh_filter(params):
|
||||
]},
|
||||
)
|
||||
|
||||
def km_3d_view_tool_sculpt_ipmask_filter(params):
|
||||
return (
|
||||
"3D View Tool: Sculpt, IPMask Filter",
|
||||
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("sculpt.ipmask_filter", {"type": params.tool_tweak, "value": 'ANY'},
|
||||
None)
|
||||
]},
|
||||
)
|
||||
|
||||
|
||||
def km_3d_view_tool_sculpt_cloth_filter(params):
|
||||
return (
|
||||
@@ -7077,7 +7020,8 @@ def km_sequencer_editor_tool_select(params):
|
||||
"Sequencer Tool: Select",
|
||||
{"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'},
|
||||
{"items": [
|
||||
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS'}, None),
|
||||
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS'},
|
||||
{"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
|
||||
*_template_items_change_frame(params),
|
||||
]},
|
||||
)
|
||||
@@ -7337,10 +7281,7 @@ def generate_keymaps(params=None):
|
||||
km_3d_view_tool_sculpt_lasso_trim(params),
|
||||
km_3d_view_tool_sculpt_line_mask(params),
|
||||
km_3d_view_tool_sculpt_line_project(params),
|
||||
km_3d_view_tool_sculpt_lasso_project(params),
|
||||
km_3d_view_tool_sculpt_box_project(params),
|
||||
km_3d_view_tool_sculpt_mesh_filter(params),
|
||||
km_3d_view_tool_sculpt_ipmask_filter(params),
|
||||
km_3d_view_tool_sculpt_cloth_filter(params),
|
||||
km_3d_view_tool_sculpt_color_filter(params),
|
||||
km_3d_view_tool_sculpt_mask_by_color(params),
|
||||
|
@@ -1814,7 +1814,8 @@ def km_sequencer(params):
|
||||
for i in range(10)
|
||||
)
|
||||
),
|
||||
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS'},
|
||||
{"properties": [("deselect_all", True)]}),
|
||||
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("extend", True)]}),
|
||||
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
|
||||
|
@@ -46,7 +46,6 @@ def update_factory_startup_screens():
|
||||
def update_factory_startup_scenes():
|
||||
for scene in bpy.data.scenes:
|
||||
scene.tool_settings.use_keyframe_insert_auto = True
|
||||
scene.tool_settings.gpencil_sculpt.use_scale_thickness = True
|
||||
|
||||
|
||||
def update_factory_startup_grease_pencils():
|
||||
|
@@ -29,28 +29,9 @@ def update_factory_startup_screens():
|
||||
params.use_filter_folder = True
|
||||
|
||||
|
||||
def update_factory_startup_ffmpeg_preset():
|
||||
preset = "H264_in_MP4"
|
||||
preset_filepath = bpy.utils.preset_find(preset, preset_path="ffmpeg")
|
||||
if not preset_filepath:
|
||||
print("Preset %r not found" % preset)
|
||||
|
||||
for scene in bpy.data.scenes:
|
||||
render = scene.render
|
||||
render.image_settings.file_format = 'FFMPEG'
|
||||
|
||||
if preset_filepath:
|
||||
bpy.ops.script.python_file_run({"scene": scene}, filepath=preset_filepath)
|
||||
|
||||
render.ffmpeg.audio_codec = 'AAC'
|
||||
render.ffmpeg.audio_bitrate = 256
|
||||
|
||||
|
||||
@persistent
|
||||
def load_handler(_):
|
||||
update_factory_startup_screens()
|
||||
if bpy.app.build_options.codec_ffmpeg:
|
||||
update_factory_startup_ffmpeg_preset()
|
||||
|
||||
|
||||
def register():
|
||||
|
@@ -85,9 +85,9 @@ class ASSET_OT_open_containing_blend_file(Operator):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
asset_file_handle = getattr(context, 'asset_file_handle', None)
|
||||
asset_library_ref = getattr(context, 'asset_library_ref', None)
|
||||
asset_library = getattr(context, 'asset_library', None)
|
||||
|
||||
if not asset_library_ref:
|
||||
if not asset_library:
|
||||
cls.poll_message_set("No asset library selected")
|
||||
return False
|
||||
if not asset_file_handle:
|
||||
@@ -100,13 +100,13 @@ class ASSET_OT_open_containing_blend_file(Operator):
|
||||
|
||||
def execute(self, context):
|
||||
asset_file_handle = context.asset_file_handle
|
||||
asset_library_ref = context.asset_library_ref
|
||||
asset_library = context.asset_library
|
||||
|
||||
if asset_file_handle.local_id:
|
||||
self.report({'WARNING'}, "This asset is stored in the current blend file")
|
||||
return {'CANCELLED'}
|
||||
|
||||
asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library_ref)
|
||||
asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library)
|
||||
self.open_in_new_blender(asset_lib_path)
|
||||
|
||||
wm = context.window_manager
|
||||
|
@@ -42,8 +42,8 @@ def geometry_node_group_empty_new():
|
||||
def geometry_modifier_poll(context):
|
||||
ob = context.object
|
||||
|
||||
# Test object support for geometry node modifier (No hair object support yet)
|
||||
if not ob or ob.type not in {'MESH', 'POINTCLOUD', 'VOLUME', 'CURVE', 'FONT'}:
|
||||
# Test object support for geometry node modifier (No curve, or hair object support yet)
|
||||
if not ob or ob.type not in {'MESH', 'POINTCLOUD', 'VOLUME'}:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
@@ -970,7 +970,7 @@ class OBJECT_OT_assign_property_defaults(Operator):
|
||||
def assign_defaults(obj):
|
||||
from rna_prop_ui import rna_idprop_ui_prop_default_set
|
||||
|
||||
rna_properties = {prop.identifier for prop in obj.bl_rna.properties if prop.is_runtime}
|
||||
rna_properties = {'_RNA_UI'} | {prop.identifier for prop in obj.bl_rna.properties if prop.is_runtime}
|
||||
|
||||
for prop, value in obj.items():
|
||||
if prop not in rna_properties:
|
||||
|
@@ -37,19 +37,20 @@ class SequencerCrossfadeSounds(Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
strip = context.active_sequence_strip
|
||||
return strip and (strip.type == 'SOUND')
|
||||
if context.scene and context.scene.sequence_editor and context.scene.sequence_editor.active_strip:
|
||||
return context.scene.sequence_editor.active_strip.type == 'SOUND'
|
||||
else:
|
||||
return False
|
||||
|
||||
def execute(self, context):
|
||||
scene = context.scene
|
||||
seq1 = None
|
||||
seq2 = None
|
||||
for strip in scene.sequence_editor.sequences:
|
||||
if strip.select and strip.type == 'SOUND':
|
||||
for s in context.scene.sequence_editor.sequences:
|
||||
if s.select and s.type == 'SOUND':
|
||||
if seq1 is None:
|
||||
seq1 = strip
|
||||
seq1 = s
|
||||
elif seq2 is None:
|
||||
seq2 = strip
|
||||
seq2 = s
|
||||
else:
|
||||
seq2 = None
|
||||
break
|
||||
@@ -57,19 +58,21 @@ class SequencerCrossfadeSounds(Operator):
|
||||
self.report({'ERROR'}, "Select 2 sound strips")
|
||||
return {'CANCELLED'}
|
||||
if seq1.frame_final_start > seq2.frame_final_start:
|
||||
seq1, seq2 = seq2, seq1
|
||||
s = seq1
|
||||
seq1 = seq2
|
||||
seq2 = s
|
||||
if seq1.frame_final_end > seq2.frame_final_start:
|
||||
tempcfra = scene.frame_current
|
||||
scene.frame_current = seq2.frame_final_start
|
||||
tempcfra = context.scene.frame_current
|
||||
context.scene.frame_current = seq2.frame_final_start
|
||||
seq1.keyframe_insert("volume")
|
||||
scene.frame_current = seq1.frame_final_end
|
||||
context.scene.frame_current = seq1.frame_final_end
|
||||
seq1.volume = 0
|
||||
seq1.keyframe_insert("volume")
|
||||
seq2.keyframe_insert("volume")
|
||||
scene.frame_current = seq2.frame_final_start
|
||||
context.scene.frame_current = seq2.frame_final_start
|
||||
seq2.volume = 0
|
||||
seq2.keyframe_insert("volume")
|
||||
scene.frame_current = tempcfra
|
||||
context.scene.frame_current = tempcfra
|
||||
return {'FINISHED'}
|
||||
else:
|
||||
self.report({'ERROR'}, "The selected strips don't overlap")
|
||||
@@ -92,27 +95,28 @@ class SequencerSplitMulticam(Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
strip = context.active_sequence_strip
|
||||
return strip and (strip.type == 'MULTICAM')
|
||||
if context.scene and context.scene.sequence_editor and context.scene.sequence_editor.active_strip:
|
||||
return context.scene.sequence_editor.active_strip.type == 'MULTICAM'
|
||||
else:
|
||||
return False
|
||||
|
||||
def execute(self, context):
|
||||
scene = context.scene
|
||||
camera = self.camera
|
||||
|
||||
strip = context.active_sequence_strip
|
||||
s = context.scene.sequence_editor.active_strip
|
||||
|
||||
if strip.multicam_source == camera or camera >= strip.channel:
|
||||
if s.multicam_source == camera or camera >= s.channel:
|
||||
return {'FINISHED'}
|
||||
|
||||
cfra = scene.frame_current
|
||||
right_strip = strip.split(frame=cfra, split_method='SOFT')
|
||||
cfra = context.scene.frame_current
|
||||
right_strip = s.split(frame=cfra, split_method='SOFT')
|
||||
|
||||
if right_strip:
|
||||
strip.select = False
|
||||
s.select = False
|
||||
right_strip.select = True
|
||||
scene.sequence_editor.active_strip = right_strip
|
||||
context.scene.sequence_editor.active_strip = right_strip
|
||||
|
||||
context.active_sequence_strip.multicam_source = camera
|
||||
context.scene.sequence_editor.active_strip.multicam_source = camera
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
@@ -125,13 +129,12 @@ class SequencerDeinterlaceSelectedMovies(Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
scene = context.scene
|
||||
return (scene and scene.sequence_editor)
|
||||
return (context.scene and context.scene.sequence_editor)
|
||||
|
||||
def execute(self, context):
|
||||
for strip in context.scene.sequence_editor.sequences_all:
|
||||
if strip.select and strip.type == 'MOVIE':
|
||||
strip.use_deinterlace = True
|
||||
for s in context.scene.sequence_editor.sequences_all:
|
||||
if s.select and s.type == 'MOVIE':
|
||||
s.use_deinterlace = True
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
@@ -144,12 +147,10 @@ class SequencerFadesClear(Operator):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
strip = context.active_sequence_strip
|
||||
return strip is not None
|
||||
return context.scene and context.scene.sequence_editor and context.scene.sequence_editor.active_strip
|
||||
|
||||
def execute(self, context):
|
||||
scene = context.scene
|
||||
animation_data = scene.animation_data
|
||||
animation_data = context.scene.animation_data
|
||||
if animation_data is None:
|
||||
return {'CANCELLED'}
|
||||
action = animation_data.action
|
||||
@@ -201,8 +202,7 @@ class SequencerFadesAdd(Operator):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
# Can't use context.selected_sequences as it can have an impact on performances
|
||||
strip = context.active_sequence_strip
|
||||
return strip is not None
|
||||
return context.scene and context.scene.sequence_editor and context.scene.sequence_editor.active_strip
|
||||
|
||||
def execute(self, context):
|
||||
from math import floor
|
||||
@@ -218,11 +218,11 @@ class SequencerFadesAdd(Operator):
|
||||
sequences = context.selected_sequences
|
||||
if self.type in {'CURSOR_TO', 'CURSOR_FROM'}:
|
||||
sequences = [
|
||||
strip for strip in sequences
|
||||
if strip.frame_final_start < scene.frame_current < strip.frame_final_end
|
||||
s for s in sequences
|
||||
if s.frame_final_start < context.scene.frame_current < s.frame_final_end
|
||||
]
|
||||
|
||||
max_duration = min(sequences, key=lambda strip: strip.frame_final_duration).frame_final_duration
|
||||
max_duration = min(sequences, key=lambda s: s.frame_final_duration).frame_final_duration
|
||||
max_duration = floor(max_duration / 2.0) if self.type == 'IN_OUT' else max_duration
|
||||
|
||||
faded_sequences = []
|
||||
@@ -245,15 +245,14 @@ class SequencerFadesAdd(Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
def calculate_fade_duration(self, context, sequence):
|
||||
scene = context.scene
|
||||
frame_current = scene.frame_current
|
||||
frame_current = context.scene.frame_current
|
||||
duration = 0.0
|
||||
if self.type == 'CURSOR_TO':
|
||||
duration = abs(frame_current - sequence.frame_final_start)
|
||||
elif self.type == 'CURSOR_FROM':
|
||||
duration = abs(sequence.frame_final_end - frame_current)
|
||||
else:
|
||||
duration = calculate_duration_frames(scene, self.duration_seconds)
|
||||
duration = calculate_duration_frames(context, self.duration_seconds)
|
||||
return max(1, duration)
|
||||
|
||||
def is_long_enough(self, sequence, duration=0.0):
|
||||
@@ -279,9 +278,8 @@ class SequencerFadesAdd(Operator):
|
||||
that corresponds to the sequence.
|
||||
Returns the matching FCurve or creates a new one if the function can't find a match.
|
||||
"""
|
||||
scene = context.scene
|
||||
fade_fcurve = None
|
||||
fcurves = scene.animation_data.action.fcurves
|
||||
fcurves = context.scene.animation_data.action.fcurves
|
||||
searched_data_path = sequence.path_from_id(animated_property)
|
||||
for fcurve in fcurves:
|
||||
if fcurve.data_path == searched_data_path:
|
||||
@@ -374,8 +372,8 @@ class Fade:
|
||||
return "Fade %r: %r to %r" % (self.type, self.start, self.end)
|
||||
|
||||
|
||||
def calculate_duration_frames(scene, duration_seconds):
|
||||
return round(duration_seconds * scene.render.fps / scene.render.fps_base)
|
||||
def calculate_duration_frames(context, duration_seconds):
|
||||
return round(duration_seconds * context.scene.render.fps / context.scene.render.fps_base)
|
||||
|
||||
|
||||
classes = (
|
||||
|
@@ -1367,32 +1367,31 @@ class WM_OT_properties_edit(Operator):
|
||||
}
|
||||
|
||||
def get_value_eval(self):
|
||||
failed = False
|
||||
try:
|
||||
value_eval = eval(self.value)
|
||||
# assert else None -> None, not "None", see T33431.
|
||||
assert(type(value_eval) in {str, float, int, bool, tuple, list})
|
||||
except:
|
||||
failed = True
|
||||
value_eval = self.value
|
||||
|
||||
return value_eval, failed
|
||||
return value_eval
|
||||
|
||||
def get_default_eval(self):
|
||||
failed = False
|
||||
try:
|
||||
default_eval = eval(self.default)
|
||||
# assert else None -> None, not "None", see T33431.
|
||||
assert(type(default_eval) in {str, float, int, bool, tuple, list})
|
||||
except:
|
||||
failed = True
|
||||
default_eval = self.default
|
||||
|
||||
return default_eval, failed
|
||||
return default_eval
|
||||
|
||||
def execute(self, context):
|
||||
from rna_prop_ui import (
|
||||
rna_idprop_ui_prop_get,
|
||||
rna_idprop_ui_prop_clear,
|
||||
rna_idprop_ui_prop_update,
|
||||
rna_idprop_ui_prop_default_set,
|
||||
rna_idprop_value_item_type,
|
||||
)
|
||||
|
||||
@@ -1406,8 +1405,8 @@ class WM_OT_properties_edit(Operator):
|
||||
self.report({'ERROR'}, "Direct execution not supported")
|
||||
return {'CANCELLED'}
|
||||
|
||||
value_eval, value_failed = self.get_value_eval()
|
||||
default_eval, default_failed = self.get_default_eval()
|
||||
value_eval = self.get_value_eval()
|
||||
default_eval = self.get_default_eval()
|
||||
|
||||
# First remove
|
||||
item = eval("context.%s" % data_path)
|
||||
@@ -1418,7 +1417,7 @@ class WM_OT_properties_edit(Operator):
|
||||
|
||||
prop_type_old = type(item[prop_old])
|
||||
|
||||
# Deleting the property will also remove the UI data.
|
||||
rna_idprop_ui_prop_clear(item, prop_old)
|
||||
del item[prop_old]
|
||||
|
||||
# Reassign
|
||||
@@ -1432,43 +1431,27 @@ class WM_OT_properties_edit(Operator):
|
||||
prop_type_new = type(prop_value)
|
||||
prop_type, is_array = rna_idprop_value_item_type(prop_value)
|
||||
|
||||
if prop_type == int:
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
if type(default_eval) == str:
|
||||
self.report({'WARNING'}, "Could not evaluate number from default value")
|
||||
default_eval = None
|
||||
elif hasattr(default_eval, "__len__"):
|
||||
default_eval = [int(round(value)) for value in default_eval]
|
||||
ui_data.update(
|
||||
min=int(round(self.min)),
|
||||
max=int(round(self.max)),
|
||||
soft_min=int(round(self.soft_min)),
|
||||
soft_max=int(round(self.soft_max)),
|
||||
default=default_eval,
|
||||
subtype=self.subtype,
|
||||
description=self.description
|
||||
)
|
||||
elif prop_type == float:
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
if type(default_eval) == str:
|
||||
self.report({'WARNING'}, "Could not evaluate number from default value")
|
||||
default_eval = None
|
||||
ui_data.update(
|
||||
min=self.min,
|
||||
max=self.max,
|
||||
soft_min=self.soft_min,
|
||||
soft_max=self.soft_max,
|
||||
default=default_eval,
|
||||
subtype=self.subtype,
|
||||
description=self.description
|
||||
)
|
||||
elif prop_type == str and not is_array and not default_failed: # String arrays do not support UI data.
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
ui_data.update(
|
||||
default=self.default,
|
||||
subtype=self.subtype,
|
||||
description=self.description
|
||||
)
|
||||
prop_ui = rna_idprop_ui_prop_get(item, prop)
|
||||
|
||||
if prop_type in {float, int}:
|
||||
prop_ui["min"] = prop_type(self.min)
|
||||
prop_ui["max"] = prop_type(self.max)
|
||||
|
||||
if self.use_soft_limits:
|
||||
prop_ui["soft_min"] = prop_type(self.soft_min)
|
||||
prop_ui["soft_max"] = prop_type(self.soft_max)
|
||||
else:
|
||||
prop_ui["soft_min"] = prop_type(self.min)
|
||||
prop_ui["soft_max"] = prop_type(self.max)
|
||||
|
||||
if prop_type == float and is_array and self.subtype != 'NONE':
|
||||
prop_ui["subtype"] = self.subtype
|
||||
else:
|
||||
prop_ui.pop("subtype", None)
|
||||
|
||||
prop_ui["description"] = self.description
|
||||
|
||||
rna_idprop_ui_prop_default_set(item, prop, default_eval)
|
||||
|
||||
# If we have changed the type of the property, update its potential anim curves!
|
||||
if prop_type_old != prop_type_new:
|
||||
@@ -1509,6 +1492,7 @@ class WM_OT_properties_edit(Operator):
|
||||
|
||||
def invoke(self, context, _event):
|
||||
from rna_prop_ui import (
|
||||
rna_idprop_ui_prop_get,
|
||||
rna_idprop_value_to_python,
|
||||
rna_idprop_value_item_type
|
||||
)
|
||||
@@ -1535,34 +1519,35 @@ class WM_OT_properties_edit(Operator):
|
||||
self.is_overridable_library = bool(is_overridable)
|
||||
|
||||
# default default value
|
||||
value, value_failed = self.get_value_eval()
|
||||
prop_type, is_array = rna_idprop_value_item_type(value)
|
||||
prop_type, is_array = rna_idprop_value_item_type(self.get_value_eval())
|
||||
if prop_type in {int, float}:
|
||||
self.default = str(prop_type(0))
|
||||
else:
|
||||
self.default = ""
|
||||
|
||||
# setup defaults
|
||||
if prop_type in {int, float}:
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
rna_data = ui_data.as_dict()
|
||||
self.subtype = rna_data["subtype"]
|
||||
self.min = rna_data["min"]
|
||||
self.max = rna_data["max"]
|
||||
self.soft_min = rna_data["soft_min"]
|
||||
self.soft_max = rna_data["soft_max"]
|
||||
prop_ui = rna_idprop_ui_prop_get(item, prop, create=False)
|
||||
if prop_ui:
|
||||
self.min = prop_ui.get("min", -1000000000)
|
||||
self.max = prop_ui.get("max", 1000000000)
|
||||
self.description = prop_ui.get("description", "")
|
||||
|
||||
defval = prop_ui.get("default", None)
|
||||
if defval is not None:
|
||||
self.default = str(rna_idprop_value_to_python(defval))
|
||||
|
||||
self.soft_min = prop_ui.get("soft_min", self.min)
|
||||
self.soft_max = prop_ui.get("soft_max", self.max)
|
||||
self.use_soft_limits = (
|
||||
self.min != self.soft_min or
|
||||
self.max != self.soft_max
|
||||
)
|
||||
self.default = str(rna_data["default"])
|
||||
if prop_type == str and not is_array and not value_failed: # String arrays do not support UI data.
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
rna_data = ui_data.as_dict()
|
||||
self.subtype = rna_data["subtype"]
|
||||
self.default = str(rna_data["default"])
|
||||
|
||||
self._init_subtype(prop_type, is_array, self.subtype)
|
||||
subtype = prop_ui.get("subtype", None)
|
||||
else:
|
||||
subtype = None
|
||||
|
||||
self._init_subtype(prop_type, is_array, subtype)
|
||||
|
||||
# store for comparison
|
||||
self._cmp_props = self._cmp_props_get()
|
||||
@@ -1703,6 +1688,7 @@ class WM_OT_properties_remove(Operator):
|
||||
|
||||
def execute(self, context):
|
||||
from rna_prop_ui import (
|
||||
rna_idprop_ui_prop_clear,
|
||||
rna_idprop_ui_prop_update,
|
||||
)
|
||||
data_path = self.data_path
|
||||
@@ -1715,6 +1701,7 @@ class WM_OT_properties_remove(Operator):
|
||||
prop = self.property
|
||||
rna_idprop_ui_prop_update(item, prop)
|
||||
del item[prop]
|
||||
rna_idprop_ui_prop_clear(item, prop)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
@@ -120,6 +120,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
|
||||
sub = col.column()
|
||||
sub.active = (curve.dimensions == '2D' or (curve.bevel_mode != 'OBJECT' and curve.dimensions == '3D'))
|
||||
sub.prop(curve, "fill_mode")
|
||||
col.prop(curve, "use_fill_deform")
|
||||
|
||||
if is_curve:
|
||||
col = layout.column()
|
||||
|
@@ -342,11 +342,6 @@ class DATA_PT_gpencil_vertex_groups(ObjectButtonsPanel, Panel):
|
||||
col.operator("object.vertex_group_add", icon='ADD', text="")
|
||||
col.operator("object.vertex_group_remove", icon='REMOVE', text="").all = False
|
||||
|
||||
if group:
|
||||
col.separator()
|
||||
col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
|
||||
col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
|
||||
|
||||
if ob.vertex_groups:
|
||||
row = layout.row()
|
||||
|
||||
|
@@ -522,7 +522,6 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
|
||||
col.prop(mesh, "use_remesh_preserve_volume", text="Volume")
|
||||
col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask")
|
||||
col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets")
|
||||
col.prop(mesh, "use_remesh_preserve_materials", text="Materials")
|
||||
if context.preferences.experimental.use_sculpt_vertex_colors:
|
||||
col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors")
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -85,6 +85,9 @@ class GreasePencilSculptOptionsPanel:
|
||||
layout.prop(gp_settings, "use_edit_strength", text="Affect Strength")
|
||||
layout.prop(gp_settings, "use_edit_thickness", text="Affect Thickness")
|
||||
|
||||
if tool == 'SMOOTH':
|
||||
layout.prop(gp_settings, "use_edit_pressure")
|
||||
|
||||
layout.prop(gp_settings, "use_edit_uv", text="Affect UV")
|
||||
|
||||
|
||||
@@ -451,7 +454,7 @@ class AnnotationDataPanel:
|
||||
|
||||
tool_settings = context.tool_settings
|
||||
if gpd and gpl:
|
||||
layout.prop(gpl, "annotation_opacity", text="Opacity", slider=True)
|
||||
layout.prop(gpl, "opacity", text="Opacity", slider=True)
|
||||
layout.prop(gpl, "thickness")
|
||||
else:
|
||||
layout.prop(tool_settings, "annotation_thickness", text="Thickness")
|
||||
|
@@ -417,7 +417,6 @@ class MASK_MT_select(Menu):
|
||||
|
||||
layout.operator("mask.select_box")
|
||||
layout.operator("mask.select_circle")
|
||||
layout.operator_menu_enum("mask.select_lasso", "mode")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@@ -267,8 +267,7 @@ class OBJECT_PT_instancing(ObjectButtonsPanel, Panel):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
ob = context.object
|
||||
# FONT objects need (vertex) instancing for the 'Object Font' feature
|
||||
return (ob.type in {'MESH', 'EMPTY', 'POINTCLOUD', 'FONT'})
|
||||
return (ob.type in {'MESH', 'EMPTY', 'POINTCLOUD'})
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@@ -25,8 +25,8 @@ from bl_ui.utils import PresetPanel
|
||||
from bpy.app.translations import pgettext_tip as tip_
|
||||
|
||||
|
||||
class RENDER_PT_format_presets(PresetPanel, Panel):
|
||||
bl_label = "Format Presets"
|
||||
class RENDER_PT_presets(PresetPanel, Panel):
|
||||
bl_label = "Render Presets"
|
||||
preset_subdir = "render"
|
||||
preset_operator = "script.execute_preset"
|
||||
preset_add_operator = "render.preset_add"
|
||||
@@ -56,21 +56,21 @@ class RenderOutputButtonsPanel:
|
||||
return (context.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class RENDER_PT_format(RenderOutputButtonsPanel, Panel):
|
||||
bl_label = "Format"
|
||||
class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel):
|
||||
bl_label = "Dimensions"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
_frame_rate_args_prev = None
|
||||
_preset_class = None
|
||||
|
||||
def draw_header_preset(self, _context):
|
||||
RENDER_PT_format_presets.draw_panel_header(self.layout)
|
||||
RENDER_PT_presets.draw_panel_header(self.layout)
|
||||
|
||||
@staticmethod
|
||||
def _draw_framerate_label(*args):
|
||||
# avoids re-creating text string each draw
|
||||
if RENDER_PT_format._frame_rate_args_prev == args:
|
||||
return RENDER_PT_format._frame_rate_ret
|
||||
if RENDER_PT_dimensions._frame_rate_args_prev == args:
|
||||
return RENDER_PT_dimensions._frame_rate_ret
|
||||
|
||||
fps, fps_base, preset_label = args
|
||||
|
||||
@@ -89,17 +89,17 @@ class RENDER_PT_format(RenderOutputButtonsPanel, Panel):
|
||||
fps_label_text = tip_("%.4g fps") % fps_rate
|
||||
show_framerate = (preset_label == "Custom")
|
||||
|
||||
RENDER_PT_format._frame_rate_args_prev = args
|
||||
RENDER_PT_format._frame_rate_ret = args = (fps_label_text, show_framerate)
|
||||
RENDER_PT_dimensions._frame_rate_args_prev = args
|
||||
RENDER_PT_dimensions._frame_rate_ret = args = (fps_label_text, show_framerate)
|
||||
return args
|
||||
|
||||
@staticmethod
|
||||
def draw_framerate(layout, rd):
|
||||
if RENDER_PT_format._preset_class is None:
|
||||
RENDER_PT_format._preset_class = bpy.types.RENDER_MT_framerate_presets
|
||||
if RENDER_PT_dimensions._preset_class is None:
|
||||
RENDER_PT_dimensions._preset_class = bpy.types.RENDER_MT_framerate_presets
|
||||
|
||||
args = rd.fps, rd.fps_base, RENDER_PT_format._preset_class.bl_label
|
||||
fps_label_text, show_framerate = RENDER_PT_format._draw_framerate_label(*args)
|
||||
args = rd.fps, rd.fps_base, RENDER_PT_dimensions._preset_class.bl_label
|
||||
fps_label_text, show_framerate = RENDER_PT_dimensions._draw_framerate_label(*args)
|
||||
|
||||
layout.menu("RENDER_MT_framerate_presets", text=fps_label_text)
|
||||
|
||||
@@ -113,7 +113,8 @@ class RENDER_PT_format(RenderOutputButtonsPanel, Panel):
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False # No animation.
|
||||
|
||||
rd = context.scene.render
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(rd, "resolution_x", text="Resolution X")
|
||||
@@ -130,30 +131,18 @@ class RENDER_PT_format(RenderOutputButtonsPanel, Panel):
|
||||
sub.active = rd.use_border
|
||||
sub.prop(rd, "use_crop_to_border")
|
||||
|
||||
col = layout.column(heading="Frame Rate")
|
||||
self.draw_framerate(col, rd)
|
||||
|
||||
|
||||
class RENDER_PT_frame_range(RenderOutputButtonsPanel, Panel):
|
||||
bl_label = "Frame Range"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False # No animation.
|
||||
|
||||
scene = context.scene
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(scene, "frame_start", text="Frame Start")
|
||||
col.prop(scene, "frame_end", text="End")
|
||||
col.prop(scene, "frame_step", text="Step")
|
||||
|
||||
col = layout.column(heading="Frame Rate")
|
||||
self.draw_framerate(col, rd)
|
||||
|
||||
class RENDER_PT_time_stretching(RenderOutputButtonsPanel, Panel):
|
||||
bl_label = "Time Stretching"
|
||||
bl_parent_id = "RENDER_PT_frame_range"
|
||||
|
||||
class RENDER_PT_frame_remapping(RenderOutputButtonsPanel, Panel):
|
||||
bl_label = "Time Remapping"
|
||||
bl_parent_id = "RENDER_PT_dimensions"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@@ -492,12 +481,11 @@ class RENDER_PT_stereoscopy(RenderOutputButtonsPanel, Panel):
|
||||
|
||||
|
||||
classes = (
|
||||
RENDER_PT_format_presets,
|
||||
RENDER_PT_presets,
|
||||
RENDER_PT_ffmpeg_presets,
|
||||
RENDER_MT_framerate_presets,
|
||||
RENDER_PT_format,
|
||||
RENDER_PT_frame_range,
|
||||
RENDER_PT_time_stretching,
|
||||
RENDER_PT_dimensions,
|
||||
RENDER_PT_frame_remapping,
|
||||
RENDER_PT_stereoscopy,
|
||||
RENDER_PT_output,
|
||||
RENDER_PT_output_views,
|
||||
|
@@ -19,16 +19,6 @@
|
||||
# <pep8 compliant>
|
||||
from bpy.types import Menu
|
||||
|
||||
channel_name_map = {
|
||||
"size" : "radius",
|
||||
"autosmooth_fset_slide":"fset_slide",
|
||||
"auto_smooth_factor": "autosmooth",
|
||||
"auto_smooth_projection": "autosmooth_projection",
|
||||
"auto_smooth_radius_factor": "autosmooth_radius_scale",
|
||||
"boundary_smooth_factor": "boundary_smooth",
|
||||
"autosmooth_fset_slide": "fset_slide",
|
||||
"topology_rake_factor": "topology_rake"
|
||||
};
|
||||
|
||||
class UnifiedPaintPanel:
|
||||
# subclass must set
|
||||
@@ -107,136 +97,6 @@ class UnifiedPaintPanel:
|
||||
return tool_settings.gpencil_vertex_paint
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def channel_unified(layout, context, brush, prop_name, icon='NONE', pressure=True, text=None,
|
||||
slider=False, header=False, expand=None, toolsettings_only=False):
|
||||
""" Generalized way of adding brush options to the UI,
|
||||
along with their pen pressure setting and global toggle, if they exist. """
|
||||
ch = brush.channels.channels[prop_name]
|
||||
finalch = ch
|
||||
|
||||
l1 = layout
|
||||
|
||||
#if ch.ui_expanded:
|
||||
# layout = layout.box().column() #.column() is a bit more compact
|
||||
|
||||
if ch.type == "BITMASK":
|
||||
layout = layout.box()
|
||||
|
||||
row = layout.row(align=True)
|
||||
|
||||
typeprop = "float_value"
|
||||
|
||||
if ch.type == "INT":
|
||||
typeprop = "int_value"
|
||||
elif ch.type == "BOOL":
|
||||
typeprop = "bool_value"
|
||||
elif ch.type == "ENUM":
|
||||
typeprop = "enum_value"
|
||||
elif ch.type == "BITMASK":
|
||||
typeprop = "flags_value"
|
||||
elif ch.type == "VEC3":
|
||||
typeprop = "color3_value"
|
||||
elif ch.type == "VEC4":
|
||||
typeprop = "color4_value"
|
||||
|
||||
if text is None:
|
||||
s = prop_name.lower().replace("_", " ").split(" ");
|
||||
text = ''
|
||||
for k in s:
|
||||
text += k[0].upper() + k[1:] + " "
|
||||
text = text.strip()
|
||||
|
||||
path = ""
|
||||
is_toolset = False
|
||||
|
||||
if ch.inherit or toolsettings_only:
|
||||
sd = context.tool_settings.sculpt
|
||||
#ensure channel exists in tool settings channel set
|
||||
sd.channels.ensure(ch)
|
||||
|
||||
finalch = sd.channels.channels[prop_name]
|
||||
is_toolset = True
|
||||
path = "tool_settings.sculpt.channels.channels[\"%s\"]" % ch.idname
|
||||
else:
|
||||
path = "tool_settings.sculpt.brush.channels.channels[\"%s\"]" % ch.idname
|
||||
|
||||
if ch.type == "BITMASK":
|
||||
row.label(text=text)
|
||||
|
||||
if header:
|
||||
row.prop_menu_enum(finalch, typeprop)
|
||||
else:
|
||||
col = layout.column()
|
||||
col.emboss = "NONE"
|
||||
for item in finalch.enum_items:
|
||||
if item.identifier in finalch.flags_value:
|
||||
itemicon = "CHECKBOX_HLT"
|
||||
else:
|
||||
itemicon = "CHECKBOX_DEHLT"
|
||||
col.prop_enum(finalch, typeprop, item.identifier, icon=itemicon)
|
||||
|
||||
elif expand is not None:
|
||||
row.prop(finalch, typeprop, icon=icon, text=text, slider=slider, expand=expand)
|
||||
else:
|
||||
row.prop(finalch, typeprop, icon=icon, text=text, slider=slider)
|
||||
|
||||
pressure = pressure and ch.type not in ["BOOL", "ENUM", "BITMASK"]
|
||||
|
||||
if pressure:
|
||||
row.prop(finalch.mappings["PRESSURE"], "enabled", text="", icon="STYLUS_PRESSURE")
|
||||
#if pressure_name:
|
||||
# row.prop(brush, pressure_name, text="")
|
||||
|
||||
#if unified_name and not header:
|
||||
# # NOTE: We don't draw UnifiedPaintSettings in the header to reduce clutter. D5928#136281
|
||||
# row.prop(ups, unified_name, text="", icon='BRUSHES_ALL')
|
||||
if not header and ch.type != "BOOL":
|
||||
if ch.type == "BITMASK" and not toolsettings_only and ch == finalch:
|
||||
row.prop(ch, "inherit_if_unset", text="Combine With Defaults")
|
||||
|
||||
if not toolsettings_only:
|
||||
row.prop(ch, "inherit", text="", icon='BRUSHES_ALL')
|
||||
|
||||
if ch.type == "BITMASK":
|
||||
return
|
||||
|
||||
row.prop(ch, "ui_expanded", text="", icon="TRIA_DOWN" if ch.ui_expanded else "TRIA_RIGHT")
|
||||
|
||||
if ch.ui_expanded:
|
||||
for mp in finalch.mappings:
|
||||
row2 = layout.row()
|
||||
name = mp.type.lower()
|
||||
|
||||
if len(name) > 0:
|
||||
name = name[0].upper() + name[1:]
|
||||
else:
|
||||
name = "name error"
|
||||
|
||||
row2.label(text=name)
|
||||
row2.prop(mp, "enabled", text="", icon="STYLUS_PRESSURE")
|
||||
row2.prop(mp, "ui_expanded", text="", icon="TRIA_DOWN" if mp.ui_expanded else "TRIA_RIGHT")
|
||||
|
||||
if mp.ui_expanded:
|
||||
layout.template_curve_mapping(mp, "curve", brush=True)
|
||||
|
||||
col = layout.column(align=True)
|
||||
row = col.row(align=True)
|
||||
|
||||
path2 = path + ".mappings[\"%s\"].curve" % (mp.type)
|
||||
|
||||
shapes = ['SMOOTH', 'ROUND', 'ROOT', 'SHARP', 'LINE', 'MAX']
|
||||
icons = ['SMOOTHCURVE', 'SPHERECURVE', 'ROOTCURVE', 'SHARPCURVE', 'LINCURVE', 'NOCURVE']
|
||||
|
||||
for i, shape in enumerate(shapes):
|
||||
props = row.operator("brush.curve_preset_load", icon=icons[i], text="")
|
||||
props.shape = shape
|
||||
props.path = path2
|
||||
|
||||
#row2.prop(mp, "curve")
|
||||
|
||||
return row
|
||||
|
||||
@staticmethod
|
||||
def prop_unified(
|
||||
layout,
|
||||
@@ -252,14 +112,6 @@ class UnifiedPaintPanel:
|
||||
):
|
||||
""" Generalized way of adding brush options to the UI,
|
||||
along with their pen pressure setting and global toggle, if they exist. """
|
||||
|
||||
if prop_name in channel_name_map:
|
||||
prop_name = channel_name_map[prop_name]
|
||||
|
||||
if prop_name in brush.channels.channels:
|
||||
# def channel_unified(layout, context, brush, prop_name, icon='NONE', pressure=True, text=None, slider=False, header=False):
|
||||
return UnifiedPaintPanel.channel_unified(layout, context, brush, prop_name, icon=icon, text=text, slider=slider, header=header)
|
||||
|
||||
row = layout.row(align=True)
|
||||
ups = context.tool_settings.unified_paint_settings
|
||||
prop_owner = brush
|
||||
@@ -279,12 +131,6 @@ class UnifiedPaintPanel:
|
||||
|
||||
@staticmethod
|
||||
def prop_unified_color(parent, context, brush, prop_name, *, text=None):
|
||||
if context.mode == 'SCULPT':
|
||||
# def channel_unified(layout, context, brush, prop_name, icon='NONE', pressure=True, text=None,
|
||||
# slider=False, header=False, expand=None, toolsettings_only=False):
|
||||
return UnifiedPaintPanel.channel_unified(parent, context, brush, prop_name, text=text)
|
||||
|
||||
|
||||
ups = context.tool_settings.unified_paint_settings
|
||||
prop_owner = ups if ups.use_unified_color else brush
|
||||
parent.prop(prop_owner, prop_name, text=text)
|
||||
@@ -703,27 +549,15 @@ def brush_settings(layout, context, brush, popover=False):
|
||||
if context.preferences.experimental.use_sculpt_tools_tilt and capabilities.has_tilt:
|
||||
layout.prop(brush, "tilt_strength_factor", slider=True)
|
||||
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
layout,
|
||||
context,
|
||||
brush,
|
||||
"hard_edge_mode",
|
||||
slider=True,
|
||||
unified_name="use_unified_hard_edge_mode",
|
||||
)
|
||||
|
||||
row = layout.row(align=True)
|
||||
|
||||
row.prop(brush, "hardness", slider=True)
|
||||
row.prop(brush, "invert_hardness_pressure", text="")
|
||||
row.prop(brush, "use_hardness_pressure", text="")
|
||||
|
||||
# auto_smooth_factor and use_inverse_smooth_pressure
|
||||
if capabilities.has_auto_smooth:
|
||||
box = layout.box().column() #.column() is a bit more compact
|
||||
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
box,
|
||||
layout,
|
||||
context,
|
||||
brush,
|
||||
"auto_smooth_factor",
|
||||
@@ -731,83 +565,13 @@ def brush_settings(layout, context, brush, popover=False):
|
||||
slider=True,
|
||||
)
|
||||
|
||||
#box.prop(brush, "boundary_smooth_factor")
|
||||
#box.prop(brush, "use_weighted_smooth")
|
||||
#box.prop(brush, "preserve_faceset_boundary")
|
||||
|
||||
UnifiedPaintPanel.prop_unified(box, context, brush, "boundary_smooth_factor", slider=True)
|
||||
UnifiedPaintPanel.prop_unified(box, context, brush, "use_weighted_smooth")
|
||||
UnifiedPaintPanel.prop_unified(box, context, brush, "preserve_faceset_boundary")
|
||||
|
||||
if 1: #brush.preserve_faceset_boundary:
|
||||
UnifiedPaintPanel.prop_unified(box, context, brush, "autosmooth_fset_slide", slider=True)
|
||||
#box.prop(brush, "autosmooth_fset_slide")
|
||||
|
||||
box.prop(brush, "use_custom_auto_smooth_spacing", text="Custom Spacing")
|
||||
if brush.use_custom_auto_smooth_spacing:
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
box,
|
||||
context,
|
||||
brush,
|
||||
"auto_smooth_spacing",
|
||||
slider=True,
|
||||
text="Spacing"
|
||||
)
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
box,
|
||||
context,
|
||||
brush,
|
||||
"auto_smooth_projection",
|
||||
slider=True
|
||||
)
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
box,
|
||||
context,
|
||||
brush,
|
||||
"auto_smooth_radius_factor",
|
||||
slider=True
|
||||
)
|
||||
elif brush.sculpt_tool == "SMOOTH":
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
layout,
|
||||
context,
|
||||
brush,
|
||||
"auto_smooth_projection",
|
||||
slider=True
|
||||
)
|
||||
|
||||
|
||||
if capabilities.has_vcol_boundary_smooth:
|
||||
layout.prop(brush, "vcol_boundary_factor", slider=True)
|
||||
|
||||
# topology_rake_factor
|
||||
if (
|
||||
capabilities.has_topology_rake and
|
||||
context.sculpt_object.use_dynamic_topology_sculpting
|
||||
):
|
||||
box = layout.box().column() #.column() is a bit more compact
|
||||
|
||||
#box.prop(brush, "topology_rake_factor", slider=True)
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
box,
|
||||
context,
|
||||
brush,
|
||||
"topology_rake_factor",
|
||||
slider=True,
|
||||
text="Topology Rake"
|
||||
)
|
||||
box.prop(brush, "use_custom_topology_rake_spacing", text="Custom Spacing")
|
||||
layout.prop(brush, "topology_rake_factor", slider=True)
|
||||
|
||||
if brush.use_custom_topology_rake_spacing:
|
||||
box.prop(brush, "topology_rake_spacing", text="Spacing")
|
||||
box.prop(brush, "topology_rake_projection")
|
||||
|
||||
box.prop(brush, "topology_rake_radius_factor", slider=True)
|
||||
box.prop(brush, "use_curvature_rake")
|
||||
box.prop(brush, "ignore_falloff_for_topology_rake")
|
||||
|
||||
if context.sculpt_object.use_dynamic_topology_sculpting:
|
||||
layout.prop(brush.dyntopo, "disabled", text="Disable Dyntopo")
|
||||
|
||||
# normal_weight
|
||||
if capabilities.has_normal_weight:
|
||||
layout.prop(brush, "normal_weight", slider=True)
|
||||
@@ -856,27 +620,16 @@ def brush_settings(layout, context, brush, popover=False):
|
||||
|
||||
if capabilities.has_color:
|
||||
ups = context.scene.tool_settings.unified_paint_settings
|
||||
|
||||
if context.mode == "SCULPT":
|
||||
row = layout.column(align=True)
|
||||
else:
|
||||
row = layout.row(align=True)
|
||||
|
||||
row = layout.row(align=True)
|
||||
UnifiedPaintPanel.prop_unified_color(row, context, brush, "color", text="")
|
||||
UnifiedPaintPanel.prop_unified_color(row, context, brush, "secondary_color", text="")
|
||||
|
||||
if context.mode != "SCULPT":
|
||||
row.separator()
|
||||
row.operator("paint.brush_colors_flip", icon='FILE_REFRESH', text="", emboss=False)
|
||||
row.prop(ups, "use_unified_color", text="", icon='BRUSHES_ALL')
|
||||
row.separator()
|
||||
row.operator("paint.brush_colors_flip", icon='FILE_REFRESH', text="", emboss=False)
|
||||
row.prop(ups, "use_unified_color", text="", icon='BRUSHES_ALL')
|
||||
layout.prop(brush, "blend", text="Blend Mode")
|
||||
|
||||
# Per sculpt tool options.
|
||||
|
||||
if sculpt_tool == "VCOL_BOUNDARY":
|
||||
row = layout.row()
|
||||
row.prop(brush, "vcol_boundary_exponent")
|
||||
|
||||
if sculpt_tool == 'CLAY_STRIPS':
|
||||
row = layout.row()
|
||||
row.prop(brush, "tip_roundness")
|
||||
@@ -885,7 +638,6 @@ def brush_settings(layout, context, brush, popover=False):
|
||||
layout.separator()
|
||||
layout.prop(brush, "elastic_deform_type")
|
||||
layout.prop(brush, "elastic_deform_volume_preservation", slider=True)
|
||||
layout.prop(brush, "use_surface_falloff")
|
||||
layout.separator()
|
||||
|
||||
elif sculpt_tool == 'SNAKE_HOOK':
|
||||
@@ -949,7 +701,6 @@ def brush_settings(layout, context, brush, popover=False):
|
||||
elif sculpt_tool == 'GRAB':
|
||||
layout.prop(brush, "use_grab_active_vertex")
|
||||
layout.prop(brush, "use_grab_silhouette")
|
||||
layout.prop(brush, "use_surface_falloff")
|
||||
|
||||
elif sculpt_tool == 'PAINT':
|
||||
row = layout.row(align=True)
|
||||
@@ -1003,28 +754,9 @@ def brush_settings(layout, context, brush, popover=False):
|
||||
col.prop(brush, "use_multiplane_scrape_dynamic")
|
||||
col.prop(brush, "show_multiplane_scrape_planes_preview")
|
||||
|
||||
elif sculpt_tool == 'SCENE_PROJECT':
|
||||
col = layout.column()
|
||||
col.prop(brush, "scene_project_direction_type")
|
||||
|
||||
elif sculpt_tool == 'ARRAY':
|
||||
col = layout.column()
|
||||
col.prop(brush, "array_deform_type")
|
||||
col.prop(brush, "array_count")
|
||||
col.prop(brush, "use_array_lock_orientation")
|
||||
col.prop(brush, "use_array_fill_holes")
|
||||
|
||||
elif sculpt_tool == 'SMOOTH':
|
||||
col = layout.column()
|
||||
col.prop(brush, "boundary_smooth_factor")
|
||||
|
||||
col.prop(brush, "use_weighted_smooth")
|
||||
col.prop(brush, "preserve_faceset_boundary")
|
||||
if brush.preserve_faceset_boundary:
|
||||
col.prop(brush, "autosmooth_fset_slide")
|
||||
|
||||
col.prop(brush, "smooth_deform_type")
|
||||
|
||||
if brush.smooth_deform_type == 'SURFACE':
|
||||
col.prop(brush, "surface_smooth_shape_preservation")
|
||||
col.prop(brush, "surface_smooth_current_vertex")
|
||||
@@ -1037,10 +769,6 @@ def brush_settings(layout, context, brush, popover=False):
|
||||
elif sculpt_tool == 'MASK':
|
||||
layout.row().prop(brush, "mask_tool", expand=True)
|
||||
|
||||
|
||||
layout.template_curve_mapping(brush, "pressure_size_curve")
|
||||
layout.template_curve_mapping(brush, "pressure_strength_curve", brush=True)
|
||||
|
||||
# End sculpt_tool interface.
|
||||
|
||||
# 3D and 2D Texture Paint Mode.
|
||||
@@ -1130,21 +858,7 @@ def brush_shared_settings(layout, context, brush, popover=False):
|
||||
size_prop = "size"
|
||||
if size_mode and (size_owner.use_locked_size == 'SCENE'):
|
||||
size_prop = "unprojected_radius"
|
||||
|
||||
if size or size_mode:
|
||||
if size:
|
||||
UnifiedPaintPanel.channel_unified(
|
||||
layout,
|
||||
context,
|
||||
brush,
|
||||
"radius" if size_prop == "size" else size_prop.upper(),
|
||||
text="Radius",
|
||||
slider=True,
|
||||
)
|
||||
if size_mode:
|
||||
layout.row().prop(size_owner, "use_locked_size", expand=True)
|
||||
layout.separator()
|
||||
elif size or size_mode:
|
||||
if size:
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
layout,
|
||||
@@ -1160,16 +874,7 @@ def brush_shared_settings(layout, context, brush, popover=False):
|
||||
layout.row().prop(size_owner, "use_locked_size", expand=True)
|
||||
layout.separator()
|
||||
|
||||
if strength:
|
||||
UnifiedPaintPanel.channel_unified(
|
||||
layout,
|
||||
context,
|
||||
brush,
|
||||
"strength",
|
||||
slider=True
|
||||
)
|
||||
layout.separator()
|
||||
elif strength:
|
||||
if strength:
|
||||
pressure_name = "use_pressure_strength" if strength_pressure else None
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
layout,
|
||||
@@ -1181,13 +886,9 @@ def brush_shared_settings(layout, context, brush, popover=False):
|
||||
slider=True,
|
||||
)
|
||||
layout.separator()
|
||||
|
||||
if direction:
|
||||
UnifiedPaintPanel.channel_unified(
|
||||
layout,
|
||||
context,
|
||||
brush,
|
||||
"direction", expand=True)
|
||||
#layout.row().prop(brush, "direction", expand=True)
|
||||
layout.row().prop(brush, "direction", expand=True)
|
||||
|
||||
|
||||
def brush_settings_advanced(layout, context, brush, popover=False):
|
||||
@@ -1210,31 +911,11 @@ def brush_settings_advanced(layout, context, brush, popover=False):
|
||||
use_accumulate = capabilities.has_accumulate
|
||||
use_frontface = True
|
||||
|
||||
UnifiedPaintPanel.channel_unified(
|
||||
layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"automasking", expand=False)
|
||||
UnifiedPaintPanel.channel_unified(
|
||||
layout.column(),
|
||||
context,
|
||||
brush,
|
||||
"automasking_boundary_edges_propagation_steps")
|
||||
|
||||
"""
|
||||
col = layout.column(heading="Auto-Masking", align=True)
|
||||
|
||||
# topology automasking
|
||||
col.prop(brush, "use_automasking_topology", text="Topology")
|
||||
|
||||
col.prop(brush, "use_automasking_concave")
|
||||
|
||||
col2 = col.column()
|
||||
col2.enabled = brush.use_automasking_concave
|
||||
|
||||
col2.prop(brush, "concave_mask_factor", text="Cavity Factor")
|
||||
col2.prop(brush, "invert_automasking_concavity", text="Invert Cavity Mask")
|
||||
|
||||
# face masks automasking
|
||||
col.prop(brush, "use_automasking_face_sets", text="Face Sets")
|
||||
|
||||
@@ -1242,7 +923,6 @@ def brush_settings_advanced(layout, context, brush, popover=False):
|
||||
col.prop(brush, "use_automasking_boundary_edges", text="Mesh Boundary")
|
||||
col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets Boundary")
|
||||
col.prop(brush, "automasking_boundary_edges_propagation_steps")
|
||||
"""
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user