Age | Commit message (Collapse) | Author |
|
This function is only really secure in a very limited amount of cases,
and can especially bite you later if you change some buffer sizes...
So not worth bothering with it, just always use BLI_strncpy instead.
|
|
|
|
The old function name was not clear enough
|
|
If the user enable polygon draw and press ESC before drawing something,
the last stroke must not be moved back.
|
|
The polygons must move the stroke to back only when polygon is complete
|
|
For artist point of view is very useful to have an option to draw by
default the new strokes on back of all strokes in the layer.
|
|
During code review a field was renamed, but one line was missing.
|
|
Do not clear continuous drawing. This code was related to a previous
test and must be removed.
|
|
Prints error on startup.
|
|
* "Flip direction" -> "Flip Direction"
* "Show drawing direction" -> "Show Directions"
* "Grease Pencil Curves" -> "Brush Curves"
(I was considering "Brush Response Curves" instead, but that seemed like too much
of a mouthful)
* "X" for removing a palette. The UI there was more similar to a standard datablock
selector, so it should use the "+X" combo instead of "+-" combo for consistency.
(Note though, presets tend to use "+-" instead - e.g. see the Render Settings)
|
|
(Ctrl-Shift-J is for "Join and Copy")
|
|
Previously, it would insert "invisible" points after the endpoints of the strokes,
so that they wouldn't appear to be joined, but that behaviour could also get quite
confusing as you wouldn't be sure whether the strokes were really joined or not.
To keep the previous behaviour, simply enable the "Leave Gaps" option on the operator
after running it. This setting will get saved between runs of the operator.
|
|
This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.
|
|
Improve current Grease Pencil in order to get a better 2D animation tool.
More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov
Reviewed By: Severin, aligorith, campbellbarton
Patch by @antoniov, with edits by @Severin.
Differential Revision: https://developer.blender.org/D2115
|
|
Also allows us to get rid of a few _copy_ex() versions...
|
|
|
|
|
|
To get this working the least effort, I've had to expose the helper functions
used by the lasso and circle select keyframe-test callbacks (which are generic)
and expose them for use by the GP keyframe editing code too. Hopefully in time
we clean this all up and just write the code once to operate on "keyframes"
|
|
deletes on all editable layers
This new operator will delete any GP frame it finds on the current frame, regardless
of whether it's on the active layer or not. It will only remove the frames if the
layer is editable, but otherwise, it will just go for it.
The existing operator is great for use in the panel (where it only applies to the active
frame), but it was not so good for all the other places where tools can be invoked
(e.g. D-X, or Delete) as you're typically thinking about the whole scene more holisticaly
than just caring about a particular layer.
|
|
The purpose of the patch is to replace deprecated glShadeModel.
To decrease glShadeModel calls I've set GL_SMOOTH by default
Reviewers: merwin, brecht
Reviewed By: brecht
Subscribers: blueprintrandom, Evgeny_Rodygin, AlexKowel, yurikovelenov
Differential Revision: https://developer.blender.org/D1958
|
|
Usage:
* D+X - Works anytime, anywhere
* Shift-X - Works in EditMode only
* Via Delete Menu - EditMode only
Often doing video tutorials or perhaps during dailies/shot review you want to
quickly get rid of a quick scribble you made for making a point, without having
to undo (i.e. maybe you edited some objects in between) and/or without having
to use the eraser (i.e. it'd take too long to cover the entire area).
|
|
On light coloured backgrounds (especially on white), it was impossible to see
where the cursor was. This commit adds a second ring (black) to the cursor so
that on light backgrounds, even if the light ring isn't visible the black one
will be.
|
|
configurations
When using Left Click select, it wasn't possible to sculpt using E+LMB.
I've changed the order of things in the keymap so that the select operator won't
end up catching and blocking all these events.
|
|
Some languages like Chinese or Japanese take three or four bytes per char...
Also fixed some missing translation markers for UI header messages.
|
|
|
|
|
|
|
|
* Fix "Attempt to free NULL pointer" when copying strokes for the first time
* Fix poll callback on "paste" operator, so that it is possible to paste
strokes when there are no editable strokes visible.
|
|
These are useful for removing overshoots at the end of closed strokes (for fills)
|
|
onionskinning in that direction
This is an experimental option that I found would have been useful to have,
when making my earlier anim test. The only contentious point is whether it's
better to use a separate boolean flag (perhaps bound to the labels) instead
of overloading this setting (and describing the usage in the tooltip).
|
|
In the nodes editor, Ctrl-LMB-drag is taken by "Cut", and it seems impossible
for any other keymap to override that. Instead, the default lasso select hotkey
there is Ctrl-Alt-LMB-drag instead.
To get Grease Pencil lasso select (in GP Editmode) to work in the Nodes Editor too,
this commit adds the Ctrl-Alt-LMB-drag binding here too. However, to make things easier,
this extra binding will be part of the Grease Pencil keymap everywhere. There doesn't
seem to be any conflicts with having this in place - until we find them, this should
be ok to have.
|
|
After some test, a new iteration parameter has been added in order to
apply repetitive smoothing to the stroke. By default 1 iteration is applied,
but can used any number between 1 and 3.
The repetition uses different levels of intensity from 100% of the defined smooth
factor for the first loop, 50% for the second and 25% for the third. We use in each
loop a smaller value in order to avoid deform too much the stroke.
|
|
glitches in some situations
|
|
There is still some instability in how the triangulations are happening,
where the triangle count of the resulting triangulation fluctuates resulting
in weird artifacts sometimes.
To reproduce, try drawing some U-shapes, and keep reloading the file.
|
|
While trying to track down why I still keep getting some random "extra" triangles
showing up when reloading files with fills, I noticed that there's an index mismatch
here that may cause problems in some rare cases:
There are "gps->totpoints" items in tmp_triangles, but there should only be
"gps->tot_triangles" triangles in the gps->triangles array. If for whatever reason
some of the triangles in tmp_triangles are invalid, this could have meant that
while a tmp_triangles candidate was skipped, a corresponding slot for a valid
triangle also got skipped.
|
|
|
|
Improve filling for concave shapes using a triangulation of the stroke.
The triangulation information is saved in an internal cache and only is
recalculated if the stroke changes.
The triangulation is not saved in .blend file.
Reviewers: aligorith
Maniphest Tasks: T47102
Differential Revision: https://developer.blender.org/D1705
|
|
- BKE_blender_version.h (only version defines & versionstr).
- BKE_blender_copybuffer.h (currently only used for view3d copy/paste).
- BKE_blender_undo.h (global undo functions).
- BKE_blendfile.h (high level blend file read/write API).
|
|
stroke thickness
As soon as you started trying to smooth a stroke, the thickness of the stroke
would quickly drop right down to near zero, if "affect pressure" was enabled.
This step got accidentally missed when restoring the affect pressure functionality to
the stroke smoothing brush code, following cleanups from the stroke quality patch.
|
|
As noted by Antonio and Daniel, performing smoothing on the pressure values
for new strokes doesn't work that great. From an artist POV, it is apparently
"very strange that line thickness shrink suddenly after drawing it".
|
|
|
|
|
|
This never really worked that well, and often ended up being far too strong
to be of practical use. The new options do similar things, but with greater
control, so removing this old method now.
|
|
On second thought, these might be better names for these... I'm still not 100%
happy with these, but they will do for now.
(Best results currently seem to be with smooth 0.7, and subdivision steps 1 or 2)
|
|
exceeds GP_STROKE_BUFFER_MAX
Assuming that this subdivision + smoothing mostly only happens at the end of a stroke
anyway, enforcing this max-points limit in some cases was resulting in strokes that
weren't quite getting subdivided properly as the others.
|
|
|
|
|
|
|
|
Improve the quality of current grease pencil strokes adding a new dynamic smooth and subdivision. The level of smooth and subdivide can be adjusted using UI parameters. These options are disabled by default in order to keep the grease pencil stroke compatible with any existing add-on.
Both parameters are defined at layer level.
Reviewers: aligorith
Differential Revision: https://developer.blender.org/D1866
|
|
scrollwheel while sculpting
|