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-11-09Asset System: New core type to represent assets (`AssetRepresenation`)Julian Eisel
Introduces a new `AssetRepresentation` type, as a runtime only container to hold asset information. It is supposed to become _the_ main way to represent and refer to assets in the asset system, see T87235. It can store things like the asset name, asset traits, preview and other asset metadata. Technical documentation: https://wiki.blender.org/wiki/Source/Architecture/Asset_System/Back_End#Asset_Representation. By introducing a proper asset representation type, we do an important step away from the previous, non-optimal representation of assets as files in the file browser backend, and towards the asset system as backend. It should replace the temporary & hacky `AssetHandle` design in the near future. Note that the loading of asset data still happens through the file browser backend, check the linked to Wiki page for more information on that. As a side-effect, asset metadata isn't stored in file browser file entries when browsing with link/append anymore. Don't think this was ever used, but scripts may have accessed this. Can be brought back if there's a need for it.
2022-11-01Cleanup: spelling in commentsCampbell Barton
2022-10-18File Browser: Fix slowdown with non-existing ID previews in big filesJulian Eisel
When the File (or Asset) Browser would display data-blocks without previews in a heavy .blend file, there would be a drastic slowdown. See patch for details and comparison videos. Differential Revision: https://developer.blender.org/D16273 Reviewed by: Bastien Montagne
2022-10-12UV: add grid shape source to the uv editor, and add new "pixel" optionChris Blackbourn
This change is part of a wider set of changes to implement Grid and Pixel snapping in the UV Editor. This particular change adds a new third option, `pixel grid`, to the previous grid options, `dynamic grid` and `fixed grid`. Maniphest Tasks : T78391 Differential Revision: https://developer.blender.org/D16197
2022-09-28Geometry Nodes: viewport previewJacques Lucke
This adds support for showing geometry passed to the Viewer in the 3d viewport (instead of just in the spreadsheet). The "viewer geometry" bypasses the group output. So it is not necessary to change the final output of the node group to be able to see the intermediate geometry. **Activation and deactivation of a viewer node** * A viewer node is activated by clicking on it. * Ctrl+shift+click on any node/socket connects it to the viewer and makes it active. * Ctrl+shift+click in empty space deactivates the active viewer. * When the active viewer is not visible anymore (e.g. another object is selected, or the current node group is exit), it is deactivated. * Clicking on the icon in the header of the Viewer node toggles whether its active or not. **Pinning** * The spreadsheet still allows pinning the active viewer as before. When pinned, the spreadsheet still references the viewer node even when it becomes inactive. * The viewport does not support pinning at the moment. It always shows the active viewer. **Attribute** * When a field is linked to the second input of the viewer node it is displayed as an overlay in the viewport. * When possible the correct domain for the attribute is determined automatically. This does not work in all cases. It falls back to the face corner domain on meshes and the point domain on curves. When necessary, the domain can be picked manually. * The spreadsheet now only shows the "Viewer" column for the domain that is selected in the Viewer node. * Instance attributes are visualized as a constant color per instance. **Viewport Options** * The attribute overlay opacity can be controlled with the "Viewer Node" setting in the overlays popover. * A viewport can be configured not to show intermediate viewer-geometry by disabling the "Viewer Node" option in the "View" menu. **Implementation Details** * The "spreadsheet context path" was generalized to a "viewer path" that is used in more places now. * The viewer node itself determines the attribute domain, evaluates the field and stores the result in a `.viewer` attribute. * A new "viewer attribute' overlay displays the data from the `.viewer` attribute. * The ground truth for the active viewer node is stored in the workspace now. Node editors, spreadsheets and viewports retrieve the active viewer from there unless they are pinned. * The depsgraph object iterator has a new "viewer path" setting. When set, the viewed geometry of the corresponding object is part of the iterator instead of the final evaluated geometry. * To support the instance attribute overlay `DupliObject` was extended to contain the information necessary for drawing the overlay. * The ctrl+shift+click operator has been refactored so that it can make existing links to viewers active again. * The auto-domain-detection in the Viewer node works by checking the "preferred domain" for every field input. If there is not exactly one preferred domain, the fallback is used. Known limitations: * Loose edges of meshes don't have the attribute overlay. This could be added separately if necessary. * Some attributes are hard to visualize as a color directly. For example, the values might have to be normalized or some should be drawn as arrays. For now, we encourage users to build node groups that generate appropriate viewer-geometry. We might include some of that functionality in future versions. Support for displaying attribute values as text in the viewport is planned as well. * There seems to be an issue with the attribute overlay for pointclouds on nvidia gpus, to be investigated. Differential Revision: https://developer.blender.org/D15954
2022-09-22UV: add toggle to show the grid over the imageChris Blackbourn
In UV editor, previously unable to see grid and image at same time. Maniphest Tasks: T78391 Differential Revision: https://developer.blender.org/D16038
2022-09-21Refactor: Move file browser filelist.c to C++Julian Eisel
I'm adding some asset APIs/types in C++ that the file-listing code would use. I prefer porting this code to C++ over adding a C-API for the asset code. Includes some minor cleanups that shouldn't change behavior, like using `MEM_new()`/`MEM_cnew()`, C++ style C-library includes, `LISTBASE_FOREACH()`, removing unnecessary typedefs, etc.
2022-09-20UV: extend custom grid sizes to set each axis separatelyChris Blackbourn
For example, allows a custom UV grid size of 4 x 12. TODO: Fix snapping with custom UV grid sizes. Manifest Tasks: T78391 Differential Revision: https://developer.blender.org/D16000
2022-09-19Cleanup: spellingCampbell Barton
2022-09-15UV: rename "Pixel Snap Mode" to "Pixel Round Mode"Chris Blackbourn
Maniphest Tasks: T78391 Differential Revision: https://developer.blender.org/D15952
2022-08-24Cleanup: Move outliner types to namespace, avoid C-style type definitionJulian Eisel
With C++ we should transition towards namespaces to avoid naming collisions. Having the namespace in place is the first step for that transition. Plus, the `typedef` isn't necessary for struct/class/enum definitions in C++, so avoid the verbosity it adds.
2022-08-18Outliner: Refactor outliner tree-hash interfaces with C++Julian Eisel
- Turn storage into an object with "automatic" memory management (RAII) so freeing is implicit and reliable. - Turn functions into member functions, to have the data and its functions close together with controlled access that increases encapsulation and hiding implementation details. - Use references to indicate null is not an expected value. - Related minor cleanup (comments, use const etc.) Couldn't spot any changes in performance.
2022-08-17Cleanup: Remove unused Outliner search element storageJulian Eisel
This is old code to keep track of an active search element, so you could step through the search results. This isn't used anymore, and not needed since searching now filters the tree to only show matches. If we ever wanted to have support for stepping through elements again, that should be done via the active element instead.
2022-07-27Cleanup: Move wm_dragdrop.c to C++Hans Goudey
2022-07-07Cleanup: Correct comment with spreadsheet enum typeHans Goudey
2022-06-29Spreadsheet: display byte colors as scene linear floatsBrecht Van Lommel
The compression as sRGB is mostly an implementation detail and showing the integers does not make it clear what the actual values are that will be used for computations in geometry nodes. This follows the general convention that colors in Blender are displayed and edited in scene linear floats. The raw sRGB bytes can still be viewed as a tooltip. Ref T99205 Differential Revision: https://developer.blender.org/D15322
2022-06-20Mask Editor: Add mask blending factor for combined overlaySimon Lenz
This adds a new parameter to the "Combined" overlay mode of the mask editor. The "blending factor" allows users to blend the mask exterior with the original footage to visualise the content of the mask in a more intuitive way. The "Alpha" overlay is unaffected by this change. The existing "Combined" overlay is used like before (covering everything outside the mask in black), but can be blended with the slider in the mask overlay to look at the exterior. This is part of an effort to make mask editing more intuitive & easy to use: https://developer.blender.org/T93097 Differential Revision: https://developer.blender.org/D13284
2022-06-03Merge remote-tracking branch 'origin/blender-v3.2-release'Dalai Felinto
2022-06-03Spreadsheet Editor: Support int 8 attributeDalai Felinto
This was leading to some crashes and warnings such as: "Code marked as unreachable has been executed. Please report this as a bug." Differential Revision: https://developer.blender.org/D15116
2022-06-01Cleanup: use 'e' prefix for enum typesCampbell Barton
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-06Cleanup: spelling in comments, use doxygen commentsCampbell Barton
2022-05-05UI: Add Gizmos toggle to SpaceImageJuanfran Matheu
This patch adds the show_gizmo and show_gizmo_navigate properties to the Image and UV editors. Image Editor: {F13026317} UV Editor: {F13026319} VIDEO: {F13026324} Reviewed By: #user_interface, campbellbarton Differential Revision: https://developer.blender.org/D14755
2022-04-28VSE: Add option to limit timeline view heightRichard Antalik
When height is limited, it is defined by space occupied by strips, but at least channels 1 to 7 will be always visible. This allows it to easily overview timeline content by zooming out to maximum extent in Y axis and panning in X axis. More channels can be "created" on demand by moving strip to higher channel. When strip is removed and highest channel becomes empty, view will stay as is until it is moved down. Then new highest point is remembered and it is not possible to pan upwards until strip is moved to higher channel. Limiting takes into account height of scrubbing and markers area as well as scrollers. This means that when zoomed out to maximum extent, no strips are obstructed by fixed UI element. Fixes T57976 Reviewed By: Severin Differential Revision: https://developer.blender.org/D14263
2022-04-21Geometry Nodes: better support for byte color attributesJacques Lucke
Since {rBeae36be372a6b16ee3e76eff0485a47da4f3c230} the distinction between float and byte colors is more explicit in the ui. So far, geometry nodes couldn't really deal with byte colors in general. This patch fixes that. There is still only one color socket, which contains float colors. Conversion to and from byte colors is done when read from or writing to attributes. * Support writing to byte color attributes in Store Named Attribute node. * Support converting to/from byte color in attribute conversion operator. * Support propagating byte color attributes. * Add all the implicit conversions from byte colors to the other types. * Display byte colors as integers in spreadsheet. Differential Revision: https://developer.blender.org/D14705
2022-04-19Cleanup: Use correct capitalization of "F-Curve"Aaron Carlisle
2022-04-14Geometry Nodes: show used named attributes in nodesJacques Lucke
This adds a new node editor overlay that helps users to see where named attributes are used. This is important, because named attributes can have name collisions between independent node groups which can lead to hard to find issues. Differential Revision: https://developer.blender.org/D14618
2022-04-12Cleanup: use _NUM suffix for space/region type rangesCampbell Barton
- Replace SPACE_TYPE_LAST with SPACE_TYPE_NUM (adding 1). - Rename RGN_TYPE_LEN to RGN_TYPE_NUM This makes it possible to tag space-type/region-type combinations with `bool tag[SPACE_TYPE_NUM][RGN_TYPE_NUM]` which reads more clearly than `bool tag[SPACE_TYPE_LAST + 1][RGN_TYPE_LEN]`.
2022-04-09UDIM: Move UDIM grid controls to the Overlay panelJesse Yurkovich
This change moves the grid panel UI from the View tab up into the Overlay panel. Reasons to move to the Overlay panel include: - Consistency with the grid options in the 3D viewport - The grid has been drawn as an Overlay for quite some time already Additional changes that now make sense to have: - The grid responds to the main Overlay show/hide toggle - Adds a toggle to show/hide the grid which is consistent with overlays in general As before, these grid controls are only available for active UV edit sessions. Differential Revision: https://developer.blender.org/D11862
2022-04-04VSE: Add channel headersRichard Antalik
This patch adds channel region to VSE timeline area for drawing channel headers. It is synchronizedwith timeline region. 3 basic features are implemented - channel visibility, locking and name. Channel data is stored in `SeqTimelineChannel` which can be top-level owned by `Editing`, or it is owned by meta strip to support nesting. Strip properties are completely independent and channel properties are applied on top of particular strip property, thus overriding it. Implementation is separate from channel regions in other editors. This is mainly because style and topology is quite different in VSE. But also code seems to be much more readable this way. Currently channels use functions similar to VSE timeline to draw background to provide illusion of transparency, but only for background and sfra/efra regions. Great portion of this patch is change from using strip visibility and lock status to include channel state - this is facilitated by functions `SEQ_transform_is_locked` and `SEQ_render_is_muted` Originally this included changes in D14263, but patch was split for easier review. Reviewed By: fsiddi, Severin Differential Revision: https://developer.blender.org/D13836
2022-04-04Cleanup: spelling in commentsCampbell Barton
2022-03-31Outliner: New "Hierarchies" view mode for Library OverridesJulian Eisel
Adds a dropdown for the Library Overrides display mode that lets users choose between a "Properties" and a "Hierachies" view mode. The former is what was previously there (a mode that displays all overridden properties with buttons to edit the values), the latter is new. It displays the hierarchical relationships between library overridden data-blocks. E.g. to override the mesh of an object inside a linked collection, the entire collection > object > mesh hierarchy needs to be overridden (whereby the former two will be automatically overridden using system overrides). The Hierarchies mode will also show the override hierarchies of data-blocks that were linked and are overridden in the source file. This information is useful to have, especially for debugging scenes. Part of T95802. Differential Revision: https://developer.blender.org/D14440 Reviewed by: Bastien Montagne
2022-03-26Cleanup: move eFileSel_Action from DNA to WM_api.hCampbell Barton
This isn't stored in blend files so it can be moved out of DNA. Also use an enum for `WM_FILESEL_*` members.
2022-03-25Cleanup: use count or num instead of nbrCampbell Barton
Follow conventions from T85728.
2022-03-24Outliner: Remove list of library overrides from general display modesJulian Eisel
There is a dedicated Library Override display mode now, and showing these elsewhere just adds noise and makes the code problematic to maintain (since the same element hierarchy will be used in two entirely different contexts). The corresponding filter settings are removed too. Part of T95802. Reviewed by: Bastien Montagne Differential Revision: https://developer.blender.org/D14411
2022-03-17Cleanup: spelling in commentsCampbell Barton
Use <pre>..</pre> for pseudo-code.
2022-03-04Cleanup: spelling in comments, function nameCampbell Barton
2022-02-16UV: move sticky selection from image space into tool settingsCampbell Barton
Having this setting stored in the image space caused low level selection logic to have to pass around the image space (which could be NULL in some cases). Use the tool-settings instead since there doesn't seem to be much/any advantage in having this setting per-space.
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
2022-01-24Cleanup: clang-formatCampbell Barton
2022-01-20Cleanup: Move node editor files to proper namespaceHans Goudey
This commit moves code in all node editor files to the `blender::ed::space_node` namespace, except for C API functions defined in `ED_node.h`, which can only be moved once all areas calling them are moved to C++. The change is fairly straightforward, I just moved a couple of "ED_" code blocks around to make the namespace more contiguous, and there's the method for adding a pointer to a struct in a C++ namespace in DNA. Differential Revision: https://developer.blender.org/D13871
2022-01-13Outliner: Compile all Outliner files in C++Julian Eisel
We want to refactor quite some of the Outliner code using C++, this is a logical step to help the transition to a new architecture. Includes plenty of fixes to make this compile without warnings, trying not to change logic. The usual stuff (casts from `void *`, designated initializers, compound literals, etc.).
2022-01-06Cleanup: spelling in commentsCampbell Barton
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-20Docs: use doxygen formatting for DNACampbell Barton
Differentiate doc-strings from title/section text. Also use explicit doxygen references to struct members so it's not ambiguous which member is being referenced. Note that these changes aren't complete (some files weren't touched).
2021-12-15Refactor: Simplify spreadsheet handling of cell valuesHans Goudey
Previously we used a `CellValue` class to hold the data for a cell, and called a function to fill it whenever necessary. This is an unnecessary complication when we have virtual generic arrays and most data is already easily accessible that way anyway. This patch removes `CellValue` and uses `fn::GVArray` to provide access to data instead. In the future, if rows have different types within a single column, we can use a `GVArray` of `blender::Any` to interface with the drawing. Along with that, the use of virtual arrays made it easy to do a few other cleanups: - Use selection domain interpolations from rB5841f8656d95 for the mesh selection filter. - Change the row filter to only calculate for necessary indices. Differential Revision: https://developer.blender.org/D13478
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-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-11-23Geometry Nodes: Node execution time overlayErik
Adds a new overlay called "Timings" to the Geometry Node editor. This shows the node execution time in milliseconds above the node. For group nodes and frames, the total time for all nodes inside (recursively) is shown. Group output node shows the node tree total. The code is prepared for easily adding new rows of information to the box above the node in the future. Differential Revision: https://developer.blender.org/D13256
2021-11-16File Browser: Improve usage of threads in the creation of thumbnailsGermano Cavalcante
Due to asynchronous process, the preview for a given image may be generated several times. This regenerates many thumbs unnecessarily. The solution is to add the `FILE_ENTRY_PREVIEW_LOADING` flag for file entries that are still in the thread queue. So this flag is checked not to redraw the thumb when it is still being created on a different thread. Differential Revision: https://developer.blender.org/D11150