Cleanup: spelling in comments, correct comment block formatting
Also use doxygen comments more consistently.
This commit is contained in:
@@ -45,7 +45,7 @@ class GraphicsInteropBuffer {
|
||||
GraphicsInteropDevice::Type type = GraphicsInteropDevice::NONE;
|
||||
int64_t handle = 0;
|
||||
|
||||
/* Actual size of the memory, which must be >= width * height sizeof(half4). */
|
||||
/* Actual size of the memory, which must be `>= width * height sizeof(half4)`. */
|
||||
size_t size = 0;
|
||||
|
||||
/* Clear the entire buffer before doing partial write to it. */
|
||||
|
||||
@@ -111,8 +111,8 @@ ccl_device_inline float3 transform_perspective_direction(const ccl_private Proje
|
||||
return c;
|
||||
}
|
||||
|
||||
/* Applies transform t to point a with given derivatives da/dx and da/dy.
|
||||
* Returns t(a) and sets out_dx/dy to the values of dt(a)/dx and dt(a)/dy, respectively. */
|
||||
/* Applies transform t to point a with given derivatives `da/dx` and `da/dy`.
|
||||
* Returns t(a) and sets `out_dx/dy` to the values of `dt(a)/dx` and `dt(a)/dy`, respectively. */
|
||||
ccl_device_inline float3 transform_perspective_deriv(const ccl_private ProjectionTransform *t,
|
||||
const float3 a,
|
||||
const float3 dx,
|
||||
|
||||
@@ -2110,10 +2110,10 @@ void Channelbag::fcurves_clear()
|
||||
|
||||
static void cyclic_keying_ensure_modifier(FCurve &fcurve)
|
||||
{
|
||||
/* BKE_fcurve_get_cycle_type() only looks at the first modifier to see if it's a Cycle modifier,
|
||||
/* #BKE_fcurve_get_cycle_type() only looks at the first modifier to see if it's a Cycle modifier,
|
||||
* so if we're going to add one, better make sure it's the first one.
|
||||
|
||||
* BUT: add_fmodifier() only allows adding a Cycle modifier when there are none yet, so that's
|
||||
*
|
||||
* BUT: #add_fmodifier() only allows adding a Cycle modifier when there are none yet, so that's
|
||||
* all that we need to check for here.
|
||||
*/
|
||||
if (!BLI_listbase_is_empty(&fcurve.modifiers)) {
|
||||
|
||||
@@ -677,7 +677,7 @@ TEST_F(ActionLayersTest, slot_identifier_ensure_prefix)
|
||||
slot.identifier_ensure_prefix();
|
||||
EXPECT_STREQ("XXSlot", slot.identifier);
|
||||
|
||||
/* idtype CA, default name. */
|
||||
/* idtype CA, default name. */
|
||||
slot.idtype = ID_CA;
|
||||
slot.identifier_ensure_prefix();
|
||||
EXPECT_STREQ("CASlot", slot.identifier);
|
||||
@@ -867,8 +867,8 @@ TEST_F(ActionLayersTest, assign_action_ensure_slot_for_keying)
|
||||
EXPECT_STREQ("OBKüüübus", chosen_slot->identifier);
|
||||
}
|
||||
|
||||
{ /* Single slot with same name as ID, Action not yet assigned. Should assign the Action and the
|
||||
slot. */
|
||||
{ /* Single slot with same name as ID, Action not yet assigned.
|
||||
* Should assign the Action and the slot. */
|
||||
Action &action = action_add(*this->bmain, "ACAction");
|
||||
const Slot &slot_for_id = action.slot_add_for_id(cube->id);
|
||||
Slot *chosen_slot = assign_action_ensure_slot_for_keying(action, cube->id);
|
||||
@@ -878,8 +878,8 @@ TEST_F(ActionLayersTest, assign_action_ensure_slot_for_keying)
|
||||
EXPECT_EQ(cube->adt->slot_handle, chosen_slot->handle) << "The chosen slot should be assigned";
|
||||
}
|
||||
|
||||
{ /* Single slot with same name as ID, Action already assigned but not the slot. Should create
|
||||
* new slot. */
|
||||
{ /* Single slot with same name as ID, Action already assigned but not the slot.
|
||||
* Should create new slot. */
|
||||
Action &action = action_add(*this->bmain, "ACAction");
|
||||
const Slot &slot_for_id = action.slot_add_for_id(cube->id);
|
||||
ASSERT_EQ(ActionSlotAssignmentResult::OK, assign_action_and_slot(&action, nullptr, cube->id));
|
||||
|
||||
@@ -281,7 +281,7 @@ TEST_F(AssetLibraryServiceTest, move_runtime_current_file_into_on_disk_library__
|
||||
EXPECT_NE(on_disk_lib, runtime_lib);
|
||||
EXPECT_EQ(on_disk_lib->root_path(), temp_library_path_);
|
||||
|
||||
/* Check if catalog was moved correctly .*/
|
||||
/* Check if catalog was moved correctly. */
|
||||
{
|
||||
EXPECT_EQ(on_disk_catservice.find_catalog(catalog->catalog_id)->path, catalog->path);
|
||||
/* Compare catalog by pointer. #move_runtime_current_file_into_on_disk_library() doesn't
|
||||
@@ -348,7 +348,7 @@ TEST_F(AssetLibraryServiceTest,
|
||||
EXPECT_NE(on_disk_lib, runtime_lib);
|
||||
EXPECT_EQ(on_disk_lib->root_path(), asset_library_root_ + SEP);
|
||||
|
||||
/* Check if catalog was moved correctly .*/
|
||||
/* Check if catalog was moved correctly. */
|
||||
{
|
||||
EXPECT_EQ(on_disk_catservice.find_catalog(catalog->catalog_id)->path, catalog->path);
|
||||
/* Compare catalog by pointer. #move_runtime_current_file_into_on_disk_library() doesn't
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
* # Registering the plugin
|
||||
* The plugin should be registered with lsregister. Either by calling lsregister or by launching
|
||||
* the parent app.
|
||||
* /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \
|
||||
-dump | grep blender-thumbnailer
|
||||
* /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
|
||||
* \ -dump | grep blender-thumbnailer
|
||||
*
|
||||
* # Debugging
|
||||
* Since read-only entitlement is there, creating files to log is not possible. So NSLog and
|
||||
@@ -47,16 +47,16 @@
|
||||
*
|
||||
* # Troubleshooting
|
||||
* - The appex shouldn't have any quarantine flag.
|
||||
xattr -rl bin/Blender.app/Contents/Plugins/blender-thumbnailer.appex
|
||||
* xattr -rl bin/Blender.app/Contents/Plugins/blender-thumbnailer.appex
|
||||
* - Is it registered with lsregister and there isn't a conflict with another plugin taking
|
||||
* precedence? lsregister -dump | grep blender-thumbnailer.appex
|
||||
* - For RBSLaunchRequest error: is the executable flag set? chmod u+x
|
||||
bin/Blender.app/Contents/PlugIns/blender-thumbnailer.appex/Contents/MacOS/blender-thumbnailer
|
||||
* bin/Blender.app/Contents/PlugIns/blender-thumbnailer.appex/Contents/MacOS/blender-thumbnailer
|
||||
* - Is it codesigned and sandboxed?
|
||||
* codesign --display --verbose --entitlements - --xml \
|
||||
bin/Blender.app/Contents/Plugins/blender-thumbnailer.appex codesign --deep --force --sign - \
|
||||
--entitlements ../blender/release/darwin/thumbnailer_entitlements.plist --timestamp=none \
|
||||
bin/Blender.app/Contents/Plugins/blender-thumbnailer.appex
|
||||
* bin/Blender.app/Contents/Plugins/blender-thumbnailer.appex codesign --deep --force --sign - \
|
||||
* --entitlements ../blender/release/darwin/thumbnailer_entitlements.plist --timestamp=none \
|
||||
* bin/Blender.app/Contents/Plugins/blender-thumbnailer.appex
|
||||
* - Sometimes blender-thumbnailer running in background can be killed.
|
||||
* - qlmanage -r && killall Finder
|
||||
* - The code cannot attempt to do anything outside sandbox like writing to blend.
|
||||
|
||||
@@ -67,7 +67,7 @@ static ID *asset_link_id(Main &global_main,
|
||||
|
||||
BKE_blendfile_link_append_context_free(lapp_context);
|
||||
|
||||
/* Verify that the name matches. It must for referencing the same asset again to work. */
|
||||
/* Verify that the name matches. It must for referencing the same asset again to work. */
|
||||
BLI_assert(local_asset == nullptr || STREQ(local_asset->name + 2, asset_name));
|
||||
|
||||
/* Tag library as being editable. */
|
||||
|
||||
@@ -232,7 +232,7 @@ std::ostream &operator<<(std::ostream &stream, const GeometrySet &geometry_set)
|
||||
if (mesh->runtime->subsurf_runtime_data) {
|
||||
const int resolution = mesh->runtime->subsurf_runtime_data->resolution;
|
||||
if (is_power_of_2_i(resolution - 1)) {
|
||||
/* Display the resolution as subdiv levels if possible because that's more common.*/
|
||||
/* Display the resolution as subdiv levels if possible because that's more common. */
|
||||
const int level = log2_floor(resolution - 1);
|
||||
parts.append(std::to_string(level) + " subdiv levels");
|
||||
}
|
||||
|
||||
@@ -1051,7 +1051,7 @@ class NodeTreeMainUpdater {
|
||||
}
|
||||
}
|
||||
if (found_conflict) {
|
||||
/* Make sure that all group input sockets know that there is a socket. */
|
||||
/* Make sure that all group input sockets know that there is a socket. */
|
||||
for (bNode *input_node : group_input_nodes) {
|
||||
bNodeSocket &socket = input_node->output_socket(interface_input_i);
|
||||
auto &socket_value = *socket.default_value_typed<bNodeSocketValueMenu>();
|
||||
|
||||
@@ -72,7 +72,7 @@ template<typename T> class ArrayState {
|
||||
{
|
||||
if (sharing_info_ && other_sharing_info) {
|
||||
if (sharing_info_ == other_sharing_info) {
|
||||
/* The data is still shared.*/
|
||||
/* The data is still shared. */
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ inline void bits_to_index_ranges(const BitSpan bits, IndexRangesBuilder<IntT> &b
|
||||
while (current_value != 0) {
|
||||
/* Find start of next range of 1s. */
|
||||
const int64_t first_set_bit_i = int64_t(bitscan_forward_uint64(current_value));
|
||||
/* This mask is used to find the end of the 1s range. */
|
||||
/* This mask is used to find the end of the 1s range. */
|
||||
const BitInt find_unset_value = ~(current_value | mask_first_n_bits(first_set_bit_i) |
|
||||
~mask);
|
||||
if (find_unset_value == 0) {
|
||||
|
||||
@@ -143,7 +143,7 @@ TRIVIAL_DEFAULT_INT_HASH(uint64_t);
|
||||
template<> struct DefaultHash<float> {
|
||||
uint64_t operator()(float value) const
|
||||
{
|
||||
/* Explicit `uint64_t` cast to suppress CPPCHECK warning. */
|
||||
/* Explicit `uint64_t` cast to suppress CPPCHECK warning. */
|
||||
return uint64_t(*reinterpret_cast<uint32_t *>(&value));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -320,7 +320,7 @@ template<typename T>
|
||||
#else
|
||||
/* `S = q * V`. */
|
||||
QuaternionBase<T> S;
|
||||
S.w = /* q.w * 0.0 */ -q.x * v.x - q.y * v.y - q.z * v.z;
|
||||
S.w = /* q.w * 0.0 */ -q.x * v.x - q.y * v.y - q.z * v.z;
|
||||
S.x = q.w * v.x /* + q.x * 0.0 */ + q.y * v.z - q.z * v.y;
|
||||
S.y = q.w * v.y /* + q.y * 0.0 */ + q.z * v.x - q.x * v.z;
|
||||
S.z = q.w * v.z /* + q.z * 0.0 */ + q.x * v.y - q.y * v.x;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/* Maintained by GLIBC. */
|
||||
/* clang-format off */
|
||||
|
||||
/* Enable GNU extensions in fnmatch.h. */
|
||||
/* Enable GNU extensions in fnmatch.h. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
@@ -234,7 +234,8 @@ struct TaskPool {
|
||||
}
|
||||
|
||||
TaskPool(TaskPool &&other) = delete;
|
||||
/* : type(other.type), use_threads(other.use_threads), userdata(other.userdata)
|
||||
#if 0
|
||||
: type(other.type), use_threads(other.use_threads), userdata(other.userdata)
|
||||
{
|
||||
other.pool = nullptr;
|
||||
other.run = nullptr;
|
||||
@@ -242,7 +243,8 @@ struct TaskPool {
|
||||
other.free_taskdata = false;
|
||||
other.freedata = nullptr;
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
TaskPool(const TaskPool &other) = delete;
|
||||
|
||||
TaskPool &operator=(const TaskPool &other) = delete;
|
||||
|
||||
@@ -355,7 +355,7 @@ TEST(convexhull_2d, Complex)
|
||||
for (float2 &p : points) {
|
||||
BLI_assert(p[0] >= 0.0 && p[0] <= 1.0f);
|
||||
BLI_assert(p[1] >= 0.0 && p[1] <= 1.0f);
|
||||
/* Center from [-0.5..0.5], apply size, rotate & translate. */
|
||||
/* Center from [-0.5..0.5], apply size, rotate & translate. */
|
||||
p = (((p - float2(0.5f, 0.5f)) * size) * rot_mat) + translation;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "testing/testing.h"
|
||||
|
||||
/* See `BLI_fixed_width_int_str.hh` for why this is necessary. */
|
||||
/* See `BLI_fixed_width_int_str.hh` for why this is necessary. */
|
||||
#ifdef WITH_GMP
|
||||
|
||||
namespace blender::fixed_width_int::tests {
|
||||
|
||||
@@ -391,9 +391,12 @@ enum eBLOLibLinkFlags {
|
||||
BLO_LIBLINK_OBDATA_INSTANCE = 1 << 24,
|
||||
/** Instantiate collections as empties, instead of linking them into current view layer. */
|
||||
BLO_LIBLINK_COLLECTION_INSTANCE = 1 << 25,
|
||||
/** Do not rebuild collections hierarchy runtime data (mainly the parents info) as part of
|
||||
#BLO_library_link_end. Needed when some IDs have been temporarily removed from Main, see e.g.
|
||||
#BKE_blendfile_library_relocate. */
|
||||
/**
|
||||
* Do not rebuild collections hierarchy runtime data (mainly the parents info)
|
||||
* as part of #BLO_library_link_end.
|
||||
* Needed when some IDs have been temporarily removed from Main,
|
||||
* see e.g. #BKE_blendfile_library_relocate.
|
||||
*/
|
||||
BLO_LIBLINK_COLLECTION_NO_HIERARCHY_REBUILD = 1 << 26,
|
||||
};
|
||||
|
||||
@@ -596,7 +599,7 @@ ID_Readfile_Data::Tags BLO_readfile_id_runtime_tags(ID &id);
|
||||
ID_Readfile_Data::Tags &BLO_readfile_id_runtime_tags_for_write(ID &id);
|
||||
|
||||
/**
|
||||
* Free the ID_Readfile_Data of all IDs in this bmain and all their embedded IDs.
|
||||
* Free the #ID_Readfile_Data of all IDs in this bmain and all their embedded IDs.
|
||||
*
|
||||
* This is typically called at the end of the versioning process, as after that
|
||||
* `ID.runtime.readfile_data` should no longer be needed.
|
||||
@@ -604,7 +607,7 @@ ID_Readfile_Data::Tags &BLO_readfile_id_runtime_tags_for_write(ID &id);
|
||||
void BLO_readfile_id_runtime_data_free_all(Main &bmain);
|
||||
|
||||
/**
|
||||
* Free the ID_Readfile_Data of this ID. Does _not_ deal with embedded IDs.
|
||||
* Free the #ID_Readfile_Data of this ID. Does _not_ deal with embedded IDs.
|
||||
*/
|
||||
void BLO_readfile_id_runtime_data_free(ID &id);
|
||||
|
||||
@@ -633,7 +636,7 @@ using BlenderHeaderVariant =
|
||||
|
||||
BlenderHeaderVariant BLO_readfile_blender_header_decode(FileReader *file);
|
||||
|
||||
/* Returns std::nullopt if the file is exhausted. */
|
||||
/** Returns #std::nullopt if the file is exhausted. */
|
||||
std::optional<BHead> BLO_readfile_read_bhead(FileReader *file,
|
||||
BHeadType type,
|
||||
bool do_endian_swap);
|
||||
|
||||
@@ -94,7 +94,7 @@ constexpr float maximum_improvement = 0.99f;
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Join Edges state
|
||||
* pass a struct to ensure we don't have to pass these four variables everywhere.
|
||||
\{ */
|
||||
* \{ */
|
||||
|
||||
struct JoinEdgesState {
|
||||
/** A priority queue of `BMEdge *` to be merged, in order of preference. */
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace blender::compositor {
|
||||
* Specifies how the input should be realized before execution. See the discussion in COM_domain.hh
|
||||
* for more information on what realization mean. */
|
||||
enum class InputRealizationMode : uint8_t {
|
||||
/* The input should not be realized in any way. */
|
||||
/* The input should not be realized in any way. */
|
||||
None,
|
||||
/* The rotation and scale transforms of the input should be realized. */
|
||||
Transforms,
|
||||
@@ -31,7 +31,7 @@ enum class InputRealizationMode : uint8_t {
|
||||
* Specifies the implicit input that should be assigned to the input if it is unlinked. See the
|
||||
* ImplicitInputOperation operation for more information on the individual types. */
|
||||
enum class ImplicitInput : uint8_t {
|
||||
/* The input does not have an implicit input and its value should be used. */
|
||||
/* The input does not have an implicit input and its value should be used. */
|
||||
None,
|
||||
/* The input should have the texture coordinates of the compositing space as an input. */
|
||||
TextureCoordinates,
|
||||
|
||||
@@ -356,7 +356,7 @@ static void compute_second_order_section(const std::complex<double> &pole,
|
||||
}
|
||||
|
||||
/**
|
||||
The IIR filter difference equation relies on previous outputs to compute new outputs, those
|
||||
* The IIR filter difference equation relies on previous outputs to compute new outputs, those
|
||||
* previous outputs are not really defined at the start of the filter. To do Neumann boundary
|
||||
* condition, we initialize the previous output with a special value that is a function of the
|
||||
* boundary value. This special value is computed by multiply the boundary value with a coefficient
|
||||
|
||||
@@ -1903,7 +1903,7 @@ enum GBufferMode : uint32_t {
|
||||
/** None mode for pixels not rendered. */
|
||||
GBUF_NONE = 0u,
|
||||
|
||||
/* Reflection. */
|
||||
/* Reflection. */
|
||||
GBUF_DIFFUSE = 1u,
|
||||
GBUF_REFLECTION = 2u,
|
||||
GBUF_REFLECTION_COLORLESS = 3u,
|
||||
|
||||
@@ -43,7 +43,7 @@ void orthographic_sync(int tilemap_id,
|
||||
tilemaps_clip_buf[clip_index].object_to_world = object_to_world;
|
||||
}
|
||||
else {
|
||||
/* Same light direction but camera might have moved. Shift tilemap grid. */
|
||||
/* Same light direction but camera might have moved. Shift tilemap grid. */
|
||||
tilemaps_buf[tilemap_id].grid_shift = origin_offset -
|
||||
tilemaps_clip_buf[clip_index].grid_offset;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void main()
|
||||
|
||||
/* Auto sun angle. */
|
||||
float sun_angle_cos = 2.0f * len - 1.0f;
|
||||
/* Compute tangent from cosine. */
|
||||
/* Compute tangent from cosine. */
|
||||
float sun_angle_tan = sqrt(-1.0f + 1.0f / square(sun_angle_cos));
|
||||
/* Clamp value to avoid float imprecision artifacts. */
|
||||
float sun_radius = clamp(sun_angle_tan, 0.001f, 20.0f);
|
||||
|
||||
@@ -59,7 +59,7 @@ void main()
|
||||
dst_coord_buf[page_index] = page_packed;
|
||||
src_coord_buf[page_index] = packUvec4x8(
|
||||
uint4(relative_tile_co.x, relative_tile_co.y, view_index, 0));
|
||||
/* Tag tile as rendered. Should be safe since only one thread is reading and writing. */
|
||||
/* Tag tile as rendered. Should be safe since only one thread is reading and writing. */
|
||||
tiles_buf[tile_index] |= SHADOW_IS_RENDERED;
|
||||
/* Statistics. */
|
||||
atomicAdd(statistics_buf.page_rendered_count, 1);
|
||||
|
||||
@@ -290,7 +290,7 @@ static void drw_shgroup_bone_envelope_distance(const Armatures::DrawContext *ctx
|
||||
head_sph[3] += *distance * obscale;
|
||||
tail_sph[3] = *radius_tail * obscale;
|
||||
tail_sph[3] += *distance * obscale;
|
||||
/* TODO(fclem): Cleanup these casts when Overlay Next is shipped. */
|
||||
/* TODO(fclem): Cleanup these casts when Overlay Next is shipped. */
|
||||
ctx->bone_buf->envelope_distance_buf.append(
|
||||
{*(float4 *)head_sph, *(float4 *)tail_sph, *(float3 *)xaxis},
|
||||
draw::select::SelectMap::select_invalid_id());
|
||||
@@ -355,7 +355,7 @@ static void drw_shgroup_bone_envelope(const Armatures::DrawContext *ctx,
|
||||
interp_v4_v4v4(tail_sph, tmp_sph, tail_sph, fac_tail);
|
||||
|
||||
if (ctx->is_filled) {
|
||||
/* TODO(fclem): Cleanup these casts when Overlay Next is shipped. */
|
||||
/* TODO(fclem): Cleanup these casts when Overlay Next is shipped. */
|
||||
ctx->bone_buf->envelope_fill_buf.append({*(float4 *)head_sph,
|
||||
*(float4 *)tail_sph,
|
||||
*(float3 *)bone_col,
|
||||
|
||||
@@ -168,7 +168,7 @@ BLI_STATIC_ASSERT(MOTIONPATH_VERT_SEL == (1u << 0), "Ensure value is sync");
|
||||
BLI_STATIC_ASSERT(MOTIONPATH_VERT_KEY == (1u << 1), "Ensure value is sync");
|
||||
#endif
|
||||
|
||||
/* All colors in this struct are converted to display linear RGB colorspace. */
|
||||
/* All colors in this struct are converted to display linear RGB color-space. */
|
||||
struct ThemeColors {
|
||||
/* UBOs data needs to be 16 byte aligned (size of float4) */
|
||||
float4 wire;
|
||||
|
||||
@@ -131,8 +131,8 @@ void geometry_main(VertOut geom_in[2],
|
||||
screen_space_pos[0] = pos0.xy / pos0.w;
|
||||
screen_space_pos[1] = pos1.xy / pos1.w;
|
||||
|
||||
/* `theme.sizes.edge` is defined as the distance from the center to the outer edge. As such to
|
||||
get the total width it needs to be doubled. */
|
||||
/* `theme.sizes.edge` is defined as the distance from the center to the outer edge.
|
||||
* As such to get the total width it needs to be doubled. */
|
||||
wire_width = geom_in[0].wire_width * (theme.sizes.edge * 2);
|
||||
float half_size = max(wire_width / 2.0f, 0.5f);
|
||||
|
||||
|
||||
@@ -521,7 +521,7 @@ static void calc_edit_handles_ibo(const OffsetIndices<int> points_by_curve,
|
||||
int lines_num = 0;
|
||||
/* Lines for all non-cyclic non-Bezier segments. */
|
||||
lines_num += non_bezier_points_num;
|
||||
/* Lines for all potential non-Bezier cyclic segments.*/
|
||||
/* Lines for all potential non-Bezier cyclic segments. */
|
||||
lines_num += non_bezier_curves_num;
|
||||
/* Lines for all Bezier handles. */
|
||||
lines_num += bezier_offsets.total_size() * 2;
|
||||
|
||||
@@ -1791,7 +1791,7 @@ void DRW_create_subdivision(Object &ob,
|
||||
ts,
|
||||
use_hide))
|
||||
{
|
||||
/* Did not run*/
|
||||
/* Did not run. */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ void ED_keyframes_add(FCurve *fcu, int num_keys_to_add)
|
||||
|
||||
fcu->bezt = static_cast<BezTriple *>(
|
||||
MEM_recallocN(fcu->bezt, sizeof(BezTriple) * (fcu->totvert + num_keys_to_add)));
|
||||
BezTriple *bezt = fcu->bezt + fcu->totvert; /* Pointer to the first new one. '*/
|
||||
BezTriple *bezt = fcu->bezt + fcu->totvert; /* Pointer to the first new one. */
|
||||
|
||||
fcu->totvert += num_keys_to_add;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
#include "BLI_array_utils.h" /* For `BLI_array_is_zeroed`. */
|
||||
#include "BLI_array_utils.h" /* For #BLI_array_is_zeroed. */
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_curve_types.h"
|
||||
|
||||
@@ -58,7 +58,7 @@ static void calc_curves_extrusion(const IndexMask &selection,
|
||||
is_first_selected[curve] = first_range.first() == curve_points.start() &&
|
||||
first_range.size() == 1 &&
|
||||
/* If single point curve is extruded we want the newly created
|
||||
point to get selected. */
|
||||
* point to get selected. */
|
||||
curve_points.size() != 1;
|
||||
current_endpoint_index += !is_first_selected[curve];
|
||||
copy_intervals[curves_intervals_offsets[curve]] = curve_points.start();
|
||||
|
||||
@@ -669,7 +669,7 @@ DEF_ICON(STICKY_UVS_DISABLE)
|
||||
DEF_ICON(STICKY_UVS_LOC)
|
||||
DEF_ICON(STICKY_UVS_VERT)
|
||||
|
||||
/* ORIENTATION */
|
||||
/* ORIENTATION */
|
||||
DEF_ICON(ORIENTATION_GIMBAL)
|
||||
DEF_ICON(ORIENTATION_GLOBAL)
|
||||
DEF_ICON(ORIENTATION_LOCAL)
|
||||
|
||||
@@ -4725,7 +4725,7 @@ static bool edbm_fill_grid_prepare(BMesh *bm, int offset, int *span_p, const boo
|
||||
ele_sort[i].sort_value = angle;
|
||||
ele_sort[i].data = v_link;
|
||||
|
||||
/* Do not allow the best corner or the diagonally opposite corner to be detected.*/
|
||||
/* Do not allow the best corner or the diagonally opposite corner to be detected. */
|
||||
if (ELEM(i, 0, verts_len / 2)) {
|
||||
ele_sort[i].sort_value = 0;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ static void calc_local_positions(const float4x4 &mat,
|
||||
* the z-distances are divided by `height`, effectively scaling the
|
||||
* z-distances so that a vertex of local coordinates
|
||||
* `(0, 0, height)` has a z-distance of 1.
|
||||
.
|
||||
*
|
||||
* When `height` is 0, the local distances are set to 1. In object space, this is
|
||||
* equivalent to setting the distances equal to the radius, resulting in
|
||||
* a falloff strength of 0 (no displacement).
|
||||
|
||||
@@ -149,7 +149,7 @@ class PaintOperation : public GreasePencilStrokeOperation {
|
||||
/* Temporary vector of curve fitted screen space coordinates per input sample from the active
|
||||
* smoothing window. The length of this depends on `active_smooth_start_index_`. */
|
||||
Vector<Vector<float2>> screen_space_curve_fitted_coords_;
|
||||
/* Temporary vector of screen space offsets */
|
||||
/* Temporary vector of screen space offsets. */
|
||||
Vector<float2> screen_space_jitter_offsets_;
|
||||
/* Projection planes for every point in "Stroke" placement mode. */
|
||||
Vector<std::optional<float>> stroke_placement_depths_;
|
||||
|
||||
@@ -483,22 +483,22 @@ enum {
|
||||
struct SlipData {
|
||||
NumInput num_input;
|
||||
VectorSet<Strip *> strips;
|
||||
/* Initial mouse position in view-space. */
|
||||
/** Initial mouse position in view-space. */
|
||||
float init_mouse_co[2];
|
||||
/* Mouse and virtual mouse-cursor x-values in region-space. */
|
||||
/** Mouse and virtual mouse-cursor x-values in region-space. */
|
||||
int prev_mval_x;
|
||||
float virtual_mval_x;
|
||||
/* Parsed offset (integer when in precision mode, float otherwise).*/
|
||||
/** Parsed offset (integer when in precision mode, float otherwise). */
|
||||
float prev_offset;
|
||||
bool precision;
|
||||
/* Whether to show sub-frame offset in header. */
|
||||
/** Whether to show sub-frame offset in header. */
|
||||
bool show_subframe;
|
||||
|
||||
/* Whether the user is currently clamping. */
|
||||
/** Whether the user is currently clamping. */
|
||||
bool clamp;
|
||||
/* Whether at least one strip has enough content to clamp. */
|
||||
/** Whether at least one strip has enough content to clamp. */
|
||||
bool can_clamp;
|
||||
/* Whether some strips do not have enough content to clamp. */
|
||||
/** Whether some strips do not have enough content to clamp. */
|
||||
bool clamp_warning;
|
||||
};
|
||||
|
||||
|
||||
@@ -1196,7 +1196,7 @@ void animrecord_check_state(TransInfo *t, ID *id)
|
||||
/* Only push down if action is more than 1-2 frames long. */
|
||||
const float2 frame_range = adt->action->wrap().get_frame_range_of_keys(true);
|
||||
if (frame_range[1] > frame_range[0] + 2.0f) {
|
||||
/* TODO: call BKE_nla_action_pushdown() instead? */
|
||||
/* TODO: call #BKE_nla_action_pushdown() instead? */
|
||||
|
||||
/* Add a new NLA strip to the track, which references the active action + slot. */
|
||||
NlaStrip *strip = BKE_nlastack_add_strip({*id, *adt}, ID_IS_OVERRIDE_LIBRARY(id));
|
||||
|
||||
@@ -192,7 +192,7 @@ static bool is_vert_slide_visible_bmesh(TransInfo *t,
|
||||
const BMBVHTree *bmbvh,
|
||||
TransDataEdgeSlideVert *sv)
|
||||
{
|
||||
/* NOTE: */
|
||||
/* NOTE: */
|
||||
BMIter iter_other;
|
||||
BMEdge *e;
|
||||
|
||||
|
||||
@@ -1733,7 +1733,7 @@ bool transform_snap_increment_ex(const TransInfo *t, bool use_local_space, float
|
||||
}
|
||||
|
||||
if (t->spacetype == SPACE_SEQ) {
|
||||
/* Sequencer has its own dedicated enum for snap_mode with increment snap bit overridden. */
|
||||
/* Sequencer has its own dedicated enum for snap_mode with increment snap bit overridden. */
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape,
|
||||
}
|
||||
// here we know that we're dealing with a face layer that has not been processed yet and that
|
||||
// contains a smooth edge.
|
||||
/* vedge =*//* UNUSED */ BuildSmoothViewEdge(OWXFaceLayer(*sl, true));
|
||||
/* `vedge =` */ /* UNUSED */ BuildSmoothViewEdge(OWXFaceLayer(*sl, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -243,9 +243,9 @@ bke::CurvesGeometry extend_curves(bke::CurvesGeometry &src_curves,
|
||||
bke::CurvesGeometry dst_curves;
|
||||
|
||||
if (!follow_curvature) {
|
||||
/* Use the old curves when extending straight when no new points are added. */
|
||||
/* Use the old curves when extending straight when no new points are added. */
|
||||
dst_curves = std::move(src_curves);
|
||||
/* Enable affected curves for #extend_curves_straight(). */
|
||||
/* Enable affected curves for #extend_curves_straight(). */
|
||||
index_mask::masked_fill<int>(start_points, 1, selection);
|
||||
index_mask::masked_fill<int>(end_points, 1, selection);
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ static Array<Vector<int, face_group_inline>> get_face_groups(const MeshGL &mgl,
|
||||
* in \a mesh.
|
||||
* Return 2 if it is the same but with the normal reversed.
|
||||
* Return 0 otherwise.
|
||||
*/
|
||||
*/
|
||||
static uchar check_original_face(const Vector<int, face_group_inline> &group,
|
||||
const MeshGL &mgl,
|
||||
const Mesh *mesh,
|
||||
@@ -1266,7 +1266,7 @@ static void interpolate_corner_attributes(bke::MutableAttributeAccessor &output_
|
||||
Vector<bke::GAttributeReader> readers;
|
||||
Vector<GVArraySpan> srcs;
|
||||
Vector<GMutableSpan> dsts;
|
||||
/* For each index of srcs and dest, we need to know if it is a "normal"-like attribute. */
|
||||
/* For each index of `srcs` and `dsts`, we need to know if it is a "normal"-like attribute. */
|
||||
Vector<bool> is_normal_attribute;
|
||||
input_attrs.foreach_attribute([&](const bke::AttributeIter &iter) {
|
||||
if (iter.domain != bke::AttrDomain::Corner || ELEM(iter.name, ".corner_vert", ".corner_edge"))
|
||||
|
||||
@@ -275,7 +275,7 @@ struct MeshNormalInfo {
|
||||
}
|
||||
if (custom_normal->data_type == CD_PROP_FLOAT3) {
|
||||
if (custom_normal->domain == bke::AttrDomain::Edge) {
|
||||
/* Skip invalid storage on the edge domain.*/
|
||||
/* Skip invalid storage on the edge domain. */
|
||||
this->add_no_custom_normals(mesh.normals_domain());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace blender::geometry {
|
||||
#define param_warning(message) \
|
||||
{/* `printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);` */}(void)0
|
||||
|
||||
/* Prevent unused function warnings when slim is disabled. */
|
||||
/* Prevent unused function warnings when slim is disabled. */
|
||||
#ifdef WITH_UV_SLIM
|
||||
# define UNUSED_FUNCTION_NO_SLIM(x) x
|
||||
#else
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
/* GPU back-ends abstract the differences between different APIs. #GPU_context_create
|
||||
* automatically initializes the back-end, and #GPU_context_discard frees it when there
|
||||
* are no more contexts. */
|
||||
|
||||
bool GPU_backend_supported();
|
||||
void GPU_backend_type_selection_set(const eGPUBackendType backend);
|
||||
eGPUBackendType GPU_backend_type_selection_get();
|
||||
@@ -59,38 +60,45 @@ void GPU_context_discard(GPUContext *);
|
||||
void GPU_context_active_set(GPUContext *);
|
||||
GPUContext *GPU_context_active_get();
|
||||
|
||||
/* Begin and end frame are used to mark the singular boundary representing the lifetime of a whole
|
||||
/**
|
||||
* Begin and end frame are used to mark the singular boundary representing the lifetime of a whole
|
||||
* frame. This also acts as a divisor for ensuring workload submission and flushing, especially for
|
||||
* background rendering when there is no call to present.
|
||||
* This is required by explicit-API's where there is no implicit workload flushing. */
|
||||
* This is required by explicit-API's where there is no implicit workload flushing.
|
||||
*/
|
||||
void GPU_context_begin_frame(GPUContext *ctx);
|
||||
void GPU_context_end_frame(GPUContext *ctx);
|
||||
|
||||
/* Legacy GPU (Intel HD4000 series) do not support sharing GPU objects between GPU
|
||||
/**
|
||||
* Legacy GPU (Intel HD4000 series) do not support sharing GPU objects between GPU
|
||||
* contexts. EEVEE/Workbench can create different contexts for image/preview rendering, baking or
|
||||
* compiling. When a legacy GPU is detected (`GPU_use_main_context_workaround()`) any worker
|
||||
* threads should use the draw manager opengl context and make sure that they are the only one
|
||||
* using it by locking the main context using these two functions. */
|
||||
* using it by locking the main context using these two functions.
|
||||
*/
|
||||
void GPU_context_main_lock();
|
||||
void GPU_context_main_unlock();
|
||||
|
||||
/* GPU Begin/end work blocks */
|
||||
/** GPU Begin/end work blocks */
|
||||
void GPU_render_begin();
|
||||
void GPU_render_end();
|
||||
|
||||
/* For operations which need to run exactly once per frame -- even if there are no render updates.
|
||||
/**
|
||||
* For operations which need to run exactly once per frame -- even if there are no render updates.
|
||||
*/
|
||||
void GPU_render_step(bool force_resource_release = false);
|
||||
|
||||
/* For when we need access to a system context in order to create a GPU context. */
|
||||
/** For when we need access to a system context in order to create a GPU context. */
|
||||
void GPU_backend_ghost_system_set(void *ghost_system_handle);
|
||||
void *GPU_backend_ghost_system_get();
|
||||
|
||||
namespace blender::gpu {
|
||||
|
||||
/* Abstracts secondary GHOST and GPU context creation, activation and deletion.
|
||||
/**
|
||||
* Abstracts secondary GHOST and GPU context creation, activation and deletion.
|
||||
* Must be created from the main thread and destructed from the thread they where activated in.
|
||||
* (See GPUWorker for an usage example) */
|
||||
* (See GPUWorker for an usage example)
|
||||
*/
|
||||
class GPUSecondaryContext {
|
||||
private:
|
||||
void *ghost_context_;
|
||||
@@ -100,7 +108,7 @@ class GPUSecondaryContext {
|
||||
GPUSecondaryContext();
|
||||
~GPUSecondaryContext();
|
||||
|
||||
/* Must be called from a secondary thread.*/
|
||||
/** Must be called from a secondary thread. */
|
||||
void activate();
|
||||
};
|
||||
|
||||
|
||||
@@ -554,7 +554,7 @@ GPUSecondaryContext::GPUSecondaryContext()
|
||||
gpu_settings.preferred_device.vendor_id = U.gpu_preferred_vendor_id;
|
||||
gpu_settings.preferred_device.device_id = U.gpu_preferred_device_id;
|
||||
|
||||
/* Grab the system handle. */
|
||||
/* Grab the system handle. */
|
||||
GHOST_SystemHandle ghost_system = reinterpret_cast<GHOST_SystemHandle>(
|
||||
GPU_backend_ghost_system_get());
|
||||
BLI_assert(ghost_system);
|
||||
|
||||
@@ -1665,7 +1665,7 @@ void MTLParallelShaderCompiler::create_compile_threads()
|
||||
/* Spawn the compiler threads. */
|
||||
for (int i = 0; i < max_mtlcompiler_threads; i++) {
|
||||
|
||||
/* Grab the system handle. */
|
||||
/* Grab the system handle. */
|
||||
GHOST_SystemHandle ghost_system = reinterpret_cast<GHOST_SystemHandle>(
|
||||
GPU_backend_ghost_system_get());
|
||||
BLI_assert(ghost_system);
|
||||
|
||||
@@ -2649,7 +2649,7 @@ GPUPixelBufferNativeHandle MTLPixelBuffer::get_native_handle()
|
||||
{
|
||||
GPUPixelBufferNativeHandle native_handle;
|
||||
|
||||
/* Only spported with unified memory currently. */
|
||||
/* Only supported with unified memory currently. */
|
||||
MTLContext *ctx = MTLContext::get();
|
||||
BLI_assert(ctx);
|
||||
if (![ctx->device hasUnifiedMemory]) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
# include "BLI_winstuff.h"
|
||||
# endif
|
||||
|
||||
/* Include after BLI_winstuff.h to avoid APIENTRY redefinition. */
|
||||
/* Include after `BLI_winstuff.h` to avoid APIENTRY redefinition. */
|
||||
# include <epoxy/gl.h>
|
||||
|
||||
namespace blender::gpu {
|
||||
|
||||
@@ -72,8 +72,8 @@ static void test_framebuffer_clear_color_multiple_attachments()
|
||||
}
|
||||
MEM_freeN(read_data1);
|
||||
|
||||
#ifndef __APPLE__ /* FIXME: Behavior is not the same on all backend. Current expected value is \
|
||||
broken. */
|
||||
#ifndef __APPLE__ /* FIXME: Behavior is not the same on all backend. \
|
||||
* Current expected value is broken. */
|
||||
uint4 *read_data2 = static_cast<uint4 *>(GPU_texture_read(texture2, GPU_DATA_UINT, 0));
|
||||
uint4 clear_color_uint(1036831949, 1045220557, 1056964608, 1065353216);
|
||||
for (uint4 pixel_color : Span<uint4>(read_data2, size.x * size.y)) {
|
||||
|
||||
@@ -202,7 +202,7 @@ void VKTexture::read_sub(
|
||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
|
||||
VK_MEMORY_PROPERTY_HOST_CACHED_BIT,
|
||||
/* Although we are only reading, we need to set the host access random bit
|
||||
to improve the performance on AMD GPUs. */
|
||||
* to improve the performance on AMD GPUs. */
|
||||
VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT |
|
||||
VMA_ALLOCATION_CREATE_MAPPED_BIT);
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ typedef enum eGPDstroke_Flag {
|
||||
GP_STROKE_NEEDS_CURVE_UPDATE = (1 << 9),
|
||||
/* Flag to indicate that a stroke is used only for help, and will not affect rendering or fill */
|
||||
GP_STROKE_HELP = (1 << 10),
|
||||
/* Flag to indicate that a extend stroke collide (fill tool) */
|
||||
/* Flag to indicate that a extend stroke collide (fill tool). */
|
||||
GP_STROKE_COLLIDE = (1 << 11),
|
||||
/* only for use with stroke-buffer (while drawing arrows) */
|
||||
GP_STROKE_USE_ARROW_START = (1 << 12),
|
||||
|
||||
@@ -111,7 +111,7 @@ typedef enum eFFMpegProresProfile {
|
||||
FFM_PRORES_PROFILE_422_PROXY = 0, /* FF_PROFILE_PRORES_PROXY */
|
||||
FFM_PRORES_PROFILE_422_LT = 1, /* FF_PROFILE_PRORES_LT */
|
||||
FFM_PRORES_PROFILE_422_STD = 2, /* FF_PROFILE_PRORES_STANDARD */
|
||||
FFM_PRORES_PROFILE_422_HQ = 3, /* FF_PROFILE_PRORES_HQ*/
|
||||
FFM_PRORES_PROFILE_422_HQ = 3, /* FF_PROFILE_PRORES_HQ */
|
||||
FFM_PRORES_PROFILE_4444 = 4, /* FF_PROFILE_PRORES_4444 */
|
||||
FFM_PRORES_PROFILE_4444_XQ = 5, /* FF_PROFILE_PRORES_XQ */
|
||||
} eFFMpegProresProfile;
|
||||
|
||||
@@ -152,7 +152,7 @@ typedef struct BHead {
|
||||
/**
|
||||
* Identifier the block had when it was written. This is used to remap memory blocks on load.
|
||||
* Typically, this is the pointer that the memory had when it was written.
|
||||
* This should be unique across the whole blendfile, except for `BLEND_DATA` blocks, which
|
||||
* This should be unique across the whole blend-file, except for `BLEND_DATA` blocks, which
|
||||
* should be unique within a same ID.
|
||||
*/
|
||||
const void *old;
|
||||
|
||||
@@ -105,7 +105,7 @@ static void rna_Pose_dependency_update(Main *bmain, Scene * /*scene*/, PointerRN
|
||||
|
||||
static void rna_Pose_IK_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
|
||||
{
|
||||
// ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); /* XXX: when to use this? */
|
||||
// ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); /* XXX: when to use this? */
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
@@ -1 +1 @@
|
||||
# See svn history for example formatting for this file, currently this isnt in use.
|
||||
# See svn history for example formatting for this file, currently this isn't in use.
|
||||
|
||||
@@ -592,7 +592,7 @@ static void build_drawing(const GreasePencilBuildModifierData &mmd,
|
||||
IndexMask selection = modifier::greasepencil::get_filtered_stroke_mask(
|
||||
&ob, curves, mmd.influence, memory);
|
||||
|
||||
/* Remove a count of #prev_strokes. */
|
||||
/* Remove a count of #prev_strokes. */
|
||||
if (mmd.mode == MOD_GREASE_PENCIL_BUILD_MODE_ADDITIVE && previous_drawing != nullptr) {
|
||||
const bke::CurvesGeometry &prev_curves = previous_drawing->strokes();
|
||||
const int prev_strokes = prev_curves.curves_num();
|
||||
|
||||
@@ -52,8 +52,7 @@ static void node_composit_init_bokehblur(bNodeTree * /*ntree*/, bNode *node)
|
||||
static void node_composit_buts_bokehblur(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
{
|
||||
uiItemR(layout, ptr, "use_variable_size", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
|
||||
// uiItemR(layout, ptr, "f_stop", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); /* UNUSED
|
||||
// */
|
||||
// uiItemR(layout, ptr, "f_stop", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
|
||||
uiItemR(layout, ptr, "blur_max", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
|
||||
uiItemR(layout, ptr, "use_extended_bounds", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
|
||||
}
|
||||
|
||||
@@ -2224,7 +2224,8 @@ class GlareOperation : public NodeOperation {
|
||||
output.allocate_texture(domain);
|
||||
|
||||
parallel_for(domain.size, [&](const int2 texel) {
|
||||
/* Make sure the input is not negative to avoid a subtractive effect when adding the glare.*/
|
||||
/* Make sure the input is not negative
|
||||
* to avoid a subtractive effect when adding the glare. */
|
||||
float4 input_color = math::max(float4(0.0f), input.load_pixel<float4>(texel));
|
||||
|
||||
float2 normalized_coordinates = (float2(texel) + float2(0.5f)) / float2(input.domain().size);
|
||||
|
||||
@@ -792,7 +792,7 @@ void evaluate_closure_eagerly(const Closure &closure, ClosureEagerEvalParams &pa
|
||||
}
|
||||
lf_output_values[indices.outputs.input_usages[main_input_i]] = allocator.allocate<bool>();
|
||||
}
|
||||
/* Set remaining output usages to false.*/
|
||||
/* Set remaining output usages to false. */
|
||||
for (const int output_usage_i : indices.inputs.output_usages.index_range()) {
|
||||
const int lf_input_i = indices.inputs.output_usages[output_usage_i];
|
||||
if (!lf_input_values[lf_input_i]) {
|
||||
|
||||
@@ -1072,7 +1072,7 @@ void get_geometry_nodes_input_base_values(const bNodeTree &btree,
|
||||
continue;
|
||||
}
|
||||
if (input_attribute_name_get(properties, io_input).has_value()) {
|
||||
/* Attributes don't have a single base value, so ignore them here.*/
|
||||
/* Attributes don't have a single base value, so ignore them here. */
|
||||
continue;
|
||||
}
|
||||
if (is_layer_selection_field(io_input)) {
|
||||
|
||||
@@ -172,7 +172,7 @@ TEST_F(NodeTest, tree_iterator_1mat_3scenes)
|
||||
const char SCENE_NAME_2[MAX_ID_NAME] = "Scene 2";
|
||||
const char SCENE_NAME_3[MAX_ID_NAME] = "Scene 3";
|
||||
const char NTREE_NAME[MAX_NAME] = "Test Composisiting Nodetree";
|
||||
/* Name is hardcoded in ED_node_shader_default(). */
|
||||
/* Name is hard-coded in #ED_node_shader_default(). */
|
||||
const char MATERIAL_NTREE_NAME[MAX_NAME] = "Shader Nodetree";
|
||||
|
||||
Material *material = BKE_material_add(context.bmain, "Material");
|
||||
@@ -193,7 +193,7 @@ TEST_F(NodeTest, tree_iterator_1mat_3scenes)
|
||||
ASSERT_EQ(iter_result.node_trees.size(), 2);
|
||||
ASSERT_EQ(iter_result.ids.size(), 2);
|
||||
|
||||
/* Expect that scenes with no nodetrees don't have side effects for node trees*/
|
||||
/* Expect that scenes with no node-trees don't have side effects for node trees. */
|
||||
EXPECT_EQ(GS(iter_result.ids[0]->name), ID_SCE);
|
||||
EXPECT_STREQ(iter_result.ids[0]->name + 2, SCENE_NAME_2);
|
||||
EXPECT_STREQ(iter_result.node_trees[0]->id.name + 2, NTREE_NAME);
|
||||
|
||||
@@ -112,7 +112,7 @@ struct SocketUsageInferencer {
|
||||
const SocketInContext &socket = usage_tasks_.peek();
|
||||
this->usage_task(socket);
|
||||
if (&socket == &usage_tasks_.peek()) {
|
||||
/* The task is finished if it hasn't added any new task it depends on.*/
|
||||
/* The task is finished if it hasn't added any new task it depends on. */
|
||||
usage_tasks_.pop();
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ struct SocketUsageInferencer {
|
||||
const SocketInContext &socket = value_tasks_.peek();
|
||||
this->value_task(socket);
|
||||
if (&socket == &value_tasks_.peek()) {
|
||||
/* The task is finished if it hasn't added any new task it depends on.*/
|
||||
/* The task is finished if it hasn't added any new task it depends on. */
|
||||
value_tasks_.pop();
|
||||
}
|
||||
}
|
||||
@@ -536,7 +536,7 @@ struct SocketUsageInferencer {
|
||||
}
|
||||
const CPPType *base_type = socket->typeinfo->base_cpp_type;
|
||||
if (!base_type) {
|
||||
/* The socket type is unknown for some reason (maybe a socket type from the future?).*/
|
||||
/* The socket type is unknown for some reason (maybe a socket type from the future?). */
|
||||
all_socket_values_.add_new(socket, nullptr);
|
||||
return;
|
||||
}
|
||||
@@ -705,7 +705,7 @@ struct SocketUsageInferencer {
|
||||
const NodeInContext node = socket.owner_node();
|
||||
const int inputs_num = node->input_sockets().size();
|
||||
|
||||
/* Gather all input values are return early if any of them is not known.*/
|
||||
/* Gather all input values are return early if any of them is not known. */
|
||||
Vector<const void *> input_values(inputs_num);
|
||||
for (const int input_i : IndexRange(inputs_num)) {
|
||||
const SocketInContext input_socket = node.input_socket(input_i);
|
||||
|
||||
@@ -185,7 +185,7 @@ static PyObject *pygpu_batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_sha
|
||||
{
|
||||
static bool deprecation_warning_issued = false;
|
||||
|
||||
/* Deprecation warning raised when calling `gpu.types.GPUBatch.program_set`. */
|
||||
/* Deprecation warning raised when calling `gpu.types.GPUBatch.program_set`. */
|
||||
if (!deprecation_warning_issued) {
|
||||
PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"Calls to GPUBatch.program_set are deprecated."
|
||||
|
||||
@@ -482,7 +482,7 @@ static PyObject *bpy_rna_context_temp_override_exit(BPyContextTempOverride *self
|
||||
CTX_wm_region_set(C, self->ctx_init.region);
|
||||
is_container_set = true;
|
||||
}
|
||||
/* Enable is there is ever data nested within the region. */
|
||||
/* Enable is there is ever data nested within the region. */
|
||||
else if (false && self->ctx_temp.region_is_set) {
|
||||
if (self->ctx_init.region == CTX_wm_region(C)) {
|
||||
is_container_set = true;
|
||||
|
||||
@@ -30,11 +30,11 @@ bool edit_move_strip_to_seqbase(Scene *scene,
|
||||
Strip *strip,
|
||||
ListBase *dst_seqbase);
|
||||
/**
|
||||
* Move strip to metastrip.
|
||||
* Move strip to meta-strip.
|
||||
*
|
||||
* \param scene: Scene containing the editing
|
||||
* \param src_strip: Strip to move
|
||||
* \param dst_stripm: Target metastrip
|
||||
* \param dst_stripm: Target meta-strip
|
||||
* \param r_error_str: Error message
|
||||
*/
|
||||
bool edit_move_strip_to_meta(Scene *scene,
|
||||
|
||||
@@ -105,7 +105,7 @@ static void strip_update_muting_recursive(ListBase *channels,
|
||||
bool strip_mute = (mute || render_is_muted(channels, strip));
|
||||
|
||||
if (strip->type == STRIP_TYPE_META) {
|
||||
/* if this is the current metastrip, unmute because
|
||||
/* if this is the current meta-strip, unmute because
|
||||
* all strips above this were set to mute */
|
||||
if (strip == strip_meta) {
|
||||
strip_mute = false;
|
||||
|
||||
@@ -719,7 +719,7 @@ static wmGizmo *gizmo_find_intersected_3d(bContext *C,
|
||||
/* NOTE(@ideasman42): Regarding the hit-radius:
|
||||
*
|
||||
* - These must remain constant for all event types
|
||||
* since changing the radius per event types means mon-motion events
|
||||
* since changing the radius per event types means non-motion events
|
||||
* can cause the gizmo not to be highlighted.
|
||||
* - A single large radius would result in gizmos that are further away from the cursor
|
||||
* with a nearer Z-depth being highlighted.
|
||||
|
||||
@@ -524,7 +524,7 @@ void WM_exit_ex(bContext *C, const bool do_python_exit, const bool do_user_exit_
|
||||
* Which can happen when the GPU backend fails to initialize.
|
||||
*/
|
||||
if (C && CTX_py_init_get(C)) {
|
||||
/* Calls `addon_utils.disable_all()` as well as unregistering all "startup" modules. */
|
||||
/* Calls `addon_utils.disable_all()` as well as unregistering all "startup" modules. */
|
||||
const char *imports[] = {"bpy", "bpy.utils", nullptr};
|
||||
BPY_run_string_eval(C, imports, "bpy.utils._on_exit()");
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ void WM_window_title(wmWindowManager *wm, wmWindow *win, const char *title)
|
||||
else if (has_filepath) {
|
||||
win_title.append(BLI_path_basename(filename));
|
||||
}
|
||||
/* New / Unsaved file default title. Shows "Untitled" on macOS following the Apple HIGs.*/
|
||||
/* New / Unsaved file default title. Shows "Untitled" on macOS following the Apple HIGs. */
|
||||
else {
|
||||
#ifdef __APPLE__
|
||||
win_title.append(IFACE_("Untitled"));
|
||||
|
||||
Reference in New Issue
Block a user