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
2022-11-08GPencil: Make Sculpt Auto-masking Global and not by BrushAntonio Vazquez
The auto-masking was working by Brush and this was very inconvenient because it was necessary set the options by Brush, now the options are global and can be set at once. Also, the automa-masking now works with `and` logic and not with `or` as before. That means that a stroke must meet all the conditions of the masking. Added new Layer and Material options to masking the strokes using the same Layer/Material of the selected stroke. Before, only Active Layer and Active Material could be masked. The options of masking has been moved to the top-bar using the same design of Mesh Sculpt masking. As result of the changes above, the following props changed: Removed: `brush.gpencil_settings.use_automasking_strokes` `brush.gpencil_settings.use_automasking_layer` `brush.gpencil_settings.use_automasking_material` Added: `tool_settings.gpencil_sculpt.use_automasking_stroke` `tool_settings.gpencil_sculpt.use_automasking_layer_stroke` `tool_settings.gpencil_sculpt.use_automasking_material_stroke` `tool_settings.gpencil_sculpt.use_automasking_layer_active` `tool_settings.gpencil_sculpt.use_automasking_material_active` Reviewed by: Julien Kaspar, Matias Mendiola, Daniel Martinez Lara
2022-11-05Cleanup: use bool instead of short for job stop & do_update argumentsCampbell Barton
Since these values are only ever 0/1, use bool type.
2022-11-02Refactor: Rename Object->imat to Object->world_to_objectSergey Sharybin
The goal is to improve clarity and readability, without introducing big design changes. Follows the recent obmat to object_to_world refactor: the similar naming is used, and it is a run-time only rename, meaning, there is no affect on .blend files. This patch does not touch the redundant inversions. Those can be removed in almost (if not all) cases, but it would be the best to do it as a separate change. Differential Revision: https://developer.blender.org/D16367
2022-11-01Refactor: Rename Object->obmat to Object->object_to_worldSergey Sharybin
Motivation is to disambiguate on the naming level what the matrix actually means. It is very easy to understand the meaning backwards, especially since in Python the name goes the opposite way (it is called `world_matrix` in the Python API). It is important to disambiguate the naming without making developers to look into the comment in the header file (which is also not super clear either). Additionally, more clear naming facilitates the unit verification (or, in this case, space validation) when reading an expression. This patch calls the matrix `object_to_world` which makes it clear from the local code what is it exactly going on. This is only done on DNA level, and a lot of local variables still follow the old naming. A DNA rename is setup in a way that there is no change on the file level, so there should be no regressions at all. The possibility is to add `_matrix` or `_mat` suffix to the name to make it explicit that it is a matrix. Although, not sure if it really helps the readability, or is it something redundant. Differential Revision: https://developer.blender.org/D16328
2022-10-30Fix T102163: GPencil:Set start point Operator make stroke deletedAntonio Vazquez
There were two problems: * The stroke was deleted if the last point was selected. Now the stroke is flipped because is faster. * If the second point was selected, the first point was removed because the internal api, removed one point strokes by default. This was done becaus ethe tools that used this API did not need one point strokes as result. Now this optional and keep one point strokes.
2022-10-27Fix T102092: GPencil Sculpt Grab crash using Shift keyAntonio Vazquez
There was a problem with the hash table that was not created as expected. Also fixed an unreported memory leak in Grab tool not related to this crash but detected during debug.
2022-10-20Cleanup: Remove unused grease pencil / RNA includesHans Goudey
2022-10-10I18n: disambiguate or extract a few messagesDamien Picard
Disambiguate: - "Active Only" (GPencil copy material and layer, add NLA modifier) - "Clip" (movie clip, image extension mode) - "Emission" (particles) - "New" (scene) - "Tracking" (movie clip) Extract: - "ViewLayer", the default view layer name when creating new scene Ref T43295 Reviewed By: mont29 Maniphest Tasks: T43295 Differential Revision: https://developer.blender.org/D16196
2022-10-07GPencil: New Fill Extend lines adjust with MMBAntonio Vazquez
The actual length of extension lines can be adjusted using wheel mouse but this is very inconvenient for tablet users. Now, the extension can be adjusted using MMB of the pen. There was a similar request in Right-Click Select Reviewed By: Matias Mendiola, Daniel Martinez Lara Differential Revision: https://developer.blender.org/D16128
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-10-06Fix T101517: GPencil strokes snap to origin in a Scale value is on 0Antonio Vazquez
The problem was the conversion to object space converted the points to zero. Now, the new function `zero_axis_bias_m4` is used in order to add a small bias in the inverse matrix and avoid the zero points. A known math issue is the stroke can be offsetted if the scale is set to 1 again. In this case apply the scale to reset to 1. Differential Revision: https://developer.blender.org/D16162
2022-10-05GPencil: Use stroke function for convert pointsAntonio Vazquez
The stroke function is faster because the matrix is inverted only once.
2022-10-05Cleanup: Clang tidyHans Goudey
Also remove unnecessary struct keywords in C++ files.
2022-10-04Cleanup: formatCampbell Barton
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-10-03Fix T101564: GPencil: Selecting imprecise if transforms are animatedAntonio Vazquez
The check was doing with the original point and must be the evaluated point.
2022-10-03Fix T101548: GPencil new lines in Multiframe editing appear as OnionAntonio Vazquez
The problem was the eval data update only occurs for the actual frame and in this case must be for all frames.
2022-10-02Cleanup: Rename function `gpencil_point_to_parent_space`Antonio Vazquez
gpencil_point_to_parent_space -> gpencil_point_to_world_space The old name was not clear because it looked it was moving into the object space, but really is doing the opposite.
2022-10-02Cleanup: Rename functionsAntonio Vazquez
gpencil_apply_parent->gpencil_world_to_object_space gpencil_apply_parent_point->gpencil_world_to_object_space_point The old name was not descriptive enough.
2022-09-29GPencil: Remove Fill `use_collide_only` optionAntonio Vazquez
After a lot of testing, this option is not required and now this is managed by stroke_collsion. If the stroke_collision is enabled, only collide strokes are used.
2022-09-29GPencil: Fix missing Fill stroke cross detectionAntonio Vazquez
If the cross point was in the extreme of the stroke the collision was not detected because it could be outside of the bbox. Removed the bbox check because now it is not necessary.
2022-09-28GPencil: Avoid infinite loop in Fill debug modeAntonio Vazquez
If the internal flag is set to debug and the Ctrl key is used the program keeps running endless.
2022-09-28GPencil: Disable Fill visual aids if use InvertedAntonio Vazquez
When the inverted mode is used, the visual aids must not be displayed.
2022-09-28GPencil: Extend Fill lines when visual aids are disabledAntonio Vazquez
When the visual aids are disabled, but the extend factor is > 0, the lines must be extended, but not displayed. Also, some variables renamed to clarify.
2022-09-28GPencil: Fix unreported memory leak in Fill inverseAntonio Vazquez
There was a memory leak when use inverted fill.
2022-09-28Cleanup: Rename variablesAntonio Vazquez
2022-09-28GPencil: Fix unreported bug for fill closing strokesAntonio Vazquez
The extend lines were included in render by error when the only collide option was ON.
2022-09-28GPencil: Fix compiler warningAntonio Vazquez
2022-09-28GPencil: Fill Tool - Check if extensions collide with real strokesAntonio Vazquez
This commit is an improvement in the previous fill tool changes in order to improve how the extended strokes are managed. * Now, the algorithm checks if the extend cross a standard stroke, not only extend strokes. * Option to enable or disable the stroke cross checking because this can be slow in very complex scenes. * Added `D` key to toggle stroke cross option. * Option to use only collide strokes to be used as fill limit. If the option to use only collide strokes is enabled, the open extensions are in different color. * Status text now shows mode and the actual extend factor. This commits also contains a refactor of the loops to use arrays as much as possible. Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D16052
2022-09-26Fix T101370: GPencil Grab Sculpt crash after bake transform animationAntonio Vazquez
The problem was the duplicated strokes had wrong pointers to the original stroke.
2022-09-26Cleanup: remove redundant parenthesisCampbell Barton
2022-09-25Cleanup: remove redundant parenthesis (especially with macros)Campbell Barton
2022-09-25Cleanup: Remove commented linesAntonio Vazquez
2022-09-25Fix T101317: GPencil separate Active layer freezes blenderAntonio Vazquez
The error occurs only when the layer is empty.
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: use 'u' prefixed integer types for brevity & cast styleCampbell Barton
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-09-25Cleanup: quiet compiler warningCampbell Barton
2022-09-25Cleanup: format, spelling in commentsCampbell Barton
2022-09-24GPencil: Exist early from loop for Fill extensionsAntonio Vazquez
It does not need follow in the loop if a collision was found.
2022-09-23GPencil: Improve Fill Tool Extend linesAntonio Vazquez
* Improve how the extend lines collision is calculated. * Added `S` key to switch between modes. * Now extend factor does not disable visual aids (thi sis done with checkbox). * Reduce the use of linked list and now memory array is used. * Refactor Radius functions. * Fixed bug of Radius mode when object is rotated. * Cleanup code. Differential Revision: https://developer.blender.org/D16022
2022-09-23Cleanup: float literalsCampbell Barton
2022-09-21Cleanup: spelling in commentsCampbell Barton
2022-09-20GPencil: Add `offset` parameter to reproject operator Redo PanelAntonio Vazquez
Now it's possible to set an offset in the surface reprojection. Before, this was only possible while drawing, but not in the reproject operator. Differential Revision: https://developer.blender.org/D15610
2022-09-19GPencil: Make formatAntonio Vazquez
Missing in previous commit
2022-09-19GPencil: Cut Extended lines in Fill tool when collideAntonio Vazquez
Before, the lines could be extended endless, but this added too noise. Now, the lines are not extended more if collide. Before: {F13504186} After: {F13504187} Reviewed By: mendio, frogstomp Differential Revision: https://developer.blender.org/D15992
2022-09-19Cleanup: spellingCampbell Barton
2022-09-17GPencil: Remove Leak SizeAntonio Vazquez
This value was used to close gaps, but now with the new system is not needed. Internally, still we need to keep a small leak size, but after doing a lot of test a value of 3 is perfect, so it's harcoded.
2022-09-17GPencil: Hide the help Circles for gaps when gap is closedAntonio Vazquez
To avoid too much noise, the help circles are only visible if the the gap is still open. When the gap is closed, the circles are hidden. Hiding the circles makes it easier to focus on what is problematic. instead, to see many circles that are already resolved.
2022-09-17GPencil: Rename Fill closure methodsAntonio Vazquez
The new names are: * Radius * Extend The mode Radius + Extend has been removed. Also, some code cleanup and format.