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-11Mesh: Convert color attribute operatorRamil Roosileht
Implements an operator to convert color attributes in available domains and types, as described in T97106. Differential Revision: https://developer.blender.org/D15596
2022-10-26Fix T102045: Properties Editor Attribute panels errors when pinning meshPhilipp Oeser
When pinning a Mesh, we cannot rely on the context object. Instead, use the context mesh now. For vertexgroups names [which are still on the object API wise], this means name collisions cannot be checked when pinning a Mesh (so print this as a warning in that case) Maniphest Tasks: T102045 Differential Revision: https://developer.blender.org/D16333
2022-09-23Mesh: Move edge crease out of MEdgeHans Goudey
This is very similar to D14077. There are two differences though. First is that vertex creases are already stored in a separate layer, and second is that we can now completely remove use of `Mesh.cd_flag`, since that information is now inherent to whether the layers exist. There are two functional differences here: * Operators are used to add and remove layers instead of a property. * The "crease" attribute can be created and removed by geometry nodes. The second change should make various geometry nodes slightly faster, since the "crease" attribute was always processed before. Creases are now interpolated generically in the CustomData API too, which should help maintain the values across edits better. Meshes get an `edge_creases` RNA property like the existing vertex property, to provide more efficient access to the data in Cycles. One test failure is expected, where different rounding between float the old char storage means that 5 additional points are scattered in a geometry nodes test. Differential Revision: https://developer.blender.org/D15927
2022-09-09Mesh: Move bevel weight out of MVert and MEdgeHans Goudey
As described in T95966, the goal is to move to a "struct of arrays" approach rather than gathering an arbitrary set of data in hard-coded structs. This has performance benefits, but also code complexity benefits (this patch removes plenty of code, though the boilerplate for the new operators outweighs that here). To mirror the internal change, the options for storing mesh bevel weights are converted into operators that add or remove the layer, like for some other layers. The most complex change is to the solidify modifier, where bevel weights had special handling. Other than that, most changes are removing clearing of the weights, boilerplate for the add/remove operators, and removing the manual transfer of bevel weights in bmesh - mesh conversion. Eventually bevel weights can become a fully generic attribute, but for now this patch aims to avoid most functional changes. Bevel weights are still written and read from the mesh in the old way, so neither forward nor backward compatibility are affected. As described in T95965, writing in the old format will be done until 4.0. Differential Revision: https://developer.blender.org/D14077
2022-08-31Mesh: Move material indices to a generic attributeHans Goudey
This patch moves material indices from the mesh `MPoly` struct to a generic integer attribute. The builtin material index was already exposed in geometry nodes, but this makes it a "proper" attribute accessible with Python and visible in the "Attributes" panel. The goals of the refactor are code simplification and memory and performance improvements, mainly because the attribute doesn't have to be stored and processed if there are no materials. However, until 4.0, material indices will still be read and written in the old format, meaning there may be a temporary increase in memory usage. Further notes: * Completely removing the `MPoly.mat_nr` after 4.0 may require changes to DNA or introducing a new `MPoly` type. * Geometry nodes regression tests didn't look at material indices, so the change reveals a bug in the realize instances node that I fixed. * Access to material indices from the RNA `MeshPolygon` type is slower with this patch. The `material_index` attribute can be used instead. * Cycles is changed to read from the attribute instead. * BMesh isn't changed in this patch. Theoretically it could be though, to save 2 bytes per face when less than two materials are used. * Eventually we could use a 16 bit integer attribute type instead. Ref T95967 Differential Revision: https://developer.blender.org/D15675
2022-08-09I18n: make more parts of the UI translatableDamien Picard
- "Name collisions" label in mesh properties - "Threshold" labels in Vertex Weight Edit modifier - "Particle System" label in Particle Instance modifier - Slot number in the Shader Editor - Status bar keymap items during modal operations: add TIP_() macro to status bar interface template - On dumping messages, sort preset files so their messages are stable between runs Ref. T43295 Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15607
2022-07-20Add a 'Apply and Delete All' operation to shapekeys.Bastien Montagne
Adds a new option to the 'Delete ShpaKeys' operator, which first applies the current mix to the object data, before removing all shapekeys. Request from @JulienKaspar from Blender studio. Reviewed By: JulienKaspar Differential Revision: https://developer.blender.org/D15443
2022-07-08Curves: support deforming curves on surfaceJacques Lucke
Curves that are attached to a surface can now follow the surface when it is modified using shape keys or modifiers (but not when the original surface is deformed in edit or sculpt mode). The surface is allowed to be changed in any way that keeps uv maps intact. So deformation is allowed, but also some topology changes like subdivision. The following features are added: * A new `Deform Curves on Surface` node, which deforms curves with attachment information based on the surface object and uv map set in the properties panel. * A new `Add Rest Position` checkbox in the shape keys panel. When checked, a new `rest_position` vector attribute is added to the mesh before shape keys and modifiers are applied. This is necessary to support proper deformation of the curves, but can also be used for other purposes. * The `Add > Curve > Empty Hair` operator now sets up a simple geometry nodes setup that deforms the hair. It also makes sure that the rest position attribute is added to the surface. * A new `Object (Attach Curves to Surface)` operator in the `Set Parent To` (ctrl+P) menu, which attaches existing curves to the surface and sets the surface object as parent. Limitations: * Sculpting the procedurally deformed curves will be implemented separately. * The `Deform Curves on Surface` node is not generic and can only be used for one specific purpose currently. We plan to generalize this more in the future by adding support by exposing more inputs and/or by turning it into a node group. Differential Revision: https://developer.blender.org/D14864
2022-06-14Cleanup: unused argument, variable warningsCampbell Barton
2022-06-09Cleanup: formatCampbell Barton
2022-06-08D14823: Adds operator to duplicate the active color attribute layerDennis Ranish
Fixes T97706 Adds operator to duplicate the active color attribute layer. Adds `"Color Attribute Specials"` menu to color attribute ui to access the `"geometry.color_attribute_duplicate"` operator. Internally adds a function that duplicates a referenced CustomDataLayer - `BKE_id_attribute_duplicate` mostly copies the existing `BKE_id_attribute_new` - but gets the type and domain from the referenced layer - and copies the data from the old layer into the new layer Reviewed By: Joseph Eagar & Hans Goudey & Julien Kaspar Differential Revision: https://developer.blender.org/D14823 Ref D14823
2022-06-02Cleanup: remove "<pep8 compliant>" from headersCampbell Barton
It can be assumed that all scripts comply with basic pep8 formatting regarding white-space, indentation etc. Also remove note in best practices page & update `tests/python/pep8.py`. If we want to exclude some scripts from make format, this can be done by adding them to `ignore_files` in: source/tools/utils_maintenance/autopep8_format_paths.py Or using `# nopep8` for to ignore for individual lines. Ref T98554
2022-06-01Cleanup: use 'e' prefix for enum typesCampbell Barton
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
2022-05-31Attributes: Hide internal UI attributes and disallow procedural accessHans Goudey
This commit hides "UI attributes" described in T97452 from the UI lists in mesh, curve, and point cloud properties, and disallow accessing them in geometry nodes. Internal UI attributes like selection and hiding values should use the attribute system for simplicity and performance, but we don't want to expose those attributes in the attribute panel, which is meant for regular user interaction. Procedural access may be misleading or cause problems, as described in the design task above. These attributes are added by two upcoming patches: D14934, D14685 Differential Revision: https://developer.blender.org/D15069
2022-04-28UI: Fix consistency issues with attribute tooltips and iconsEthan-Hall
This patch modifies tooltips of attributes and UV maps to resolve inconsistencies. It also restores the vertex color icon that went missing from the UI lists when color attributes replaced vertex colors. Fixes T97614 Differential Revision: https://developer.blender.org/D14768
2022-04-19Cleanup: run autopep8 on release/scripts/startup/Campbell Barton
2022-04-12Fix T97100: Fix ordering in color attribute list itemsJoseph Eagar
The new tab in the properties panel for "Color Attributes" shows the data type and domain, just like the Attributes tab. The issue is that the UI does not scale well and can only display the full names when dragged to an extreme width. This is due to the inclusion of the render icon in between the attribute name and attribute type description. This patch changes the order that items are displayed in the Color Attributes Panel. Moving the render icon to the very right. The result is consistent with other parts of the Blender UI and does not take as much space to display the full text. Reviewed By: @jbakker Differential Revision: https://developer.blender.org/D14567 Ref D14567
2022-04-08Painting: Canvas switcher for painting brushes/tools.Jeroen Bakker
This patch adds color attributes to TexPaintSlot. This allows an easier selection when painting color attributes. Previously when selecting a paint tool the user had to start a stroke, before the UI reflected the correct TexPaintSlot. Now when switching the slot the active tool is checked and immediate the UI is drawn correctly. In the future the canvas selector will also be used to select an image or image texture node to paint on. Basic implementation has already been done inside this patch. A limitation of this patch is that is isn't possible anymore to rename images directly from the selection panel. This is currently allowed in master. But as CustomDataLayers aren't ID fields and not owned by the material supporting this wouldn't be easy. {F12953989} In the future we should update the create slot operator to also include color attributes. Sources could also be extended to use other areas of the object that use image textures (particles, geom nodes, etc... ). Reviewed By: brecht Maniphest Tasks: T96709 Differential Revision: https://developer.blender.org/D14455
2022-04-06UI: use a faster method of finding colliding layer namesCampbell Barton
Access the keys of the collection instead of the layers names and use a set to detect collisions. There is no need to access the duplicate layers themselves. Roughly twice as fast.
2022-04-06Cleanup: line wrapping, remove unused args, variables in UI scriptsCampbell Barton
2022-04-05Refactor: Unify vertex and sculpt colors into newJoseph Eagar
color attribute system. This commit removes sculpt colors from experimental status and unifies it with vertex colors. It introduces the concept of "color attributes", which are any attributes that represents colors. Color attributes can be represented with byte or floating-point numbers and can be stored in either vertices or face corners. Color attributes share a common namespace (so you can no longer have a floating-point sculpt color attribute and a byte vertex color attribute with the same name). Note: this commit does not include vertex paint mode, which is a separate patch, see: https://developer.blender.org/D14179 Differential Revision: https://developer.blender.org/D12587 Ref D12587
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-21Attributes: add operator to convert generic attributes to other typesJacques Lucke
Editing of generic attributes on the original objects in edit modes is still very limited. However, when applying a geometry nodes modifier that generates new attributes. These attributes will show up in the Attributes panel. Currently, our exporters are not capable of exporting generic attributes. Therefore, for the time being, a work around is to apply geometry nodes and then convert a generic attribute to a task specific attribute like a uv map, vertex group or vertex color layer. Once more parts of Blender support generic attributes, this will become less important. Currently, only meshes are supported by the operator. However, it would be relatively easy to extend it to other geometry types. Differential Revision: https://developer.blender.org/D13838
2022-01-20Subdivision: add support for vertex creasingKévin Dietrich
This adds vertex creasing support for OpenSubDiv for modeling, rendering, Alembic and USD I/O. For modeling, vertex creasing follows the edge creasing implementation with an operator accessible through the Vertex menu in Edit Mode, and some parameter in the properties panel. The option in the Subsurf and Multires to use edge creasing also affects vertex creasing. The vertex crease data is stored as a CustomData layer, unlike edge creases which for now are stored in `MEdge`, but will in the future also be moved to a `CustomData` layer. See comments for details on the difference in behavior for the `CD_CREASE` layer between egdes and vertices. For Cycles this adds sockets on the Mesh node to hold data about which vertices are creased (one socket for the indices, one for the weigths). Viewport rendering of vertex creasing reuses the same color scheme as for edges and creased vertices are drawn bigger than uncreased vertices. For Alembic and USD, vertex crease support follows the edge crease implementation, they are always read, but only exported if a `Subsurf` modifier is present on the Mesh. Reviewed By: brecht, fclem, sergey, sybren, campbellbarton Differential Revision: https://developer.blender.org/D10145
2021-09-29Fix T91802: vertex color layer name collides with itselfJacques Lucke
Vertex colors are already included in `mesh.attributes`. So they don't have to be added to the collision checks separately.
2021-07-16Rename UI error message on attributes panel for name collisionsDalai Felinto
* Name Collisions > Name collisions * Info icon > Error icon
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-06-28Geometry Nodes: initial attribute list for meshesJacques Lucke
This adds a new Attributes panel in the mesh properties editor. It shows a list of all the generic attributes on the mesh. In the future, we want to show built-in and other attributes in the list as well. Related technical design tasks: T88460, T89054. There is also a new simple name collision check that warns the user when there are multiple attributes with the same name. This can be problematic when the attribute is supposed to be used in geometry nodes or during rendering. Differential Revision: https://developer.blender.org/D11276
2021-06-28Fix name of UI emboss RNA enum itemHans Goudey
This was a stupid mistake in my original commit that added this item. While this is an API breakage, the name is simply wrong, and it is only 6 months old, and slightly niche. Differential Revision: https://developer.blender.org/D11701
2021-06-23Voxel Remesher: Make smooth shading output automaticPablo Dobarro
Previously the smooth shading of the voxel remesher was controlled by a mesh property. With this change, the output will try to match the current shading of the object. This only takes into consideration the shading mode of the first polygon of the model, but it is probably what most users expect as it works as intended with the shade smooth/flat object mode options. Reviewed By: JulienKaspar, JacquesLucke Differential Revision: https://developer.blender.org/D11626
2020-12-19Fix T83868: Button animation states no longer visible without embossHans Goudey
This bug was caused by making it so that non-embossed modifier icon buttons could become an operator button and retain their red highlight for disabled modifiers. The icon button needs emboss turned off, but in earlier versions of Blender, `UI_EMBOSS_NONE` would be overridden by animation or red alert states. Instead of abusing "NONE" to mean "none unless there is animation or red alert", this commit adds a new emboss flag for that situation, `UI_EMBOSS_NONE_OR_STATUS`, which uses no emboss unless there is an animation state, or another status. There are only a few situations where this is necessary, so the change isn't too big. Differential Revision: https://developer.blender.org/D9902
2020-10-24UI: Capitalization CorrectionsYevgeny Makarov
Approximately 141 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D8392 Reviewed by Julian Eisel
2020-10-07UI: Fix capitalization in various placesYevgeny Makarov
Follow the MLA style, agreed upon in T79589. This means "from" within UI labels should be lowercase. Differential Revision: https://developer.blender.org/D8345
2020-10-02Cleanup: pep8 (indentation, spacing, long lines)Campbell Barton
2020-08-14Fix (unreported) sculpt vertex color panel visible for all object typesPhilipp Oeser
Since DATA_PT_sculpt_vertex_colors has its own poll() we need to call the poll() of MeshButtonsPanel as well Differential Revision: https://developer.blender.org/D8563
2020-08-12Fix T79708: ShapeKey value greyed outPhilipp Oeser
Mistake in rB0e9999a93edd. Maniphest Tasks: T79708 Differential Revision: https://developer.blender.org/D8539
2020-07-24Fix shape key pin toggle drawing as disabled in edit-modeCampbell Barton
Pin can be used in edit-mode when shape key in edit-mode is enabled.
2020-07-09Sculpt: Make Sculpt Vertex Colors features experimentalPablo Dobarro
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8239
2020-06-23Sculpt Vertex Colors: Initial implementationPablo Dobarro
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time. This commit includes: - SCULPT_UNDO_COLOR for undo support in sculpt mode - SCULPT_UPDATE_COLOR and PBVH flags and rendering - Sculpt Color API functions - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now) - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint) - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint) - Remesher reprojection in the Voxel Remehser - Paint Brush and Smear Brush with color smoothing in alt-smooth mode - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors - Color Filter - Color picker (uses S shortcut, replaces smooth) - Color selector in the top bar Reviewed By: brecht Maniphest Tasks: T72866 Differential Revision: https://developer.blender.org/D5975
2020-04-17UI: Layout changes for new checkbox layout possibilitiesWilliam Reynish
Follow-up to previous commit. Some examples: {F8473507} {F8473508} {F8473509} {F8473510} For more screenshots, please see D7430. We use column or row headings here to bring more structure, and to give the eye visual anchors which aid eye-scanning. The left-aligned checkboxes likewise help with this. And we keep the adherence to the center line, so the alignment matches up between the various buttons and controls. * Changes the property split percentage from 50/50% to 40/60%. This is needed to give enough space for the checkboxes. But in most cases this looks better anyway - see Transform panel. In some cases it simply fills out the available space more efficently. * Fix various hacks where we previously used manually defined splits. When we did this, the alignment was never quite right, and the layout code was a mess. * Adds column headings to many places where a list of checkboxes all share a common purpose or leading text. * Add checkbox + value configurations various places where a checkbox only serves to enable the value slider * Removes most uses of grid flow layout. The grid flow layouts combine poorly with column headings, and also they would mess alignment up badly. The grid flow layouts also often made buttons and controls jump around on the screen if you would just resize editors slightly, causing visual confusion, making users lose their place. The logic for at what time the list of items would re-flow was often flawed, jumping to multiple columns too fast or too late - and frankly, the grid flow layouts would often just look bad. Maniphest Task: https://developer.blender.org/T65965 Differential Revision: https://developer.blender.org/D7430 Reviewed by: Brecht Van Lommel, Pablo Vazquez. Most work here by William Reynish, few changes by Julian Eisel.
2020-03-06Fix using wrong property name for preserve face sets when remeshingPablo Dobarro
Spotted by Roel Koster in the initial face set commit.
2020-03-05Sculpt Face SetsPablo Dobarro
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070
2020-02-12Weight Paint: add a pie menu for locking and unlocking vertex groups.Alexander Gavrilov
Provide different options for locking and unlocking vertex groups using bone selection, accessible via a pie menu triggered via the 'K' hotkey. To implement a variety of operations, extend the old operator with a new option to mask it by bone selection. If the X Mirror option is enabled, selection is automatically mirrored. This follows D6533 as the next step in improving accessibility of vertex group locking during weight painting. Differential Revision: https://developer.blender.org/D6618
2019-12-12UI: Use property split layout for absolute shape keysWilliam Reynish
Differential Revision: https://developer.blender.org/D6390 Author: Mikhail Rachinskiy (alm) Reviewed By: William Reynish, Campbell Barton
2019-10-29Cleanup: pep8, remove redundant parenthesisCampbell Barton
2019-10-29Cleanup: use "use_" prefix for booleansCampbell Barton
2019-09-27Voxel remesh: Enable adaptivityPablo Dobarro
This commit enables OpenVDB adaptivity in the voxel remesher. It can be useful to reduce the polygon count if you want to switch to dyntopo after using the voxel remesher workflow. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5918
2019-09-26Voxel Remesh: Fix poles and preserve volumePablo Dobarro
This commit fixes most of the issues we currently have in the voxel remesher. Mesh volume is preserved when doing multiple iterations, so the sculpt won't shrink and smooth each time you run the remesher. Mesh topology is much better, fixing most issues related to mask extraction and other topology based operations. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5863
2019-09-20UI: Fix CapitalizationYevgeny Makarov
Differential Revision: https://developer.blender.org/D5716
2019-09-13UI: don't show decorators in Remesh panelBrecht Van Lommel