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-06-02GPencil: New operator to Normalize strokesAntonio Vazquez
Sometimes is required to reset the thickness or the opacity of the strokes. Actually this was done using a modifier, but this operators solves this. Reviewed By: mendio, filedescriptor Maniphest Tasks: T87427 Differential Revision: https://developer.blender.org/D11453
2021-05-14Merge branch 'blender-v2.93-release'Philipp Oeser
Conflicts: source/blender/editors/object/object_add.c
2021-05-14GPencil: Refactor Append operatorsAntonio Vazquez
Now the operators work like other areas of Blender using the list of selected objects. Also, the name has been changed to: ```Layers: - Copy Layer to Selected - Copy All Layers to Selected Materials: - Copy Material to Selected - Copy All Materials to Selected``` Reviewed By: mendio, pablovazquez, pepeland Differential Revision: https://developer.blender.org/D11216
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-04-23GPencil: Fix unreported reproject errorAntonio Vazquez
This bug was introduced in e1acefd45e23
2021-04-23GPencil: Add Multiframe support to Move to LayerAntonio Vazquez
Reviewed By: mendio Maniphest Tasks: T87426 Differential Revision: https://developer.blender.org/D11013
2021-04-19GPencil: Add multiframe support to Reproject operatorAntonio Vazquez
Before only active frame was supported Related to T87425
2021-04-11Fix T87157: GPencil subdivide last segmentFalk David
Previously it was not possible to subdivide the last segment of a cyclic stroke. The fix makes sure that the correct number of new points is calculated correctly and adds the new points to the last segment. Reviewed By: antoniov Maniphest Tasks: T87157 Differential Revision: https://developer.blender.org/D10902
2021-03-31Fix T87082: Smooth thickness not workingFalk David
When using the smooth operator, the thickness would not be smoothed on the first iteration. This was becasue the inner loop was set to run `r * 20` times but `r` starts at 0. The fix makes sure that "Smooth Thickness" works on the first iteration by using a fixed value of `20` as the loop limit. This makes sure that for every iteration, we run the smoothing of the thickness 20 more times. Reviewed By: antoniov Maniphest Tasks: T87082 Differential Revision: https://developer.blender.org/D10867
2021-03-30Fix T87058: GPencil Cutter delete all strokes if they are selected and the ↵Antonio Vazquez
layer is locked The problem was produced because the strokes were selected, but the loop to clear this flag before applying cutter was using unlocked layers only, and the protected layer flag was not reset. Now, the flag is reset for all layers, locked and unlocked.
2021-03-11UI: Avoid unnecessary redraws of unrelated editors on space changesJulian Eisel
When adding a notifier, `reference` data can be passed. The notifier system uses this to filter out listeners, for example if data of a scene changes, windows showing a different scene won't get the notifiers sent to their listeners. For the `NC_SPACE` notifiers, a number of places also passed the space as `reference`, but that wasn't used at all. The notifier would still be sent to all listeners in all windows (and the listeners didn't use it either). Causing some unnecessary updates (e.g. see ed2c4825d3e2344). With this commit, passing a space will make sure the notifier is only sent to that exact space. Some code seems to already have expected that to be the case. However there were some cases that passed the space as `reference` without reason, which would break with this commit (meaning they wouldn't redraw or update correctly). Corrected these so they don't pass the space anymore.
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-14Cleanup: spellingCampbell Barton
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-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
2020-12-24Cleanup: Fix capitalization in various UI stringsYevgeny Makarov
Approximately 195 changes of capitalization to conform to MLA title style. UI labels and property names should use MLA title case, while descriptions should be capitalized like regular prose, generally with only the start of a sentence capitalized. Differential Revision: https://developer.blender.org/D9922
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-12-07UI: Fix mistakes in UI messages.Bastien Montagne
2020-12-03GPencil: Add Vertex Paint operators to Paint menuAntonio Vazquez
These operators existed since 2.83, but the menu was hidden by error. Also the operators have been cleanup and make multiframe compatible. Reviewed By: mendio Differential Revision: https://developer.blender.org/D9671
2020-11-30GPencil: New operator to reset Vertex ColorsAntonio Vazquez
This operators reset the vertex color information of the strokes. If nothing is selected, all strokes are reset. If any is selected, only selected strokes are reset. Also added a new menu Paint in Vertex Color mode. Differential Revision: https://developer.blender.org/D9647
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-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: use ELEM macroCampbell Barton
2020-11-02Fix T77819: Snap Incremental does not match grid in all casesGermano Cavalcante
The behavior of the incremental snap did not take into account the relative dimensions of the window, which resulted in a different behavior if the area height was greater than the width.
2020-10-31GPencil: Change maximum limit of Join strokeAntonio Vazquez
Also, clarify comments.
2020-10-30GPencil: Fix compiler warningsAntonio Vazquez
These warnings were not vivible in MSVSC
2020-10-29GPencil: Improve join operatorAntonio Vazquez
Now the strokes join the points near, not always end with start. Differential Revision: https://developer.blender.org/D9359
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-22GPencil: Add new parameter to set caps in CutterAntonio Vazquez
The new parameter allows to define if after cutting the stroke the cap of the cut side will be set as flat. Before, the cap shape of the cut side always was equal to the original stroke, and in some situations, the rounded cap was visible. Note: If the angle of the join is very extreme, it's still possible to view some sections of the cut stroke.,
2020-10-20Cleanup: use BLI_listbase_is_single instead of countingCampbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-26Fix T81205: Grease pencil material slots don't auto-erase void slots above ↵Antonio Vazquez
the first material
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-03Fix T63125: Gpencil: bones cannot be selected in weightpaint modePhilipp Oeser
Some underlying functionality was not ready for greasepencil: - BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist) - BKE_modifiers_is_deformed_by_armature - checks in drawing code - checks in (pose) selection code A couple of changes to make this work: - `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`) - `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) -- (now use new `OB_MODE_ALL_WEIGHT_PAINT`) - `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint` This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode) Reviewed By: campbellbarton Maniphest Tasks: T63125 Differential Revision: https://developer.blender.org/D8483
2020-08-18Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframeJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8613
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-01Cleanup: spellingCampbell Barton
2020-07-30Merge branch 'blender-v2.90-release'Philipp Oeser
2020-07-30Fix usercount not decrementing in `gpencil_stroke_separate_exec`Philipp Oeser
This is part of T79273 where separating a stroke would result in multiuser gpencil data for the original object. Real underlying issue seems to be that gpencil multiuser objects (also the ones created by Alt+D duplicating) have a problem evaluating modifiers correctly [this will need further investigation]. Not sure if this is a limitation of D5470? This patch only corrects the usercount on separating [which already fixes the scenario reported because singleuser gpencil modifiers work correctly]. Note: we could have also called `ED_object_add_duplicate` with the `USER_DUP_GPENCIL` dupflag -- that would have taken care of the usercount --, but then the whole following logic in `gpencil_stroke_separate_exec` would need to change from **adding** layers/frames/strokes to **removing** these. Part of T79273 Maniphest Tasks: T79273 Differential Revision: https://developer.blender.org/D8419
2020-07-29GPencil: Consider extrude point as lastAntonio Vazquez
Before, when extrude a point, the extruded point is considered as the first point of the stroke, but this was not logic. Now, the extrude point is considered as last. Related to T79313
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_ prefixAntonio Vazquez
2020-06-29GPencil: Cleanup - Rename some functions from gp_ to gpencil_Antonio Vazquez
2020-06-23Transform: default to median center instead of boundsCampbell Barton
When neither bounds or median is selected, snapping the cursor to the selection was using bounds which often doesn't give useful results. Resolves T78135
2020-06-16Cleanup: use explicit enum type for duplicate option of `BKE_object_duplicate`Bastien Montagne
Using enum type itself in implementations, and uint in headers (as using enums types in headers is a pain when enum are not defined and used in a single same header file...).
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-05-30Merge branch 'blender-v2.83-release'Antonio Vazquez
2020-05-30GPencil: Fix unreported wrong Sculpt brushes initialization in TemplatesAntonio Vazquez
The Sculpt brushes were not properly initialized when use 2D template or other templates. Also, using the default template (not factory settings) could be situations where the brushes were not updated. This problem was introduced when some versioning code was removed in order to avoid duplicated brush creation.