When undo in UV/Image editor and press ESC key, there was segment fault
in Toolsettings because the reference was missing. Now the toolsetting
is loaded from context and not from local operator data.
Was kinda split in two different places (one allowed to modify given path to always get a valid one,
the other only checking for validity of given path), not nice - and broken in asset branch case.
So rather extended a bit FileList->checkdirf to handle both cases (modifying and non-modifying path).
We usually don't silence migh-be-uninitialized warning (which is the only
thing which could explain setting matrix to all zeroes) so we can catch
such errors when using tools like Valgrind.
I don't get warning here and the initializer was wrong, so removing it.
If it-s _REALLY_ needed please do a proper initialization.
This was because the poll callback was checking for the presence of an active layer.
If you just create an empty datablock and try to paste, nothing would happen.
However, this check was kindof redundant anyway, as the operator would add a layer for
you if it didn't find one.
(Later this calculation should be moved into the iteration macro instead, since
it only needs to be applied once per layer along with the diff_mat calculation)
A common problem encountered by artists was that they would accidentally move
the 3D cursor while drawing, causing their strokes to end up in weird places in
3D space when viewing the drawing again from other perspectives.
This operator helps fix up this mess by taking the selected strokes, projecting them
to screenspace, and then back to 3D space again. As a result, it should be as if
you had directly drawn the whole thing again, but from the current viewpoint instead.
Unfortunately, if there was originally some depth information present (i.e. you already
started reshaping the sketch in 3D), then that will get lost during this process.
But so far, my tests indicate that this seems to work well enough.
transparency.
The issue is that we are rendering to a 0..1 clamped sRGB buffer with
unpremultiplied alpha, where the correct thing to do would be to render
to an unclamped linear premultiplied alpha buffer. Then we would just
make fire purely emissive without affecting the alpha channel at all,
but that doesn't work here.
So for now, draw fire and smoke separately using different shaders and
blend modes, like it used to before the smoke programs were rewritten
(see rB0372b642).
General reshuffling of defines and spacing/brace usage for consistency.
In particular:
* When defining types, don't mix pointers and non-pointer types on same line
to avoid confusion
* As much as possible, have all defines at the top of each block instead of
scattered haphazardly throughout the code
Assigning NULL to scopes' data pointer in 'non-UI readfile' context was terribly wrong for sure,
if we'd really want to reset them here we should freed them first.
But we can rather just ignore them here, those are purely runtime data managed by image editor,
no need to touch them here.
* Stroke editing functions should be in gpencil_edit.c not gpencil_data.c
(the latter is only for handling "CRUD" operations on things like
layers, brushes, and palettes)
* Deduplicate the GP_STROKE_BUFFER_MAX define
Added a way to select all the currently visible strokes that use the same
color as the selected stroke. This can be accessed via the Select Grouped (Shift-G)
operator as an alternative to selecting by layer.
This commit adds optional "pressure" and "strength" arguments to the
stroke.points.add() method. These are given default values of 1.0,
so that old scripts can be ported over to the new API with less effort
while reducing confusion about why auto generated strokes won't appear.
The idea of the change is to avoid queue growing too long
and handle all the operations as quick as possible.
Gives about 3% speedup on one of the barber shots here.
Now we pass streams to Alembic instead of passing the filename string.
That way we can open the stream ourselves with the proper unicode
encoding.
Note that this only applies to Ogawa archive, as HDF5 does not support
streams.
Differential Revision: https://developer.blender.org/D2160