Merge branch 'master' into sculpt-dev
This commit is contained in:
commit
ab5b138805
|
@ -43,6 +43,12 @@ endif()
|
|||
|
||||
if(WIN32)
|
||||
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
list(APPEND EMBREE_EXTRA_ARGS
|
||||
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_debug
|
||||
-DEMBREE_TBB_LIBRARY_NAME=tbb_debug
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
set(EMBREE_BUILD_DIR)
|
||||
endif()
|
||||
|
|
|
@ -22,6 +22,7 @@ if(WIN32)
|
|||
-DTBB_BUILD_TBBMALLOC_PROXY=On
|
||||
-DTBB_BUILD_STATIC=Off
|
||||
-DTBB_BUILD_TESTS=Off
|
||||
-DCMAKE_DEBUG_POSTFIX=_debug
|
||||
)
|
||||
set(TBB_LIBRARY tbb)
|
||||
set(TBB_STATIC_LIBRARY Off)
|
||||
|
@ -55,17 +56,17 @@ if(WIN32)
|
|||
ExternalProject_Add_Step(external_tbb after_install
|
||||
# findtbb.cmake in some deps *NEEDS* to find tbb_debug.lib even if they are not going to use it
|
||||
# to make that test pass, we place a copy with the right name in the lib folder.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb_debug.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${LIBDIR}/tbb/lib/tbb_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${LIBDIR}/tbb/lib/tbbmalloc_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb.dll ${LIBDIR}/tbb/bin/tbb_debug.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc.dll ${LIBDIR}/tbb/bin/tbbmalloc_debug.dll
|
||||
# Normal collection of build artifacts
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb.dll ${HARVEST_TARGET}/tbb/bin/tbb.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
|
@ -76,11 +77,11 @@ if(WIN32)
|
|||
# to make that test pass, we place a copy with the right name in the lib folder.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
|
||||
# Normal collection of build artifacts
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb_debug.dll ${HARVEST_TARGET}/tbb/bin/tbb_debug.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy_debug.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_debug.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_debug.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_proxy_debug.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy_debug.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -432,9 +432,9 @@ set(USD_HASH 1dd1e2092d085ed393c1f7c450a4155a)
|
|||
set(USD_HASH_TYPE MD5)
|
||||
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
|
||||
|
||||
set(OIDN_VERSION 1.3.0)
|
||||
set(OIDN_VERSION 1.4.0)
|
||||
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
|
||||
set(OIDN_HASH 301a5a0958d375a942014df0679b9270)
|
||||
set(OIDN_HASH 421824019becc5b664a22a2b98332bc5)
|
||||
set(OIDN_HASH_TYPE MD5)
|
||||
set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz)
|
||||
|
||||
|
|
|
@ -553,10 +553,10 @@ EMBREE_FORCE_BUILD=false
|
|||
EMBREE_FORCE_REBUILD=false
|
||||
EMBREE_SKIP=false
|
||||
|
||||
OIDN_VERSION="1.3.0"
|
||||
OIDN_VERSION_SHORT="1.3"
|
||||
OIDN_VERSION_MIN="1.3.0"
|
||||
OIDN_VERSION_MAX="1.4"
|
||||
OIDN_VERSION="1.4.0"
|
||||
OIDN_VERSION_SHORT="1.4"
|
||||
OIDN_VERSION_MIN="1.4.0"
|
||||
OIDN_VERSION_MAX="1.5"
|
||||
OIDN_FORCE_BUILD=false
|
||||
OIDN_FORCE_REBUILD=false
|
||||
OIDN_SKIP=false
|
||||
|
@ -565,7 +565,7 @@ ISPC_VERSION="1.14.1"
|
|||
|
||||
FFMPEG_VERSION="4.4"
|
||||
FFMPEG_VERSION_SHORT="4.4"
|
||||
FFMPEG_VERSION_MIN="4.4"
|
||||
FFMPEG_VERSION_MIN="3.0"
|
||||
FFMPEG_VERSION_MAX="5.0"
|
||||
FFMPEG_FORCE_BUILD=false
|
||||
FFMPEG_FORCE_REBUILD=false
|
||||
|
|
|
@ -1,33 +1,3 @@
|
|||
diff -Naur oidn-1.3.0/cmake/FindTBB.cmake external_openimagedenoise/cmake/FindTBB.cmake
|
||||
--- oidn-1.3.0/cmake/FindTBB.cmake 2021-02-04 16:20:26 -0700
|
||||
+++ external_openimagedenoise/cmake/FindTBB.cmake 2021-02-12 09:35:53 -0700
|
||||
@@ -332,20 +332,22 @@
|
||||
${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER}
|
||||
${TBB_ROOT}/lib
|
||||
)
|
||||
-
|
||||
# On Windows, also search the DLL so that the client may install it.
|
||||
file(GLOB DLL_NAMES
|
||||
${TBB_ROOT}/bin/${TBB_ARCH}/${TBB_VCVER}/${LIB_NAME}.dll
|
||||
${TBB_ROOT}/bin/${LIB_NAME}.dll
|
||||
+ ${TBB_ROOT}/lib/${LIB_NAME}.dll
|
||||
${TBB_ROOT}/redist/${TBB_ARCH}/${TBB_VCVER}/${LIB_NAME}.dll
|
||||
${TBB_ROOT}/redist/${TBB_ARCH}/${TBB_VCVER}/${LIB_NAME_GLOB1}.dll
|
||||
${TBB_ROOT}/redist/${TBB_ARCH}/${TBB_VCVER}/${LIB_NAME_GLOB2}.dll
|
||||
${TBB_ROOT}/../redist/${TBB_ARCH}/tbb/${TBB_VCVER}/${LIB_NAME}.dll
|
||||
${TBB_ROOT}/../redist/${TBB_ARCH}_win/tbb/${TBB_VCVER}/${LIB_NAME}.dll
|
||||
)
|
||||
- list(GET DLL_NAMES 0 DLL_NAME)
|
||||
- get_filename_component(${BIN_DIR_VAR} "${DLL_NAME}" DIRECTORY)
|
||||
- set(${DLL_VAR} "${DLL_NAME}" CACHE PATH "${COMPONENT_NAME} ${BUILD_CONFIG} dll path")
|
||||
+ if (DLL_NAMES)
|
||||
+ list(GET DLL_NAMES 0 DLL_NAME)
|
||||
+ get_filename_component(${BIN_DIR_VAR} "${DLL_NAME}" DIRECTORY)
|
||||
+ set(${DLL_VAR} "${DLL_NAME}" CACHE PATH "${COMPONENT_NAME} ${BUILD_CONFIG} dll path")
|
||||
+ endif()
|
||||
elseif(APPLE)
|
||||
set(LIB_PATHS ${TBB_ROOT}/lib)
|
||||
else()
|
||||
--- external_openimagedenoise/cmake/oidn_ispc.cmake 2021-02-15 17:29:34.000000000 +0100
|
||||
+++ external_openimagedenoise/cmake/oidn_ispc.cmake2 2021-02-15 17:29:28.000000000 +0100
|
||||
@@ -98,7 +98,7 @@
|
||||
|
|
|
@ -20,8 +20,24 @@ if(NOT CLANG_ROOT_DIR AND NOT $ENV{CLANG_ROOT_DIR} STREQUAL "")
|
|||
set(CLANG_ROOT_DIR $ENV{CLANG_ROOT_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT LLVM_ROOT_DIR)
|
||||
if(DEFINED LLVM_VERSION)
|
||||
message(running llvm-config-${LLVM_VERSION})
|
||||
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
|
||||
endif()
|
||||
if(NOT LLVM_CONFIG)
|
||||
find_program(LLVM_CONFIG llvm-config)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --prefix
|
||||
OUTPUT_VARIABLE LLVM_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
|
||||
endif()
|
||||
|
||||
set(_CLANG_SEARCH_DIRS
|
||||
${CLANG_ROOT_DIR}
|
||||
${LLVM_ROOT_DIR}
|
||||
/opt/lib/clang
|
||||
)
|
||||
|
||||
|
|
|
@ -675,7 +675,7 @@ if(WITH_SYSTEM_AUDASPACE)
|
|||
endif()
|
||||
|
||||
if(WITH_TBB)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/debug/tbb_debug.lib)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||
if(WITH_TBB_MALLOC_PROXY)
|
||||
|
|
|
@ -15,6 +15,15 @@ if(WITH_WINDOWS_BUNDLE_CRT)
|
|||
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
# ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
|
||||
# redirects for this dll, for details see T88813.
|
||||
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
||||
string(FIND ${lib} "ucrtbase" pos)
|
||||
if(NOT pos EQUAL -1)
|
||||
list(REMOVE_ITEM CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
|
||||
install(FILES ${lib} DESTINATION . COMPONENT Libraries)
|
||||
endif()
|
||||
endforeach()
|
||||
# Install the CRT to the blender.crt Sub folder.
|
||||
install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{ "path": "source/tools", "branch": "master", "commit_id": "HEAD" }
|
||||
]
|
||||
},
|
||||
"svn":
|
||||
"svn":
|
||||
{
|
||||
"tests": { "path": "lib/tests", "branch": "trunk", "commit_id": "HEAD" },
|
||||
"libraries":
|
||||
|
@ -47,7 +47,7 @@
|
|||
"cmake":
|
||||
{
|
||||
"default":
|
||||
{
|
||||
{
|
||||
"version": "any",
|
||||
"overrides":
|
||||
{
|
||||
|
@ -58,28 +58,28 @@
|
|||
{
|
||||
"overrides":
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
"darwin-arm64":
|
||||
{
|
||||
"overrides":
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
"linux-x86_64":
|
||||
{
|
||||
"overrides":
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
"windows-amd64":
|
||||
{
|
||||
"overrides":
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ with offscreen.bind():
|
|||
amount = 10
|
||||
for i in range(-amount, amount + 1):
|
||||
x_pos = i / amount
|
||||
draw_circle_2d((x_pos, 0.0), (1, 1, 1, 1), 0.5, 200)
|
||||
draw_circle_2d((x_pos, 0.0), (1, 1, 1, 1), 0.5, segments=200)
|
||||
|
||||
|
||||
# Drawing the generated texture in 3D space
|
||||
|
|
|
@ -34,7 +34,9 @@ with offscreen.bind():
|
|||
for i in range(RING_AMOUNT):
|
||||
draw_circle_2d(
|
||||
(random.uniform(-1, 1), random.uniform(-1, 1)),
|
||||
(1, 1, 1, 1), random.uniform(0.1, 1), 20)
|
||||
(1, 1, 1, 1), random.uniform(0.1, 1),
|
||||
segments=20,
|
||||
)
|
||||
|
||||
buffer = fb.read_color(0, 0, WIDTH, HEIGHT, 4, 0, 'UBYTE')
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ def init():
|
|||
_workaround_buggy_drivers()
|
||||
|
||||
path = os.path.dirname(__file__)
|
||||
user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', '')))
|
||||
user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', path='')))
|
||||
|
||||
_cycles.init(path, user_path, bpy.app.background)
|
||||
_parse_command_line()
|
||||
|
|
|
@ -52,6 +52,9 @@ shader node_vector_math(string math_type = "add",
|
|||
else if (math_type == "faceforward") {
|
||||
Vector = compatible_faceforward(Vector1, Vector2, Vector3);
|
||||
}
|
||||
else if (math_type == "multiply_add") {
|
||||
Vector = Vector1 * Vector2 + Vector3;
|
||||
}
|
||||
else if (math_type == "dot_product") {
|
||||
Value = dot(Vector1, Vector2);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,8 @@ ccl_device void svm_node_vector_math(KernelGlobals *kg,
|
|||
float3 vector;
|
||||
|
||||
/* 3 Vector Operators */
|
||||
if (type == NODE_VECTOR_MATH_WRAP || type == NODE_VECTOR_MATH_FACEFORWARD) {
|
||||
if (type == NODE_VECTOR_MATH_WRAP || type == NODE_VECTOR_MATH_FACEFORWARD ||
|
||||
type == NODE_VECTOR_MATH_MULTIPLY_ADD) {
|
||||
uint4 extra_node = read_node(kg, offset);
|
||||
c = stack_load_float3(stack, extra_node.x);
|
||||
}
|
||||
|
|
|
@ -52,6 +52,9 @@ ccl_device void svm_vector_math(float *value,
|
|||
case NODE_VECTOR_MATH_FACEFORWARD:
|
||||
*vector = faceforward(a, b, c);
|
||||
break;
|
||||
case NODE_VECTOR_MATH_MULTIPLY_ADD:
|
||||
*vector = a * b + c;
|
||||
break;
|
||||
case NODE_VECTOR_MATH_DOT_PRODUCT:
|
||||
*value = dot(a, b);
|
||||
break;
|
||||
|
|
|
@ -341,6 +341,7 @@ typedef enum NodeVectorMathType {
|
|||
NODE_VECTOR_MATH_TANGENT,
|
||||
NODE_VECTOR_MATH_REFRACT,
|
||||
NODE_VECTOR_MATH_FACEFORWARD,
|
||||
NODE_VECTOR_MATH_MULTIPLY_ADD,
|
||||
} NodeVectorMathType;
|
||||
|
||||
typedef enum NodeClampType {
|
||||
|
|
|
@ -6093,6 +6093,7 @@ NODE_DEFINE(VectorMathNode)
|
|||
type_enum.insert("reflect", NODE_VECTOR_MATH_REFLECT);
|
||||
type_enum.insert("refract", NODE_VECTOR_MATH_REFRACT);
|
||||
type_enum.insert("faceforward", NODE_VECTOR_MATH_FACEFORWARD);
|
||||
type_enum.insert("multiply_add", NODE_VECTOR_MATH_MULTIPLY_ADD);
|
||||
|
||||
type_enum.insert("dot_product", NODE_VECTOR_MATH_DOT_PRODUCT);
|
||||
|
||||
|
@ -6165,7 +6166,8 @@ void VectorMathNode::compile(SVMCompiler &compiler)
|
|||
int vector_stack_offset = compiler.stack_assign_if_linked(vector_out);
|
||||
|
||||
/* 3 Vector Operators */
|
||||
if (math_type == NODE_VECTOR_MATH_WRAP || math_type == NODE_VECTOR_MATH_FACEFORWARD) {
|
||||
if (math_type == NODE_VECTOR_MATH_WRAP || math_type == NODE_VECTOR_MATH_FACEFORWARD ||
|
||||
math_type == NODE_VECTOR_MATH_MULTIPLY_ADD) {
|
||||
ShaderInput *vector3_in = input("Vector3");
|
||||
int vector3_stack_offset = compiler.stack_assign(vector3_in);
|
||||
compiler.add_node(
|
||||
|
|
|
@ -1729,7 +1729,7 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorShape(GHOST_TStandardCursor shape)
|
|||
cursor_t *c = &input->cursor;
|
||||
|
||||
if (!c->theme) {
|
||||
/* The cursor surface hasn't entered an output yet. Initialise theme with scale 1. */
|
||||
/* The cursor surface hasn't entered an output yet. Initialize theme with scale 1. */
|
||||
c->theme = wl_cursor_theme_load(c->theme_name.c_str(), c->size, d->inputs[0]->system->shm());
|
||||
}
|
||||
|
||||
|
|
|
@ -1462,14 +1462,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
|
|||
* since DefWindowProc propagates it up the parent chain
|
||||
* until it finds a window that processes it.
|
||||
*/
|
||||
|
||||
/* Get the window under the mouse and send event to its queue. */
|
||||
POINT mouse_pos = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
|
||||
HWND mouse_hwnd = ChildWindowFromPoint(HWND_DESKTOP, mouse_pos);
|
||||
GHOST_WindowWin32 *mouse_window = (GHOST_WindowWin32 *)::GetWindowLongPtr(mouse_hwnd,
|
||||
GWLP_USERDATA);
|
||||
|
||||
processWheelEvent(mouse_window ? mouse_window : window, wParam, lParam);
|
||||
processWheelEvent(window, wParam, lParam);
|
||||
eventHandled = true;
|
||||
#ifdef BROKEN_PEEK_TOUCHPAD
|
||||
PostMessage(hwnd, WM_USER, 0, 0);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 5ab29b1331d2103dae634b987f121c4599459d7f
|
||||
Subproject commit 2cef4877edc40875978c4e95322bb5193f5815bf
|
|
@ -1 +1 @@
|
|||
Subproject commit 27fe7f3a4f964b53af436c4da4ddea337eff0c7e
|
||||
Subproject commit 4fcdbfe7c20edfc1204c0aa46c98ea25354abcd9
|
|
@ -1 +1 @@
|
|||
Subproject commit 5a82baad9f986722104280e8354a4427d8e9eab1
|
||||
Subproject commit 7d78c8a63f2f4b146f9327ddc0d567a5921b94ea
|
|
@ -49,16 +49,16 @@ def _initialize():
|
|||
|
||||
def paths():
|
||||
# RELEASE SCRIPTS: official scripts distributed in Blender releases
|
||||
addon_paths = _bpy.utils.script_paths("addons")
|
||||
addon_paths = _bpy.utils.script_paths(subdir="addons")
|
||||
|
||||
# CONTRIB SCRIPTS: good for testing but not official scripts yet
|
||||
# if folder addons_contrib/ exists, scripts in there will be loaded too
|
||||
addon_paths += _bpy.utils.script_paths("addons_contrib")
|
||||
addon_paths += _bpy.utils.script_paths(subdir="addons_contrib")
|
||||
|
||||
return addon_paths
|
||||
|
||||
|
||||
def modules_refresh(module_cache=addons_fake_modules):
|
||||
def modules_refresh(*, module_cache=addons_fake_modules):
|
||||
global error_encoding
|
||||
import os
|
||||
|
||||
|
@ -203,9 +203,9 @@ def modules_refresh(module_cache=addons_fake_modules):
|
|||
del modules_stale
|
||||
|
||||
|
||||
def modules(module_cache=addons_fake_modules, *, refresh=True):
|
||||
def modules(*, module_cache=addons_fake_modules, refresh=True):
|
||||
if refresh or ((module_cache is addons_fake_modules) and modules._is_first):
|
||||
modules_refresh(module_cache)
|
||||
modules_refresh(module_cache=module_cache)
|
||||
modules._is_first = False
|
||||
|
||||
mod_list = list(module_cache.values())
|
||||
|
@ -512,7 +512,7 @@ def _blender_manual_url_prefix():
|
|||
return "https://docs.blender.org/manual/en/" + manual_version
|
||||
|
||||
|
||||
def module_bl_info(mod, info_basis=None):
|
||||
def module_bl_info(mod, *, info_basis=None):
|
||||
if info_basis is None:
|
||||
info_basis = {
|
||||
"name": "",
|
||||
|
|
|
@ -134,7 +134,7 @@ def _disable(template_id, *, handle_error=None):
|
|||
print("\tapp_template_utils.disable", template_id)
|
||||
|
||||
|
||||
def import_from_path(path, ignore_not_found=False):
|
||||
def import_from_path(path, *, ignore_not_found=False):
|
||||
import os
|
||||
from importlib import import_module
|
||||
base_module, template_id = path.rsplit(os.sep, 2)[-2:]
|
||||
|
@ -148,9 +148,9 @@ def import_from_path(path, ignore_not_found=False):
|
|||
raise ex
|
||||
|
||||
|
||||
def import_from_id(template_id, ignore_not_found=False):
|
||||
def import_from_id(template_id, *, ignore_not_found=False):
|
||||
import os
|
||||
path = next(iter(_bpy.utils.app_template_paths(template_id)), None)
|
||||
path = next(iter(_bpy.utils.app_template_paths(path=template_id)), None)
|
||||
if path is None:
|
||||
if ignore_not_found:
|
||||
return None
|
||||
|
@ -163,7 +163,7 @@ def import_from_id(template_id, ignore_not_found=False):
|
|||
return import_from_path(path, ignore_not_found=ignore_not_found)
|
||||
|
||||
|
||||
def activate(template_id=None):
|
||||
def activate(*, template_id=None):
|
||||
template_id_prev = _app_template["id"]
|
||||
|
||||
# not needed but may as well avoids redundant
|
||||
|
@ -190,4 +190,4 @@ def reset(*, reload_scripts=False):
|
|||
|
||||
# TODO reload_scripts
|
||||
|
||||
activate(template_id)
|
||||
activate(template_id=template_id)
|
||||
|
|
|
@ -26,7 +26,7 @@ __all__ = (
|
|||
)
|
||||
|
||||
|
||||
def generate(context, space_type, use_fallback_keys=True, use_reset=True):
|
||||
def generate(context, space_type, *, use_fallback_keys=True, use_reset=True):
|
||||
"""
|
||||
Keymap for popup toolbar, currently generated each time.
|
||||
"""
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
|
||||
def keyconfig_data_oskey_from_ctrl(keyconfig_data_src, filter_fn=None):
|
||||
def keyconfig_data_oskey_from_ctrl(keyconfig_data_src, *, filter_fn=None):
|
||||
keyconfig_data_dst = []
|
||||
for km_name, km_parms, km_items_data_src in keyconfig_data_src:
|
||||
km_items_data_dst = km_items_data_src.copy()
|
||||
|
@ -61,4 +61,4 @@ def keyconfig_data_oskey_from_ctrl_for_macos(keyconfig_data_src):
|
|||
return False
|
||||
return True
|
||||
|
||||
return keyconfig_data_oskey_from_ctrl(keyconfig_data_src, filter_fn)
|
||||
return keyconfig_data_oskey_from_ctrl(keyconfig_data_src, filter_fn=filter_fn)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# <pep8-80 compliant>
|
||||
|
||||
|
||||
def url_prefill_from_blender(addon_info=None):
|
||||
def url_prefill_from_blender(*, addon_info=None):
|
||||
import bpy
|
||||
import gpu
|
||||
import struct
|
||||
|
|
|
@ -56,7 +56,7 @@ def _getattr_bytes(var, attr):
|
|||
return var.path_resolve(attr, False).as_bytes()
|
||||
|
||||
|
||||
def abspath(path, start=None, library=None):
|
||||
def abspath(path, *, start=None, library=None):
|
||||
"""
|
||||
Returns the absolute path relative to the current blend file
|
||||
using the "//" prefix.
|
||||
|
@ -92,7 +92,7 @@ def abspath(path, start=None, library=None):
|
|||
return path
|
||||
|
||||
|
||||
def relpath(path, start=None):
|
||||
def relpath(path, *, start=None):
|
||||
"""
|
||||
Returns the path relative to the current blend file using the "//" prefix.
|
||||
|
||||
|
@ -134,7 +134,7 @@ def is_subdir(path, directory):
|
|||
return False
|
||||
|
||||
|
||||
def clean_name(name, replace="_"):
|
||||
def clean_name(name, *, replace="_"):
|
||||
"""
|
||||
Returns a name with characters replaced that
|
||||
may cause problems under various circumstances,
|
||||
|
@ -198,6 +198,7 @@ def _clean_utf8(name):
|
|||
_display_name_literals = {
|
||||
":": "_colon_",
|
||||
"+": "_plus_",
|
||||
"/": "_slash_",
|
||||
}
|
||||
|
||||
|
||||
|
@ -310,7 +311,7 @@ def resolve_ncase(path):
|
|||
return ncase_path if found else path
|
||||
|
||||
|
||||
def ensure_ext(filepath, ext, case_sensitive=False):
|
||||
def ensure_ext(filepath, ext, *, case_sensitive=False):
|
||||
"""
|
||||
Return the path with the extension added if it is not already set.
|
||||
|
||||
|
@ -331,7 +332,7 @@ def ensure_ext(filepath, ext, case_sensitive=False):
|
|||
return filepath + ext
|
||||
|
||||
|
||||
def module_names(path, recursive=False):
|
||||
def module_names(path, *, recursive=False):
|
||||
"""
|
||||
Return a list of modules which can be imported from *path*.
|
||||
|
||||
|
@ -360,7 +361,7 @@ def module_names(path, recursive=False):
|
|||
if isfile(fullpath):
|
||||
modules.append((filename, fullpath))
|
||||
if recursive:
|
||||
for mod_name, mod_path in module_names(directory, True):
|
||||
for mod_name, mod_path in module_names(directory, recursive=True):
|
||||
modules.append(("%s.%s" % (filename, mod_name),
|
||||
mod_path,
|
||||
))
|
||||
|
|
|
@ -81,7 +81,7 @@ _script_module_dirs = "startup", "modules"
|
|||
_is_factory_startup = _bpy.app.factory_startup
|
||||
|
||||
|
||||
def execfile(filepath, mod=None):
|
||||
def execfile(filepath, *, mod=None):
|
||||
"""
|
||||
Execute a file path as a Python script.
|
||||
|
||||
|
@ -193,7 +193,7 @@ _global_loaded_modules = [] # store loaded module names for reloading.
|
|||
import bpy_types as _bpy_types # keep for comparisons, never ever reload this.
|
||||
|
||||
|
||||
def load_scripts(reload_scripts=False, refresh_scripts=False):
|
||||
def load_scripts(*, reload_scripts=False, refresh_scripts=False):
|
||||
"""
|
||||
Load scripts and run each modules register function.
|
||||
|
||||
|
@ -357,7 +357,7 @@ def script_path_pref():
|
|||
return _os.path.normpath(path) if path else None
|
||||
|
||||
|
||||
def script_paths(subdir=None, user_pref=True, check_all=False, use_user=True):
|
||||
def script_paths(*, subdir=None, user_pref=True, check_all=False, use_user=True):
|
||||
"""
|
||||
Returns a list of valid script paths.
|
||||
|
||||
|
@ -446,16 +446,16 @@ def refresh_script_paths():
|
|||
_sys_path_ensure_append(path)
|
||||
|
||||
|
||||
def app_template_paths(subdir=None):
|
||||
def app_template_paths(*, path=None):
|
||||
"""
|
||||
Returns valid application template paths.
|
||||
|
||||
:arg subdir: Optional subdir.
|
||||
:type subdir: string
|
||||
:arg path: Optional subdir.
|
||||
:type path: string
|
||||
:return: app template paths.
|
||||
:rtype: generator
|
||||
"""
|
||||
subdir_args = (subdir,) if subdir is not None else ()
|
||||
subdir_args = (path,) if path is not None else ()
|
||||
# Note: keep in sync with: Blender's 'BKE_appdir_app_template_any'.
|
||||
# Uses 'BLENDER_USER_SCRIPTS', 'BLENDER_SYSTEM_SCRIPTS'
|
||||
# ... in this case 'system' accounts for 'local' too.
|
||||
|
@ -463,9 +463,9 @@ def app_template_paths(subdir=None):
|
|||
(_user_resource, "bl_app_templates_user"),
|
||||
(system_resource, "bl_app_templates_system"),
|
||||
):
|
||||
path = resource_fn('SCRIPTS', _os.path.join("startup", module_name, *subdir_args))
|
||||
if path and _os.path.isdir(path):
|
||||
yield path
|
||||
path_test = resource_fn('SCRIPTS', path=_os.path.join("startup", module_name, *subdir_args))
|
||||
if path_test and _os.path.isdir(path_test):
|
||||
yield path_test
|
||||
|
||||
|
||||
def preset_paths(subdir):
|
||||
|
@ -478,7 +478,7 @@ def preset_paths(subdir):
|
|||
:rtype: list
|
||||
"""
|
||||
dirs = []
|
||||
for path in script_paths("presets", check_all=True):
|
||||
for path in script_paths(subdir="presets", check_all=True):
|
||||
directory = _os.path.join(path, subdir)
|
||||
if not directory.startswith(path):
|
||||
raise Exception("invalid subdir given %r" % subdir)
|
||||
|
@ -532,7 +532,7 @@ def is_path_builtin(path):
|
|||
return False
|
||||
|
||||
|
||||
def smpte_from_seconds(time, fps=None, fps_base=None):
|
||||
def smpte_from_seconds(time, *, fps=None, fps_base=None):
|
||||
"""
|
||||
Returns an SMPTE formatted string from the *time*:
|
||||
``HH:MM:SS:FF``.
|
||||
|
@ -552,7 +552,7 @@ def smpte_from_seconds(time, fps=None, fps_base=None):
|
|||
)
|
||||
|
||||
|
||||
def smpte_from_frame(frame, fps=None, fps_base=None):
|
||||
def smpte_from_frame(frame, *, fps=None, fps_base=None):
|
||||
"""
|
||||
Returns an SMPTE formatted string from the *frame*:
|
||||
``HH:MM:SS:FF``.
|
||||
|
@ -585,7 +585,7 @@ def smpte_from_frame(frame, fps=None, fps_base=None):
|
|||
))
|
||||
|
||||
|
||||
def time_from_frame(frame, fps=None, fps_base=None):
|
||||
def time_from_frame(frame, *, fps=None, fps_base=None):
|
||||
"""
|
||||
Returns the time from a frame number .
|
||||
|
||||
|
@ -610,7 +610,7 @@ def time_from_frame(frame, fps=None, fps_base=None):
|
|||
return timedelta(0, frame / fps)
|
||||
|
||||
|
||||
def time_to_frame(time, fps=None, fps_base=None):
|
||||
def time_to_frame(time, *, fps=None, fps_base=None):
|
||||
"""
|
||||
Returns a float frame number from a time given in seconds or
|
||||
as a datetime.timedelta object.
|
||||
|
@ -639,7 +639,7 @@ def time_to_frame(time, fps=None, fps_base=None):
|
|||
return time * fps
|
||||
|
||||
|
||||
def preset_find(name, preset_path, display_name=False, ext=".py"):
|
||||
def preset_find(name, preset_path, *, display_name=False, ext=".py"):
|
||||
if not name:
|
||||
return None
|
||||
|
||||
|
@ -676,7 +676,7 @@ def keyconfig_init():
|
|||
keyconfig_set(filepath)
|
||||
|
||||
|
||||
def keyconfig_set(filepath, report=None):
|
||||
def keyconfig_set(filepath, *, report=None):
|
||||
from os.path import basename, splitext
|
||||
|
||||
if _bpy.app.debug_python:
|
||||
|
@ -712,14 +712,14 @@ def keyconfig_set(filepath, report=None):
|
|||
return True
|
||||
|
||||
|
||||
def user_resource(resource_type, path="", create=False):
|
||||
def user_resource(resource_type, *, path="", create=False):
|
||||
"""
|
||||
Return a user resource path (normally from the users home directory).
|
||||
|
||||
:arg type: Resource type in ['DATAFILES', 'CONFIG', 'SCRIPTS', 'AUTOSAVE'].
|
||||
:type type: string
|
||||
:arg subdir: Optional subdirectory.
|
||||
:type subdir: string
|
||||
:arg path: Optional subdirectory.
|
||||
:type path: string
|
||||
:arg create: Treat the path as a directory and create
|
||||
it if its not existing.
|
||||
:type create: boolean
|
||||
|
@ -727,7 +727,7 @@ def user_resource(resource_type, path="", create=False):
|
|||
:rtype: string
|
||||
"""
|
||||
|
||||
target_path = _user_resource(resource_type, path)
|
||||
target_path = _user_resource(resource_type, path=path)
|
||||
|
||||
if create:
|
||||
# should always be true.
|
||||
|
|
|
@ -447,7 +447,7 @@ def path_reference(
|
|||
"""
|
||||
import os
|
||||
is_relative = filepath.startswith("//")
|
||||
filepath_abs = bpy.path.abspath(filepath, base_src, library)
|
||||
filepath_abs = bpy.path.abspath(filepath, start=base_src, library=library)
|
||||
filepath_abs = os.path.normpath(filepath_abs)
|
||||
|
||||
if mode in {'ABSOLUTE', 'RELATIVE', 'STRIP'}:
|
||||
|
|
|
@ -64,7 +64,7 @@ def region_2d_to_vector_3d(region, rv3d, coord):
|
|||
return view_vector
|
||||
|
||||
|
||||
def region_2d_to_origin_3d(region, rv3d, coord, clamp=None):
|
||||
def region_2d_to_origin_3d(region, rv3d, coord, *, clamp=None):
|
||||
"""
|
||||
Return the 3d view origin from the region relative 2d coords.
|
||||
|
||||
|
@ -167,7 +167,7 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
|
|||
)[0]
|
||||
|
||||
|
||||
def location_3d_to_region_2d(region, rv3d, coord, default=None):
|
||||
def location_3d_to_region_2d(region, rv3d, coord, *, default=None):
|
||||
"""
|
||||
Return the *region* relative 2d location of a 3d position.
|
||||
|
||||
|
|
|
@ -150,7 +150,11 @@ class Object(bpy_types.ID):
|
|||
class WindowManager(bpy_types.ID):
|
||||
__slots__ = ()
|
||||
|
||||
def popup_menu(self, draw_func, title="", icon='NONE'):
|
||||
def popup_menu(
|
||||
self, draw_func, *,
|
||||
title="",
|
||||
icon='NONE',
|
||||
):
|
||||
import bpy
|
||||
popup = self.popmenu_begin__internal(title, icon=icon)
|
||||
|
||||
|
@ -176,7 +180,11 @@ class WindowManager(bpy_types.ID):
|
|||
finally:
|
||||
self.popover_end__internal(popup, keymap=keymap)
|
||||
|
||||
def popup_menu_pie(self, event, draw_func, title="", icon='NONE'):
|
||||
def popup_menu_pie(
|
||||
self, event, draw_func, *,
|
||||
title="",
|
||||
icon='NONE',
|
||||
):
|
||||
import bpy
|
||||
pie = self.piemenu_begin__internal(title, icon=icon, event=event)
|
||||
|
||||
|
@ -392,7 +400,7 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
|
|||
self.tail = self.head + vec
|
||||
self.roll = other.roll
|
||||
|
||||
def transform(self, matrix, scale=True, roll=True):
|
||||
def transform(self, matrix, *, scale=True, roll=True):
|
||||
"""
|
||||
Transform the the bones head, tail, roll and envelope
|
||||
(when the matrix has a scale component).
|
||||
|
@ -560,9 +568,17 @@ class Text(bpy_types.ID):
|
|||
self.write(string)
|
||||
|
||||
def as_module(self):
|
||||
from os.path import splitext
|
||||
import bpy
|
||||
from os.path import splitext, join
|
||||
from types import ModuleType
|
||||
mod = ModuleType(splitext(self.name)[0])
|
||||
name = self.name
|
||||
mod = ModuleType(splitext(name)[0])
|
||||
# This is a fake file-path, set this since some scripts check `__file__`,
|
||||
# error messages may include this as well.
|
||||
# NOTE: the file path may be a blank string if the file hasn't been saved.
|
||||
mod.__dict__.update({
|
||||
"__file__": join(bpy.data.filepath, name),
|
||||
})
|
||||
# TODO: We could use Text.compiled (C struct member)
|
||||
# if this is called often it will be much faster.
|
||||
exec(self.as_string(), mod.__dict__)
|
||||
|
@ -731,7 +747,7 @@ class Operator(StructRNA, metaclass=RNAMeta):
|
|||
return delattr(properties, attr)
|
||||
return super().__delattr__(attr)
|
||||
|
||||
def as_keywords(self, ignore=()):
|
||||
def as_keywords(self, *, ignore=()):
|
||||
"""Return a copy of the properties as a dictionary"""
|
||||
ignore = ignore + ("rna_type",)
|
||||
return {attr: getattr(self, attr)
|
||||
|
|
|
@ -86,7 +86,7 @@ def get_doc(obj):
|
|||
return result and RE_EMPTY_LINE.sub('', result.rstrip()) or ''
|
||||
|
||||
|
||||
def get_argspec(func, strip_self=True, doc=None, source=None):
|
||||
def get_argspec(func, *, strip_self=True, doc=None, source=None):
|
||||
"""Get argument specifications.
|
||||
|
||||
:param strip_self: strip `self` from argspec
|
||||
|
|
|
@ -143,7 +143,7 @@ def complete(line):
|
|||
"""
|
||||
import inspect
|
||||
|
||||
def try_import(mod, only_modules=False):
|
||||
def try_import(mod, *, only_modules=False):
|
||||
|
||||
def is_importable(module, attr):
|
||||
if only_modules:
|
||||
|
@ -184,7 +184,7 @@ def complete(line):
|
|||
mod = words[1].split('.')
|
||||
if len(mod) < 2:
|
||||
return filter_prefix(get_root_modules(), words[-1])
|
||||
completion_list = try_import('.'.join(mod[:-1]), True)
|
||||
completion_list = try_import('.'.join(mod[:-1]), only_modules=True)
|
||||
completion_list = ['.'.join(mod[:-1] + [el]) for el in completion_list]
|
||||
return filter_prefix(completion_list, words[-1])
|
||||
if len(words) >= 3 and words[0] == 'from':
|
||||
|
|
|
@ -62,7 +62,7 @@ def complete_names(word, namespace):
|
|||
return sorted(set(completer.matches))
|
||||
|
||||
|
||||
def complete_indices(word, namespace, obj=None, base=None):
|
||||
def complete_indices(word, namespace, *, obj=None, base=None):
|
||||
"""Complete a list or dictionary with its indices:
|
||||
|
||||
* integer numbers for list
|
||||
|
@ -117,7 +117,7 @@ def complete_indices(word, namespace, obj=None, base=None):
|
|||
return matches
|
||||
|
||||
|
||||
def complete(word, namespace, private=True):
|
||||
def complete(word, namespace, *, private=True):
|
||||
"""Complete word within a namespace with the standard rlcompleter
|
||||
module. Also supports index or key access [].
|
||||
|
||||
|
@ -191,7 +191,7 @@ def complete(word, namespace, private=True):
|
|||
# an extra char '[', '(' or '.' will be added
|
||||
if hasattr(obj, '__getitem__') and not is_struct_seq(obj):
|
||||
# list or dictionary
|
||||
matches = complete_indices(word, namespace, obj)
|
||||
matches = complete_indices(word, namespace, obj=obj)
|
||||
elif hasattr(obj, '__call__'):
|
||||
# callables
|
||||
matches = [word + '(']
|
||||
|
|
|
@ -87,7 +87,7 @@ def complete(line, cursor, namespace, private):
|
|||
matches.sort()
|
||||
else:
|
||||
from . import complete_namespace
|
||||
matches = complete_namespace.complete(word, namespace, private)
|
||||
matches = complete_namespace.complete(word, namespace, private=private)
|
||||
else:
|
||||
# for now we don't have completers for strings
|
||||
# TODO: add file auto completer for strings
|
||||
|
@ -96,7 +96,7 @@ def complete(line, cursor, namespace, private):
|
|||
return matches, word
|
||||
|
||||
|
||||
def expand(line, cursor, namespace, private=True):
|
||||
def expand(line, cursor, namespace, *, private=True):
|
||||
"""This method is invoked when the user asks autocompletion,
|
||||
e.g. when Ctrl+Space is clicked.
|
||||
|
||||
|
@ -150,5 +150,5 @@ def expand(line, cursor, namespace, private=True):
|
|||
line = line[:cursor] + prefix + line[cursor:]
|
||||
cursor += len(prefix.encode('utf-8'))
|
||||
if no_calltip and prefix.endswith('('):
|
||||
return expand(line, cursor, namespace, private)
|
||||
return expand(line, cursor, namespace, private=private)
|
||||
return line, cursor, scrollback
|
||||
|
|
|
@ -21,7 +21,7 @@ __all__ = (
|
|||
)
|
||||
|
||||
|
||||
def batch_for_shader(shader, type, content, indices=None):
|
||||
def batch_for_shader(shader, type, content, *, indices=None):
|
||||
"""
|
||||
Return a batch already configured and compatible with the shader.
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
def draw_circle_2d(position, color, radius, segments=32):
|
||||
def draw_circle_2d(position, color, radius, *, segments=32):
|
||||
"""
|
||||
Draw a circle.
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class NodeCategory:
|
|||
def poll(cls, _context):
|
||||
return True
|
||||
|
||||
def __init__(self, identifier, name, description="", items=None):
|
||||
def __init__(self, identifier, name, *, description="", items=None):
|
||||
self.identifier = identifier
|
||||
self.name = name
|
||||
self.description = description
|
||||
|
@ -43,7 +43,7 @@ class NodeCategory:
|
|||
|
||||
|
||||
class NodeItem:
|
||||
def __init__(self, nodetype, label=None, settings=None, poll=None):
|
||||
def __init__(self, nodetype, *, label=None, settings=None, poll=None):
|
||||
|
||||
if settings is None:
|
||||
settings = {}
|
||||
|
@ -92,7 +92,7 @@ class NodeItem:
|
|||
|
||||
|
||||
class NodeItemCustom:
|
||||
def __init__(self, poll=None, draw=None):
|
||||
def __init__(self, *, poll=None, draw=None):
|
||||
self.poll = poll
|
||||
self.draw = draw
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ ARRAY_TYPES = (list, tuple, IDPropertyArray, Vector)
|
|||
MAX_DISPLAY_ROWS = 4
|
||||
|
||||
|
||||
def rna_idprop_ui_get(item, create=True):
|
||||
def rna_idprop_ui_get(item, *, create=True):
|
||||
try:
|
||||
return item['_RNA_UI']
|
||||
except:
|
||||
|
@ -59,9 +59,9 @@ def rna_idprop_ui_prop_update(item, prop):
|
|||
prop_rna.update()
|
||||
|
||||
|
||||
def rna_idprop_ui_prop_get(item, prop, create=True):
|
||||
def rna_idprop_ui_prop_get(item, prop, *, create=True):
|
||||
|
||||
rna_ui = rna_idprop_ui_get(item, create)
|
||||
rna_ui = rna_idprop_ui_get(item, create=create)
|
||||
|
||||
if rna_ui is None:
|
||||
return None
|
||||
|
@ -73,8 +73,8 @@ def rna_idprop_ui_prop_get(item, prop, create=True):
|
|||
return rna_ui[prop]
|
||||
|
||||
|
||||
def rna_idprop_ui_prop_clear(item, prop, remove=True):
|
||||
rna_ui = rna_idprop_ui_get(item, False)
|
||||
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
|
||||
|
@ -143,7 +143,7 @@ def rna_idprop_ui_prop_default_set(item, prop, value):
|
|||
pass
|
||||
|
||||
if defvalue:
|
||||
rna_ui = rna_idprop_ui_prop_get(item, prop, True)
|
||||
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)
|
||||
|
@ -181,7 +181,7 @@ def rna_idprop_ui_create(
|
|||
rna_idprop_ui_prop_update(item, prop)
|
||||
|
||||
# Clear the UI settings
|
||||
rna_ui_group = rna_idprop_ui_get(item, True)
|
||||
rna_ui_group = rna_idprop_ui_get(item, create=True)
|
||||
rna_ui_group[prop] = {}
|
||||
rna_ui = rna_ui_group[prop]
|
||||
|
||||
|
@ -210,7 +210,7 @@ def rna_idprop_ui_create(
|
|||
return rna_ui
|
||||
|
||||
|
||||
def draw(layout, context, context_member, property_type, use_edit=True):
|
||||
def draw(layout, context, context_member, property_type, *, use_edit=True):
|
||||
|
||||
def assign_props(prop, val, key):
|
||||
prop.data_path = context_member
|
||||
|
|
|
@ -245,9 +245,10 @@ def rna2xml(
|
|||
fw("%s</%s>\n" % (root_ident, root_node))
|
||||
|
||||
|
||||
def xml2rna(root_xml,
|
||||
root_rna=None, # must be set
|
||||
):
|
||||
def xml2rna(
|
||||
root_xml, *,
|
||||
root_rna=None, # must be set
|
||||
):
|
||||
|
||||
def rna2xml_node(xml_node, value):
|
||||
# print("evaluating:", xml_node.nodeName)
|
||||
|
@ -394,7 +395,7 @@ def xml_file_run(context, filepath, rna_map):
|
|||
xml2rna(xml_node, root_rna=value)
|
||||
|
||||
|
||||
def xml_file_write(context, filepath, rna_map, skip_typemap=None):
|
||||
def xml_file_write(context, filepath, rna_map, *, skip_typemap=None):
|
||||
|
||||
file = open(filepath, "w", encoding="utf-8")
|
||||
fw = file.write
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 6.16
|
||||
bpy.context.camera.sensor_height = 4.62
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 13.2
|
||||
bpy.context.camera.sensor_height = 8.80
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 7.18
|
||||
bpy.context.camera.sensor_height = 5.32
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 6.17
|
||||
bpy.context.camera.sensor_height = 4.55
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 5.76
|
||||
bpy.context.camera.sensor_height = 4.29
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 5.37
|
||||
bpy.context.camera.sensor_height = 4.04
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,5 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 4.54
|
||||
bpy.context.camera.sensor_height = 3.42
|
||||
bpy.context.camera.lens = 3.85
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 9.6
|
||||
bpy.context.camera.sensor_height = 5.4
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 8.8
|
||||
bpy.context.camera.sensor_height = 6.6
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 17.31
|
||||
bpy.context.camera.sensor_height = 12.98
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 23.6
|
||||
bpy.context.camera.sensor_height = 15.6
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 22.30
|
||||
bpy.context.camera.sensor_height = 14.90
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 27.90
|
||||
bpy.context.camera.sensor_height = 18.60
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 10.26
|
||||
bpy.context.camera.sensor_height = 7.49
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 22
|
||||
bpy.context.camera.sensor_height = 16
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 52.45
|
||||
bpy.context.camera.sensor_height = 23.01
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 71.41
|
||||
bpy.context.camera.sensor_height = 52.63
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 12.35
|
||||
bpy.context.camera.sensor_height = 7.42
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 24.89
|
||||
bpy.context.camera.sensor_height = 18.66
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 23.760
|
||||
bpy.context.camera.sensor_height = 13.365
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 54.12
|
||||
bpy.context.camera.sensor_height = 25.58
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 36.70
|
||||
bpy.context.camera.sensor_height = 25.54
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 29.90
|
||||
bpy.context.camera.sensor_height = 15.77
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 15.81
|
||||
bpy.context.camera.sensor_height = 8.88
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 12.48
|
||||
bpy.context.camera.sensor_height = 7.02
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 18.96
|
||||
bpy.context.camera.sensor_height = 10.00
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 23.10
|
||||
bpy.context.camera.sensor_height = 12.99
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 21.12
|
||||
bpy.context.camera.sensor_height = 11.88
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 25.34
|
||||
bpy.context.camera.sensor_height = 14.25
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 32
|
||||
bpy.context.camera.sensor_height = 18
|
||||
bpy.context.camera.sensor_fit = 'AUTO'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 22.2
|
||||
bpy.context.camera.sensor_height = 14.7
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 22.3
|
||||
bpy.context.camera.sensor_height = 14.9
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 24.4
|
||||
bpy.context.camera.sensor_height = 13.5
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 20.70
|
||||
bpy.context.camera.sensor_height = 13.80
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 36
|
||||
bpy.context.camera.sensor_height = 24
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,6 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 6.16
|
||||
bpy.context.camera.sensor_height = 4.62
|
||||
bpy.context.camera.lens = 2.77
|
||||
|
||||
bpy.context.camera.sensor_fit = 'AUTO'
|
|
@ -1,6 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 5.371
|
||||
bpy.context.camera.sensor_height = 4.035
|
||||
bpy.context.camera.lens = 2.77
|
||||
|
||||
bpy.context.camera.sensor_fit = 'AUTO'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 17.3
|
||||
bpy.context.camera.sensor_height = 13.0
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 44
|
||||
bpy.context.camera.sensor_height = 33
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,5 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 4.5
|
||||
bpy.context.camera.sensor_height = 3.37
|
||||
bpy.context.camera.lens = 3.91
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 23.1
|
||||
bpy.context.camera.sensor_height = 15.4
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 23.6
|
||||
bpy.context.camera.sensor_height = 15.8
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 4.68
|
||||
bpy.context.camera.sensor_height = 2.633
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 8.5
|
||||
bpy.context.camera.sensor_height = 4.78
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 25.60
|
||||
bpy.context.camera.sensor_height = 13.5
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 30.70
|
||||
bpy.context.camera.sensor_height = 15.80
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 29.90
|
||||
bpy.context.camera.sensor_height = 15.77
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 40.96
|
||||
bpy.context.camera.sensor_height = 21.60
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 30.0
|
||||
bpy.context.camera.sensor_height = 15.0
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 11.1
|
||||
bpy.context.camera.sensor_height = 6.24
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 16.65
|
||||
bpy.context.camera.sensor_height = 9.36
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 22.2
|
||||
bpy.context.camera.sensor_height = 12.6
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,5 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 4.8
|
||||
bpy.context.camera.sensor_height = 3.6
|
||||
bpy.context.camera.lens = 3.70
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,5 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 4.8
|
||||
bpy.context.camera.sensor_height = 3.6
|
||||
bpy.context.camera.lens = 4.20
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 23.4
|
||||
bpy.context.camera.sensor_height = 15.6
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 6.97
|
||||
bpy.context.camera.sensor_height = 3.92
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 24.33
|
||||
bpy.context.camera.sensor_height = 12.83
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,4 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 12.52
|
||||
bpy.context.camera.sensor_height = 7.41
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
|
@ -1,5 +0,0 @@
|
|||
import bpy
|
||||
bpy.context.camera.sensor_width = 4.54
|
||||
bpy.context.camera.sensor_height = 3.42
|
||||
bpy.context.camera.lens = 4.10
|
||||
bpy.context.camera.sensor_fit = 'HORIZONTAL'
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue