Sculpt: Add global automasking propagation steps #117316
|
@ -492,6 +492,11 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||
set(cuda_flags ${cuda_flags} --ptxas-options="-v")
|
||||
endif()
|
||||
|
||||
if(${cuda_version} GREATER_EQUAL 110)
|
||||
# Helps with compatibility when using recent clang host compiler.
|
||||
set(cuda_flags ${cuda_flags} -std=c++17)
|
||||
endif()
|
||||
|
||||
set(_cuda_nvcc_args
|
||||
-arch=${arch}
|
||||
${CUDA_NVCC_FLAGS}
|
||||
|
@ -526,9 +531,11 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||
if(DEFINED CUDA10_NVCC_EXECUTABLE)
|
||||
set(cuda_nvcc_executable ${CUDA10_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA10_TOOLKIT_ROOT_DIR})
|
||||
set(cuda_version 100)
|
||||
elseif("${CUDA_VERSION}" LESS 110) # Support for sm_30 was removed in CUDA 11
|
||||
set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
|
||||
set(cuda_version ${CUDA_VERSION})
|
||||
else()
|
||||
message(STATUS "CUDA binaries for ${arch} require CUDA 10 or earlier, skipped.")
|
||||
endif()
|
||||
|
@ -536,9 +543,11 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||
if(DEFINED CUDA11_NVCC_EXECUTABLE)
|
||||
set(cuda_nvcc_executable ${CUDA11_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA11_TOOLKIT_ROOT_DIR})
|
||||
set(cuda_version 110)
|
||||
elseif("${CUDA_VERSION}" LESS 120) # Support for sm_35, sm_37 was removed in CUDA 12
|
||||
set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
|
||||
set(cuda_version ${CUDA_VERSION})
|
||||
else()
|
||||
message(STATUS "CUDA binaries for ${arch} require CUDA 11 or earlier, skipped.")
|
||||
endif()
|
||||
|
@ -548,15 +557,18 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||
if("${CUDA_VERSION}" GREATER_EQUAL 111) # Support for sm_86 was introduced in CUDA 11
|
||||
set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
|
||||
set(cuda_version ${CUDA_VERSION})
|
||||
elseif(DEFINED CUDA11_NVCC_EXECUTABLE)
|
||||
set(cuda_nvcc_executable ${CUDA11_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA11_TOOLKIT_ROOT_DIR})
|
||||
set(cuda_version 110)
|
||||
else()
|
||||
message(STATUS "CUDA binaries for ${arch} require CUDA 11.1+, skipped.")
|
||||
endif()
|
||||
else()
|
||||
set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
|
||||
set(cuda_version ${CUDA_VERSION})
|
||||
endif()
|
||||
if(DEFINED cuda_nvcc_executable AND DEFINED cuda_toolkit_root_dir)
|
||||
# Compile regular kernel
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "GHOST_Event.hh"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
/**
|
||||
* Drag & drop event
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include "utf_winfunc.hh"
|
||||
#include "utfconv.hh"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "GHOST_DisplayManagerWin32.hh"
|
||||
#include "GHOST_EventButton.hh"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
|
||||
struct ColorSpace;
|
||||
struct ImBuf;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
sodipodi:docname="blender_icons.svg"
|
||||
version="1.0"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||
sodipodi:version="0.32"
|
||||
id="svg2"
|
||||
height="640"
|
||||
|
@ -45,9 +45,9 @@
|
|||
inkscape:window-height="1009"
|
||||
id="namedview34335"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.4142136"
|
||||
inkscape:cx="268.34702"
|
||||
inkscape:cy="242.89117"
|
||||
inkscape:zoom="32.000001"
|
||||
inkscape:cx="386.92187"
|
||||
inkscape:cy="586.82811"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
|
@ -8259,17 +8259,6 @@
|
|||
id="path12897-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g21041"
|
||||
inkscape:label="BA-19"
|
||||
style="display:inline;enable-background:new">
|
||||
<path
|
||||
id="path18998-9"
|
||||
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:accumulate"
|
||||
d="m 398,581 h -1 v -2 l 0.8535,-0.8535 c 0.091,0.09 0.1465,0.2154 0.1465,0.3535 z m -1,-2 0.8535,-0.8535 C 397.7635,578.0555 397.6381,578 397.5,578 h -9 c -0.1326,0 -0.2598,0.053 -0.3535,0.1465 l -4,4.0078 c -0.094,0.094 -0.1465,0.2209 -0.1465,0.3535 V 591.5 c 0,0.2761 0.2239,0.5 0.5,0.5 h 13 c 0.2761,0 0.5,-0.2239 0.5,-0.5 V 589 c -10e-5,-1.0628 -0.406,-2.084 -1.1367,-2.8438 l -0.01,-0.01 L 394.707,584 h 2.793 c 0.6761,0.01 0.6761,-1.0096 0,-1 h -3.9395 c -0.3255,-0.042 -0.6029,0.235 -0.5605,0.5605 V 587.5 c -0.01,0.6761 1.0096,0.6761 1,0 v -2.793 l 2.1426,2.1426 c 0.5484,0.5702 0.8573,1.3426 0.8574,2.1504 v 2 h -12 v -8.2852 L 388.707,579 Z"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccscccccccssssscccccccccccccccccc" />
|
||||
</g>
|
||||
<g
|
||||
style="display:inline;fill:#ffffff;enable-background:new"
|
||||
id="g10027-7"
|
||||
|
@ -19278,6 +19267,12 @@
|
|||
transform="scale(1,-1)"
|
||||
inkscape:label="frame" />
|
||||
</g>
|
||||
<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;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:new"
|
||||
d="m 384.5,578.03125 c -0.27613,3e-5 -0.49997,0.22387 -0.5,0.5 v 13 c 3e-5,0.27613 0.22387,0.49997 0.5,0.5 h 13 c 0.27613,-3e-5 0.49997,-0.22387 0.5,-0.5 v -9.99219 c -3e-5,-0.1326 -0.0527,-0.25975 -0.14648,-0.35351 l -3,-3.00782 c -0.0938,-0.0938 -0.22092,-0.14646 -0.35352,-0.14648 z m 0.5,1 h 2 v 4.5 c 3e-5,0.27613 0.22387,0.49997 0.5,0.5 h 6 c 0.27613,-3e-5 0.49997,-0.22387 0.5,-0.5 v -4.5 h 0.29297 L 397,581.74609 v 9.28516 h -12 z m 6,0 h 2 v 4 h -2 z"
|
||||
id="path20467-8"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccccccccccccccccccc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
|
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.6 MiB |
Binary file not shown.
Binary file not shown.
|
@ -164,7 +164,7 @@ const UserDef U_default = {
|
|||
.image_draw_method = IMAGE_DRAW_METHOD_AUTO,
|
||||
.glalphaclip = 0.004,
|
||||
.autokey_mode = (AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON),
|
||||
.autokey_flag = AUTOKEY_FLAG_XYZ2RGB,
|
||||
.keying_flag = KEYING_FLAG_XYZ2RGB | AUTOKEY_FLAG_INSERTNEEDED,
|
||||
.key_insert_channels = (USER_ANIM_KEY_CHANNEL_LOCATION | USER_ANIM_KEY_CHANNEL_ROTATION |
|
||||
USER_ANIM_KEY_CHANNEL_SCALE | USER_ANIM_KEY_CHANNEL_CUSTOM_PROPERTIES),
|
||||
.animation_flag = USER_ANIM_HIGH_QUALITY_DRAWING,
|
||||
|
|
|
@ -23,7 +23,7 @@ parser.add_argument(
|
|||
help="Task that is contains the release notes information (e.g. #77348)")
|
||||
parser.add_argument(
|
||||
"--format",
|
||||
help="Format the result in `text`, `steam`, `wiki` or `html`",
|
||||
help="Format the result in `text`, `steam`, `markdown` or `html`",
|
||||
default="text")
|
||||
args = parser.parse_args()
|
||||
|
||||
|
|
|
@ -73,11 +73,11 @@ class ReleaseLogLine:
|
|||
def __format_as_steam(self) -> str:
|
||||
return f"* {self.title} ([url={self.url}]{self.ref}[/url])"
|
||||
|
||||
def __format_as_wiki(self) -> str:
|
||||
def __format_as_markdown(self) -> str:
|
||||
if self.issue_id:
|
||||
return f"* {self.title} [{{{{BugReport|{self.issue_id}}}}}]"
|
||||
return f"* {self.title} ({self.issue_repo}#{self.issue_id})"
|
||||
else:
|
||||
return f"* {self.title} [{{{{GitCommit|{self.commit_id[2:]}}}}}]"
|
||||
return f"* {self.title} ({self.commit_repo}@{self.commit_id})"
|
||||
|
||||
def format(self, format: str) -> str:
|
||||
"""
|
||||
|
@ -90,8 +90,8 @@ class ReleaseLogLine:
|
|||
return self.__format_as_html()
|
||||
elif format == 'steam':
|
||||
return self.__format_as_steam()
|
||||
elif format == 'wiki':
|
||||
return self.__format_as_wiki()
|
||||
elif format == 'markdown':
|
||||
return self.__format_as_markdown()
|
||||
else:
|
||||
return self.__format_as_text()
|
||||
|
||||
|
|
|
@ -612,7 +612,10 @@ class _ext_global:
|
|||
|
||||
# Store a map of `preferences.filepaths.extension_repos` -> `module_id`.
|
||||
# Only needed to detect renaming between `bpy.app.handlers.extension_repos_update_{pre & post}` events.
|
||||
idmap = {}
|
||||
#
|
||||
# The first dictionary is for enabled repositories, the second for disabled repositories
|
||||
# which can be ignored in most cases and is only needed for a module rename.
|
||||
idmap_pair = {}, {}
|
||||
|
||||
# The base package created by `JunctionModuleHandle`.
|
||||
module_handle = None
|
||||
|
@ -624,12 +627,14 @@ _ext_base_pkg_idname = "bl_ext"
|
|||
|
||||
def _extension_preferences_idmap():
|
||||
repos_idmap = {}
|
||||
repos_idmap_disabled = {}
|
||||
if _preferences.experimental.use_extension_repos:
|
||||
for repo in _preferences.filepaths.extension_repos:
|
||||
if not repo.enabled:
|
||||
continue
|
||||
repos_idmap[repo.as_pointer()] = repo.module
|
||||
return repos_idmap
|
||||
if repo.enabled:
|
||||
repos_idmap[repo.as_pointer()] = repo.module
|
||||
else:
|
||||
repos_idmap_disabled[repo.as_pointer()] = repo.module
|
||||
return repos_idmap, repos_idmap_disabled
|
||||
|
||||
|
||||
def _extension_dirpath_from_preferences():
|
||||
|
@ -654,24 +659,161 @@ def _extension_dirpath_from_handle():
|
|||
repos_info[module_id] = dirpath
|
||||
return repos_info
|
||||
|
||||
|
||||
# Ensure the add-ons follow changes to repositories, enabling, disabling and module renaming.
|
||||
def _initialize_extension_repos_post_addons_prepare(
|
||||
module_handle,
|
||||
*,
|
||||
submodules_del,
|
||||
submodules_add,
|
||||
submodules_rename_module,
|
||||
submodules_del_disabled,
|
||||
submodules_rename_module_disabled,
|
||||
):
|
||||
addons_to_enable = []
|
||||
if not (
|
||||
submodules_del or
|
||||
submodules_add or
|
||||
submodules_rename_module or
|
||||
submodules_del_disabled or
|
||||
submodules_rename_module_disabled
|
||||
):
|
||||
return addons_to_enable
|
||||
|
||||
# All preferences info.
|
||||
# Map: `repo_id -> {submodule_id -> addon, ...}`.
|
||||
addon_userdef_info = {}
|
||||
module_prefix = _ext_base_pkg_idname + "."
|
||||
for addon in _preferences.addons:
|
||||
module = addon.module
|
||||
if not module.startswith(module_prefix):
|
||||
continue
|
||||
module_id, submodule_id = module[len(module_prefix):].partition(".")[0::2]
|
||||
try:
|
||||
addon_userdef_info[module_id][submodule_id] = addon
|
||||
except KeyError:
|
||||
addon_userdef_info[module_id] = {submodule_id: addon}
|
||||
|
||||
# All run-time info.
|
||||
# Map: `module_id -> {submodule_id -> module, ...}`.
|
||||
addon_runtime_info = {}
|
||||
for module_id, repo_module in module_handle.submodule_items():
|
||||
extensions_info = {}
|
||||
for submodule_id in dir(repo_module):
|
||||
if submodule_id.startswith("_"):
|
||||
continue
|
||||
mod = getattr(repo_module, submodule_id)
|
||||
# Filter out non add-on, non-modules.
|
||||
if not hasattr(mod, "__addon_enabled__"):
|
||||
continue
|
||||
extensions_info[submodule_id] = mod
|
||||
addon_runtime_info[module_id] = extensions_info
|
||||
del extensions_info
|
||||
|
||||
# Apply changes to add-ons.
|
||||
if submodules_add:
|
||||
# Re-enable add-ons that exist in the user preferences,
|
||||
# this lets the add-ons state be restored when toggling a repository.
|
||||
for module_id, _dirpath in submodules_add:
|
||||
repo_userdef = addon_userdef_info.get(module_id, {})
|
||||
repo_runtime = addon_runtime_info.get(module_id, {})
|
||||
|
||||
for submodule_id, addon in repo_userdef.items():
|
||||
module_name_next = "%s.%s.%s" % (_ext_base_pkg_idname, module_id, submodule_id)
|
||||
# Only default & persistent add-ons are kept for re-activation.
|
||||
default_set = True
|
||||
persistent = True
|
||||
addons_to_enable.append((module_name_next, addon, default_set, persistent))
|
||||
|
||||
for module_id_prev, module_id_next in submodules_rename_module:
|
||||
repo_userdef = addon_userdef_info.get(module_id_prev, {})
|
||||
repo_runtime = addon_runtime_info.get(module_id_prev, {})
|
||||
for submodule_id, mod in repo_runtime.items():
|
||||
if not getattr(mod, "__addon_enabled__", False):
|
||||
continue
|
||||
module_name_prev = "%s.%s.%s" % (_ext_base_pkg_idname, module_id_prev, submodule_id)
|
||||
module_name_next = "%s.%s.%s" % (_ext_base_pkg_idname, module_id_next, submodule_id)
|
||||
disable(module_name_prev, default_set=False)
|
||||
addon = repo_userdef.get(submodule_id)
|
||||
default_set = addon is not None
|
||||
persistent = getattr(mod, "__addon_persistent__", False)
|
||||
addons_to_enable.append((module_name_next, addon, default_set, persistent))
|
||||
|
||||
for module_id_prev, module_id_next in submodules_rename_module_disabled:
|
||||
repo_userdef = addon_userdef_info.get(module_id_prev, {})
|
||||
repo_runtime = addon_runtime_info.get(module_id_prev, {})
|
||||
for submodule_id, addon in repo_userdef.items():
|
||||
mod = repo_runtime.get(submodule_id)
|
||||
if mod is not None and getattr(mod, "__addon_enabled__", False):
|
||||
continue
|
||||
# Either there is no run-time data or the module wasn't enabled.
|
||||
# Rename the add-on without enabling it so the next time it's enabled it's preferences are kept.
|
||||
module_name_next = "%s.%s.%s" % (_ext_base_pkg_idname, module_id_next, submodule_id)
|
||||
addon.module = module_name_next
|
||||
|
||||
if submodules_del:
|
||||
repo_module_map = {repo.module: repo for repo in _preferences.filepaths.extension_repos}
|
||||
for module_id in submodules_del:
|
||||
repo_userdef = addon_userdef_info.get(module_id, {})
|
||||
repo_runtime = addon_runtime_info.get(module_id, {})
|
||||
|
||||
repo = repo_module_map.get(module_id)
|
||||
default_set = True
|
||||
if repo and not repo.enabled:
|
||||
# The repository exists but has been disabled, keep the add-on preferences
|
||||
# because the user may want to re-enable the repository temporarily.
|
||||
default_set = False
|
||||
|
||||
for submodule_id, mod in repo_runtime.items():
|
||||
module_name_prev = "%s.%s.%s" % (_ext_base_pkg_idname, module_id, submodule_id)
|
||||
disable(module_name_prev, default_set=default_set)
|
||||
del repo
|
||||
del repo_module_map
|
||||
|
||||
if submodules_del_disabled:
|
||||
for module_id_prev in submodules_del_disabled:
|
||||
repo_userdef = addon_userdef_info.get(module_id_prev, {})
|
||||
for submodule_id in repo_userdef.keys():
|
||||
module_name_prev = "%s.%s.%s" % (_ext_base_pkg_idname, module_id_prev, submodule_id)
|
||||
disable(module_name_prev, default_set=True)
|
||||
|
||||
return addons_to_enable
|
||||
|
||||
|
||||
# Enable add-ons after the modules have been manipulated.
|
||||
def _initialize_extension_repos_post_addons_restore(addons_to_enable):
|
||||
if not addons_to_enable:
|
||||
return
|
||||
|
||||
for (module_name_next, addon, default_set, persistent) in addons_to_enable:
|
||||
# Ensure the preferences are kept.
|
||||
if addon is not None:
|
||||
addon.module = module_name_next
|
||||
enable(module_name_next, default_set=default_set, persistent=persistent)
|
||||
# Needed for module rename.
|
||||
modules._is_first = True
|
||||
|
||||
|
||||
# Use `bpy.app.handlers.extension_repos_update_{pre/post}` to track changes to extension repositories
|
||||
# and sync the changes to the Python module.
|
||||
|
||||
|
||||
@_bpy.app.handlers.persistent
|
||||
def _initialize_extension_repos_pre(*_):
|
||||
_ext_global.idmap = _extension_preferences_idmap()
|
||||
_ext_global.idmap_pair = _extension_preferences_idmap()
|
||||
|
||||
|
||||
@_bpy.app.handlers.persistent
|
||||
def _initialize_extension_repos_post(*_):
|
||||
def _initialize_extension_repos_post(*_, is_first=False):
|
||||
do_addons = not is_first
|
||||
|
||||
# Map `module_id` -> `dirpath`.
|
||||
repos_info_prev = _extension_dirpath_from_handle()
|
||||
repos_info_next = _extension_dirpath_from_preferences()
|
||||
|
||||
# Map `repo.as_pointer()` -> `module_id`.
|
||||
repos_idmap_prev = _ext_global.idmap
|
||||
repos_idmap_next = _extension_preferences_idmap()
|
||||
repos_idmap_prev, repos_idmap_prev_disabled = _ext_global.idmap_pair
|
||||
repos_idmap_next, repos_idmap_next_disabled = _extension_preferences_idmap()
|
||||
|
||||
# Map `module_id` -> `repo.as_pointer()`.
|
||||
repos_idmap_next_reverse = {value: key for key, value in repos_idmap_next.items()}
|
||||
|
@ -690,10 +832,6 @@ def _initialize_extension_repos_post(*_):
|
|||
if module_id_prev not in repos_info_prev:
|
||||
del repos_idmap_prev[repo_id_prev]
|
||||
|
||||
# NOTE(@ideasman42): supporting renaming at all is something we might limit to extensions
|
||||
# which have no add-ons loaded as supporting renaming add-ons in-place seems error prone as the add-on
|
||||
# may define internal variables based on the full package path.
|
||||
|
||||
submodules_add = [] # List of module names to add: `(module_id, dirpath)`.
|
||||
submodules_del = [] # List of module names to remove: `module_id`.
|
||||
submodules_rename_module = [] # List of module names: `(module_id_src, module_id_dst)`.
|
||||
|
@ -732,7 +870,38 @@ def _initialize_extension_repos_post(*_):
|
|||
if (module_id not in repos_info_next) and (module_id not in renamed_prev):
|
||||
submodules_del.append(module_id)
|
||||
|
||||
# Apply changes to the `_ext_base_pkg_idname` named module so it matches extension data from the preferences.
|
||||
if do_addons:
|
||||
submodules_del_disabled = [] # A version of `submodules_del` for disabled repositories.
|
||||
submodules_rename_module_disabled = [] # A version of `submodules_rename_module` for disabled repositories.
|
||||
|
||||
# Detect deleted modules.
|
||||
for repo_id_prev, module_id_prev in repos_idmap_prev_disabled.items():
|
||||
if (
|
||||
(repo_id_prev not in repos_idmap_next_disabled) and
|
||||
(repo_id_prev not in repos_idmap_next)
|
||||
):
|
||||
submodules_del_disabled.append(module_id_prev)
|
||||
|
||||
# Detect rename of disabled modules.
|
||||
for repo_id_next, module_id_next in repos_idmap_next_disabled.items():
|
||||
module_id_prev = repos_idmap_prev_disabled.get(repo_id_next)
|
||||
if module_id_prev is None:
|
||||
continue
|
||||
# Detect rename.
|
||||
if module_id_next != module_id_prev:
|
||||
submodules_rename_module_disabled.append((module_id_prev, module_id_next))
|
||||
|
||||
addons_to_enable = _initialize_extension_repos_post_addons_prepare(
|
||||
_ext_global.module_handle,
|
||||
submodules_del=submodules_del,
|
||||
submodules_add=submodules_add,
|
||||
submodules_rename_module=submodules_rename_module,
|
||||
submodules_del_disabled=submodules_del_disabled,
|
||||
submodules_rename_module_disabled=submodules_rename_module_disabled,
|
||||
)
|
||||
del submodules_del_disabled, submodules_rename_module_disabled
|
||||
|
||||
# Apply changes to the `_ext_base_pkg_idname` named module so it matches extension data from the preferences.
|
||||
module_handle = _ext_global.module_handle
|
||||
for module_id in submodules_del:
|
||||
module_handle.unregister_submodule(module_id)
|
||||
|
@ -743,7 +912,11 @@ def _initialize_extension_repos_post(*_):
|
|||
for module_id, dirpath in submodules_rename_dirpath:
|
||||
module_handle.rename_directory(module_id, dirpath)
|
||||
|
||||
_ext_global.idmap.clear()
|
||||
_ext_global.idmap_pair[0].clear()
|
||||
_ext_global.idmap_pair[1].clear()
|
||||
|
||||
if do_addons:
|
||||
_initialize_extension_repos_post_addons_restore(addons_to_enable)
|
||||
|
||||
# Force refreshing if directory paths change.
|
||||
if submodules_del or submodules_add or submodules_rename_dirpath:
|
||||
|
@ -759,7 +932,7 @@ def _initialize_extensions_repos_once():
|
|||
# Setup repositories for the first time.
|
||||
# Intentionally don't call `_initialize_extension_repos_pre` as this is the first time,
|
||||
# the previous state is not useful to read.
|
||||
_initialize_extension_repos_post()
|
||||
_initialize_extension_repos_post(is_first=True)
|
||||
|
||||
# Internal handlers intended for Blender's own handling of repositories.
|
||||
_bpy.app.handlers._extension_repos_update_pre.append(_initialize_extension_repos_pre)
|
||||
|
|
|
@ -425,8 +425,8 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern):
|
|||
try:
|
||||
bpy.ops.wm.save_mainfile()
|
||||
except BaseException as ex:
|
||||
# Might fail in some odd cases, like e.g. in regression files we have glsl/ram_glsl.blend which
|
||||
# references an inexistent texture... Better not break in this case, just spit error to console.
|
||||
# Might fail in some odd cases, like e.g. in regression files we have `glsl/ram_glsl.blend` which
|
||||
# references an nonexistent texture. Better not break in this case, just spit error to console.
|
||||
print("ERROR:", ex)
|
||||
else:
|
||||
print("*NOT* Saving %s, because some error(s) happened while deleting temp render data..." % bpy.data.filepath)
|
||||
|
|
|
@ -124,6 +124,27 @@ class JunctionModuleHandle:
|
|||
delattr(self._module, submodule_name)
|
||||
del sys.modules[name_full]
|
||||
|
||||
# Remove all sub-modules, to prevent them being reused in the future.
|
||||
#
|
||||
# While it might not seem like a problem to keep these around it means if a module
|
||||
# with the same name is registered later, importing sub-modules uses the cached values
|
||||
# from `sys.modules` and does *not* assign the module to the name-space of the new `submodule`.
|
||||
# This isn't exactly a bug, it's often assumed that inspecting a module
|
||||
# is a way to find its sub-modules, using `dir(submodule)` for example.
|
||||
# For more technical example `sys.modules["foo.bar"] == sys.modules["foo"].bar`
|
||||
# which can fail with and attribute error unless the modules are cleared here.
|
||||
#
|
||||
# An alternative solution could be re-attach sub-modules to the modules name-space when its re-registered.
|
||||
# This has some advantages since the module doesn't have to be re-imported however it has the down
|
||||
# side that stale data would be kept in `sys.modules` unnecessarily in many cases.
|
||||
name_full_prefix = name_full + "."
|
||||
submodule_name_list = [
|
||||
submodule_name for submodule_name in sys.modules.keys()
|
||||
if submodule_name.startswith(name_full_prefix)
|
||||
]
|
||||
for submodule_name in submodule_name_list:
|
||||
del sys.modules[submodule_name]
|
||||
|
||||
def rename_submodule(self, submodule_name_src: str, submodule_name_dst: str) -> None:
|
||||
name_full_prev = self._module_name + "." + submodule_name_src
|
||||
name_full_next = self._module_name + "." + submodule_name_dst
|
||||
|
|
|
@ -11,7 +11,7 @@ __all__ = (
|
|||
"object_add_grid_scale",
|
||||
"object_add_grid_scale_apply_operator",
|
||||
"world_to_camera_view",
|
||||
"object_verify_active_shape_key_is_editable",
|
||||
"object_report_if_active_shape_key_is_locked",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class OBJECT_MT_modifier_add(ModifierAddMenu, Menu):
|
|||
if geometry_nodes_supported:
|
||||
self.operator_modifier_add(layout, 'NODES')
|
||||
layout.separator()
|
||||
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE', 'GREASEPENCIL'}:
|
||||
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
|
||||
layout.menu("OBJECT_MT_modifier_add_edit")
|
||||
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'VOLUME', 'GREASEPENCIL'}:
|
||||
layout.menu("OBJECT_MT_modifier_add_generate")
|
||||
|
@ -79,6 +79,8 @@ class OBJECT_MT_modifier_add(ModifierAddMenu, Menu):
|
|||
layout.menu("OBJECT_MT_modifier_add_deform")
|
||||
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
|
||||
layout.menu("OBJECT_MT_modifier_add_physics")
|
||||
if ob_type in {'GREASEPENCIL'}:
|
||||
layout.menu("OBJECT_MT_modifier_add_color")
|
||||
|
||||
if geometry_nodes_supported:
|
||||
layout.menu_contents("OBJECT_MT_modifier_add_root_catalogs")
|
||||
|
@ -105,8 +107,6 @@ class OBJECT_MT_modifier_add_edit(ModifierAddMenu, Menu):
|
|||
self.operator_modifier_add(layout, 'VERTEX_WEIGHT_EDIT')
|
||||
self.operator_modifier_add(layout, 'VERTEX_WEIGHT_MIX')
|
||||
self.operator_modifier_add(layout, 'VERTEX_WEIGHT_PROXIMITY')
|
||||
if ob_type == 'GREASEPENCIL':
|
||||
self.operator_modifier_add(layout, 'GREASE_PENCIL_OPACITY')
|
||||
layout.template_modifier_asset_menu_items(catalog_path=self.bl_label)
|
||||
|
||||
|
||||
|
@ -211,6 +211,20 @@ class OBJECT_MT_modifier_add_physics(ModifierAddMenu, Menu):
|
|||
layout.template_modifier_asset_menu_items(catalog_path=self.bl_label)
|
||||
|
||||
|
||||
class OBJECT_MT_modifier_add_color(ModifierAddMenu, Menu):
|
||||
bl_label = "Color"
|
||||
bl_options = {'SEARCH_ON_KEY_PRESS'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
ob_type = context.object.type
|
||||
if ob_type == 'GREASEPENCIL':
|
||||
self.operator_modifier_add(layout, 'GREASE_PENCIL_COLOR')
|
||||
self.operator_modifier_add(layout, 'GREASE_PENCIL_TINT')
|
||||
self.operator_modifier_add(layout, 'GREASE_PENCIL_OPACITY')
|
||||
layout.template_modifier_asset_menu_items(catalog_path=self.bl_label)
|
||||
|
||||
|
||||
class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
|
||||
bl_label = "Modifiers"
|
||||
|
||||
|
@ -249,6 +263,7 @@ classes = (
|
|||
OBJECT_MT_modifier_add_generate,
|
||||
OBJECT_MT_modifier_add_deform,
|
||||
OBJECT_MT_modifier_add_physics,
|
||||
OBJECT_MT_modifier_add_color,
|
||||
DATA_PT_gpencil_modifiers,
|
||||
AddModifierMenu,
|
||||
)
|
||||
|
|
|
@ -88,7 +88,7 @@ class SceneKeyingSetsPanel:
|
|||
SceneKeyingSetsPanel._draw_keyframing_setting(
|
||||
context, layout, ks, ksp, iface_("Needed"),
|
||||
"use_insertkey_override_needed", "use_insertkey_needed",
|
||||
userpref_fallback="use_keyframe_insert_needed",
|
||||
userpref_fallback="use_auto_keyframe_insert_needed",
|
||||
)
|
||||
SceneKeyingSetsPanel._draw_keyframing_setting(
|
||||
context, layout, ks, ksp, iface_("Visual"),
|
||||
|
|
|
@ -582,14 +582,17 @@ class USERPREF_PT_animation_keyframes(AnimationPanel, CenterAlignMixIn, Panel):
|
|||
|
||||
layout.prop(edit, "key_insert_channels", expand=True)
|
||||
|
||||
col = layout.column()
|
||||
row = layout.row(align=True, heading="Only Insert Needed")
|
||||
row.prop(edit, "use_keyframe_insert_needed", text="Manual", toggle=1)
|
||||
row.prop(edit, "use_auto_keyframe_insert_needed", text="Auto", toggle=1)
|
||||
|
||||
col = layout.column(heading="Keyframing")
|
||||
col.prop(edit, "use_visual_keying")
|
||||
col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
|
||||
|
||||
col = layout.column(heading="Auto-Keyframing")
|
||||
col.prop(edit, "use_auto_keying", text="Enable in New Scenes")
|
||||
col.prop(edit, "use_auto_keying_warning", text="Show Warning")
|
||||
col.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
|
||||
col.prop(edit, "use_auto_keying", text="Enable in New Scenes")
|
||||
|
||||
|
||||
class USERPREF_PT_animation_fcurves(AnimationPanel, CenterAlignMixIn, Panel):
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* \brief Functions to modify FCurves.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "BLI_math_vector_types.hh"
|
||||
#include "DNA_anim_types.h"
|
||||
|
|
|
@ -134,8 +134,8 @@ bool is_autokey_on(const Scene *scene);
|
|||
/** Check the mode for auto-keyframing (per scene takes precedence). */
|
||||
bool is_autokey_mode(const Scene *scene, eAutokey_Mode mode);
|
||||
|
||||
/** Check if a flag is set for auto-key-framing (per scene takes precedence). */
|
||||
bool is_autokey_flag(const Scene *scene, eKeyInsert_Flag flag);
|
||||
/** Check if a flag is set for keyframing (per scene takes precedence). */
|
||||
bool is_keying_flag(const Scene *scene, eKeying_Flag flag);
|
||||
|
||||
/**
|
||||
* Auto-keyframing feature - checks for whether anything should be done for the current frame.
|
||||
|
|
|
@ -60,7 +60,7 @@ FCurve *action_fcurve_ensure(Main *bmain,
|
|||
fcu->rna_path = BLI_strdup(rna_path);
|
||||
fcu->array_index = array_index;
|
||||
|
||||
if (U.autokey_flag & AUTOKEY_FLAG_XYZ2RGB && ptr != nullptr) {
|
||||
if (U.keying_flag & KEYING_FLAG_XYZ2RGB && ptr != nullptr) {
|
||||
/* For Loc/Rot/Scale and also Color F-Curves, the color of the F-Curve in the Graph Editor,
|
||||
* is determined by the array index for the F-Curve.
|
||||
*/
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "BKE_nla.h"
|
||||
#include "BKE_report.h"
|
||||
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "BLI_dynstr.h"
|
||||
#include "BLI_math_base.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
@ -66,6 +68,14 @@ void update_autoflags_fcurve_direct(FCurve *fcu, PropertyRNA *prop)
|
|||
}
|
||||
}
|
||||
|
||||
bool is_keying_flag(const Scene *scene, const eKeying_Flag flag)
|
||||
{
|
||||
if (scene) {
|
||||
return (scene->toolsettings->keying_flag & flag) || (U.keying_flag & flag);
|
||||
}
|
||||
return U.keying_flag & flag;
|
||||
}
|
||||
|
||||
/** Used to make curves newly added to a cyclic Action cycle with the correct period. */
|
||||
static void make_new_fcurve_cyclic(FCurve *fcu, const blender::float2 &action_range)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,33 @@
|
|||
|
||||
namespace blender::animrig {
|
||||
|
||||
static eInsertKeyFlags get_autokey_flags(Scene *scene)
|
||||
{
|
||||
eInsertKeyFlags flag = INSERTKEY_NOFLAGS;
|
||||
|
||||
/* Visual keying. */
|
||||
if (is_keying_flag(scene, KEYING_FLAG_VISUALKEY)) {
|
||||
flag |= INSERTKEY_MATRIX;
|
||||
}
|
||||
|
||||
/* Only needed. */
|
||||
if (is_keying_flag(scene, AUTOKEY_FLAG_INSERTNEEDED)) {
|
||||
flag |= INSERTKEY_NEEDED;
|
||||
}
|
||||
|
||||
/* Keyframing mode - only replace existing keyframes. */
|
||||
if (is_autokey_mode(scene, AUTOKEY_MODE_EDITKEYS)) {
|
||||
flag |= INSERTKEY_REPLACE;
|
||||
}
|
||||
|
||||
/* Cycle-aware keyframe insertion - preserve cycle period and flow. */
|
||||
if (is_keying_flag(scene, KEYING_FLAG_CYCLEAWARE)) {
|
||||
flag |= INSERTKEY_CYCLE_AWARE;
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool is_autokey_on(const Scene *scene)
|
||||
{
|
||||
if (scene) {
|
||||
|
@ -49,14 +76,6 @@ bool is_autokey_mode(const Scene *scene, const eAutokey_Mode mode)
|
|||
return U.autokey_mode == mode;
|
||||
}
|
||||
|
||||
bool is_autokey_flag(const Scene *scene, const eKeyInsert_Flag flag)
|
||||
{
|
||||
if (scene) {
|
||||
return (scene->toolsettings->autokey_flag & flag) || (U.autokey_flag & flag);
|
||||
}
|
||||
return U.autokey_flag & flag;
|
||||
}
|
||||
|
||||
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
|
||||
{
|
||||
/* Only filter if auto-key mode requires this. */
|
||||
|
@ -97,13 +116,13 @@ void autokeyframe_object(bContext *C, Scene *scene, Object *ob, Span<std::string
|
|||
depsgraph, BKE_scene_frame_get(scene));
|
||||
|
||||
/* Get flags used for inserting keyframes. */
|
||||
const eInsertKeyFlags flag = ANIM_get_keyframing_flags(scene, true);
|
||||
const eInsertKeyFlags flag = get_autokey_flags(scene);
|
||||
|
||||
/* Add data-source override for the object. */
|
||||
blender::Vector<PointerRNA> sources;
|
||||
ANIM_relative_keyingset_add_source(sources, id);
|
||||
|
||||
if (is_autokey_flag(scene, AUTOKEY_FLAG_ONLYKEYINGSET) && (active_ks)) {
|
||||
if (is_keying_flag(scene, AUTOKEY_FLAG_ONLYKEYINGSET) && (active_ks)) {
|
||||
/* Only insert into active keyingset
|
||||
* NOTE: we assume here that the active Keying Set
|
||||
* does not need to have its iterator overridden.
|
||||
|
@ -113,7 +132,7 @@ void autokeyframe_object(bContext *C, Scene *scene, Object *ob, Span<std::string
|
|||
return;
|
||||
}
|
||||
|
||||
if (is_autokey_flag(scene, AUTOKEY_FLAG_INSERTAVAILABLE)) {
|
||||
if (is_keying_flag(scene, AUTOKEY_FLAG_INSERTAVAILABLE)) {
|
||||
/* Only key on available channels. */
|
||||
AnimData *adt = ob->adt;
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
|
@ -215,7 +234,7 @@ void autokeyframe_pose_channel(bContext *C,
|
|||
* visual keyframes even if flag not set, as it's not that useful otherwise
|
||||
* (for quick animation recording)
|
||||
*/
|
||||
eInsertKeyFlags flag = ANIM_get_keyframing_flags(scene, true);
|
||||
eInsertKeyFlags flag = get_autokey_flags(scene);
|
||||
|
||||
if (targetless_ik) {
|
||||
flag |= INSERTKEY_MATRIX;
|
||||
|
@ -226,7 +245,7 @@ void autokeyframe_pose_channel(bContext *C,
|
|||
ANIM_relative_keyingset_add_source(sources, id, &RNA_PoseBone, pose_channel);
|
||||
|
||||
/* only insert into active keyingset? */
|
||||
if (blender::animrig::is_autokey_flag(scene, AUTOKEY_FLAG_ONLYKEYINGSET) && (active_ks)) {
|
||||
if (blender::animrig::is_keying_flag(scene, AUTOKEY_FLAG_ONLYKEYINGSET) && (active_ks)) {
|
||||
/* Run the active Keying Set on the current data-source. */
|
||||
ANIM_apply_keyingset(
|
||||
C, &sources, active_ks, MODIFYKEY_MODE_INSERT, anim_eval_context.eval_time);
|
||||
|
@ -234,7 +253,7 @@ void autokeyframe_pose_channel(bContext *C,
|
|||
}
|
||||
|
||||
/* only insert into available channels? */
|
||||
if (blender::animrig::is_autokey_flag(scene, AUTOKEY_FLAG_INSERTAVAILABLE)) {
|
||||
if (blender::animrig::is_keying_flag(scene, AUTOKEY_FLAG_INSERTAVAILABLE)) {
|
||||
if (!act) {
|
||||
return;
|
||||
}
|
||||
|
@ -333,7 +352,7 @@ bool autokeyframe_property(bContext *C,
|
|||
if (autokeyframe_cfra_can_key(scene, id)) {
|
||||
ReportList *reports = CTX_wm_reports(C);
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const eInsertKeyFlags flag = ANIM_get_keyframing_flags(scene, true);
|
||||
const eInsertKeyFlags flag = get_autokey_flags(scene);
|
||||
char *path = RNA_path_from_ID_to_property(ptr, prop);
|
||||
|
||||
if (only_if_property_keyed) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "BLF_api.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
|
||||
#include "GPU_matrix.h"
|
||||
#include "GPU_shader.h"
|
||||
|
|
|
@ -65,7 +65,7 @@ static FTC_CMapCache ftc_charmap_cache = nullptr;
|
|||
static ThreadMutex ft_lib_mutex;
|
||||
|
||||
/* May be set to #UI_widgetbase_draw_cache_flush. */
|
||||
static void (*blf_draw_cache_flush)(void) = nullptr;
|
||||
static void (*blf_draw_cache_flush)() = nullptr;
|
||||
|
||||
static ft_pix blf_font_height_max_ft_pix(FontBLF *font);
|
||||
static ft_pix blf_font_width_max_ft_pix(FontBLF *font);
|
||||
|
@ -1334,7 +1334,7 @@ void blf_font_exit()
|
|||
blf_batch_draw_exit();
|
||||
}
|
||||
|
||||
void BLF_cache_flush_set_fn(void (*cache_flush_fn)(void))
|
||||
void BLF_cache_flush_set_fn(void (*cache_flush_fn)())
|
||||
{
|
||||
blf_draw_cache_flush = cache_flush_fn;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ void BKE_cachefile_eval(struct Main *bmain,
|
|||
struct CacheFile *cache_file);
|
||||
|
||||
bool BKE_cachefile_filepath_get(const struct Main *bmain,
|
||||
const struct Depsgraph *depsgrah,
|
||||
const struct Depsgraph *depsgraph,
|
||||
const struct CacheFile *cache_file,
|
||||
char r_filepath[1024]);
|
||||
|
||||
|
|
|
@ -395,7 +395,7 @@ BMCustomDataCopyMap CustomData_bmesh_copy_map_calc(const CustomData &src,
|
|||
void CustomData_bmesh_copy_block(CustomData &dst_data,
|
||||
const BMCustomDataCopyMap &map,
|
||||
const void *src_block,
|
||||
void **dest_block);
|
||||
void **dst_block);
|
||||
|
||||
/**
|
||||
* Copies data of a single layer of a given type.
|
||||
|
|
|
@ -155,7 +155,7 @@ bool BKE_object_data_transfer_mesh(struct Depsgraph *depsgraph,
|
|||
int map_vert_mode,
|
||||
int map_edge_mode,
|
||||
int map_loop_mode,
|
||||
int map_poly_mode,
|
||||
int map_face_mode,
|
||||
struct SpaceTransform *space_transform,
|
||||
bool auto_transform,
|
||||
float max_distance,
|
||||
|
@ -177,7 +177,7 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph,
|
|||
int map_vert_mode,
|
||||
int map_edge_mode,
|
||||
int map_loop_mode,
|
||||
int map_poly_mode,
|
||||
int map_face_mode,
|
||||
struct SpaceTransform *space_transform,
|
||||
bool auto_transform,
|
||||
float max_distance,
|
||||
|
|
|
@ -409,9 +409,9 @@ class Layer : public ::GreasePencilLayer {
|
|||
bool has_drawing_at(const int frame_number) const;
|
||||
|
||||
/**
|
||||
* \returns the key of the active frame at \a frame_number or -1 if there is no frame.
|
||||
* \returns the key of the active frame at \a frame_number or std::nullopt if there is no frame.
|
||||
*/
|
||||
FramesMapKey frame_key_at(int frame_number) const;
|
||||
std::optional<FramesMapKey> frame_key_at(int frame_number) const;
|
||||
|
||||
/**
|
||||
* \returns a pointer to the active frame at \a frame_number or nullptr if there is no frame.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "BLI_math_vector.h"
|
||||
#include "BLI_math_vector_types.hh"
|
||||
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
namespace blender::bke::image {
|
||||
|
||||
|
|
|
@ -485,7 +485,7 @@ bool BKE_mesh_validate_arrays(struct Mesh *mesh,
|
|||
int *corner_verts,
|
||||
int *corner_edges,
|
||||
unsigned int corners_num,
|
||||
int *face_offsets,
|
||||
const int *face_offsets,
|
||||
unsigned int faces_num,
|
||||
struct MDeformVert *dverts, /* assume totvert length */
|
||||
bool do_verbose,
|
||||
|
@ -498,7 +498,7 @@ bool BKE_mesh_validate_arrays(struct Mesh *mesh,
|
|||
* \returns is_valid.
|
||||
*/
|
||||
bool BKE_mesh_validate_all_customdata(struct CustomData *vert_data,
|
||||
uint totvert,
|
||||
uint verts_num,
|
||||
struct CustomData *edge_data,
|
||||
uint edges_num,
|
||||
struct CustomData *corner_data,
|
||||
|
|
|
@ -119,7 +119,7 @@ void BKE_mesh_vert_corner_tri_map_create(MeshElemMap **r_map,
|
|||
int **r_mem,
|
||||
int totvert,
|
||||
const blender::int3 *corner_tris,
|
||||
int tottris,
|
||||
int tris_num,
|
||||
const int *corner_verts,
|
||||
int corners_num);
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "BKE_image.h"
|
||||
#include "BKE_image_wrappers.hh"
|
||||
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
namespace blender::bke::pbvh::pixels {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/** \file
|
||||
* \ingroup bke
|
||||
*/
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
#include "FN_field.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
#include "attribute_access_intern.hh"
|
||||
|
|
|
@ -334,10 +334,10 @@ static std::shared_ptr<DictionaryValue> write_blob_shared_simple_gspan(
|
|||
const int size,
|
||||
const ImplicitSharingInfo **r_sharing_info)
|
||||
{
|
||||
const char *func = __func__;
|
||||
const std::optional<ImplicitSharingInfoAndData> sharing_info_and_data = blob_sharing.read_shared(
|
||||
io_data, [&]() -> std::optional<ImplicitSharingInfoAndData> {
|
||||
void *data_mem = MEM_mallocN_aligned(
|
||||
size * cpp_type.size(), cpp_type.alignment(), __func__);
|
||||
void *data_mem = MEM_mallocN_aligned(size * cpp_type.size(), cpp_type.alignment(), func);
|
||||
if (!read_blob_simple_gspan(blob_reader, io_data, {cpp_type, data_mem, size})) {
|
||||
MEM_freeN(data_mem);
|
||||
return std::nullopt;
|
||||
|
@ -378,7 +378,7 @@ template<typename T>
|
|||
const std::optional<StringRefNull> name = io_attribute->lookup_str("name");
|
||||
const std::optional<StringRefNull> domain_str = io_attribute->lookup_str("domain");
|
||||
const std::optional<StringRefNull> type_str = io_attribute->lookup_str("type");
|
||||
auto io_data = io_attribute->lookup_dict("data");
|
||||
const auto *io_data = io_attribute->lookup_dict("data");
|
||||
if (!name || !domain_str || !type_str || !io_data) {
|
||||
return false;
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ static Curves *try_load_curves(const DictionaryValue &io_geometry,
|
|||
};
|
||||
|
||||
if (curves.curves_num() > 0) {
|
||||
const auto io_curve_offsets = io_curves->lookup_dict("curve_offsets");
|
||||
const auto *io_curve_offsets = io_curves->lookup_dict("curve_offsets");
|
||||
if (!io_curve_offsets) {
|
||||
return cancel();
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ static Mesh *try_load_mesh(const DictionaryValue &io_geometry,
|
|||
};
|
||||
|
||||
if (mesh->faces_num > 0) {
|
||||
const auto io_poly_offsets = io_mesh->lookup_dict("poly_offsets");
|
||||
const auto *io_poly_offsets = io_mesh->lookup_dict("poly_offsets");
|
||||
if (!io_poly_offsets) {
|
||||
return cancel();
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ static std::unique_ptr<Instances> try_load_instances(const DictionaryValue &io_g
|
|||
instances->add_reference(std::move(reference_geometry));
|
||||
}
|
||||
|
||||
const auto io_transforms = io_instances->lookup_dict("transforms");
|
||||
const auto *io_transforms = io_instances->lookup_dict("transforms");
|
||||
if (!io_transforms) {
|
||||
return {};
|
||||
}
|
||||
|
@ -602,7 +602,7 @@ static std::unique_ptr<Instances> try_load_instances(const DictionaryValue &io_g
|
|||
return {};
|
||||
}
|
||||
|
||||
const auto io_handles = io_instances->lookup_dict("handles");
|
||||
const auto *io_handles = io_instances->lookup_dict("handles");
|
||||
if (!io_handles) {
|
||||
return {};
|
||||
}
|
||||
|
@ -1031,9 +1031,7 @@ static std::unique_ptr<BakeItem> deserialize_bake_item(const DictionaryValue &io
|
|||
const io::serialize::StringValue &io_string = *io_data->get()->as_string_value();
|
||||
return std::make_unique<StringBakeItem>(io_string.value());
|
||||
}
|
||||
else if (const io::serialize::DictionaryValue *io_string =
|
||||
io_data->get()->as_dictionary_value())
|
||||
{
|
||||
if (const io::serialize::DictionaryValue *io_string = io_data->get()->as_dictionary_value()) {
|
||||
const std::optional<int64_t> size = io_string->lookup_int("size");
|
||||
if (!size) {
|
||||
return {};
|
||||
|
|
|
@ -11,15 +11,6 @@
|
|||
|
||||
namespace blender::bke::bake {
|
||||
|
||||
static const CPPType &get_socket_cpp_type(const eNodeSocketDatatype socket_type)
|
||||
{
|
||||
const char *socket_idname = nodeStaticSocketType(socket_type, 0);
|
||||
const bNodeSocketType *typeinfo = nodeSocketTypeFind(socket_idname);
|
||||
BLI_assert(typeinfo);
|
||||
BLI_assert(typeinfo->geometry_nodes_cpp_type);
|
||||
return *typeinfo->geometry_nodes_cpp_type;
|
||||
}
|
||||
|
||||
Array<std::unique_ptr<BakeItem>> move_socket_values_to_bake_items(const Span<void *> socket_values,
|
||||
const BakeSocketConfig &config)
|
||||
{
|
||||
|
@ -201,6 +192,14 @@ static void rename_attributes(const Span<GeometrySet *> geometries,
|
|||
}
|
||||
}
|
||||
|
||||
static void default_initialize_socket_value(const eNodeSocketDatatype socket_type, void *r_value)
|
||||
{
|
||||
const char *socket_idname = nodeStaticSocketType(socket_type, 0);
|
||||
const bNodeSocketType *typeinfo = nodeSocketTypeFind(socket_idname);
|
||||
typeinfo->geometry_nodes_cpp_type->copy_construct(typeinfo->geometry_nodes_default_cpp_value,
|
||||
r_value);
|
||||
}
|
||||
|
||||
void move_bake_items_to_socket_values(
|
||||
const Span<BakeItem *> bake_items,
|
||||
const BakeSocketConfig &config,
|
||||
|
@ -214,11 +213,10 @@ void move_bake_items_to_socket_values(
|
|||
|
||||
for (const int i : bake_items.index_range()) {
|
||||
const eNodeSocketDatatype socket_type = config.types[i];
|
||||
const CPPType &type = get_socket_cpp_type(socket_type);
|
||||
BakeItem *bake_item = bake_items[i];
|
||||
void *r_socket_value = r_socket_values[i];
|
||||
if (bake_item == nullptr) {
|
||||
type.value_initialize(r_socket_value);
|
||||
default_initialize_socket_value(socket_type, r_socket_value);
|
||||
continue;
|
||||
}
|
||||
if (!copy_bake_item_to_socket_value(
|
||||
|
@ -228,7 +226,7 @@ void move_bake_items_to_socket_values(
|
|||
attribute_map,
|
||||
r_socket_value))
|
||||
{
|
||||
type.value_initialize(r_socket_value);
|
||||
default_initialize_socket_value(socket_type, r_socket_value);
|
||||
continue;
|
||||
}
|
||||
if (socket_type == SOCK_GEOMETRY) {
|
||||
|
@ -253,11 +251,10 @@ void copy_bake_items_to_socket_values(
|
|||
|
||||
for (const int i : bake_items.index_range()) {
|
||||
const eNodeSocketDatatype socket_type = config.types[i];
|
||||
const CPPType &type = get_socket_cpp_type(socket_type);
|
||||
const BakeItem *bake_item = bake_items[i];
|
||||
void *r_socket_value = r_socket_values[i];
|
||||
if (bake_item == nullptr) {
|
||||
type.value_initialize(r_socket_value);
|
||||
default_initialize_socket_value(socket_type, r_socket_value);
|
||||
continue;
|
||||
}
|
||||
if (!copy_bake_item_to_socket_value(
|
||||
|
@ -267,7 +264,7 @@ void copy_bake_items_to_socket_values(
|
|||
attribute_map,
|
||||
r_socket_value))
|
||||
{
|
||||
type.value_initialize(r_socket_value);
|
||||
default_initialize_socket_value(socket_type, r_socket_value);
|
||||
continue;
|
||||
}
|
||||
if (socket_type == SOCK_GEOMETRY) {
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_moviecache.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_moviecache.hh"
|
||||
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_blender.h" /* own include */
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include "BLI_blenlib.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_moviecache.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_moviecache.hh"
|
||||
|
||||
#include "BKE_blender_copybuffer.h" /* own include */
|
||||
#include "BKE_blendfile.hh"
|
||||
|
@ -40,7 +40,7 @@
|
|||
#include "BLO_readfile.h"
|
||||
#include "BLO_writefile.hh"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Copy/Paste `.blend`, partial saves.
|
||||
|
|
|
@ -24,11 +24,10 @@
|
|||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_system.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_appdir.h"
|
||||
|
@ -942,7 +941,7 @@ static void setup_app_data(bContext *C,
|
|||
BLI_assert(BKE_main_namemap_validate(bmain));
|
||||
|
||||
if (mode != LOAD_UNDO && !USER_EXPERIMENTAL_TEST(&U, no_override_auto_resync)) {
|
||||
reports->duration.lib_overrides_resync = PIL_check_seconds_timer();
|
||||
reports->duration.lib_overrides_resync = BLI_check_seconds_timer();
|
||||
|
||||
BKE_lib_override_library_main_resync(
|
||||
bmain,
|
||||
|
@ -950,7 +949,7 @@ static void setup_app_data(bContext *C,
|
|||
bfd->cur_view_layer ? bfd->cur_view_layer : BKE_view_layer_default_view(curscene),
|
||||
reports);
|
||||
|
||||
reports->duration.lib_overrides_resync = PIL_check_seconds_timer() -
|
||||
reports->duration.lib_overrides_resync = BLI_check_seconds_timer() -
|
||||
reports->duration.lib_overrides_resync;
|
||||
|
||||
/* We need to rebuild some of the deleted override rules (for UI feedback purpose). */
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
#include "BKE_preview_image.hh"
|
||||
#include "BKE_texture.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "RE_texture.h" /* RE_texture_evaluate */
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "SIM_mass_spring.h"
|
||||
|
||||
// #include "PIL_time.h" /* timing for debug prints */
|
||||
// #include "BLI_time.h" /* timing for debug prints */
|
||||
|
||||
/* ********** cloth engine ******* */
|
||||
/* Prototypes for internal functions.
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include "BKE_curve.hh"
|
||||
#include "BKE_fcurve.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BLO_read_write.hh"
|
||||
|
||||
|
|
|
@ -269,11 +269,11 @@ static void data_transfer_mesh_attributes_transfer_active_color_string(
|
|||
{
|
||||
return;
|
||||
}
|
||||
else if ((data_type == CD_PROP_BYTE_COLOR) &&
|
||||
!BKE_id_attribute_search(&const_cast<ID &>(mesh_src->id),
|
||||
active_color_src,
|
||||
CD_MASK_PROP_BYTE_COLOR,
|
||||
ATTR_DOMAIN_MASK_COLOR))
|
||||
if ((data_type == CD_PROP_BYTE_COLOR) &&
|
||||
!BKE_id_attribute_search(&const_cast<ID &>(mesh_src->id),
|
||||
active_color_src,
|
||||
CD_MASK_PROP_BYTE_COLOR,
|
||||
ATTR_DOMAIN_MASK_COLOR))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -320,11 +320,11 @@ static void data_transfer_mesh_attributes_transfer_default_color_string(
|
|||
{
|
||||
return;
|
||||
}
|
||||
else if ((data_type == CD_PROP_BYTE_COLOR) &&
|
||||
!BKE_id_attribute_search(&const_cast<ID &>(mesh_src->id),
|
||||
default_color_src,
|
||||
CD_MASK_PROP_BYTE_COLOR,
|
||||
ATTR_DOMAIN_MASK_COLOR))
|
||||
if ((data_type == CD_PROP_BYTE_COLOR) &&
|
||||
!BKE_id_attribute_search(&const_cast<ID &>(mesh_src->id),
|
||||
default_color_src,
|
||||
CD_MASK_PROP_BYTE_COLOR,
|
||||
ATTR_DOMAIN_MASK_COLOR))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
/* for image output */
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "RE_texture.h"
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ void BKE_editmesh_loop_tangent_calc(BMEditMesh *em,
|
|||
const char (*tangent_names)[MAX_CUSTOMDATA_LAYER_NAME],
|
||||
int tangent_names_len,
|
||||
const float (*face_normals)[3],
|
||||
const float (*loop_normals)[3],
|
||||
const float (*corner_normals)[3],
|
||||
const float (*vert_orco)[3],
|
||||
/* result */
|
||||
CustomData *loopdata_out,
|
||||
|
@ -257,7 +257,7 @@ void BKE_editmesh_loop_tangent_calc(BMEditMesh *em,
|
|||
mesh2tangent->precomputedFaceNormals = face_normals;
|
||||
/* NOTE: we assume we do have tessellated loop normals at this point
|
||||
* (in case it is object-enabled), have to check this is valid. */
|
||||
mesh2tangent->precomputedLoopNormals = loop_normals;
|
||||
mesh2tangent->precomputedLoopNormals = corner_normals;
|
||||
mesh2tangent->cd_loop_uv_offset = CustomData_get_n_offset(&bm->ldata, CD_PROP_FLOAT2, n);
|
||||
|
||||
/* needed for indexing loop-tangents */
|
||||
|
|
|
@ -33,10 +33,9 @@
|
|||
#include "BLI_math_vector.h"
|
||||
#include "BLI_noise.h"
|
||||
#include "BLI_rand.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "BKE_anim_path.h" /* needed for where_on_path */
|
||||
#include "BKE_bvhutils.hh"
|
||||
#include "BKE_collection.h"
|
||||
|
@ -85,7 +84,7 @@ PartDeflect *BKE_partdeflect_new(int type)
|
|||
pd->pdef_sbift = 0.2f;
|
||||
pd->pdef_sboft = 0.02f;
|
||||
pd->pdef_cfrict = 5.0f;
|
||||
pd->seed = (uint(ceil(PIL_check_seconds_timer())) + 1) % 128;
|
||||
pd->seed = (uint(ceil(BLI_check_seconds_timer())) + 1) % 128;
|
||||
pd->f_strength = 1.0f;
|
||||
pd->f_damp = 1.0f;
|
||||
|
||||
|
|
|
@ -174,9 +174,8 @@ std::optional<AttributeAccessor> GeometryFieldContext::attributes() const
|
|||
if (domain_ == AttrDomain::Layer) {
|
||||
return grease_pencil->attributes();
|
||||
}
|
||||
else if (const greasepencil::Drawing *drawing =
|
||||
greasepencil::get_eval_grease_pencil_layer_drawing(*grease_pencil,
|
||||
grease_pencil_layer_index_))
|
||||
if (const greasepencil::Drawing *drawing = greasepencil::get_eval_grease_pencil_layer_drawing(
|
||||
*grease_pencil, grease_pencil_layer_index_))
|
||||
{
|
||||
return drawing->strokes().attributes();
|
||||
}
|
||||
|
@ -380,7 +379,7 @@ GVArray AttributeFieldInput::get_varray_for_context(const GeometryFieldContext &
|
|||
if (domain == AttrDomain::Layer) {
|
||||
return *layer_attributes.lookup(name_, data_type);
|
||||
}
|
||||
else if (ELEM(domain, AttrDomain::Point, AttrDomain::Curve)) {
|
||||
if (ELEM(domain, AttrDomain::Point, AttrDomain::Curve)) {
|
||||
const int layer_index = context.grease_pencil_layer_index();
|
||||
const AttributeAccessor curves_attributes = *context.attributes();
|
||||
if (const GAttributeReader reader = curves_attributes.lookup(name_, domain, data_type)) {
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
/* Allow using deprecated functionality for .blend file I/O. */
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
|
|
@ -305,8 +305,9 @@ Drawing::~Drawing()
|
|||
|
||||
Span<uint3> Drawing::triangles() const
|
||||
{
|
||||
const char *func = __func__;
|
||||
this->runtime->triangles_cache.ensure([&](Vector<uint3> &r_data) {
|
||||
MemArena *pf_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__);
|
||||
MemArena *pf_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, func);
|
||||
|
||||
const CurvesGeometry &curves = this->strokes();
|
||||
const Span<float3> positions = curves.positions();
|
||||
|
@ -479,7 +480,7 @@ DrawingReference::DrawingReference(const DrawingReference &other)
|
|||
this->id_reference = other.id_reference;
|
||||
}
|
||||
|
||||
DrawingReference::~DrawingReference() {}
|
||||
DrawingReference::~DrawingReference() = default;
|
||||
|
||||
const Drawing *get_eval_grease_pencil_layer_drawing(const GreasePencil &grease_pencil,
|
||||
const int layer_index)
|
||||
|
@ -709,23 +710,24 @@ Layer::SortedKeysIterator Layer::remove_leading_null_frames_in_range(
|
|||
return next_it;
|
||||
}
|
||||
|
||||
GreasePencilFrame *Layer::add_frame_internal(const FramesMapKey key, const int drawing_index)
|
||||
GreasePencilFrame *Layer::add_frame_internal(const FramesMapKey frame_number,
|
||||
const int drawing_index)
|
||||
{
|
||||
BLI_assert(drawing_index != -1);
|
||||
if (!this->frames().contains(key)) {
|
||||
if (!this->frames().contains(frame_number)) {
|
||||
GreasePencilFrame frame{};
|
||||
frame.drawing_index = drawing_index;
|
||||
this->frames_for_write().add_new(key, frame);
|
||||
this->frames_for_write().add_new(frame_number, frame);
|
||||
this->tag_frames_map_keys_changed();
|
||||
return this->frames_for_write().lookup_ptr(key);
|
||||
return this->frames_for_write().lookup_ptr(frame_number);
|
||||
}
|
||||
/* Overwrite null-frames. */
|
||||
if (this->frames().lookup(key).is_null()) {
|
||||
if (this->frames().lookup(frame_number).is_null()) {
|
||||
GreasePencilFrame frame{};
|
||||
frame.drawing_index = drawing_index;
|
||||
this->frames_for_write().add_overwrite(key, frame);
|
||||
this->frames_for_write().add_overwrite(frame_number, frame);
|
||||
this->tag_frames_map_changed();
|
||||
return this->frames_for_write().lookup_ptr(key);
|
||||
return this->frames_for_write().lookup_ptr(frame_number);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -814,16 +816,16 @@ Span<FramesMapKey> Layer::sorted_keys() const
|
|||
return this->runtime->sorted_keys_cache_.data();
|
||||
}
|
||||
|
||||
FramesMapKey Layer::frame_key_at(const int frame_number) const
|
||||
std::optional<FramesMapKey> Layer::frame_key_at(const int frame_number) const
|
||||
{
|
||||
Span<int> sorted_keys = this->sorted_keys();
|
||||
/* No keyframes, return no drawing. */
|
||||
if (sorted_keys.is_empty()) {
|
||||
return -1;
|
||||
return {};
|
||||
}
|
||||
/* Before the first drawing, return no drawing. */
|
||||
if (frame_number < sorted_keys.first()) {
|
||||
return -1;
|
||||
return {};
|
||||
}
|
||||
/* After or at the last drawing, return the last drawing. */
|
||||
if (frame_number >= sorted_keys.last()) {
|
||||
|
@ -832,21 +834,21 @@ FramesMapKey Layer::frame_key_at(const int frame_number) const
|
|||
/* Search for the drawing. upper_bound will get the drawing just after. */
|
||||
SortedKeysIterator it = std::upper_bound(sorted_keys.begin(), sorted_keys.end(), frame_number);
|
||||
if (it == sorted_keys.end() || it == sorted_keys.begin()) {
|
||||
return -1;
|
||||
return {};
|
||||
}
|
||||
return *std::prev(it);
|
||||
}
|
||||
|
||||
const GreasePencilFrame *Layer::frame_at(const int frame_number) const
|
||||
{
|
||||
const FramesMapKey frame_key = this->frame_key_at(frame_number);
|
||||
return (frame_key == -1) ? nullptr : this->frames().lookup_ptr(frame_key);
|
||||
const std::optional<FramesMapKey> frame_key = this->frame_key_at(frame_number);
|
||||
return frame_key ? this->frames().lookup_ptr(*frame_key) : nullptr;
|
||||
}
|
||||
|
||||
GreasePencilFrame *Layer::frame_at(const int frame_number)
|
||||
{
|
||||
const FramesMapKey frame_key = this->frame_key_at(frame_number);
|
||||
return (frame_key == -1) ? nullptr : this->frames_for_write().lookup_ptr(frame_key);
|
||||
const std::optional<FramesMapKey> frame_key = this->frame_key_at(frame_number);
|
||||
return frame_key ? this->frames_for_write().lookup_ptr(*frame_key) : nullptr;
|
||||
}
|
||||
|
||||
int Layer::drawing_index_at(const int frame_number) const
|
||||
|
@ -862,11 +864,11 @@ bool Layer::has_drawing_at(const int frame_number) const
|
|||
|
||||
int Layer::get_frame_duration_at(const int frame_number) const
|
||||
{
|
||||
const FramesMapKey frame_key = this->frame_key_at(frame_number);
|
||||
if (frame_key == -1) {
|
||||
const std::optional<FramesMapKey> frame_key = this->frame_key_at(frame_number);
|
||||
if (!frame_key) {
|
||||
return -1;
|
||||
}
|
||||
SortedKeysIterator frame_number_it = std::next(this->sorted_keys().begin(), frame_key);
|
||||
SortedKeysIterator frame_number_it = std::next(this->sorted_keys().begin(), *frame_key);
|
||||
if (*frame_number_it == this->sorted_keys().last()) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -2232,9 +2234,9 @@ blender::IndexMask GreasePencil::layer_selection_by_name(const blender::StringRe
|
|||
|
||||
if (node->is_layer()) {
|
||||
const int index = *this->get_layer_index(node->as_layer());
|
||||
return blender::IndexMask::from_indices(Span{index}, memory);
|
||||
return blender::IndexMask::from_indices(blender::Span<int>{index}, memory);
|
||||
}
|
||||
else if (node->is_group()) {
|
||||
if (node->is_group()) {
|
||||
blender::Vector<int64_t> layer_indices;
|
||||
for (const int64_t layer_index : this->layers().index_range()) {
|
||||
const Layer &layer = *this->layers()[layer_index];
|
||||
|
@ -2344,7 +2346,7 @@ static void read_drawing_array(GreasePencil &grease_pencil, BlendDataReader *rea
|
|||
for (int i = 0; i < grease_pencil.drawing_array_num; i++) {
|
||||
BLO_read_data_address(reader, &grease_pencil.drawing_array[i]);
|
||||
GreasePencilDrawingBase *drawing_base = grease_pencil.drawing_array[i];
|
||||
switch (drawing_base->type) {
|
||||
switch (GreasePencilDrawingType(drawing_base->type)) {
|
||||
case GP_DRAWING: {
|
||||
GreasePencilDrawing *drawing = reinterpret_cast<GreasePencilDrawing *>(drawing_base);
|
||||
drawing->wrap().strokes_for_write().blend_read(*reader);
|
||||
|
@ -2368,7 +2370,7 @@ static void write_drawing_array(GreasePencil &grease_pencil, BlendWriter *writer
|
|||
BLO_write_pointer_array(writer, grease_pencil.drawing_array_num, grease_pencil.drawing_array);
|
||||
for (int i = 0; i < grease_pencil.drawing_array_num; i++) {
|
||||
GreasePencilDrawingBase *drawing_base = grease_pencil.drawing_array[i];
|
||||
switch (drawing_base->type) {
|
||||
switch (GreasePencilDrawingType(drawing_base->type)) {
|
||||
case GP_DRAWING: {
|
||||
GreasePencilDrawing *drawing = reinterpret_cast<GreasePencilDrawing *>(drawing_base);
|
||||
bke::CurvesGeometry::BlendWriteData write_data =
|
||||
|
@ -2394,7 +2396,7 @@ static void free_drawing_array(GreasePencil &grease_pencil)
|
|||
}
|
||||
for (int i = 0; i < grease_pencil.drawing_array_num; i++) {
|
||||
GreasePencilDrawingBase *drawing_base = grease_pencil.drawing_array[i];
|
||||
switch (drawing_base->type) {
|
||||
switch (GreasePencilDrawingType(drawing_base->type)) {
|
||||
case GP_DRAWING: {
|
||||
GreasePencilDrawing *drawing = reinterpret_cast<GreasePencilDrawing *>(drawing_base);
|
||||
MEM_delete(&drawing->wrap());
|
||||
|
|
|
@ -80,7 +80,7 @@ void legacy_gpencil_frame_to_grease_pencil_drawing(const bGPDframe &gpf,
|
|||
SpanAttributeWriter<float> stroke_hardnesses = attributes.lookup_or_add_for_write_span<float>(
|
||||
"hardness", AttrDomain::Curve);
|
||||
SpanAttributeWriter<float> stroke_point_aspect_ratios =
|
||||
attributes.lookup_or_add_for_write_span<float>("point_aspect_ratio", AttrDomain::Curve);
|
||||
attributes.lookup_or_add_for_write_span<float>("aspect_ratio", AttrDomain::Curve);
|
||||
SpanAttributeWriter<float2> stroke_fill_translations =
|
||||
attributes.lookup_or_add_for_write_span<float2>("fill_translation", AttrDomain::Curve);
|
||||
SpanAttributeWriter<float> stroke_fill_rotations =
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
/**
|
||||
* Only allow non-managed icons to be removed (by Python for eg).
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include "BLI_math_geom.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BKE_icons.h"
|
||||
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_metadata.h"
|
||||
#include "IMB_moviecache.h"
|
||||
#include "IMB_openexr.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
#include "IMB_metadata.hh"
|
||||
#include "IMB_moviecache.hh"
|
||||
#include "IMB_openexr.hh"
|
||||
|
||||
/* Allow using deprecated functionality for .blend file I/O. */
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
@ -56,6 +56,7 @@
|
|||
#include "BLI_system.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_timecode.h" /* For stamp time-code format. */
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
@ -81,8 +82,6 @@
|
|||
|
||||
#include "BLF_api.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "RE_pipeline.h"
|
||||
|
||||
#include "SEQ_utils.hh" /* SEQ_get_topmost_sequence() */
|
||||
|
@ -1485,7 +1484,7 @@ void BKE_image_packfiles_from_mem(ReportList *reports,
|
|||
|
||||
void BKE_image_tag_time(Image *ima)
|
||||
{
|
||||
ima->lastused = PIL_check_seconds_timer_i();
|
||||
ima->lastused = BLI_check_seconds_timer_i();
|
||||
}
|
||||
|
||||
static uintptr_t image_mem_size(Image *image)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BKE_colortools.hh"
|
||||
#include "BKE_image_format.h"
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
#include "BKE_image.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BLF_api.h"
|
||||
|
||||
|
|
|
@ -13,13 +13,14 @@
|
|||
#include "BLI_linklist.h"
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_time.h"
|
||||
|
||||
#include "DNA_image_types.h"
|
||||
#include "DNA_userdef_types.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_image.h"
|
||||
|
@ -30,8 +31,6 @@
|
|||
#include "GPU_state.h"
|
||||
#include "GPU_texture.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
using namespace blender::bke::image::partial_update;
|
||||
|
||||
extern "C" {
|
||||
|
@ -572,7 +571,7 @@ void BKE_image_free_anim_gputextures(Main *bmain)
|
|||
void BKE_image_free_old_gputextures(Main *bmain)
|
||||
{
|
||||
static int lasttime = 0;
|
||||
int ctime = int(PIL_check_seconds_timer());
|
||||
int ctime = int(BLI_check_seconds_timer());
|
||||
|
||||
/*
|
||||
* Run garbage collector once for every collecting period of time
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
|
||||
#include "DNA_image_types.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_vector.hh"
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include "BKE_image_partial_update.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_moviecache.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_moviecache.hh"
|
||||
|
||||
#include "DNA_image_types.h"
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_openexr.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
#include "IMB_openexr.hh"
|
||||
|
||||
#include "BKE_colortools.hh"
|
||||
#include "BKE_global.h"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include "RE_engine.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
// #define DEBUG_TIME
|
||||
|
||||
#ifdef DEBUG_TIME
|
||||
# include "PIL_time_utildefines.h"
|
||||
# include "BLI_time_utildefines.h"
|
||||
#endif
|
||||
|
||||
static CLG_LogRef LOG = {"bke.lib_id"};
|
||||
|
|
|
@ -53,11 +53,10 @@
|
|||
#include "BLI_set.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_path.hh"
|
||||
#include "RNA_prototypes.h"
|
||||
|
@ -70,7 +69,7 @@
|
|||
// #define DEBUG_OVERRIDE_TIMEIT
|
||||
|
||||
#ifdef DEBUG_OVERRIDE_TIMEIT
|
||||
# include "PIL_time_utildefines.h"
|
||||
# include "BLI_time_utildefines.h"
|
||||
#endif
|
||||
|
||||
static CLG_LogRef LOG = {"bke.liboverride"};
|
||||
|
@ -2753,7 +2752,7 @@ static void lib_override_resync_tagging_finalize_recurse(Main *bmain,
|
|||
BLI_assert(is_in_partial_resync_hierarchy);
|
||||
return;
|
||||
}
|
||||
else if (!is_in_partial_resync_hierarchy) {
|
||||
if (!is_in_partial_resync_hierarchy) {
|
||||
/* This ID is not tagged for resync, and is part of a loop where none of the other IDs are
|
||||
* tagged for resync, nothing else to do. */
|
||||
return;
|
||||
|
@ -2796,7 +2795,7 @@ static void lib_override_resync_tagging_finalize_recurse(Main *bmain,
|
|||
}
|
||||
/* Else, if it is not being processed as part of a resync hierarchy, nothing more to do either,
|
||||
* its current status and the one of its whole dependency tree is also assumed valid. */
|
||||
else if (!is_in_partial_resync_hierarchy) {
|
||||
if (!is_in_partial_resync_hierarchy) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3171,7 +3170,7 @@ static bool lib_override_library_main_resync_on_library_indirect_level(
|
|||
BlendFileReadReport *reports)
|
||||
{
|
||||
const bool do_reports_recursive_resync_timing = (library_indirect_level != 0);
|
||||
const double init_time = do_reports_recursive_resync_timing ? PIL_check_seconds_timer() : 0.0;
|
||||
const double init_time = do_reports_recursive_resync_timing ? BLI_check_seconds_timer() : 0.0;
|
||||
|
||||
BKE_main_relations_create(bmain, 0);
|
||||
BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
|
||||
|
@ -3477,7 +3476,7 @@ static bool lib_override_library_main_resync_on_library_indirect_level(
|
|||
BKE_lib_override_library_main_hierarchy_root_ensure(bmain);
|
||||
|
||||
if (do_reports_recursive_resync_timing) {
|
||||
reports->duration.lib_overrides_recursive_resync += PIL_check_seconds_timer() - init_time;
|
||||
reports->duration.lib_overrides_recursive_resync += BLI_check_seconds_timer() - init_time;
|
||||
}
|
||||
|
||||
return process_lib_level_again;
|
||||
|
@ -3620,13 +3619,11 @@ void BKE_lib_override_library_main_resync(Main *bmain,
|
|||
level_reprocess_count);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
CLOG_INFO(&LOG_RESYNC,
|
||||
4,
|
||||
"Applying reprocess %d for resyncing at library level %d",
|
||||
level_reprocess_count,
|
||||
library_indirect_level);
|
||||
}
|
||||
CLOG_INFO(&LOG_RESYNC,
|
||||
4,
|
||||
"Applying reprocess %d for resyncing at library level %d",
|
||||
level_reprocess_count,
|
||||
library_indirect_level);
|
||||
}
|
||||
library_indirect_level--;
|
||||
}
|
||||
|
|
|
@ -710,7 +710,7 @@ static bool lib_query_unused_ids_tag_recurse(Main *bmain,
|
|||
if ((id_relations->tags & MAINIDRELATIONS_ENTRY_TAGS_PROCESSED) != 0) {
|
||||
return false;
|
||||
}
|
||||
else if ((id_relations->tags & MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS) != 0) {
|
||||
if ((id_relations->tags & MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS) != 0) {
|
||||
/* This ID has not yet been fully processed. If this condition is reached, it means this is a
|
||||
* dependency loop case. */
|
||||
return true;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "BKE_object.hh"
|
||||
#include "BKE_scene.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
|
||||
#include "ED_node.hh"
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include "BKE_main_namemap.hh"
|
||||
#include "BKE_report.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
static CLG_LogRef LOG = {"bke.main"};
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "BLI_span.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_task.hh"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_vector.hh"
|
||||
#include "BLI_virtual_array.hh"
|
||||
|
@ -62,8 +63,6 @@
|
|||
#include "BKE_multires.hh"
|
||||
#include "BKE_object.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
|
@ -96,7 +95,7 @@ static void mesh_init_data(ID *id)
|
|||
|
||||
mesh->runtime = new blender::bke::MeshRuntime();
|
||||
|
||||
mesh->face_sets_color_seed = BLI_hash_int(PIL_check_seconds_timer_i() & UINT_MAX);
|
||||
mesh->face_sets_color_seed = BLI_hash_int(BLI_check_seconds_timer_i() & UINT_MAX);
|
||||
}
|
||||
|
||||
static void mesh_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int flag)
|
||||
|
@ -757,7 +756,7 @@ Mesh *BKE_mesh_new_nomain_from_template_ex(const Mesh *me_src,
|
|||
const int edges_num,
|
||||
const int tessface_num,
|
||||
const int faces_num,
|
||||
const int loops_num,
|
||||
const int corners_num,
|
||||
const CustomData_MeshMasks mask)
|
||||
{
|
||||
/* Only do tessface if we are creating tessfaces or copying from mesh with only tessfaces. */
|
||||
|
@ -771,7 +770,7 @@ Mesh *BKE_mesh_new_nomain_from_template_ex(const Mesh *me_src,
|
|||
me_dst->verts_num = verts_num;
|
||||
me_dst->edges_num = edges_num;
|
||||
me_dst->faces_num = faces_num;
|
||||
me_dst->corners_num = loops_num;
|
||||
me_dst->corners_num = corners_num;
|
||||
me_dst->totface_legacy = tessface_num;
|
||||
|
||||
BKE_mesh_copy_parameters_for_eval(me_dst, me_src);
|
||||
|
@ -783,7 +782,7 @@ Mesh *BKE_mesh_new_nomain_from_template_ex(const Mesh *me_src,
|
|||
CustomData_copy_layout(
|
||||
&me_src->face_data, &me_dst->face_data, mask.pmask, CD_SET_DEFAULT, faces_num);
|
||||
CustomData_copy_layout(
|
||||
&me_src->corner_data, &me_dst->corner_data, mask.lmask, CD_SET_DEFAULT, loops_num);
|
||||
&me_src->corner_data, &me_dst->corner_data, mask.lmask, CD_SET_DEFAULT, corners_num);
|
||||
if (do_tessface) {
|
||||
CustomData_copy_layout(
|
||||
&me_src->fdata_legacy, &me_dst->fdata_legacy, mask.fmask, CD_SET_DEFAULT, tessface_num);
|
||||
|
@ -807,10 +806,10 @@ Mesh *BKE_mesh_new_nomain_from_template(const Mesh *me_src,
|
|||
const int verts_num,
|
||||
const int edges_num,
|
||||
const int faces_num,
|
||||
const int loops_num)
|
||||
const int corners_num)
|
||||
{
|
||||
return BKE_mesh_new_nomain_from_template_ex(
|
||||
me_src, verts_num, edges_num, 0, faces_num, loops_num, CD_MASK_EVERYTHING);
|
||||
me_src, verts_num, edges_num, 0, faces_num, corners_num, CD_MASK_EVERYTHING);
|
||||
}
|
||||
|
||||
void BKE_mesh_eval_delete(Mesh *mesh_eval)
|
||||
|
|
|
@ -192,7 +192,7 @@ void BKE_mesh_vert_corner_tri_map_create(MeshElemMap **r_map,
|
|||
const blender::int3 *corner_tris,
|
||||
const int tris_num,
|
||||
const int *corner_verts,
|
||||
const int /*totloop*/)
|
||||
const int /*corners_num*/)
|
||||
{
|
||||
MeshElemMap *map = MEM_cnew_array<MeshElemMap>(size_t(totvert), __func__);
|
||||
int *indices = static_cast<int *>(MEM_mallocN(sizeof(int) * size_t(tris_num) * 3, __func__));
|
||||
|
@ -407,9 +407,9 @@ GroupedSpan<int> build_vert_to_edge_map(const Span<int2> edges,
|
|||
void build_vert_to_face_indices(const OffsetIndices<int> faces,
|
||||
const Span<int> corner_verts,
|
||||
const OffsetIndices<int> offsets,
|
||||
MutableSpan<int> r_indices)
|
||||
MutableSpan<int> face_indices)
|
||||
{
|
||||
reverse_group_indices_in_groups(faces, corner_verts, offsets, r_indices);
|
||||
reverse_group_indices_in_groups(faces, corner_verts, offsets, face_indices);
|
||||
}
|
||||
|
||||
GroupedSpan<int> build_vert_to_face_map(const OffsetIndices<int> faces,
|
||||
|
@ -822,7 +822,7 @@ static bool mesh_calc_islands_loop_face_uv(const int totedge,
|
|||
const blender::OffsetIndices<int> faces,
|
||||
const int *corner_verts,
|
||||
const int *corner_edges,
|
||||
const int totloop,
|
||||
const int corners_num,
|
||||
const float (*luvs)[2],
|
||||
MeshIslandStore *r_island_store)
|
||||
{
|
||||
|
@ -847,19 +847,19 @@ static bool mesh_calc_islands_loop_face_uv(const int totedge,
|
|||
|
||||
BKE_mesh_loop_islands_clear(r_island_store);
|
||||
BKE_mesh_loop_islands_init(
|
||||
r_island_store, MISLAND_TYPE_LOOP, totloop, MISLAND_TYPE_POLY, MISLAND_TYPE_EDGE);
|
||||
r_island_store, MISLAND_TYPE_LOOP, corners_num, MISLAND_TYPE_POLY, MISLAND_TYPE_EDGE);
|
||||
|
||||
Array<int> edge_to_face_offsets;
|
||||
Array<int> edge_to_face_indices;
|
||||
const GroupedSpan<int> edge_to_face_map = bke::mesh::build_edge_to_face_map(
|
||||
faces, {corner_edges, totloop}, totedge, edge_to_face_offsets, edge_to_face_indices);
|
||||
faces, {corner_edges, corners_num}, totedge, edge_to_face_offsets, edge_to_face_indices);
|
||||
|
||||
Array<int> edge_to_loop_offsets;
|
||||
Array<int> edge_to_loop_indices;
|
||||
GroupedSpan<int> edge_to_loop_map;
|
||||
if (luvs) {
|
||||
edge_to_loop_map = bke::mesh::build_edge_to_corner_map(
|
||||
{corner_edges, totloop}, totedge, edge_to_loop_offsets, edge_to_loop_indices);
|
||||
{corner_edges, corners_num}, totedge, edge_to_loop_offsets, edge_to_loop_indices);
|
||||
}
|
||||
|
||||
/* TODO: I'm not sure edge seam flag is enough to define UV islands?
|
||||
|
@ -909,7 +909,7 @@ static bool mesh_calc_islands_loop_face_uv(const int totedge,
|
|||
|
||||
face_edge_loop_islands_calc(totedge,
|
||||
faces,
|
||||
{corner_edges, totloop},
|
||||
{corner_edges, corners_num},
|
||||
edge_to_face_map,
|
||||
false,
|
||||
mesh_check_island_boundary_uv,
|
||||
|
@ -935,7 +935,7 @@ static bool mesh_calc_islands_loop_face_uv(const int totedge,
|
|||
face_indices = static_cast<int *>(
|
||||
MEM_mallocN(sizeof(*face_indices) * size_t(faces.size()), __func__));
|
||||
loop_indices = static_cast<int *>(
|
||||
MEM_mallocN(sizeof(*loop_indices) * size_t(totloop), __func__));
|
||||
MEM_mallocN(sizeof(*loop_indices) * size_t(corners_num), __func__));
|
||||
|
||||
/* NOTE: here we ignore '0' invalid group - this should *never* happen in this case anyway? */
|
||||
for (grp_idx = 1; grp_idx <= num_face_groups; grp_idx++) {
|
||||
|
@ -996,12 +996,12 @@ bool BKE_mesh_calc_islands_loop_face_edgeseam(const float (*vert_positions)[3],
|
|||
const blender::OffsetIndices<int> faces,
|
||||
const int *corner_verts,
|
||||
const int *corner_edges,
|
||||
const int totloop,
|
||||
const int corners_num,
|
||||
MeshIslandStore *r_island_store)
|
||||
{
|
||||
UNUSED_VARS(vert_positions, totvert, edges);
|
||||
return mesh_calc_islands_loop_face_uv(
|
||||
totedge, uv_seams, faces, corner_verts, corner_edges, totloop, nullptr, r_island_store);
|
||||
totedge, uv_seams, faces, corner_verts, corner_edges, corners_num, nullptr, r_island_store);
|
||||
}
|
||||
|
||||
bool BKE_mesh_calc_islands_loop_face_uvmap(float (*vert_positions)[3],
|
||||
|
@ -1012,14 +1012,14 @@ bool BKE_mesh_calc_islands_loop_face_uvmap(float (*vert_positions)[3],
|
|||
const blender::OffsetIndices<int> faces,
|
||||
const int *corner_verts,
|
||||
const int *corner_edges,
|
||||
const int totloop,
|
||||
const int corners_num,
|
||||
const float (*luvs)[2],
|
||||
MeshIslandStore *r_island_store)
|
||||
{
|
||||
UNUSED_VARS(vert_positions, totvert, edges);
|
||||
BLI_assert(luvs != nullptr);
|
||||
return mesh_calc_islands_loop_face_uv(
|
||||
totedge, uv_seams, faces, corner_verts, corner_edges, totloop, luvs, r_island_store);
|
||||
totedge, uv_seams, faces, corner_verts, corner_edges, corners_num, luvs, r_island_store);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -62,7 +62,7 @@ static void free_batch_cache(MeshRuntime &mesh_runtime)
|
|||
}
|
||||
}
|
||||
|
||||
MeshRuntime::MeshRuntime() {}
|
||||
MeshRuntime::MeshRuntime() = default;
|
||||
|
||||
MeshRuntime::~MeshRuntime()
|
||||
{
|
||||
|
|
|
@ -200,7 +200,7 @@ static void sample_nearest_weights(const Span<float3> vert_positions,
|
|||
|
||||
int sample_surface_points_spherical(RandomNumberGenerator &rng,
|
||||
const Mesh &mesh,
|
||||
const Span<int> tri_indices_to_sample,
|
||||
const Span<int> tris_to_sample,
|
||||
const float3 &sample_pos,
|
||||
const float sample_radius,
|
||||
const float approximate_density,
|
||||
|
@ -219,7 +219,7 @@ int sample_surface_points_spherical(RandomNumberGenerator &rng,
|
|||
|
||||
const int old_num = r_bary_coords.size();
|
||||
|
||||
for (const int tri_index : tri_indices_to_sample) {
|
||||
for (const int tri_index : tris_to_sample) {
|
||||
const int3 &tri = corner_tris[tri_index];
|
||||
|
||||
const float3 &v0 = positions[corner_verts[tri[0]]];
|
||||
|
|
|
@ -221,7 +221,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
|
|||
int *corner_verts,
|
||||
int *corner_edges,
|
||||
uint corners_num,
|
||||
int *face_offsets,
|
||||
const int *face_offsets,
|
||||
uint faces_num,
|
||||
MDeformVert *dverts, /* assume verts_num length */
|
||||
const bool do_verbose,
|
||||
|
|
|
@ -58,10 +58,10 @@
|
|||
#include "BKE_node_tree_update.hh"
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_moviecache.h"
|
||||
#include "IMB_openexr.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
#include "IMB_moviecache.hh"
|
||||
#include "IMB_openexr.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
|
|
@ -44,11 +44,12 @@
|
|||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_vector_set.hh"
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
|
||||
#include "BKE_anim_data.h"
|
||||
#include "BKE_animsys.h"
|
||||
|
@ -95,8 +96,6 @@
|
|||
|
||||
#include "BLO_read_write.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#define NODE_DEFAULT_MAX_WIDTH 700
|
||||
|
||||
using blender::Array;
|
||||
|
@ -2508,7 +2507,7 @@ void nodeUniqueName(bNodeTree *ntree, bNode *node)
|
|||
void nodeUniqueID(bNodeTree *ntree, bNode *node)
|
||||
{
|
||||
/* Use a pointer cast to avoid overflow warnings. */
|
||||
const double time = PIL_check_seconds_timer() * 1000000.0;
|
||||
const double time = BLI_check_seconds_timer() * 1000000.0;
|
||||
blender::RandomNumberGenerator id_rng{*reinterpret_cast<const uint32_t *>(&time)};
|
||||
|
||||
/* In the unlikely case that the random ID doesn't match, choose a new one until it does. */
|
||||
|
|
|
@ -166,7 +166,7 @@ class bNodeTreeToDotOptionsForAnonymousAttributeInferencing : public bNodeTreeTo
|
|||
{
|
||||
}
|
||||
|
||||
std::string socket_name(const bNodeSocket &socket) const
|
||||
std::string socket_name(const bNodeSocket &socket) const override
|
||||
{
|
||||
if (socket.type == SOCK_GEOMETRY) {
|
||||
std::stringstream ss;
|
||||
|
@ -180,7 +180,7 @@ class bNodeTreeToDotOptionsForAnonymousAttributeInferencing : public bNodeTreeTo
|
|||
ss << "]";
|
||||
return ss.str();
|
||||
}
|
||||
else if (nodes::socket_type_supports_fields(eNodeSocketDatatype(socket.type))) {
|
||||
if (nodes::socket_type_supports_fields(eNodeSocketDatatype(socket.type))) {
|
||||
std::stringstream ss;
|
||||
ss << socket.identifier << " [";
|
||||
bits::foreach_1_index(result_.propagated_fields_by_socket[socket.index_in_tree()],
|
||||
|
@ -699,7 +699,7 @@ bool update_anonymous_attribute_relations(bNodeTree &tree)
|
|||
tree.ensure_topology_cache();
|
||||
|
||||
if (tree.has_available_link_cycle()) {
|
||||
const bool changed = tree.runtime->anonymous_attribute_inferencing.get() != nullptr;
|
||||
const bool changed = bool(tree.runtime->anonymous_attribute_inferencing);
|
||||
tree.runtime->anonymous_attribute_inferencing.reset();
|
||||
return changed;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#include "BLI_timeit.hh"
|
||||
#include "BLI_vector_set.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
|
@ -1189,7 +1187,7 @@ class NodeTreeMainUpdater {
|
|||
}
|
||||
|
||||
/* Used to generate new unique IDs if necessary. */
|
||||
RandomNumberGenerator rng(PIL_check_seconds_timer_i() & UINT_MAX);
|
||||
RandomNumberGenerator rng = RandomNumberGenerator::from_random_seed();
|
||||
|
||||
Map<int32_t, bNestedNodePath> new_path_by_id;
|
||||
for (const bNestedNodePath &path : nested_node_paths) {
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#include "BKE_ocean.h"
|
||||
#include "ocean_intern.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "RE_texture.h"
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
#include "BKE_vfont.hh"
|
||||
#include "BKE_volume.hh"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BLO_read_write.hh"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "BKE_material.h"
|
||||
#include "BKE_paint.hh"
|
||||
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_animsys.h"
|
||||
|
@ -70,8 +71,6 @@
|
|||
#include "DEG_depsgraph_physics.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "RE_texture.h"
|
||||
|
||||
/* FLUID sim particle import */
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "BLI_rand.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_task.hh"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_timeit.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_vector.hh"
|
||||
|
@ -37,8 +38,6 @@
|
|||
|
||||
#include "DRW_pbvh.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "bmesh.hh"
|
||||
|
||||
#include "atomic_ops.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "BLI_math_vector.hh"
|
||||
#include "BLI_memarena.h"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_DerivedMesh.hh"
|
||||
|
@ -27,8 +28,6 @@
|
|||
#include "bmesh.hh"
|
||||
#include "pbvh_intern.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
static CLG_LogRef LOG = {"pbvh.bmesh"};
|
||||
|
@ -1225,7 +1224,7 @@ static void pbvh_bmesh_split_edge(EdgeQueueContext *eq_ctx, PBVH *pbvh, BMEdge *
|
|||
|
||||
static bool pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *pbvh)
|
||||
{
|
||||
const double start_time = PIL_check_seconds_timer();
|
||||
const double start_time = BLI_check_seconds_timer();
|
||||
|
||||
bool any_subdivided = false;
|
||||
|
||||
|
@ -1268,7 +1267,7 @@ static bool pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *pbvh
|
|||
#endif
|
||||
|
||||
CLOG_INFO(
|
||||
&LOG, 2, "Long edge subdivision took %f seconds.", PIL_check_seconds_timer() - start_time);
|
||||
&LOG, 2, "Long edge subdivision took %f seconds.", BLI_check_seconds_timer() - start_time);
|
||||
|
||||
return any_subdivided;
|
||||
}
|
||||
|
@ -1702,7 +1701,7 @@ static void pbvh_bmesh_collapse_edge(
|
|||
|
||||
static bool pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, PBVH *pbvh)
|
||||
{
|
||||
const double start_time = PIL_check_seconds_timer();
|
||||
const double start_time = BLI_check_seconds_timer();
|
||||
|
||||
const float min_len_squared = pbvh->bm_min_edge_len * pbvh->bm_min_edge_len;
|
||||
bool any_collapsed = false;
|
||||
|
@ -1753,7 +1752,7 @@ static bool pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, PBVH *pbvh
|
|||
BLI_ghash_free(deleted_verts, nullptr, nullptr);
|
||||
|
||||
CLOG_INFO(
|
||||
&LOG, 2, "Short edge collapse took %f seconds.", PIL_check_seconds_timer() - start_time);
|
||||
&LOG, 2, "Short edge collapse took %f seconds.", BLI_check_seconds_timer() - start_time);
|
||||
|
||||
return any_collapsed;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "BLI_rand.h"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
|
@ -29,8 +30,6 @@
|
|||
#include "BKE_pbvh_api.hh"
|
||||
#include "BKE_subdiv_ccg.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "bmesh.hh"
|
||||
|
||||
#include "atomic_ops.h"
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
#include "BLI_math_geom.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_task.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
#include "BLI_time.h"
|
||||
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_image_wrappers.hh"
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "BLI_task.hh"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BKE_image_wrappers.hh"
|
||||
#include "BKE_pbvh_api.hh"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include "BLI_math_vector_types.hh"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "BKE_image_wrappers.hh"
|
||||
#include "BKE_pbvh.hh"
|
||||
|
|
|
@ -39,12 +39,11 @@
|
|||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "BKE_appdir.h"
|
||||
#include "BKE_cloth.hh"
|
||||
#include "BKE_collection.h"
|
||||
|
@ -3295,7 +3294,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
|
|||
char run[32], cur[32], etd[32];
|
||||
int cancel = 0;
|
||||
|
||||
stime = ptime = PIL_check_seconds_timer();
|
||||
stime = ptime = BLI_check_seconds_timer();
|
||||
|
||||
for (int fr = scene->r.cfra; fr <= endframe; fr += baker->quick_step, scene->r.cfra = fr) {
|
||||
BKE_scene_graph_update_for_newframe(depsgraph);
|
||||
|
@ -3309,7 +3308,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
|
|||
printf("bake: frame %d :: %d\n", scene->r.cfra, endframe);
|
||||
}
|
||||
else {
|
||||
ctime = PIL_check_seconds_timer();
|
||||
ctime = BLI_check_seconds_timer();
|
||||
|
||||
fetd = (ctime - ptime) * (endframe - scene->r.cfra) / baker->quick_step;
|
||||
|
||||
|
@ -3341,7 +3340,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
|
|||
|
||||
if (use_timer) {
|
||||
/* start with newline because of \r above */
|
||||
ptcache_dt_to_str(run, sizeof(run), PIL_check_seconds_timer() - stime);
|
||||
ptcache_dt_to_str(run, sizeof(run), BLI_check_seconds_timer() - stime);
|
||||
printf("\nBake %s %s (%i frames simulated).\n",
|
||||
(cancel ? "canceled after" : "finished in"),
|
||||
run,
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
|
||||
#include "GPU_texture.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_thumbs.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_thumbs.hh"
|
||||
|
||||
#include "atomic_ops.h"
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
|
@ -109,10 +110,8 @@
|
|||
|
||||
#include "engines/eevee/eevee_lightcache.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf.hh"
|
||||
|
||||
#include "DRW_engine.hh"
|
||||
|
||||
|
@ -2355,7 +2354,7 @@ bool BKE_scene_validate_setscene(Main *bmain, Scene *sce)
|
|||
for (a = 0, sce_iter = sce; sce_iter->set; sce_iter = sce_iter->set, a++) {
|
||||
/* more iterations than scenes means we have a cycle */
|
||||
if (a > totscene) {
|
||||
/* the tested scene gets zero'ed, that's typically current scene */
|
||||
/* The tested scene gets zeroed, that's typically current scene. */
|
||||
sce->set = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
/* for timing... */
|
||||
#if 0
|
||||
# include "PIL_time_utildefines.h"
|
||||
# include "BLI_time_utildefines.h"
|
||||
#else
|
||||
# define TIMEIT_BENCH(expr, id) (expr)
|
||||
#endif
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_collection.h"
|
||||
|
@ -66,8 +67,6 @@
|
|||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
static CLG_LogRef LOG = {"bke.softbody"};
|
||||
|
||||
/* callbacks for errors and interrupts and some goo */
|
||||
|
@ -3358,7 +3357,7 @@ static void softbody_step(
|
|||
float forcetime;
|
||||
double sct, sst;
|
||||
|
||||
sst = PIL_check_seconds_timer();
|
||||
sst = BLI_check_seconds_timer();
|
||||
/* Integration back in time is possible in theory, but pretty useless here.
|
||||
* So we refuse to do so. Since we do not know anything about 'outside' changes
|
||||
* especially colliders we refuse to go more than 10 frames.
|
||||
|
@ -3454,7 +3453,7 @@ static void softbody_step(
|
|||
}
|
||||
loops++;
|
||||
if (sb->solverflags & SBSO_MONITOR) {
|
||||
sct = PIL_check_seconds_timer();
|
||||
sct = BLI_check_seconds_timer();
|
||||
if (sct - sst > 0.5) {
|
||||
printf("%3.0f%% \r", 100.0f * timedone / dtime);
|
||||
}
|
||||
|
@ -3495,7 +3494,7 @@ static void softbody_step(
|
|||
}
|
||||
|
||||
if (sb->solverflags & SBSO_MONITOR) {
|
||||
sct = PIL_check_seconds_timer();
|
||||
sct = BLI_check_seconds_timer();
|
||||
if ((sct - sst > 0.5) || (G.debug & G_DEBUG)) {
|
||||
printf(" solver time %f sec %s\n", sct - sst, ob->id.name);
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_openexr.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
#include "IMB_openexr.hh"
|
||||
|
||||
#include "GPU_texture.h"
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <cstdio>
|
||||
|
||||
#include "PIL_time.h"
|
||||
#include "BLI_time.h"
|
||||
|
||||
void BKE_subdiv_stats_init(SubdivStats *stats)
|
||||
{
|
||||
|
@ -26,12 +26,12 @@ void BKE_subdiv_stats_init(SubdivStats *stats)
|
|||
|
||||
void BKE_subdiv_stats_begin(SubdivStats *stats, eSubdivStatsValue value)
|
||||
{
|
||||
stats->begin_timestamp_[value] = PIL_check_seconds_timer();
|
||||
stats->begin_timestamp_[value] = BLI_check_seconds_timer();
|
||||
}
|
||||
|
||||
void BKE_subdiv_stats_end(SubdivStats *stats, eSubdivStatsValue value)
|
||||
{
|
||||
stats->values_[value] = PIL_check_seconds_timer() - stats->begin_timestamp_[value];
|
||||
stats->values_[value] = BLI_check_seconds_timer() - stats->begin_timestamp_[value];
|
||||
}
|
||||
|
||||
void BKE_subdiv_stats_reset(SubdivStats *stats, eSubdivStatsValue value)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "DNA_object_types.h"
|
||||
#include "DNA_particle_types.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
|
||||
#include "BKE_main.hh"
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
#include "BKE_scene.h"
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_prototypes.h"
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
#include "BLI_math_vector.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_movieclip.h"
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "libmv-capi.h"
|
||||
#include "tracking_private.h"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "libmv-capi.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include "BKE_movieclip.h"
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
|
||||
#include "libmv-capi.h"
|
||||
#include "tracking_private.h"
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include "BKE_movieclip.h"
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
#include "IMB_colormanagement.h"
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_colormanagement.hh"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
/* == Parameterization constants == */
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include "BKE_movieclip.h"
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_moviecache.h"
|
||||
#include "IMB_imbuf.hh"
|
||||
#include "IMB_imbuf_types.hh"
|
||||
#include "IMB_moviecache.hh"
|
||||
|
||||
#include "tracking_private.h"
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# include "BKE_sound.h"
|
||||
# include "BKE_writeffmpeg.hh"
|
||||
|
||||
# include "IMB_imbuf.h"
|
||||
# include "IMB_imbuf.hh"
|
||||
|
||||
/* This needs to be included after BLI_math_base.h otherwise it will redefine some math defines
|
||||
* like M_SQRT1_2 leading to warnings with MSVC */
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct BoxPack {
|
|||
* \param r_tot_x, r_tot_y: set so you can normalize the data.
|
||||
*/
|
||||
void BLI_box_pack_2d(
|
||||
BoxPack *box_array, unsigned int len, bool sort_boxes, float *r_tot_x, float *r_tot_y);
|
||||
BoxPack *boxarray, unsigned int len, bool sort_boxes, float *r_tot_x, float *r_tot_y);
|
||||
|
||||
typedef struct FixedSizeBoxPack {
|
||||
struct FixedSizeBoxPack *next, *prev;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue