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
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-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-21Refactor: Do not keep a copy of depth buffer in RegionView3DGermano Cavalcante
The depth cache (located in `RegionView3D::depths`) is used for quick and simple occlusion testing in: - particle selection, - "Draw Curve" operator and - "Interactive Light Track to Cursor" operator, However, keeping a texture buffer in cache is not a recommended practice. For displays with high resolution like 8k this represents something around 132MB. Also, currently, each call to `ED_view3d_depth_override` invalidates the depth cache. So that depth is never reused in multiple calls from an operator (this was not the case in blender 2.79). This commit allows to create a depth cache and release it in the same operator. Thus, the buffer is kept in cache for a short time, freeing up space. No functional changes.
2021-06-09Fix T88998: GPencil not projecting to the most front surfaceGermano Cavalcante
It was projecting from the stroke position. The behavior has changed in {rB5400be9ffee2}.
2021-05-18Fix T88313: GPencil reproject operator projecting on the wrong surfaceGermano Cavalcante
`ray_start` must start at the position of the gpencil point.
2021-05-14GPencil: fix separate points/strokes freezing with empty selectionPhilipp Oeser
Code would still create an object (without setting up materials), code for removing unused material slots would then freeze. Now return/cancel early in case of empty selection. This came up in T88269 [which is still not fully fixed, transforming curve edit points clear their GP_STROKE_SELECT flag which now results in the early exit, should be looked at separately] Maniphest Tasks: T88269 Differential Revision: https://developer.blender.org/D11252
2021-03-30Cleanup/Refactor: Unify functions that redraw the depth bufferGermano Cavalcante
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and `ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`. This new function replaces `ED_view3d_autodist_init`. Also, since `ED_view3d_depth_update` depends on the render context, and changing the context is a slow operation, that function also was removed, and the depth buffer cached is now updated inside the new unified drawing function when the "bool update_cache" parameter is true. Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to `runtime.flag`. Differential revision: https://developer.blender.org/D10678
2021-03-24GPencil: New modules for Import and ExportAntonio Vazquez
This patch adds support to export and import grease pencil in several formats. Inlude: * Export SVG * Export PDF (always from camera view) * Import SVG The import and export only support solid colors and not gradients or textures. Requires libharu and pugixml. For importing SVG, the NanoSVG lib is used, but this does not require installation (just a .h file embedded in the project folder) Example of PDF export: https://youtu.be/BMm0KeMJsI4 Reviewed By: #grease_pencil, HooglyBoogly Maniphest Tasks: T83190, T79875, T83191, T83192 Differential Revision: https://developer.blender.org/D10482
2021-02-20Cleanup: Split grease pencil selection index functionsAntonio Vazquez
This makes the code more readable.
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-09GPencil: Fill tool refactor and Multiframe in Draw modeAntonio Vazquez
This commit is a refactor of the fill tool to solve several problems we had since the first version of the tool. Changes: * The filling speed has been improved for each step of the process with the optimization of each algorithm/function. * New `AutoFit` option to fill areas outside of the viewport. When enable, the total size of the frame is calculated to fit the filling area. * New support multiframe filling. Now it is possible to fill multiple similar frames in one go. * New `Stroke Extension` option to create temporary closing strokes. These strokes can be displayed and adjusted dynamically using wheel mouse or PageUp/Down keys. * Parameter `Resolution` now is named `Precision` and has been moved to topbar. * `Resolution` now has decimals and can be lower than 1 to allow quick filling in storyboarding workflows. Maximum value has been set as 5. * Parameter `Simplify` has been moved to Advanced panel. * Improved fill outline detection. In some cases, the outline penetrated the area to be filled with unexpected results. * Fixes some corner case bugs with infinite loops. As a result of this refactor, also these new functionalities has been added. * New support for multiframe in `Draw` mode. Any drawing in active frame is duplicated to all selected frame. * New multiframe display mode. Keyframes before or after of the active frame are displayed using onion colors. This can be disable using Onion overlay options.
2021-01-17GPencil: Fix Autojoin error using layer transformAntonio Vazquez
The target stroke bounding box was not checked properly and when using layer transform the error was noticeable, but really the error was before the layer transform commit.
2021-01-16GPencil: Cleanup - Rename ED_gpencil_stroke_color_use to ↵Antonio Vazquez
ED_gpencil_stroke_material_editable
2021-01-16GPencil: Add new parameteres to transform layersAntonio Vazquez
When using grease pencil for drawing Storyboards, it's very common to require a transform of the layers. This transform can be done using the offset modifier, but in some cases, the scene requires a lot of modifiers and makes the file hard to work. This new feature adds a transforms Location, Rotation and Scale at Layer level, and allows to transform the layer without using a modifier, keeping the scene more clean. {F9480695} This feature was suggested by @pepeland after receiving feedback from several artists. Also, done some code cleanup and rename some functions to get a better naming. Maniphest Tasks: T83660 Differential Revision: https://developer.blender.org/D9761
2021-01-04Cleanup: redundant code, minor inconsistenciesCampbell Barton
- Remove ternary operators when both values are the same. - Remove break after return. - Remove redundant NULL checks for code which handles those cases immediately beforehand.
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-11-21Merge branch 'blender-v2.91-release'Antonio Vazquez
2020-11-21GPencil: Fix unreported assert when use select Box in single point strokesAntonio Vazquez
The assert was when use segment selection mode.
2020-11-18GPencil: Automerge last drawn stroke with previous strokesAntonio Vazquez
This option joins any stroke with an end near the actual stroke. Now it is not limited to the last stroke, any stroke in the same layer for the actual frame can be joined. The join can join two strokes drawing a third stroke. If the end and the start of the result stroke are very small, the stroke is changed to be cyclic automatically. There is a limit distance to join the stroke, if the distance is greater than this value, the strokes are not joined. Actually, a constant, threshold distance is used, but we could expose as a parameter in the UI in the future. The tool can be used with freehand drawing or with primitives. Note: Great part of the patch is just a refactor of the old code to make it accessible and to keep code organized. Reviewed By: mendio Maniphest Tasks: T82377 Differential Revision: https://developer.blender.org/D9440
2020-11-18Cleanup: remove break after return statementsCampbell Barton
2020-11-16Cleanup: clang-tidyCampbell Barton
2020-11-16Cleanup: clang-formatCampbell Barton
2020-11-13GPencil: Merge GSoC curve edit modeFalk David
Differential Revision: https://developer.blender.org/D8660 This patch is the result of the GSoC 2020 "Editing Grease Pencil Strokes Using Curves" project. It adds a submode to greasepencil edit mode that allows for the transformation of greasepencil strokes using bezier curves. More information about the project can be found here: https://wiki.blender.org/wiki/User:Filedescriptor/GSoC_2020.
2020-11-06Cleanup: doxygen commentsCampbell Barton
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-10-21GPencil: Fix unreported problem with strokes bounding box that makes ↵Antonio Vazquez
impossible sculpt When the stroke was not flat, the bounding box projected could not be right and the strokes could not be painted or sculpted. Now, the 2D bounding box is calculated using the extremes of the 2D bounding box and not the original 3D min and max values.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-08-18Cleanup: GPUState: remove double GPU_blend callsClément Foucault
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPUState: Replace blend func separate by enumClément Foucault
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Cleanup: pass arrays const where possibleCampbell Barton
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-29GPencil: New Brush predefined modeAntonio Vazquez
it's good to have an option to ' pin' a mode to the brush, to use that mode always, independent of the current viewport selected mode. {F8723224} Reviewed By: pepeland Differential Revision: https://developer.blender.org/D8399 81a002
2020-07-18Cleanup: GPU: Encapsulate glViewport callsClément Foucault
2020-07-18Cleanup: GPU: Replace glBlendFunc by GPU equivalentClément Foucault
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-03Cleanup: Editors/GPencil, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/gpencil` module. No functional changes.
2020-06-29GPencil: Cleanup function names replace gp_ by gpencil_ prefix (cont)Antonio Vazquez
2020-06-29GPencil: Cleanup - Rename some functions from gp_ to gpencil_Antonio Vazquez
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-06-17Cleanup: doxy commentsCampbell Barton
2020-06-09GPencil: Keep original stroke when reprojectAntonio Vazquez
When reproject a stroke sometimes is good to keep the copy of the original stroke to create volume effects Related to T77639 {F8603513} Reviewed By: mendio, pepeland Maniphest Tasks: T77639 Differential Revision: https://developer.blender.org/D7963 50258
2020-06-05GPencil: Improve Vertex Paint in filled areasAntonio Vazquez
When use the Tint tool, it was very difficult to tint the filled areas if the strokes had very few points or the area was big. Differential Revision: https://developer.blender.org/D7936
2020-06-04Cleanup: remove window manager argument for paint cursor APICampbell Barton
This caused an additional argument when exiting object modes and many other low level functions which don't need to access context. This simplifies fixing T77073.
2020-05-15Merge branch 'blender-v2.83-release'Antonio Vazquez