Mesh: Replace auto smooth with node group #108014
|
@ -647,7 +647,7 @@ if(NOT APPLE)
|
|||
gfx900 gfx90c gfx902
|
||||
gfx1010 gfx1011 gfx1012
|
||||
gfx1030 gfx1031 gfx1032 gfx1034 gfx1035 gfx1036
|
||||
gfx1100 gfx1101 gfx1102
|
||||
gfx1100 gfx1101 gfx1102 gfx1103
|
||||
CACHE STRING "AMD HIP architectures to build binaries for"
|
||||
)
|
||||
mark_as_advanced(WITH_CYCLES_DEVICE_HIP)
|
||||
|
|
|
@ -30,9 +30,17 @@ typedef unsigned int char32_t;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int mk_wcwidth(char32_t ucs);
|
||||
int mk_wcswidth(const char32_t *pwcs, size_t n);
|
||||
int mk_wcwidth_cjk(char32_t ucs);
|
||||
int mk_wcswidth_cjk(const char32_t *pwcs, size_t n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -121,18 +121,19 @@ shader node_principled_bsdf(string distribution = "multi_ggx",
|
|||
|
||||
if (CoatWeight > 1e-5) {
|
||||
float coat_ior = max(CoatIOR, 1.0);
|
||||
float coat_weight = clamp(CoatWeight, 0.0, 1.0);
|
||||
if (CoatTint != color(1.0)) {
|
||||
float coat_neta = 1.0 / coat_ior;
|
||||
float cosNI = dot(I, CoatNormal);
|
||||
float cosNT = sqrt(1.0 - coat_neta * coat_neta * (1 - cosNI * cosNI));
|
||||
BSDF *= pow(CoatTint, CoatWeight / cosNT);
|
||||
BSDF *= mix(color(1.0), pow(CoatTint, 1.0 / cosNT), coat_weight);
|
||||
}
|
||||
float coat_r2 = clamp(CoatRoughness, 0.0, 1.0);
|
||||
coat_r2 = coat_r2 * coat_r2;
|
||||
|
||||
closure color CoatBSDF = dielectric_bsdf(
|
||||
CoatNormal, vector(0.0), color(1.0), color(0.0), coat_r2, coat_r2, coat_ior, "ggx");
|
||||
BSDF = layer(clamp(CoatWeight, 0.0, 1.0) * CoatBSDF, BSDF);
|
||||
BSDF = layer(coat_weight * CoatBSDF, BSDF);
|
||||
}
|
||||
|
||||
if (SheenWeight > 1e-5) {
|
||||
|
|
|
@ -257,7 +257,8 @@ ccl_device
|
|||
* TIR is no concern here since we're always coming from the outside. */
|
||||
float cosNT = sqrtf(1.0f - sqr(1.0f / coat_ior) * (1 - sqr(cosNI)));
|
||||
float optical_depth = 1.0f / cosNT;
|
||||
weight *= power(rgb_to_spectrum(coat_tint), coat_weight * optical_depth);
|
||||
weight *= mix(
|
||||
one_spectrum(), power(rgb_to_spectrum(coat_tint), optical_depth), coat_weight);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "GHOST_Debug.hh"
|
||||
#include <shellapi.h>
|
||||
|
||||
#include "utf_winfunc.h"
|
||||
#include "utfconv.h"
|
||||
#include "utf_winfunc.hh"
|
||||
#include "utfconv.hh"
|
||||
|
||||
#ifdef WITH_GHOST_DEBUG
|
||||
/* utility */
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# include "GHOST_ImeWin32.hh"
|
||||
# include "GHOST_C-api.h"
|
||||
# include "GHOST_WindowWin32.hh"
|
||||
# include "utfconv.h"
|
||||
# include "utfconv.hh"
|
||||
|
||||
/* ISO_639-1 2-Letter Abbreviations. */
|
||||
# define IMELANG_ENGLISH "en"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifndef _WIN32_IE
|
||||
# define _WIN32_IE 0x0501
|
||||
#endif
|
||||
#include "utfconv.h"
|
||||
#include "utfconv.hh"
|
||||
#include <shlobj.h>
|
||||
|
||||
GHOST_SystemPathsWin32::GHOST_SystemPathsWin32() {}
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#endif
|
||||
#include <wayland-cursor.h>
|
||||
|
||||
#include <xkbcommon/xkbcommon-compose.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
/* Generated by `wayland-scanner`. */
|
||||
|
@ -813,6 +814,12 @@ struct GWL_Seat {
|
|||
struct {
|
||||
xkb_context *context = nullptr;
|
||||
|
||||
/** The compose key table (check for null before use). */
|
||||
xkb_compose_table *compose_table = nullptr;
|
||||
|
||||
/** The compose state is expected to use the keyboard `state` (check for null before use). */
|
||||
xkb_compose_state *compose_state = nullptr;
|
||||
|
||||
xkb_state *state = nullptr;
|
||||
/**
|
||||
* Keep a state with no modifiers active, use for symbol lookups.
|
||||
|
@ -1486,6 +1493,24 @@ static void gwl_registry_entry_update_all(GWL_Display *display, const int interf
|
|||
/** \name Private Utility Functions
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* Access the LOCALE (with a fallback).
|
||||
*/
|
||||
static const char *ghost_wl_locale_from_env_with_default()
|
||||
{
|
||||
const char *locale = getenv("LC_ALL");
|
||||
if (!locale || !*locale) {
|
||||
locale = getenv("LC_CTYPE");
|
||||
if (!locale || !*locale) {
|
||||
locale = getenv("LANG");
|
||||
if (!locale || !*locale) {
|
||||
locale = "C";
|
||||
}
|
||||
}
|
||||
}
|
||||
return locale;
|
||||
}
|
||||
|
||||
static void ghost_wl_display_report_error(wl_display *display)
|
||||
{
|
||||
int ecode = wl_display_get_error(display);
|
||||
|
@ -3897,6 +3922,14 @@ static void keyboard_handle_keymap(void *data,
|
|||
|
||||
CLOG_INFO(LOG, 2, "keymap");
|
||||
|
||||
if (seat->xkb.compose_state) {
|
||||
xkb_compose_state_reset(seat->xkb.compose_state);
|
||||
}
|
||||
else {
|
||||
seat->xkb.compose_state = xkb_compose_state_new(seat->xkb.compose_table,
|
||||
XKB_COMPOSE_STATE_NO_FLAGS);
|
||||
}
|
||||
|
||||
/* In practice we can assume `xkb_state_new` always succeeds. */
|
||||
xkb_state_unref(seat->xkb.state);
|
||||
seat->xkb.state = xkb_state_new(keymap);
|
||||
|
@ -4077,6 +4110,42 @@ static xkb_keysym_t xkb_state_key_get_one_sym_without_modifiers(
|
|||
return sym;
|
||||
}
|
||||
|
||||
static bool xkb_compose_state_feed_and_get_utf8(
|
||||
xkb_compose_state *compose_state,
|
||||
xkb_state *state,
|
||||
const xkb_keycode_t key,
|
||||
char r_utf8_buf[sizeof(GHOST_TEventKeyData::utf8_buf)])
|
||||
{
|
||||
const xkb_keysym_t sym = xkb_state_key_get_one_sym(state, key);
|
||||
const xkb_compose_feed_result result = xkb_compose_state_feed(compose_state, sym);
|
||||
bool handled = false;
|
||||
|
||||
if (result == XKB_COMPOSE_FEED_ACCEPTED) {
|
||||
switch (xkb_compose_state_get_status(compose_state)) {
|
||||
case XKB_COMPOSE_NOTHING: {
|
||||
break;
|
||||
}
|
||||
case XKB_COMPOSE_COMPOSING: {
|
||||
break;
|
||||
}
|
||||
case XKB_COMPOSE_COMPOSED: {
|
||||
char utf8_buf_compose[sizeof(GHOST_TEventKeyData::utf8_buf) + 1] = {'\0'};
|
||||
const int utf8_buf_compose_len = xkb_compose_state_get_utf8(
|
||||
compose_state, utf8_buf_compose, sizeof(utf8_buf_compose));
|
||||
if (utf8_buf_compose_len > 0) {
|
||||
memcpy(r_utf8_buf, utf8_buf_compose, utf8_buf_compose_len);
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XKB_COMPOSE_CANCELLED: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
/**
|
||||
* \note Caller must lock `timer_mutex`.
|
||||
*/
|
||||
|
@ -4198,9 +4267,19 @@ static void keyboard_handle_key(void *data,
|
|||
}
|
||||
|
||||
const GHOST_TKey gkey = xkb_map_gkey_or_scan_code(sym, key);
|
||||
|
||||
char utf8_buf[sizeof(GHOST_TEventKeyData::utf8_buf)] = {'\0'};
|
||||
if (etype == GHOST_kEventKeyDown) {
|
||||
xkb_state_key_get_utf8(seat->xkb.state, key_code, utf8_buf, sizeof(utf8_buf));
|
||||
/* Handle key-compose (dead-keys). */
|
||||
if (seat->xkb.compose_state &&
|
||||
xkb_compose_state_feed_and_get_utf8(
|
||||
seat->xkb.compose_state, seat->xkb.state, key_code, utf8_buf))
|
||||
{
|
||||
/* `utf8_buf` has been filled by a compose action. */
|
||||
}
|
||||
else {
|
||||
xkb_state_key_get_utf8(seat->xkb.state, key_code, utf8_buf, sizeof(utf8_buf));
|
||||
}
|
||||
}
|
||||
|
||||
seat->data_source_serial = serial;
|
||||
|
@ -4235,8 +4314,18 @@ static void keyboard_handle_key(void *data,
|
|||
GHOST_IWindow *win = ghost_wl_surface_user_data(wl_surface_focus);
|
||||
GHOST_SystemWayland *system = seat->system;
|
||||
/* Calculate this value every time in case modifier keys are pressed. */
|
||||
|
||||
char utf8_buf[sizeof(GHOST_TEventKeyData::utf8_buf)] = {'\0'};
|
||||
xkb_state_key_get_utf8(seat->xkb.state, payload->key_code, utf8_buf, sizeof(utf8_buf));
|
||||
if (seat->xkb.compose_state &&
|
||||
xkb_compose_state_feed_and_get_utf8(
|
||||
seat->xkb.compose_state, seat->xkb.state, payload->key_code, utf8_buf))
|
||||
{
|
||||
/* `utf8_buf` has been filled by a compose action. */
|
||||
}
|
||||
else {
|
||||
xkb_state_key_get_utf8(seat->xkb.state, payload->key_code, utf8_buf, sizeof(utf8_buf));
|
||||
}
|
||||
|
||||
system->pushEvent_maybe_pending(new GHOST_EventKey(system->getMilliSeconds(),
|
||||
GHOST_kEventKeyDown,
|
||||
win,
|
||||
|
@ -5318,6 +5407,11 @@ static void gwl_registry_wl_seat_add(GWL_Display *display, const GWL_RegisteryAd
|
|||
GWL_Seat *seat = new GWL_Seat;
|
||||
seat->system = display->system;
|
||||
seat->xkb.context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||
|
||||
/* May be null (skip dead-key support in this case). */
|
||||
seat->xkb.compose_table = xkb_compose_table_new_from_locale(
|
||||
seat->xkb.context, ghost_wl_locale_from_env_with_default(), XKB_COMPOSE_COMPILE_NO_FLAGS);
|
||||
|
||||
seat->data_source = new GWL_DataSource;
|
||||
seat->wl.seat = static_cast<wl_seat *>(
|
||||
wl_registry_bind(display->wl.registry, params->name, &wl_seat_interface, 5));
|
||||
|
@ -5453,6 +5547,9 @@ static void gwl_registry_wl_seat_remove(GWL_Display *display, void *user_data, c
|
|||
xkb_state_unref(seat->xkb.state_empty_with_shift);
|
||||
xkb_state_unref(seat->xkb.state_empty_with_numlock);
|
||||
|
||||
xkb_compose_state_unref(seat->xkb.compose_state);
|
||||
xkb_compose_table_unref(seat->xkb.compose_table);
|
||||
|
||||
xkb_context_unref(seat->xkb.context);
|
||||
|
||||
/* Remove the seat. */
|
||||
|
@ -7580,7 +7677,6 @@ void GHOST_SystemWayland::ime_begin(
|
|||
(seat->ime.rect.h == h)) /* H. */
|
||||
{
|
||||
/* Only re-update the rectangle as needed. */
|
||||
printf("DONT REPOSITION\n");
|
||||
}
|
||||
else {
|
||||
const int rect_x = wl_fixed_to_int(win->wl_fixed_from_window(wl_fixed_from_int(x)));
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include <tlhelp32.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
#include "utf_winfunc.h"
|
||||
#include "utfconv.h"
|
||||
#include "utf_winfunc.hh"
|
||||
#include "utfconv.hh"
|
||||
|
||||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include "GHOST_DropTargetWin32.hh"
|
||||
#include "GHOST_SystemWin32.hh"
|
||||
#include "GHOST_WindowManager.hh"
|
||||
#include "utf_winfunc.h"
|
||||
#include "utfconv.h"
|
||||
#include "utf_winfunc.hh"
|
||||
#include "utfconv.hh"
|
||||
|
||||
#ifdef WITH_OPENGL_BACKEND
|
||||
# include "GHOST_ContextWGL.hh"
|
||||
|
|
|
@ -11,9 +11,9 @@ set(INC_SYS
|
|||
)
|
||||
|
||||
set(SRC
|
||||
utfconv.c
|
||||
utfconv.cc
|
||||
|
||||
utfconv.h
|
||||
utfconv.hh
|
||||
)
|
||||
|
||||
set(LIB
|
||||
|
@ -24,8 +24,8 @@ set(LIB
|
|||
# ... because one day we might want to use it on other platforms.
|
||||
if(WIN32)
|
||||
list(APPEND SRC
|
||||
utf_winfunc.c
|
||||
utf_winfunc.h
|
||||
utf_winfunc.cc
|
||||
utf_winfunc.hh
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
# define _WIN32_IE 0x0501
|
||||
#endif
|
||||
|
||||
#include "utf_winfunc.h"
|
||||
#include "utfconv.h"
|
||||
#include "utf_winfunc.hh"
|
||||
#include "utfconv.hh"
|
||||
#include <io.h>
|
||||
#include <wchar.h>
|
||||
#include <windows.h>
|
|
@ -6,7 +6,7 @@
|
|||
* \ingroup intern_utf_conv
|
||||
*/
|
||||
|
||||
#include "utfconv.h"
|
||||
#include "utfconv.hh"
|
||||
|
||||
size_t count_utf_8_from_16(const wchar_t *string16)
|
||||
{
|
|
@ -13,10 +13,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Counts how many bytes is required for future utf-8 string using utf-16
|
||||
* \param string16: pointer to working utf-16 string
|
||||
|
@ -90,8 +86,4 @@ wchar_t *alloc_utf16_from_8(const char *in8, size_t add);
|
|||
} \
|
||||
(void)0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __UTFCONV_H__ */
|
|
@ -4610,6 +4610,9 @@ def km_grease_pencil_edit(params):
|
|||
{"properties": [("type", "ALL_FRAMES")]}),
|
||||
# Keyframe Menu
|
||||
op_menu("VIEW3D_MT_edit_greasepencil_animation", {"type": 'I', "value": 'PRESS'}),
|
||||
# Cyclical set
|
||||
("grease_pencil.cyclical_set", {"type": 'F', "value": 'PRESS'}, {"properties": [("type", "CLOSE")]}),
|
||||
("grease_pencil.cyclical_set", {"type": 'C', "value": 'PRESS', "alt": True}, {"properties": [("type", "TOGGLE")]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
|
|
|
@ -273,6 +273,7 @@ class EEVEE_NEXT_MATERIAL_PT_settings(MaterialButtonsPanel, Panel):
|
|||
layout.prop(mat, "show_transparent_back")
|
||||
|
||||
layout.prop(mat, "use_screen_refraction")
|
||||
layout.prop(mat, "volume_intersection_method")
|
||||
layout.prop(mat, "pass_index")
|
||||
|
||||
|
||||
|
|
|
@ -461,6 +461,7 @@ class RENDER_PT_eevee_next_volumes(RenderButtonsPanel, Panel):
|
|||
col.prop(props, "volumetric_tile_size")
|
||||
col.prop(props, "volumetric_samples")
|
||||
col.prop(props, "volumetric_sample_distribution", text="Distribution")
|
||||
col.prop(props, "volumetric_ray_depth", text="Max Depth")
|
||||
|
||||
|
||||
class RENDER_PT_eevee_next_volumes_lighting(RenderButtonsPanel, Panel):
|
||||
|
|
|
@ -1579,51 +1579,6 @@ class USERPREF_UL_asset_libraries(bpy.types.UIList):
|
|||
layout.prop(asset_library, "name", text="", emboss=False)
|
||||
|
||||
|
||||
class USERPREF_PT_file_paths_extension_repos(FilePathsPanel, Panel):
|
||||
bl_label = "Extension Repositories"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.preferences.experimental.use_extension_repos
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = False
|
||||
layout.use_property_decorate = False
|
||||
|
||||
paths = context.preferences.filepaths
|
||||
active_library_index = paths.active_extension_repo
|
||||
|
||||
row = layout.row()
|
||||
|
||||
row.template_list(
|
||||
"USERPREF_UL_extension_repos", "user_extension_repos",
|
||||
paths, "extension_repos",
|
||||
paths, "active_extension_repo"
|
||||
)
|
||||
|
||||
col = row.column(align=True)
|
||||
col.operator("preferences.extension_repo_add", text="", icon='ADD')
|
||||
props = col.operator("preferences.extension_repo_remove", text="", icon='REMOVE')
|
||||
props.index = active_library_index
|
||||
|
||||
try:
|
||||
active_repo = None if active_library_index < 0 else paths.extension_repos[active_library_index]
|
||||
except IndexError:
|
||||
active_repo = None
|
||||
|
||||
if active_repo is None:
|
||||
return
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop(active_repo, "directory")
|
||||
layout.prop(active_repo, "remote_path")
|
||||
row = layout.row()
|
||||
row.prop(active_repo, "use_cache")
|
||||
row.prop(active_repo, "module")
|
||||
|
||||
|
||||
class USERPREF_UL_extension_repos(bpy.types.UIList):
|
||||
def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
|
||||
repo = item
|
||||
|
@ -2056,6 +2011,51 @@ class USERPREF_PT_extensions(ExtensionsPanel, Panel):
|
|||
).url = "https://projects.blender.org/ideasman42/bl_ext"
|
||||
|
||||
|
||||
class USERPREF_PT_extensions_repos(ExtensionsPanel, Panel):
|
||||
bl_label = "Extension Repositories"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.preferences.experimental.use_extension_repos
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = False
|
||||
layout.use_property_decorate = False
|
||||
|
||||
paths = context.preferences.filepaths
|
||||
active_library_index = paths.active_extension_repo
|
||||
|
||||
row = layout.row()
|
||||
|
||||
row.template_list(
|
||||
"USERPREF_UL_extension_repos", "user_extension_repos",
|
||||
paths, "extension_repos",
|
||||
paths, "active_extension_repo"
|
||||
)
|
||||
|
||||
col = row.column(align=True)
|
||||
col.operator("preferences.extension_repo_add", text="", icon='ADD')
|
||||
props = col.operator("preferences.extension_repo_remove", text="", icon='REMOVE')
|
||||
props.index = active_library_index
|
||||
|
||||
try:
|
||||
active_repo = None if active_library_index < 0 else paths.extension_repos[active_library_index]
|
||||
except IndexError:
|
||||
active_repo = None
|
||||
|
||||
if active_repo is None:
|
||||
return
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop(active_repo, "directory")
|
||||
layout.prop(active_repo, "remote_path")
|
||||
row = layout.row()
|
||||
row.prop(active_repo, "use_cache")
|
||||
row.prop(active_repo, "module")
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Add-On Panels
|
||||
|
||||
|
@ -2669,7 +2669,6 @@ classes = (
|
|||
USERPREF_PT_file_paths_render,
|
||||
USERPREF_PT_file_paths_asset_libraries,
|
||||
USERPREF_PT_file_paths_script_directories,
|
||||
USERPREF_PT_file_paths_extension_repos,
|
||||
USERPREF_PT_file_paths_applications,
|
||||
USERPREF_PT_text_editor,
|
||||
USERPREF_PT_text_editor_presets,
|
||||
|
@ -2694,9 +2693,11 @@ classes = (
|
|||
|
||||
USERPREF_PT_keymap,
|
||||
|
||||
USERPREF_PT_extensions,
|
||||
USERPREF_PT_addons,
|
||||
|
||||
USERPREF_PT_extensions,
|
||||
USERPREF_PT_extensions_repos,
|
||||
|
||||
USERPREF_PT_studiolight_lights,
|
||||
USERPREF_PT_studiolight_light_editor,
|
||||
USERPREF_PT_studiolight_matcaps,
|
||||
|
|
|
@ -3585,19 +3585,19 @@ class VIEW3D_MT_sculpt(Menu):
|
|||
layout.separator()
|
||||
|
||||
sculpt_filters_types = [
|
||||
('SMOOTH', "Smooth"),
|
||||
('SURFACE_SMOOTH', "Surface Smooth"),
|
||||
('INFLATE', "Inflate"),
|
||||
('RELAX', "Relax Topology"),
|
||||
('RELAX_FACE_SETS', "Relax Face Sets"),
|
||||
('SHARPEN', "Sharpen"),
|
||||
('ENHANCE_DETAILS', "Enhance Details"),
|
||||
('ERASE_DISCPLACEMENT', "Erase Multires Displacement"),
|
||||
('RANDOM', "Randomize")
|
||||
('SMOOTH', iface_("Smooth")),
|
||||
('SURFACE_SMOOTH', iface_("Surface Smooth")),
|
||||
('INFLATE', iface_("Inflate")),
|
||||
('RELAX', iface_("Relax Topology")),
|
||||
('RELAX_FACE_SETS', iface_("Relax Face Sets")),
|
||||
('SHARPEN', iface_("Sharpen")),
|
||||
('ENHANCE_DETAILS', iface_("Enhance Details")),
|
||||
('ERASE_DISCPLACEMENT', iface_("Erase Multires Displacement")),
|
||||
('RANDOM', iface_("Randomize"))
|
||||
]
|
||||
|
||||
for filter_type, ui_name in sculpt_filters_types:
|
||||
props = layout.operator("sculpt.mesh_filter", text=ui_name)
|
||||
props = layout.operator("sculpt.mesh_filter", text=ui_name, translate=False)
|
||||
props.type = filter_type
|
||||
|
||||
layout.separator()
|
||||
|
@ -5816,6 +5816,10 @@ class VIEW3D_MT_edit_greasepencil_stroke(Menu):
|
|||
layout.operator("grease_pencil.stroke_smooth")
|
||||
layout.operator("grease_pencil.stroke_simplify")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator_enum("grease_pencil.cyclical_set", "type")
|
||||
|
||||
|
||||
class VIEW3D_MT_edit_curves(Menu):
|
||||
bl_label = "Curves"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "BLI_math_color.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
|
|
@ -222,7 +222,7 @@ bool autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks)
|
|||
|
||||
bool autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *pchan, KeyingSet *ks)
|
||||
{
|
||||
if (autokeyframe_cfra_can_key(scene, &ob->id)) {
|
||||
if (!autokeyframe_cfra_can_key(scene, &ob->id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void BKE_id_attributes_default_color_set(struct ID *id, const char *name);
|
|||
|
||||
const struct CustomDataLayer *BKE_id_attributes_color_find(const struct ID *id, const char *name);
|
||||
|
||||
bool BKE_id_attribute_calc_unique_name(struct ID *id, const char *name, char *outname);
|
||||
void BKE_id_attribute_calc_unique_name(struct ID *id, const char *name, char *outname);
|
||||
|
||||
const char *BKE_uv_map_vert_select_name_get(const char *uv_map_name, char *buffer);
|
||||
const char *BKE_uv_map_edge_select_name_get(const char *uv_map_name, char *buffer);
|
||||
|
|
|
@ -274,7 +274,7 @@ void BKE_gpencil_modifier_free_ex(struct GpencilModifierData *md, int flag);
|
|||
*/
|
||||
void BKE_gpencil_modifier_free(struct GpencilModifierData *md);
|
||||
/* check unique name */
|
||||
bool BKE_gpencil_modifier_unique_name(struct ListBase *modifiers, struct GpencilModifierData *gmd);
|
||||
void BKE_gpencil_modifier_unique_name(struct ListBase *modifiers, struct GpencilModifierData *gmd);
|
||||
/**
|
||||
* Check if grease pencil modifier depends on time.
|
||||
* \param md: Modifier data.
|
||||
|
|
|
@ -424,7 +424,7 @@ void BKE_modifier_remove_from_list(struct Object *ob, struct ModifierData *md);
|
|||
/* Generate new UUID for the given modifier. */
|
||||
void BKE_modifier_session_uuid_generate(struct ModifierData *md);
|
||||
|
||||
bool BKE_modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
|
||||
void BKE_modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
|
||||
|
||||
struct ModifierData *BKE_modifier_copy_ex(const struct ModifierData *md, int flag);
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ void BKE_shaderfx_free(struct ShaderFxData *fx);
|
|||
/**
|
||||
* Check unique name.
|
||||
*/
|
||||
bool BKE_shaderfx_unique_name(struct ListBase *shaderfx, struct ShaderFxData *fx);
|
||||
void BKE_shaderfx_unique_name(struct ListBase *shaderfx, struct ShaderFxData *fx);
|
||||
bool BKE_shaderfx_depends_ontime(struct ShaderFxData *fx);
|
||||
/**
|
||||
* Check whether given shaderfx is not local (i.e. from linked data) when the object is a library
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_session_uuid.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_action.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "BLI_listbase.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_tempfile.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
|||
#include "CLG_log.h"
|
||||
|
||||
#ifdef WIN32
|
||||
# include "utf_winfunc.h"
|
||||
# include "utfconv.h"
|
||||
# include "utf_winfunc.hh"
|
||||
# include "utfconv.hh"
|
||||
# include <io.h>
|
||||
# ifdef _WIN32_IE
|
||||
# undef _WIN32_IE
|
||||
|
|
|
@ -374,7 +374,7 @@ IDTypeInfo IDType_ID_AR = {
|
|||
/*main_listbase_index*/ INDEX_ID_AR,
|
||||
/*struct_size*/ sizeof(bArmature),
|
||||
/*name*/ "Armature",
|
||||
/*name_plural*/ "armatures",
|
||||
/*name_plural*/ N_("armatures"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_ARMATURE,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "BLI_string.h"
|
||||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_uuid.h"
|
||||
|
||||
#include "BKE_asset.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "BLI_index_range.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
|
@ -263,7 +263,7 @@ static bool unique_name_cb(void *arg, const char *name)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool BKE_id_attribute_calc_unique_name(ID *id, const char *name, char *outname)
|
||||
void BKE_id_attribute_calc_unique_name(ID *id, const char *name, char *outname)
|
||||
{
|
||||
AttrUniqueData data{id};
|
||||
|
||||
|
@ -274,7 +274,7 @@ bool BKE_id_attribute_calc_unique_name(ID *id, const char *name, char *outname)
|
|||
BLI_strncpy_utf8(outname, (name && name[0]) ? name : IFACE_("Attribute"), name_maxncpy);
|
||||
|
||||
const char *defname = ""; /* Dummy argument, never used as `name` is never zero length. */
|
||||
return BLI_uniquename_cb(unique_name_cb, &data, defname, '.', outname, name_maxncpy);
|
||||
BLI_uniquename_cb(unique_name_cb, &data, defname, '.', outname, name_maxncpy);
|
||||
}
|
||||
|
||||
CustomDataLayer *BKE_id_attribute_new(ID *id,
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "BLI_hash_md5.h"
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "MOD_nodes.hh"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "BLI_fileops.hh"
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
namespace blender::bke::bake {
|
||||
|
||||
|
|
|
@ -415,7 +415,7 @@ IDTypeInfo IDType_ID_BR = {
|
|||
/*main_listbase_index*/ INDEX_ID_BR,
|
||||
/*struct_size*/ sizeof(Brush),
|
||||
/*name*/ "Brush",
|
||||
/*name_plural*/ "brushes",
|
||||
/*name_plural*/ N_("brushes"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_BRUSH,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_ANIMDATA,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -128,7 +128,7 @@ IDTypeInfo IDType_ID_CF = {
|
|||
/*main_listbase_index*/ INDEX_ID_CF,
|
||||
/*struct_size*/ sizeof(CacheFile),
|
||||
/*name*/ "CacheFile",
|
||||
/*name_plural*/ "cache_files",
|
||||
/*name_plural*/ N_("cache files"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_CACHEFILE,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -235,7 +235,7 @@ IDTypeInfo IDType_ID_CA = {
|
|||
/*main_listbase_index*/ INDEX_ID_CA,
|
||||
/*struct_size*/ sizeof(Camera),
|
||||
/*name*/ "Camera",
|
||||
/*name_plural*/ "cameras",
|
||||
/*name_plural*/ N_("cameras"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_CAMERA,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -334,7 +334,7 @@ IDTypeInfo IDType_ID_GR = {
|
|||
/*main_listbase_index*/ INDEX_ID_GR,
|
||||
/*struct_size*/ sizeof(Collection),
|
||||
/*name*/ "Collection",
|
||||
/*name_plural*/ "collections",
|
||||
/*name_plural*/ N_("collections"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_COLLECTION,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_ANIMDATA | IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLT_translation.h"
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ IDTypeInfo IDType_ID_CU_LEGACY = {
|
|||
/*main_listbase_index*/ INDEX_ID_CU_LEGACY,
|
||||
/*struct_size*/ sizeof(Curve),
|
||||
/*name*/ "Curve",
|
||||
/*name_plural*/ "curves",
|
||||
/*name_plural*/ N_("curves"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_CURVE_LEGACY,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -140,7 +140,7 @@ IDTypeInfo IDType_ID_CV = {
|
|||
/*main_listbase_index*/ INDEX_ID_CV,
|
||||
/*struct_size*/ sizeof(Curves),
|
||||
/*name*/ "Curves",
|
||||
/*name_plural*/ "hair_curves",
|
||||
/*name_plural*/ N_("hair curves"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_CURVES,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "BLI_string.h"
|
||||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "BLI_listbase.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "BLI_math_geom.h"
|
||||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "BLI_ghash.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_sort_utils.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "BKE_anim_data.h"
|
||||
#include "BKE_animsys.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "BLI_math_vector_types.hh"
|
||||
#include "BLI_polyfill_2d.h"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "DNA_gpencil_legacy_types.h"
|
||||
#include "DNA_gpencil_modifier_types.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
|
@ -268,7 +268,7 @@ IDTypeInfo IDType_ID_GD_LEGACY = {
|
|||
/*main_listbase_index*/ INDEX_ID_GD_LEGACY,
|
||||
/*struct_size*/ sizeof(bGPdata),
|
||||
/*name*/ "GPencil",
|
||||
/*name_plural*/ "grease_pencils",
|
||||
/*name_plural*/ N_("grease pencils"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_GPENCIL,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "BLI_math_geom.h"
|
||||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -421,19 +421,18 @@ void BKE_gpencil_modifier_free(GpencilModifierData *md)
|
|||
BKE_gpencil_modifier_free_ex(md, 0);
|
||||
}
|
||||
|
||||
bool BKE_gpencil_modifier_unique_name(ListBase *modifiers, GpencilModifierData *gmd)
|
||||
void BKE_gpencil_modifier_unique_name(ListBase *modifiers, GpencilModifierData *gmd)
|
||||
{
|
||||
if (modifiers && gmd) {
|
||||
const GpencilModifierTypeInfo *gmti = BKE_gpencil_modifier_get_info(
|
||||
GpencilModifierType(gmd->type));
|
||||
return BLI_uniquename(modifiers,
|
||||
gmd,
|
||||
DATA_(gmti->name),
|
||||
'.',
|
||||
offsetof(GpencilModifierData, name),
|
||||
sizeof(gmd->name));
|
||||
BLI_uniquename(modifiers,
|
||||
gmd,
|
||||
DATA_(gmti->name),
|
||||
'.',
|
||||
offsetof(GpencilModifierData, name),
|
||||
sizeof(gmd->name));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BKE_gpencil_modifier_depends_ontime(GpencilModifierData *md)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "BLI_stack.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_vector_set.hh"
|
||||
#include "BLI_virtual_array.hh"
|
||||
|
||||
|
@ -201,7 +201,7 @@ IDTypeInfo IDType_ID_GP = {
|
|||
/*main_listbase_index*/ INDEX_ID_GP,
|
||||
/*struct_size*/ sizeof(GreasePencil),
|
||||
/*name*/ "GreasePencil",
|
||||
/*name_plural*/ "grease_pencils_v3",
|
||||
/*name_plural*/ N_("grease pencils"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_GPENCIL,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
@ -2021,11 +2021,11 @@ static bool check_unique_node_cb(void *arg, const char *name)
|
|||
return names.contains(name);
|
||||
}
|
||||
|
||||
static bool unique_node_name_ex(VectorSet<blender::StringRefNull> &names,
|
||||
static void unique_node_name_ex(VectorSet<blender::StringRefNull> &names,
|
||||
const char *default_name,
|
||||
char *name)
|
||||
{
|
||||
return BLI_uniquename_cb(check_unique_node_cb, &names, default_name, '.', name, MAX_NAME);
|
||||
BLI_uniquename_cb(check_unique_node_cb, &names, default_name, '.', name, MAX_NAME);
|
||||
}
|
||||
|
||||
static std::string unique_node_name(const GreasePencil &grease_pencil,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "BLI_array.hh"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
|
@ -1894,6 +1894,14 @@ static void stampdata_from_template(StampData *stamp_data,
|
|||
else {
|
||||
stamp_data->frame[0] = '\0';
|
||||
}
|
||||
if (scene->r.stamp & R_STAMP_FRAME_RANGE) {
|
||||
SNPRINTF(stamp_data->frame_range,
|
||||
do_prefix ? "Frame Range %s" : "%s",
|
||||
stamp_data_template->frame_range);
|
||||
}
|
||||
else {
|
||||
stamp_data->frame_range[0] = '\0';
|
||||
}
|
||||
if (scene->r.stamp & R_STAMP_CAMERA) {
|
||||
SNPRINTF(stamp_data->camera, do_prefix ? "Camera %s" : "%s", stamp_data_template->camera);
|
||||
}
|
||||
|
@ -2224,6 +2232,28 @@ void BKE_image_stamp_buf(Scene *scene,
|
|||
x += w + pad;
|
||||
}
|
||||
|
||||
if (TEXT_SIZE_CHECK(stamp_data.frame_range, w, h)) {
|
||||
|
||||
/* extra space for background. */
|
||||
buf_rectfill_area(rect,
|
||||
rectf,
|
||||
width,
|
||||
height,
|
||||
scene->r.bg_stamp,
|
||||
display,
|
||||
x - BUFF_MARGIN_X,
|
||||
y - BUFF_MARGIN_Y,
|
||||
x + w + BUFF_MARGIN_X,
|
||||
y + h + BUFF_MARGIN_Y);
|
||||
|
||||
/* and pad the text. */
|
||||
BLF_position(mono, x, y + y_ofs, 0.0);
|
||||
BLF_draw_buffer(mono, stamp_data.frame_range, sizeof(stamp_data.frame_range));
|
||||
|
||||
/* space width. */
|
||||
x += w + pad;
|
||||
}
|
||||
|
||||
if (TEXT_SIZE_CHECK(stamp_data.camera, w, h)) {
|
||||
|
||||
/* extra space for background. */
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "BLI_blenlib.h"
|
||||
#include "BLI_dynstr.h"
|
||||
#include "BLI_endian_switch.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -160,7 +160,7 @@ IDTypeInfo IDType_ID_IP = {
|
|||
/*main_listbase_index*/ INDEX_ID_IP,
|
||||
/*struct_size*/ sizeof(Ipo),
|
||||
/*name*/ "Ipo",
|
||||
/*name_plural*/ "ipos",
|
||||
/*name_plural*/ N_("ipos"),
|
||||
/*translation_context*/ "",
|
||||
/*flags*/ IDTYPE_FLAGS_NO_COPY | IDTYPE_FLAGS_NO_LIBLINKING | IDTYPE_FLAGS_NO_ANIMDATA,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "BLI_endian_switch.h"
|
||||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -193,7 +193,7 @@ IDTypeInfo IDType_ID_KE = {
|
|||
/*main_listbase_index*/ INDEX_ID_KE,
|
||||
/*struct_size*/ sizeof(Key),
|
||||
/*name*/ "Key",
|
||||
/*name_plural*/ "shape_keys",
|
||||
/*name_plural*/ N_("shape keys"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_SHAPEKEY,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_LIBLINKING,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -165,7 +165,7 @@ IDTypeInfo IDType_ID_LT = {
|
|||
/*main_listbase_index*/ INDEX_ID_LT,
|
||||
/*struct_size*/ sizeof(Lattice),
|
||||
/*name*/ "Lattice",
|
||||
/*name_plural*/ "lattices",
|
||||
/*name_plural*/ N_("lattices"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_LATTICE,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "BLI_mempool.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLT_translation.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "BLI_ghash.h"
|
||||
#include "BLI_linklist.h"
|
||||
#include "BLI_memarena.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
|
@ -84,7 +84,7 @@ IDTypeInfo IDType_ID_LINK_PLACEHOLDER = {
|
|||
/*main_listbase_index*/ INDEX_ID_NULL,
|
||||
/*struct_size*/ sizeof(ID),
|
||||
/*name*/ "LinkPlaceholder",
|
||||
/*name_plural*/ "link_placeholders",
|
||||
/*name_plural*/ N_("link placeholders"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_ID,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_COPY | IDTYPE_FLAGS_NO_LIBLINKING,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -89,7 +89,7 @@ IDTypeInfo IDType_ID_LI = {
|
|||
/*main_listbase_index*/ INDEX_ID_LI,
|
||||
/*struct_size*/ sizeof(Library),
|
||||
/*name*/ "Library",
|
||||
/*name_plural*/ "libraries",
|
||||
/*name_plural*/ N_("libraries"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_LIBRARY,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_COPY | IDTYPE_FLAGS_NO_LIBLINKING | IDTYPE_FLAGS_NO_ANIMDATA,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -161,7 +161,7 @@ IDTypeInfo IDType_ID_LA = {
|
|||
/*main_listbase_index*/ INDEX_ID_LA,
|
||||
/*struct_size*/ sizeof(Light),
|
||||
/*name*/ "Light",
|
||||
/*name_plural*/ "lights",
|
||||
/*name_plural*/ N_("lights"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_LIGHT,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -58,7 +58,7 @@ IDTypeInfo IDType_ID_LP = {
|
|||
/*main_listbase_index*/ INDEX_ID_LP,
|
||||
/*struct_size*/ sizeof(LightProbe),
|
||||
/*name*/ "LightProbe",
|
||||
/*name_plural*/ "lightprobes",
|
||||
/*name_plural*/ N_("light probes"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_LIGHTPROBE,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -647,7 +647,7 @@ IDTypeInfo IDType_ID_LS = {
|
|||
/*main_listbase_index*/ INDEX_ID_LS,
|
||||
/*struct_size*/ sizeof(FreestyleLineStyle),
|
||||
/*name*/ "FreestyleLineStyle",
|
||||
/*name_plural*/ "linestyles",
|
||||
/*name_plural*/ N_("line styles"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "BLI_set.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -187,7 +187,7 @@ IDTypeInfo IDType_ID_MSK = {
|
|||
/*main_listbase_index*/ INDEX_ID_MSK,
|
||||
/*struct_size*/ sizeof(Mask),
|
||||
/*name*/ "Mask",
|
||||
/*name_plural*/ "masks",
|
||||
/*name_plural*/ N_("masks"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_MASK,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -235,7 +235,7 @@ IDTypeInfo IDType_ID_MA = {
|
|||
/*main_listbase_index*/ INDEX_ID_MA,
|
||||
/*struct_size*/ sizeof(Material),
|
||||
/*name*/ "Material",
|
||||
/*name_plural*/ "materials",
|
||||
/*name_plural*/ N_("materials"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_MATERIAL,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -147,7 +147,7 @@ IDTypeInfo IDType_ID_MB = {
|
|||
/*main_listbase_index*/ INDEX_ID_MB,
|
||||
/*struct_size*/ sizeof(MetaBall),
|
||||
/*name*/ "Metaball",
|
||||
/*name_plural*/ "metaballs",
|
||||
/*name_plural*/ N_("metaballs"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_METABALL,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_memarena.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_displist.h"
|
||||
|
|
|
@ -372,7 +372,7 @@ IDTypeInfo IDType_ID_ME = {
|
|||
/*main_listbase_index*/ INDEX_ID_ME,
|
||||
/*struct_size*/ sizeof(Mesh),
|
||||
/*name*/ "Mesh",
|
||||
/*name_plural*/ "meshes",
|
||||
/*name_plural*/ N_("meshes"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_MESH,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "BLI_session_uuid.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -225,15 +225,14 @@ void BKE_modifier_session_uuid_generate(ModifierData *md)
|
|||
md->session_uuid = BLI_session_uuid_generate();
|
||||
}
|
||||
|
||||
bool BKE_modifier_unique_name(ListBase *modifiers, ModifierData *md)
|
||||
void BKE_modifier_unique_name(ListBase *modifiers, ModifierData *md)
|
||||
{
|
||||
if (modifiers && md) {
|
||||
const ModifierTypeInfo *mti = BKE_modifier_get_info(ModifierType(md->type));
|
||||
|
||||
return BLI_uniquename(
|
||||
BLI_uniquename(
|
||||
modifiers, md, DATA_(mti->name), '.', offsetof(ModifierData, name), sizeof(md->name));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BKE_modifier_depends_ontime(Scene *scene, ModifierData *md)
|
||||
|
|
|
@ -288,7 +288,7 @@ IDTypeInfo IDType_ID_MC = {
|
|||
/*main_listbase_index*/ INDEX_ID_MC,
|
||||
/*struct_size*/ sizeof(MovieClip),
|
||||
/*name*/ "MovieClip",
|
||||
/*name_plural*/ "movieclips",
|
||||
/*name_plural*/ N_("movie clips"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_MOVIECLIP,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "BLI_ghash.h"
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "BLI_stack.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_vector_set.hh"
|
||||
|
@ -1126,7 +1126,7 @@ IDTypeInfo IDType_ID_NT = {
|
|||
/*main_listbase_index*/ INDEX_ID_NT,
|
||||
/*struct_size*/ sizeof(bNodeTree),
|
||||
/*name*/ "NodeTree",
|
||||
/*name_plural*/ "node_groups",
|
||||
/*name_plural*/ N_("node groups"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_NODETREE,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ &AssetType_NT,
|
||||
|
|
|
@ -1056,7 +1056,7 @@ IDTypeInfo IDType_ID_OB = {
|
|||
/*main_listbase_index*/ INDEX_ID_OB,
|
||||
/*struct_size*/ sizeof(Object),
|
||||
/*name*/ "Object",
|
||||
/*name_plural*/ "objects",
|
||||
/*name_plural*/ N_("objects"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_OBJECT,
|
||||
/*flags*/ 0,
|
||||
/*asset_type_info*/ &AssetType_OB,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "BLI_ghash.h"
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_armature_types.h"
|
||||
|
|
|
@ -144,7 +144,7 @@ IDTypeInfo IDType_ID_PAL = {
|
|||
/*main_listbase_index*/ INDEX_ID_PAL,
|
||||
/*struct_size*/ sizeof(Palette),
|
||||
/*name*/ "Palette",
|
||||
/*name_plural*/ "palettes",
|
||||
/*name_plural*/ N_("palettes"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_PALETTE,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_ANIMDATA,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
@ -211,7 +211,7 @@ IDTypeInfo IDType_ID_PC = {
|
|||
/*main_listbase_index*/ INDEX_ID_PC,
|
||||
/*struct_size*/ sizeof(PaintCurve),
|
||||
/*name*/ "PaintCurve",
|
||||
/*name_plural*/ "paint_curves",
|
||||
/*name_plural*/ N_("paint curves"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_PAINTCURVE,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_ANIMDATA,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -382,7 +382,7 @@ IDTypeInfo IDType_ID_PA = {
|
|||
/*main_listbase_index*/ INDEX_ID_PA,
|
||||
/*struct_size*/ sizeof(ParticleSettings),
|
||||
/*name*/ "ParticleSettings",
|
||||
/*name_plural*/ "particles",
|
||||
/*name_plural*/ N_("particles"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_PARTICLESETTINGS,
|
||||
/*flags*/ 0,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_rand.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
|
|
@ -147,7 +147,7 @@ IDTypeInfo IDType_ID_PT = {
|
|||
/*main_listbase_index*/ INDEX_ID_PT,
|
||||
/*struct_size*/ sizeof(PointCloud),
|
||||
/*name*/ "PointCloud",
|
||||
/*name_plural*/ "pointclouds",
|
||||
/*name_plural*/ N_("point clouds"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_POINTCLOUD,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "BKE_appdir.h"
|
||||
#include "BKE_preferences.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "BLI_blenlib.h"
|
||||
#include "BLI_dynstr.h"
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
|
|
@ -169,7 +169,7 @@ IDTypeInfo IDType_ID_SCR = {
|
|||
/*main_listbase_index*/ INDEX_ID_SCR,
|
||||
/*struct_size*/ sizeof(bScreen),
|
||||
/*name*/ "Screen",
|
||||
/*name_plural*/ "screens",
|
||||
/*name_plural*/ N_("screens"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_SCREEN,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_COPY | IDTYPE_FLAGS_ONLY_APPEND | IDTYPE_FLAGS_NO_ANIMDATA |
|
||||
IDTYPE_FLAGS_NO_MEMFILE_UNDO,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -121,14 +121,13 @@ void BKE_shaderfx_free(ShaderFxData *fx)
|
|||
BKE_shaderfx_free_ex(fx, 0);
|
||||
}
|
||||
|
||||
bool BKE_shaderfx_unique_name(ListBase *shaders, ShaderFxData *fx)
|
||||
void BKE_shaderfx_unique_name(ListBase *shaders, ShaderFxData *fx)
|
||||
{
|
||||
if (shaders && fx) {
|
||||
const ShaderFxTypeInfo *fxi = BKE_shaderfx_get_info(ShaderFxType(fx->type));
|
||||
return BLI_uniquename(
|
||||
BLI_uniquename(
|
||||
shaders, fx, DATA_(fxi->name), '.', offsetof(ShaderFxData, name), sizeof(fx->name));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BKE_shaderfx_depends_ontime(ShaderFxData *fx)
|
||||
|
|
|
@ -195,7 +195,7 @@ IDTypeInfo IDType_ID_SO = {
|
|||
/*main_listbase_index*/ INDEX_ID_SO,
|
||||
/*struct_size*/ sizeof(bSound),
|
||||
/*name*/ "Sound",
|
||||
/*name_plural*/ "sounds",
|
||||
/*name_plural*/ N_("sounds"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_SOUND,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_ANIMDATA | IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -57,7 +57,7 @@ IDTypeInfo IDType_ID_SPK = {
|
|||
/*main_listbase_index*/ INDEX_ID_SPK,
|
||||
/*struct_size*/ sizeof(Speaker),
|
||||
/*name*/ "Speaker",
|
||||
/*name_plural*/ "speakers",
|
||||
/*name_plural*/ N_("speakers"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_SPEAKER,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "BLI_math_vector.h"
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ IDTypeInfo IDType_ID_TXT = {
|
|||
/*main_listbase_index*/ INDEX_ID_TXT,
|
||||
/*struct_size*/ sizeof(Text),
|
||||
/*name*/ "Text",
|
||||
/*name_plural*/ "texts",
|
||||
/*name_plural*/ N_("texts"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_TEXT,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_ANIMDATA | IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -201,7 +201,7 @@ IDTypeInfo IDType_ID_TE = {
|
|||
/*main_listbase_index*/ INDEX_ID_TE,
|
||||
/*struct_size*/ sizeof(Tex),
|
||||
/*name*/ "Texture",
|
||||
/*name_plural*/ "textures",
|
||||
/*name_plural*/ N_("textures"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_TEXTURE,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "BLI_math_vector.h"
|
||||
#include "BLI_math_vector_types.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "BLI_math_color.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ IDTypeInfo IDType_ID_VF = {
|
|||
/*main_listbase_index*/ INDEX_ID_VF,
|
||||
/*struct_size*/ sizeof(VFont),
|
||||
/*name*/ "Font",
|
||||
/*name_plural*/ "fonts",
|
||||
/*name_plural*/ N_("fonts"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_VFONT,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_ANIMDATA | IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -639,7 +639,7 @@ IDTypeInfo IDType_ID_VO = {
|
|||
/*main_listbase_index*/ INDEX_ID_VO,
|
||||
/*struct_size*/ sizeof(Volume),
|
||||
/*name*/ "Volume",
|
||||
/*name_plural*/ "volumes",
|
||||
/*name_plural*/ N_("volumes"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_VOLUME,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
@ -177,7 +177,7 @@ IDTypeInfo IDType_ID_WS = {
|
|||
/*main_listbase_index*/ INDEX_ID_WS,
|
||||
/*struct_size*/ sizeof(WorkSpace),
|
||||
/*name*/ "WorkSpace",
|
||||
/*name_plural*/ "workspaces",
|
||||
/*name_plural*/ N_("workspaces"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_WORKSPACE,
|
||||
/*flags*/ IDTYPE_FLAGS_NO_COPY | IDTYPE_FLAGS_ONLY_APPEND | IDTYPE_FLAGS_NO_ANIMDATA |
|
||||
IDTYPE_FLAGS_NO_MEMFILE_UNDO,
|
||||
|
|
|
@ -182,7 +182,7 @@ IDTypeInfo IDType_ID_WO = {
|
|||
/*main_listbase_index*/ INDEX_ID_WO,
|
||||
/*struct_size*/ sizeof(World),
|
||||
/*name*/ "World",
|
||||
/*name_plural*/ "worlds",
|
||||
/*name_plural*/ N_("worlds"),
|
||||
/*translation_context*/ BLT_I18NCONTEXT_ID_WORLD,
|
||||
/*flags*/ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
|
||||
/*asset_type_info*/ nullptr,
|
||||
|
|
|
@ -179,6 +179,8 @@ void copy_group_to_group(OffsetIndices<int> src_offsets,
|
|||
void count_indices(Span<int> indices, MutableSpan<int> counts);
|
||||
|
||||
void invert_booleans(MutableSpan<bool> span);
|
||||
void invert_booleans(MutableSpan<bool> span, const IndexMask &mask);
|
||||
|
||||
int64_t count_booleans(const VArray<bool> &varray);
|
||||
|
||||
enum class BooleanMix {
|
||||
|
|
|
@ -405,6 +405,15 @@ template<typename T>
|
|||
[[nodiscard]] MatBase<T, 4, 4> orthographic(
|
||||
T left, T right, T bottom, T top, T near_clip, T far_clip);
|
||||
|
||||
/**
|
||||
* \brief Create an orthographic projection matrix using OpenGL coordinate convention:
|
||||
* Maps each axis range to [-1..1] range for all axes except Z.
|
||||
* The Z axis is collapsed to 0 which eliminates the depth component. So it cannot be used with
|
||||
* depth testing.
|
||||
* The resulting matrix can be used with either #project_point or #transform_point.
|
||||
*/
|
||||
template<typename T> MatBase<T, 4, 4> orthographic_infinite(T left, T right, T bottom, T top);
|
||||
|
||||
/**
|
||||
* \brief Create a perspective projection matrix using OpenGL coordinate convention:
|
||||
* Maps each axis range to [-1..1] range for all axes.
|
||||
|
@ -425,6 +434,16 @@ template<typename T>
|
|||
[[nodiscard]] MatBase<T, 4, 4> perspective_fov(
|
||||
T angle_left, T angle_right, T angle_bottom, T angle_top, T near_clip, T far_clip);
|
||||
|
||||
/**
|
||||
* \brief Create a perspective projection matrix using OpenGL coordinate convention:
|
||||
* Maps each axis range to [-1..1] range for all axes except for the Z where [near_clip..inf] is
|
||||
* mapped to [-1..1].
|
||||
* `left`, `right`, `bottom`, `top` are frustum side distances at `z=near_clip`.
|
||||
* The resulting matrix can be used with #project_point.
|
||||
*/
|
||||
template<typename T>
|
||||
[[nodiscard]] MatBase<T, 4, 4> perspective_infinite(T left, T right, T bottom, T top, T near_clip);
|
||||
|
||||
} // namespace projection
|
||||
|
||||
/** \} */
|
||||
|
@ -1554,6 +1573,23 @@ MatBase<T, 4, 4> orthographic(T left, T right, T bottom, T top, T near_clip, T f
|
|||
return mat;
|
||||
}
|
||||
|
||||
template<typename T> MatBase<T, 4, 4> orthographic_infinite(T left, T right, T bottom, T top)
|
||||
{
|
||||
const T x_delta = right - left;
|
||||
const T y_delta = top - bottom;
|
||||
|
||||
MatBase<T, 4, 4> mat = MatBase<T, 4, 4>::identity();
|
||||
if (x_delta != 0 && y_delta != 0) {
|
||||
mat[0][0] = T(2.0) / x_delta;
|
||||
mat[3][0] = -(right + left) / x_delta;
|
||||
mat[1][1] = T(2.0) / y_delta;
|
||||
mat[3][1] = -(top + bottom) / y_delta;
|
||||
mat[2][2] = 0.0f;
|
||||
mat[3][2] = 0.0f;
|
||||
}
|
||||
return mat;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
MatBase<T, 4, 4> perspective(T left, T right, T bottom, T top, T near_clip, T far_clip)
|
||||
{
|
||||
|
@ -1575,6 +1611,29 @@ MatBase<T, 4, 4> perspective(T left, T right, T bottom, T top, T near_clip, T fa
|
|||
return mat;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
MatBase<T, 4, 4> perspective_infinite(T left, T right, T bottom, T top, T near_clip)
|
||||
{
|
||||
const T x_delta = right - left;
|
||||
const T y_delta = top - bottom;
|
||||
|
||||
/* From "Projection Matrix Tricks" by Eric Lengyel GDC 2007. */
|
||||
MatBase<T, 4, 4> mat = MatBase<T, 4, 4>::identity();
|
||||
if (x_delta != 0 && y_delta != 0) {
|
||||
mat[0][0] = near_clip * T(2.0) / x_delta;
|
||||
mat[1][1] = near_clip * T(2.0) / y_delta;
|
||||
mat[2][0] = (right + left) / x_delta; /* NOTE: negate Z. */
|
||||
mat[2][1] = (top + bottom) / y_delta;
|
||||
/* Page 17. Choosing an epsilon for 32 bit floating-point precision. */
|
||||
constexpr float eps = 2.4e-7f;
|
||||
mat[2][2] = -1.0f;
|
||||
mat[2][3] = (eps - 1.0f);
|
||||
mat[3][2] = (eps - 2.0f) * near_clip;
|
||||
mat[3][3] = 0.0f;
|
||||
}
|
||||
return mat;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]] MatBase<T, 4, 4> perspective_fov(
|
||||
T angle_left, T angle_right, T angle_bottom, T angle_top, T near_clip, T far_clip)
|
||||
|
|
|
@ -44,6 +44,17 @@ struct RecentCache {
|
|||
Map<std::string, int> logical_time_by_str;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sometimes every search item has multiple parts. For example, when using menu search, each nested
|
||||
* menu is a separate part. Usually, one of those parts is highlighted in the UI and should be
|
||||
* prioritized in the search.
|
||||
*/
|
||||
enum class MainWordsHeuristic {
|
||||
FirstGroup,
|
||||
LastGroup,
|
||||
All,
|
||||
};
|
||||
|
||||
/**
|
||||
* Non templated base class so that its methods can be implemented outside of this header.
|
||||
*/
|
||||
|
@ -52,6 +63,7 @@ class StringSearchBase {
|
|||
LinearAllocator<> allocator_;
|
||||
Vector<SearchItem> items_;
|
||||
const RecentCache *recent_cache_ = nullptr;
|
||||
MainWordsHeuristic main_words_heuristic_;
|
||||
|
||||
protected:
|
||||
void add_impl(StringRef str, void *user_data, int weight);
|
||||
|
@ -70,9 +82,10 @@ class StringSearchBase {
|
|||
*/
|
||||
template<typename T> class StringSearch : private StringSearchBase {
|
||||
public:
|
||||
StringSearch(const RecentCache *recent_cache = nullptr)
|
||||
StringSearch(const RecentCache *recent_cache, const MainWordsHeuristic main_words_heuristic)
|
||||
{
|
||||
this->recent_cache_ = recent_cache;
|
||||
recent_cache_ = recent_cache;
|
||||
main_words_heuristic_ = main_words_heuristic;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
#include "BLI_compiler_attrs.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct ListBase;
|
||||
|
||||
typedef bool (*UniquenameCheckCallback)(void *arg, const char *name);
|
||||
|
@ -150,9 +146,8 @@ size_t BLI_string_flip_side_name(char *name_dst,
|
|||
* \param delim: Delimits numeric suffix in name
|
||||
* \param name: Name to be ensured unique
|
||||
* \param name_maxncpy: Maximum length of name area
|
||||
* \return true if there if the name was changed
|
||||
*/
|
||||
bool BLI_uniquename_cb(UniquenameCheckCallback unique_check,
|
||||
void BLI_uniquename_cb(UniquenameCheckCallback unique_check,
|
||||
void *arg,
|
||||
const char *defname,
|
||||
char delim,
|
||||
|
@ -169,7 +164,7 @@ bool BLI_uniquename_cb(UniquenameCheckCallback unique_check,
|
|||
* \param name_offset: Offset of name within block structure
|
||||
* \param name_maxncpy: Maximum length of name area
|
||||
*/
|
||||
bool BLI_uniquename(struct ListBase *list,
|
||||
void BLI_uniquename(struct ListBase *list,
|
||||
void *vlink,
|
||||
const char *defname,
|
||||
char delim,
|
||||
|
@ -532,7 +527,3 @@ BLI_INLINE char *_BLI_string_join_by_sep_charN_11(_BLI_STRING_ARGS_10)
|
|||
/** \} */
|
||||
|
||||
#undef _BLI_STRING_ARGS_0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -26,7 +26,7 @@ set(SRC
|
|||
intern/BLI_color.cc
|
||||
intern/BLI_dial_2d.c
|
||||
intern/BLI_dynstr.c
|
||||
intern/BLI_filelist.c
|
||||
intern/BLI_filelist.cc
|
||||
intern/BLI_ghash.c
|
||||
intern/BLI_ghash_utils.c
|
||||
intern/BLI_heap.c
|
||||
|
@ -61,11 +61,11 @@ set(SRC
|
|||
intern/cpp_types.cc
|
||||
intern/delaunay_2d.cc
|
||||
intern/dot_export.cc
|
||||
intern/dynlib.c
|
||||
intern/dynlib.cc
|
||||
intern/easing.c
|
||||
intern/endian_switch.c
|
||||
intern/expr_pylike_eval.c
|
||||
intern/fileops.c
|
||||
intern/fileops_c.cc
|
||||
intern/fileops.cc
|
||||
intern/filereader_file.c
|
||||
intern/filereader_gzip.c
|
||||
|
@ -120,7 +120,7 @@ set(SRC
|
|||
intern/noise.c
|
||||
intern/noise.cc
|
||||
intern/offset_indices.cc
|
||||
intern/path_util.c
|
||||
intern/path_util.cc
|
||||
intern/polyfill_2d.c
|
||||
intern/polyfill_2d_beautify.c
|
||||
intern/quadric.c
|
||||
|
@ -136,13 +136,13 @@ set(SRC
|
|||
intern/sort.c
|
||||
intern/sort_utils.c
|
||||
intern/stack.c
|
||||
intern/storage.c
|
||||
intern/storage.cc
|
||||
intern/string.c
|
||||
intern/string_cursor_utf8.c
|
||||
intern/string_ref.cc
|
||||
intern/string_search.cc
|
||||
intern/string_utf8.c
|
||||
intern/string_utils.c
|
||||
intern/string_utf8.cc
|
||||
intern/string_utils.cc
|
||||
intern/system.c
|
||||
intern/task_graph.cc
|
||||
intern/task_iterator.c
|
||||
|
@ -160,8 +160,8 @@ set(SRC
|
|||
intern/virtual_array.cc
|
||||
intern/voronoi_2d.c
|
||||
intern/voxel.c
|
||||
intern/winstuff.c
|
||||
intern/winstuff_dir.c
|
||||
intern/winstuff.cc
|
||||
intern/winstuff_dir.cc
|
||||
|
||||
# Private headers.
|
||||
intern/BLI_mempool_private.h
|
||||
|
@ -354,7 +354,7 @@ set(SRC
|
|||
BLI_string_search.hh
|
||||
BLI_string_utf8.h
|
||||
BLI_string_utf8_symbols.h
|
||||
BLI_string_utils.h
|
||||
BLI_string_utils.hh
|
||||
BLI_sub_frame.hh
|
||||
BLI_sys_types.h
|
||||
BLI_system.h
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#ifdef WIN32
|
||||
# include "BLI_winstuff.h"
|
||||
# include "utfconv.h"
|
||||
# include "utfconv.hh"
|
||||
# include <direct.h>
|
||||
# include <io.h>
|
||||
#else
|
||||
|
@ -40,7 +40,7 @@
|
|||
#include "BLI_listbase.h"
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
|
||||
#include "../imbuf/IMB_imbuf.h"
|
||||
|
||||
|
@ -241,7 +241,7 @@ uint BLI_filelist_dir_contents(const char *dirname, struct direntry **r_filelist
|
|||
else {
|
||||
/* Keep Blender happy. Blender stores this in a variable
|
||||
* where 0 has special meaning..... */
|
||||
*r_filelist = MEM_mallocN(sizeof(**r_filelist), __func__);
|
||||
*r_filelist = static_cast<direntry *>(MEM_mallocN(sizeof(**r_filelist), __func__));
|
||||
}
|
||||
|
||||
return dir_ctx.files_num;
|
||||
|
@ -250,7 +250,7 @@ uint BLI_filelist_dir_contents(const char *dirname, struct direntry **r_filelist
|
|||
void BLI_filelist_entry_size_to_string(const struct stat *st,
|
||||
const uint64_t st_size_fallback,
|
||||
/* Used to change MB -> M, etc. - is that really useful? */
|
||||
const bool UNUSED(compact),
|
||||
const bool /*compact*/,
|
||||
char r_size[FILELIST_DIRENTRY_SIZE_LEN])
|
||||
{
|
||||
/*
|
||||
|
@ -267,7 +267,7 @@ void BLI_filelist_entry_size_to_string(const struct stat *st,
|
|||
}
|
||||
|
||||
void BLI_filelist_entry_mode_to_string(const struct stat *st,
|
||||
const bool UNUSED(compact),
|
||||
const bool /*compact*/,
|
||||
char r_mode1[FILELIST_DIRENTRY_MODE_LEN],
|
||||
char r_mode2[FILELIST_DIRENTRY_MODE_LEN],
|
||||
char r_mode3[FILELIST_DIRENTRY_MODE_LEN])
|
||||
|
@ -315,7 +315,7 @@ void BLI_filelist_entry_mode_to_string(const struct stat *st,
|
|||
}
|
||||
|
||||
void BLI_filelist_entry_owner_to_string(const struct stat *st,
|
||||
const bool UNUSED(compact),
|
||||
const bool /*compact*/,
|
||||
char r_owner[FILELIST_DIRENTRY_OWNER_LEN])
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
@ -399,10 +399,10 @@ void BLI_filelist_entry_duplicate(struct direntry *dst, const struct direntry *s
|
|||
{
|
||||
*dst = *src;
|
||||
if (dst->relname) {
|
||||
dst->relname = MEM_dupallocN(src->relname);
|
||||
dst->relname = static_cast<char *>(MEM_dupallocN(src->relname));
|
||||
}
|
||||
if (dst->path) {
|
||||
dst->path = MEM_dupallocN(src->path);
|
||||
dst->path = static_cast<char *>(MEM_dupallocN(src->path));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,8 @@ void BLI_filelist_duplicate(struct direntry **dest_filelist,
|
|||
{
|
||||
uint i;
|
||||
|
||||
*dest_filelist = MEM_mallocN(sizeof(**dest_filelist) * (size_t)(nrentries), __func__);
|
||||
*dest_filelist = static_cast<struct direntry *>(
|
||||
MEM_mallocN(sizeof(**dest_filelist) * (size_t)(nrentries), __func__));
|
||||
for (i = 0; i < nrentries; i++) {
|
||||
struct direntry *const src = &src_filelist[i];
|
||||
struct direntry *dst = &(*dest_filelist)[i];
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue