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-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-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-01-23Merge branch 'blender-v2.82-release'Antonio Vazquez
2020-01-23Fix T73327: GPencil strength sculpt brush not working with small brush radiusAntonio Vazquez
The problem was related to the smooth of the strength. As the factor was very low and the value was smoothed , the result was almost nothing when the radius was very small. Now the factor is higher and the smooth is done after clamping pressure.
2020-01-21Cleanup: simplify wmEvent tablet data storage and namingBrecht Van Lommel
Removing meaningless distinction between NULL pointer and EVT_TABLET_NONE, and initialize pressure and tilt to 1.0 and 0.0 respectively when no tablet is used.
2019-10-22GPencil: Calculate inverse matrix only onceAntonio Vazquez
Instead to do it for each action, do it only in init.
2019-10-21Fix T70888: GPencil Sculpt tools don't work properly in a particular situationAntonio Vazquez
Thanks to @charlie for his help fixing this bug.
2019-09-26WM: clean up cursors constants and codeBrecht Van Lommel
There was a mix of old and new constants. Now have one list of WM_CURSOR_* cursor types, using GHOST standard cursors when available and otherwise falling back to our custom cursors. Ref D5197
2019-09-22GPencil: Fix missing last point when sculpt in MultiframeAntonio Vazquez
This was a mistake when fixed the problem with multiframe sculpt. I missed change the index and use active point in the check.
2019-09-21GPencil: Apply transformed rotation only if neededAntonio Vazquez
If there aren't modifiers or they are not transform type, the rotation is not needed.
2019-09-21GPencil: Use Object location instead of 3D cursor for Grab BrushAntonio Vazquez
Instead to use the 3D cursor as reference point (legacy code), it would be better use the object location. Tested by: @pepeland
2019-09-21GPencil: Remove Sculpt rotation effect for multiframe sculptAntonio Vazquez
As multiframe does not use modifiers, this is not required and only gets weird results. Related to T70116
2019-09-21GPencil: More changes to use original data in multiframe sculptAntonio Vazquez
Related to T70116
2019-09-21GPencil: Use evaluated or original data in Sculpt for MultiframeAntonio Vazquez
The evaluated frame is only available when the frame is the active one. Related to T70116
2019-09-18GPencil: Fix unreported error using Grab sculpt in empty frameAntonio Vazquez
When the grab brush was used in an empty frame, a new frame was created, but as the depsgraph was no tagged, the evaluated data was wrong and the Grab hash failed.
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-13Cleanup: unused headers (GPU)Campbell Barton
2019-08-26Cleanup: unused argCampbell Barton
2019-08-25Cleanup: Clarify alloc comment textAntonio Vazquez
2019-08-25GPencil: Use evaluated data for Sculpt BrushesAntonio Vazquez
As part of T66294 is needed to use the evaluated data for Sculpt brushes to make possible to Sculpt a transformed stroke. Without this commit, it was impossible sculpt the stroke if the modifier moves away the stroke point from original position. Also, some calculation is done in order to determine the rotation to transform the brush effect too.
2019-08-17Fix T68723: GPencil - Split Select mode for Sculpt and Edit modeAntonioya
Actually, the selection mode is not visible in Sculpt mode when mask is enabled, but still is used. Also, the mode is shared between Edit mode and Sculpt mode and for meshes the selector is by mode. This commit splits the select mode in different properties and show the selector in Sculpt mode to define the Select mode. Also, the Select Mask button has been removed and now the Select Mode buttons work equal to Meshes where the select buttons are the mask enable too. Fixed some old code not valid detected during these changes. Differential Revision: https://developer.blender.org/D5500
2019-08-06Cleanup: use BKE_ prefix for BKE_colortools.hCampbell Barton
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-30Fix T67904: GPencil clone brush doesn't copy the right color and layerAntonio Vazquez
When using the clone brush, the first time the brush worked, but the next time no. The reasons were two: 1) The strokes were copied to the active layer, but if there were more than one layer, the stroke must be copied to the original layer. 2) The materials were not assigned properly and the materials were set as the first slot in the list always. Now, the original layer name is used to try to find the same layer in destination. If the layer is missing, the active layer is used. For materials, the bug in the hash lookup is fixed and the material is assigned to the right slot.
2019-07-29Cleanup: GPencil replace cfra_eval by cfra or CFRAAntonioya
Don't need these variable because this code was part of using depsgraph frame number, but now using scene framenumber only add noise to the code.
2019-07-29Fix T67813: Remove mask from Weight PaintAntonioya
Weight Painting was using mask if "Selection Mask" in Sculpt Mode is turned on. This can be quite confusing because the option to turn it off is not available in Weight Painting and the selection is also not visible. Now the mask is not checked in weight paint mode.
2019-07-26GPencil: Get current frame from sceneSergey Sharybin
This change makes it so current frame is queried from a scene rather than from a dependency graph. This makes it possible to avoid the fact that dependency graph might not be fully evaluated yet. There are still some cases where it frame is queried from the graph, but those seems to be in a code path where we need to ensure valid dependency graph anyway. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D5349
2019-07-16Fix T66011: Transformed objects break sculpt toolsAntonioya
The Pinch, Push, Twist and Clone were not using the object transformation to compute point changes, so the point was way off of the right place.
2019-06-11Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_.Bastien Montagne
Cheap tip: anything that is not "Camel Case" and/or that is more than a few words long should use `TIP_` translation, not `IFACE_` one. Also added several missing strings (including the one reported in D5056 by Jean First (@robbott), thanks).
2019-06-11Fix T65699: gpencil weight paint unresponsiveCampbell Barton
2019-06-04GPencil: Clarify Target weight tooltip and remove lower limitAntonio Vazquez
The target value was affecting the lower value and this was weird. Now the value is clamped between 0 and target weight.
2019-06-03Fix T65408: GPencil Weight Paint, strength and falloff are ignored when ↵Antonio Vazquez
painting a lesser vertexweight The value was clamped to minimum value before checking the influence.
2019-06-02GPencil: Cleanup unused linesAntonio Vazquez
These lines were related to other brushes and were copied in the function by error, but not required.
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-29Fix T59848: precisely represent the dependencies of Armature modifier.Alexander Gavrilov
When the modifier uses vertex groups, the set of the bones it actually needs is precisely defined by the set of the group names. If envelopes are enabled, this refinement is not available, because any bone can potentially be used. This can be used in the dependency graph construction to allow objects deformed by a part of the armature to be used in constraints on other bones, e.g. for placing cartoon-style face elements on top of the body mesh via Shrinkwrap constraints. Since the list of vertex group names is now used as an input by the dependency graph, adding/removing/renaming groups should now be triggering a graph rebuild. Differential Revision: https://developer.blender.org/D4715
2019-04-29Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-29Cleanup: spellingCampbell Barton
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-18Cleanup: comment blocksCampbell Barton
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-16GPencil: Add lock icon to Vertex Groups listAntonioya
Also check this flag in operators. Note: This is required for the development of the new Normalize All operator.
2019-04-10Cleanup: spellingCampbell Barton
2019-04-09Cleanup: BKE_gpencil namingCampbell Barton
- The ambiguous term 'handle' was used where 'ensure' is typically used (get or add when missing). - Rename `current` to `active`, all `current` functions which were also ensuring. - Clarify what is being operated on, using `BKE_gpencil_object_*` for objects, `BKE_gpencil_brush_*` for brushes.
2019-03-25GPencil: Only brushes with pinned materials have materialsAntonioya
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count. This fix T62465. Patch contributed by @matc Reviewers: @brecht @antoniov @billreynish @mendio
2019-03-19Cleanup: trailing spaceCampbell Barton
2019-03-17GPencil: Changes in Fill and new 3D Cursor View PlaneAntonioya
This commit groups several options that were tested in grease pencil branch: - Changes to fill algorithms and improves, specially in small areas and stroke corners. New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes. Kudos to @charlie for coding this fill improvements. - New 3D cursor view plane option. Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces. - Canvas Grid now can be locked to 3D cursor. - New option to reproject stroke using 3D cursor. - Small tweaks and fixes. Changes reviewed by @pepeland and @mendio
2019-03-15Cleanup: indentation, wrappingCampbell Barton
Mostly functions wrapping args, not confirming to our style guide.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.