Age | Commit message (Collapse) | Author |
|
|
|
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
|
|
The poll was not checking Object type
|
|
This mode simplify the stroke doing a resampling of the points and generate new geometry at the distance defined.
Sample function developed by @NicksBest
New Resample Stroke operator
This operator recreates the stroke geometry with a predefined length between points.
The operator uses the same code used in Simplify modifier.
Reviewers: @mendio
|
|
|
|
Merge points when the distance is less than a predefined value.
The method to interpolate the position created a wrong merge. Now, always the secondary point is merged with the first one (merge at first), except the last point.
|
|
This reduces the number of loops
|
|
T68035 by @luzpaz
|
|
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
|
|
There was a fixed limit to the number of points available in a buffer stroke.
Now, the array is expanded as needed using a predefined number of points for each expansion, instead to add one by one. This is done to reduce the number of times the memory allocation is required.
As part of the fix, some variables have been renamed to reflect better their use.
|
|
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.
|
|
The problem was the index was not right calculated for unselected points.
|
|
GPencil: Cleanup inverse mat code
This calculation is done in the macro, so don't need do it again in loop.
|
|
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
|
|
|
|
Now, when close a geometry with cyclic is possible generate new geometry for the gap.
The cyclic operator now supports multiframe edition too. Before only worked with active frame.
Also added the corresponding missing menu options and the new F keymap. All these features were missing, pending of the fix of the alpha glitches in stroke already done.
|
|
Now the modes are reset for grease pencil objects.
Differential Revision: http://developer.blender.org/D5138
Reviewers: @dfelinto
|
|
|
|
|
|
This avoid errors in old files.
|
|
Prepare for enabling ReflowComments.
|
|
|
|
|
|
|
|
|
|
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
|
|
- 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.
|
|
In extrude operator when the point was added, the weight data pointer was wrongly connected to old pointer.
Now, when move the data, the pointer is moved, but when a new point is added, the memory is duplicated to keep separated copies of the pointer.
This is related T62872
Thanks to @sergey for his help fixing this bug.
|
|
|
|
|
|
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
|
|
All edit mode related operators are now "Hide Selected / Reveal Hidden".
Before we had different variatons of them:
Hide Selection:
* MESH_OT_hide
* GPENCIL_OT_selection_opacity_toggle
Hide Selected Bones:
* ARMATURE_OT_hide
Hide:
* MBALL_OT_hide_metaelems
Hide Selected:
* CURVE_OT_hide
* PARTICLE_OT_hide
* POSE_OT_hide
* UV_OT_hide
Reveal Bones:
* ARMATURE_OT_reveal
Reveal:
* MBALL_OT_reveal_metaelems
Operators not renamed:
* Hide Curves (GRAPH_OT_hide)
* Hide (OUTLINER_OT_hide)
Note we can do a step further and mass rename them to match their UI
names. Where Reveal Hidden is Show Hidden. But for now at least they are
all unified.
|
|
|
|
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
|
|
Mostly functions wrapping args, not confirming to our style guide.
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
|
|
Keymap: E - Extrude Gizmo supported.
If the extrude points are the first or last of the stroke, the stroke is extended.
If the extrude points are in the middle of the stroke, a new stroke is created because the grease pencil strokes can be only with 2 extremes and fold the stroke to get a new point gets very bad results.
Still pending define a new icon. Also, it could be good to set by default XYZ axis in the gizmo.
Note: There is a change in the transform_gizmo_extrude_3d.c gizmo for OB_MODE_EDIT_GPENCIL. This change must be undo when the mode will be integrated into OB_MODE_EDIT, but while we have both modes, we need to keep this code in order to keep running the gizmo.
|
|
|
|
New edit mode operator and post-processing brush option.
Trim works on a single GP stroke. It removes trailing points before and after the first intersection (or loop) nearest to the start of the stroke.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
When the autolock layer option was enabled, the move to new layer operator was not working as expected.
|
|
Automatic edits failed for indented comment blocks,
removed indentation & adjusted.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
Name was part of the header GPL text.
|
|
|
|
Now when remove points from a cyclic stroke, the last island is joined with first island in order to fill the gap of the cyclic.
This change affects not only to cutter, but to any delete process in cyclic strokes.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|