mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
parent
efcd69f7d4
commit
04e447eeba
28 changed files with 50 additions and 50 deletions
|
|
@ -5,10 +5,10 @@
|
|||
/* Typed SVM node parameter structs.
|
||||
*
|
||||
* Each struct defines the named parameters for one SVM node type, with a memory
|
||||
* layout that directly matches the SVM bytecode stream. No encoding or decoding
|
||||
* is needed - the struct is read directly from the bytecode via pointer cast.
|
||||
* layout that directly matches the SVM byte-code stream. No encoding or decoding
|
||||
* is needed - the struct is read directly from the byte-code via pointer cast.
|
||||
*
|
||||
* Structs must be a multiple of sizeof(uint) since the bytecode stream is
|
||||
* Structs must be a multiple of sizeof(uint) since the byte-code stream is
|
||||
* stored as an array of uint.
|
||||
*
|
||||
* - Kernel side: use svm_node_get<T>() to get a reference into the stream.
|
||||
|
|
|
|||
|
|
@ -190,9 +190,9 @@ ccl_device_inline bool stack_valid(const uint a)
|
|||
|
||||
/* Reading Nodes */
|
||||
|
||||
/* Read a typed node struct directly from the SVM bytecode stream. The struct T must be a
|
||||
* multiple of sizeof(uint) and its memory layout must match the bytecode encoding. Returns
|
||||
* a const reference into the bytecode array and advances the offset past the struct. */
|
||||
/* Read a typed node struct directly from the SVM byte-code stream. The struct T must be a
|
||||
* multiple of sizeof(uint) and its memory layout must match the byte-code encoding. Returns
|
||||
* a const reference into the byte-code array and advances the offset past the struct. */
|
||||
template<typename T>
|
||||
ccl_device_inline const ccl_global T &svm_node_get(KernelGlobals kg, ccl_private int *const offset)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Attribute::Attribute(ustring name,
|
|||
{
|
||||
assert((element & ATTR_ELEMENT_VOXEL) == 0);
|
||||
buffer = data;
|
||||
/* Implicit sharing function pointers should be set if shared attribtues are created. */
|
||||
/* Implicit sharing function pointers should be set if shared attributes are created. */
|
||||
assert(g_implicit_sharing_user_add_fn);
|
||||
assert(g_implicit_sharing_user_remove_fn);
|
||||
g_implicit_sharing_user_add_fn(sharing_info);
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ bool GeometryManager::displace(Device *device, Scene *scene, Mesh *mesh, Progres
|
|||
}
|
||||
|
||||
/* Corner normals for sharp edges and faces should be preserved, but we can not
|
||||
* individually dispace corners as the mesh would break apart. Instead we
|
||||
* individually displace corners as the mesh would break apart. Instead we
|
||||
* compute the delta between vertex normals before and after displacement and
|
||||
* apply the delta to corner normals. */
|
||||
bool need_recompute_vertex_normals = false;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ def write(catalogs: list[api_models.CatalogV1], catalog_filepath: Path,
|
|||
# TODO: this really should be using an RNA API.
|
||||
|
||||
# Sanitize the library name, as it should not contain any newlines for the Asset Catalog Definition File to be
|
||||
# valid. To be on the safe side, just collapse all whitespace to spaces. Same for colons, those are used as field
|
||||
# valid. To be on the safe side, just collapse all white-space to spaces. Same for colons, those are used as field
|
||||
# separators and shouldn't be included in any of the fields themselves.
|
||||
unwanted_chars_re = re.compile(r'[\s:]+')
|
||||
lib_name = unwanted_chars_re.sub(' ', asset_library_meta.name)
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ void BKE_action_fix_paths_rename(struct ID *owner_id,
|
|||
/**
|
||||
* Fix all the paths for the given ID+AnimData
|
||||
*
|
||||
* \param old_infix,new_infix The path secion immediately following the `prefix`. If
|
||||
* \param old_infix,new_infix The path section immediately following the `prefix`. If
|
||||
* `infix_is_name` is true, this is processed as a name..
|
||||
*
|
||||
* \param infix_is_name If true, old_infix and new_infix are treated as names and padded with
|
||||
|
|
@ -175,7 +175,7 @@ void BKE_animdata_fix_paths_rename(struct ID *owner_id,
|
|||
/**
|
||||
* Fix all RNA-Paths throughout the database (directly access the #Global.main version).
|
||||
*
|
||||
* \param old_infix,new_infix The path secion immediately following the `prefix`. If
|
||||
* \param old_infix,new_infix The path section immediately following the `prefix`. If
|
||||
* `infix_is_name` is true, this is processed as a name.
|
||||
*
|
||||
* \param infix_is_name If true, old_infix and new_infix are treated as names and padded with
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ struct BKEIDDeleteOptions {
|
|||
|
||||
/**
|
||||
* If `true`, do not validate and update liboverride hierarchy root pointers after deleting some
|
||||
* IDs. Usefull e.g. for ID deletion within liboverride resync process and the like.
|
||||
* IDs. Useful e.g. for ID deletion within liboverride resync process and the like.
|
||||
*/
|
||||
bool prevent_liboverride_hierarchy_root_ensure = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1569,7 +1569,7 @@ static void save_sample_line(Scopes *scopes,
|
|||
&scopes->vecscope_rgb[color_idx + 1],
|
||||
&scopes->vecscope_rgb[color_idx + 2]);
|
||||
|
||||
/* Compute color in framebuffer colorspace. */
|
||||
/* Compute color in frame-buffer color-space. */
|
||||
if (cm_processor_colors) {
|
||||
cm_processor_colors->apply_v3(&scopes->vecscope_rgb[color_idx + 0]);
|
||||
}
|
||||
|
|
@ -1687,11 +1687,11 @@ struct ScopesUpdateData {
|
|||
const ImBuf *ibuf;
|
||||
/** Processor for scope positions (scope space). */
|
||||
ColormanageProcessor *cm_processor_positions;
|
||||
/** Processor for scope display colors (framebuffer color space). */
|
||||
/** Processor for scope display colors (frame-buffer color space). */
|
||||
ColormanageProcessor *cm_processor_colors;
|
||||
/** Luminance coefficients matching the scope display gamut. */
|
||||
float3 luma_coefficients;
|
||||
/** RGB to YCbCr matrix for the vectorscope. */
|
||||
/** RGB to YCbCr matrix for the vector-scope. */
|
||||
float3x3 yuv_matrix;
|
||||
const float *float_data;
|
||||
const uchar *byte_data;
|
||||
|
|
|
|||
|
|
@ -72,14 +72,14 @@ static void version_geometry_nodes_properties(FileData &fd,
|
|||
return;
|
||||
}
|
||||
if (ID_MISSING(&nmd.node_group->id)) {
|
||||
/* Keeping the old idproperties is not an option, and not really usefull, since if the
|
||||
* blendfile is saved in this current state, it won't be re-versionned here later anyway.
|
||||
/* Keeping the old idproperties is not an option, and not really useful, since if the
|
||||
* blend-file is saved in this current state, it won't be re-versioned here later anyway.
|
||||
*
|
||||
* Furthermore, the whole remaining part of the code expects this to be nullptr, and keeping it
|
||||
* at runtime actually causes weird issues in depsgraph nodes building phase.
|
||||
*
|
||||
* So all in all, it's simpler and safer to also just lose these values here - if file is not
|
||||
* saved in this state, next loading will do the versionning if the nodegroup is available
|
||||
* saved in this state, next loading will do the versioning if the node-group is available
|
||||
* again, otherwise that data is lost.
|
||||
*/
|
||||
IDP_FreeProperty(nmd.settings_legacy.properties);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ struct WriteDataStableAddressIDs {
|
|||
* can't determine if a pointer is local or not.
|
||||
*
|
||||
* Note that in undo (memfile) case, this set is _not_ reset after every ID writing, to ensure
|
||||
* that all generated address ids remain unique across a whole blenfile writing operation.
|
||||
* that all generated address ids remain unique across a whole blend-file writing operation.
|
||||
*/
|
||||
Set<uint64_t> used_ids;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -251,8 +251,8 @@ struct SphereProbeEval {
|
|||
[[legacy_info]] ShaderCreateInfo eevee_volume_probe_data;
|
||||
};
|
||||
|
||||
/* Sphere probe evaluate everything as diffuse since they can only rely on volume lightprobes being
|
||||
* available. */
|
||||
/* Sphere probe evaluate everything as diffuse since they can only rely on volume light-probes
|
||||
* being available. */
|
||||
[[fragment, early_fragment_tests]]
|
||||
void sphere_eval_frag([[resource_table]] SphereProbeEval &srt,
|
||||
[[frag_coord]] const float4 frag_co,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ SHADER_LIBRARY_CREATE_INFO(eevee_light_data)
|
|||
# define LIGHT_CLOSURE_EVAL_COUNT 3
|
||||
#endif
|
||||
|
||||
/* For forward compat until everything is ported to BSL. */
|
||||
/* For forward compatibility until everything is ported to BSL. */
|
||||
#ifdef SRT_CONSTANT_light_closure_eval_count
|
||||
# define LIGHT_CLOSURE_EVAL_COUNT SRT_CONSTANT_light_closure_eval_count
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/**
|
||||
* Raytracing denoising pipeline.
|
||||
* Ray-tracing denoising pipeline.
|
||||
*
|
||||
* Following "Stochastic All The Things: Raytracing in Hybrid Real-Time Rendering"
|
||||
* by Tomasz Stachowiak
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ void tag_update_frag([[resource_table]] Tiles &tiles,
|
|||
/* Tag only LOD0. The lower LOD will be written by the tag_propagate pass. */
|
||||
int tile_index = shadow_tile_offset(texel, tilemap.tiles_index, 0);
|
||||
/* Tag using a transient flag that allows to differentiate new updates (to be propagated to LODs)
|
||||
* from the existing persitent flag SHADOW_DO_UPDATE. */
|
||||
* from the existing persistent flag SHADOW_DO_UPDATE. */
|
||||
atomicOr(tiles.tiles_buf[tile_index], uint(SHADOW_TAG_UPDATE));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -658,12 +658,12 @@ struct Layout : public Item, NonCopyable, NonMovable {
|
|||
int icon);
|
||||
|
||||
/**
|
||||
* Adds a string property item as textbox, this will let multiline text editing, textbox state
|
||||
* Adds a string property item as textbox, this will let multi-line text editing, textbox state
|
||||
* will be persistent at runtime.
|
||||
*/
|
||||
void textbox(const bContext *C, PointerRNA *ptr, StringRefNull propname);
|
||||
/**
|
||||
* Adds a string property item as textbox, this will let multiline text editing.
|
||||
* Adds a string property item as textbox, this will let multi-line text editing.
|
||||
* \param textbox_state: custom allocation for persistent textbox state.
|
||||
*/
|
||||
void textbox_with_state(PointerRNA *ptr, StringRefNull propname, TextboxState *textbox_state);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void textbox_textedit_set_cursor_pos(ButtonTextBox *textbox,
|
|||
const ARegion *region,
|
||||
const float2 xy);
|
||||
|
||||
/** Returns the index of the which containings the string offset. */
|
||||
/** Returns the index of the line which contains the string offset. */
|
||||
int textbox_wrapped_line_index_from_char_offset(Span<StringRef> lines, int offset);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -230,13 +230,13 @@ enum HandleButtonState {
|
|||
BUTTON_STATE_TEXT_EDITING,
|
||||
BUTTON_STATE_TEXT_SELECTING,
|
||||
/**
|
||||
* State for textbox scroll with scrollbar, can be activated when textbox is
|
||||
* State for text-box scroll with scroll-bar, can be activated when text-box is
|
||||
* #BUTTON_STATE_TEXT_EDITING or #BUTTON_STATE_HIGHLIGHT, this state reverts back previous state
|
||||
* when finished.
|
||||
*/
|
||||
BUTTON_STATE_TEXTBOX_SCROLLING,
|
||||
/**
|
||||
* State for resizing textbox with a custom grip, can be activated when textbox is
|
||||
* State for resizing text-box with a custom grip, can be activated when text-box is
|
||||
* #BUTTON_STATE_TEXT_EDITING or #BUTTON_STATE_HIGHLIGHT, this state reverts back previous state
|
||||
* when finished.
|
||||
*/
|
||||
|
|
@ -5236,9 +5236,9 @@ static int do_but_TEX(
|
|||
HandleButtonData *data = but->active;
|
||||
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
|
||||
if (event->type == LEFTMOUSE && but->type == ButtonType::TextBox) {
|
||||
/* Texbox buttons allows to scroll its content even when they are not in text-edit
|
||||
/* Text-box buttons allows to scroll its content even when they are not in text-edit
|
||||
* state, let the user to place the text cursor under the mouse and to immediately
|
||||
* start selecting text without requiring to activate the textbox with an extra click.
|
||||
* start selecting text without requiring to activate the text-box with an extra click.
|
||||
*/
|
||||
textedit_set_cursor_pos(but, data->region, float2(event->xy));
|
||||
but->selsta = but->selend = data->text_edit.sel_pos_init = but->pos;
|
||||
|
|
@ -5288,7 +5288,7 @@ static int do_but_TEXTBOX(bContext *C,
|
|||
rctf rect;
|
||||
block_to_window_rctf(data->region, block, &rect, &textbox->rect);
|
||||
|
||||
/* Try activate textbox scrollbar. */
|
||||
/* Try activate text-box scroll-bar. */
|
||||
rctf scroll_rect = rect;
|
||||
scroll_rect.xmin = rect.xmax - button_text_padding(textbox);
|
||||
scroll_rect.ymin += textbox_padding_bottom() / block->aspect;
|
||||
|
|
@ -5306,7 +5306,7 @@ static int do_but_TEXTBOX(bContext *C,
|
|||
return WM_UI_HANDLER_BREAK;
|
||||
}
|
||||
|
||||
/* Try activate textbox grip button. */
|
||||
/* Try activate text-box grip button. */
|
||||
rctf grip_rect = rect;
|
||||
grip_rect.ymax = grip_rect.ymin + textbox_grip_height() / block->aspect;
|
||||
|
||||
|
|
@ -9508,7 +9508,7 @@ static void button_activate_init(bContext *C,
|
|||
const bool horizontal = (BLI_rctf_size_x(&but->rect) < BLI_rctf_size_y(&but->rect));
|
||||
WM_cursor_modal_set(data->window, horizontal ? WM_CURSOR_X_MOVE : WM_CURSOR_Y_MOVE);
|
||||
}
|
||||
/* Texbox buttons allows to select text activation, show text edit cursor when hovering. */
|
||||
/* Text-box buttons allows to select text activation, show text edit cursor when hovering. */
|
||||
if (but->type == ButtonType::TextBox) {
|
||||
WM_cursor_modal_set(data->window, WM_CURSOR_TEXT_EDIT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ struct TextWrapCache {
|
|||
/** Derived struct for #ButtonType::TextBox */
|
||||
struct ButtonTextBox : public Button {
|
||||
|
||||
/** Total number of wrapped lines in the last textbox redraw/event handling. */
|
||||
/** Total number of wrapped lines in the last text-box redraw/event handling. */
|
||||
int last_total_lines = 0;
|
||||
|
||||
TextboxState *state;
|
||||
|
|
|
|||
|
|
@ -2779,7 +2779,7 @@ void Layout::textbox_with_state(PointerRNA *ptr,
|
|||
|
||||
const float line_heigth = fontstyle_height_max(UI_FSTYLE_WIDGET);
|
||||
|
||||
/** Ensure minumun value is set. */
|
||||
/** Ensure minimum value is set. */
|
||||
textbox_state->visible_lines = std::max(textbox_state->visible_lines,
|
||||
textbox_minimum_visible_lines);
|
||||
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ static void buttons_area_listener(const wmSpaceTypeListenerParams *params)
|
|||
case ND_RENDER_RESULT:
|
||||
break;
|
||||
case ND_NODES:
|
||||
/* For the compositior strip modifier interface. */
|
||||
/* For the compositor strip modifier interface. */
|
||||
buttons_area_redraw(area, BCONTEXT_STRIP_MODIFIER);
|
||||
break;
|
||||
case ND_SEQUENCER:
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ rctf SEQ_view_frame_fit(const SpaceSeq *sseq, const ARegion *region, rctf v2d_re
|
|||
const float region_h = std::max(float(BLI_rcti_size_y(®ion->winrct)), 1.0f);
|
||||
|
||||
if (sseq->mainb == SEQ_DRAW_IMG_VECTORSCOPE) {
|
||||
/* The vectorscope circle uses min(width, height) as its diameter.
|
||||
/* The vector-scope circle uses min(width, height) as its diameter.
|
||||
* Adjust the framing to match the region aspect ratio so the circle
|
||||
* fits tightly regardless of whether the region is wide or tall. */
|
||||
const float region_aspect = region_w / region_h;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
/** \file
|
||||
* \ingroup edtransform
|
||||
*
|
||||
* Used to apply 90 degree rotations directly, without imprecisions from radian angles,
|
||||
* Used to apply 90 degree rotations directly, without imprecision from radian angles,
|
||||
* see #150900.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ void SourceProcessor::lower_templates(Parser &parser)
|
|||
* This holds true for instanciated struct templates. */
|
||||
parser().foreach_struct([&](Token, Scope, Token, Scope body) {
|
||||
body.foreach_match("t<..>", [&](const vector<Token> &toks) {
|
||||
/* Sincte this can be an instanciated struct, we need to make sure to instanciate its own
|
||||
/* Since this can be an instanciated struct, we need to make sure to instanciate its own
|
||||
* methods. Hence the need to parse the definition. */
|
||||
TemplateDefinition template_def = parse_template_definition(
|
||||
parser, toks[0], true, toks[0].scope(), filepath_);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ float linear_to_extended_srgb(float c)
|
|||
}
|
||||
|
||||
/* Convert from scope space color (that is suitable for plotting positions)
|
||||
* to extended sRGB (the color space of the framebuffer). */
|
||||
* to extended sRGB (the color space of the frame-buffer). */
|
||||
float3 scope_to_extended_srgb(float3 color)
|
||||
{
|
||||
float3 scope_linear = float3(scope_to_linear(max(color.r, 0.0f)),
|
||||
|
|
@ -95,7 +95,7 @@ void main()
|
|||
color_alpha_unpremultiply(image_color, image_color);
|
||||
}
|
||||
|
||||
/* Convert scope space image color to position and framebuffer color. */
|
||||
/* Convert scope space image color to position and frame-buffer color. */
|
||||
float3 position = clamp(image_color.rgb, 0.0f, 1.0f);
|
||||
float4 color = float4(scope_to_extended_srgb(image_color.rgb), 1.0f);
|
||||
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ bool IMB_colormanagement_display_support_emulation(
|
|||
/** Max luminance of the view transform, or 0 if no maximum found. */
|
||||
int IMB_colormanagement_view_max_nits(const char *display_name, const char *view_name);
|
||||
|
||||
/** Get scope display info for waveform/parade/vectorscope. */
|
||||
/** Get scope display info for waveform/parade/vector-scope. */
|
||||
ocio::ScopeInfo IMB_colormanagement_get_scope_info(
|
||||
const ColorManagedDisplaySettings *display_settings, const char *view_name);
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ const ScopeInfo &LibOCIOView::scope_info() const
|
|||
scope_info_->sdr_white_level = SCOPE_SDR_IN_HDR_SCOPE;
|
||||
|
||||
/* HDR: graticules at logarithmic nit values. */
|
||||
Vector<int> nit_values = {0, 18 /* midlde gray */, 100};
|
||||
Vector<int> nit_values = {0, 18 /* middle gray */, 100};
|
||||
const int max_nits = (scope_info_->view_transform_max_nits) ?
|
||||
scope_info_->view_transform_max_nits :
|
||||
1000;
|
||||
|
|
|
|||
|
|
@ -191,8 +191,8 @@ static void ensure_root_prim(pxr::UsdStageRefPtr stage, const USDExportParams &p
|
|||
xf_api.SetRotate(pxr::GfVec3f(eul.x().degree(), eul.y().degree(), eul.z().degree()));
|
||||
}
|
||||
|
||||
/* Colorspace on the root prim. It's also applied on all individual prims that need
|
||||
* it, but perhaps this is useful to signal the overall colorspace of the file. */
|
||||
/* Color-space on the root prim. It's also applied on all individual prims that need
|
||||
* it, but perhaps this is useful to signal the overall color-space of the file. */
|
||||
colorspace_apply_to_prim(root_xf.GetPrim());
|
||||
|
||||
for (const auto &path : pxr::SdfPath(params.root_prim_path).GetPrefixes()) {
|
||||
|
|
|
|||
|
|
@ -1952,8 +1952,8 @@ static bool rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr)
|
|||
if (win != nullptr) {
|
||||
Scene *scene = WM_window_get_active_scene(win);
|
||||
ViewLayer *view_layer = WM_window_get_active_view_layer(win);
|
||||
/* FIXME Using G_MAIN is weak, but should work in practrice given current context (code already
|
||||
* relies on 'G_MAIN data'). */
|
||||
/* FIXME Using G_MAIN is weak, but should work in practice given current context
|
||||
* (code already relies on 'G_MAIN data'). */
|
||||
BKE_view_layer_synced_ensure(*G_MAIN, scene, view_layer);
|
||||
obedit = BKE_view_layer_edit_object_get(view_layer);
|
||||
}
|
||||
|
|
@ -1969,8 +1969,8 @@ static bool rna_SpaceImageEditor_show_maskedit_get(PointerRNA *ptr)
|
|||
if (win != nullptr) {
|
||||
Scene *scene = WM_window_get_active_scene(win);
|
||||
ViewLayer *view_layer = WM_window_get_active_view_layer(win);
|
||||
/* FIXME Using G_MAIN is weak, but should work in practrice given current context (code already
|
||||
* relies on 'G_MAIN data'). */
|
||||
/* FIXME Using G_MAIN is weak, but should work in practice given current context
|
||||
* (code already relies on 'G_MAIN data'). */
|
||||
BKE_view_layer_synced_ensure(*G_MAIN, scene, view_layer);
|
||||
obedit = BKE_view_layer_edit_object_get(view_layer);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue