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
2021-08-06Cleanup: rename `FileList::asset_library` → `asset_library_ref`Sybren A. Stüvel
In the `FileList` struct, rename the `AssetLibraryReference *asset_library` field to `asset_library_ref` -- it's a description of which asset library is used, and not the asset library itself. This is to make space for a future `AssetLibrary *asset_library` field, which will point to an actual asset library struct/class. No functional changes. Reviewed by: Severin Differential Revision: https://developer.blender.org/D12151
2021-08-05Cleanup: Remove unused members in FileSelectParamsJulian Eisel
2021-07-30Cleanup: Remove unused file description storageJulian Eisel
This isn't used at all in the current File and Asset Browser design.
2021-07-29VSE: Change grid line drawingRichard Antalik
Add overlay option to disable grid drawing. Reuse drawing code from other editors (timeline editor) Add argument `display_minor_lines` to function `UI_view2d_draw_lines_x__discrete_frames_or_seconds` This way minor line drawing can be disabled and so it doesn't cause too much visual noise. Also spacing seems to be too fine, so VSE uses 3x what is defined in preferences. Reviewed By: fsiddi, Severin Differential Revision: https://developer.blender.org/D11790
2021-07-21Assets: Replace duplicated asset library reference type from DNAJulian Eisel
Since recently it's possible to access assets from outside the File/Asset Browser, via the asset view template. So we are slowly moving away from file space specific code to dedicated asset system code. I introduced `AssetLibraryReference` as a duplicate of `FileSelectAssetLibraryUID`, with a plan to delete the latter in a separate cleanup commit. That's exactly what this commit is. This will cause Asset Browsers to open with the default "Current File" Asset Library. We could avoid that, but it's a minor issue really.
2021-07-15Assets: Add an active asset library per workspace, for the UI to useJulian Eisel
This per-workspace active asset library will be used by the asset views later. Note that Asset Browsers have their own active asset library, overriding the one from the workspace. As part of this the `FileSelectAssetLibraryUID` type gets replaced by `AssetLibraryReference` which is on the asset level now, not the File/Asset Browser level. But some more work is needed to complete that, which is better done in a separate commit. This also moves the asset library from/to enum-value logic from RNA to the editor asset level, which will later be used by the asset view.
2021-07-07Assets: Keep assets active after renaming, ensure they are scrolled into viewJulian Eisel
When renaming an ID somewhere in the UI after marking it as asset, it would often get lost in the Asset Browser (scrolled out of view). It would also get deactivated. This patch makes sure that if an asset is active whose ID gets renamed, it is kept active and visible. That is important for a fast, uninterrupted asset creation workflow, where users often rename assets while working in the asset browser. Old code stored the new file-name to identify a file after re-reading the file-list after the rename. For assets that doesn't work because there may be multiple assets with the same name. Here the simple solution of just storing the pointer to the renamed ID is chosen, rather than relying on the file-name in this case. (Should be fine with undo, since the ID * reference is short lived, it's not stored over possible undo steps. If it turns out to have issues, I rather switch to a rename_id_uuid, but keep that separate from the file->uid). Reviewed by: Sybren Stüvel Differential Revision: https://developer.blender.org/D11119
2021-07-05Geometry Nodes: new Viewer nodeJacques Lucke
This adds a viewer node similar to the one in the compositor. The icon in the headers of nodes is removed because it served the same purpose and is not necessary anymore. Node outputs can be connected to the active viewer using ctrl+shift+LMB, just like in the compositor. Right now this collides with the shortcut used in the node wrangler addon, which will be changed separately. As of now, the viewed geometry is only visible in the spreadsheet. Viewport visualization will be added separately. There are a couple of benefits of using a viewer node compared to the old approach with the icon in the node header: * Better support for nodes that have more than one geometry output. * It's more consistent with the compositor. * If attributes become decoupled from geometry in the future, the viewer can have a separate input for the attribute to visualize. * The viewer node could potentially have visualization settings. * Allows to keep "visualization points" around by having multiple viewer nodes. * Less visual clutter in node headers. Differential Revision: https://developer.blender.org/D11470
2021-07-05Cleanup: spelling in commentsCampbell 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-07-02Cleanup: Remove unused/unneeded code from old Asset Engine designJulian Eisel
This code was written for the File Browser together with the Asset Engine design, that is not part of the Asset Browser/System design anymore. Updated comments accordingly. `FileDirEntryRevision` was actually used, but I removed it and moved the used members to the parent `FileDirEntry`, since there is no concept of revisions currently. There should be no functional changes.
2021-07-02File Browser: Refactor file "UUID" code (which wasn't really a "UUID")Julian Eisel
To some degree these are changes in preparation of further Asset Browser related changes, see D11119. But also, the current UUID design was written for the old Asset Engine design, which isn't part of the current Asset Browser/System design anymore. And lastly, "UUID" are a well established standard (https://en.wikipedia.org/wiki/Universally_unique_identifier) which this implementation didn't follow. What we have here is more of an index, or a unique identifier (https://en.wikipedia.org/wiki/Unique_identifier). So this does the following changes: * Renames "UUID" to "UID" * Changes the type of the UID to (a typedef'ed) `uint32_t`, which is more than enough for our current asset system design and simplifies things. * Due to the new type, we can avoid allocations for hash-table storage. * Add/use functions for UID handling Note that I am working on a major rewrite of the file-list code. Meanwhile we want to keep things sensible.
2021-06-28Outliner: View Layers filter for View Layer ModeDalai Felinto
This option allow users to see the view layer in context to the others. It is particularly useful to see which view layers have which collections enabled, and their render settings (holdout, ...). This option is off by default. Differential Revision: https://developer.blender.org/D11708
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Fix T89129: file dialog displays in-progress Safari downloads as a folderLeon Zandman
In-progress Safari download files/packages are now recognized as bundles and therefore not treated as directories. Differential Revision: https://developer.blender.org/D11613
2021-06-19Spreadsheet Editor: Row FiltersHans Goudey
This patch adds support for filtering rows based on rules and values. Filters will work for any attribute data source, they are a property of the spreadsheet rather than of the attribute system. The properties displayed in the row filter can depend on data type of the currently visible column with that name. If the name is no longer visible, the row filter filter is grayed out, but it will remember the value until a column with its name is visible again. Note: The comments in `screen.c` combined with tagging the sidebar for redraw after the main region point to a lack of understanding or technical debt, that is a point to improve in the future. **Future Improvements** * T89272: A search menu for visible columns when adding a new filter. * T89273: Possibly a "Range" operation. Differential Revision: https://developer.blender.org/D10959
2021-06-11Add option to link assets on drag & dropJulian Eisel
Note: Linking in this case as in link vs. append. Easily confused with linking a data-block to multiple usages (e.g. single material used by multiple objects). Adds a drop-down to the Asset Browser header to choose between Link and Append. This is probably gonna be a temporary place, T54642 shows where this could be placed eventually. Linking support is crucial for usage of the asset browser in production environments. It just wasn't enabled yet because a) the asset project currently focuses on single user, not production assets, and b) because there were many unkowns still for the workflow that have big impact on production use as well. With the recently held asset workshop I'm more confident with enabling linking, as design ideas relevant to production use were confirmed. Differential Revision: https://developer.blender.org/D11536 Reviewed by: Bastien Montagne
2021-04-26Merge branch 'blender-v2.93-release'Jacques Lucke
2021-04-26Spreadsheet: combine vector/color spreadsheet columnsJacques Lucke
Differential Revision: https://developer.blender.org/D11056
2021-04-19Cleanup: spellingCampbell Barton
2021-04-15Spreadsheet: breadcrumbs and node pinningJacques Lucke
This introduces a context path to the spreadsheet editor, which contains information about what data is shown in the spreadsheet. The context path (breadcrumbs) can reference a specific node in a node group hierarchy. During object evaluation, the geometry nodes modifier checks what data is currently requested by visible spreadsheets and stores the corresponding geometry sets separately for later access. The context path can be updated by the user explicitely, by clicking on the new icon in the header of nodes. Under some circumstances, the context path is updated automatically based on Blender's context. This patch also consolidates the "Node" and "Final" object evaluation mode to just "Evaluated". Based on the current context path, either the final geometry set of an object will be displayed, or the data at a specific node. The new preview icon in geometry nodes now behaves more like a toggle. It can be clicked again to clear the context path in an open spreadsheet editor. Previously, only an object could be pinned in the spreadsheet editor. Now it is possible to pin the entire context path. That allows two different spreadsheets to display geometry data from two different nodes. The breadcrumbs in the spreadsheet header can be collapsed by clicking on the arrow icons. It's not ideal but works well for now. This might be changed again, if we get a data set region on the left. Differential Revision: https://developer.blender.org/D10931
2021-04-12Spreadsheet: add spreadsheet width unitJacques Lucke
This also fixes the issue that the width of the "Name" column when viewing instances does not resize correctly. Differential Revision: https://developer.blender.org/D10926
2021-04-09Spreadsheet: persistent column storage and data sourceJacques Lucke
A `DataSource` provides columns for the spreadsheet to display. Every column has a SpreadsheetColumnID as identifier. Columns are not generated eagerly anymore, instead the main spreadsheet code can request a column from a data source with an column identifier. The column identifiers can be stored in DNA and allow us to store persistent data per column. On the user level the only thing that changes is that columns are not shown in alphabetical order anymore. Instead, new columns are always added on the left. The behavior can be changed, however I'd prefer not to automate this too much currently. I think we should just add operators to hide/reorder/resize columns soonish. Differential Revision: https://developer.blender.org/D10901
2021-04-08Spreadsheet: support showing data of specific nodeJacques Lucke
Previously, the spreadsheet editor could only show data of the original and of the final evaluated object. Now it is possible to show the data at some intermediate stages too. For that the mode has to be set to "Node" in the spreadsheet editor. Furthermore, the preview of a specific node has to be activated by clicking the new icon in the header of geometry nodes. The exact ui of this feature might be refined in upcoming commits. It is already very useful for debugging node groups in it's current state though. Differential Revision: https://developer.blender.org/D10875
2021-04-08LibOverride: Add a dedicated view in the Outliner.Bastien Montagne
This is a minimal, information-only view currently, listing by default all the override data-blocks, with their user-edited override properties. System-generated overrides (like the overrides of pointers to other override data-blocks) can be shown through a filter option. Finally, potential info or warning messages from (auto-)resync propcess are also shown, as an icon + tooltip next to the affected items. Part of D10855.
2021-04-01Nodes: separate node name and display name in bNodeTreePathJacques Lucke
Previously, `node_name` was rarely actually a name of a node. It is set correctly as node name in `ED_node_tree_push`. However, later on it was overwritten by the name of an id data block in `node_draw_space`. Now, the node_name stays the name of the "parent" node. Whereas display_name is the name that will be displayed in the breadcrumbs. With this change, the `node_name` can be used to reconstruct the actual path from the root node tree to the currently visible tree. Differential Revision: https://developer.blender.org/D10874
2021-03-20VSE: Preview images when moving strip handlesPeter Fog
Add option to override current frame whem transforming strip handles. Option can be found in View menu of VSE preview, or in timeline when using backdrop. Reviewed By: ISS Differential Revision: https://developer.blender.org/D10424
2021-03-16Grease Pencil: Add LineArt modifierYimingWu
This adds the LineArt grease pencil modifier. It takes objects or collections as input and generates various grease pencil lines from these objects with the help of the active scene camera. For example it can generate contour lines, intersection lines and crease lines to name a few. This is really useful as artists can then use 3D meshes to automatically generate grease pencil lines for characters, enviroments or other visualization purposes. These lines can then be baked and edited as regular grease pencil lines. Reviewed By: Sebastian Parborg, Antonio Vazquez, Matias Mendiola Differential Revision: http://developer.blender.org/D8758
2021-03-16VSE: Simplify proxy settingsRichard Antalik
- Remove Full Render size from VSE preview size. Use just 100% instead. - Add Use Proxies checkbox to control whether proxies are used globally - Move preview size to top so it is most prominent - Set default to 100% preview size and use proxies Reviewed By: sergey, fsiddi Differential Revision: https://developer.blender.org/D10362
2021-03-15Spreadsheet: support showing data from original/unevaluated objectJacques Lucke
There are two caveats of the current implementation which still need to be resolved in a separate step: * In theory the data on the original object can be editable in the spreadsheet. * If a complex object is in edit mode, and its original data is displayed, the drawing code can be slow, because the bmesh is converted to a mesh every time. The proper solution is to draw the data from the bmesh directly. This should become easier after an upcoming refactor. Ref T86141. Differential Revision: https://developer.blender.org/D10701
2021-03-15Spreadsheet: add status barJacques Lucke
This implements the status bar as footer region in the spreadsheet editor. It shows the total number of rows and columns as well as how many rows are actually visible (based on the filter). The implementation stores the stats in a runtime struct during drawing and the status bar reads from that struct. Ref T86142. Differential Revision: https://developer.blender.org/D10693
2021-03-12Cleanup: document `FileSelectAssetLibraryUID::type`Sybren A. Stüvel
No functional changes.
2021-03-11Spreadsheet: expore more domains and point cloud dataJacques Lucke
Ref T86135. Differential Revision: https://developer.blender.org/D10681
2021-03-10Spreadsheet: new spreadsheet editorJacques Lucke
This implements the MVP for the new spreadsheet editor (T85879). The functionality is still very limited, but it proved to be useful already. A more complete picture of where we want to go with the new editor can be found in T86279. Supported features: * Show point attributes of evaluated meshes (no original data, no other domains, no other geometry types, yet). Since only meshes are supported right now, the output of the Point Distribute is not shown, because it is a point cloud. * Only show data for selected vertices when the mesh is in edit mode. Different parts of Blender keep track of selection state and original-indices with varying degrees of success. Therefore, when the selected-only filter is used, the result might be a bit confusing when using some modifiers or nodes. This will be improved in the future. * All data is readonly. Since only evaluated data is displayed currently, it has to be readonly. However, this is not an inherent limitation of the spreadsheet editor. In the future editable data will be displayed as well. Some boilerplate code for the new editor has been committed before in rB9cb5f0a2282a7a84f7f8636b43a32bdc04b51cd5. It would be good to let the spreadsheet editor mature for a couple of weeks as part of the geometry nodes project. Then other modules are invited to show their own data in the new editor! Differential Revision: https://developer.blender.org/D10566
2021-03-09Graph Editor: FCurve Show Extrapolation ToggleWayde Moss
Adds toggle to graph editor (View->Show Extrapolation). When disabled, then fcurves only draw over the keyframe range. For baked fcurves and ghost fcurves, the range is all sampled points. It is intended for frequent use so anybody could assign hotkey or add to quick favorites that's why GE-View is the best place for it. Show Extrapolation is the default. Reviewed By: sybren, Stan1, looch Differential Revision: http://developer.blender.org/D10442
2021-03-08Spreadsheet: add boilerplate code for new editor typeJacques Lucke
This adds the initial boilerplate code that is required to introduce the new spreadsheet editor. The editor is still hidden from the ui. It can be made visible by undoing the change in `rna_screen.c`. This patch does not contain any business logic for the spreadsheet editor. Differential Revision: https://developer.blender.org/D10645 Ref T86279.
2021-03-05Asset Browser Space API: add `activate_asset_by_id()` functionSybren A. Stüvel
Add an RNA function `activate_asset_by_id(asset_id: ID, deferred: bool)` to the File Browser space type, which intended to be used to activate an asset's entry as identified by its `ID *`. Calling it changes the active asset, but only if the given ID can actually be found. The activation can be deferred (by passing `deferred=True`) until the next refresh operation has finished. This is necessary when an asset has just been added, as it will be loaded by the filebrowser in a background job. Reviewed By: Severin Differential Revision: https://developer.blender.org/D10549
2021-02-16UI: Clarify descriptions in properties popoverNathan Craddock
Updates the descriptions and labels for outliner sync in the properties editor popover to be more clear. Differential Revision: https://developer.blender.org/D10010
2021-02-13Cleanup: spellingCampbell Barton
2021-01-22Fix Asset Browser showing old name after renaming data-blockJulian Eisel
The "Current File" asset library didn't get refreshed after the data-block name changed. But rather than entirely refreshing the file list, or doing possibly problematic partial refreshes, reference the data-block name directly, so a simple redraw gets the new name displayed. Addresses T83751
2021-01-20Cleanup: Store runtime space node variables in a separate structHans Goudey
This commit moves runtime-only variables from the `SpaceNode` DNA struct to a private struct in `node_intern.h`. Before, it was hard to tell which data needed to be saved in files, this should make it more clear. Node that the `edittree` field is basically a runtime variable, since it's set from the `treepath` list on read, but moving it would require some more invasive changes that I don't think are worth it right now. Also, not all of the moved variables were explicitly cleared on read-- `aspect` is set at the start of a redraw, `cursor` is set in a region callback, and `recalc` was used as an update flag. Differential Revision: https://developer.blender.org/D10141
2020-12-28UI: List library overrides in the OutlinerJulian Eisel
Having a centeral place to find a list of all library overrides should be useful for managing production scenes where library overrides are used a lot. This change adds the individually overridden properties of a data-block under the data-block itself. Just how we show modifiers, constraints or pose channels there. This way we can also expose library override operations/options better in future. There's also a filter option for the library overrides now, so they can be hidden. It is only available in the View Layer display mode though, like the other filter options. One internal change this has to do is adding more informative return values to undo pushes and the library override functions called by it. That way we can send a notifier when library overrides change for the Outliner to know when to rebuild the tree. Differential Revision: https://developer.blender.org/D7631 Reviewed by: Andy Goralczyk, Bastien Montagne, William Reynish
2020-12-22UI: Properties editor popover and outliner syncNathan Craddock
This adds a popover to the properties editor. Currently the only setting is for controlling outliner to properties syncing. Because we cannot define a perfect heuristic to determine when properties editors should change tabs based on outliner icon selection, we need an option to enable or disable this behavior per properties editor. There are 3 options for controlling the syncing. Auto uses the heuristic to only allow tab switching when a properties editor and outliner share a border. On and off enable and disable syncing respectively. Differential Revision: https://developer.blender.org/D9758
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-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-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-08Cleanup: Use enum for file selection type definitionsJulian Eisel
Makes it more clear that these belong together and allows using the enum type rather than just `int`.
2020-12-04Cleanup: Move Outliner runtime hash into internal runtime struct, out of DNAJulian Eisel
This way Outliner internal data stays internal, non-Outliner code will not be able to access and mess with this. Further it allows us to use the real type (rather than `void *`), change the type to a C++ container if needed and slightly reduces the size for every Outliner stored in files. Slightly changed how we set the `SO_TREESTORE_REBUILD` for this, but it should effectively behave the same way as before.
2020-11-20Outliner: Object state filter invert toggleNathan Craddock
This adds an invert toggle for the outliner object state filters. There are some cases where we want a filter for invertable states (Selected, Unselected) and having a single toggle to invert the filter reduces the number of separate filter types needed. This removes the "Hidden" filter which can now be replicated with an inverted "Visible" filter. Differential Revision: https://developer.blender.org/D9598
2020-11-19Build-system: Force C linkage for all DNA type headersJulian Eisel
Some DNA headers already did this, most did not. Even though many of them would be included in C++ files and thus compiled as C++. This would be confusing and developers may think they have to add `extern "C"` too a whole lot of (indirect) includes to be able to use a C header in C++. However, this is a misconception. `extern "C"` does not cause code to be compiled with C rather than C++! It only causes the linker to not use C++ function name mangling. See https://stackoverflow.com/a/1041880. Because extern DNA headers don't have function declarations, using `extern "C"` actually should not have any effect. On the other hand, adding it causes no harm and avoids confusion. So let's just have it consistently in C header files. Differential Revision: https://developer.blender.org/D9578 Reviewed by: Bastien Montagne, Sybren Stüvel