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-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-30Transform Snap: nearest face snap mode, snapping options, refactoring.jon denning
This commit adds a new face nearest snapping mode, adds new snapping options, and (lightly) refactors code around snapping. The new face nearest snapping mode will snap transformed geometry to the nearest surface in world space. In contrast, the original face snapping mode uses projection (raycasting) to snap source to target geometry. Face snapping therefore only works with what is visible, while nearest face snapping can snap geometry to occluded parts of the scene. This new mode is critical for retopology work, where some of the target mesh might be occluded (ex: sliding an edge loop that wraps around the backside of target mesh). The nearest face snapping mode has two options: "Snap to Same Target" and "Face Nearest Steps". When the Snap to Same Object option is enabled, the selected source geometry will stay near the target that it is nearest before editing started, which prevents the source geometry from snapping to other targets. The Face Nearest Steps divides the overall transformation for each vertex into n smaller transformations, then applies those n transformations with surface snapping interlacing each step. This steps option handles transformations that cross U-shaped targets better. The new snapping options allow the artist to better control which target objects (objects to which the edited geometry is snapped) are considered when snapping. In particular, the only option for filtering target objects was a "Project onto Self", which allowed the currently edited mesh to be considered as a target. Now, the artist can choose any combination of the following to be considered as a target: the active object, any edited object that isn't active (see note below), any non- edited object. Additionally, the artist has another snapping option to exclude objects that are not selectable as potential targets. The Snapping Options dropdown has been lightly reorganized to allow for the additional options. Included in this patch: - Snap target selection is more controllable for artist with additional snapping options. - Renamed a few of the snap-related functions to better reflect what they actually do now. For example, `applySnapping` implies that this handles the snapping, while `applyProject` implies something entirely different is done there. However, better names would be `applySnappingAsGroup` and `applySnappingIndividual`, respectively, where `applySnappingIndividual` previously only does Face snapping. - Added an initial coordinate parameter to snapping functions so that the nearest target before transforming can be determined(for "Snap to Same Object"), and so the transformation can be broken into smaller steps (for "Face Nearest Steps"). - Separated the BVH Tree getter code from mesh/edit mesh to its own function to reduce code duplication. - Added icon for nearest face snapping. - The original "Project onto Self" was actually not correct! This option should be called "Project onto Active" instead, but that only matters when editing multiple meshes at the same time. This patch makes this change in the UI. Reviewed By: Campbell Barton, Germano Cavalcante Differential Revision: https://developer.blender.org/D14591
2022-06-06Refactor: Snap-related. Clarified attribute names and refactored #defines ↵jon denning
into enums The transformation snapping code contains a bunch of `#define`s, some ambiguously or incorrectly named attributes. This patch contains refactored code to improve this. This patch does (should) not change functionality of snapping. Clarified ambiguously / incorrectly named attributes. - "Target" is used to refer to the part of the source that is to be snapped (Active, Median, Center, Closest), but several other areas of Blender use the term "target" to refer to the thing being snapped to and "source" to refer to the thing getting snapped. Moreover, the implications of the previous terms do not match the descriptions. For example: `SCE_SNAP_TARGET_CENTER` does not snap the grabbed geometry to the center of the target, but instead "Snap transforamtion center onto target". - "Select" refers to the condition for an object to be a possible target for snapping. - `SCE_SNAP_MODE_FACE` is renamed to `SCE_SNAP_MODE_FACE_RAYCAST` to better describe its affect and to make way for other face snapping methods (ex: nearest). Refactored related `#define` into `enum`s. In particular, constants relating to... - `ToolSettings.snap_flag` are now in `enum eSnapFlag` - `ToolSettings.snap_mode` are now in `enum eSnapMode` - `ToolSettings.snap_source` (was `snap_target`) are now in `enum eSnapSourceSelect` - `ToolSettings.snap_flag` (`SCE_SNAP_NO_SELF`) and `TransSnap.target_select` are now in `enum eSnapTargetSelect` As the terms became more consistent and the constants were packed together into meaningful enumerations, some of the attribute names seemed ambiguous. For example, it is unclear whether `SnapObjectParams.snap_select` referred to the target or the source. This patch also adds a small amount of clarity. This patch also swaps out generic types (ex: `char`, `short`, `ushort`) and unclear hard coded numbers (ex: `0`) used with snap-related enumerations with the actual `enum`s and values. Note: I did leave myself some comments to follow-up with further refactoring. Specifically, using "target" and "source" consistently will mean the Python API will need to change (ex: `ToolSettings.snap_target` is not `ToolSettings.snap_source`). If the API is going to change, it would be good to make sure that the used terms are descriptive enough. For example, `bpy.ops.transform.translate` uses a `snap` argument to determine if snapping should be enabled while transforming. Perhaps `use_snap` might be an improvement that's more consistent with other conventions. This patch is (mostly) a subset of D14591, as suggested by @mano-wii. Task T69342 proposes to separate the `Absolute Grid Snap` option out from `Increment` snapping method into its own method. Also, there might be reason to create additional snapping methods or options. (Indeed, D14591 heads in this direction). This patch can work along with these suggestions, as this patch is trying to clarify the snapping code and to prompt more work in this area. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D15037
2022-06-04D15041: Sculpt: Elastic TransformPablo Dobarro
This implements transform modes for the transform tool and Elastic Transform. This mode uses the Kelvinlets from elastic deform to apply the transformation to the mesh, using the cursor radius to control the elasticity falloff. {F9269771} In order for this to work, the transform tool uses incremental mode when elastic transform is enabled. This allows to integrate the displacement of the Kelvinet in multiple steps. Review By: Sergey Sharbin & Daniel Bystedt & Julian Kaspar & Campbell Barton Differential Revision: https://developer.blender.org/D9653 Ref D15041
2022-05-15Fix T81715: Unprojected radius mode messes up sculpt texture radiusJoseph Eagar
We really need to fix how unprojected radius (scene unit) works. What happened is the paint code updates the brush's normal radius with the current unprojected pixel radius, which was then used by texture brush tiled mode. To fix this I just cached the pixel radius at stroke start in UnifiedPaintSettings->start_pixel_radius.
2022-04-21Curves: show sculpt tool settings in panelsJacques Lucke
Ref T97444. Differential Revision: https://developer.blender.org/D14700
2022-04-20Cleanup: remove unused curves toolsettingJacques Lucke
2022-04-15PBVH Pixel extractor.Jeroen Bakker
This patch contains an initial pixel extractor for PBVH and an initial paint brush implementation. PBVH is an accelleration structure blender uses internally to speed up 3d painting operations. At this moment it is extensively used by sculpt, vertex painting and weight painting. For the 3d texturing brush we will be using the PBVH for texture painting. Currently PBVH is organized to work on geometry (vertices, polygons and triangles). For texture painting this should be extended it to use pixels. {F12995467} Screen recording has been done on a Mac Mini with a 6 core 3.3 GHZ Intel processor. # Scope This patch only contains an extending uv seams to fix uv seams. This is not actually we want, but was easy to add to make the brush usable. Pixels are places in the PBVH_Leaf nodes. We want to introduce a special node for pixels, but that will be done in a separate patch to keep the code review small. This reduces the painting performance when using low and medium poly assets. In workbench textures aren't forced to be shown. For now use Material/Rendered view. # Rasterization process The rasterization process will generate the pixel information for a leaf node. In the future those leaf nodes will be split up into multiple leaf nodes to increase the performance when there isn't enough geometry. For this patch this was left out of scope. In order to do so every polygon should be uniquely assigned to a leaf node. For each leaf node for each polygon If polygon not assigned assign polygon to node. Polygons are to complicated to be used directly we have to split the polygons into triangles. For each leaf node for each polygon extract triangles from polygon. The list of triangles can be stored inside the leaf node. The list of polygons aren't needed anymore. Each triangle has: poly_index. vert_indices delta barycentric coordinate between x steps. Each triangle is rasterized in rows. Sequential pixels (in uv space) are stored in a single structure. image position barycentric coordinate of the first pixel number of pixels triangle index inside the leaf node. During the performed experiments we used a fairly simple rasterization process by finding the UV bounds of an triangle and calculate the barycentric coordinates per pixel inside the bounds. Even for complex models and huge images this process is normally finished within 0.5 second. It could be that we want to change this algorithm to reduce hickups when nodes are initialized during a stroke. Reviewed By: brecht Maniphest Tasks: T96710 Differential Revision: https://developer.blender.org/D14504
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-05Cleanup: use doxygen links to struct membersCampbell Barton
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-03-30Cleanup: spelling in commentsCampbell Barton
2022-03-29LibOverride: Add initial System Override flag.Bastien Montagne
This merely adds the flag, exposes it in RMA, and uses it in some of the most common 'is editable' checks (RNA, `BASE_EDITABLE` macro...). Next step: do_version and defining systemoverrides at creation. Ref: {T95707}.
2022-03-28Cleanup: Move scene.c to C++Hans Goudey
This is meant to allow using C++ data structures in this file as a performance improvement. Particularly `Vector` instead of `ListBase` for `duplilist`. This change builds and passes tests on all platforms on the buildbot.
2022-03-25ImBuf: Add support for WebP image formatAaron Carlisle
Currently only supports single image frames (no animation possible). If quality slider is set to 100 then lossless compression will be used, otherwise lossy compression is used. Gives about 35% reduction of filesize save when re-saving splash screens with lossless compression. Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus. Note, this is currently left disabled until we have WebP libs (see T95206) For testing precompiled libs can be downloaded from Google: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html Differential Revision: https://developer.blender.org/D1598
2022-03-23Color Management: support different settings for render and compositing outputBrecht Van Lommel
The Output Properties > Output panel now has a Color Management subpanel to override scene settings. When set to Override instead of Follow Scene, there are settings to: * For OpenEXR, choose a (linear) colorspace for RGBA passes * For other file formats, use different display/view/look/exposure/gamma These settings affect animation render output, image save of renders and the compositor file output node. Additionally, the image save operator and compositor file output nodes also support overriding color management. Includes some layout changes to the relevant panels to accomdate the new settings and to improve consistency. Ideally subpanels would be used to better organize these settings, however nodes and operators don't currently support creating subpanels. Differential Revision: https://developer.blender.org/D14402
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-21Cleanup: add image_format.cc for functions related to ImageFormatDataBrecht Van Lommel
Also fixes missing code to read/write/free/copy color management settings in various places. This can't be set through the UI currently, but still should be handled consistently.
2022-03-11Transform/UI: individualize the option to use snap per editor typeGermano Cavalcante
`3DView`'s `use_snap` option has little or nothing to do with using snapping in `UV`, `Nodes` or `Sequencer`. So there are no real advantages to keeping these options in sync. Therefore, individualize the option to use snap for each "spacetype". Reviewed By: brecht Differential Revision: https://developer.blender.org/D13310
2022-03-02Curves: add brush to add curves on surfaceJacques Lucke
This adds a prototype for the first brush that can add new curves by painting on a surface. Note that this can only be used when the curves object has a surface object set in the properties panel. The brush can take minimum distance into account. This allows distributing curves with a somewhat consistent density. Differential Revision: https://developer.blender.org/D14207
2022-02-18Merge branch 'blender-v3.1-release'Sebastian Parborg
2022-02-18VSE: Refactor our code to be compatible with ffmpeg 5.0Sebastian Parborg
In ffmpeg 5.0, several variables were made const to try to prevent bad API usage. Removed some dead code that wasn't used anymore as well. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D14063
2022-02-18Curves: initial brush system integration for curves sculpt modeJacques Lucke
This adds the boilerplate code that is necessary to use the tool/brush/paint systems in the new sculpt curves mode. Two temporary dummy tools are part of this patch. They do nothing and only serve to test the boilerplate. When the first actual tool is added, those dummy tools will be removed. Differential Revision: https://developer.blender.org/D14117
2022-02-17Cleanup: Replace direct `id.lib` pointer checks with `ID_IS_LINKED` macro ↵Bastien Montagne
usages.
2022-02-16UV: move sticky selection from image space into tool settingsCampbell Barton
Having this setting stored in the image space caused low level selection logic to have to pass around the image space (which could be NULL in some cases). Use the tool-settings instead since there doesn't seem to be much/any advantage in having this setting per-space.
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-17Baking: new method to generate margin, based on adjacent facesMartijn Versteegh
This significantly reduces discontinuities on UV seams, by giving a better match of the texture filtered colors on both sides of the seam. It works by using pixels from adjacent faces across the UV seam. This new option is called "Adjacent Faces" and is the default. The old option is called "Extend", and extends border pixels outwards. Differential Revision: https://developer.blender.org/D13303
2022-01-06Cleanup: spelling in commentsCampbell Barton
2021-12-20Docs: use doxygen formatting for DNACampbell Barton
Differentiate doc-strings from title/section text. Also use explicit doxygen references to struct members so it's not ambiguous which member is being referenced. Note that these changes aren't complete (some files weren't touched).
2021-11-29Refactor BKE_bpath module.Bastien Montagne
The main goal of this refactor is to make BPath module use `IDTypeInfo`, and move each ID-specific part of the `foreach_path` looper into their own IDTypeInfo struct, using a new `foreach_path` callback. Additionally, following improvements/cleanups are included: * Attempt to get better, more consistent namings. ** In particular, move from `path_visitor` to more standard `foreach_path`. * Update and extend documentation. ** API doc was moved to header, according to recent discussions on this topic. * Remove `BKE_bpath_relocate_visitor` from API, this is specific callback that belongs in `lib_id.c` user code. NOTE: This commit is expected to be 100% non-behavioral-change. This implies that several potential further changes were only noted as comments (like using a more generic solution for `lib_id_library_local_paths`, addressing inconsistencies like path of packed libraries always being skipped, regardless of the `BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value, etc.). NOTE: basic unittests were added to master already in rBdcc500e5a265093bc9cc. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13381
2021-11-12Cleanup: unify snap modes to geometry in a single flagGermano Cavalcante
This combination was being repeated in some places.
2021-10-18Cleanup: spelling in commentsCampbell Barton
2021-09-29UV Editor: Grid and snapping improvementsSiddhartha Jejurkar
Implements T89789, T89792, custom grid (described as dynamic grid in T78389) and UV grid snapping (T78391) Replaces the default UV editor grid with 2 new types of grid : * Custom grid: Allows the user to create an NxN grid, where the value of N is specified by the user. * Subdividing grid: Subdivides the UV editor grid when the user zooms in the viewport and vice versa when zooming out. UV snapping improvements : * Increment snapping: Increment values for snapping are calculated based on which grid type is being used in the UV editor (subdividing or custom). In general the increment value is equal to the distance between 2 visible grid lines. * Absolute grid snap: New toggle added to increment snapping option in the UV editor, allows UV grid snapping during translation. Reviewed By: campbellbarton Ref D12684
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-21VSE: Image transform toolsRichard Antalik
Add tools for image manipulation in sequencer preview region. This includes: - Translate, rotate and resize operators, tools and gizmos - Origin for image transformation - Median point and individual origins pivot modes - Select and Box select operator works in preview - Image overlay drawing ref T90156 Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12105
2021-08-27VSE: Transform overwrite modeRichard Antalik
Add mode to overwrite strips on overlap instead of resolving overlap. When overlap is created, 3 things can happen: - On partial overlap, handles of overlapped strip are moved - On complete overlap with smaller strip, overlapped strip is split - On complete overlap with larger strip, overlapped strip is removed This mode can be enabled in header. Reviewed By: fsiddi, mano-wii Differential Revision: https://developer.blender.org/D11805
2021-07-29Render: remove unused Blender Internal view layer settingsBrecht Van Lommel
These should have been removed earlier but were forgotten.
2021-07-27Cleanup: comment spelling & punctuationYimingWu
2021-07-27Anotations: Fix a several issues with stroke placementAaron Carlisle
Previously, this option was not exposed in the UI, only for the clip editor. There were also multiple rna properties that did the same thing for each of the 2D editors. There was also an issue where the property enum items were the same as the 3d view which didnt make much sense. Reviewed By: antoniov Differential Revision: https://developer.blender.org/D12027
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-07VSE: Use snapping settings for scrubbingRichard Antalik
Use "Snap Playhead to Strips" option to enable playhead snapping. Change behavior of CTRL key to invert snapping similar to transform operator. Currently this option is disabled by default. It makes editing quite unpleasant for me personally, but ideally I should gather feedback from more users. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D11745
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-01Cleanup: rename playhead to current-frameCampbell Barton
2021-06-29VSE: Improved SnappingRichard Antalik
Change snapping behavior to snap strip edges when they are close to snap point. Default behavior is, that each transformed strip is snapped to any other strip. Implement snapping controls in sequencer tool settings. These controls include: - Snapping on/off - Ability to snap to playhead and strip hold offset points - Filter snap points by excluding sound or muted strips - Control snapping distance Snapping controls are placed in timeline header similar to 3D viewport Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11646
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-25Cycles: add view layer option to disable motion blur, in the Filter panelBrecht Van Lommel
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-05-12Cleanup: rename 'rt' to '_pad#' in DNA structsCampbell Barton
2021-02-19GPencil: Interpolate Tools refactorAntonio Vazquez
Following with the changes included to interpolate strokes of different number of points, a full review has been done in the interpolation tools. * Interpolate now is a tool and not an operator. It was not logic to have this tool as a button. * Interpolate tool parameters have been moved to topbar. * Interpolate popover has been removed from topbar and interpolate `Sequence` operator has been moved to grease pencil menu. * Interpolate Sequence now include a Redo panel. * Interpolate tool now allows to select the strokes by pairs. This allows to interpolate any stroke with any stroke and not as before that it was only possible by drawing order. If no stroke is selected, the interpolation is done as before. * Now is possible interpolate again if a previous keyframe exist. Before, it was impossible to interpolate two times in same frame and this made impossible to do the interpolation by groups of frames. * New automatic option to `Flip strokes` if the stroke and end are not in the right position. Also the flip can be set manually for corner cases. * Cleanup of menus related to interpolate. * Fixed some bugs and removed parameters from scene because now all are tool or operator contained. * Some code cleanup and function renames. This commit also includes the some codebase to future implementation of the concept `Vertex Active` that now does not exist in grease pencil.
2021-02-14Cleanup: spellingCampbell Barton