Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-31Merge branch 'master' into refactor-mesh-material-index-genericrefactor-mesh-material-index-genericHans Goudey
2022-08-31Merge branch 'blender-v3.3-release'Bastien Montagne
2022-08-31LibOverride: Replace linked objects by their overrides when created from 3DView.Bastien Montagne
From the 3DView code has basically no knowledge of collection hierarchy, so we can either not remap any local usage of linked objects that are being overridden, or remap them in all their local collections. The second behavior makes most sense in the vast majority of cases. Note that this was only an issue when directly linking and overriding objects, not when doing so through collections.
2022-08-31Fix: incorrect detection of used socketsJacques Lucke
2022-08-31Fix: missing vector clearJacques Lucke
Otherwise, these vectors are never cleared, leading to crashes down the line.
2022-08-31Cleanup: simplify debuggingJacques Lucke
This makes it easy to set breakpoints where false is returned.
2022-08-31Merge branch 'blender-v3.3-release'Bastien Montagne
2022-08-31Fix crash in liboverride operations from the Outliner.Bastien Montagne
Checks for 'invalid' selected IDs that need to be skipped were incomplete, and one was missing the actual return statement.
2022-08-31Nodes: move NodeTreeRef functionality into node runtime dataJacques Lucke
The purpose of `NodeTreeRef` was to speed up various queries on a read-only `bNodeTree`. Not that we have runtime data in nodes and sockets, we can also store the result of some queries there. This has some benefits: * No need for a read-only separate node tree data structure which increased complexity. * Makes it easier to reuse cached queries in more parts of Blender that can benefit from it. A downside is that we loose some type safety that we got by having different types for input and output sockets, as well as internal and non-internal links. This patch also refactors `DerivedNodeTree` so that it does not use `NodeTreeRef` anymore, but uses `bNodeTree` directly instead. To provide a convenient API (that is also close to what `NodeTreeRef` has), a new approach is implemented: `bNodeTree`, `bNode`, `bNodeSocket` and `bNodeLink` now have C++ methods declared in `DNA_node_types.h` which are implemented in `BKE_node_runtime.hh`. To make this work, `makesdna` now skips c++ sections when parsing dna header files. No user visible changes are expected. Differential Revision: https://developer.blender.org/D15491
2022-08-31GPUCapabilities: Add GPU_shader_draw_parameters_supportClément Foucault
This checks for the availability of `gl_BaseInstanceARB` or equivalent. Disabling for any workaround that disables shader_image_load_store_support as a preventive measure.
2022-08-31Merge branch 'blender-v3.3-release'Jacques Lucke
2022-08-31Fix: reverse uv lookup fails due to floating point accuracy issuesJacques Lucke
The case when the query uv is almost on an edge but outside of any triangle was handled before. Now the case where the query uv is almost on an edge but inside more than one triangle is handled as well.
2022-08-31Cleanup: obj: simplify import/export syntax handling codeAras Pranckevicius
I want to add support for PBR materials extension to OBJ, but the way current I/O code syntax handling was done made it quite cumbersome to extend the number of MTL textures/parameters. Simplify all that by removing FormatHandler template on "syntax" that gets routed through keyword enums, and instead just have simple `write_obj_*` and `write_mtl_*` functions. Simplify MTLMaterial to not contain a map of textures (that is always fully filled with all possible textures), instead now there's a simple array. Rename `tex_map_XX` to `MTLTexMap`. All this does not affect behavior or performance, but it does result in 170 fewer lines of code, and saves a couple kilobytes of executable size.
2022-08-31Merge branch 'blender-v3.3-release'Thomas Dinges
2022-08-31Update freedesktop file.Thomas Dinges
Add new features for upcoming Blender 3.3 and also missing 3.2 notes, which were not merged to master.
2022-08-31Fix resource leak dropping files in GHOST/Win32Campbell Barton
Early returns in error cases missed calling ReleaseStgMedium for getDropDataAsFilenames, getDropDataAsString & getDropDataAsString.
2022-08-31Cleanup: remove pointless strcpy return value checkCampbell Barton
2022-08-31Cleanup: break before the default case in switch statementsCampbell Barton
While missing the break before a default that only breaks isn't an error, it means adding new cases needs to remember to add the break for an existing case, changing the default case will also result in an unintended fall-through. Also avoid `default:;` and add an explicit break.
2022-08-31Fix returning a freed context when initialization fails for GHOST/Win32Campbell Barton
2022-08-31Fix uninitialized variable use for ID3D11RenderTargetViewCampbell Barton
When 'm_render_target' was NULL, backbuffer_res would be used without being assigned. While it seems likely this code-path is rarely used (if at all), resolve the logical error.
2022-08-31Cleanup: check GetKeyboardState succeeds before using it's valuesCampbell Barton
Quiets compiler warning.
2022-08-31Cleanup: tablet press could fall through to release on GHOST/Win32Campbell Barton
Introduced in [0], checking the logic here, there seems to be no reason a press event should ever run release logic, relocate break statement. In practice this was unlikely to cause problems as peeking into press events would need to fail, peeking into release would need to succeed. Even so, better avoid accidental fall through in switch statements. [0]: 6f158f834dcfa638639391f37afcb2ca8457cb45
2022-08-31Cleanup: remove 'else' after returnCampbell Barton
2022-08-31Cleanup: use bool for GHOST_SystemWin32::setConsoleWindowState returnCampbell Barton
2022-08-31Cleanup: reduce scope, quiet unused variable warningsCampbell Barton
When building without thumbnails some variables weren't used, reduce their scope as well as the BlPath sub-string.
2022-08-31Cleanup: quiet MSVC warning using flag flag operations on booleanCampbell Barton
While harmless it wasn't clear if other bits might be set but ignored, assign the value instead.
2022-08-31Cleanup: formatCampbell Barton
2022-08-31Cleanup: split font datafile loading into a functionCampbell Barton
Also use more descriptive/conventional variable names.
2022-08-31BLF: use existing stat from 'direntry' for directory checkCampbell Barton
2022-08-31Merge branch 'blender-v3.3-release'YimingWu
2022-08-31GPencil: Fix sharp_threshold property in sample stroke operatorYimingWu
The property registration was missing in the operator, now fixed.
2022-08-31LineArt: Fix (unreported) wrong index in weight transferYimingWu
Line art now uses global index for vertices but needs to have local index in order to do correct weight transfer.
2022-08-31Node: Mix nodeCharlie Jolly
This patch is a response to T92588 and is implemented as a Function/Shader node. This node has support for Float, Vector and Color data types. For Vector it supports uniform and non-uniform mixing. For Color it now has the option to remove factor clamping. It replaces the Mix RGB for Shader and Geometry node trees. As discussed in T96219, this patch converts existing nodes in .blend files. The old node is still available in the Python API but hidden from the menus. Reviewed By: HooglyBoogly, JacquesLucke, simonthommes, brecht Maniphest Tasks: T92588 Differential Revision: https://developer.blender.org/D13749
2022-08-31Cleanup: Remove redundant addition of attributeHans Goudey
The radius attribute is aleady added in `pointcloud_random`.
2022-08-31Cleanup: Avoid using geometry component unnecessarilyHans Goudey
2022-08-31Cleanup: Remove unused point cloud functionHans Goudey
This can be done more intuitively with a "copy parameters" function like `curves_copy_parameters` or `BKE_mesh_copy_parameters` anyway.
2022-08-31Curves: Avoid unnecessarily initializing new positions layerHans Goudey
When creating a curves data-block, one is expected to set the new position values. We can slightly improve performance by avoiding doing that redundantly. Similar to cccc6d6905be7ac32cb.
2022-08-31Attributes: Avoid unnecessarily initializing new attributesHans Goudey
The "write_only" (i.e. no reading) API function expects the caller to set values for all new attribute elements, so using calloc or setting the default value first is redundant. In theory this can improve performance by avoiding an extra pass over the array. I observed a 6% improvement in a basic test with the mesh to points node: from 47.9ms to 45ms on average. See 25237d2625078c6d for more info. Similar to cccc6d6905be7ac.
2022-08-31Mesh: Avoid redundant custom data layer initializationHans Goudey
In all these cases, it was clear that the layer values were set right after the layer was created anyway. So there's no point in using calloc or setting the values to zero first. See 25237d2625078c6d for more info.
2022-08-30Merge branch 'blender-v3.3-release'Hans Goudey
2022-08-30Fix: Potential name clash when adding rest position attributeHans Goudey
If a "rest_position" attribute already existed, potentiall with another type, the next name "rest_position.001" would be used, which might even conflict with a name on another domain. Use the C++ attribute API instead, which has more standard/predictable behavior.
2022-08-30Cleanup: Use C++ attribute APIHans Goudey
2022-08-30Cleanup: Use standard variable name for curve pointsHans Goudey
2022-08-30GPUBatch: Add multi_draw_indirect capability and indirect buffer offsetClément Foucault
This is for completion and to be used by the new draw manager.
2022-08-30GPUTexture: Add type correct GPU_SAMPLER_MAX constant for C++Clément Foucault
This avoid having to cast when using it in `.cc` and `.hh` files.
2022-08-30GPUMaterial: Expose debug name getterClément Foucault
This also makes it mandatory, but reduced length for release.
2022-08-30GPUCodegen: Do not rely on auto resource locationClément Foucault
This allows the render engine to expect non-overlapping resources in the generated create info. Textures are indexed from 0 and up. Nodetree ubo is bound to slot 0. Uniform attributes ubo is bound to slot 1.
2022-08-30GPUBatch: Add draw parameter getterClément Foucault
This is used to populate indirect draw commands in the draw manager.
2022-08-30GPUStorageBuf: Add `read()` function to readback buffer data to hostClément Foucault
This is not expected to be fast. This is only for inspecting the content of the buffer for debugging or validation purpose.
2022-08-30Attributes: Improve custom data initialization optionsHans Goudey
When allocating new `CustomData` layers, often we do redundant initialization of arrays. For example, it's common that values are allocated, set to their default value, and then set to some other value. This is wasteful, and it negates the benefits of optimizations to the allocator like D15082. There are two reasons for this. The first is array-of-structs storage that makes it annoying to initialize values manually, and the second is confusing options in the Custom Data API. This patch addresses the latter. The `CustomData` "alloc type" options are rearranged. Now, besides the options that use existing layers, there are two remaining: * `CD_SET_DEFAULT` sets the default value. * Usually zeroes, but for colors this is white (how it was before). * Should be used when you add the layer but don't set all values. * `CD_CONSTRUCT` refers to the "default construct" C++ term. * Only necessary or defined for non-trivial types like vertex groups. * Doesn't do anything for trivial types like `int` or `float3`. * Should be used every other time, when all values will be set. The attribute API's `AttributeInit` types are updated as well. To update code, replace `CD_CALLOC` with `CD_SET_DEFAULT` and `CD_DEFAULT` with `CD_CONSTRUCT`. This doesn't cause any functional changes yet. Follow-up commits will change to avoid initializing new layers where the correctness is clear. Differential Revision: https://developer.blender.org/D15617