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
2020-12-16Assets: Add operator & button to regenerate the automatic previewJulian Eisel
This makes it possible to trigger a refresh of the data-block preview, available next to the preview in the Asset Browser sidebar. The previews get easily outdated and automatically refreshing it all the time is not an option because it would be a consistently running, quite expensive process. So a button to cause a refresh should be reasonable. This button can also be used to switch back from a custom preview to a generated one. Although that may not be clear, and we should probably think of a way to explain that better. Addresses T82719.
2020-12-16Asset Browser UI: Changes to the sidebar layoutJulian Eisel
The current layout wasn't great at all, and it was planned to polish this. This does a first round of improvements, some more tweaking may follow. * Place name button at the top, with no panel and no leading label. * Add "Preview" panel, people may not want to see the preview all the time, it's already visible in the file list. * Move button to browse for a custom preview to the right of the preview, as icon-only. We have a similar layout in other places (UI-lists, matcaps). * Don't make the details panel a sub-panel. Looked weird because the parent doesn't have a header. * Add info icon to "No asset selected", looks a bit friendlier. * Minor cleanups in the UI script. Based on designs and feedback by William Reynish.
2020-12-16Assets UI: Tweak position of the "Add Asset Library" icon-button in PreferencesJulian Eisel
It's weird to have a button that adds a new item at the bottom be placed at the top. So rather move it below the list of custom asset library paths.
2020-12-16Asset Browser: Allow renaming asset data-blocks from the sidebar directlyJulian Eisel
This is something we wanted to support doing. It's confusing if users see the name but it's always grayed out. So be convenient and avoid the confusion.
2020-12-16Cleanup: Rename Asset Browser context member from "active_id" to "id"Julian Eisel
This is the same name we use elsewhere for the focused/active ID context member, so this should follow it.
2020-12-16Steam Release: Script creation of Steam build filesNathan Letwory
Script tool for automation of Steam build files for tasks like {T77348} This script automates creation of the Steam files: download of the archives, extraction of the archives, preparation of the build scripts (VDF files), actual building of the Steam game files. Requirements ============ * MacOS machine - Tested on Catalina 10.15.6. Extracting contents from the DMG archive did not work Windows nor on Linux using 7-zip. All DMG archives tested failed to be extracted. As such only MacOS is known to work. * Steam SDK downloaded from SteamWorks - The `steamcmd` is used to generate the Steam game files. The path to the `steamcmd` is what is actually needed. * SteamWorks credentials - Needed to log in using `steamcmd`. * Login to SteamWorks with the `steamcmd` from the command-line at least once - Needded to ensure the user is properly logged in. On a new machine the user will have to go through two-factor authentication. * App ID and Depot IDs - Needed to create the VDF files. * Python 3.x - 3.7 was tested. * Base URL - for downloading the archives. Reviewed By: Jeroen Bakker Differential Revision: https://developer.blender.org/D8429
2020-12-16Revert "Steam Release: Script creation of Steam build files"Jeroen Bakker
This reverts commit 1a375d6eceed4c17f92fd90699645856e0951530.
2020-12-16Steam Release: Script creation of Steam build filesNathan Letwory
Script tool for automation of Steam build files for tasks like {T77348} For in-depth information see the README. Related Wiki page: https://wiki.blender.org/wiki/Process/Release_On_Steam Reviewed By: jbakker Maniphest Tasks: T77348 Differential Revision: https://developer.blender.org/D8429
2020-12-16BLI: constexpr Span, IndexRange, StringRef(Null/Base)Ankit Meel
Motivated by `std::string_view` being usable in const (compile-time) context. One functional change was needed for StringRef: `std::char_traits<char>::length(str)` instead of `strlen`. Reviewed By: JacquesLucke, LazyDodo Differential Revision: https://developer.blender.org/D9788
2020-12-16Cleanup: pep8Campbell Barton
2020-12-16UI: include the category for add-ons searchVincent Blankfield
This lead to some confusion, see T83747. Now the category is included in the search when the category is "All". Ref D9848
2020-12-16Cleanup: sort struct blocksCampbell Barton
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-12-16Cleanup: clang-formatCampbell Barton
2020-12-16Cleanup: use static declarationsCampbell Barton
2020-12-16Fix warnings introduced in previous commitRichard Antalik
2020-12-16VSE: Add Overlay popover panelsPeter Fog
Add panels with overlay settings for strips and preview and overlay enable/disable button. Entries from the View menus moved to the overlay panels, which will simplify cluttered View menus. Additional options have been added: - Strip Name - Strip Source(ex. path) - Strip Duration So users can now select what info they need to see on the strips. When No text is displayed, waveforms are drawn in full height. Reviewed By: ISS, HooglyBoogly, pablovazquez Differential Revision: https://developer.blender.org/D9751
2020-12-16VSE: Reorder Tools in Sequencer/PreviewPeter Fog
When in Sequencer/Preview mode, the Sampler was on top, which normally is the place of Select, and Annotation seems to be after Sampler in the bottom in the various editors. Reviewed By: ISS Differential Revision: https://developer.blender.org/D9821
2020-12-16VSE: Paste strips after playhead by defaultPeter Fog
Paste copied strips after playhead, because this is more intuitive. Previous functionality is still available by enabling "Keep Offset" property, or under shortcut Ctrl+Shift+V. Reviewed By: ISS Differential Revision: https://developer.blender.org/D9734
2020-12-16GPencil: Improve interpolation of strokes with unequal lengthsFalk David
Use the BKE_gpencil_stroke_uniform_subdivide function to subdivide strokes before interpolation. When the target/source stroke is smaller than the other stroke, it is subdivided until the lengths match. This improves the overall quality of the interpolation of different sized strokes. Before/After video: {F9511779} Reviewed By: #grease_pencil, antoniov, pepeland, mendio Differential Revision: https://developer.blender.org/D9839
2020-12-16GPencil Array - Add option for uniform random scalingCody Winchester
This patch adds the option to make the random scaling from the grease pencil array modifier uniform. The current settings allow a separate value for each of the 3 scaling axis. The modifier also creates different seed values for each axis so there is no way to keep the random scaling uniform. This patch creates 1 random seed value and applies it to each of the scaling axis. Here is a demonstration of the previous behavior and the new optional behavior. {F9485973} {F9485981} {F9485798} Reviewed By: #grease_pencil, antoniov, pepeland Differential Revision: https://developer.blender.org/D9764
2020-12-15VSE: Move remove gaps operator logic to module codeRichard Antalik
Logic was broken into finding gaps and ofsetting strips. Functions were modified so they work on explicitly defined seqbase, so they can be used as python API functions. Functional changes: - Improve performance by calculating gap length and offseting strips at once. Previously strips were offset by one frame. - Calculate gap from start frame. Previously gap was considered only inbetween strips. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9730
2020-12-15Fix crash selecting custom asset preview from maximized File BrowserJulian Eisel
If Preferences > Interface > Temporary Editors > File Browser is set to "Maximized Area", "Load Custom Preview" in the Asset Browser would crash after selecting the file. 1e799dd26ec1e848 was important to get this issue fixed. This commit just ensures the file-list is recreated correctly after closing the temporary File Browser, so the custom preview operator can execute on valid context.
2020-12-15Fix various issues with temporary, maximized File BrowsersJulian Eisel
If Preferences > Interface > Temporary Editors > File Browser is set to "Maximized Area", opening a File Browser from a File or Asset Browser as regular editor would cause some issues. For example after closing the temporary File Browser, the regular browser would take over the file path and display settings from the temporary one. This is because they used to share the same area data. Some similar issues may have happend with temporary image editors. Now, this commit finally separates the space data of temporary maximized editors from the regular ones. So the editor data is entirely independent now, as it should be.
2020-12-15Sculpt: Fair Face Sets operation for Face Set EditPablo Dobarro
This implements a mesh fairing algorithm and implements the fair operations for Face Set edit. This edit operations create a smooth as possible geometry patch in the area of the selected Face Set. The mesh fairing algorithm is designed by Brett Fedack for the addon "Mesh Fairing": https://github.com/fedackb/mesh-fairing, with some modifications: - The main fairing function in BKE_mesh_fair.h does not triangulate the mesh. For the test I did in sculpt mode results are good enough without triangulating the topology. Depending on the use and the result quality needed for a particular tool, the mesh can be triangulate in the affected area before starting fairing. - Cotangents loop weights are not implemented yet. The idea is to also expose the vertex and loop weights in a different function in case a tool needs to set up custom weights. This algorithm will also be used to solve the limitations of line project and implement the Lasso Project and Polyline Project tools. It can also be used in tools in other areas of Blender, like Edit Mode or future retopology tools. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9603
2020-12-15Fix T83504: Cancel trim operators when there is no geometryPablo Dobarro
The boolean solver crashes when there is no geometry in the mesh. Also, using the trimming tools without a valid intersection in the PBVH will make the orientation and position functionality of the trimming shape not work, so this is the safer solution. Reviewed By: mont29 Maniphest Tasks: T83504 Differential Revision: https://developer.blender.org/D9777
2020-12-15Fix T83201: Cloth brush performance regressionPablo Dobarro
The if statement of the dynamic area mode branch should be an else if. When using local mode, this was running both the local and global code. I moved this code to sculpt_cloth and refactored it to use a switch case to prevent this from happening again. Reviewed By: mont29 Maniphest Tasks: T83201 Differential Revision: https://developer.blender.org/D9762
2020-12-15Blenloader: Add utility function to write double arrayHans Goudey
It makes sense to support writing double arrays just like floats. This is just split from a patch (D9697) to slim it down some.
2020-12-15Cleanup: Use nullptr instead of NULL in C++ codeHans Goudey
2020-12-15Cleanup: Clang tidy else after returnHans Goudey
2020-12-15Fix Adjust Last Operation popup for operators relying on button contextPhilipp Oeser
This was reported for duplicating particle systems, then using F9 to enable the 'Duplicate Settings' option (see T83317). In this case, the operator gets the particle_system from (buttons) context and if none can get found will duplicate all settings instead. The reason why none gets found here is that buttons_context() doesnt have a valid path when called from F9/SCREEN_OT_redo_last, path is cleared when global undo does a file-read which clears the path (see lib_link_workspace_layout_restore). It can be recomputed though to be valid even from redo_last (at least when in the Properties Editor). This was likely causing other operators (relying on buttons context) from the Properties Editor to fail as well. Fixes T83317 Maniphest Tasks: T83317 Differential Revision: https://developer.blender.org/D9825
2020-12-15Fix crash opening maximized File Browser from Asset BrowserJulian Eisel
If Preferences > Interface > Temporary Editors > File Browser is set to "Maximized Area", opening a File Browser from an Asset Browser would cause the new maximized editor to be an Asset Browser. Exiting it again would crash. This fixes the wrong behavior and the crash. There's still an issue with exiting the editor again, it stays a File Browser then and doesn't go back to being an Asset Browser. That's to be fixed separately.
2020-12-15Fix (studio-reported) broken handling of relative font paths.Bastien Montagne
`blf_dir_search` BLF util would not properly handle relative fonts not found in pre-defined 'system fonts' directoriesi stored in `global_font_dir` global variable. Now it rebases relative paths to current .blend file location as expected. Note: the fact that VSE is setting font ptaths relative by default is probably not actually desired, but this is another issue really. See `BKE_sequencer_text_font_load` code.
2020-12-15Fix redundant declaration warningJulian Eisel
Function was declared twice (caused by merge conflicts) which GCC would rightfully complain about.
2020-12-15Fix crash when deleting/renaming asset library while it's visibleJulian Eisel
Storing the asset library reference by name wasn't a good idea, I thought it would work with a careful fallback, but it's easier to just use the index instead. So change to using indices, make sure fallback methods work reliable and make sure the file list is updated when asset libraries are removed. I added a new notifier type for the latter, I prefer not using file notifiers in asset-library/preferences code. We have more than enough values for notifiers left.
2020-12-15Fix failing assert when generating material previewJulian Eisel
The `!BKE_previewimg_is_finished()` in `icon_preview_startjob_all_sizes()` would fail. Caused by 990bd9acf243ae. We have to be more picky about tagging previews as unfinished after file read. But we also have to consider files stored in old versions and set the unfinished tag as needed.
2020-12-15Fix Asset Browser crash with undo in "Current File" library with sidebarJulian Eisel
When the Asset Browser was showing the "Current File" repository and the sidebar was open, undoing could crash, because the context API returned freed data. Don't let context return anything if a refresh is pending due to data changes like undo/redo.
2020-12-15Assets: Better path for the default asset libraryJulian Eisel
In D9722 we agreed on using `[home-directory]/Documents/Blender/Assets` for the default asset library. I just forgot to do the change before committing. (The default repository is just a named path, it's *not* a default library with bundled assets.)
2020-12-15Fix asset previews not showing in "Current File" repository after readingJulian Eisel
Previews would be flagged as unfinished when reading. Instead clear the flag and always consider them finished upon reading. If we wouldn't do this, the File Browser would keep running the preview updating to wait for the preview to finish. It could be smarter and also check if there's actually a preview job running. Instead, I think it will just display an unfilled buffer for now. Up until today we wouldn't even know if a stored preview is finished or not, so it would always assume they are finished. We do the same now, but have the option to make it smarter.
2020-12-15Asset System: New Asset Browser editorJulian Eisel
This introduces the User Interface part of the Asset Browser, based on the design in T54642. Additions: * New Asset Browser (internally a sub-editor of the File Browser). * Navigation region showing asset categories. * Main region showing the assets of the selected asset library with previews. The assets may be stored over multiple .blends in the directory that's "mounted" as asset library in the Preferences. They will all be shown in this list. * Header with an asset library dropdown, allowing to choose the active asset library to show. Options are the "Current File" as asset library and all custom libraries. * Display popover, filter popover and search box (partially dummies, see T82680). * Sidebar showing the metadata of the currently active file (name, preview, description and tags), which can be edited for assets in the "Current File" asset library. (For others it will reset on reload.) * The sidebar includes a button to load a custom preview image from a file. * Make asset files draggable (with preview image). * If a library with invalid path is selected, a message is drawn in the main region to help the user understand what's wrong. * Operators to add and remove asset tags. Exposed in the sidebar. * "Only Assets" option for Link/Append. * Internal utilities for asset UI scripts. For screenshots or demo videos, please see D9725. Or the 2.92 release notes. Note that there are many things to be tweaked and polished in the Asset Browser UI still. For example, the filter and display popovers are mostly dummies. See T82680. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9725 Reviewed by: Brecht Van Lommel, Hans Goudey
2020-12-15Asset System: Prepare File Browser backend for the Asset BrowserJulian Eisel
The Asset Browser will be a sub-editor of the File Browser. This prepares the File Browser code for that. **File-Lists** * Support loading assets with metadata read from external files into the file-list. * New main based file-list type, for the "Current File" asset library. * Refresh file-list when switching between browse modes or asset libraries. * Support empty file-lists (asset library with no assets). * Store file previews as icons, so scripts can reference them via icon-id. See previous commit. **Space Data** * Introduce "browse mode" to differeniate between file and asset browsing. * Add `FileAssetSelectParams` to `SpaceFile`, with `FileSelectParams` as base. Makes sure data is separated between asset and file browsing when switching between them. The active params can be obtained through `ED_fileselect_get_active_params()`. * `FileAssetSelectParams` stores the currently visible asset library ID. * Introduce file history abstraction so file and asset browsing can keep a separate history (previous and next directories). **General** * Option to only show asset data-blocks while file browsing (not exposed here). * Add "active_file" context member, so scripts can get and display info about the active file. * Add "active_id" context member, so `ED_OT_lib_id_load_custom_preview` can set a custom ID preview. (Only for "Current File" asset library) * Expose some of `FileDirEntry` in RNA as (non-editable). That way scripts can obtain name, preview icon and asset-data. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9724 Reviewed by: Bastien Montagne
2020-12-15Asset System: Support custom asset library paths through PreferencesJulian Eisel
One of the core design aspects of the Asset Browser is that users can "mount" custom asset libraries via the Preferences. Currently an asset library is just a directory with one or more .blend files in it. We could easily support a single .blend file as asset library as well (rather than a directory). It's just disabled currently. Note that in earlier designs, asset libraries were called repositories. Idea is simple: In Preferences > File Paths, you can create custom libraries, by setting a name and selecting a path. The name is ensured to be unique. If the name or path are empty, the Asset Browser will not show it in the list of available asset libraries. The library path is not checked for validity, the Asset Browser will allow selecting invalid libraries, but show a message instead of the file list, to help the user understand what's going on. Of course the actual Asset Browser UI is not part of this commit, it's in one of the following ones. {F9497950} Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9722 Reviewed by: Brecht Van Lommel, Hans Goudey
2020-12-15Asset System: Support dragging assets and appending on dropJulian Eisel
For the Asset Browser, it needs to be possible to drag assets into various editors, which may not come from the current .blend file. In other words, the dragging needs to work with just the asset metadata, without direct access to the data-block itself. Idea is simple: When dragging an asset, store the source file-path and data-block name and when dropping, append the data-block. It uses existing drop operators, but the function to get the dropped data-block is replaced with one that returns the local data-block, or, in case of an external asset, appends the data-block first. The drop operators need to be adjusted to use this new function that respects assets. With this patch it only works for dragging assets into the 3D view. Note that I expect this to be a short-lived change. A refactor like D4071 is needed to make the drag & drop system more future proof for assets and other use cases. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9721 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-15Asset System: Various changes to previews in preparation for Asset BrowserJulian Eisel
* Support defining (not necessarily rendering) icons in threads. Needed so the File Browser can expose file previews with an icon-id to scripts. ** For that, ported `icons.c` to C++, to be able to use scope based mutex locks (cleaner & safer code). Had to do some cleanups and minor refactoring for that. * Added support for ImBuf icons, as a decent way for icons to hold the file preview buffers. * Tag previews as "unfinished" while they render in a thread, for the File Browser to dynamically load previews as they get finished. * Better handle cases where threaded preview generation is requested, but the ID type doesn't support it (fallback to single threaded). This is for general sanity of the code (as in, safety and cleanness) * Enabled asset notifier for custom preview loading operator, was just disabled because `NC_ASSET` wasn't defined in master yet. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9719 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-15Asset System: "Mark Asset" & "Clear Asset" operators and UI integrationJulian Eisel
This makes it possible to turn data-blocks into assets and back into normal data-blocks. A core design decision made for the asset system is that not every data-block should be an asset, because not every data-block is made for reuse. Users have to explicitly mark data-blocks as assets. Exposes "Mark Asset" and "Clear Asset" in Outliner context menus (currently ID Data submenu) and button context menus. We are still not too happy with the names, they may change. This uses the new context members to pass data-blocks to operators, added in af008f553293 and 0c1d4769235c. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9717 Reviewed by: Brecht Van Lommel
2020-12-15Asset System: Data-block asset metadata storage, reading and APIJulian Eisel
Asset metadata is what turns a regular data-block into an asset. It is a small data-structure, but a key part of the technical design of the asset system. The design foresees that asset data-blocks store an `ID.asset_data` pointer of type `AssetMetaData`. This data **must not** have dependencies on other data-blocks or data-block data, it must be an independent unit. That way we can read asset-metadata from .blends without reading anything else from the file. The Asset Browser will use this metadata (together with the data-block name, preview and file path) to represent assets in the file list. Includes: * New `ID.asset_data` for asset metadata. * Asset tags, description and custom properties. * BKE code to manage asset meta-data and asset tags. * Code to read asset data from files, without reading IDs. * RNA for asset metadata (including tags) Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9716 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-15Move Point Cloud object back to Experimental FeaturesDalai Felinto
The geometry-nodes features no longer depend on the point cloud object. Therefore the point cloud object, although important in the future, can be postponed until we have render and edit mode fully working. This reverts commits: * ea74ed5a7a2031b614d401e394f2e0146fc90155. * dc614c68ef2c8ca8b076a000974b5a20a4145a42.
2020-12-15Geometry Nodes: support evaluating mesh object to geometry setJacques Lucke
This implements the design proposed in T83357. The goal is to allow the geometry nodes modifier on mesh objects to output instances and potentially other geometry types. Both problems are tackled by allowing mesh objects to evaluate to a geometry set, instead of just a single mesh id data block. The geometry set can contain a mesh but also other data like instances and a point cloud. I can't say that I'm sure that this commit won't introduce bugs. Mainly the temporary object creation during rendering seems a bit brittle. BUT, we can be reasonably sure that this commit will not introduce regressions (at least not ones, that are hard to fix). This is because the code has been written in a way that minimizes changes for existing functionality. Given that we intend to hide the point cloud object for the next release, we won't even have to worry about temporary object creation for now. An important part of the technical design is to make sure that `ObjectRuntime->data_eval` contains the same data before and after this patch. This helps to make sure, that existing code paths are impacted as little as possible. Instead of fully replacing `data_eval`, there is `geometry_set_eval`, which contains all the geometry components an object evaluated to (including the data referenced by `data_eval`). For now, not much code has to be aware of `geometry_set_eval`. Mainly the depsgraph object iterator and the instances system have to know about it. Reviewers: brecht Differential Revision: https://developer.blender.org/D9851
2020-12-15Fix: upward compatibility of cryptomatte matte id.Jeroen Bakker
The matte_id is stored in a different structure in 2.92. This patch will write the old matte_id field so the files can be opened correctly in older versions.
2020-12-15Fix T83776: Crashes with add-on's icon preview in menusJulian Eisel
Apparently the ID pointer can be NULL, which most code here assumes is not the case. But it's very fragile & finicky, there is one code path were it's allowed to be NULL. Add necessary NULL-checks, an assert as sanity check and a comment to note the possibility of NULL.