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
path: root/source
AgeCommit message (Collapse)Author
2022-07-07Python: show additional context for PyDriver errors in the stderrCampbell Barton
Showing the expression alone may not be enough to track down an error evaluating a py-driver. Show information about the target ID & property in the error message as well.
2022-07-07Python: clear Py-driver variables on exitCampbell Barton
These kinds of leaks are relatively harmless, it reduces the number of un-freed data reported by valgrind on exit.
2022-07-07Cleanup: use boolean types & early exit on failure for PyDriverCampbell Barton
Also use __func__ for printing the funciton name.
2022-07-07Cleanup: formatCampbell Barton
2022-07-07Fix Py-driver byte code access with Python 3.11Campbell Barton
Error in [0] which assumed the struct member was renamed however byte-code access from PyCodeObject now requires an API call. Thanks to @music for pointing this out. [0]: 780c0ea097444c3be60314dffd203c099720badb
2022-07-06Fix T99334: Ignore edit-related snap options in Object modejon denning
When in Object Mode, any of the active- and edit-related snapping options (Include Active, Include Edited, Include Non-Edited) should be ignored when in Object Mode, otherwise snapping could be effectively disabled. This commit forces snap code to ignore the active- and edit-related options when in Object Mode. Reviewed By: Germano Cavalcante (mano-wii) Differential Revision: https://developer.blender.org/D15366
2022-07-06UI: Adjust and fix shader node descriptionsHans Goudey
The tooltips added for shader nodes in D15309 are very helpful already. This commit makes a few tweaks to make them more consistent, concise, and includes some fixes. Note that this might move some descriptions further away from the wording in the manual. * Make wording more concise * Start fewer new sentences * Use "For Example" slightly less * Avoid repeating the node's name unnecessarily * Spelling/grammar fixes * Don't capitalize some words * Use consistent verb conjugation * Use ASCII characters/more common quote symbols * Corrections to information * Plural/singular corrections * "smoke domains" -> "volume grids" * Fix tooltip for separate and combine color nodes * Refer to color sockets as colors rather than "images" * Avoid "advice" in a few places, which should be left for the manual * Remove information for sockets and could be in their tooltips * Avoid referring to the locations of a property in the UI * Avoid manual newlines (mostly reserve for "Note:") * Leave UI code in control of wrapping, which is more consistent * Add some information * That the UV map and color attribute nodes use a default * That Voronoi is "based on the distance to random points" * Add "(Deprecated)" to old color combine and separate nodes Differential Revision: https://developer.blender.org/D15381
2022-07-06Object: Speed up duplication of large selections by doing fewer collection syncsAras Pranckevicius
Previous code was doing N collection syncs when duplicating N objects. New code avoids all the intermediate syncs by using BKE_layer_collection_resync_forbid and BKE_layer_collection_resync_allow, and then does one BKE_main_collection_sync + BKE_main_collection_sync_remap for the whole operation. There is some complexity involved where the Base things of newly duplicated objects can't be found yet, without the sync, so some work on them (marking them selected, active, ...) has to be deferred until after the sync. Timings: scene with 10k cubes, each with unique mesh (Windows, VS2022 Release build, AMD Ryzen 5950X): - Shift+D duplicate: 13.6s -> 9.2s - Alt+D duplicate: 4.76s -> 1.53s Reviewed By: Bastien Montagne Differential Revision: https://developer.blender.org/D14150
2022-07-06Fix T99464: Curves sculpt add 3D brush symmetry brokenHans Goudey
The brush transform was not applied to the view direction.
2022-07-06Fix T99343: Missing RNA_def_property_update for show overlays in UV editorSiddhartha Jejurkar
Reviewed By: jbakker Maniphest Tasks: T99343 Differential Revision: https://developer.blender.org/D15354
2022-07-06BLI: improve reverse uv sample in edge casesJacques Lucke
Allow for a small epsilon to improve handling of uvs that are on edges. Generally, when using reverse uv sampling, we expect that the sampling is supposed to succeed.
2022-07-06Fix T99368: Annotation lines doesn't start where clickedCampbell Barton
Caused by [0] which made accessing the drag-start require a function instead of being the value written into the event cursor coordinates. [0]: b8960267dd51f9108b3b49e9b762e6b4d35ae1dc
2022-07-06Compositor: Pre-fill active scene movie clip in more nodesSergey Sharybin
Pre-fills movie clip from the scene to the following nodes: - Keying Screen - Plane Track Deform - Track Position The rest of tracking related nodes were already doing so. Differential Revision: https://developer.blender.org/D15377
2022-07-06IO: speed up import of large Alembic/USD/OBJ scenes by optimizing material ↵Aras Pranckevicius
assignment The importer parts that were doing assignment of materials to the imported objects/meshes were essentially having a quadratic complexity in terms of scene object count. For each material assigned to each object, they were scanning the whole scene, checking which other Objects use the same Mesh data, in order to resize their material arrays to match the size. Performance details (Windows, Ryzen 5950X): - Import OBJ Blender 3.0 splash scene (24k objects): 43.0s -> 32.9s - Import USD Disney Moana scene (260k objects): saves two hours (~7400s). Note that later on this crashes when trying to render the imported result; crashes in the same way/place both in master and this patch. Implementation details: The importers were doing "scan the world" basically twice for each object, for each material: once when creating a new material slot (assigns an empty material), and then again when assigning the material. However, all these importers (USD, Alembic, OBJ) always create one Object for one Mesh. So that whole quadratic complexity resulting from "scan the world for possible other users of this obdata" is completely not needed; it just never finds anything. So add a new dedicated function BKE_object_material_assign_single_obdata that skips the expensive part, but should only be used when the caller knows that the obdata has exactly one user (the passed object). Reviewed By: Bastien Montagne, Michael Kowalski Differential Revision: https://developer.blender.org/D15145
2022-07-06Fix T99462: Deleting Missing Libraries Crashes Blender.Bastien Montagne
Usual same issue with outliner operations, where you apply it on one item, and then try to apply it again on same item listed somewhere else in the tree... Fixed by using the 'multi-tagged deletion' code we now have for IDs, that way tree-walking function just tags IDs for deletion, and they all get deleted at once at the end.
2022-07-06OBJ: extend test coverage for parsing MTL scale/offsets (T89421)Aras Pranckevicius
The new OBJ/MTL importer was already handling case T89421 correctly, but there was no test coverage to prove it. Extend the tests to parse various forms of "-o" and "-s" (one, two, three numbers).
2022-07-06Cleanup: spelling in commentsCampbell Barton
2022-07-06Cleanup: Fix compiler warningsLoren Osborn
Use consistent class/struct declaration in forward declarations. Differential Revision: https://developer.blender.org/D15382
2022-07-06Fix T99284: Undefined values output from UV nodesHans Goudey
When committing D14389 I assumed that the output arrays didn't need to be initialized, but the UV parameterizer uses the intial values of UVs.
2022-07-06Fix: Tests: Incorrect curve constructionIliay Katueshenock
The offsets were filled with the same value, but they must be the total accumulated point count. Differential Revision: https://developer.blender.org/D15374
2022-07-06Curves: Port subdivide node to the new data-blockHans Goudey
This commit moves the subdivide curve node implementation to the geometry module, changes it to work on the new curves data-block, and adds support for Catmull Rom curves. Internally I also added support for a curve domain selection. That isn't used, but it's nice to have the option anyway. Users should notice better performance as well, since we can avoid many small allocations, and there is no conversion to and from the old curve type. The code uses a similar structure to the resample node (60a6fbf5b599) and the set type node (9e393fc2f125). The resample curves node can be restructured to be more similar to this soon though. Differential Revision: https://developer.blender.org/D15334
2022-07-05Curves: Move type conversion to the geometry moduleHans Goudey
This helps to separate concerns, and makes the functionality available for edit mode.
2022-07-05Fix: Memleak in sequencer drag and drop codeSebastian Parborg
2022-07-05Cleanup: Unused headers in generic compositor nodes headerSergey Sharybin
Move headers to node files which actually need those. There is no need for all nodes to have all those headers included indirectly.
2022-07-05Fix tracking header not being self-sufficientSergey Sharybin
It used size_t type without including any header to define it.
2022-07-05BLI: add float3x3 * float3 operator overloadJacques Lucke
2022-07-05Cleanup: extract function to snap curves to surfaceJacques Lucke
This makes it possible to use this function without having to call an operator. This is currently used by D14864.
2022-07-05BLI: use a slightly less trivial reverse uv samplerJacques Lucke
This approach is still far from ideal, but at least it has linear complexity in the common case instead of quadratic.
2022-07-05Cleanup: use curves surface transform utility in operatorsJacques Lucke
2022-07-05Curves: move curves surface transforms to blenkernelJacques Lucke
This utility struct is useful outside of sculpting code as well.
2022-07-05Fix T99272: Regression: location override ignored when used in a shadertree.Bastien Montagne
This is not strictly speaking a regression, this worked before partial resync was introduced purely because the whole override hierarchy was systematically re-built. But support for material pointers in obdata (meshes etc.) was simply not implemented. NOTE: This commit also greatly improves general support of materials in liboverrides, although there is still more work needed in that area to consider it properly supported.
2022-07-05Fix (unreported) liboverride: incomplete hierarchy when root is not ↵Bastien Montagne
object/collection. We do not (currently) consider other ID types as 'end points' justifying to create an override hierarchy, however if the 'root' ID (i.e. the ID the user selected as base to create the override) is not an object or collection, we still want to check all of its dependencies. This fixes e.g. if a material depends on another Empty object, and user tries to hierarchy-override that material, its Empty dependency not being overridden.
2022-07-05NLA: update description of `frame_end_ui` RNA propertySybren A. Stüvel
The description incorrectly mentioned it changes the start frame as well, but it changes the strip's repeats or the action's end frame.
2022-07-05NLA: fix punctuation of tooltipsSybren A. Stüvel
2022-07-05Cleanup: NLA, reformatting codeSybren A. Stüvel
No functional changes.
2022-07-05NLA: change behavior of 'Frame Start' / 'End' slidersThibault de Villèle
Change the behavior of the "Frame start" and [Frame] "End" fields of an NLA Strip in the NLA editor. Frame Start now behaves like translating with {key G} and moving the mouse. It also updates the Frame End to ensure the strip remains the same length. Frame End changes the length of the strip, based on the Repeat property. If there are no repeats (i.e. number of repeats = 1) the underlying Action will change length, such that more or less of its keyframes will be part of the NLA strip. If there are repeats (i.e. number of repeats smaller or larger than 1), the number of repeats will change. Either way, the effective end frame off the strip will be the one set in the Frame End slider. The old behavior of stretching time has been removed. It is still possible to stretch time of a strip, but this no longer automatically happens when manipulating the Frame Start and Frame End sliders. **Technical details:** new RNA properties `frame_start_ui` and `frame_end_ui` have been added. Changing those values (for example via the sliders, but also via Python) trigger the above behavior. The behavior of the already-existing `frame_start` and `frame_end` properties has been simplified, such that these can be set from Python without many side-effects, simplifying import of data into the NLA. Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D14658
2022-07-05Cleanup: formatCampbell Barton
2022-07-05GPU: add missing license headerCampbell Barton
2022-07-05Python: support v3.11 (beta) with changes to PyFrameObject & opcodesCampbell Barton
- Use API calls to access frame-data as PyFrameObject is now opaque. - Update opcodes allowed for safe driver evaluation. **Details** Some opcodes have been added for safe-driver evaluation. Python 3.11 removes many opcodes - the number of accepted opcodes in Blender's listing dropped from 65 to 43) however some new opcodes also needed to be added. As this relates to security details about newly added opcodes have been noted below (see [0] for full documentation). Newly added opcodes: - CACHE: Used to control caching instructions. - RESUME: A no-op. Performs internal checks. - BINARY_OP: Implements the binary and in-place operators, replacing specific binary operations. - CALL, PRECALL, KW_NAMES: Used for calling functions, replacing some existing opcodes. - POP_JUMP_{FORWARD/BACKWARD}_IF_{TRUE/FALSE/NONE/NOT_NONE}. Manipulate the byte-code counter. - SWAP, PUSH_NULL. Stack manipulation. Resolves T99277. [0]: https://docs.python.org/3.11/library/dis.html
2022-07-05Python: add opcodes for safe py-driversCampbell Barton
New opcodes added since 3.7 meant some actions such as `len()` were disabled in safe py-driver execution. The following opcodes have been added, see [0] for details: - ROT_FOUR: similar to existing ROT_* opcodes, added v3.8. - ROT_N: similar to existing ROT_* opcodes, added v3.10. - GET_LEN: Push len(TOS) onto the stack, added v3.10. - IS_OP: for ternary operator, added v3.9. - BUILD_SLICE: access `slice` built-in, doesn't expose new functionality beyond existing `__getitem__` access. [0]: https://docs.python.org/3.10/library/dis.html
2022-07-05Python: remove invalid Py_TPFLAGS_HAVE_GC usageCampbell Barton
Blender wouldn't start with Python 3.11 because of an error in Py_TPFLAGS_HAVE_GC usage for `bpy.app.handlers.persistent`. Remove this flag as it's not necessary. Part of fix for T99277.
2022-07-04BLI: Use simpler sliced generic virtual arrays when possibleHans Goudey
This is just a theoretical improvement currently, I won't try to justify it with some microbenchmark, but it should be better to use the specialized single and span virtual arrays when slicing a `GVArray`, since any use of `GVArrayImpl_For_SlicedGVArray` has extra overhead. Differential Revision: https://developer.blender.org/D15361
2022-07-04METAL: Add license header to new filesClément Foucault
2022-07-04Curves: Expose function to calculate vector handlesHans Goudey
2022-07-04Cleanup: Correct UI view commentsJulian Eisel
2022-07-04Fix curves sculpting Selection Paint missing refreshDalai Felinto
This was reported as part of D15219 but it is a problem in master, not in the patch. EEVEE is drawing with a cheap sampling when navigating or painting, but we need to clear the painting flag when we are done painting. For a rainy day: DRW_state_is_navigating() should be renamed to indicate that it also checks for the painting flag.
2022-07-04Cleanup: Remove unused functionHans Goudey
2022-07-04Cleanup: Clarify relation name for time relation to modifierSergey Sharybin
2022-07-04Fix T99381: GPencil Unable to Sculpt last point using Subdivide ModifierAntonio Vazquez
The problem was the last point had the original point, but the previous one not, so the loop ends before checking last point. The solution is avoid the loop exist if the function is checking the previous point before last one.
2022-07-04Fix T98884: Fix edge case crashes in gpu subdiv cache codeJoseph Eagar