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-02-21Weight Proximity: fix value overlap between Normalize and Invert VGroup.Alexander Gavrilov
The flags overlapped ever since normalize was added, so this requires versioning to copy the flag value. Differential Revision: https://developer.blender.org/D14165
2022-02-18Fix broken shapekeys: check for 'NULL' `from` pointer too.Bastien Montagne
Add check for `NULL` `from` pointer to `BLO_main_validate_shapekeys`, and delete these shapekeys, as they are fully invalid and impossible to recover. Found in a studio production file (`animation test/snow_parkour/shots/0040/0040.lighting.blend`, svn rev `1111`). Would be nice to know how this was generated too...
2022-02-11Revert "Split Python OBJ importer and exporter, enabling only the importer."Howard Trickey
This reverts commit ff9dc1986e6c9a54fd0bb228e8813551e6baa042.
2022-02-03Fix (unreported) broken do_version of hidden layers from pre-2.8 files.Bastien Montagne
`BKE_collection_object_add` ensures given object is added to an editable collection, and not e.g. a linked or override one. However, some processes like do_version manipulate collections also from libraries, i.e. linked collections, in those cases we need a version of the code that unconditionnally adds the given object to the given colleciton.
2022-02-03Split Python OBJ importer and exporter, enabling only the importer.Howard Trickey
This is from patch D13988. It removes the "- New" from the menu of the new obj exporter, changes the default addon to just io_import_obj, and does the right versioning thing. Also disables the python tests for the old python exporter.
2022-01-28Blender 3.1 Beta- subversion bumpDalai Felinto
2022-01-25Fix T93058: Crash on opening old pre-2.80 .blend files.Bastien Montagne
Layer resync code would not yet fully properly deal with all possible invalid status of ViewLayer comming from those older files. Now put 2.80-doversion specific fixes into their own dedicated function, so that they do not affect actual regular layer resync code anymore. Also added some sanity-checks in main `BKE_layer_collection_sync` code.
2022-01-25Cleanup: Correct location of node function declarationsHans Goudey
Currently there are many function declarations in `BKE_node.h` that don't actually have implementations in blenkernel. This commit moves the declarations to `NOD_composite.h`, `NOD_texture.h`, and `NOD_shader.h` instead. This helps to clarify the purpose of the different modules. Differential Revision: https://developer.blender.org/D13869
2022-01-21Geometry Nodes: Mesh Island Node - Rename Index SocketJohnny Matthews
Rename 'Index' Socket to 'Island Index' to make it more consistent with 'Island Count' Differential Revision: https://developer.blender.org/D13893
2022-01-20Fix continuous stream of thumbnail notifiers after redoJulian Eisel
This fixes a similar issue as the previous commit, but this time the continuous notifiers would be sent after redoing. E.g. after moving an object, and then modifying the transform in the "Adjust Last Operation" panel.
2022-01-18Geometry Nodes: Add Signed Output to Edge Angle NodeJohnny Matthews
Adds a second output to the edge angle node that shows the signed angle between the two faces, where Convex angles are positive and Concave angles are negative. This calculation is slower than the unsigned angle, so it was best to leave both for times where the unsigned angle will suffice. Differential Revision: https://developer.blender.org/D13796
2022-01-18Cleanup: spelling in commentsCampbell Barton
2022-01-17Baking: new method to generate margin, based on adjacent facesMartijn Versteegh
This significantly reduces discontinuities on UV seams, by giving a better match of the texture filtered colors on both sides of the seam. It works by using pixels from adjacent faces across the UV seam. This new option is called "Adjacent Faces" and is the default. The old option is called "Extend", and extends border pixels outwards. Differential Revision: https://developer.blender.org/D13303
2022-01-15Geometry Nodes: Rename transfer attribute geometry inputHans Goudey
Conceptually, this is the geometry that data is taken from, not the target of an operation, so rename it from "Target" to "Source". This was common user feedback and agreed on in a recent sub-module meeting.
2022-01-14Cleanup: spelling in comments, C++ style comments for disabled codeCampbell Barton
Also ensure space at end of comment.
2022-01-13Geometry Nodes: Rename String to Curves socketErik
Today many users seem to think the output from this node is a single curve with multiple splines. This patch renames the geometry output socket from "Curves" to "Curve Instances" to avoid confusion. Differential Revision: https://developer.blender.org/D13693
2022-01-07Fix BKE_image_ensure_tile_token being called with a full pathCampbell Barton
Assert that only the file name component is passed in since special handling for UDIM should only be applied to the file name. Also remove an unnecessary NULL check on the filename argument.
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2022-01-06Bone Overlay: support changing bone wireframe opacity.Alexander Gavrilov
When weight painting the bone overlay is extremely intrusive, effectively requiring either extensive use of hiding individual bones, or disabling the whole bone overlay between selections. This addresses the issue by adding a bone opacity slider that is used for the 'wireframe' armature drawing mode. It directly controls the uniform opacity as a straightforward option. Differential Revision: https://developer.blender.org/D11804
2022-01-06Cleanup: move public doc-strings into headersCampbell Barton
Some recent changes re-introduced public-style doc-strings in the source file.
2022-01-06Cleanup: spelling in commentsCampbell Barton
2022-01-03Add a new C++ version of an exporter for the Wavefront .obj format.Howard Trickey
This was originally written by Ankit Meel as a GSoC 2020 project. Howard Trickey added some tests and made some corrections/modifications. See D13046 for more details. This commit inserts a new menu item into the export menu called "Wavefront OBJ (.obj) - New". For now the old Python exporter remains in the menu, along with the Python importer, but we plan to remove it soon (leaving the old addon bundled with Blender but not enabled by default).
2022-01-03Fix T94594: Incorrect spreadsheet data set region type in old filesHans Goudey
This completes 1a721c5dbec928b0e by versioning old files to correct the region type. The "tools" region type is relatively standard for this type of region and doesn't require any changes to the theme, unlike the "nav bar" type, which would have been a reasonable choice.
2022-01-03UDIM: Support virtual filenamesJesse Yurkovich
This implements the design detailed in T92696 to support virtual filenames for UDIM textures. Currently, the following 2 substitution tokens are supported: | Token | Meaning | | ----- | ---- | | <UDIM> | 1001 + u-tile + v-tile * 10 | | <UVTILE> | Equivalent to u<u-tile + 1>_v<v-tile + 1> | Example for u-tile of 3 and v-tile of 1: filename.<UDIM>_ver0023.png --> filename.1014_ver0023.png filename.<UVTILE>_ver0023.png --> filename.u4_v2_ver0023.png For image loading, the existing workflow is unchanged. A user can select one or more image files, belonging to one or more UDIM tile sets, and have Blender load them all as it does today. Now the <UVTILE> format is "guessed" just as the <UDIM> format was guessed before. If guessing fails, the user can simply go into the Image Editor and type the proper substitution in the filename. Once typing is complete, Blender will reload the files and correctly fill the tiles. This workflow is new as attempting to fix the guessing in current versions did not really work, and the user was often stuck with a confusing situation. For image saving, the existing workflow is changed slightly. Currently, when saving, a user has to be sure to type the filename of the first tile (e.g. filename.1001.png) to save the entire UDIM set. The number could differ if they start at a different tile etc. This is confusing. Now, the user should type a filename containing the appropriate substitution token. By default Blender will fill in a default name using the <UDIM> token but the user is free to save out images using <UVTILE> if they wish. Differential Revision: https://developer.blender.org/D13057
2021-12-22Nodes: Refactor to remove node and socket "new" pointersHans Goudey
These pointers point to the new nodes when duplicating, and their even used to point to "original" nodes for "localized" trees. They're just a bad design decision that make code confusing and buggy. Instead, node copy functions now optionally add to a map of old to new socket pointers. The case where the compositor abused these pointers as "original" pointers are handled by looking up the string node names. Differential Revision: https://developer.blender.org/D13518
2021-12-21Nodes: refactor node tree update handlingJacques Lucke
Goals of this refactor: * More unified approach to updating everything that needs to be updated after a change in a node tree. * The updates should happen in the correct order and quadratic or worse algorithms should be avoided. * Improve detection of changes to the output to avoid tagging the depsgraph when it's not necessary. * Move towards a more declarative style of defining nodes by having a more centralized update procedure. The refactor consists of two main parts: * Node tree tagging and update refactor. * Generally, when changes are done to a node tree, it is tagged dirty until a global update function is called that updates everything in the correct order. * The tagging is more fine-grained compared to before, to allow for more precise depsgraph update tagging. * Depsgraph changes. * The shading specific depsgraph node for node trees as been removed. * Instead, there is a new `NTREE_OUTPUT` depsgrap node, which is only tagged when the output of the node tree changed (e.g. the Group Output or Material Output node). * The copy-on-write relation from node trees to the data block they are embedded in is now non-flushing. This avoids e.g. triggering a material update after the shader node tree changed in unrelated ways. Instead the material has a flushing relation to the new `NTREE_OUTPUT` node now. * The depsgraph no longer reports data block changes through to cycles through `Depsgraph.updates` when only the node tree changed in ways that do not affect the output. Avoiding unnecessary updates seems to work well for geometry nodes and cycles. The situation is a bit worse when there are drivers on the node tree, but that could potentially be improved separately in the future. Avoiding updates in eevee and the compositor is more tricky, but also less urgent. * Eevee updates are triggered by calling `DRW_notify_view_update` in `ED_render_view3d_update` indirectly from `DEG_editors_update`. * Compositor updates are triggered by `ED_node_composite_job` in `node_area_refresh`. This is triggered by calling `ED_area_tag_refresh` in `node_area_listener`. Removing updates always has the risk of breaking some dependency that no one was aware of. It's not unlikely that this will happen here as well. Adding back missing updates should be quite a bit easier than getting rid of unnecessary updates though. Differential Revision: https://developer.blender.org/D13246
2021-12-21Tests: initialise BKE callbacks before loading blend fileSybren A. Stüvel
Initialise the BKE callback system in `BlendfileLoadingBaseTest::SetUpTestCase()`. This allows certain tests to run in debug mode (when `BLI_assert` is enabled).
2021-12-17Fix T94116: Drivers can have multiple variables with same nameSybren A. Stüvel
The RNA setter now ensures that driver variables are uniquely named (within the scope of the driver). Versioning code has been added to ensure this uniqueness. The last variable with the non-unique name retains the original name; this ensures that the driver will still evaluate to the same value as before this fix. This also introduces a new blenlib function `BLI_listbase_from_link()`, which can be used to find the entire list from any item within the list. Manifest Task: T94116 Reviewed By: mont29, JacquesLucke Maniphest Tasks: T94116 Differential Revision: https://developer.blender.org/D13594
2021-12-17Fix (unreported): missed running versioning code in some filesJacques Lucke
The versioning code was accidentally put not at the very bottom. That lead to a situation where it wasn't run on some files that happened to be within a specific short time frame. Since the versioning code is idempotent, it can just run again on existing files. Therefore, this commit just moves it back to the bottom so that it is executed on all files again. Broken Commit: rB5b61737a8f41688699fd1d711a25b7cea86d1530.
2021-12-16WM: various changes to file writing behaviorCampbell Barton
Saving with only a filename (from Python) wasn't being prevented, while it would successfully write the file to the working-directory, path remapping and setting relative paths wouldn't work afterwards as `Main.filepath` would have no directory component. Disallow this since it's a corner case which only ever occurs when path names without any directories are used from Python, the overhead of expanding the working-directory for all data saving operations isn't worthwhile. The following changes have been made: - bpy.ops.wm.save_mainfile() without a filepath argument fails & reports and error when the file hasn't been saved. Previously it would write to "untitled.blend" and set the `G.main->filepath` to this as well. - bpy.ops.wm.save_mainfile(filepath="untitled.blend") fails & reports and error as the filename has no directory component. - `BLI_path_is_abs_from_cwd` was added to check if the path would attempt to expand to the CWD.
2021-12-16Cleanup: simplify file saving logicCampbell Barton
Revert part of the fix from 073669dd8588a3b80dfffee98b4f239b4baee8c8 that initialized the file-path on first save as it's no longer needed. Also remove relbase argument to BLI_path_normalize as the destination file paths shouldn't use relative locations.
2021-12-16Remove G.relbase_validCampbell Barton
In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564
2021-12-14Nodes: Add vector support to Map Range nodeCharlie Jolly
This replaces lost functionality from the old GN Attribute Map Range node. This also adds vector support to the shader version of the node. Notes: This breaks forward compatibility as this node now uses data storage. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D12760
2021-12-14Geometry Nodes: support instance attributes when realizing instancesJacques Lucke
This patch refactors the instance-realization code and adds new functionality. * Named and anonymous attributes are propagated from instances to the realized geometry. If the same attribute exists on the geometry and on an instance, the attribute on the geometry has precedence. * The id attribute has special handling to avoid creating the same id on many output points. This is necessary to make e.g. the Random Value node work as expected afterwards. Realizing instance attributes has an effect on existing files, especially due to the id attribute. To avoid breaking existing files, the Realize Instances node now has a legacy option that is enabled for all already existing Realize Instances nodes. Removing this legacy behavior does affect some existing files (although not many). We can decide whether it's worth to remove the old behavior as a separate step. This refactor also improves performance when realizing instances. That is mainly due to multi-threading. See D13446 to get the file used for benchmarking. The curve code is not as optimized as it could be yet. That's mainly because the storage for these attributes might change soonish and it wasn't worth optimizing for the current storage format right now. ``` 1,000,000 x mesh vertex: 530 ms -> 130 ms 1,000,000 x simple cube: 1290 ms -> 190 ms 1,000,000 x point: 1000 ms -> 150 ms 1,000,000 x curve spiral: 1740 ms -> 330 ms 1,000,000 x curve line: 1110 ms -> 210 ms 10,000 x subdivided cylinder: 170 ms -> 40 ms 10 x subdivided spiral: 180 ms -> 180 ms ``` Differential Revision: https://developer.blender.org/D13446
2021-12-14Cleanup: resolve parameter mis-matches in doc-stringsCampbell Barton
Renamed or removed parameters which no longer exist.
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
2021-12-08Cleanup: move public doc-strings into headers for 'blenloader'Campbell Barton
Ref T92709
2021-12-02Blenloader: move ghost include path from INC to TEST_INCSybren A. Stüvel
The Ghost dependency was added to avoid a memory leak (rBc7a1e115b507), but since that's only for the unit tests, it's better to add the path to `TEST_INC`.
2021-12-02Blendread: Remove all instantiation logic from `BLO_library_link_` code.Bastien Montagne
Instantiation is now fully handled by BKE_blendfile_link_append module. Note that this also allows removal of the `BLO_LIBLINK_NEEDS_ID_TAG_DOIT` flag. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-12-02Cleanup: Readfile: Remove deprecated `BLO_library_link_copypaste`.Bastien Montagne
Rewrite of ID paste code in rB3f08488244c0 made this function useless, ID pasting is now handled by the BKE_blendfile_link_append module too.
2021-12-02Cleanup: Rename curve struct fieldsHans Goudey
These existing names were unhelpful at best, actively confusing at worst. This patch renames them to be consistent with the terms used to refer to the values in the UI. - `width` -> `offset` - `ext1` -> `extrude` - `ext2` -> `bevel_radius` Differential Revision: https://developer.blender.org/D9627
2021-12-02UI: Add an option to display the node editor context pathHans Goudey
Since we have the overlays popover, it makes sense to allow toggling the context path like in the 3D viewport. This commit adds a property, and turns it on by default in existing files. Differential Revision: https://developer.blender.org/D13248
2021-12-01Geometry Nodes: Generalized Compare NodeJohnny Matthews
Replace compare floats node with a generalized compare node. The node allows for the comparison of float, int, string, color, and vector. The datatypes support the following operators: Float, Int: <, >, <=, >=, ==, != String: ==, != Color: ==, !=, lighter, darker (using rgb_to_grayscale value as the brightness value) Vector Supports 5 comparison modes for: ==, !=, <, >, <=, >= Average: The average of the components of the vectors are compared. Dot Product: The dot product of the vectors are compared. Direction: The angle between the vectors is compared to an angle Element-wise: The individual components of the vectors are compared. Length: The lengths of the vectors are compared. Differential Revision: https://developer.blender.org/D13228
2021-11-30Geometry Nodes: Rename Curve Parameter, Add Index on SplineJohnny Matthews
- Rename the Curve Parameter node to Spline Parameter. - Add "Index on Spline" to the node. This output is the index of the current point on it's parent spline rather than the entrire curve. Differential Revision: https://developer.blender.org/D13275
2021-11-30Cleanup: remove blank lines in comment blocksCampbell Barton
2021-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-11-30Cleanup: use colon after doxygen params, correct slash directionCampbell Barton
2021-11-29Refactor BKE_bpath module.Bastien Montagne
The main goal of this refactor is to make BPath module use `IDTypeInfo`, and move each ID-specific part of the `foreach_path` looper into their own IDTypeInfo struct, using a new `foreach_path` callback. Additionally, following improvements/cleanups are included: * Attempt to get better, more consistent namings. ** In particular, move from `path_visitor` to more standard `foreach_path`. * Update and extend documentation. ** API doc was moved to header, according to recent discussions on this topic. * Remove `BKE_bpath_relocate_visitor` from API, this is specific callback that belongs in `lib_id.c` user code. NOTE: This commit is expected to be 100% non-behavioral-change. This implies that several potential further changes were only noted as comments (like using a more generic solution for `lib_id_library_local_paths`, addressing inconsistencies like path of packed libraries always being skipped, regardless of the `BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value, etc.). NOTE: basic unittests were added to master already in rBdcc500e5a265093bc9cc. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13381
2021-11-23Merge branch 'blender-v3.0-release'Bastien Montagne