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-04-19GPencil: Add Layer Mask ordering buttonsAntonio Vazquez
Now the list of masks can be ordered as is done in Layers. This can be used to organize list and in the future refquired for new masking options.
2021-04-19Cleanup: use 'wmOperator.ptr' in draw functionsCampbell Barton
Draw functions used RNA_pointer_create to create the pointer, however this already exists in the operator.
2021-04-19GPencil: Add multiframe support to Reproject operatorAntonio Vazquez
Before only active frame was supported Related to T87425
2021-04-19Fix creating operator properties without an owner_idCampbell Barton
Any dynamic enum access would not use the callback. Always set the owner_id to avoid this causing problems. Oversight in 919558854d624f5db40acfa9f5674ac8c94873b6
2021-04-17Fix T87321: GPencil Arrange strokes not consistent with industry standardsAntonio Vazquez
Now if one stroke in the extremes of the stack is selected, other strokes are moved. Reviewed By: pepeland, Dantti Maniphest Tasks: T87321 Differential Revision: https://developer.blender.org/D10997
2021-04-13Fix T87400: GPencil change Select Alternate defaultsAntonio Vazquez
Now, the Unselect Ends is disabled by default.
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-04-11Cleanup: use ELEM, STREQ macrosCampbell Barton
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-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-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-29Fix T86975: GPencil interpolate wrong stroke orderAntonio Vazquez
When interpolate, the stroke order was not correct because it was assumed the GHash iter would return the items in the same order of insertion, but this is false. Now, a list is used to keep the order of the strokes and the Hash is used to get the relationship between strokes as before.
2021-03-29GPencil Cleanup: Remove legacy key to cancel drawingFalk David
The 'E' key was set to cancel drawing. This was a change in the old grease pencil system and is no longer used.
2021-03-27Cleanup: Apply clang formatAntonio Vazquez
2021-03-27Fix T86967 : Artifacts when tracing image to Grease PencilMarcelo Demian Gómez
Tracing images to grease pencil objects creates sometimes artifacts, as seen, for example, when tracing the attached image. {F9910821} I have found the same behavior both in the 2.92 release and in the current 2.93 master. The artifacts are caused by a variable that's not initialized or updated when finding a point tagged as POTRACE_CORNER. This patch solves this issue. Maniphest Tasks: T86967 Differential Revision: https://developer.blender.org/D10832
2021-03-27Fix T86975: GPencil interpolate sequence error when strokes are not selectedAntonio Vazquez
If the selection order is not used, need to put the strokes in inverse order because the Hash Iter returns the strokes in inverse order.
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-03-23Cleanup: de-duplicate gpencil logic to ensure materialsCampbell Barton
- Rename: `BKE_gpencil_object_material_get_index_name`, to `BKE_gpencil_object_material_index_get_by_name` Matching `BKE_gpencil_layer_get_by_name`. - Move logic to ensure named materials into a new function: `BKE_gpencil_object_material_ensure_by_name`
2021-03-22GPencil: Hide Interpolate Only Selected in Draw ModeAntonio Vazquez
This option is only valid in Edit mode. Also changed the space between options to improve UI. Reviewed by: @mendio
2021-03-21Cleanup: remove redundant NULL checksCampbell Barton
2021-03-20Fix T86745: trace sequence keyframe offsetFalk David
The offset when creating the keyframes was set to `frame_target + i` but `i` starts iterating from the current frame number. The fix uses just `i` as the frame number. Reviewed By: antoniov Maniphest Tasks: T86745 Differential Revision: https://developer.blender.org/D10772
2021-03-18Cleanup: Remove unused variable in gpencil_add_lineart.cSebastian Parborg
2021-03-18Fix T86692: Start Line Art GP objects on frame 0YimingWu
If playback starts before the first GP frame, we will get "ghost" strokes.
2021-03-16Grease Pencil: Add LineArt modifierYimingWu
This adds the LineArt grease pencil modifier. It takes objects or collections as input and generates various grease pencil lines from these objects with the help of the active scene camera. For example it can generate contour lines, intersection lines and crease lines to name a few. This is really useful as artists can then use 3D meshes to automatically generate grease pencil lines for characters, enviroments or other visualization purposes. These lines can then be baked and edited as regular grease pencil lines. Reviewed By: Sebastian Parborg, Antonio Vazquez, Matias Mendiola Differential Revision: http://developer.blender.org/D8758
2021-03-12GPencil: Interpolate can use all keyframe types except breakdownAntonio Vazquez
Before only it was only possible interpolate frames of `Keyframe` type. Now all types except `Breakdown` can be used. `Breakdown` cannot be used because it would be impossible interpolate two times because the extremes of the interpolation would change and the clean operator would not work.
2021-03-12Cleanup: redundant flag checkCampbell Barton
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-03-11GPencil: Fix unreported Fill fails if the stroke was taggedAntonio Vazquez
In some situations the strokes could be tagged before filling, so it's necessary to reset before.
2021-03-08Cleanup: use ofs instead of offs as an abbreviation for offsetCampbell Barton
Used for local structs/variables, since `ofs` is by far the most widely used abbreviation.
2021-03-05Cleanup: Use boolean in WM_cursor_waitAntonio Vazquez
2021-03-05Cleanup: rename evt to eventCampbell Barton
Following naming convention of most operators.
2021-03-04GPencil: Implement Autokey button for Draw/Edit and Sculpt modeAntonio Vazquez
Now, if the Autokey is not enabled, a new frame is not created and it is used the last active one. If no active frame, a message is displayed and the operation is canceled. This is a common request for 2D artists. Also, grease pencil was not working as Blender does in other areas. Reviewed By: pepeland Differential Revision: https://developer.blender.org/D10557
2021-03-04Cleanup: use non-zero comparisons for event modifiersCampbell Barton
Use event modifier checks that follow most of Blender's code.
2021-03-04Cleanup: number literalsCampbell Barton
2021-03-02UI: Clean up labels and descriptions: "Draw" to "Display"William Reynish
In Blender, we used to use the term 'draw' to refer to information displayed to the user. For version 2.80, it was decided to change these instances to 'display' instead. This was to avoid the ambiguity between end-user drawing tools and display options. From the Oxford English Dictionary: - Draw: produce (a picture or diagram) by making lines and marks on paper with a pencil, pen, etc. - Display: show (data or an image) on a computer, television, or other screen. Therefore, we should use draw when referring to drawing tools for making marks, but use display when referring to information shown/displayed to the user. From a user POV, the computer displays certain information, whereas the user draws a mark. Apparently this change was not implemented consistently, so this patch changes all remaining relevant instances of "draw". Differential Revision: https://developer.blender.org/D10551
2021-03-01Cleanup: move some drawing code into ed_draw.cChristoph Lendenfeld
Move some drawing code from `area.c` and `ed_util.c` into `ed_draw.c`. This is to support the new generic slider that wil be used in T81785. No functional changes. Reviewed By: #animation_rigging, #user_interface, Severin, sybren Maniphest Tasks: T81785 Differential Revision: https://developer.blender.org/D9313
2021-02-27Fix T85987: Selection when GP is parentedFalk David
When a GP object was parented to e.g. a bone, box selection as well as point selection were broken in that the selection from the user would not correlate with what was actually being selected. The issue was that box and point selection did not use the active evaluated stroke data. The fix uses the correct data. Reviewed By: antoniov Maniphest Tasks: T85987 Differential Revision: https://developer.blender.org/D10555
2021-02-26GPencil: Cancel Fill if the filled area is not closedAntonio Vazquez
Fill only if it never comes in contact with an edge. It is better not to fill than to fill the entire area, as this is confusing for the artist. Differential Revision: https://developer.blender.org/D10536
2021-02-24Cleanup: Clang tidy else after returnHans Goudey
2021-02-24Cleanup: Simplify vector direction comparisonAntonio Vazquez
Multiply the two number together. If the sign of the result is positive, then the sign was the same. If the sign of the result is negative, then the signs were different.
2021-02-24Cleanup: Fix commentAntonio Vazquez
2021-02-24GPencil: Improve Interpolate AutoFlip algorithm IIAntonio Vazquez
Improved the calculation of the distances and changed the variable names to make it more readable. Still, there are some corner cases that could be not handled properly, but we keep as is to test more real drawings to analyze if the small number of corner cases needs to be fixed or not.
2021-02-24GPencil: Fix typo error in previous commitAntonio Vazquez
2021-02-24GPencil: Improve Flip algorithm for InterpolateAntonio Vazquez
If the lines cross, but the angle is very sharp, check the distance between the extremes.
2021-02-22Fix T85549: GPencil draw tool offset when UI scale is not 1Antonio Vazquez
There was a mistake in the variables saved and when resolution of the UI was not 1.0, the viewport was offset.
2021-02-20Cleanup: Split grease pencil selection index functionsAntonio Vazquez
This makes the code more readable.
2021-02-20Cleanup: reference near duplicate enum definitionsCampbell 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-17Cleanup: Abbreviate enums with 'UNSIGNED_' in the nameGermano Cavalcante
2021-02-16Cleanup: Compile node_draw.c with C++Hans Goudey
This will allow using C++ data structures to draw node error messages. This required removing a forward declared enum for grease pencil undo. Compiles with clang tidy.