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-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-14Cleanup: Avoid duplication in line art stroke generationHans Goudey
The BKE_gpencil_stroke_add_points API function worked well for creating the primitives in the add object menu, but it expected a specific data format that doesn't make sense in a dynamic context. As evidence of that we can see the way source data was duplicated in the line art file just to use this API function. This commit solves that problem in two ways: - Clean up the line art function (this should make it faster too). - Move/rename the function so its intended use is more clear. Differential Revision: https://developer.blender.org/D11909
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-06GPencil: Rename BKE_gpencil_visible_stroke_iterAntonio Vazquez
Renamed to BKE_gpencil_visible_stroke_advanced_iter Also created a simple version of the iterator to be used without multiframe and onion skin.
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-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-26GPencil: Duplicate Masks when separate Layer/StrokesAntonio Vazquez
Now, the mask layers are copied and later a cleanup is done in order to verify all mask layer exist in destination object. If the layer mask does not exist, it's removed from the list. This is related to T89234.
2021-06-22Cleanup: Remove extra blank lineAntonio Vazquez
2021-06-22Fix T89366: GPencil hide layers above parented layerAntonio Vazquez
The problem was the flag was not reset by layer in the loop.
2021-06-21GPencil: Disable Lights when duplicate layerAntonio Vazquez
Missing to disable default light ON when use separate operator.
2021-06-18GPencil: Missed flag in previous Copy Settings commitAntonio Vazquez
2021-06-18GPencil: Move copy layer settings to functionAntonio Vazquez
Better to have a function that can be reused to duplicate the settings that need to be copied.
2021-05-27Cleanup: spellingCampbell Barton
2021-05-26GPencil: Add option to disable masks in view layerFalk David
This patch adds an option in the Layers > Relations panel called "Disable Masks in Render". When checked, no masks on this layer are included in the render. Example: | {F10087680} | {F10087681} | See T88202 for why this is needed. Reviewed By: antoniov Maniphest Tasks: T88202 Differential Revision: https://developer.blender.org/D11234
2021-05-26Merge branch 'blender-v2.93-release'Falk David
2021-05-26Fix: GPencil mask shows in view layer renderFalk David
Currently when rendering the view layer of a grease pencil layer that has a mask layer attached, the mask layer would show in the rendered image. This is inconsistent with the default behaviour with no mask on the grease pencil layer, because it would only render what's on that particular layer and not anything from any other layer. This patch makes the masks invisible in the render. Note: This might seem like not the best solution, but because masks are just regular grease pencil layers, it's tricky to pass this edge-case to the drawing code. The way it is handled right now is the best I could come up with, without making changes that could affect something else. Reviewed By: antoniov Maniphest Tasks: T88202 Differential Revision: https://developer.blender.org/D11403
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-04-09Cleanup: use our own code style for doxy-gen comment blocksCampbell Barton
2021-04-06Fix T87236: crash reading file with grease pencil palettesPhilipp Oeser
Caused by typo in {rB76689e851700}. Since Palettes and bGPDpalette are not the same size, this would not only cause a crash in versioning code, but could only go downhill from here on. Maniphest Tasks: T87236 Differential Revision: https://developer.blender.org/D10903
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-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-02-25Refactor: IDTypeInfo: Add `owner_get` to get owner of embedded IDs.Bastien Montagne
This concerns currently only collections (`master_collection` of scenes) and root node trees. It removes the matching type-specific helpers (`BKE_collection_master_scene_search` and `BKE_node_tree_find_owner_ID`). No functional change expected here. NOTE: Current implementation of `owner_get` is far from optimal, we could probably do it better, see {T69169}. NOTE: While it could also have it, shapekeys IDTypeInfo was left out of this change for now. Mainly because it sould not be used currently, and we ultimately want to demote shape keys from ID status anyway.
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-15Fix T85587: Crash on selecting multiple framesFalk David
Blender would crash when selecting multiple keyframes while multiframe edit was active. This was due to the active frame being NULL in some instances. The fix checks if the active frame is not NULL. Reviewed By: antoniov Maniphest Tasks: T85587 Differential Revision: https://developer.blender.org/D10421
2021-02-14Cleanup: Source Code Typosluzpaz
Corrects approximately 36 spelling errors in source variable names. Differential Revision: https://developer.blender.org/D10347 Reviewed by Hans Goudey
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-22LibOverride: Add an 'post apply' callback to IDTypeInfo.Bastien Montagne
Currently this is needed to properly tag PointCache's for info update (fixes an issue reported in T82503). Suspect we may need this in more cases in the future though, RNA assign/update processes are not always 100% enough to deal with complicated corner cases.
2021-01-21GPencil: Make Layer and Frame duplicate functions more flexibleAntonio Vazquez
Now it's possible to copy only part of the data. This will be used in future operators.
2021-01-16GPencil: Hide layer if the scale is zeroAntonio Vazquez
When scale a layer to zero must be hidden.
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-14GPencil: Disable Multiframe edition when play animationAntonio Vazquez
When the multiframe is enabled, playing animation must be disabled or the animation is not visible, {F9527854} Reviewed By: fclem Differential Revision: https://developer.blender.org/D9930
2020-12-07GPencil: Enable Layer Onion Skin by defaultAntonio Vazquez
2020-11-14GPencil: Missing initialization in previous commitAntonio Vazquez
2020-11-14GPencil: Cleanup clang formatAntonio Vazquez
2020-11-14GPencil: Fix unreported crash in some cases when duplicate a strokeAntonio Vazquez
Some pointers were not initialized.
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-11-03Add a callback to `IDTypeInfo` to allow preservation of some data accross ↵Bastien Montagne
memfile undos This is essentially adding that new callback, and using it only for already existing Scene's 3DCursor. Note that the place where this is called has been moved again, after all have been lib-linked, such that those callbacks may also work on ID pointers. Maniphest Tasks: T71759 Differential Revision: https://developer.blender.org/D9237
2020-10-22GPencil: Fix unreported crash using layer solo mode and masked layersAntonio Vazquez
The solo mode was skipping the layer creation data and the loop of masks expect to have all layers in the array or the loop crash. The solution is just create the layer array data for the layer, but don't draw any stroke.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07Refactor `BKE_id_copy` to return the new ID pointer.Bastien Montagne
No reasons to keep the new ID pointer as parameter here. Part of T71219.
2020-10-05GPencil: Fix unreported Layer SOLO mode brokenAntonio Vazquez
During the refactor, this feature was removed by error. When this option is enabled, only the frames with a keyframe are displayed in Draw mode. This is used when fill an animation to paint only in the frames with real drawing.
2020-09-21GPencil: New Trace images using PotraceAntonio Vazquez
This patch adds a new operator to convert a black and white image into grease pencil strokes. If the image is not B/W, an internal conversion is done. This is the first operator using Potrace, but we expect to add more features in next Blender versions. Reviewed By: HooglyBoogly Maniphest Tasks: T79877 Differential Revision: https://developer.blender.org/D8951
2020-09-11Refactor: move GPencil .blend I/O to IDTypeInfo callbacksJacques Lucke
2020-09-01Fix errors ensuring grease pencil paletteCampbell Barton
- Direct assignment caused ID user counts to be invalid. - The first palette would always be used, even when the named palette searched for was found. Also pass 'const' string to `hex_to_rgb`, avoid casting to 'non-const'.
2020-08-28IDTypeInfo: add .blend file io callbacksJacques Lucke
This is part of T76372. It adds the `blend_write`, `blend_read_data`, `blend_read_lib` and `blend_read_expand` which correspond to the various steps when reading and writing .blend files. Having these callbacks allows us to decentralize the blenloader code a lot more. This has the affect that code related to any specific ID type is less scattered. Reviewers: mont29 Differential Revision: https://developer.blender.org/D8670
2020-08-19GPencil: Change default Onion Keyframe mode to ALLAntonio Vazquez
Now by default the selection mode is All keyframes types. Also removed the icon for All option and renamed from `All Types`to `All`. UI review by @pablovazquez
2020-08-12GPencil: Move merge similar materials code to BKEAntonio Vazquez
This is required in other places and need to be shared.