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
2020-06-17GPencil: Fix unreported Vertex Opacity Overlay not workingAntonio Vazquez
This values was not working because was removed by error in refactor. Reviewed By: mendio, fclem Differential Revision: https://developer.blender.org/D8061
2020-06-03Fix T77156: GPencil view layer filter by layer not workingAntonio Vazquez
This was removed by error during the refactor done in 2.83. Differential Revision: https://developer.blender.org/D7909 Reviewers: @fclem
2020-03-21GPencil: Fade to Viewport colorAntonio Vazquez
Actually, the fade objects always fade to Black color, but this is not a good solution. This patch fade the object to the viewport color. Differential Revision: https://developer.blender.org/D7206
2020-03-14Cleanup: sort file lists & struct declatationsCampbell Barton
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-02-15Cleanup: remove various unused definesCampbell Barton
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2019-12-03Fix T72134: Adaptive UVs does not affect strokes that are already drawnAntonio Vazquez
Now when change the setting the strokes are recalculated. To do this, it was necessary to move the UV recalc to BKE module in order to share with Draw Engine. If the recalc it was done in draw engine, the factor was only calculated for evaluated version and there was a problem when draw a new sytroke. Now, the RNA parameter recalc the original datablock instead of tag for be calculated in Draw Engine.
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-10-16GPencil: Fix unreported problem when use Onion Skin in several windowsAntonio Vazquez
The onion skin was nos displayed in secondary screens when disable the Onion switch or the Overlay in the main window. Added a check to verify if the main overlay and onion switches are enabled in any screen in order to generate the cache data. This is required to generate the onion skin and limit the times the cache is updated because the cache is generated only in the first screen and if the first screen has the onion disabled the cache for onion skin is not generated. The loop adds time, but always is faster than regenerate the cache all the times. Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D6049
2019-10-02Fix T70399: Grease Pencil Canvas Grid Overlay Broken after DRW refactorAntonio Vazquez
Now the grid matrix is calculated when the shading group is created. Also, the grid pass is only created when needed and reduce memory usage when the scene is not using grease pencil objects. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5966
2019-09-18GPencil: Create blank texture only once by engineAntonio Vazquez
This texture is used for missing textures as replace. Differential Revision: https://developer.blender.org/D5845
2019-09-17DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-14Revert "DRW: Refactor to support draw call batching"Clément Foucault
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
2019-09-13DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-09GPencil: Fade layer using background colorAntonio Vazquez
Now the fade layer uses the same logic used to fade objects and also is available in all modes. Reviewers: mendio, pepeland Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D5707
2019-08-25GPencil: Show edit points in Sculpt only if mask is enabledAntonio Vazquez
If the masks are disabled, the edit points must not visible.
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-24Fix T66924 : Move GPencil Modifiers evaluation to DepsgraphAntonio Vazquez
Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place. This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes. Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data. As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5470
2019-07-06Fix T62101: GPencil: selection order is wrongAntonioya
Following the advices of @Germano Cavalcante (mano-wii) , I have exposed as a workaround the free function to be called from draw manager for selection. Now, the free function is not called for selection inside gpencil draw_scene, but it's called from draw_manager.c. The real fix would be create a new Scene_finish callback in draw manager, but as the release of 2.80 is almost here, we fix this with a workaround that must be removed when new callback is in place. Differential Revision: http://developer.blender.org/D5193
2019-06-28GPencil: Rename "Clamp Layer" to "Mask Layer"Antonioya
The old name was not meaning what this option does. Dtected while writting the manual.
2019-06-27Cleanup: GPencil remove DRW_ prefix for internal functions.Antonioya
The prefix DRW_ must be used only for modules inside Draw Manager and not in the Engines.
2019-06-26DrawManager: Sanatize default_view resetJeroen Bakker
Grease Pencil already reset the default view so the draw_manager wouldn't assert. During multi view rendering the same assert still happened. This patch will reset the default view when starting to render a new view. Reviewers: fclem Differential Revision: https://developer.blender.org/D5137
2019-06-26Fix T65958: GPencil glitches in line strokes with alphaAntonioya
Following @fclem comments, I have implemented the use of Stencil for Solid line strokes. For Dots, Boxes and Lines with texture, the stencil is not activated because "kill" some artistic effects. We have done test in greasepencil-object branch and all it's working as expected and the FPS are equal, so the stencil hasn't any appreciable impact in the drawing time. The Stencil is used in groups of 255 and the passes are done in the same way. If the stencil is not use for the type of stroke (Dot/Box/Texture), the drawing is grouped as much as possible to reduce GPU overhead and limit the times the stencil bit must be cleared. For doing this patch I had to add 2 new functions for reading private data to Draw manager. We decided add these function as a temporary solution while the Draw Manager implements the option to clear the stencil by groups. When this option will be implemented, these functions must be removed. Thanks to Clément for his help and support. It's always a pleasure working with him. Review by: @fclem Testers: @mendio @pepeland See D5126 for more details
2019-06-23Cleanup: unused argsCampbell Barton
2019-06-22Fix T65955: GPencil: drawing shapes on surface causes intense viewport ↵Antonioya
flickering There were some problems in the engine because the data was saved inside e_data struct, but this struct is reset sometimes and the background texture is not valid. Now, the data has been moved to stl->g_data and all creation and free has been moved to use stl->g_data. This fix also some small memory leak for the Buffer GPUBatch data. The background texture has been moved to texture list because must be available all the time. When is not drawing, the texture is removed to safe memory. Also, if the mode is painting and the texture is not ready because it was removed by Draw Manager, the texture is reloaded with the background image again. This ensure the background image is always visible when painting. Also I have used this patch to reduce the size of texture used for background to 16F instead of 32F and the blank texture to 1x1 pixels instead of 16x16. Reviewed by: @fclem See D5115 for more details
2019-06-13GPencil: Remove blend_opacity from shaderAntonioya
The opacity was already used and using it in the shader only duplicate the blend.
2019-05-31GPencil: Cleanup some commentsAntonio Vazquez
2019-05-30GPencil: Remove uneeded storage->unit_matrixClément Foucault
When passing NULL to DRW_shgroup_call(), ModelMatrix is assumed to be unitmat.
2019-05-29GPencil: Cleanup - Remove storage Grid matrix and replace with local variableAntonioya
Now the matrix is copied when creating shading group and don't need to be saved in storage.
2019-05-22GPencil: Use DRW_view_* API instead of DRW_viewport_matrix_*Clément Foucault
2019-05-14GPencil: Rename property Follow Drawing Path to AlignmentAntonioya
The old name was not clear and with new options the new name is more easy to understand.
2019-05-14Fix T64441: GPencil textures weird rotationAntonioya
New option to disable the follow drawing path. Before it had only a switch property, now there is a list of options. Modes: Path: Follows drawing stroke and rotate with object. Object: Only follows object rotation. None: Don't rotate.
2019-05-11GPencil: Apply FBO changes to AA macrosAntonioya
Apply same change done to fix the task T64373
2019-05-09GPencil: Lock rotation of texturesAntonioya
By default the texture is locked and only the box is aligned when Follow Drawing Path is enabled. Before, when the Follow was disabled, the texture was always aligned to top and it was not affected by object rotation. Now, the texture always is rotated with object rotation.
2019-04-18GPencil: Add option to mix color with textureAntonioya
This was already supported in Fill, but not in Strokes. This adds more artistic options when use textured strokes.
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-15GPencil: New Dots gradientAntonioya
This commit adds support for drawing Dots strokes with a gradient factor to get artistic effects like watercolor. Currently, the option is only supported by Dots materials, and in the future will be added to line strokes, but now there is a limitation on drawing engine and we will keep disabled on Line materials. Also, added the option to align Dots and Boxes strokes textures aligned with the drawing path to get more fluid strokes.
2019-04-02Cleanup: empty expression statement warningCampbell Barton
2019-03-12GPencil: Set wire mode when object is set to wireAntonioya
When the object view is set to Wireframe, the display must be set as wireframe view with x-ray on. Now the x-ray switch is handled by object.
2019-03-05Fix T62194: Blender crash after makingnew file after using Grease Pencil.Antonioya
The crash was detected in draw_manager, but the real problem was a wrong pointer that corrupted the struct, so the free function failed. Redesign this area to keep pointer correct all the time.
2019-03-04GPencil: Fix error in 3D Location modeAntonioya
In previous commit introduced this bug. The flag was inverted and the mode was not working.
2019-03-04GPencil: Move Object Depth Order to ObjectAntonioya
There was a conflict between Object "In Front" and how the strokes were managed in Stroke panel for grease pencil datablock. In order to keep consistency, the order of the object has been moved to Object level and now it's using the standard "In Front" flag. As all it is 3D, the option "Back" has been removed. This also fixes the problem with task T62137. Also related to commit 54ffc4e19dc4 and D4405
2019-03-02GPencil: Fix Display Textures in Solid modeAntonioya
There was a bug when selected Solid mode with Material or Texture mode. The textures were not visible. Now, the mode is passed to shaders to decide if use the solid color or the result texture color. The mode is passed using an array with shading type and mode.
2019-02-28GPencil: Rename variable name and add alpha to outlineAntonioya
The outline now has some alpha to be more consistent with other Blender areas.
2019-02-28GPencil: Draw Outline to Active and Selected objectsAntonioya
Now an outline is drawn when the grease pencil is selected.
2019-02-28Cleanup: styleCampbell Barton
2019-02-27GP: Use unique names for instance objectsAntonioya
When instance objects linked, the name could not be unique.
2019-02-27GP: Check if Instance loop is neededAntonioya
This reduces the loop time if the scene is not using instances.
2019-02-27GP: Optimize Instances drawing loopAntonioya