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-17Geometry Nodes: add Attribute Color Ramp nodeJacques Lucke
Differential Revision: https://developer.blender.org/D9861 Ref T82585.
2020-12-16Geometry Nodes: Poisson disk point distribution node/methodDalai Felinto
This patch does two things: * Introduce a Seed to the random distribution method * Bring in a new distribution method for the point scattering node Patch Review: https://developer.blender.org/D9787 Note: This commit doesn't not handle doversion. Which means that users need to manually update their files that were using the Point Distribute node and reconnect inputs to the "Maximum Density" socket. Original patch by Sebastian Parborg, with changes to not rely on the cy libraries and overall cleanup. Patch review by Jacques Lucke, besides help with the new "heap" system that was required for this algorithm. Based on Cem Yuksel. 2015. Sample Elimination for Generating Poisson Disk Sample. Sets. Computer Graphics Forum 34, 2 (May 2015), 25-32 http://www.cemyuksel.com/research/sampleelimination/
2020-12-16Geometry Nodes: rename node to Attribute RandomizeJacques Lucke
Previously, the node was called Random Attribute. For consistency reasons, we move the "Attribute" part of the name to the front.
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-15Cleanup: Reduce variable scopeHans Goudey
2020-12-15Cleanup: Use LISTBASE_FOREACH macro, reduce variable scopeHans Goudey
2020-12-14Cleanup: Fix capitalization in various placesYevgeny Makarov
Approximately 33 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D9796 Reviewed by Julian Eisel
2020-12-11Geometry Nodes: support instancing collectionsJacques Lucke
The Point Instance node can instance entire collections now. Before, only individual collections were supported. Randomly selecting objects from the collection on a per point basis is not support, yet. Last part of D9739. Ref T82372.
2020-12-11Nodes: add Collection socket typeJacques Lucke
The implementation is pretty much the same as for Object sockets. The socket color is the one that is used for collections in the outliner. Part of D9739.
2020-12-11Geometry Nodes: add Attribute Mix nodeJacques Lucke
This node can be used to mix two attributes in various ways. The blend modes are the same as in the MixRGB shader node. Differential Revision: https://developer.blender.org/D9737 Ref T82374.
2020-12-11Cleanup: sort cmake file listsCampbell Barton
2020-12-10Geometry Nodes: Attribute Fill NodeHans Goudey
This commit adds a node that fills every element of an attribute with the same value. Currently it supports float, vector, and color attributes. An immediate use case is for "billboard" scattering. Currently people are using the same input to a Random Attribute node's min and max input to fill every element of a vector with the same value, which is an unintuitive way to accomplish the same thing. Differential Revision: https://developer.blender.org/D9790
2020-12-02UI: Add new node colors for geometry nodesHans Goudey
During the development of the new nodes in the `geometry-nodes` branch the color of the new nodes wasn't considered, so all of the nodes ended up red, the color for "input" nodes. This patch introduces two new colors, one for "Geometry" and one for "Attributes". There are only two attribute nodes currently, but the next sprint will add two more, attribute mix, and sample from texture. The attribute nodes are conceptually different enough from the nodes that modify the geometry that they deserve their own color. Differential Revision: https://developer.blender.org/D9682
2020-12-02Geometry Nodes: unify icons -> use ICON_NODETREE for everythingDalai Felinto
Until there is a icon made specially for this, the nodetree icon is up for grabs. Using it in the nodegroup + modifier + editor helps the users to make a connection on where to edit those modifiers.
2020-12-02Preferences: remove Geometry Nodes from experimentalDalai Felinto
2020-12-02Geometry Nodes: active modifier + geometry nodes editorHans Goudey
This commit adds functions to set and get the object's active modifier, which is stored as a flag in the ModifierData struct, similar to constraints. This will be used to set the context in the node editor. There are no visible changes in this commit. Similar to how the node editor context works for materials, this commit makes the node group displayed in the node editor depend on the active object and its active modifier. To keep the node group from changing, just pin the node group in the header. * Shortcuts performed while there is an active modifier will affect only that modifier (the exception is the A to expand the modifiers). * Clicking anywhere on the empty space in a modifier's panel will make it active. These changes require some refactoring of object modifier code. First is splitting up the modifier property invoke callback, which now needs to be able to get the active modifier separately from the hovered modifier for the different operators. Second is a change to removing modifiers, where there is now a separate function to remove a modifier from an object's list, in order to handle changing the active. Finally, the panel handler needs a small tweak so that this "click in panel" event can be handled afterwards.
2020-12-02Geometry Nodes: initial scattering and geometry nodesJacques Lucke
This is the initial merge from the geometry-nodes branch. Nodes: * Attribute Math * Boolean * Edge Split * Float Compare * Object Info * Point Distribute * Point Instance * Random Attribute * Random Float * Subdivision Surface * Transform * Triangulate It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier. Notes on the Generic attribute access API The API adds an indirection for attribute access. That has the following benefits: * Most code does not have to care about how an attribute is stored internally. This is mainly necessary, because we have to deal with "legacy" attributes such as vertex weights and attributes that are embedded into other structs such as vertex positions. * When reading from an attribute, we generally don't care what domain the attribute is stored on. So we want to abstract away the interpolation that that adapts attributes from one domain to another domain (this is not actually implemented yet). Other possible improvements for later iterations include: * Actually implement interpolation between domains. * Don't use inheritance for the different attribute types. A single class for read access and one for write access might be enough, because we know all the ways in which attributes are stored internally. We don't want more different internal structures in the future. On the contrary, ideally we can consolidate the different storage formats in the future to reduce the need for this indirection. * Remove the need for heap allocations when creating attribute accessors. It includes commits from: * Dalai Felinto * Hans Goudey * Jacques Lucke * Léo Depoix
2020-12-02UI: update node socket colorsPablo Vazquez
Note: This also changes the Shader socket color, to match "Shading" in the Outliner. Theme update for shader nodes will be committed separately. Ref T82689.
2020-12-02Nodes: add geometry socket typeJacques Lucke
We still have to pick a color for this socket. Ref T81848.
2020-11-30Cleanup: Reduce variable scope in node drawing codeHans Goudey
Also use LISTBASE_FOREACH in a few places and generally clean up the code for the two sidebar panels "Sockets" and "Interface".
2020-11-24Fix T80748: Render Emissive Colors in Compositor BackdropJeroen Bakker
This change will use the image engine to draw the backdrop of the compositor. With this patch the alpha blending will be done in Linear Scene Reference space and shows pure emissive colors. See differential for an example image. **Technical changes** As only the backdrop drawing is done using the draw manager there are some technical changes. 1. The overlay buffer is partly drawn outside the draw manager. When drawing the backdrop image the overlay buffer needs to be masked to simulate premultiplied alpha under. 2. The backdrop of the node editor is done in region pixel space. A `DRWView` is constructed with this space. 3. UDIM textures uses world position to generate the UV coordinates. This has been implemented more strict by the `IMAGE_DRAW_FLAG_USE_WORLD_POS`. When the flag isn't used the local coordinates are used to generate the UV coordinates what is image space. 4. The draw manager now checks the actual `eSpaceType` of the space data to use different code paths. In the future the movie clip editor will be added. NOTE: The preview images in nodes are drawn in display space and cannot show pure emissive colors. As preview images are used on more locations it is best to fix this in a separate patch. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D9451
2020-11-20Cleanup: Use LISTBASE_FOREACH macroHans Goudey
2020-11-19Fix lost node links when linked node group datablock is temporarily missingBrecht Van Lommel
Don't refresh the list of sockets, so that when the .blend file is restored the links remain valid. Also display such nodes in red to indicate an error, same as when the node type info is missing.
2020-11-19Cleanup: Grammar: "Allow to" vs gerundHans Goudey
In cases where "Allow" is followed by an infinitive, a noun needs to directly follow it. But it makes more sense to follow it with a gerund instead.
2020-11-13Cleanup: Make panel type flag names more clearHans Goudey
The overlap with the `Panel` flags that start with "PNL" was quite confusing because wasn't clear which enum a flag was from. The new names are a bit longer, but the clarity is worth it.
2020-11-06Cleanup: Render Module: move header files to main directoryAaron Carlisle
Move headers files from `render/extern/` to `render/` Part of T73586
2020-11-06Cleanup: use doxy sections for node_group.cCampbell Barton
2020-11-06Cleanup: use STR_ELEM macroCampbell Barton
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-03Materials: add custom object properties as uniform attributes.Alexander Gavrilov
This patch allows the user to type a property name into the Attribute node, which will then output the value of the property for each individual object, allowing to e.g. customize shaders by object without duplicating the shader. In order to make supporting this easier for Eevee, it is necessary to explicitly choose whether the attribute is varying or uniform via a dropdown option of the Attribute node. The dropdown also allows choosing whether instancing should be taken into account. The Cycles design treats all attributes as one common namespace, so the Blender interface converts the enum to a name prefix that can't be entered using keyboard. In Eevee, the attributes are provided to the shader via a UBO indexed with resource_id, similar to the existing Object Info data. Unlike it, however, it is necessary to maintain a separate buffer for every requested combination of attributes. This is done using a hash table with the attribute set as the key, as it is expected that technically different but similar materials may use the same set of attributes. In addition, in order to minimize wasted memory, a sparse UBO pool is implemented, so that chunks that don't contain any data don't have to be allocated. The back-end Cycles code is already refactored and committed by Brecht. Differential Revision: https://developer.blender.org/D2057
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-29UI: Improved alignment of labels and buttonsYevgeny Makarov
Improved alignment of labels with other buttons. Differential Revision: https://developer.blender.org/D9058 Reviewed by Julian Eisel
2020-10-21Preferences: separate feature flags for geometry nodes and point cloud typeJacques Lucke
Those two features are not directly related and one might be activated in master earlier than the other. WITH_PARTICLE_NODES was removed, because we continue the project under the name "Geometry Nodes".
2020-10-20Simulation: remove particle nodes with outdated designJacques Lucke
The design for how we approach the "Everything Nodes" project has changed. We will focus on a different part of the project initially. While future me will likely refer back to some of the code I remove here, there is no point in keeping this code around in master currently. It would just confuse other developers working on the project. This does not remove the simulation modifier and data block. Those are just cleaned up, so that the boilerplate code can be reused in the future.
2020-10-20Fix T81684: node location not handled correctlyJacques Lucke
Reviewers: ISS Differential Revision: https://developer.blender.org/D9236
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-16Cleanup: reduce variable scopesJacques Lucke
2020-10-16Cleanup: reduce variable scopesJacques Lucke
2020-10-14Cleanup: multi-line comment blocksCampbell Barton
2020-10-13Cleanup: Remove unused properties from node Viewer Region operatorJulian Eisel
The operator would define the `deselect` and `extend` properties, without actually using them. It's confusing to have them in the keymap item UI.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-09UI: Fix node label overflow on high-DPIYevgeny Makarov
Ref D9099
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-02Cleanup: Use enum for return values in context callbacksSybren A. Stüvel
Define enum `eContextResult` and use its values for returns, instead of just returning 1, 0, or -1 (and always having some comment that explains what -1 means). This also cleans up the mixup between returning `0` and `false`, and `1` and `true`. An inconsistency was discovered during this cleanup, and marked with `TODO(sybren)`. It's not fixed here, as it would consititute a functional change. The enum isn't used everywhere, as enums in C and C++ can have different storage sizes. To prevent issues, callback functions are still declared as returning`int`. To at least make things easier to understand for humans, I marked those with `int /*eContextResult*/`. This is a followup of D9090, and is intended to unify how context callbacks return values. This will make it easier to extend the approach in D9090 to those functions. No functional changes. Differential Revision: https://developer.blender.org/D9095
2020-10-02CleanUp: Remove header only definitionJeroen Bakker
node_draw_link_straight existed in header files without a body
2020-10-02CleanUp: snode_group_offset -> space_node_group_offsetJeroen Bakker
2020-10-02CleanUp: Renamed drawnodespace -> node_draw_spaceJeroen Bakker
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-16UI: Add grid-related theme optionsRed Mser
This commit makes grid theming more consistent and capable by adding some new theme colors related to grid rendering. - Add grid theme color for node editor. `UI_view2d_multi_grid_draw` is called with TH_GRID instead of a shaded `TH_BACK`. Also color-blend `TH_NODE_GROUP`. - Make the movie clip editor's clip preview grid respect grid theme color (`ED_region_grid_draw` uses color-blended `TH_GRID`). - Add versioning code to allow fixing existing themes (the resulting themes should visually look the same as before) These changes did cause some inconsistencies in the movie clip editor, even after adjusting the themes accordingly: 1. The alpha slider of the grid color affects the background and not the grid lines themselves. 2. The grids used by graph and dopesheet mode could already be themed in the past. Now that the clip preview's grid can also be themed, two different modes share the same theme color. Differential Revision: https://developer.blender.org/D8699