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-09-08IDManagement: change `IDTypeInfo.owner_get` to instead return address of the ↵Bastien Montagne
owner_id pointer. Also rename the callback. That way, we can keep moving toward a more generic handling of those embedded IDs (think e.g. about copy code).
2022-08-28Cleanup: replace NULL with nullptr for C++ filesCampbell Barton
2022-08-22Merge branch 'blender-v3.3-release'Bastien Montagne
Conflicts: release/scripts/startup/bl_ui/space_userpref.py
2022-08-22I18n: disambiguate a few translationsDamien Picard
- Keying (keyframe insertion) - Roughness (particle children) - New image, collection, text (in menus) - Parents (particles) - Wrap (text) - Light (add menu) - Empty (volume add menu) - Empty (empty add menu) - Cycles (f-curve modifier) - Drag (workspace tool type) - Power (light intensity) - Power (math nodes) This last change also moves all math operations in nodes to the ID_nodetree context. It's needed only for some operations, but we can't be more granular here. Also... - Fix context extraction for interpolation mode headers in F-Curves and GPencil interpolation operator - Enable new translation: "Slot %d" in image editor - Fix an English message in the node editor: "Replace the input image's alpha channels by..." -> channel Ref. T43295 Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15694
2022-08-15Fix regression: crash with uv constrain to bounds without imageChris Blackbourn
Merge confusion between cc1daa9b766d and 0d62e963b06e.
2022-08-08Merge branch 'blender-v3.3-release'Germano Cavalcante
2022-08-08Fix T100281: image save after copy not using correct filepathBrecht Van Lommel
Always use the image datablock filepath for saving. The only apparent reason use the image buffer file path is image sequences, for which the current frame filepath is now computed.
2022-08-05Merge remote-tracking branch 'origin/blender-v3.3-release'Jesse Yurkovich
2022-08-05Fix T100142: Compare correct render_slot variable during clear operationJesse Yurkovich
In {rB0ef8a6179d2a773b2570352bd0cb7eb18b666da2} the parameter name was changed to match the header declaration (slot) but it missed updating the variable name inside the function correctly in one instance. This prevents slot 0 from being cleared if the last slot to be rendered was not also 0. Differential Revision: https://developer.blender.org/D15620
2022-08-04Fix T97251: Store generated type information for each UDIM tileJesse Yurkovich
Various situations can lead to un-saved UDIM tiles potentially losing their contents. The most notable situation is a save and re-load of a .blend file that has "generated" UDIM tiles that haven't been written to disk yet. Normal "generated" images are reconstructed on demand in these circumstances but UDIM tiles do not retain the information required for reconstruction and empty tiles are presented to the user. This patch stores the generated type information for each tile to solve this particular issue. It also shifts the Image generation info into the 1st tile. The existing DNA fields are deprecated but RNA was modified as to not break API compat. There's two broad changes here that merit special callout: - How to distinguish between a tile that should be reconstructed vs. a tile that should remain empty because loading failed for the UDIMs - How to better handle Image Source changes The first issue is addressed as follows: - Each time a tile is filled with generated content we set a new IMA_GEN_TILE flag - Each time a tile is saved to disk we remove the IMA_GEN_TILE flag - When requesting an ibuf: If the ibuf is null, we check to see if IMA_GEN_TILE is set. If it is set, go ahead and re-create the tile. Otherwise, do nothing. The second set of changes have to do with ensuring that information is carried along as far as possible when the, sometimes destructive, act of changing an Image Source is performed. Behavior should be a bit more natural and expected now; though users will rarely, or should rarely, be modifying this property. The full table describing the behavior is in the differential. Differential Revision: https://developer.blender.org/D14885
2022-08-04Cleanup: spelling, code-blocksCampbell Barton
2022-08-04Cleanup: quiet nonnull-compare warning for GCCCampbell Barton
All callers ensure this is not NULL.
2022-08-03Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-08-03Fix T100106: image movie/sequence auto refresh affects still image performanceBrecht Van Lommel
2022-08-03Fix unreported: Add tie-break conditions for udim search with integersChris Blackbourn
When searching for closest UDIM with integer co-ordinates, several UDIMs can be equidistant. Previously, of all closest UDIMs, the one which was earliest in the list would be used. Now, "half-open interval" rules are used to break the tie. Motivated by 0fcc04e7bfe1 Differential Revision: https://developer.blender.org/D15590
2022-07-30Fix 100035: Make UDIM detection less aggressiveJesse Yurkovich
There's been a handful of reports where "obviously" not a UDIM filenames were detected as such during image open.[1] This change makes the detection less aggressive by enforcing that the 4-digit sequence be delineated on both sides by one of the following 3 characters ., -, _ This fixes the problem for such filenames as: "screenshot-1080p.png", "Image-1920x1080.png", "(1999) Photo.png", and "antiguaChestnut_X_1240Wx814H.png" [1] T97366 T98918 T99154 T100035 Differential Revision: https://developer.blender.org/D15573
2022-07-24Cleanup: Fix off-by-half-errors with udim searchChris Blackbourn
2022-07-22Cleanup: add BKE_image_find_nearest_tile_with_offsetCampbell Barton
Every caller BKE_image_find_nearest_tile was calculating the tile offset so add a version of this function that returns the offset too.
2022-07-15Cleanup: add utlity function to compute render resolutionBrecht Van Lommel
Instead of duplicating logic many times.
2022-07-15Cleanup: Use const pointers for ImageSaveOptions and ImageFormatDataJesse Yurkovich
Use const pointers to ImageSaveOptions and ImageFormatData for API parameters where appropriate. Differential Revision: https://developer.blender.org/D15400
2022-07-01Add helper function to replace buffer of a single-frame imageSergey Sharybin
Very similar to BKE_image_add_from_imbuf with the exception that no new image data-block is created, but instead the given one is modified.
2022-07-01Fix possible wrong image color space when it is created from image bufferSergey Sharybin
From quick look it doesn't seem to be leading to real issues yet as the image buffers are created with the default roles, but valid color space is needed to be ensured for an upcoming development.
2022-07-01Fix image-from-imbuf resulting in invalid image configurationSergey Sharybin
The image which source is set to file is not expected to have empty file path. If it happens it becomes very tricky to save the image on exit using the standard quit dialog. This change makes it so if the image buffer does not have file path then the new image is set to the "generated" source and it behaves as if the image was created like so and was fully painted on. Additionally, mark image as dirty, so that quitting Blender after such image was added will warn about possible data loss.
2022-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-30Cleanup: spelling in commentsCampbell Barton
2022-06-17Cleanup: remove redundant string formattingCampbell Barton
2022-06-10Cleanup: Clang tidyHans Goudey
2022-05-28Merge remote-tracking branch 'origin/blender-v3.2-release'Jesse Yurkovich
2022-05-28Re-fix T97366: Support single-file UDIMsJesse Yurkovich
The original fix for T97366 was too restrictive and breaks real-world cases of single-file UDIM textures. See D13297 for an example. This patch effectively reverts the original fix and instead fixes the downstream code to accept single-file ranges as necessary. Note: This means it is very important for users to make use of the "UDIM detection" option during `image.open` or drag n' drop scenarios in order to declare their intent when loading their files. Differential Revision: https://developer.blender.org/D14853
2022-05-27GPU: Remove cached full/scaled image texture.Jeroen Bakker
full scaled image isn't used anymore. It was added to use a different scale when displaying an image in the image editor. This was replaced by the image engine redesign. This change will reduce complexity of {T98375}.
2022-05-12Cleanup: discarded-qualifier warning, mixing enum/intsCampbell Barton
2022-05-12UDIM: Add support for packing inside .blend filesJesse Yurkovich
This completes support for tiled texture packing on the Blender / Cycles side of things. Most of these changes fall into one of three categories: - Updating Image handling code to pack/unpack tiled and multi-view images - Updating Cycles to handle tiled textures through BlenderImageLoader - Updating OSL to properly handle textures with multiple slots Differential Revision: https://developer.blender.org/D14395
2022-04-23Bake: add UDIM tile baking supportBrecht Van Lommel
Works for both Cycles and multires bake. Triangles are baked to multiple UDIM images if they span across them, though such UV layouts are generally discouraged as there is no filtering across UDIM tiles. The bake margin currently only works within UDIM tiles. For the extend method this is logical, for the adjacent faces method it may be useful to support copying pixels from other UDIM tiles, though this seems somewhat complicated. Fixes T95190 Ref T72390
2022-04-17Fix T97366: Misdetection of numbers as UDIMs in certain filepathsJesse Yurkovich
In some circumstances singular files with numbers in their name (like turntable-1080p.png or frame-1042.png) might be detected as a UDIM. The root cause in this particular instance was because `BKE_image_get_tile_info` believed this file to be a tiled texture and replaced the filename with a tokenized version of it. However, later on, the code inside `image_open_single` did not believe it was tiled because only 1 file was detected and our tiled textures require at least 2. This discrepancy lead to the broken filename situation. This was a regression since rB180b66ae8a1f as that introduced the tokenization changes. Differential Revision: https://developer.blender.org/D14667
2022-04-13Cleanup: avoid redundant float/int conversions in BLFCampbell Barton
Internally many offsets for BLF were integers but exposed as floats, since these are used in pixel-space, many callers were converging them back to integers. Simplify logic by using ints.
2022-04-11Cleanup: use doxy-comments and `r_` prefix return argumentsCampbell Barton
2022-04-06Fix badly broken caches handling during undo/redo.Bastien Montagne
Original rework of caches during undo/redo (see D8183) had a very bad flaw hidden in it: using the key of a ghash as source of data. While this was effectively working then (cache pointer itself being part of the key, and said cache pointers not being cleared on file write), this is a general very bad way to do things. Now that cache pointers are more and more cleared on file write (as part of clearing runtime-data to reduce false-positives when checking if an ID has changed or not), this has to be fixed properly by: * Not storing the cache pointer itself in the IDCacheKey. * In undo context, in readfile code trying to preserve caches, store the cache pointers as values of the mapping, together with the usages counter The first change potentially affects all usages of `BKE_idtype_id_foreach_cache`, but in practice this code is only used by memfile reading code (i.e. undo) currently. Related to T97015. Reviewed By: brecht Maniphest Tasks: T97015 Differential Revision: https://developer.blender.org/D14559
2022-03-28Cleanup: Reduce duplication to prepare for UDIM packingJesse Yurkovich
In preparation for supporting packing of UDIM tiled textures, this patch refactors a small portion of image.cc. The refactor should lead to less duplicate code now and when Tiled images are added in the near future. This patch is based on the prior work done for D6492 where it was requested this part be split and can be summarized as follows: - `load_sequence_single` is removed and merged with `load_image_single` - `image_load_sequence_file` is removed and merged with `image_load_image_file` Reviewed By: lukasstockner97 Differential Revision: https://developer.blender.org/D14327
2022-03-25Cleanup: use count or num instead of nbrCampbell Barton
Follow conventions from T85728.
2022-03-25Cleanup: spelling in comments, stringsCampbell Barton
2022-03-24Cleanup: Clang tidyHans Goudey
- Deprecated headers - Else after return - Inconsistent parameter names (I used the most recently modified) - Raw string literals
2022-03-24UDIM: Improve tile format detection in filenamesJesse Yurkovich
There are some filenames where the UDIM pattern guessing would fail unnecessarily. The user can fix these up afterwards but it would be nicer if they would detect properly in the first place. Examples: `test.1001.ver0023.png` would guess wrong since it uses the image sequence detection code which finds the first sequence from the end. It would guess `filename.1001.ver<UDIM>.png` `uv-test.u1_v2.png` would fail detection due to a bug in the processing. Make this much more reliable and add tests for the most important tile related get/set/detection functions. Differential Revision: https://developer.blender.org/D14320
2022-03-22Cleanup: add proper IMB_openexr.h instead of including file from intern/Brecht Van Lommel
2022-03-21Cleanup: move render image and multilayer EXR write code to image_save.ccBrecht Van Lommel
These share a lot of logic with regular image saving and should be unified more in the future.
2022-03-21Cleanup: add image_format.cc for functions related to ImageFormatDataBrecht Van Lommel
Also fixes missing code to read/write/free/copy color management settings in various places. This can't be set through the UI currently, but still should be handled consistently.
2022-03-17Cleanup: spelling in commentsCampbell Barton
Use <pre>..</pre> for pseudo-code.
2022-03-16Cleanup: Remove volatile from RenderResult and related APIsJesse Yurkovich
Volatile fields were introduced to the RenderResult struct years ago[1]. However, volatile is most likely not doing what it was intended to do in this instance, and is problematic when moving files to c++ (see discussion from D13962). There are complex rules around what happens to these fields but none of them guarantee what the above commit alluded to. This patch drops the volatile and cleans up the APIs surrounding it. [1] rB7930c40051ef1b1a26140629cf1299aa89eed859 Passing on all platforms: https://builder.blender.org/admin/#/builders/18/builds/338 Differential Revision: https://developer.blender.org/D14298
2022-03-14Cleanup: spellingCampbell Barton
2022-03-11Cleanup: use doxy sections in image.ccCampbell Barton
Also minor improvements & clarifications to comments.
2022-03-10Cleanup: spelling in comments & some minor clarificationsCampbell Barton