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-10-27Cleanup: clang-format, clang-tidy, spellingCampbell Barton
2021-10-27Nodes: Cleanup code for header underline alphaPablo Vazquez
Use `UI_GetThemeColorBlend4f` instead of manually setting alpha opaque.
2021-10-27Nodes: Cleanup setting node header alphaPablo Vazquez
Always draw header opaque, set transparency only once after getting the color. Helps to unify the color and alpha values.
2021-10-27Asset Browser: Reduce paddings & margins between previewsJulian Eisel
The paddings and margins were more than needed, this reduces them a bit. That way space is used more efficiently, the small differences add up so that more items fit into a row. The File Browser should not be affected. Before/after comparisons: {F11529986} {F11529988} {F11529987} {F11529989}
2021-10-27Knife: Preserve right click cancel functionalityCian Jinks
Currently, the knife does not use right click cancel. It causes users to accidentally delete entire cuts easily. This patch allows right click cancel when no cuts have been made. This makes it consistent with other tools when switching between them. More info: https://devtalk.blender.org/t/gsoc-2021-knife-tool-improvements-feedback/19047/175?u=hobbesos
2021-10-27Revert "Revert "Eevee: support accessing custom mesh attributes""Germano Cavalcante
This reverts commit e7fedf6dba5fe2ec39260943361915a6b2b8270a. And also fix a compilation issue on windows. Differential Revision: https://developer.blender.org/D12969
2021-10-26Cleanup: Confusion with knife xray functionalityCian Jinks
2021-10-26Revert "Eevee: support accessing custom mesh attributes"Ray Molenkamp
This reverts commit 03013d19d16704672f9db93bc62547651b6a5cb8. This commit broke the windows build pretty badly and I don't feel confident landing the fix for this without review. Will post a possible fix in D12969 and we'll take it from there.
2021-10-26Geometry Nodes: Get and set nodes for ID attributeHans Goudey
These nodes allow accessing and changing the stable/random ID used for motion blur with instances and stable randomness. Since rB40c3b8836b7a, the stable ID is a built-in attribute, so to be consistent and allow changing it in the node tree like other built-in attributes, it has get and set nodes.
2021-10-26Fix: Knife unused function warningCian Jinks
2021-10-26Fix: Knife measurements broken when a cut point is in spaceCian Jinks
Knife angle measurements were mis-aligned if a cut point was in space. Specifically, the arc drawing would not match with the cut line. Fixed by removing a correction for kcd->prev.cage. This correction was originally added for panning with measurements to work. In hindsight it is not needed and only introduces issues like this.
2021-10-26Asset Browser: Improve hint for asset library that isn't foundJulian Eisel
We already show a message when showing an asset library whose path can't be found on disk. The red text was making it look like some fatal error happened. And the message could be a bit more useful generally. So this removes the red color of the text, (arguably) improves the text and adds a button as shortcut to open the Preferences with the asset library settings. Differential Revision: https://developer.blender.org/D12894
2021-10-26UI: Rename operator to open Preferences windowJulian Eisel
Renames the operator from "Show Preferences" to "Open Preferences...". "Open" is more clear than "Show" (since they could be shown in-place). "..." is usually used in Blender to indicate that a new Window or popup will be opened. Note that vanilla Blender doesn't actually show this name anywhere, so this change shouldn't be visible. That may change, see D12894.
2021-10-26Fix: Build issue on windowsRay Molenkamp
Empty initializer is not appreciated by MSVC.
2021-10-26Assets: Rename "Default" asset library to "User Library"Julian Eisel
Feedback was that "Default" is a bit of a weird name, so switching it to "User Library". Added versioning code which won't be entirely bullet proof (e.g. will also rename libraries named "Default" by the user), but it doesn't have to be. Addresses T90298.
2021-10-26Fix T92508: cache invalidation bug in Set Position nodeJacques Lucke
The call to `attribute_try_get_for_output` does some cache invalidation internally. Under some circumstances the call to `position_evaluator.evaluate()` recomputed the caches (e.g. when the Normal node was used, the evaluated handle positions cache on curves were updated). After the positions have been updated in the Set Position node, the cache was not invalidated again., leading to incorrect rendering. The proper solution will be to do the cache invalidation in `OutputAttribute.save()` again. That is a bit more involved though. For now just reorder the code a bit to do the cache invalidation after the field has been computed. There is a follow up task: T92509.
2021-10-26Cleanup: Restore alphabetical orderHans Goudey
2021-10-26Assets: Disable snap-dragging for linking object assetsJulian Eisel
The location of a linked object isn't editable, or at least it will be reset when reloading the file. So the drag & drop shouldn't even pretend like this would work, so disable the snapping of the object and the bounding-box to show the snapped object location while dragging.
2021-10-26Fix linked objects not appearing after dragging in from Asset BrowserJulian Eisel
When the Asset Browser import type was set to "Link", after dragging in an object asset the object wouldn't actually appear in the viewport. Do the same depsgraph tagging (and TODO comment) as the `OBJECT_OT_add_named` operator, which does similar things.
2021-10-26Fix objects not appearing in Outliner after dragging in from Asset BrowserJulian Eisel
When dragging in an object from an external asset library from the Asset Browser, the Outliner wouldn't update.
2021-10-26Node Editor: Style update to nodesPablo Vazquez
This patch changes how nodes look visually, in an attempt to fix a number of issues: * The header background is currently drawn using a theme color fully opaque, this limits the colors we can use because the node name/label is drawn on top. * Hard-coded transparency makes nodes hard to read. The node backdrop already has alpha so if the user wants it they can set it. This patch uses alpha from the theme. * Better muted status indicator, instead of simply making everything transparent and the wires inside red, draw a red outline around the node, darken the header and backdrop. * On muted nodes, display wires behind the backdrop to not interfere with text/widgets inside the node. Nodes: * Darken header to improve readability of node label. * Draw a line under the header * Thicker outline. * Do not hard-code transparency on nodes, use the theme's node backdrop alpha component. * Use angle icon instead of triangle (to be consistent with the [[ https://developer.blender.org/D12814 | changes ]] to panels) Style adjustment to sockets drawing: * Do not hard-code the socket outline color to black, use `TH_WIRE` instead * Do not use `TH_TEXT_HI` for selected sockets, use `TH_ACTIVE` (active node outline) * Do not draw sockets background transparent on muted nodes. * Thicker outline to help contrast and readability {F11496707, size=full} Reviewed By: #user_interface, HooglyBoogly Differential Revision: https://developer.blender.org/D12884
2021-10-26Fix: Show node editor dot grid when there is no node treeHans Goudey
2021-10-26Geometry Nodes: geometry component type warning systemJacques Lucke
Previously, every node had to create warnings for unsupported input geometry manually. Now this is automated. Nodes just have to specify the geometry types they support in the node declaration. Differential Revision: https://developer.blender.org/D12899
2021-10-26Fix: Inverted normal for one curve to mesh capHans Goudey
2021-10-26Geometry Nodes: Only create instance IDs when they existHans Goudey
Instance IDs serve no purpose for rendering when they aren't stable from one frame to the next, and if the index is used in the end anyway, there is no point in storing a vector of IDs and copying it around. This commit exposes the `id` attribute on the instances component, makes it optional-- only generated by default with the distribute points on faces node. Since the string to curves node only added the index as each instance's ID, I removed it. This means that it would be necessary to add the ID data manually if the initial index actually helps (when deleting only certain characters, for example). Differential Revision: https://developer.blender.org/D12980
2021-10-26Geometry Nodes: Support instances in the remove attribute nodeHans Goudey
This node is still hidden, but allowing removing the `id` attribute is useful for testing, and possibly optimization in the future.
2021-10-26Assets: Enable object asset support by defaultJulian Eisel
The two blocking issues for object assets are addressed, see T92111 and T90198. So now, objects can be marked as assets and be used in the Asset Browser.
2021-10-26Don't deselect assets in `ED_fileselect_activate_by_id`Sybren A. Stüvel
`ED_fileselect_activate_by_id()` activates an asset (i.e. marks it as the active asset in the asset browser). To avoid an "active but not selected" state, it also selects it. Before this commit, the function would also deselect all other assets, but that's considered doing too much. If deselection is required, the `ED_fileselect_deselect_all()` function can be called. Manifest Task: T92152
2021-10-26Drop object assets and associated objects at the cursor locationCampbell Barton
When dropping asset objects, place them under the mouse-cursor along with any other objects they link in. Ref D12935 Reviewed By: Severin
2021-10-26Asset Browser: Show disabled-hint when dragging external assets over catalogJulian Eisel
There's now a message displayed in red next to the cursor explaining that only assets from the current file can be moved between catalogs. The previous commit prepared this.
2021-10-26UI: Support disabled-hint for dropping in the tree-view APIJulian Eisel
A tree-view item's drop controller can now return a message for the user explaining why dropping isn't possible with the dropped data. This is then displayed in red text next to the cursor. This isn't actually used yet, the follow up commit will do that.
2021-10-26Assets: allow Mark/Clear Asset operators from 3D ViewportSybren A. Stüvel
Make it possible to run `ASSET_OT_mark` and `ASSET_OT_clear` operators from the 3D Viewport. There is no menu entry, just compatibility with pressing F3 and executing the operators from the operator search.
2021-10-26Cleanup: 3D View context, early returns for clearer flowSybren A. Stüvel
Refactor `view3d_context()` to use early `return`s instead of a bundle of `if`/`else if`/`else`, some of which had `return`s and some not. No functional changes.
2021-10-26Cleanup: 3D View context, use enum valuesSybren A. Stüvel
Use explicit enum values instead of returning 0/1 from `view3d_context()`. No functional changes.
2021-10-263D View context: return "ok" when fetching view3d context dirSybren A. Stüvel
`view3d_context()` would return `-1` ("found but not available") when fetching the context dir. This is incorrect; it should return 1 ("ok"). This is a semantic change in preparation of further cleanup of the code.
2021-10-26Eevee: support accessing custom mesh attributesKévin Dietrich
This adds generic attribute rendering support for meshes for Eevee and Workbench. Each attribute is stored inside of the `MeshBufferList` as a separate VBO, with a maximum of `GPU_MAX_ATTR` VBOs for consistency with the GPU shader compilation code. Since `DRW_MeshCDMask` is not general enough, attribute requests are stored in new `DRW_AttributeRequest` structures inside of a convenient `DRW_MeshAttributes` structure. The latter is used in a similar manner as `DRW_MeshCDMask`, with the `MeshBatchCache` keeping track of needed, used, and used-over-time attributes. Again, `GPU_MAX_ATTR` is used in `DRW_MeshAttributes` to prevent too many attributes being used. To ensure thread-safety when updating the used attributes list, a mutex is added to the Mesh runtime. This mutex will also be used in the future for other things when other part of the rendre pre-processing are multi-threaded. `GPU_BATCH_VBO_MAX_LEN` was increased to 16 in order to accommodate for this design. Since `CD_PROP_COLOR` are a valid attribute type, sculpt vertex colors are now handled using this system to avoid to complicate things. In the future regular vertex colors will also use this. From this change, bit operations for DRW_MeshCDMask are now using uint32_t (to match the representation now used by the compiler). Due to the difference in behavior for implicit type conversion for scalar types between OpenGL and what users expect (a scalar `s` is converted to `vec4(s, 0, 0, 1)` by OpenGL, vs. `vec4(s, s, s, 1)` in Blender's various node graphs) , all scalar types are using a float3 internally for now, which increases memory usage. This will be resolved during or after the EEVEE rewrite as properly handling this involves much deeper changes. Ref T85075 Reviewed By: fclem Maniphest Tasks: T85075 Differential Revision: https://developer.blender.org/D12969
2021-10-26Geometry Nodes: Handle multiple grids in the volume to mesh nodeHans Goudey
In future use cases, a volume can contain many grids that represent the density information. In this case, it's better if the volume to mesh node creates a mesh based on all of the grids in the volume. This is also a benefit to share-ability, since one doesn't have to specify the grid name in the node. Instead, in the future we can have a way to split particular grids into separate volumes, if only one grid should be considered. The code changes are relatively simple: - Move the old volume to mesh node to the legacy folder. - Run the volume to mesh node on all instance geometry, like elsewhere. - Make the blenkernel's volume to mesh API a bit more specific. Differential Revision: https://developer.blender.org/D12997
2021-10-26UI: Let object drop operator display hint why it's disabledJulian Eisel
When dragging an object in non-object mode into a 3D View, there will now be red text explaining that this is only possible in object mode. The previous commit enabled this.
2021-10-26UI: Improved feedback when dropping is not possible on drag 'n dropJulian Eisel
* Allow operators to show a "disabled hint" in red text explaining why dropping at the current location and in current context doesn't work. Should greatly help users to understand what's the problem. * Show a "stop" cursor when dropping isn't possible, like it's common on OSes. Differential Revision: https://developer.blender.org/D10358
2021-10-26LineArt: Trimming edges right at the image borderYimingWu
This option allows the edge to end right at the border instead of extending beyond. Useful when having multiple camera setup where you want the border to be clean. Also moved overscan option down inside "Composition" sub panel so it makes more sense. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12126
2021-10-26UI: Improve node editor breadcrumbs displayHans Goudey
This patch upgrades node editor breadcrumbs to have slightly more visual weight, to including the base path of object/modifier/world, etc, have more visually pleasing spacing, and contain icons. In the code, a generic "context path" is added to interface code. The idea is that this could be used to draw other breadcrumbs in areas like the property editor or the spreadsheet, and features could be added to all of those areas at the same time. Ideally we would be able to control the color of the breadcrumbs with a specific theme color, but since they are drawn with the regular layout system, that is not easily possible. Thanks to @fabian_schempp for the original patch. Differential Revision: https://developer.blender.org/D10413
2021-10-26Fix: Assert on startup from incorrect float property minHans Goudey
2021-10-26Fix T92505: previewing specific node outputs did not work anymoreJacques Lucke
This was missing from my refactor in rB5bfe09df2244cb9de0b6554a378eecef77b1e75d.
2021-10-26LineArt: Custom CameraYimingWu
Allows line art camera to be different from scene active camera, useful when baking multiple shots in different angle as well as for motion graphics effect. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12047
2021-10-26LineArt: Fix prop range for stroke_depth_offset.YimingWu
2021-10-26LineArt: Stroke offset towards camera.YimingWu
Allows the user to turn off in_front option for grease pencil object and offset strokes towards camera to allow depth interaction of the rest of the scene. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12046
2021-10-26Geometry Nodes: Add Brick Texture nodeCharlie Jolly
Port brick shader node to GN Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12783
2021-10-26Cleanup: clang-formatBrecht Van Lommel
2021-10-26Nodes: support transparency for link highlight colorDorian
Node links that are connected to selected nodes are highlighted using the Wire Select theme color. Now it is possible to change the transparency of this color to allow the actual link color to be visible through the highlight (or to turn of the highlight entirely). Differential Revision: https://developer.blender.org/D12973
2021-10-26Cleanup: silence address sanitizer warning about NULL + 0Brecht Van Lommel