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-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-01Fix T96984: Create new image.browse operator for uiTemplateImage layoutsJesse Yurkovich
The existing BUTTONS_OT_file_browse operator that's used for uiTemplateImage layouts fails to work correctly with UDIM textures. This is mainly due to it not realizing that it must tokenize the filepath before signaling that an update has been made. It also doesn't work correctly when executing its SHIFT-click behavior to open the image in an external application. Lastly, it doesn't set the filters to Images and Movies which is suboptimal for the user. The new operator takes the unique features of BUTTONS_OT_file_browse and creates a customized variant better suited for images. Differential Revision: https://developer.blender.org/D14824
2022-03-23Color Management: support different settings for render and compositing outputBrecht Van Lommel
The Output Properties > Output panel now has a Color Management subpanel to override scene settings. When set to Override instead of Follow Scene, there are settings to: * For OpenEXR, choose a (linear) colorspace for RGBA passes * For other file formats, use different display/view/look/exposure/gamma These settings affect animation render output, image save of renders and the compositor file output node. Additionally, the image save operator and compositor file output nodes also support overriding color management. Includes some layout changes to the relevant panels to accomdate the new settings and to improve consistency. Ideally subpanels would be used to better organize these settings, however nodes and operators don't currently support creating subpanels. Differential Revision: https://developer.blender.org/D14402
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-07Shader Nodes: added alpha mode selector to Image Texture nodeEthan-Hall
Enables image user nodes to display the file alpha mode, similar to the colorspace setting. Also removes image_has_alpha in favor of using BKE_image_has_alpha, because it did not check if the image actually had an alpha channel, just if the file format was capable of supporting an alpha channel. Differential Revision: https://developer.blender.org/D14153
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-02Fix lots of missing messages i18n handling in `uiItemL` calls.Bastien Montagne
Also fix several wrong usages of `IFACE_` (as a reminder, error/info messages should use `TIP_`, not `IFACE_`).
2021-11-02Images: refactor how failed image load attempts are rememberedJacques Lucke
Previously, `ImageTile->ok` and `ImageUser->ok` were used to indicate whether an image failed to load. There were three possible values which (probably) had the following meanings: * `0`: There was an error while loading the image. Don't try to load again. * `1`: Default value. Try to load the image. * `2`: The image was loaded successfully. This image-wide flag did not make sense unfortunately, because loading may work for some frames of an image sequence but not for others. Remember than an image data block can also contain a movie. The purpose of the `->ok` flag was to serve as an optimization to avoid trying to load a file over and over again when there is an error (e.g. the file does not exist or is invalid). To get the optimization back, the patch is changing `MovieCache` so that it can also cache failed load attempts. As a consequence, `ibuf` is allowed to be `NULL` in a few more places. I added the appropriate null checks. This also solves issues when image sequences are used with the Image Texture node in Geometry nodes (also see D12827). Differential Revision: https://developer.blender.org/D12957
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-05-27Fix incorrect BLI_snprintf usageCampbell Barton
Event though in practice this wasn't causing problems as the fixed size buffers are generally large enough not to truncate text. Using the result from `snprint` or `BLI_snprintf` to step over a fixed size buffer allows for buffer overruns as the returned value is the size needed to copy the entire string, not the number of bytes copied. Building strings using this convention with multiple calls: ofs += BLI_snprintf(str + ofs, str_len_max - ofs); .. caused the size argument to become negative, wrapping it to a large value when cast to the unsigned argument.
2021-01-13UI: Revert design changes to data-block selector for the 2.92 releaseJulian Eisel
Partially reverts 2250b5cefee7. Removing the user count and fake user count icons was controversial (which was expected) and there are a few further changes needed, that won't make it in time for the release, see D9946. While there is a design to bring back the user count and fake user indicators, a new design idea was proposed that the UI team wants to follow. This came too late for the 2.92 release, the new design is targeted at the 2.93 release now. Meanwhile, UI team decision was to simply revert the design changes. The new design is being worked on in https://developer.blender.org/T84669. Note that this commit does not revert some internal changes done in 2250b5cefee7. Namely the introduction of `ed_util_ops.c` and data-block operators in there. These will still be needed in the new design.
2020-12-20UI: Reorder enums in render results image editor headerYevgeny Makarov
The convention is to put the label at the bottom of the enum, or in the spot furthest away from the button. This commit reorders the items in the "Slot", "Layer", and "Pass" menus to be consistent with this convention. It also reorders the numbering so that higher numbers are lower. The original patch was by Adrian Newton (@TFS), with slight changes and additions. Differential Revision: https://developer.blender.org/D7142
2020-12-18UI: Redesigned data-block selectorsJulian Eisel
The previous design is rather old and has a couple of problems: * Scalability: The current solution of adding little icon buttons next to the data-block name field doesn't scale well. It only works if there's a small number of operations. We need to be able to place more items there for better data-block management. Especially with the introduction of library overrides. * Discoverability: It's not obvious what some of the icons do. They appear and disappear, but it's not obvious why some are available at times and others not. * Unclear Status: Currently their library status (linked, indirectly linked, broken link, library override) isn't really clear. * Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to invoke alternative behaviors. This is not a usual pattern in Blender. This patch does the following changes: * Adds a menu to the right of the name button to access all kinds of operations (create, delete, unlink, user management, library overrides, etc). * Make good use of the "disabled hint" for tooltips, to explain why buttons are disabled. The UI team wants to establish this as a good practise. * Use superimposed icons for duplicate and unlink, rather than extra buttons (uses less space, looks less distracting and is a nice + consistent design language). * Remove fake user and user count button, they are available from the menu now. * Support tooltips for superimposed icons (committed mouse hover feedback to master already). * Slightly increase size of the name button - it was already a bit small before, and the move from real buttons to superimposed icons reduces usable space for the name itself. * More clearly differentiate between duplicate and creating a new data-block. The latter is only available in the menu. * Display library status icon on the left (linked, missing library, overridden, asset) * Disables "Make Single User" button - in review we weren't sure if there are good use-cases for it, so better to see if we can remove it. Note that I do expect some aspects of this design to change still. I think some changes are problematic, but others disagreed. I will open a feedback thread on devtalk to see what others think. Differential Revision: https://developer.blender.org/D8554 Reviewed by: Bastien Montagne Design discussed and agreed on with the UI team, also see T79959.
2020-11-13Cleanup: Make panel type flag names more clearHans Goudey
The overlap with the `Panel` flags that start with "PNL" was quite confusing because wasn't clear which enum a flag was from. The new names are a bit longer, but the clarity is worth it.
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-03Cleanup: Editors, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors` module. No functional changes.
2020-04-29Fix crash after 475bd6b occuring on each render end, we need another ↵Jens Verwiebe
nullcheck here
2020-04-28Fix T76179: Unable to select render passes when a render has fewerPhilipp Oeser
passes than one in another slot If a particular pass is not available in a slot we are switching to, still show the menu, but with a blank name for the currently selected item so that the user can change it to a valid value. thx @brecht for providing the standard way Blender deals with these kinds of situations. Maniphest Tasks: T76179 Differential Revision: https://developer.blender.org/D7552
2020-04-07Cleanup: BLI_path.h function renamingCampbell Barton
Use BLI_path_ prefix, more consistent names: BLI_parent_dir -> BLI_path_parent_dir BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists BLI_ensure_filename -> BLI_path_filename_ensure BLI_first_slash -> BLI_path_slash_find BLI_last_slash -> BLI_path_slash_rfind BLI_add_slash -> BLI_path_slash_ensure BLI_del_slash -> BLI_path_slash_rstrip BLI_path_native_slash -> BLI_path_slash_native Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`. BLI_cleanup_path -> BLI_path_normalize BLI_cleanup_dir -> BLI_path_normalize_dir BLI_cleanup_unc -> BLI_path_normalize_unc BLI_cleanup_unc16 -> BLI_path_normalize_unc16 Clarify naming for extracting, creating numbered paths: BLI_stringenc -> BLI_path_sequence_encode BLI_stringdec -> BLI_path_sequence_decode Part of T74506 proposal.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-26Fix T74221 Crash when changing Image Source in UV editorClément Foucault
2020-02-25GPU: Add Image property to allow high bitdepth support on a per image basisClément Foucault
This adds the `Half Float Precision` option in the image property panel. This option is only available on float textures and is enabled by default. Adding a flag inside the imbuf (IB_halffloat) on load is done for EXR and PSD formats that can store half floating point (16bits/channels). The option is then not displayed in this case and forced. Related task T73086 Reviewed By: brecht Differential Revision: https://developer.blender.org/D6891
2020-02-25Image: support saving images in non-image spacesCampbell Barton
Alternate fix for T74182, making changes to the save-as operator.
2020-02-25Fix T74182: Crash saving images from non-image spacesCampbell Barton
2019-11-25UI: Allow label for Template-ID (respecting property split layout)Julian Eisel
Adds a `text` parameter to `bpy.types.uiLayout.template_ID()` which causes a label to be added, as usual. Adding the label also makes the template respect the `bpy.types.uiLayout.use_property_split` option. Also fixes wrong layout being used in the template-ID, although I think that didn't cause issues in practice. Sergey requested this for usage in the Movie Clip Editor.
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-06-17Fix T63867: image sequence not updating in Eevee animation renderBrecht Van Lommel
2019-06-11Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_.Bastien Montagne
Cheap tip: anything that is not "Camel Case" and/or that is more than a few words long should use `TIP_` translation, not `IFACE_` one. Also added several missing strings (including the one reported in D5056 by Jean First (@robbott), thanks).
2019-06-04Image InfoJeroen Bakker
The image information for multilayer openexr files are only shown on the first draw. In the second draw the render result property is filled of the image, making blender think the image is a render result and it want to display information about the renderpasses. Which are not present. It could be that in the first draw the image data is not requested as the buttons are drawn, before the main area This change will display both information. We should investigate how to actually detect if this is a render result or not as similar code is present in the `node_shader_buts_tex_environment_ex`. Reviewed By: brecht Maniphest Tasks: T65345 Differential Revision: https://developer.blender.org/D4987
2019-05-23Compositor: FileOutputJeroen Bakker
The File output node stores it settings locally, but the stereo settings were not displayed, making users only able to use the default settings of the node. The cause of not displaying the buttons are was a NULL-pointer check in `uiTemplateImageFormatViews`. The NULL pointer was used to check if multiview was enabled. in case of the file output node this check was performed by the node, so the nullpointer check could be ignored. Reviewed By: brecht Maniphest Tasks: T62767 Differential Revision: https://developer.blender.org/D4929
2019-05-21Fix T64867: crash when changin image source to MoviePhilipp Oeser
thx @Gvgeo for adding the python/RNA case as well. Reviewers: brecht Maniphest Tasks: T64867 Differential Revision: https://developer.blender.org/D4902
2019-05-20UI: right align info in image settings panelBrecht Van Lommel
2019-05-19UI: minor tweaks to image editor panelsBrecht Van Lommel
2019-05-19UI: use single column layout for image settings panelsBrecht Van Lommel
2019-05-19Images: change alpha settings to support channel packingBrecht Van Lommel
This also replaces the Use Alpha setting. We now have these alpha modes: * Straight: store RGB and alpha channels separately with alpha acting as a mask, also known as unassociated alpha. * Premultiplied: transparent RGB pixels are multiplied by the alpha channel. The natural format for renders. * Channel Packed: different images are packed in the RGB and alpha channels, and they should not influence each other. Channel packing is commonly used by game engines to save memory. * None: ignore alpha channel from the file and make image fully opaque. Cycles OSL does not correctly support Channel Packed and None yet, we are missing fine control over the OpenImageIO texture cache to do that. Fixes T53672
2019-05-17Images: changes to avoid losing new images that have not been savedBrecht Van Lommel
The basic idea is that such new images will be packed into the .blend file when saving all modified images from the quit dialog. To make this workflow nicer a number of changes were made to how this type of packed image is handled. * "Save Modified Images" now packs generated images into the .blend file. * "Save As" for packed images now automatically unpacks the image, so that it's easy to save automatically packed images. "Save Copy" keeps it packed. * "Save" for packed images now re-saves the image into the .blend file, so that it's effectively the equivalent of "Save" for non-packed images. * Empty image filepaths are no longer remapped when saving the .blend file. Previously it would become e.g. "//../../" which makes no sense for generated images with no filepath yet. * Hide unpack button and filepath for such packed images with no filepath. Unpacking does not work in a predictable way without a filepath, better to just "Save As".
2019-05-17Images: make it harder to accidentally undo image texture painting changesBrecht Van Lommel
Editing properties like generated X/Y size clears any changes to the image, and it's not obvious that this is destructive. Now if the image has been painted on or baked to, buttons to Save or Discard changes will appear and editing the properties will be disabled until doing one of these.
2019-05-17Cleanup: remove unused image codeBrecht Van Lommel
2019-05-01UI: move image paint panels into the image side-barCampbell Barton
- Move painting brush panels into the image side-bar. - Add active tool panel to the image side-bar.
2019-04-19Cleanup: Remove image preview codeSergey Sharybin
Was commented out for literally 10 years.
2019-04-18UI: move region toggling to propertiesCampbell Barton
Each space had separate operators, duplicating logic. Use RNA properties instead so adding the ability to toggle other region types (floating redo region for eg) doesn't need to have an extra operator per space type. It's also nicer to show a check-box for something which can be toggled.
2019-04-17ClangFormat: format '#if 0' code in source/Campbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-26Cleanup: style, use braces for editor/spacesCampbell Barton
2019-02-18Fix T57457: animated image sequences not working in Eevee.Brecht Van Lommel
The dependency graph now handles updating image users to point to the current frame, and tags images to be refreshed on the GPU. The image editor user is still updated outside of the dependency graph. We still do not support multiple image users using a different current frame in the same image, same as 2.7. This may require adding a GPU image texture cache to keep memory usage under control. Things like rendering an animation while the viewport stays fixed at the current frame works though.