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-12Merge branch 'master' into temp-sculpt-roll-mappingtemp-sculpt-roll-mappingJoseph Eagar
2022-11-08GPencil: Make Sculpt Auto-masking Global and not by BrushAntonio Vazquez
The auto-masking was working by Brush and this was very inconvenient because it was necessary set the options by Brush, now the options are global and can be set at once. Also, the automa-masking now works with `and` logic and not with `or` as before. That means that a stroke must meet all the conditions of the masking. Added new Layer and Material options to masking the strokes using the same Layer/Material of the selected stroke. Before, only Active Layer and Active Material could be masked. The options of masking has been moved to the top-bar using the same design of Mesh Sculpt masking. As result of the changes above, the following props changed: Removed: `brush.gpencil_settings.use_automasking_strokes` `brush.gpencil_settings.use_automasking_layer` `brush.gpencil_settings.use_automasking_material` Added: `tool_settings.gpencil_sculpt.use_automasking_stroke` `tool_settings.gpencil_sculpt.use_automasking_layer_stroke` `tool_settings.gpencil_sculpt.use_automasking_material_stroke` `tool_settings.gpencil_sculpt.use_automasking_layer_active` `tool_settings.gpencil_sculpt.use_automasking_material_active` Reviewed by: Julien Kaspar, Matias Mendiola, Daniel Martinez Lara
2022-11-06temp-sculpt-roll-mapping: Port roll tex mapping code from sculpt-devJoseph Eagar
2022-10-26Fix: set more UI colors to PROP_COLOR_GAMMAPhilipp Oeser
Followup to rBfb424db2b7bb. Found some more candidates. UI colors should use PROP_COLOR_GAMMA to avoid being affected by scene color management (clarification by @brecht). Differential Revision: https://developer.blender.org/D16337
2022-10-19Curves sculptmode: fix missing mode and tool in Brush SpecialsPhilipp Oeser
For consistency with other brush based (paint) systems we should add these entries in the brushes context menu. For this, expose the brushes `ob_mode` to RNA and show this (along with the tool choice) to the appropriate menus. Differential Revision: https://developer.blender.org/D16287
2022-10-17Sculpt: add versioning for Auto-masking cavity factor defaultPablo Vazquez
Also remove automasking_cavity_factor default from RNA for brushes. Data-blocks set their defaults via `DNA_brush_defaults.h` Continuation from previous commit and rBdb40b6 Thanks to Dalai for the help!
2022-10-17Sculpt: Auto-masking UI improvementsPablo Vazquez
Add auto-masking as a popover in the header while in Sculpt mode, following the design in T101593. These properties were present in the Options panel (and popover), they have been removed from there. Moreover, this commit makes the auto-masking section in Brush settings match the new popover. In the future this popover can be used for other modes that support auto-masking such as Grease Pencil. See D16145 for details and screenshots. Reviewed By: JulienKaspar Differential Revision: https://developer.blender.org/D16145
2022-10-10Cleanup: spelling in commentsCampbell Barton
2022-09-29GPencil: Remove Fill `use_collide_only` optionAntonio Vazquez
After a lot of testing, this option is not required and now this is managed by stroke_collsion. If the stroke_collision is enabled, only collide strokes are used.
2022-09-29Cleanup: run clang-format in sculpt codeJoseph Eagar
2022-09-29Sculpt: Normal-based automasking modesJoseph Eagar
Two new normal-based automasking modes. The first mode, "brush", compares vertex normals with the initial normal at the beginning of the brush stroke. The second, "view", compares vertex normals with the view normal. If "occlusion" is on then rays will be shot from each vertex to test if it is occluded by other geometry (note: this can be very slow).\ Only geometry inside the sculpt mesh is considered. Each mode has an associated angular limit and a falloff. Reviewed by: Julien Kaspar and Jeroen Bakker Differential Revision: https://developer.blender.org/D15297 Ref D15297
2022-09-29Cleanup: remove '.' from the end of descriptionsCampbell Barton
Quiet warnings at startup & build time.
2022-09-29Cleanup: formatCampbell Barton
2022-09-29Sculpt: New Cavity Automasking ModeJoseph Eagar
Add new cavity automasking mode based on local mesh curvature. Cavity masking is a great way to quickly add detail in crevices and the like. It's meant to be used with the Paint brush in color attribute mode. It does work with other brushes but the results can be unpredictable. {F13131497} The old "dirty mask" operator has been replace with a new "mask from cavity" operator that shares the same code with cavity automasking. Differences from the sculpt-dev implementation: * It uses the word "cavity." When I first implemented this I wasn't aware this feature existed in other software (and other paint modes in Blender), and for reasons that escape me today I initially decided to call it a concave or concavity mask. * The cavity factor works a bit differently. It's no longer non-linear and functions as a simple scale around 0.5f. * Supports custom curves. * Supports blurring. Reviewed By: Julian Kaspar, Jeroen Bakker and Campbell Barton Differential Revision: https://developer.blender.org/D15122 Ref D15122
2022-09-28GPencil: Change property text for Fill Visual AidsAntonio Vazquez
2022-09-28GPencil: Fill Tool - Check if extensions collide with real strokesAntonio Vazquez
This commit is an improvement in the previous fill tool changes in order to improve how the extended strokes are managed. * Now, the algorithm checks if the extend cross a standard stroke, not only extend strokes. * Option to enable or disable the stroke cross checking because this can be slow in very complex scenes. * Added `D` key to toggle stroke cross option. * Option to use only collide strokes to be used as fill limit. If the option to use only collide strokes is enabled, the open extensions are in different color. * Status text now shows mode and the actual extend factor. This commits also contains a refactor of the loops to use arrays as much as possible. Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D16052
2022-09-23GPencil: Improve Fill Tool Extend linesAntonio Vazquez
* Improve how the extend lines collision is calculated. * Added `S` key to switch between modes. * Now extend factor does not disable visual aids (thi sis done with checkbox). * Reduce the use of linked list and now memory array is used. * Refactor Radius functions. * Fixed bug of Radius mode when object is rotated. * Cleanup code. Differential Revision: https://developer.blender.org/D16022
2022-09-17GPencil: Remove Leak SizeAntonio Vazquez
This value was used to close gaps, but now with the new system is not needed. Internally, still we need to keep a small leak size, but after doing a lot of test a value of 3 is perfect, so it's harcoded.
2022-09-17GPencil: Change prop text to `Closure Mode`Antonio Vazquez
2022-09-17GPencil: Rename Fill closure methodsAntonio Vazquez
The new names are: * Radius * Extend The mode Radius + Extend has been removed. Also, some code cleanup and format.
2022-09-17GPencil: Add more types of stroke extensions when fillingDave Pagurek
The motivation for this change: while working on an animation recently, I found that there are some gaps that won't close easily via stroke extension or leak size checking. In D14698, I attempted to address this by changing the algorithm of the raster-space flood fill. This patch attempts to address the same issue in vector space by adding two new cases where stroke extensions are added, as suggested by @frogstomp: # **Points of high curvature:** when the curvature at a point is high enough that it's hard to visually distinguish between it and an endpoint, add a stroke extension out along the normal (pointing in the opposite direction of the stroke's acceleration.) This addresses cases where technically the endpoint points up, but there's a sharp corner right below it that should extend to connect. # **Stroke endpoints within a radius**: when two endpoints are close together, regardless of the angle they make, connect them if they are within a radius. This addresses cases like where the two endpoints have effectively parallel tangents, so extensions won't close the gap. Reviewed By: antoniov, mendio, frogstomp Differential Revision: https://developer.blender.org/D14809
2022-09-14ViewLayer: Lazy sync of scene data.Monique Dewanchand
When a change happens which invalidates view layers the syncing will be postponed until the first usage. This will improve importing or adding many objects in a single operation/script. `BKE_view_layer_need_resync_tag` is used to tag the view layer to be out of sync. Before accessing `BKE_view_layer_active_base_get`, `BKE_view_layer_active_object_get`, `BKE_view_layer_active_collection` or `BKE_view_layer_object_bases` the caller should call `BKE_view_layer_synced_ensure`. Having two functions ensures that partial syncing could be added as smaller patches in the future. Tagging a view layer out of sync could be replaced with a partial sync. Eventually the number of full resyncs could be reduced. After all tagging has been replaced with partial syncs the ensure_sync could be phased out. This patch has been added to discuss the details and consequences of the current approach. For clarity the call to BKE_view_layer_ensure_sync is placed close to the getters. In the future this could be placed in more strategical places to reduce the number of calls or improve performance. Finding those strategical places isn't that clear. When multiple operations are grouped in a single script you might want to always check for resync. Some areas found that can be improved. This list isn't complete. These areas aren't addressed by this patch as these changes would be hard to detect to the reviewer. The idea is to add changes to these areas as a separate patch. It might be that the initial commit would reduce performance compared to master, but will be fixed by the additional patches. **Object duplication** During object duplication the syncing is temporarily disabled. With this patch this isn't useful as when disabled the view_layer is accessed to locate bases. This can be improved by first locating the source bases, then duplicate and sync and locate the new bases. Will be solved in a separate patch for clarity reasons ({D15886}). **Object add** `BKE_object_add` not only adds a new object, but also selects and activates the new base. This requires the view_layer to be resynced. Some callers reverse the selection and activation (See `get_new_constraint_target`). We should make the selection and activation optional. This would make it possible to add multiple objects without having to resync per object. **Postpone Activate Base** Setting the basact is done in many locations. They follow a rule as after an action find the base and set the basact. Finding the base could require a resync. The idea is to store in the view_layer the object which base will be set in the basact during the next sync, reducing the times resyncing needs to happen. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15885
2022-09-01Cleanup: Remove/replace View Layer macros.Monique Dewanchand
This patch is a cleanup required before refactoring the view layer syncing process {T73411}. * Remove FIRSTBASE. * Remove LASTBASE. * Remove BASACT. * Remove OBEDIT_FROM_WORKSPACE. * Replace OBACT with BKE_view_layer_active_object. * Replace OBEDIT_FROM_VIEW_LAYER with BKE_view_layer_edit_object. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15799
2022-08-31GPencil: Apply Brush Size to Outline thickness while drawingAntonio Vazquez
The new factor allows to apply the current brush size to the external stroke perimeter conversion done in draw mode.
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-29GPencil: New conversion to outline in draw modeAntonio Vazquez
This new option converts the stroke to outline perimeter as soon as is drawn. If no alternative material is set, the actual material is used. The algorithm is similar to the new operator in D15664 Reviewed By: pepeland Differential Revision: https://developer.blender.org/D15738
2022-08-26Cleanup: use matching function signatures for RNA callbacksCampbell Barton
Use matching int/float/boo types for RNA callbacks.
2022-06-30Curves: New tools for curves sculpt mode.Jacques Lucke
This commit contains various new features for curves sculpt mode that have been developed in parallel. * Selection: * Operator to select points/curves randomly. * Operator to select endpoints of curves. * Operator to grow/shrink an existing selection. * New Brushes: * Pinch: Moves points towards the brush center. * Smooth: Makes individual curves straight without changing the root or tip position. * Puff: Makes curves stand up, aligning them with the surface normal. * Density: Add or remove curves to achieve a certain density defined by a minimum distance value. * Slide: Move root points on the surface. Differential Revision: https://developer.blender.org/D15134
2022-06-23Cleanup: fix typo that deactivated clang-format in rna_brush.cJacques Lucke
2022-06-15UI: Implement icons for the curve sculpt tools brushesDalai Felinto
I'm using the tool icons for the brush themselves. Note: This includes a few brushes that are only defined in D15134. Those are simply the icons rendered with a world background of #282828.
2022-05-31Curves: Add soft selection in sculpt modeHans Goudey
This commit adds a float selection to curve control points or curves, a sculpt tool to paint the selection, and uses the selection influence in the existing sculpt brushes. The selection is the inverse of the "mask" from mesh sculpt mode currently. That change is described in more detail here: T97903 Since some sculpt tools are really "per curve" tools, they use the average point selection of all of their points. The delete brush considers a curve selected if any of its points have a non-zero selection. There is a new option to choose the selection domain, which affects how painting the selection works. You can also turn the selection off by clicking on the active domain. Sculpt brushes can be faster when the selection is small, because finding selected curves or points is generally faster than the existing brush intersection and distance checks. The main limitation currently is that we can't see the selection in the viewport by default. For now, to see the selection one has to add a simple material to the curves object as shown in the differential revision. And one has to switch to Material Preview in the 3d view. Differential Revision: https://developer.blender.org/D14934
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-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-11Curves: Adjust sculpt mode UI layoutsHans Goudey
This patch adjusts the UI layouts for the tool header and the tool properties in sculpt mode in a few ways. The goals are to better group related settings, keep fundamental settings easily accessible, fix the availability of some options, and make better use of space. 1. Remove ID template in tool header 2. Rename "Add Amount" to "Count" for add brush 3. Add "use pressure" toggles to radius and strength sliders 4. Move strength falloff to a popover 5. Move many "Add" brush settings to popover called "Curve Shape" 6. Move two "Grow/Shrink" options to a popover called "Scaling" 7. Don't display "Falloff" panel in properties when it has no effect See the differential revision for screenshots and more reasoning. Differential Revision: https://developer.blender.org/D14922
2022-05-10Curves: Interpolate point count in add brushHans Goudey
This commit adds an option to interpolate the number of control points in new curves based on the count in neighboring existing curves. The idea is to provide a more automatic default than manually controlling the number of points in a curve, so users don't have to think about the resolution quite as much. Internally, some utilities for creating new curves are extracted to a new header file. These can be used for the various nodes and operators that create new curves. The top-bar UI will be adjusted in a separate patch, probably moving all of the settings that affect the size and shape of the new curves into a popover. Differential Revision: https://developer.blender.org/D14877
2022-05-05Curves: control number of control points in new curvesJacques Lucke
Previously, the number of control points in a new curve was hardcoded. Differential Revision: https://developer.blender.org/D14857
2022-05-02GPencil: New Sculpt Auto masking optionsAntonio Vazquez
Now it's possible to use auto masking at 3 levels: * Stroke * Layer * Material The masking options can be combined and allows to limit the effect of the sculpt brush. Diff Revision: https://developer.blender.org/D14589
2022-04-26Curves: add "Curves" to brush namesJacques Lucke
Differential Revision: https://developer.blender.org/D14748
2022-04-22Reorder sculpt toolsRamil Roosileht
Changed tool order as proposed in [[ https://developer.blender.org/T97206 | T97206 ]] {F12987559} Reviewed By: JulienKaspar, jbakker Maniphest Tasks: T97206 Differential Revision: https://developer.blender.org/D14612
2022-04-21Curves: show sculpt tool settings in panelsJacques Lucke
Ref T97444. Differential Revision: https://developer.blender.org/D14700
2022-04-13Curves: remove Test1 brushJacques Lucke
This was one of multiple placeholder brushes to simplify development. Having it is not necessary anymore. It was a brush that could add new curves according to a specific density. This functionality will be brought back as a new brush later. Ref T97255.
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-05Curves: new Grow/Shrink brushJacques Lucke
This adds a new Grow/Shrink brush which is similar to the Length brush in the old hair system. * It's possible to switch between growing and shrinking by hold down ctrl and/or by changing the direction enum. * 3d brush is supported. * Different brush falloffs are supported. * Supports scaling curves uniformly or shrinking/extrapolating them. Extrapolation is linear only in this patch. * A minimum length settings helps to avoid creating zero-sized curves. Differential Revision: https://developer.blender.org/D14474
2022-03-25GPencil: Improve smooth operationHenrik Dick
This patch makes the grease pencil smooth operation symmetric. It also increases the performance a lot if strong smoothing is required. Additionally there is an option for the position smooth operation to keep the shape closer to the original for more iterations. Since the result differs from the previous algorithm, versioning is used to change the iterations and factor to match the old result. Differential Revision: http://developer.blender.org/D14325
2022-03-21Curves: new Add brushJacques Lucke
This adds a new Add brush for the new curves object type in sculpt mode. The brush is used to insert new curves (typically hair) on the surface object. Supported features: * Add single curve exactly at the cursor position when `Add Amount` is 1. * Front faces only. * Independent interpolate shape and interpolate length settings. * Smooth and flat shading affects curve shape interpolation. * Spherical and projection brush. This also adds the `surface_triangle_index` and `surface_triangle_coordinate` attributes. Those store information about what position on the surface each added curve is attached to: * `surface_triangle_index` (`int`): Index of the internal triangle that a curve is attached to. `-1` when the curve is not attached to the surface. * `surface_triangle_coordinate` (`float2`): First two numbers of a barycentric coordinate that reference a specific position within the triangle. Ref T96444. Differential Revision: https://developer.blender.org/D14340
2022-03-18Fix typo in smooth brush tooltipKévin Dietrich
2022-03-11Cleanup: use M_PI_2 and M_PI_4 where possibleHallam Roberts
The constant M_PI_4 is added to GLSL to ensure it works there too. Differential Revision: https://developer.blender.org/D14288
2022-03-09Curves: rename initial brushesJacques Lucke
The brushes that are still called "Test" still need to be changed until they can get their correct name. Ref T96259.
2022-03-08Curves: add initial comb, grow and shrink brushJacques Lucke
The exact behavior of the brushes is still being iterated on, but it helps having a base implementation that we can work upon. All of that is still hidden behind an experimental feature flag anyway. The brushes will get a name in the ui soon. Differential Revision: https://developer.blender.org/D14241
2022-03-02UI: Comments Misspellings of Vertex/VerticesNikhil Shringarpurey
Correct misspellings in code comments of "vertex" and "vertices". See D13932 for more details. Differential Revision: https://developer.blender.org/D13932 Reviewed by Harley Acheson