Move projection paint data ensure function to projective texture
painting. Also, cleanup draw data when generating a new image for
painting in image paint mode.
Since the choice to link or append has been removed in the file browser operator panel,
there was no way to tell whether as a user you were linking or appending.
To fix this the proposed patch separates the operators.
Reviewers: campbellbarton, carter2422, venomgfx
Subscribers: fsiddi
Maniphest Tasks: T41593
Differential Revision: https://developer.blender.org/D770
This was never implemented, actually... Was also the occasion to rework a bit
`curve_deform_verts()`, code there was sometimes needlessly complicated and slowish
(like getting weight from dm vertex per vertex, instead of whole array at once...).
In this case, we want to use defaults as defined by UI code (among other, from order of registering),
there is no point in storing those data in factory startup.
This reverts rB52c06440d8e51c8661a679bcb33742666ce8dbf9 and rBe40d8258bb46926a1aecf51236822532397993f3
(tabname is old 2.4x tabed panels system, *not* new 2.7x tool tabs!).
Also disabled (#idef'ed) everything regarding tabname/tabed panels for now, we may even remove it completely,
would make things clearer imho.
Note files saved with 2.71.6 up till now would have two versions of some panels in store (with two different
values for their tabname), can give some order oddities in those cases, which have to be fixed by hand...
This is rather legit case which happens i.e. when having persistent images enabled
and session is updating the lookup tables.
Now device_memory keeps track of amount of memory being allocated on the device,
which makes freeing using the proper allocated size, not the CPU side buffer
size.
Free draw objects instead of tagging object update and doing
recalculation of derived meshes. The reason is that if user deletes all
slots and tries to paint, the system will invalidate the cached in
projection painting derivedmesh. This will promptly crash. Invalidating
the draw objects only is also much cheaper.
Bring back shading in texture painting.
This works now but it uses 3 texture units instead of two. Most GPUs of
DirectX 8 (OpenGL 1.4 should cover that) functionality even should have
those, but some old GPUs might not work with that. In any case, I hope
we will be moving to OpenGL 2.1 requirement soon anyway where 4-8
texture units are usually the norm.
The problem addressed here is that there was no mean to check if an iterator
points the last of the elements being iterated over. Such checking is necessary
to reliably dereference the iterator (i.e., calling the operator*() method of the
underlying C++ iterator object).
Now Interface0DIterator and StrokeVertexIterator have an .at_last property
to check if an iterator points the last element. Using this new API feature,
the present commit partly reverts the previous commit rBeb8964fb7f19 to
better address T41464.
Differential revision: https://developer.blender.org/D752
Author: flokkievids (Folkert de Vries)
Reviewed by: kjym3 (Tamito Kajiyama)
- Drawing grease pencil fail without scene-lock.
- Converting to curve failed without scene-lock.
- Outliner drag into viewport failed with local-view.
Few things:
- reflect() takes arguments in this order: N, I, it was swapped
in the previous code for some reason.
- Normal and view vectors are to be normalized. For the view
vector we're now using shade_view() in order to deal with the
ortho camera. However, Cycles does not support ortho camera
for reflection, but this is easy to do in a separate commit.
- Reflection vector is to be in the world space. Kudos to
Antony Riakiotakis for figuring this out!
- ignore hidden faces & verts
- when cutting a pair, select edges co-linear to the cut.
Also support creating a buffer from hidden elem's even if BMO_FLAG_RESPECT_HIDE is enabled.
(if the hflag used includes BM_ELEM_HIDDEN).