[Bf-blender-cvs] [a070960b5dd] tmp-vfx-platform-2023: Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023
Commit: a070960b5ddf15f42ab51e5e9ce3e5d582ca4e4a Author: Ray Molenkamp Date: Thu Oct 27 01:17:45 2022 -0700 Branches: tmp-vfx-platform-2023 https://developer.blender.org/rBa070960b5ddf15f42ab51e5e9ce3e5d582ca4e4a Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023 === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4fa478c7249] universal-scene-description: USD Export: handle meshes in edit mode.
Commit: 4fa478c724903ee3d4a4cb6aaf05775a7c46ad01 Author: Michael Kowalski Date: Wed Oct 26 19:58:28 2022 -0400 Branches: universal-scene-description https://developer.blender.org/rB4fa478c724903ee3d4a4cb6aaf05775a7c46ad01 USD Export: handle meshes in edit mode. Small change to ensure Edit mode meshes are committed during the export process. Without this change, meshes may be empty in the USD. This update was authored by Charles Wardlaw. === M source/blender/io/usd/intern/usd_writer_mesh.cc === diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc index fca7ab08e30..3d2aacb2d42 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.cc +++ b/source/blender/io/usd/intern/usd_writer_mesh.cc @@ -19,6 +19,7 @@ #include "BKE_material.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_object.h" @@ -26,7 +27,6 @@ #include "bmesh_tools.h" #include "DEG_depsgraph.h" - #include "DNA_layer_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -504,6 +504,8 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh) write_visibility(context, timecode, usd_mesh); USDMeshData usd_mesh_data; + /* ensure data exists if currently in edit mode */ + BKE_mesh_wrapper_ensure_mdata(mesh); get_geometry_data(mesh, usd_mesh_data); if (usd_export_context_.export_params.export_vertices) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1e7776907c0] master: Fix T101925: sculpt color painting not updating with Cycles viewport render
Commit: 1e7776907c004ad8c6081b4cfcdeda5ec793b174 Author: Brecht Van Lommel Date: Wed Oct 26 18:01:45 2022 +0200 Branches: master https://developer.blender.org/rB1e7776907c004ad8c6081b4cfcdeda5ec793b174 Fix T101925: sculpt color painting not updating with Cycles viewport render * External engines do not use the PBVH and need slower depsgraph updates. * Final depsgraph tag after stroke finishes was missing for sculpt color painting, caused missing updates for other viewports as well as any modifiers or nodes on other objects using the colors. === M source/blender/blenkernel/BKE_paint.h M source/blender/blenkernel/intern/paint.cc M source/blender/draw/engines/basic/basic_engine.c M source/blender/draw/engines/eevee/eevee_materials.c M source/blender/draw/engines/overlay/overlay_facing.cc M source/blender/draw/engines/overlay/overlay_fade.cc M source/blender/draw/engines/overlay/overlay_mode_transfer.cc M source/blender/draw/engines/overlay/overlay_sculpt.cc M source/blender/draw/engines/overlay/overlay_wireframe.cc M source/blender/draw/engines/workbench/workbench_engine.c M source/blender/editors/sculpt_paint/sculpt.c M source/blender/editors/sculpt_paint/sculpt_undo.c === diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 437a22e4782..9fc4aa5307d 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -886,7 +886,7 @@ void BKE_sculpt_sync_face_visibility_to_grids(struct Mesh *mesh, struct SubdivCC * Test if PBVH can be used directly for drawing, which is faster than * drawing the mesh and all updates that come with it. */ -bool BKE_sculptsession_use_pbvh_draw(const struct Object *ob, const struct View3D *v3d); +bool BKE_sculptsession_use_pbvh_draw(const struct Object *ob, const struct RegionView3D *rv3d); enum { SCULPT_MASK_LAYER_CALC_VERT = (1 << 0), diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 408cd117e32..965cd153d00 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -2316,7 +2316,7 @@ void BKE_sculpt_bvh_update_from_ccg(PBVH *pbvh, SubdivCCG *subdiv_ccg) &key); } -bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const View3D * /*v3d*/) +bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const RegionView3D *rv3d) { SculptSession *ss = ob->sculpt; if (ss == nullptr || ss->pbvh == nullptr || ss->mode_type != OB_MODE_SCULPT) { @@ -2324,9 +2324,10 @@ bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const View3D * /*v3d*/) } if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES) { -/* Regular mesh only draws from PBVH without modifiers and shape keys. */ - -return !(ss->shapekey_active || ss->deform_modifiers_active); +/* Regular mesh only draws from PBVH without modifiers and shape keys, or for + * external engines that do not have access to the PBVH like Eevee does. */ +const bool external_engine = rv3d && rv3d->render_engine != nullptr; +return !(ss->shapekey_active || ss->deform_modifiers_active || external_engine); } /* Multires and dyntopo always draw directly from the PBVH. */ diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c index eee6a5a7cb5..05e62764bb1 100644 --- a/source/blender/draw/engines/basic/basic_engine.c +++ b/source/blender/draw/engines/basic/basic_engine.c @@ -182,7 +182,7 @@ static void basic_cache_populate(void *vedata, Object *ob) } } - const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) && + const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->rv3d) && !DRW_state_is_image_render(); const bool do_cull = (draw_ctx->v3d && (draw_ctx->v3d->shading.flag & V3D_SHADING_BACKFACE_CULLING)); diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 068b18f1117..b134d7f6dc6 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -810,7 +810,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, const DRWContextState *draw_ctx = DRW_context_state_get(); Scene *scene = draw_ctx->scene; - bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) && + bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->rv3d) && !DRW_state_is_image_render(); if (ob->sculpt && ob->sculpt->pbvh) { diff --git a/source/blender/draw/engines/overlay/overlay_facing.cc b/source/blender/draw/engines/overlay/overlay_fa
[Bf-blender-cvs] [1840f44666f] master: Fix build error on Windows without precompiled headers
Commit: 1840f44666fee3807a8090097e0c50dd5be6401e Author: Brecht Van Lommel Date: Wed Oct 26 18:58:04 2022 +0200 Branches: master https://developer.blender.org/rB1840f44666fee3807a8090097e0c50dd5be6401e Fix build error on Windows without precompiled headers Recent refactoring to use uint relied on indirect includes and precompiled headers for uint to be defined. Explicitly include BLI_sys_types where this type is used now. === M source/blender/freestyle/intern/geometry/FitCurve.cpp M source/blender/freestyle/intern/geometry/GeomCleaner.cpp M source/blender/freestyle/intern/geometry/GeomUtils.cpp M source/blender/freestyle/intern/geometry/HashGrid.cpp M source/blender/freestyle/intern/geometry/Noise.cpp M source/blender/freestyle/intern/image/ImagePyramid.cpp M source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp M source/blender/freestyle/intern/python/BPy_FrsNoise.cpp M source/blender/freestyle/intern/python/BPy_IntegrationType.cpp M source/blender/freestyle/intern/python/BPy_Operators.cpp M source/blender/freestyle/intern/python/BPy_SShape.cpp M source/blender/freestyle/intern/python/BPy_ViewShape.cpp M source/blender/freestyle/intern/python/Director.cpp M source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp M source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp M source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp M source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp M source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp M source/blender/freestyle/intern/scene_graph/NodeTransform.cpp M source/blender/freestyle/intern/scene_graph/SceneHash.cpp M source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp M source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp M source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp M source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp M source/blender/freestyle/intern/stroke/Canvas.cpp M source/blender/freestyle/intern/stroke/ContextFunctions.cpp M source/blender/freestyle/intern/stroke/Operators.cpp M source/blender/freestyle/intern/stroke/StrokeRenderer.cpp M source/blender/freestyle/intern/system/StringUtils.cpp M source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp M source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp M source/blender/freestyle/intern/view_map/BoxGrid.cpp M source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp M source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp M source/blender/freestyle/intern/view_map/Functions0D.cpp M source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp M source/blender/freestyle/intern/view_map/OccluderSource.cpp M source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.cpp M source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp M source/blender/freestyle/intern/view_map/SphericalGrid.cpp M source/blender/freestyle/intern/view_map/SteerableViewMap.cpp M source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp M source/blender/freestyle/intern/view_map/ViewMap.cpp M source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp M source/blender/freestyle/intern/winged_edge/WEdge.cpp M source/blender/freestyle/intern/winged_edge/WXEdge.cpp M source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp M source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp === diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp index ad9b7dfa5ed..0d47665c6d3 100644 --- a/source/blender/fre
[Bf-blender-cvs] [0385e4df3cc] master: Fix slow continuous depsgraph updates in sculpt paint mode in some cases
Commit: 0385e4df3cc30e5ccae1ff3c2abcf718a7d7b794 Author: Brecht Van Lommel Date: Wed Oct 26 19:27:12 2022 +0200 Branches: master https://developer.blender.org/rB0385e4df3cc30e5ccae1ff3c2abcf718a7d7b794 Fix slow continuous depsgraph updates in sculpt paint mode in some cases Updates for cursor could cause the paint data to be continuously refreshed, which is pretty cheap by itself, but not when it starts tagging the depsgraph. The paint slot refresh code ideally should not be doing depsgraph tags at all, but checking if there were changes at least avoids continuous updates. === M source/blender/blenkernel/intern/material.c === diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 6c6d2298dbd..51e27f173c8 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -1512,58 +1512,65 @@ static ePaintSlotFilter material_paint_slot_filter(const struct Object *ob) void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma, const struct Object *ob) { - int count = 0; - if (!ma) { return; } const ePaintSlotFilter slot_filter = material_paint_slot_filter(ob); - /* COW needed when adding texture slot on an object with no materials. */ - DEG_id_tag_update(&ma->id, ID_RECALC_SHADING | ID_RECALC_COPY_ON_WRITE); + const TexPaintSlot *prev_texpaintslot = ma->texpaintslot; + const int prev_paint_active_slot = ma->paint_active_slot; + const int prev_paint_clone_slot = ma->paint_clone_slot; + const int prev_tot_slots = ma->tot_slots; - if (ma->texpaintslot) { -MEM_freeN(ma->texpaintslot); -ma->tot_slots = 0; -ma->texpaintslot = NULL; - } + ma->texpaintslot = NULL; + ma->tot_slots = 0; if (scene->toolsettings->imapaint.mode == IMAGEPAINT_MODE_IMAGE) { ma->paint_active_slot = 0; ma->paint_clone_slot = 0; -return; } - - if (!(ma->nodetree)) { + else if (!(ma->nodetree)) { ma->paint_active_slot = 0; ma->paint_clone_slot = 0; -return; } + else { +int count = count_texture_nodes_recursive(ma->nodetree, slot_filter); - count = count_texture_nodes_recursive(ma->nodetree, slot_filter); - - if (count == 0) { -ma->paint_active_slot = 0; -ma->paint_clone_slot = 0; -return; - } +if (count == 0) { + ma->paint_active_slot = 0; + ma->paint_clone_slot = 0; +} +else { + ma->texpaintslot = MEM_callocN(sizeof(*ma->texpaintslot) * count, "texpaint_slots"); - ma->texpaintslot = MEM_callocN(sizeof(*ma->texpaintslot) * count, "texpaint_slots"); + bNode *active_node = nodeGetActivePaintCanvas(ma->nodetree); - bNode *active_node = nodeGetActivePaintCanvas(ma->nodetree); + fill_texpaint_slots_recursive(ma->nodetree, active_node, ob, ma, count, slot_filter); - fill_texpaint_slots_recursive(ma->nodetree, active_node, ob, ma, count, slot_filter); + ma->tot_slots = count; - ma->tot_slots = count; + if (ma->paint_active_slot >= count) { +ma->paint_active_slot = count - 1; + } - if (ma->paint_active_slot >= count) { -ma->paint_active_slot = count - 1; + if (ma->paint_clone_slot >= count) { +ma->paint_clone_slot = count - 1; + } +} } - if (ma->paint_clone_slot >= count) { -ma->paint_clone_slot = count - 1; + /* COW needed when adding texture slot on an object with no materials. + * But do it only when slots actually change to avoid continuous depsgrap updates. */ + if (ma->tot_slots != prev_tot_slots || ma->paint_active_slot != prev_paint_active_slot || + ma->paint_clone_slot != prev_paint_clone_slot || + (ma->texpaintslot && prev_texpaintslot && + memcmp(ma->texpaintslot, prev_texpaintslot, sizeof(*ma->texpaintslot) * ma->tot_slots) != + 0)) { +DEG_id_tag_update(&ma->id, ID_RECALC_SHADING | ID_RECALC_COPY_ON_WRITE); } + + MEM_SAFE_FREE(prev_texpaintslot); } void BKE_texpaint_slots_refresh_object(Scene *scene, struct Object *ob) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bc7de854c90] master: Sculpt: fix T102067: Set material properly in new pbvh draw
Commit: bc7de854c90dd45758e7ff59c88ed0121c8a Author: Joseph Eagar Date: Wed Oct 26 19:00:55 2022 +0200 Branches: master https://developer.blender.org/rBbc7de854c90dd45758e7ff59c88ed0121c8a Sculpt: fix T102067: Set material properly in new pbvh draw Note: Still need to fix PBVH_BMESH. === M source/blender/draw/intern/draw_pbvh.cc === diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc index 38fb6d55245..a4de9e4fa47 100644 --- a/source/blender/draw/intern/draw_pbvh.cc +++ b/source/blender/draw/intern/draw_pbvh.cc @@ -951,6 +951,13 @@ struct PBVHBatches { void create_index_faces(PBVH_GPU_Args *args) { +int *mat_index = static_cast(CustomData_get_layer_named(args->pdata, CD_PROP_INT32, "material_index")); + +if (mat_index && args->totprim) { + int poly_index = args->mlooptri[args->prim_indices[0]].poly; + material_index = mat_index[poly_index]; +} + /* Calculate number of edges*/ int edge_count = 0; for (int i = 0; i < args->totprim; i++) { @@ -959,6 +966,7 @@ struct PBVHBatches { if (args->hide_poly && args->hide_poly[lt->poly]) { continue; } + int r_edges[3]; BKE_mesh_looptri_get_real_edges(args->me, lt, r_edges); @@ -1030,6 +1038,14 @@ struct PBVHBatches { void create_index_grids(PBVH_GPU_Args *args) { +int *mat_index = static_cast( +CustomData_get_layer_named(args->pdata, CD_PROP_INT32, "material_index")); + +if (mat_index && args->totprim) { + int poly_index = BKE_subdiv_ccg_grid_to_face_index(args->subdiv_ccg, args->grid_indices[0]); + material_index = mat_index[poly_index]; +} + needs_tri_index = true; int gridsize = args->ccg_key.grid_size; int totgrid = args->totprim; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [414d5429fe3] master: Cycles: oneAPI: update dg2 target to acm-g10
Commit: 414d5429fe32587c56c423308ad0a40fad242dab Author: Xavier Hallade Date: Wed Oct 26 18:30:48 2022 +0200 Branches: master https://developer.blender.org/rB414d5429fe32587c56c423308ad0a40fad242dab Cycles: oneAPI: update dg2 target to acm-g10 Reverting 63aec82e8ae388c8ae0cf3717d18a1eb1e97395a since IGC dependency now supports acm-g10 target. === M CMakeLists.txt === diff --git a/CMakeLists.txt b/CMakeLists.txt index f2f34ca3dd2..3c5fa8a63f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -489,8 +489,8 @@ if(NOT APPLE) option(WITH_CYCLES_ONEAPI_BINARIES "Enable Ahead-Of-Time compilation for Cycles oneAPI device" OFF) # https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html - # acm-g10 is the architecture for the first Arc Alchemist GPUs but we'll keep using dg2 until IGC dependency is updated to support acm-g10. - set(CYCLES_ONEAPI_SPIR64_GEN_DEVICES "dg2" CACHE STRING "oneAPI Intel GPU architectures to build binaries for") + # acm-g10 is the target for the first Intel Arc Alchemist GPUs. + set(CYCLES_ONEAPI_SPIR64_GEN_DEVICES "acm-g10" CACHE STRING "oneAPI Intel GPU architectures to build binaries for") set(CYCLES_ONEAPI_SYCL_TARGETS spir64 spir64_gen CACHE STRING "oneAPI targets to build AOT binaries for") mark_as_advanced(CYCLES_ONEAPI_SPIR64_GEN_DEVICES) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ff89c1793d8] master: Cycles: List Level-Zero in oneAPI device requirements in the UI on Linux
Commit: ff89c1793d8c75615ed43248def25812ec13e6e3 Author: Xavier Hallade Date: Wed Oct 26 14:13:18 2022 +0200 Branches: master https://developer.blender.org/rBff89c1793d8c75615ed43248def25812ec13e6e3 Cycles: List Level-Zero in oneAPI device requirements in the UI on Linux Intel documentation for Ubuntu 22.04 does list all runtime components needed by the driver and oneAPI Cycles device but end-users getting drivers from (other) sources can easily end-up missing required Level-Zero Loader and struggle root causing what's wrong in their system. Calling this requirement out in the UI will hopefull help them. oneAPI Level-Zero incl. Loader: https://github.com/oneapi-src/level-zero Common package names: level-zero, level-zero-loader === M intern/cycles/blender/addon/properties.py === diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 425d123e9e6..94e2d840b28 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1636,11 +1636,13 @@ class CyclesPreferences(bpy.types.AddonPreferences): col.label(text="and AMD driver version 22.10 or newer", icon='BLANK1') elif device_type == 'ONEAPI': import sys -col.label(text="Requires Intel GPU with Xe-HPG architecture", icon='BLANK1') if sys.platform.startswith("win"): +col.label(text="Requires Intel GPU with Xe-HPG architecture", icon='BLANK1') col.label(text="and Windows driver version 101.3430 or newer", icon='BLANK1') elif sys.platform.startswith("linux"): -col.label(text="and Linux driver version xx.xx.23904 or newer", icon='BLANK1') +col.label(text="Requires Intel GPU with Xe-HPG architecture and", icon='BLANK1') +col.label(text=" - Linux driver version xx.xx.23904 or newer", icon='BLANK1') +col.label(text=" - oneAPI Level-Zero Loader", icon='BLANK1') elif device_type == 'METAL': col.label(text="Requires Apple Silicon with macOS 12.2 or newer", icon='BLANK1') col.label(text="or AMD with macOS 12.3 or newer", icon='BLANK1') ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [514f4e8b47b] blender-v3.3-release: Fix T101903: Crash when deleting library in some cases.
Commit: 514f4e8b47bf4c3d57cf74780cb3b8178e8f1a19 Author: Bastien Montagne Date: Wed Oct 19 09:18:47 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB514f4e8b47bf4c3d57cf74780cb3b8178e8f1a19 Fix T101903: Crash when deleting library in some cases. Remapping in batch deletion could end up calling viewlayer resync code on partially invalid BMain (some IDs still in Main using IDs removed from Main). Think this code can actually be further optimized, but this fix should be safe enough for 3.3 (and potentially 2.93). Thanks to Jeroen (@jbakker) for the initial investigation. === M source/blender/blenkernel/intern/lib_id_delete.c === diff --git a/source/blender/blenkernel/intern/lib_id_delete.c b/source/blender/blenkernel/intern/lib_id_delete.c index 8d5699d7d49..78e800e1fdb 100644 --- a/source/blender/blenkernel/intern/lib_id_delete.c +++ b/source/blender/blenkernel/intern/lib_id_delete.c @@ -23,6 +23,7 @@ #include "BKE_idprop.h" #include "BKE_idtype.h" #include "BKE_key.h" +#include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_lib_override.h" #include "BKE_lib_remap.h" @@ -217,6 +218,7 @@ static size_t id_delete(Main *bmain, const bool do_tagged_deletion) BKE_main_lock(bmain); if (do_tagged_deletion) { +BKE_layer_collection_resync_forbid(); /* Main idea of batch deletion is to remove all IDs to be deleted from Main database. * This means that we won't have to loop over all deleted IDs to remove usages * of other deleted IDs. @@ -279,6 +281,9 @@ static size_t id_delete(Main *bmain, const bool do_tagged_deletion) } } +BKE_layer_collection_resync_allow(); +BKE_main_collection_sync_remap(bmain); + /* Now we can safely mark that ID as not being in Main database anymore. */ /* NOTE: This needs to be done in a separate loop than above, otherwise some usercounts of * deleted IDs may not be properly decreased by the remappings (since `NO_MAIN` ID usercounts ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [30774f01cdc] blender-v3.3-release: Fix T98672: Noise texture shows incorrect behaviour for large scales
Commit: 30774f01cdcc0855a444715940d318984c10f27e Author: Lukas Stockner Date: Sun Oct 16 01:57:44 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB30774f01cdcc0855a444715940d318984c10f27e Fix T98672: Noise texture shows incorrect behaviour for large scales This was a floating point precision issue - or, to be more precise, an issue with how Cycles split floats into the integer and fractional parts for Perlin noise. For coordinates below -2^24, the integer could be wrong, leading to the fractional part being outside of 0-1 range, which breaks all sorts of other things. 2^24 sounds like a lot, but due to how the detail octaves work, it's not that hard to reach when combined with a large scale. Since this code is originally based on OSL, I checked if they changed it in the meantime, and sure enough, there's a fix for it: https://github.com/OpenImageIO/oiio/commit/5c9dc68391e9 So, this basically just ports over that change to Cycles. The original code mentions being faster, but as pointed out in the linked commit, the performance impact is actually irrelevant. I also checked in a simple scene with eight Noise textures at detail 15 (with >90% of render time being spent on the noise), and the render time went from 13.06sec to 13.05sec. So, yeah, no issue. === M intern/cycles/util/math.h M intern/cycles/util/math_float3.h M intern/cycles/util/ssef.h === diff --git a/intern/cycles/util/math.h b/intern/cycles/util/math.h index f6400cb879f..b3bff9bccf2 100644 --- a/intern/cycles/util/math.h +++ b/intern/cycles/util/math.h @@ -417,15 +417,11 @@ ccl_device_inline int floor_to_int(float f) return float_to_int(floorf(f)); } -ccl_device_inline int quick_floor_to_int(float x) -{ - return float_to_int(x) - ((x < 0) ? 1 : 0); -} - ccl_device_inline float floorfrac(float x, ccl_private int *i) { - *i = quick_floor_to_int(x); - return x - *i; + float f = floorf(x); + *i = float_to_int(f); + return x - f; } ccl_device_inline int ceil_to_int(float f) diff --git a/intern/cycles/util/math_float3.h b/intern/cycles/util/math_float3.h index c408eadf195..eec7122b9dc 100644 --- a/intern/cycles/util/math_float3.h +++ b/intern/cycles/util/math_float3.h @@ -535,18 +535,6 @@ ccl_device_inline float3 pow(float3 v, float e) return make_float3(powf(v.x, e), powf(v.y, e), powf(v.z, e)); } -ccl_device_inline int3 quick_floor_to_int3(const float3 a) -{ -#ifdef __KERNEL_SSE__ - int3 b = int3(_mm_cvttps_epi32(a.m128)); - int3 isneg = int3(_mm_castps_si128(_mm_cmplt_ps(a.m128, _mm_set_ps1(0.0f; - /* Unsaturated add 0x is the same as subtract -1. */ - return b + isneg; -#else - return make_int3(quick_floor_to_int(a.x), quick_floor_to_int(a.y), quick_floor_to_int(a.z)); -#endif -} - ccl_device_inline bool isfinite_safe(float3 v) { return isfinite_safe(v.x) && isfinite_safe(v.y) && isfinite_safe(v.z); diff --git a/intern/cycles/util/ssef.h b/intern/cycles/util/ssef.h index ad435e65b01..1e2bfa90354 100644 --- a/intern/cycles/util/ssef.h +++ b/intern/cycles/util/ssef.h @@ -5,6 +5,8 @@ #ifndef __UTIL_SSEF_H__ #define __UTIL_SSEF_H__ +#include + #include "util/ssei.h" CCL_NAMESPACE_BEGIN @@ -534,6 +536,12 @@ __forceinline const ssef ceil(const ssef &a) return _mm_round_ps(a, _MM_FROUND_TO_POS_INF); #endif } +# else +/* Non-SSE4.1 fallback, needed for floorfrac. */ +__forceinline const ssef floor(const ssef &a) +{ + return _mm_set_ps(floorf(a.f[3]), floorf(a.f[2]), floorf(a.f[1]), floorf(a.f[0])); +} # endif __forceinline ssei truncatei(const ssef &a) @@ -541,20 +549,11 @@ __forceinline ssei truncatei(const ssef &a) return _mm_cvttps_epi32(a.m128); } -/* This is about 25% faster than straightforward floor to integer conversion - * due to better pipelining. - * - * Unsaturated add 0x (a < 0) is the same as subtract -1. - */ -__forceinline ssei floori(const ssef &a) -{ - return truncatei(a) + cast((a < 0.0f).m128); -} - __forceinline ssef floorfrac(const ssef &x, ssei *i) { - *i = floori(x); - return x - ssef(*i); + ssef f = floor(x); + *i = truncatei(f); + return x - f; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [5916e73b288] blender-v3.3-release: Fix T100699: Older preferences from 2.93 wont load
Commit: 5916e73b2888537926d9aa71125a265989fa9e5a Author: Campbell Barton Date: Thu Oct 13 17:33:50 2022 +1100 Branches: blender-v3.3-release https://developer.blender.org/rB5916e73b2888537926d9aa71125a265989fa9e5a Fix T100699: Older preferences from 2.93 wont load Even though this was intentionally removed in [0], loading data from older startup files is supported. So show them when available. [0]: 45439dfe4c05eabaa83d0c1b75463966b5ba896d === M release/scripts/startup/bl_operators/userpref.py === diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py index ce23024fed5..6a027c0ce1f 100644 --- a/release/scripts/startup/bl_operators/userpref.py +++ b/release/scripts/startup/bl_operators/userpref.py @@ -89,6 +89,17 @@ class PREFERENCES_OT_copy_prev(Operator): if os.path.isdir(cls._old_version_path(version_split)): return version_split version_old = version_old - 1 + +# Support loading 2.8x..2.9x startup (any older isn't so useful to load). +# NOTE: remove this block for Blender 4.0 and later. +if version_old == 299: +version_old = 294 +while version_old >= 280: +version_split = version_old // 100, version_old % 100 +if os.path.isdir(cls._old_version_path(version_split)): +return version_split +version_old = version_old - 1 + return None @classmethod ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2a7b8e78e19] blender-v3.3-release: Fix T99997: Calling teleport without waiting for the previous event disables gravity
Commit: 2a7b8e78e192277aaaef5805aa9166365e23e076 Author: Pratik Borhade Date: Wed Oct 19 18:20:47 2022 +0530 Branches: blender-v3.3-release https://developer.blender.org/rB2a7b8e78e192277aaaef5805aa9166365e23e076 Fix T7: Calling teleport without waiting for the previous event disables gravity During teleport event, gravity is disabled and WalkMethod is stored in `teleport.navigation_mode` which is used later to reset the status after execution. Calling teleport events consecutively will change the initial WalkMethod value. So update it only on the first call. Also remove `else condition` as it stops the previously running teleport when the new teleport call fails to find a hit point. Reviewed by: dfelinto, mano-wii Differential Revision: https://developer.blender.org/D15574 === M source/blender/editors/space_view3d/view3d_navigate_walk.c === diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c index 69deaab7ebe..7d4f56f04c4 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.c +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c @@ -849,11 +849,15 @@ static void walkEvent(WalkInfo *walk, const wmEvent *event) if (ret) { WalkTeleport *teleport = &walk->teleport; + + /* Store the current navigation mode if we are not already teleporting. */ + if (teleport->state == WALK_TELEPORT_STATE_OFF) { +teleport->navigation_mode = walk->navigation_mode; + } teleport->state = WALK_TELEPORT_STATE_ON; teleport->initial_time = PIL_check_seconds_timer(); teleport->duration = U.walk_navigation.teleport_time; - teleport->navigation_mode = walk->navigation_mode; walk_navigation_mode_set(walk, WALK_MODE_FREE); copy_v3_v3(teleport->origin, walk->rv3d->viewinv[3]); @@ -864,9 +868,7 @@ static void walkEvent(WalkInfo *walk, const wmEvent *event) sub_v3_v3v3(teleport->direction, loc, teleport->origin); } -else { - walk->teleport.state = WALK_TELEPORT_STATE_OFF; -} + break; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1492f566c83] blender-v3.3-release: Fix T99450: Animated Holdout not updating on frame change
Commit: 1492f566c83c7c7a631ecc8b0c9113981fda75c5 Author: Lukas Stockner Date: Sat Oct 15 22:51:21 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB1492f566c83c7c7a631ecc8b0c9113981fda75c5 Fix T99450: Animated Holdout not updating on frame change Problem here was that layer_collection_objects_sync wasn't called when the holdout property is updated due to frame change, so the changed visibility flag was never applied to ob->base_flag. Turns out there's no real reason to handle the per-object holdout property through the layer system. So, instead of merging both the layer holdout and object holdout into base_flag and checking that from the render engines, only handle the layer holdout (which can't be animated, so no issue here) through base_flag and explicitly also check the object holdout in the render engines. === M source/blender/blenkernel/intern/layer.c M source/blender/draw/engines/eevee/eevee_materials.c M source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp M source/blender/makesrna/intern/rna_object_api.c === diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 4257bccad93..0e34d08082f 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -1012,7 +1012,7 @@ static void layer_collection_objects_sync(ViewLayer *view_layer, } /* Holdout and indirect only */ -if ((layer->flag & LAYER_COLLECTION_HOLDOUT) || (base->object->visibility_flag & OB_HOLDOUT)) { +if ((layer->flag & LAYER_COLLECTION_HOLDOUT)) { base->flag_from_collection |= BASE_HOLDOUT; } if (layer->flag & LAYER_COLLECTION_INDIRECT_ONLY) { diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index efd27c19654..39ab91861f9 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -752,7 +752,8 @@ BLI_INLINE Material *eevee_object_material_get(Object *ob, int slot, bool holdou BLI_INLINE EeveeMaterialCache eevee_material_cache_get( EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, int slot, bool is_hair) { - const bool holdout = (ob->base_flag & BASE_HOLDOUT) != 0; + const bool holdout = ((ob->base_flag & BASE_HOLDOUT) != 0) || + ((ob->visibility_flag & OB_HOLDOUT) != 0); EeveeMaterialCache matcache; Material *ma = eevee_object_material_get(ob, slot, holdout); switch (ma->blend_method) { diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index e76e74b89e4..299036a552f 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -69,7 +69,8 @@ NodeGroup *BlenderFileLoader::Load() break; } -if (ob->base_flag & (BASE_HOLDOUT | BASE_INDIRECT_ONLY)) { +if ((ob->base_flag & (BASE_HOLDOUT | BASE_INDIRECT_ONLY)) || +(ob->visibility_flag & OB_HOLDOUT)) { continue; } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 6967f78026a..5ba160c1926 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -192,7 +192,7 @@ static bool rna_Object_holdout_get(Object *ob, bContext *C, ViewLayer *view_laye return false; } - return ((base->flag & BASE_HOLDOUT) != 0); + return ((base->flag & BASE_HOLDOUT) != 0) || ((ob->visibility_flag & OB_HOLDOUT) != 0); } static bool rna_Object_indirect_only_get(Object *ob, bContext *C, ViewLayer *view_layer) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [94ec66c2f28] blender-v3.3-release: Fix T99565: Cycles reading TGA files with alpha different than Blender
Commit: 94ec66c2f2859c717789a41cd5b8f0af0d7ec379 Author: Brecht Van Lommel Date: Mon Oct 17 14:20:42 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB94ec66c2f2859c717789a41cd5b8f0af0d7ec379 Fix T99565: Cycles reading TGA files with alpha different than Blender Thanks to Lukas for tracking down the cause in OIIO. === M intern/cycles/scene/image_oiio.cpp === diff --git a/intern/cycles/scene/image_oiio.cpp b/intern/cycles/scene/image_oiio.cpp index 67d73759dd9..ea11e4da628 100644 --- a/intern/cycles/scene/image_oiio.cpp +++ b/intern/cycles/scene/image_oiio.cpp @@ -193,8 +193,17 @@ bool OIIOImageLoader::load_pixels(const ImageMetaData &metadata, return false; } - const bool do_associate_alpha = associate_alpha && - spec.get_int_attribute("oiio:UnassociatedAlpha", 0); + bool do_associate_alpha = false; + if (associate_alpha) { +do_associate_alpha = spec.get_int_attribute("oiio:UnassociatedAlpha", 0); + +/* Workaround OIIO not detecting TGA file alpha the same as Blender (since #3019). + * We want anything not marked as premultiplied alpha to get associated. */ +if (!do_associate_alpha && spec.alpha_channel != -1 && +strcmp(in->format_name(), "targa") == 0) { + do_associate_alpha = spec.get_int_attribute("targa:alpha_type", -1) != 4; +} + } switch (metadata.type) { case IMAGE_DATA_TYPE_BYTE: ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e5af9a12d75] blender-v3.3-release: Fix T101262: Crash in spreadsheet selection filter with empty domain
Commit: e5af9a12d7560d5ea279b78e6b7bb1f9fef8de5b Author: Hans Goudey Date: Wed Sep 21 17:34:30 2022 -0500 Branches: blender-v3.3-release https://developer.blender.org/rBe5af9a12d7560d5ea279b78e6b7bb1f9fef8de5b Fix T101262: Crash in spreadsheet selection filter with empty domain The BMesh selection virtual array was empty. There are a few different places we could add an "empty" check here, but at the top of the function is the simplest for now. === M source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc === diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc index fdcf9798b7f..c772a711522 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc @@ -265,6 +265,9 @@ IndexMask GeometryDataSource::apply_selection_filter(Vector &indices) c { std::lock_guard lock{mutex_}; const IndexMask full_range(this->tot_rows()); + if (full_range.is_empty()) { +return full_range; + } switch (component_->type()) { case GEO_COMPONENT_TYPE_MESH: { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [5ff62df238f] blender-v3.3-release: Cycles: Fix floor intrinsic for ARM Neon
Commit: 5ff62df238ff5558f7c45f848749e1839d18d99a Author: Lukas Stockner Date: Mon Oct 17 00:56:19 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB5ff62df238ff5558f7c45f848749e1839d18d99a Cycles: Fix floor intrinsic for ARM Neon === M intern/cycles/util/ssef.h === diff --git a/intern/cycles/util/ssef.h b/intern/cycles/util/ssef.h index a2fff94303e..ad435e65b01 100644 --- a/intern/cycles/util/ssef.h +++ b/intern/cycles/util/ssef.h @@ -521,7 +521,7 @@ __forceinline const ssef round_zero(const ssef &a) __forceinline const ssef floor(const ssef &a) { #ifdef __KERNEL_NEON__ - return vrndnq_f32(a); + return vrndmq_f32(a); #else return _mm_round_ps(a, _MM_FROUND_TO_NEG_INF); #endif ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9f8ece70ee0] blender-v3.3-release: Fix T101776: wrong logic for GLX setSwapInterval
Commit: 9f8ece70ee05fc876175a16f7068be7b53e38144 Author: Campbell Barton Date: Wed Oct 26 11:14:14 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB9f8ece70ee05fc876175a16f7068be7b53e38144 Fix T101776: wrong logic for GLX setSwapInterval Regression in 93e4b15767cf958d5a07ba6acce25438f244bf22. === M intern/ghost/intern/GHOST_ContextGLX.cpp === diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp index b4a076e4598..8ae88fa493a 100644 --- a/intern/ghost/intern/GHOST_ContextGLX.cpp +++ b/intern/ghost/intern/GHOST_ContextGLX.cpp @@ -318,7 +318,7 @@ GHOST_TSuccess GHOST_ContextGLX::releaseNativeHandles() GHOST_TSuccess GHOST_ContextGLX::setSwapInterval(int interval) { - if (!GLXEW_EXT_swap_control) { + if (GLXEW_EXT_swap_control) { ::glXSwapIntervalEXT(m_display, m_window, interval); return GHOST_kSuccess; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f9c6e0c814b] blender-v3.3-release: Fix T101709: Proportional editing being disabled in NLA Editor redo panel
Commit: f9c6e0c814b673c31be162e8dbd9ac7c1bc7c5d8 Author: Germano Cavalcante Date: Tue Oct 11 12:47:19 2022 -0300 Branches: blender-v3.3-release https://developer.blender.org/rBf9c6e0c814b673c31be162e8dbd9ac7c1bc7c5d8 Fix T101709: Proportional editing being disabled in NLA Editor redo panel Do not save the "use_proportional_edit" property if it is not supported. This prevents it from being automatically disabled. And hide "use_proportional_edit" in `SPACE_NLA` === M source/blender/editors/transform/transform.c M source/blender/editors/transform/transform_ops.c === diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 3dd5c7864c3..25a36477950 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1514,26 +1514,26 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) } } - bool use_prop_edit = false; - int prop_edit_flag = 0; - if (t->flag & T_PROP_EDIT_ALL) { -if (t->flag & T_PROP_EDIT) { - use_prop_edit = true; -} -if (t->flag & T_PROP_CONNECTED) { - prop_edit_flag |= PROP_EDIT_CONNECTED; -} -if (t->flag & T_PROP_PROJECTED) { - prop_edit_flag |= PROP_EDIT_PROJECTED; + /* Save proportional edit settings. + * Skip saving proportional edit if it was not actually used. */ + if (!(t->options & CTX_NO_PET)) { +bool use_prop_edit = false; +int prop_edit_flag = 0; +if (t->flag & T_PROP_EDIT_ALL) { + if (t->flag & T_PROP_EDIT) { +use_prop_edit = true; + } + if (t->flag & T_PROP_CONNECTED) { +prop_edit_flag |= PROP_EDIT_CONNECTED; + } + if (t->flag & T_PROP_PROJECTED) { +prop_edit_flag |= PROP_EDIT_PROJECTED; + } } - } - /* If modal, save settings back in scene if not set as operator argument */ - if ((t->flag & T_MODAL) || (op->flag & OP_IS_REPEAT)) { -/* save settings if not set in operator */ - -/* skip saving proportional edit if it was not actually used */ -if (!(t->options & CTX_NO_PET)) { +/* If modal, save settings back in scene if not set as operator argument */ +if ((t->flag & T_MODAL) || (op->flag & OP_IS_REPEAT)) { + /* save settings if not set in operator */ if ((prop = RNA_struct_find_property(op->ptr, "use_proportional_edit")) && !RNA_property_is_set(op->ptr, prop)) { const Object *obact = OBACT(t->view_layer); @@ -1571,6 +1571,14 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) ts->prop_mode = t->prop_mode; } } + +if ((prop = RNA_struct_find_property(op->ptr, "use_proportional_edit"))) { + RNA_property_boolean_set(op->ptr, prop, use_prop_edit); + RNA_boolean_set(op->ptr, "use_proportional_connected", prop_edit_flag & PROP_EDIT_CONNECTED); + RNA_boolean_set(op->ptr, "use_proportional_projected", prop_edit_flag & PROP_EDIT_PROJECTED); + RNA_enum_set(op->ptr, "proportional_edit_falloff", t->prop_mode); + RNA_float_set(op->ptr, "proportional_size", t->prop_size); +} } /* Save snapping settings. */ @@ -1630,14 +1638,6 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) } } - if ((prop = RNA_struct_find_property(op->ptr, "use_proportional_edit"))) { -RNA_property_boolean_set(op->ptr, prop, use_prop_edit); -RNA_boolean_set(op->ptr, "use_proportional_connected", prop_edit_flag & PROP_EDIT_CONNECTED); -RNA_boolean_set(op->ptr, "use_proportional_projected", prop_edit_flag & PROP_EDIT_PROJECTED); -RNA_enum_set(op->ptr, "proportional_edit_falloff", t->prop_mode); -RNA_float_set(op->ptr, "proportional_size", t->prop_size); - } - if ((prop = RNA_struct_find_property(op->ptr, "mirror"))) { RNA_property_boolean_set(op->ptr, prop, (t->flag & T_NO_MIRROR) == 0); } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 0f67dc41e3b..1d2bf102390 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -521,9 +521,7 @@ static int transform_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static bool transform_poll_property(const bContext *UNUSED(C), -wmOperator *op, -const PropertyRNA *prop) +static bool transform_poll_property(const bContext *C, wmOperator *op, const PropertyRNA *prop) { const char *prop_id = RNA_property_identifier(prop); @@ -557,12 +555,21 @@ static bool transform_poll_property(const bContext *UNUSED(C), } /* Proportional Editing. */ - { + if (STRPREFIX(prop_id, "proportional") || STRPREFIX(prop_id, "use_proportional")) { +ScrArea *area = CTX_wm_are
[Bf-blender-cvs] [7881a797a06] blender-v3.3-release: Fix T101721: Knife project crashes
Commit: 7881a797a063bb8ed0aa8c6b7329812c027b6fbf Author: Campbell Barton Date: Tue Oct 11 15:47:40 2022 +1100 Branches: blender-v3.3-release https://developer.blender.org/rB7881a797a063bb8ed0aa8c6b7329812c027b6fbf Fix T101721: Knife project crashes The crash was caused by [0] however knife-project functionality has been incorrect since [1] which would loop over each edit-mode object and run the knife project function which operated on all edit-mode objects too. - Resolve the crash by postponing face-tessellation recalculation until the knife tool has cut all objects - Objects occluding each other is now supported (an old TODO and something that was never supported). [0]: 690ecaae208d5f72217c165621d0d036e4029e86 [1]: 6e77afe6ec7b6a73f218f1fef264758abcbc778a === M source/blender/editors/mesh/editmesh_knife.c M source/blender/editors/mesh/editmesh_knife_project.c M source/blender/editors/mesh/mesh_intern.h === diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 5680865ae67..a3398da0998 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -218,6 +218,7 @@ typedef struct KnifeTool_OpData { /* Used for swapping current object when in multi-object edit mode. */ Object **objects; uint objects_len; + bool objects_free; /** Array `objects_len` length of additional per-object data. */ KnifeObjectInfo *objects_info; @@ -4081,6 +4082,8 @@ static void knife_init_colors(KnifeColors *colors) /* called when modal loop selection gets set up... */ static void knifetool_init(ViewContext *vc, KnifeTool_OpData *kcd, + Object **objects, + const int objects_len, const bool only_select, const bool cut_through, const bool xray, @@ -4101,8 +4104,16 @@ static void knifetool_init(ViewContext *vc, kcd->scene = scene; kcd->region = vc->region; - kcd->objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( - vc->view_layer, vc->v3d, &kcd->objects_len); + if (objects) { +kcd->objects = objects; +kcd->objects_len = objects_len; +kcd->objects_free = false; + } + else { +kcd->objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( +vc->view_layer, vc->v3d, &kcd->objects_len); +kcd->objects_free = true; + } Object *ob; BMEditMesh *em; @@ -4225,7 +4236,9 @@ static void knifetool_exit_ex(KnifeTool_OpData *kcd) } /* Free object bases. */ - MEM_freeN(kcd->objects); + if (kcd->objects_free) { +MEM_freeN(kcd->objects); + } /* Destroy kcd itself. */ MEM_freeN(kcd); @@ -4318,9 +4331,15 @@ static void knifetool_finish_single_post(KnifeTool_OpData *UNUSED(kcd), Object * /* Called on tool confirmation. */ static void knifetool_finish_ex(KnifeTool_OpData *kcd) { + /* Separate pre/post passes are needed because `em->looptris` recalculation from the 'post' pass + * causes causes triangle indices in #KnifeTool_OpData.bvh to get out of sync. + * So perform all the cuts before doing any mesh recalculation, see: T101721. */ for (uint b = 0; b < kcd->objects_len; b++) { Object *ob = kcd->objects[b]; knifetool_finish_single_pre(kcd, ob); + } + for (uint b = 0; b < kcd->objects_len; b++) { +Object *ob = kcd->objects[b]; knifetool_finish_single_post(kcd, ob); } } @@ -4789,6 +4808,8 @@ static int knifetool_invoke(bContext *C, wmOperator *op, const wmEvent *event) knifetool_init(&vc, kcd, + NULL, + 0, only_select, cut_through, xray, @@ -4941,7 +4962,12 @@ static bool edbm_mesh_knife_point_isect(LinkNode *polys, const float cent_ss[2]) return false; } -void EDBM_mesh_knife(ViewContext *vc, LinkNode *polys, bool use_tag, bool cut_through) +void EDBM_mesh_knife(ViewContext *vc, + Object **objects, + const int objects_len, + LinkNode *polys, + bool use_tag, + bool cut_through) { KnifeTool_OpData *kcd; @@ -4958,6 +4984,8 @@ void EDBM_mesh_knife(ViewContext *vc, LinkNode *polys, bool use_tag, bool cut_th knifetool_init(vc, kcd, + objects, + objects_len, only_select, cut_through, xray, @@ -4999,18 +5027,21 @@ void EDBM_mesh_knife(ViewContext *vc, LinkNode *polys, bool use_tag, bool cut_th /* Finish. */ { -Object *ob; -BMEditMesh *em; +/* See #knifetool_finish_ex for why multiple passes are needed. */ for (uin
[Bf-blender-cvs] [03867370977] blender-v3.3-release: ImageEngine: Clamp image data to fit half float range.
Commit: 0386737097716870236d5e480f8ae1ec13e0b7a7 Author: Jeroen Bakker Date: Wed Oct 12 08:47:12 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB0386737097716870236d5e480f8ae1ec13e0b7a7 ImageEngine: Clamp image data to fit half float range. When image data exceeds half float ranges values are set to +/- infinity that could lead to artifacts later on in the pipeline. Color management for example. This patch adds a utility function `IMB_gpu_clamp_half_float` that clamps full float values to fit within the range of half floats. This fixes T98575 and T101601. === M source/blender/draw/engines/image/image_drawing_mode.hh M source/blender/imbuf/IMB_imbuf.h M source/blender/imbuf/intern/util_gpu.c === diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index a1cd110e1d8..eb14ad6455a 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -335,6 +335,7 @@ template class ScreenSpaceDrawingMode : public AbstractD offset++; } } +IMB_gpu_clamp_half_float(&extracted_buffer); GPU_texture_update_sub(texture, GPU_DATA_FLOAT, @@ -391,6 +392,7 @@ template class ScreenSpaceDrawingMode : public AbstractD } BKE_image_release_ibuf(image, tile_buffer, lock); } +IMB_gpu_clamp_half_float(&texture_buffer); GPU_texture_update(info.texture, GPU_DATA_FLOAT, texture_buffer.rect_float); imb_freerectImbuf_all(&texture_buffer); } diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 99d931e7035..4e440bf3bdd 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -937,6 +937,13 @@ struct GPUTexture *IMB_create_gpu_texture(const char *name, struct ImBuf *ibuf, bool use_high_bitdepth, bool use_premult); +/** + * Ensures that values stored in the float rect can safely loaded into half float gpu textures. + * + * Does nothing when given image_buffer doesn't contain a float rect. + */ +void IMB_gpu_clamp_half_float(struct ImBuf *image_buffer); + /** * The `ibuf` is only here to detect the storage type. The produced texture will have undefined * content. It will need to be populated by using #IMB_update_gpu_texture_sub(). diff --git a/source/blender/imbuf/intern/util_gpu.c b/source/blender/imbuf/intern/util_gpu.c index 5feb0ceb515..8afa0c4e079 100644 --- a/source/blender/imbuf/intern/util_gpu.c +++ b/source/blender/imbuf/intern/util_gpu.c @@ -290,3 +290,19 @@ GPUTexture *IMB_create_gpu_texture(const char *name, return tex; } + +void IMB_gpu_clamp_half_float(ImBuf *image_buffer) +{ + const float half_min = -65504; + const float half_max = 65504; + if (!image_buffer->rect_float) { +return; + } + + int rect_float_len = image_buffer->x * image_buffer->y * + (image_buffer->channels == 0 ? 4 : image_buffer->channels); + + for (int i = 0; i < rect_float_len; i++) { +image_buffer->rect_float[i] = clamp_f(image_buffer->rect_float[i], half_min, half_max); + } +} ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bb95609fcee] blender-v3.3-release: Fix T101679: Duplicate objects are created when 'Make' override is called on existing override in 3DView
Commit: bb95609fcee0c6dae2c6a2a79c5a1506d453e106 Author: Bastien Montagne Date: Wed Oct 12 11:45:25 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rBbb95609fcee0c6dae2c6a2a79c5a1506d453e106 Fix T101679: Duplicate objects are created when 'Make' override is called on existing override in 3DView When the active selected object in the 3DView is already a local liboverride, only perform the 'clear system flag' process on selected objects, there is no point in trying to create an override out of it. === M source/blender/editors/object/object_relations.c === diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index a33cc60cddc..3c063c6923f 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2313,26 +2313,39 @@ static int make_override_library_exec(bContext *C, wmOperator *op) id_root = &collection->id; user_overrides_from_selected_objects = true; } - /* Else, poll func ensures us that ID_IS_LINKED(obact) is true. */ + /* Else, poll func ensures us that ID_IS_LINKED(obact) is true, or that it is already an existing + * liboverride. */ else { +BLI_assert(ID_IS_LINKED(obact) || ID_IS_OVERRIDE_LIBRARY_REAL(obact)); id_root = &obact->id; user_overrides_from_selected_objects = true; } - const bool do_fully_editable = !user_overrides_from_selected_objects; - - GSet *user_overrides_objects_uids = do_fully_editable ? NULL : - BLI_gset_new(BLI_ghashutil_inthash_p, - BLI_ghashutil_intcmp, - __func__); - /* Make already existing selected liboverrides editable. */ + bool is_active_override = false; FOREACH_SELECTED_OBJECT_BEGIN (view_layer, CTX_wm_view3d(C), ob_iter) { if (ID_IS_OVERRIDE_LIBRARY_REAL(ob_iter) && !ID_IS_LINKED(ob_iter)) { ob_iter->id.override_library->flag &= ~IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED; + is_active_override = is_active_override || (&ob_iter->id == id_root); + DEG_id_tag_update(&ob_iter->id, ID_RECALC_COPY_ON_WRITE); } } FOREACH_SELECTED_OBJECT_END; + /* If the active object is a liboverride, there is no point going further, since in the weird + * case where some other selected objects would be linked ones, there is no way to properly + * create overrides for them currently. + * + * Could be added later if really needed, but would rather avoid that extra complexity here. */ + if (is_active_override) { +return OPERATOR_FINISHED; + } + + const bool do_fully_editable = !user_overrides_from_selected_objects; + + GSet *user_overrides_objects_uids = do_fully_editable ? NULL : + BLI_gset_new(BLI_ghashutil_inthash_p, + BLI_ghashutil_intcmp, + __func__); if (do_fully_editable) { /* Pass. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3d7f298e9a5] blender-v3.3-release: Fix T101651: Cycles crashes when failing to initialize render device
Commit: 3d7f298e9a5c8f2e95f118e571589521abc71b1a Author: Lukas Stockner Date: Mon Oct 10 17:42:44 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB3d7f298e9a5c8f2e95f118e571589521abc71b1a Fix T101651: Cycles crashes when failing to initialize render device The issue here was that PathTraceWork was set up before checking if any error occurred, and it didn't account for the dummy device so it called a non-implemented function. This fix therefore avoids creating PathTraceWork for dummy devices and checks for device creation errors earlier in the process. === M intern/cycles/integrator/path_trace.cpp M intern/cycles/integrator/path_trace_work.cpp M intern/cycles/integrator/work_balancer.cpp M intern/cycles/session/session.cpp === diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp index 3ec7b601d9f..ae03ee0b9a5 100644 --- a/intern/cycles/integrator/path_trace.cpp +++ b/intern/cycles/integrator/path_trace.cpp @@ -43,8 +43,11 @@ PathTrace::PathTrace(Device *device, /* Create path tracing work in advance, so that it can be reused by incremental sampling as much * as possible. */ device_->foreach_device([&](Device *path_trace_device) { -path_trace_works_.emplace_back(PathTraceWork::create( -path_trace_device, film, device_scene, &render_cancel_.is_requested)); +unique_ptr work = PathTraceWork::create( +path_trace_device, film, device_scene, &render_cancel_.is_requested); +if (work) { + path_trace_works_.emplace_back(std::move(work)); +} }); work_balance_infos_.resize(path_trace_works_.size()); diff --git a/intern/cycles/integrator/path_trace_work.cpp b/intern/cycles/integrator/path_trace_work.cpp index bb5c6e1a61a..a5f98b5475a 100644 --- a/intern/cycles/integrator/path_trace_work.cpp +++ b/intern/cycles/integrator/path_trace_work.cpp @@ -23,6 +23,10 @@ unique_ptr PathTraceWork::create(Device *device, if (device->info.type == DEVICE_CPU) { return make_unique(device, film, device_scene, cancel_requested_flag); } + if (device->info.type == DEVICE_DUMMY) { +/* Dummy devices can't perform any work. */ +return nullptr; + } return make_unique(device, film, device_scene, cancel_requested_flag); } diff --git a/intern/cycles/integrator/work_balancer.cpp b/intern/cycles/integrator/work_balancer.cpp index 5f1c6c92b9d..0fe170b2791 100644 --- a/intern/cycles/integrator/work_balancer.cpp +++ b/intern/cycles/integrator/work_balancer.cpp @@ -17,6 +17,9 @@ void work_balance_do_initial(vector &work_balance_infos) work_balance_infos[0].weight = 1.0; return; } + else if (num_infos == 0) { +return; + } /* There is no statistics available, so start with an equal distribution. */ const double weight = 1.0 / num_infos; diff --git a/intern/cycles/session/session.cpp b/intern/cycles/session/session.cpp index de685a47003..15bb93b0385 100644 --- a/intern/cycles/session/session.cpp +++ b/intern/cycles/session/session.cpp @@ -43,6 +43,10 @@ Session::Session(const SessionParams ¶ms_, const SceneParams &scene_params) device = Device::create(params.device, stats, profiler); + if (device->have_error()) { +progress.set_error(device->error_message()); + } + scene = new Scene(scene_params, device); /* Configure path tracer. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6004e9d62ba] blender-v3.3-release: Fix T100953: Zooming with NDOF is inverted in the camera view
Commit: 6004e9d62ba5c8c6935f5d146f05e148528f042a Author: Campbell Barton Date: Fri Oct 7 17:44:17 2022 +1100 Branches: blender-v3.3-release https://developer.blender.org/rB6004e9d62ba5c8c6935f5d146f05e148528f042a Fix T100953: Zooming with NDOF is inverted in the camera view Use convention for applying zoom in other 2D views. === M source/blender/editors/space_view3d/view3d_navigate_ndof.c === diff --git a/source/blender/editors/space_view3d/view3d_navigate_ndof.c b/source/blender/editors/space_view3d/view3d_navigate_ndof.c index 88abf602c26..af2a304784e 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_ndof.c +++ b/source/blender/editors/space_view3d/view3d_navigate_ndof.c @@ -376,6 +376,9 @@ static int view3d_ndof_cameraview_pan_zoom(bContext *C, const wmEvent *event) float pan_vec[3]; WM_event_ndof_pan_get(ndof, pan_vec, true); + mul_v2_fl(pan_vec, ndof->dt); + pan_vec[2] *= -ndof->dt; + /* NOTE(@campbellbarton): In principle rotating could pass through to regular * non-camera NDOF behavior (exiting the camera-view and rotating). * Disabled this block since in practice it's difficult to control NDOF devices @@ -390,7 +393,7 @@ static int view3d_ndof_cameraview_pan_zoom(bContext *C, const wmEvent *event) bool changed = false; if (has_translate) { -const float speed = ndof->dt * NDOF_PIXELS_PER_SECOND; +const float speed = NDOF_PIXELS_PER_SECOND; float event_ofs[2] = {pan_vec[0] * speed, pan_vec[1] * speed}; if (ED_view3d_camera_view_pan(region, event_ofs)) { changed = true; @@ -398,7 +401,7 @@ static int view3d_ndof_cameraview_pan_zoom(bContext *C, const wmEvent *event) } if (has_zoom) { -const float scale = 1.0f + (ndof->dt * pan_vec[2]); +const float scale = 1.0f + pan_vec[2]; if (ED_view3d_camera_view_zoom_scale(rv3d, scale)) { changed = true; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [07ba515b21a] blender-v3.3-release: GPencil: Fix unreported Close Stroke operator did not select new points
Commit: 07ba515b21ac9eb5ff8b2acc65df474a56c76af7 Author: Antonio Vazquez Date: Tue Oct 11 12:04:03 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB07ba515b21ac9eb5ff8b2acc65df474a56c76af7 GPencil: Fix unreported Close Stroke operator did not select new points When use the close stroke, the new created points were not addedd to the selection. === M source/blender/blenkernel/intern/gpencil_geom.cc === diff --git a/source/blender/blenkernel/intern/gpencil_geom.cc b/source/blender/blenkernel/intern/gpencil_geom.cc index d0075a7d161..aafa3bc8fe6 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.cc +++ b/source/blender/blenkernel/intern/gpencil_geom.cc @@ -1855,6 +1855,10 @@ bool BKE_gpencil_stroke_close(bGPDstroke *gps) pt->strength = interpf(pt2->strength, pt1->strength, step); pt->flag = 0; interp_v4_v4v4(pt->vert_color, pt1->vert_color, pt2->vert_color, step); +/* Set point as selected. */ +if (gps->flag & GP_STROKE_SELECT) { + pt->flag |= GP_SPOINT_SELECT; +} /* Set weights. */ if (gps->dvert != nullptr) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [fcc291bbf9e] blender-v3.3-release: Fix T101025: Cycles motion blur crash with changing point cloud size
Commit: fcc291bbf9e7aaf9d8617c6ef7324defa31ee841 Author: Hans Goudey Date: Wed Sep 14 09:51:27 2022 -0500 Branches: blender-v3.3-release https://developer.blender.org/rBfcc291bbf9e7aaf9d8617c6ef7324defa31ee841 Fix T101025: Cycles motion blur crash with changing point cloud size Caused by 410a6efb747f188da30c which didn't properly use the smallest size between the Cycles and Blender point clouds. === M intern/cycles/blender/pointcloud.cpp === diff --git a/intern/cycles/blender/pointcloud.cpp b/intern/cycles/blender/pointcloud.cpp index b4e90859877..35be2916e43 100644 --- a/intern/cycles/blender/pointcloud.cpp +++ b/intern/cycles/blender/pointcloud.cpp @@ -224,27 +224,24 @@ static void export_pointcloud_motion(PointCloud *pointcloud, const int num_points = pointcloud->num_points(); float3 *mP = attr_mP->data_float3() + motion_step * num_points; bool have_motion = false; - int num_motion_points = 0; const array &pointcloud_points = pointcloud->get_points(); + const int b_points_num = b_pointcloud.points.length(); BL::FloatVectorAttribute b_attr_position = find_position_attribute(b_pointcloud); std::optional b_attr_radius = find_radius_attribute(b_pointcloud); - for (int i = 0; i < num_points; i++) { -if (num_motion_points < num_points) { - const float3 co = get_float3(b_attr_position.data[i].vector()); - const float radius = b_attr_radius ? b_attr_radius->data[i].value() : 0.0f; - float3 P = co; - P.w = radius; - mP[num_motion_points] = P; - have_motion = have_motion || (P != pointcloud_points[num_motion_points]); - num_motion_points++; -} + for (int i = 0; i < std::min(num_points, b_points_num); i++) { +const float3 co = get_float3(b_attr_position.data[i].vector()); +const float radius = b_attr_radius ? b_attr_radius->data[i].value() : 0.0f; +float3 P = co; +P.w = radius; +mP[i] = P; +have_motion = have_motion || (P != pointcloud_points[i]); } /* In case of new attribute, we verify if there really was any motion. */ if (new_attribute) { -if (num_motion_points != num_points || !have_motion) { +if (b_points_num != num_points || !have_motion) { pointcloud->attributes.remove(ATTR_STD_MOTION_VERTEX_POSITION); } else if (motion_step > 0) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7e942b2a1e3] blender-v3.3-release: Partially fix T101702: OSL Shaders with boolean inputs crash
Commit: 7e942b2a1e3d4d72ba90b498a514455452eab94c Author: Lukas Stockner Date: Mon Oct 10 01:03:12 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB7e942b2a1e3d4d72ba90b498a514455452eab94c Partially fix T101702: OSL Shaders with boolean inputs crash OSL (like Cycles) has no internal boolean type, instead an integer input can be flagged to be shown as a boolean in the UI. Cycles reacts to this by creating a boolean socket on the Blender side, but as a result incorrectly called the boolean overload of the set function even though the internal type is an integer. There's another unrelated crash in the GPU viewport shader code that appears to apply to every OSL node that outputs a shader, and the file in T101702 triggers both, so this is only a partial fix for the report. === M intern/cycles/blender/shader.cpp === diff --git a/intern/cycles/blender/shader.cpp b/intern/cycles/blender/shader.cpp index 04eb1576330..c8798e23b0c 100644 --- a/intern/cycles/blender/shader.cpp +++ b/intern/cycles/blender/shader.cpp @@ -205,7 +205,9 @@ static void set_default_value(ShaderInput *input, } case SocketType::INT: { if (b_sock.type() == BL::NodeSocket::type_BOOLEAN) { -node->set(socket, get_boolean(b_sock.ptr, "default_value")); +/* Make sure to call the int overload of set() since this is an integer socket as far as + * Cycles is concerned. */ +node->set(socket, get_boolean(b_sock.ptr, "default_value") ? 1 : 0); } else { node->set(socket, get_int(b_sock.ptr, "default_value")); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bfc9d7cadfe] blender-v3.3-release: FIX T101275: Regression in NLA causes Actions to be ignored by Context menu (I.e influence, etc)
Commit: bfc9d7cadfe834c477b1d7423304da3d962c9df3 Author: Nate Rupsis Date: Wed Sep 28 15:06:55 2022 -0600 Branches: blender-v3.3-release https://developer.blender.org/rBbfc9d7cadfe834c477b1d7423304da3d962c9df3 FIX T101275: Regression in NLA causes Actions to be ignored by Context menu (I.e influence, etc) Reviewed By: sybren Differential Revision: http://developer.blender.org/D16154 === M source/blender/editors/space_nla/nla_buttons.c === diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 9652819404e..ff59fea1180 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -107,7 +107,6 @@ bool nla_panel_context(const bContext *C, found = 1; break; } - case ANIMTYPE_NLAACTION: case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */ case ANIMTYPE_OBJECT: case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */ @@ -158,6 +157,11 @@ bool nla_panel_context(const bContext *C, } break; } + /* Don't set a pointer for NLA Actions. + * This will break the dependency graph for the context menu. + */ + case ANIMTYPE_NLAACTION: +break; } if (found > 0) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e1e9c838899] blender-v3.3-release: Fix T101685: OBJ importer does not assign proper material if "usemtl" is before "o"
Commit: e1e9c838899dd1a8f55a5c67b2d5716a6a5b88a6 Author: Aras Pranckevicius Date: Sun Oct 9 21:21:31 2022 +0300 Branches: blender-v3.3-release https://developer.blender.org/rBe1e9c838899dd1a8f55a5c67b2d5716a6a5b88a6 Fix T101685: OBJ importer does not assign proper material if "usemtl" is before "o" The importer logic was wrongly resetting "current material name" upon encountering a new object ("o" command). However as per OBJ specification, this is incorrect: > Specifies the material name for the element following it. Once a > material is assigned, it cannot be turned off; it can only be > changed. Fixes T101685. Test coverage for this was added in svn tests repo. === M source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc === diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc index 7069e1185e0..78f34eab228 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc @@ -507,6 +507,15 @@ void OBJParser::parse(Vector> &r_all_geometries, } /* Faces. */ else if (parse_keyword(p, end, "f")) { +/* If we don't have a material index assigned yet, get one. + * It means "usemtl" state came from the previous object. */ +if (state_material_index == -1 && !state_material_name.empty() && +curr_geom->material_indices_.is_empty()) { + curr_geom->material_indices_.add_new(state_material_name, 0); + curr_geom->material_order_.append(state_material_name); + state_material_index = 0; +} + geom_add_polygon(curr_geom, p, end, @@ -523,7 +532,10 @@ void OBJParser::parse(Vector> &r_all_geometries, else if (parse_keyword(p, end, "o")) { state_shaded_smooth = false; state_group_name = ""; -state_material_name = ""; +/* Reset object-local material index that's used in face infos. + * Note: do not reset the material name; that has to carry over + * into the next object if needed. */ +state_material_index = -1; curr_geom = create_geometry( curr_geom, GEOM_MESH, StringRef(p, end).trim(), r_all_geometries); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [567e3f65083] blender-v3.3-release: Fix T101547: Add update notifiers in dopesheet and timeline selection operators
Commit: 567e3f650836ef060912c540013eb8fa0f447fe6 Author: Amelie Fondevilla Date: Fri Oct 7 11:44:27 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB567e3f650836ef060912c540013eb8fa0f447fe6 Fix T101547: Add update notifiers in dopesheet and timeline selection operators Updates the function checking if a container can have grease pencil layer keyframes, to account for dopesheet in main mode, and timeline. Reviewed By: Sybren A. Stüvel Differential Revision: http://developer.blender.org/D16132 === M source/blender/editors/animation/anim_filter.c === diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index e5deb03358f..6f19c30a6d8 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -416,7 +416,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) bool ANIM_animdata_can_have_greasepencil(const eAnimCont_Types type) { - return type == ANIMCONT_GPENCIL; + return ELEM(type, ANIMCONT_GPENCIL, ANIMCONT_DOPESHEET, ANIMCONT_TIMELINE); } /* */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0b45d3e3866] blender-v3.3-release: Refactor: adding function to check if an animation container has grease pencil layer keyframes.
Commit: 0b45d3e3866225d0277cc8af483f0ad1d589420e Author: Amelie Fondevilla Date: Fri Oct 7 09:59:34 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB0b45d3e3866225d0277cc8af483f0ad1d589420e Refactor: adding function to check if an animation container has grease pencil layer keyframes. Used in action_select to refactor the selection operators. No functional changes. Reviewed By: Sybren A. Stüvel Differential Revision: http://developer.blender.org/D16168 === M source/blender/editors/animation/anim_filter.c M source/blender/editors/include/ED_anim_api.h M source/blender/editors/space_action/action_select.c === diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index d9eeed94868..e5deb03358f 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -414,6 +414,11 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) return ANIM_animdata_context_getdata(ac); } +bool ANIM_animdata_can_have_greasepencil(const eAnimCont_Types type) +{ + return type == ANIMCONT_GPENCIL; +} + /* */ /* Blender Data <-- Filter --> Channels to be operated on */ diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index ee87de5774a..f5cdc35c38c 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -519,6 +519,11 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data); void ANIM_animdata_freelist(ListBase *anim_data); +/** + * Check if the given animation container can contain grease pencil layer keyframes. + */ +bool ANIM_animdata_can_have_greasepencil(const eAnimCont_Types type); + /* */ /* ANIMATION CHANNELS LIST */ /* anim_channels_*.c */ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index d1a8592ae9d..dd8cea6c838 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -322,7 +322,7 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op) /* set notifier that keyframe selection have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); - if (ac.datatype == ANIMCONT_GPENCIL) { + if (ANIM_animdata_can_have_greasepencil(ac.datatype)) { WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL); } return OPERATOR_FINISHED; @@ -563,7 +563,7 @@ static int actkeys_box_select_exec(bContext *C, wmOperator *op) /* set notifier that keyframe selection have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); - if (ac.datatype == ANIMCONT_GPENCIL) { + if (ANIM_animdata_can_have_greasepencil(ac.datatype)) { WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL); } return OPERATOR_FINISHED; @@ -800,7 +800,7 @@ static int actkeys_lassoselect_exec(bContext *C, wmOperator *op) /* send notifier that keyframe selection has changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); - if (ac.datatype == ANIMCONT_GPENCIL) { + if (ANIM_animdata_can_have_greasepencil(ac.datatype)) { WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL); } return OPERATOR_FINISHED; @@ -868,7 +868,7 @@ static int action_circle_select_exec(bContext *C, wmOperator *op) /* send notifier that keyframe selection has changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); - if (ac.datatype == ANIMCONT_GPENCIL) { + if (ANIM_animdata_can_have_greasepencil(ac.datatype)) { WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL); } return OPERATOR_FINISHED; @@ -1107,7 +1107,7 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op) /* set notifier that keyframe selection have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); - if (ac.datatype == ANIMCONT_GPENCIL) { + if (ANIM_animdata_can_have_greasepencil(ac.datatype)) { WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL); } return OPERATOR_FINISHED; @@ -1169,7 +1169,7 @@ static int actkeys_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) /* set notifier that keyframe selection has changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); - if (ac.datatype == ANIMCONT_GPENCIL) { + if (ANIM_animdata_can_have_greasepencil(ac.datatype)) { WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL); }
[Bf-blender-cvs] [4b14b33ea88] master: Cycles: use packed float3 back for oneAPI
Commit: 4b14b33ea887e685937b7757af0c2093093b7c7e Author: Xavier Hallade Date: Wed Oct 26 10:35:18 2022 +0200 Branches: master https://developer.blender.org/rB4b14b33ea887e685937b7757af0c2093093b7c7e Cycles: use packed float3 back for oneAPI This fixes a 15% performance regression silently introduced by 79ab76e156d4bde937335be784cdf220294600d5 that aligned the compact float3 on 16 bytes for oneAPI. Current change is minimalist, there are further cleanup opportunities such as removing packed_float3 definition for oneAPI but for some reason, it cuts the recovered speedup in half, so we're starting with this small fix for now. Reviewed by: brecht Differential Revision: https://developer.blender.org/D16340 === M intern/cycles/util/types_float3.h === diff --git a/intern/cycles/util/types_float3.h b/intern/cycles/util/types_float3.h index 87c6b1d3654..34430945c38 100644 --- a/intern/cycles/util/types_float3.h +++ b/intern/cycles/util/types_float3.h @@ -10,7 +10,12 @@ CCL_NAMESPACE_BEGIN #ifndef __KERNEL_NATIVE_VECTOR_TYPES__ +# ifdef __KERNEL_ONEAPI__ +/* Define float3 as packed for oneAPI. */ +struct float3 +# else struct ccl_try_align(16) float3 +# endif { # ifdef __KERNEL_GPU__ /* Compact structure for GPU. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [633d314b75a] master: Fix T101790: MNEE caustic settings are not visible in the UI when using Metal
Commit: 633d314b75a1e84c9ed93e09047f87f34ddab802 Author: Michael Jones Date: Tue Oct 25 19:36:13 2022 +0100 Branches: master https://developer.blender.org/rB633d314b75a1e84c9ed93e09047f87f34ddab802 Fix T101790: MNEE caustic settings are not visible in the UI when using Metal This patch fixes T101790 by adding a macOS version check for deciding whether to show the caustics settings in the UI (MNEE kernels don't compile on macOS < 13.0) Reviewed By: brecht Maniphest Tasks: T101790 Differential Revision: https://developer.blender.org/D16339 === M intern/cycles/blender/addon/ui.py === diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index f763fe0eb0b..581533db0b6 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -149,6 +149,14 @@ def get_effective_preview_denoiser(context): return 'OIDN' +def use_mnee(context): +# The MNEE kernel doesn't compile on macOS < 13. +if use_metal(context): +import platform +v, _, _ = platform.mac_ver() +if float(v) < 13.0: +return False +return True class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel): bl_label = "Sampling" @@ -1235,7 +1243,7 @@ class CYCLES_OBJECT_PT_shading_caustics(CyclesButtonsPanel, Panel): @classmethod def poll(cls, context): -return CyclesButtonsPanel.poll(context) and not use_metal(context) and context.object.type != 'LIGHT' +return CyclesButtonsPanel.poll(context) and use_mnee(context) and context.object.type != 'LIGHT' def draw(self, context): layout = self.layout @@ -1449,7 +1457,7 @@ class CYCLES_LIGHT_PT_light(CyclesButtonsPanel, Panel): sub.active = not (light.type == 'AREA' and clamp.is_portal) sub.prop(clamp, "cast_shadow") sub.prop(clamp, "use_multiple_importance_sampling", text="Multiple Importance") -if not use_metal(context): +if use_mnee(context): sub.prop(clamp, "is_caustics_light", text="Shadow Caustics") if light.type == 'AREA': ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [628987628a2] gpencil-new-data-proposal: Merge branch 'master' into gpencil-new-data-proposal
Commit: 628987628a29a3411ce4af50912b3fa3f9e8e3df Author: Antonio Vazquez Date: Wed Oct 26 10:16:41 2022 +0200 Branches: gpencil-new-data-proposal https://developer.blender.org/rB628987628a29a3411ce4af50912b3fa3f9e8e3df Merge branch 'master' into gpencil-new-data-proposal === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [98c8c3c871c] asset-lite-greasepencil: Merge branch 'master' into asset-lite-greasepencil
Commit: 98c8c3c871c2884570c4a0c66f9278da1a35122d Author: Antonio Vazquez Date: Wed Oct 26 10:14:39 2022 +0200 Branches: asset-lite-greasepencil https://developer.blender.org/rB98c8c3c871c2884570c4a0c66f9278da1a35122d Merge branch 'master' into asset-lite-greasepencil === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2186d58d1c2] master: Fix T102045: Properties Editor Attribute panels errors when pinning mesh
Commit: 2186d58d1c2711f722a811e6c2885045e485efa9 Author: Philipp Oeser Date: Tue Oct 25 11:51:04 2022 +0200 Branches: master https://developer.blender.org/rB2186d58d1c2711f722a811e6c2885045e485efa9 Fix T102045: Properties Editor Attribute panels errors when pinning mesh When pinning a Mesh, we cannot rely on the context object. Instead, use the context mesh now. For vertexgroups names [which are still on the object API wise], this means name collisions cannot be checked when pinning a Mesh (so print this as a warning in that case) Maniphest Tasks: T102045 Differential Revision: https://developer.blender.org/D16333 === M release/scripts/startup/bl_ui/properties_data_mesh.py === diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index a775a3cfa1b..a6b97fbdc85 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -586,7 +586,7 @@ class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel): def draw_attribute_warnings(self, context, layout): ob = context.object -mesh = ob.data +mesh = context.mesh unique_names = set() colliding_names = [] @@ -595,8 +595,11 @@ class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel): {"position": None, "shade_smooth": None, "normal": None, "crease": None}, mesh.attributes, mesh.uv_layers, -ob.vertex_groups, +None if ob is None else ob.vertex_groups, ): +if collection is None: +colliding_names.append("Cannot check for object vertex groups when pinning mesh") +continue for name in collection.keys(): unique_names_len = len(unique_names) unique_names.add(name) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [16acd7e473b] master: Fix: set more UI colors to PROP_COLOR_GAMMA
Commit: 16acd7e473bbfb1e92605f8e4fd4727153d008bf Author: Philipp Oeser Date: Tue Oct 25 15:18:22 2022 +0200 Branches: master https://developer.blender.org/rB16acd7e473bbfb1e92605f8e4fd4727153d008bf Fix: set more UI colors to PROP_COLOR_GAMMA Followup to rBfb424db2b7bb. Found some more candidates. UI colors should use PROP_COLOR_GAMMA to avoid being affected by scene color management (clarification by @brecht). Differential Revision: https://developer.blender.org/D16337 === M source/blender/makesrna/intern/rna_brush.c M source/blender/makesrna/intern/rna_fcurve.c M source/blender/makesrna/intern/rna_tracking.c === diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 137020ce3f8..5ba31070e1d 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -3663,13 +3663,13 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Mask Texture Overlay Alpha", ""); RNA_def_property_update(prop, 0, "rna_Brush_update"); - prop = RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR); + prop = RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "add_col"); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "Add Color", "Color of cursor when adding"); RNA_def_property_update(prop, 0, "rna_Brush_update"); - prop = RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR); + prop = RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "sub_col"); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "Subtract Color", "Color of cursor when subtracting"); diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 727d329781d..9fe7dda0e20 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -2416,7 +2416,7 @@ static void rna_def_fcurve(BlenderRNA *brna) prop, "Color Mode", "Method used to determine color of F-Curve in Graph Editor"); RNA_def_property_update(prop, NC_ANIMATION, NULL); - prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); + prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor"); diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index c4a11d4e9e0..44df0db9ade 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -1640,7 +1640,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL); /* color */ - prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); + prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text( ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs