mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
parent
dcb4650e98
commit
e694182e5b
20 changed files with 36 additions and 34 deletions
|
|
@ -51,7 +51,7 @@ bool BlenderSync::BKE_object_is_modified(blender::Object &b_ob)
|
|||
}
|
||||
|
||||
/* Object level material links. Note the geometry material slot array may not match
|
||||
* the object matbits array, so we need to guard against out of bouds. */
|
||||
* the object matbits array, so we need to guard against out of bounds. */
|
||||
for (const int i : blender::IndexRange(BKE_object_material_count_eval(&b_ob))) {
|
||||
if (i < b_ob.totcol && b_ob.matbits && b_ob.matbits[i] != 0) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||
set(cuda_cubins "")
|
||||
|
||||
# Modifies in parent scope:
|
||||
# - `cuda_cubins`: appended with compressed cubin/ptx output.
|
||||
# - `cuda_cubins`: appended with compressed `cubin/ptx` output.
|
||||
function(CYCLES_CUDA_KERNEL_ADD arch prev_arch name flags sources experimental)
|
||||
if(${arch} MATCHES "compute_.*")
|
||||
set(format "ptx")
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ if(WITH_CYCLES_HIP_BINARIES AND WITH_CYCLES_DEVICE_HIP)
|
|||
set(hip_fatbins "")
|
||||
|
||||
# Modifies in parent scope:
|
||||
# - `hip_fatbins`: appended with compressed fatbin output.
|
||||
# - `hip_fatbins`: appended with compressed `fatbin` output.
|
||||
function(CYCLES_HIP_KERNEL_ADD arch name flags sources experimental)
|
||||
set(format "fatbin")
|
||||
set(hip_file ${name}_${arch}.${format})
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ device_image &ImageCache::alloc_tile(Device &device,
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* For GPU cache miss, we defer to copy all tiles packed in ths same image together. */
|
||||
/* For GPU cache miss, we defer to copy all tiles packed in the same image together. */
|
||||
deferred_updates.insert(img);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class ImageCache {
|
|||
/* TODO: doesn't this mutex need to be shared with image manager? */
|
||||
thread_mutex device_mutex;
|
||||
|
||||
/* A device image may either contail a full resolution image, or a set of tiles
|
||||
/* A device image may either contain a full resolution image, or a set of tiles
|
||||
* from one or images packed together. */
|
||||
struct DeviceImage : public device_image {
|
||||
using device_image::device_image;
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ void OSLManager::device_update_post(Device *device,
|
|||
OSLRenderServices::image_manager = scene->image_manager.get();
|
||||
|
||||
foreach_shading_system([](OSL::ShadingSystem *ss) {
|
||||
/* Workaround #156348: depending on the system-wide libgcc version, EH frames registered and
|
||||
* deregistered during OSL JIT might leave the process in a bad state. There is a bug report
|
||||
/* Workaround #156348: depending on the system-wide `libgcc` version, EH frames registered and
|
||||
* de-registered during OSL JIT might leave the process in a bad state. There is a bug report
|
||||
* about it in the gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119151
|
||||
*
|
||||
* Note that it is the runtime libgcc version that matters, as it is linked dynamically. */
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class AssetLibrary {
|
|||
virtual std::optional<AssetLibraryReference> library_reference() const = 0;
|
||||
|
||||
/**
|
||||
* Return the URL of the remote asset library, or std::nullopt if this is not a remote library.
|
||||
* Return the URL of the remote asset library, or #std::nullopt if this is not a remote library.
|
||||
*
|
||||
* Note: don't use this as a way to distinguish remote vs. local libraries. Either query the
|
||||
* asset itself, or use #is_or_contains_remote_libraries(). The Essentials and All libraries may
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ ViewLayer *BKE_view_layer_find(const Scene *scene, const char *layer_name);
|
|||
/**
|
||||
* Add a new view layer by default, a view layer has the master collection.
|
||||
*
|
||||
* \params bmain Main data-base conatining the affect scene. May be null, in which case no
|
||||
* viewlayer/collection resync will happen.
|
||||
* \params bmain Main data-base containing the affect scene. May be null, in which case no
|
||||
* view-layer/collection re-synchronize will happen.
|
||||
*/
|
||||
ViewLayer *BKE_view_layer_add(
|
||||
const Main *bmain, Scene *scene, const char *name, ViewLayer *view_layer_source, int type);
|
||||
|
|
|
|||
|
|
@ -432,15 +432,17 @@ struct Main : NonCopyable, NonMovable {
|
|||
|
||||
MainLock *lock = nullptr;
|
||||
|
||||
/* Simple re-entrant 'lock' to prevent viewlayers resync during heavy operations that could lead
|
||||
* to needlessly resync the viewlayers many many times.
|
||||
/**
|
||||
* Simple re-entrant 'lock' to prevent view-layers re-synchronize during heavy
|
||||
* operations that could lead to needlessly re-synchronize the view-layers *many* times.
|
||||
*
|
||||
* Stored in Main to avoid a global lock, which can cause issues with asynchronous jobs using
|
||||
* their own local temp Main to manage their data, e.g. the preview rending tasks. See also
|
||||
* #156117.
|
||||
*
|
||||
* NOTE: This can also be modified from several threads (e.g. during depsgraph evaluation),
|
||||
* leading to transitional big numbers. */
|
||||
* leading to transitional big numbers.
|
||||
*/
|
||||
std::atomic<int32_t> no_resync = 0;
|
||||
|
||||
/* Constructors and destructors. */
|
||||
|
|
|
|||
|
|
@ -1526,7 +1526,7 @@ bool BKE_collection_is_content_editable(const Collection *collection, std::strin
|
|||
{
|
||||
if (ID_IS_OVERRIDE_LIBRARY(collection)) {
|
||||
if (r_reason) {
|
||||
*r_reason = fmt::format(fmt::runtime(RPT_("Collection '{}' is overriden.")),
|
||||
*r_reason = fmt::format(fmt::runtime(RPT_("Collection '{}' is overridden.")),
|
||||
collection->id.name + 2);
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ ViewLayer *BKE_view_layer_add(const Main *bmain,
|
|||
const int type)
|
||||
{
|
||||
BLI_assert_msg(bmain || type != VIEWLAYER_ADD_EMPTY,
|
||||
"A valid Main is required with `VIEWLAYER_ADD_EMPTY` type of prcoess");
|
||||
"A valid Main is required with `VIEWLAYER_ADD_EMPTY` type of process");
|
||||
|
||||
ViewLayer *view_layer_new;
|
||||
|
||||
|
|
|
|||
|
|
@ -209,9 +209,9 @@ bool is_metaball_object_operation(const OperationNode *operation_node)
|
|||
return object->type == OB_MBALL;
|
||||
}
|
||||
|
||||
/* Simulation modifiers with subframes (fluid domain, dynamic paint canvas) perform direct updates
|
||||
/* Simulation modifiers with sub-frames (fluid domain, dynamic paint canvas) perform direct updates
|
||||
* of other objects, which can cause race conditions over certain data (#115636). Unless and until
|
||||
* substeps are fully supported in depsgraph evaluation such objects must use single-threaded
|
||||
* sub-steps are fully supported in depsgraph evaluation such objects must use single-threaded
|
||||
* evaluation. */
|
||||
bool is_modifier_subframe_operation(const OperationNode *operation_node)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ void Camera::init()
|
|||
if ((inst_.scene->eevee.flag & SCE_EEVEE_OVERSCAN) && (inst_.drw_view || inst_.render)) {
|
||||
overscan = inst_.scene->eevee.overscan / 100.0f;
|
||||
if (inst_.is_custom_matrix()) {
|
||||
/* If using a custom matrix (XR and some offscreen render paths)
|
||||
* we need to use the v3d winmat as-is. */
|
||||
/* If using a custom matrix (XR and some off-screen render paths)
|
||||
* we need to use the v3d `winmat` as-is. */
|
||||
overscan = 0.0f;
|
||||
}
|
||||
}
|
||||
|
|
@ -139,8 +139,8 @@ void Camera::sync()
|
|||
data.viewinv = inst_.drw_view->viewinv();
|
||||
|
||||
if (inst_.is_custom_matrix()) {
|
||||
/* If using a custom matrix (XR and some offscreen render paths)
|
||||
* we need to use the v3d winmat as-is. */
|
||||
/* If using a custom matrix (XR and some off-screen render paths)
|
||||
* we need to use the v3d `winmat` as-is. */
|
||||
data.winmat = inst_.drw_view->winmat();
|
||||
data.wininv = inst_.drw_view->wininv();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static void mesh_render_data_loose_geom_build(const MeshRenderData &mr, MeshBuff
|
|||
}
|
||||
else {
|
||||
BMesh &bm = *mr.bm;
|
||||
/* Use LinearAllocator instead of IndexMaskMemory to avoid overallocation. */
|
||||
/* Use LinearAllocator instead of IndexMaskMemory to avoid over-allocation. */
|
||||
cache.loose_geom.allocator = std::make_unique<LinearAllocator<>>();
|
||||
cache.loose_geom.verts = IndexMask::from_predicate(
|
||||
IndexRange(bm.totvert), *cache.loose_geom.allocator, [&](const int i) {
|
||||
|
|
|
|||
|
|
@ -447,8 +447,8 @@ struct PaintOperationExecutor {
|
|||
if (use_fill) {
|
||||
bke::SpanAttributeWriter<int> fill_id = attributes.lookup_or_add_for_write_span<int>(
|
||||
"fill_id", bke::AttrDomain::Curve);
|
||||
/* Set new fill id to zero, because it will have uninitialized memory otherwise. Then get the
|
||||
* varray of all fill ids to compute a new one. */
|
||||
/* Set new fill id to zero, because it will have uninitialized memory otherwise.
|
||||
* Then get the #VArray of all fill ids to compute a new one. */
|
||||
fill_id.span[active_curve] = 0;
|
||||
const int new_fill_id = bke::greasepencil::get_next_available_fill_id(fill_id.span);
|
||||
fill_id.span[active_curve] = new_fill_id;
|
||||
|
|
|
|||
|
|
@ -820,7 +820,7 @@ bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
|
|||
Paint *paint = BKE_paint_get_active_from_context(C);
|
||||
ViewLayer *view_layer_eval = DEG_get_evaluated_view_layer(depsgraph);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
/* Evaluated view layers should allways be in sync with the evaluated scene and its collections.
|
||||
/* Evaluated view layers should always be in sync with the evaluated scene and its collections.
|
||||
*/
|
||||
BLI_assert(BKE_view_layer_is_synced(*view_layer_eval));
|
||||
Object *ob_act_eval = BKE_view_layer_active_object_get(view_layer_eval);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ std::optional<Bounds<float3>> view3d_calc_minmax_visible(Depsgraph *depsgraph,
|
|||
/* any one of the regions may be locked */
|
||||
(use_all_regions && v3d->flag2 & V3D_LOCK_CAMERA));
|
||||
|
||||
/* Evaluated view layers should allways be in sync with the evaluated scene and its collections.
|
||||
/* Evaluated view layers should always be in sync with the evaluated scene and its collections.
|
||||
*/
|
||||
BLI_assert(BKE_view_layer_is_synced(*view_layer_eval));
|
||||
for (Base &base_eval : *BKE_view_layer_object_bases_get(view_layer_eval)) {
|
||||
|
|
@ -256,7 +256,7 @@ std::optional<Bounds<float3>> view3d_calc_minmax_selected(Depsgraph *depsgraph,
|
|||
const Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
|
||||
ViewLayer *view_layer_eval = DEG_get_evaluated_view_layer(depsgraph);
|
||||
|
||||
/* NOTE: evaluated data is _always_ expected to have up-to-date viewlayers/collections data. */
|
||||
/* NOTE: evaluated data is _always_ expected to have up-to-date view-layers/collections data. */
|
||||
BLI_assert(BKE_view_layer_is_synced(*view_layer_eval));
|
||||
Object *ob_eval = BKE_view_layer_active_object_get(view_layer_eval);
|
||||
Object *obedit = OBEDIT_FROM_OBACT(ob_eval);
|
||||
|
|
@ -312,8 +312,8 @@ std::optional<Bounds<float3>> view3d_calc_minmax_selected(Depsgraph *depsgraph,
|
|||
FOREACH_OBJECT_IN_MODE_END;
|
||||
}
|
||||
else if (ob_eval && (ob_eval->mode & OB_MODE_POSE)) {
|
||||
/* NOTE: Passing `bmain` here because this iterator ensures that viewlayers are in sync. We
|
||||
* already assert about it in code above. */
|
||||
/* NOTE: Passing `bmain` here because this iterator ensures that view-layers are in sync.
|
||||
* We already assert about it in code above. */
|
||||
FOREACH_OBJECT_IN_MODE_BEGIN (
|
||||
null_bmain, scene_eval, view_layer_eval, v3d, ob_eval->type, ob_eval->mode, ob_eval_iter)
|
||||
{
|
||||
|
|
@ -335,8 +335,8 @@ std::optional<Bounds<float3>> view3d_calc_minmax_selected(Depsgraph *depsgraph,
|
|||
changed = PE_minmax(depsgraph, scene, view_layer, min, max);
|
||||
}
|
||||
else if (ob_eval && (ob_eval->mode & OB_MODE_SCULPT_CURVES)) {
|
||||
/* NOTE: Passing `bmain` here because this iterator ensures that viewlayers are in sync. We
|
||||
* already assert about it in code above. */
|
||||
/* NOTE: Passing `bmain` here because this iterator ensures that view-layers are in sync.
|
||||
* We already assert about it in code above. */
|
||||
FOREACH_OBJECT_IN_MODE_BEGIN (
|
||||
null_bmain, scene_eval, view_layer_eval, v3d, ob_eval->type, ob_eval->mode, ob_eval_iter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ struct VKCopyImageData {
|
|||
VkImage dst_image;
|
||||
VkImageCopy region;
|
||||
/**
|
||||
* \brief The number of miplevels to copy.
|
||||
* \brief The number of mip-levels to copy.
|
||||
*
|
||||
* Additional regions are added just before sending to the command buffer.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ extern const EnumPropertyItem geometry_nodes_input_type_items_value_or_attribute
|
|||
extern const EnumPropertyItem geometry_nodes_input_type_items_value_or_attribute_or_layer[];
|
||||
|
||||
/**
|
||||
* Contains a runtime registraction of RNA types generated based on the node group's interface for
|
||||
* Contains a runtime registration of RNA types generated based on the node group's interface for
|
||||
* a particular context. These RNA types are not registered in the global list, but owned by the
|
||||
* node group so that RNA access to interface properties works as long as the node group exists.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ BASE_API_URL = "https://projects.blender.org/api/v1"
|
|||
|
||||
def url_json_get(url: str, quiet: bool = False) -> dict[str, Any] | list[dict[str, Any]] | None:
|
||||
request = urllib.request.Request(url)
|
||||
# If the token evironment variable is set, add the `Authorization` header to the request
|
||||
# If the token environment variable is set, add the `Authorization` header to the request
|
||||
token = os.environ.get(API_TOKEN_ENV)
|
||||
if token:
|
||||
request.add_header('Authorization', "token " + token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue