Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-08Cleanup: format, remove commented code & unused variableCampbell Barton
2022-11-07Fix T100872: restrict Python API on built-in nodesJacques Lucke
Differential Revision: https://developer.blender.org/D16304
2022-11-07Fix T102316: blank color-space menu drop-downsCampbell Barton
Regression in [0] needs further investigation (building docs may crash again). This effectively reverts [0], however de-duplicating the color-space enum can be kept. [0]: 037b771e1af53b0f87b73a9fe01e8e660267ec81
2022-11-05Fix crash building Python API docsCampbell Barton
Color space conversion item-function missed checking the context was NULL to return a static array. This caused freed memory access when building docs.
2022-11-02Geometry Nodes: Add index and value inputs to sample curve nodeHans Goudey
As described in T92474 and T91650, this patch adds two features to the sample curve node. First is an index input, to allow choosing the curve to sample for each point. Second is a custom field input, which is evaluated on the control points of the curve and then sampled like the other outputs. There is an "All Curves" option for the old behavior which takes the length of all curves into account. For invalid curve indices, the node outputs zeros (default values). Invalid lengths and factors are clamped. There have been various discussions about splitting the node up more, but this is an intuitive combination of options and will work well enough for current use cases. The node could still be generalized more in the future. Keep in mind that the source field is evaluated on curve control points, not the evaluated points used for sampling. This is necessary so that fields like "Index" work as expected. Differential Revision: https://developer.blender.org/D16147
2022-10-25Fix T99603: node body colors colormanagement issuePhilipp Oeser
This led to the color actually looking different on the node body itself vs. in the panel, also using the colorpicker gave unexpected results. UI colors should use PROP_COLOR_GAMMA to avoid being affected by scene color management (clarification by @brecht). Maniphest Tasks: T99603 Differential Revision: https://developer.blender.org/D16334
2022-10-11Realtime Compositor: Implement parallel reductionOmar Emara
This patch implements generic parallel reduction for the realtime compositor and implements the Levels operation as an example. This patch also introduces the notion of a "Compositor Algorithm", which is a reusable operation that can be used to construct other operations. Differential Revision: https://developer.blender.org/D16184 Reviewed By: Clement Foucault
2022-10-10I18n: disambiguate or extract a few messagesDamien Picard
Disambiguate: - "Active Only" (GPencil copy material and layer, add NLA modifier) - "Clip" (movie clip, image extension mode) - "Emission" (particles) - "New" (scene) - "Tracking" (movie clip) Extract: - "ViewLayer", the default view layer name when creating new scene Ref T43295 Reviewed By: mont29 Maniphest Tasks: T43295 Differential Revision: https://developer.blender.org/D16196
2022-10-08Attribute Node: support accessing attributes of View Layer and Scene.Alexander Gavrilov
The attribute node already allows accessing attributes associated with objects and meshes, which allows changing the behavior of the same material between different objects or instances. The same idea can be extended to an even more global level of layers and scenes. Currently view layers provide an option to replace all materials with a different one. However, since the same material will be applied to all objects in the layer, varying the behavior between layers while preserving distinct materials requires duplicating objects. Providing access to properties of layers and scenes via the attribute node enables making materials with built-in switches or settings that can be controlled globally at the view layer level. This is probably most useful for complex NPR shading and compositing. Like with objects, the node can also access built-in scene properties, like render resolution or FOV of the active camera. Lookup is also attempted in World, similar to how the Object mode checks the Mesh datablock. In Cycles this mode is implemented by replacing the attribute node with the attribute value during sync, allowing constant folding to take the values into account. This means however that materials that use this feature have to be re-synced upon any changes to scene, world or camera. The Eevee version uses a new uniform buffer containing a sorted array mapping name hashes to values, with binary search lookup. The array is limited to 512 entries, which is effectively limitless even considering it is shared by all materials in the scene; it is also just 16KB of memory so no point trying to optimize further. The buffer has to be rebuilt when new attributes are detected in a material, so the draw engine keeps a table of recently seen attribute names to minimize the chance of extra rebuilds mid-draw. Differential Revision: https://developer.blender.org/D15941
2022-10-05I18n: extract dynamic enum itemsDamien Picard
These item names and descriptions never got extracted because they're not in the RNA until the proper context occurs, and so the extraction script never even knew about them. The properties are mostly located in the fluids UI. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15994
2022-10-03Geometry Nodes: Set Curve NormalJohnny Matthews
This node allows for curves to have their evaluated normal mode changed between MINIMUM_TWIST and Z_UP. A selection input allows for choosing which spline in the curves object will be affected. Differential Revision: D16118
2022-10-03Geometry Nodes: new Sample UV Surface nodeJacques Lucke
This node allows sampling an attribute on a mesh surface based on a UV coordinate. Internally, this has to do a "reverse uv lookup", i.e. the node has to find the polygon that corresponds to the uv coordinate. Therefore, the uv map of the mesh should not have overlapping faces. Differential Revision: https://developer.blender.org/D15440
2022-09-28Geometry Nodes: viewport previewJacques Lucke
This adds support for showing geometry passed to the Viewer in the 3d viewport (instead of just in the spreadsheet). The "viewer geometry" bypasses the group output. So it is not necessary to change the final output of the node group to be able to see the intermediate geometry. **Activation and deactivation of a viewer node** * A viewer node is activated by clicking on it. * Ctrl+shift+click on any node/socket connects it to the viewer and makes it active. * Ctrl+shift+click in empty space deactivates the active viewer. * When the active viewer is not visible anymore (e.g. another object is selected, or the current node group is exit), it is deactivated. * Clicking on the icon in the header of the Viewer node toggles whether its active or not. **Pinning** * The spreadsheet still allows pinning the active viewer as before. When pinned, the spreadsheet still references the viewer node even when it becomes inactive. * The viewport does not support pinning at the moment. It always shows the active viewer. **Attribute** * When a field is linked to the second input of the viewer node it is displayed as an overlay in the viewport. * When possible the correct domain for the attribute is determined automatically. This does not work in all cases. It falls back to the face corner domain on meshes and the point domain on curves. When necessary, the domain can be picked manually. * The spreadsheet now only shows the "Viewer" column for the domain that is selected in the Viewer node. * Instance attributes are visualized as a constant color per instance. **Viewport Options** * The attribute overlay opacity can be controlled with the "Viewer Node" setting in the overlays popover. * A viewport can be configured not to show intermediate viewer-geometry by disabling the "Viewer Node" option in the "View" menu. **Implementation Details** * The "spreadsheet context path" was generalized to a "viewer path" that is used in more places now. * The viewer node itself determines the attribute domain, evaluates the field and stores the result in a `.viewer` attribute. * A new "viewer attribute' overlay displays the data from the `.viewer` attribute. * The ground truth for the active viewer node is stored in the workspace now. Node editors, spreadsheets and viewports retrieve the active viewer from there unless they are pinned. * The depsgraph object iterator has a new "viewer path" setting. When set, the viewed geometry of the corresponding object is part of the iterator instead of the final evaluated geometry. * To support the instance attribute overlay `DupliObject` was extended to contain the information necessary for drawing the overlay. * The ctrl+shift+click operator has been refactored so that it can make existing links to viewers active again. * The auto-domain-detection in the Viewer node works by checking the "preferred domain" for every field input. If there is not exactly one preferred domain, the fallback is used. Known limitations: * Loose edges of meshes don't have the attribute overlay. This could be added separately if necessary. * Some attributes are hard to visualize as a color directly. For example, the values might have to be normalized or some should be drawn as arrays. For now, we encourage users to build node groups that generate appropriate viewer-geometry. We might include some of that functionality in future versions. Support for displaying attribute values as text in the viewport is planned as well. * There seems to be an issue with the attribute overlay for pointclouds on nvidia gpus, to be investigated. Differential Revision: https://developer.blender.org/D15954
2022-09-28Fix T101341: make nodegroups active input/output non-animatablePhilipp Oeser
Active UI list index is usually not animatable. Here specifically, the active list index is oly used for operators acting on a specific (active) socket. Note other props here were already made non-animatable in rB1d3b92bdeabc. Maniphest Tasks: T101341 Differential Revision: https://developer.blender.org/D16077
2022-09-23Geometry Nodes: Split transfer attribute nodeHans Goudey
This patch replaces the existing transfer attribute node with three nodes, "Sample Nearest Surface", "Sample Index", and "Sample Nearest". This follows the design in T100010, allowing for new nodes like UV sampling in the future. There is versioning so the new nodes replace the old ones and are relinked as necessary. The "Sample Nearest Surface" node is meant for the more complex sampling algorithms that only work on meshes and interpolate values inside of faces. The new "Sample Index" just retrieves attributes from a geometry at specific indices. It doesn't have implicit behavior like the old transfer mode, which should make it more predictable. In order to not change the behavior from existing files, the node has a has a "Clamp", which is off by default for consistency with the "Field at Index" node. The "Sample Nearest" node returns the index of the nearest element on a geometry. It can be combined with the "Sample Index" node for the same functionality as the old transfer node. This node can support curves in the future. Backwards compatibility is handled by versioning, but old versions can not understand these nodes. The warning from 680fa8a523e0 should make this explicit in 3.3 and earlier. Differential Revision: https://developer.blender.org/D15909
2022-09-21File Browser: Manual auto-increase name support for output filepathsDalai Felinto
This functionality was present until Blender 2.80. Basically it adds back the "+" and "-" buttons in the file browser when it stores an output filepath. This is useful for someone rendering multiple versions of an animation (or a composition) to compare. At the moment this is used for the render output, and the File Output node in the compositor. Differential Revision: https://developer.blender.org/D15968
2022-09-19Geometry Nodes: Distribute Points in VolumeIyad Ahmed
This commit adds a node to distribute points inside of volume grids. The "Random" mode usese OpenVDB's "point scatter" implementation, and there is also a "Grid" mode for uniform distributions. Both methods operate on all of the float grids in the volume, using every voxel with a value higher than the threshold. The random method is not stable as the input volume deforms. Based on a patch by Angus Stanton (@abstanton), which was based on a patch by Kenzie (@kenziemac130). Differential Revision: https://developer.blender.org/D15375
2022-09-19Cleanup: spellingCampbell Barton
2022-09-16Cleanup: spelling in commentsCampbell Barton
2022-09-09Realtime Compositor: Implement scale nodeOmar Emara
This patch implements the Scale node for the realtime compositor. Differential Revision: https://developer.blender.org/D15758 Reviewed By: Clement Foucault
2022-09-02Fix: Wrong enum used in Mix Node for factor modeCharlie Jolly
Wrong type of enum was used for factor mode in rna_nodetree.c No functional change, thankfully the correct enum had the same value.
2022-09-02Realtime Compositor: Implement dilate erode nodeOmar Emara
This patch implements the dilate/erode node for the realtime compositor. Differential Revision: https://developer.blender.org/D15790 Reviewed By: Clement Foucault
2022-08-31Cleanup: formatCampbell Barton
2022-08-31Node: Mix nodeCharlie Jolly
This patch is a response to T92588 and is implemented as a Function/Shader node. This node has support for Float, Vector and Color data types. For Vector it supports uniform and non-uniform mixing. For Color it now has the option to remove factor clamping. It replaces the Mix RGB for Shader and Geometry node trees. As discussed in T96219, this patch converts existing nodes in .blend files. The old node is still available in the Python API but hidden from the menus. Reviewed By: HooglyBoogly, JacquesLucke, simonthommes, brecht Maniphest Tasks: T92588 Differential Revision: https://developer.blender.org/D13749
2022-08-29I18n: disambiguate and make a few more strings translatableDamien Picard
Those strings were at least partly disambiguated: - Area - Zone - Measurement - Ease - BBone Ease In / Out - Back - Camera BG image depth - GP interpolate sequence - Edge Crease - Theme - Jitter - Brush - GPencil - Lens distorsion compositing node - Cineon color management - Black - Gamma - White Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15791
2022-08-23Merge branch 'blender-v3.3-release'Philipp Oeser
2022-08-23Compositor: handle NODE_DO_OUTPUT in RNA when setting a node activePhilipp Oeser
Main motivation is from T54314 where there was no way to read from a Viewer image datablock after setting another viewer node active. Part of the problem was addressed in rB16d329da284c (where handlers for the compositing background job were added so that you can act after the compositor has run), however there was still the remaining issue that setting another viewer node active would not properly tag the node NODE_DO_OUTPUT. This forced users into a complicated workaround (using switch nodes feeding into a single viewer node). Now handle NODE_DO_OUTPUT properly in RNA, too, and do proper updates so that behavior from RNA matches that of the Node Editor when setting a viewer node active. ref T54314. Reviewed By: JacquesLucke Maniphest Tasks: T54314 Differential Revision: https://developer.blender.org/D15203
2022-08-22Merge branch 'blender-v3.3-release'Bastien Montagne
Conflicts: release/scripts/startup/bl_ui/space_userpref.py
2022-08-22I18n: disambiguate a few translationsDamien Picard
- Keying (keyframe insertion) - Roughness (particle children) - New image, collection, text (in menus) - Parents (particles) - Wrap (text) - Light (add menu) - Empty (volume add menu) - Empty (empty add menu) - Cycles (f-curve modifier) - Drag (workspace tool type) - Power (light intensity) - Power (math nodes) This last change also moves all math operations in nodes to the ID_nodetree context. It's needed only for some operations, but we can't be more granular here. Also... - Fix context extraction for interpolation mode headers in F-Curves and GPencil interpolation operator - Enable new translation: "Slot %d" in image editor - Fix an English message in the node editor: "Replace the input image's alpha channels by..." -> channel Ref. T43295 Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15694
2022-08-12Cleanup: repeated words in stringsCampbell Barton
2022-07-27Geometry Nodes: Rename "Field on Domain" to "Interpolate Domain"Hans Goudey
This name doesn't require understanding of fields, and is phrased as an action which is consistent with other nodes. Discussed in the latest geometry nodes sub-module meeting.
2022-07-26Fix T98982: cannot change default value of some node group input typesJacques Lucke
2022-07-25UI: Nishita sky: Increase Sun Elevation UI sensitivity and remove min/maxClément Foucault
This now use default angle precision which matches the sun rotation. Feeling is much more natural.
2022-07-19Nishita sky: Increase elevation rangeClément Foucault
The Nishita sky texture currently only allows moving the sun to the zenith. The problem is if you want to animate the passing of a full night-day-night cycle. Currently it's not easy to do due to this limitation. The patch makes it so users can easily animate the sun moving from sunrise to sunset by expanding the max sun elevation to go 360° instead of 90°. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13724
2022-07-02Revert "Start of Bevel V2, as being worked on with task T98674."Howard Trickey
This reverts commit 9bb2afb55e50f9353cfc76cf2d8df7521b0b5feb. Oops, did not intend to commit this to master.
2022-07-02Start of Bevel V2, as being worked on with task T98674.Howard Trickey
This is the start of a geometry node to do edge, vertex, and face bevels. It doesn't yet do anything but analyze the "Vertex cap" around selected vertices for vertex bevel.
2022-06-29Geometry Nodes: UV Unwrap and Pack Islands NodesAleksi Juvani
This commit adds new Unwrap and Pack Islands nodes, with equivalent functionality to the existing Unwrap and Pack Islands operators. The Unwrap node uses generic boolean attributes to determine seams instead of looking at the seam flags in the mesh geometry. Unlike the Unwrap operator, the Unwrap node doesn't perform aspect ratio correction, because this is trivial for the user to implement with a Vector Math node if it is desired. The Unwrap node implicitly performs a Pack Islands operation upon completion, because the results may not be generally useful otherwise. This matches the behaviour of the Unwrap operator. The nodes use the existing Vector socket type, and do not introduce a new 2D Vector type (see T92765). Differential Revision: https://developer.blender.org/D14389
2022-06-29Geometry Nodes: Add Mesh To Volume NodeErik Abrahamsson
This adds a Mesh To Volume Node T86838 based on the existing modifier. The mesh to volume conversion is implemented in the geometry module, and shared between the node and the modifier. Currently the node outputs a grid with the name "density". This may change in the future depending on the decisions made in T91668. The original patch was by Kris (@Metricity), further implementation by Geramy Loveless (@GeramyLoveless), then finished by Erik Abrahamsson (@erik85). Differential Revision: https://developer.blender.org/D10895
2022-06-25Geometry Nodes: Field on Domain NodeHans Goudey
As described in T98943, this commit adds a node that can evaluate a field on a separate domain in a larger field context. This is potentially useful in many cases, to avoid relying on a separate capture attribute node, which can make it easier to build reusable fields that don't need geometry inputs. Internally, the node just evaluates the input field in the larger field context and then uses the generic domain interpolation, so the code is simple. One future optimization might be using the input selection to only evaluate part of the input field, but then the selection has to be interpolated as well, and that might not always be worth it. Differential Revision: https://developer.blender.org/D15289
2022-06-08RNA nodetree: improve ImageUser path helper.Bastien Montagne
Refactor the code, and optimize it slightly (no need e.g. to check for nodes when the nodetree is of a type that cannot have image user nodes).
2022-06-08Curves: Port set type node to new data-blockHans Goudey
This commit ports the "Set Spline Type" node to the new curves type. Performance should be improved in similar ways to the other refactors from the conversion task (T95443). Converting to and from Catmull Rom curves is now supported. There are a few cases where a lot of work can be skipped: when the number of points doesn't change, and when the types already match the goal type. The refactor has a few other explicit goals as well: - Don't count on initialization of attribute arrays when they are first allocated. - Avoid copying the entire data-block when possible. - Make decisions about which attributes to copy when changing curves more obvious. - Use higher-level methods to copy data between curve points. - Optimize for the common cases of single types and full selections. - Process selected curves of the same types in the same loop. The Bezier to NURBS conversion is written by Piotr Makal (@pmakal). Differential Revision: https://developer.blender.org/D14769
2022-05-31RNA: add macros for EnumPropertyItem layout elementsCampbell Barton
Add the following macros for enums as support for these features wasn't all that obvious and there were some inconsistencies in their use. - RNA_ENUM_ITEM_HEADING(name, description) - RNA_ENUM_ITEM_SEPR - RNA_ENUM_ITEM_SEPR_COLUMN
2022-05-27UI: add missing tooltips for the shader node optionsArye Ramaty
Differential Revision: https://developer.blender.org/D14878
2022-05-25Cleanup: Add more const'ness to RNA API.Bastien Montagne
This commit makes PointerRNA passed to RNA path API const. Main change was in the `path` callback for RNA structs, and indirectly the `getlength` callback of properties.
2022-05-10UI: Geometry Nodes IconDalai Felinto
Geometry Nodes (new) icon. So far we were using the generic node-tree icon for geometry nodes, not anymore. The new icon is composed of 4 spheres that is a reference to the original pebbles demo. Scattering points was also the turning point for the project (which originally was focusing on dynamic effects), and to this day is one of the first steps for everything procedural such as hair. Note that the modifier icon is still showing as white in the outliner. The alternative is to be blue everywhere. Patch review and feedback by Hans Goudey. Icon creation in collaboration with Pablo Vazquez.
2022-05-04Nodes: Add general Combine/Separate Color nodesHallam Roberts
Inspired by D12936 and D12929, this patch adds general purpose "Combine Color" and "Separate Color" nodes to Geometry, Compositor, Shader and Texture nodes. - Within Geometry Nodes, it replaces the existing "Combine RGB" and "Separate RGB" nodes. - Within Compositor Nodes, it replaces the existing "Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA" nodes. - Within Texture Nodes, it replaces the existing "Combine RGBA" and "Separate RGBA" nodes. - Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and "Separate RGB/HSV" nodes. Python addons have not been updated to the new nodes yet. **New shader code** In node_color.h, color.h and gpu_shader_material_color_util.glsl, missing methods hsl_to_rgb and rgb_to_hsl are added by directly converting existing C code. They always produce the same result. **Old code** As requested by T96219, old nodes still exist but are not displayed in the add menu. This means Python scripts can still create them as usual. Otherwise, versioning replaces the old nodes with the new nodes when opening .blend files. Differential Revision: https://developer.blender.org/D14034
2022-05-01Nodes: Fix T90233Lukas Tönne
- Fix default_value initialization of custom node tree interface: This was crashing when adding a custom interface socket to a tree. The node_socket_set_typeinfo function was called too early, creating a default float socket, which then doesn't match the socket type after changing to the custom type. The node_socket_set_typeinfo only allocates and initializes default_value when it isn't already set. That is because the function is used either when creating new sockets or to initialize typeinfo after loading files. So default_value has to be either null or has to be matching the current type already. - Fix RNA flag for string return value of the valid_socket_type callback: String return values of registerable RNA functions need a PROP_THICK_WRAP flag since they don't have a fixed buffer to write into.
2022-04-28Geometry Nodes: Add default attribute name to field inputs/outputsHans Goudey
Geometry node group inputs and outputs get a new property that controls the attribute name used for that field input/output when assigning the node group to a modifier for the first time. If the default name is assigned to an input, the default "Use attribute name" is true . In order to properly detect when a node group is first assigned, the modifier now clears its properties when clearing the node group. Ref T96707 Differential Revision: https://developer.blender.org/D14761
2022-04-21Geometry Nodes: better support for byte color attributesJacques Lucke
Since {rBeae36be372a6b16ee3e76eff0485a47da4f3c230} the distinction between float and byte colors is more explicit in the ui. So far, geometry nodes couldn't really deal with byte colors in general. This patch fixes that. There is still only one color socket, which contains float colors. Conversion to and from byte colors is done when read from or writing to attributes. * Support writing to byte color attributes in Store Named Attribute node. * Support converting to/from byte color in attribute conversion operator. * Support propagating byte color attributes. * Add all the implicit conversions from byte colors to the other types. * Display byte colors as integers in spreadsheet. Differential Revision: https://developer.blender.org/D14705
2022-04-21Nodes: raise exception when creating node group input/output failsJacques Lucke
Previously this would silently return `None`. Now the behavior is similar to when new sockets are added to a node.