Issue was caused by linking to grease pencil from direct_link* function
which lead to NULL GP data because it's being read a way later.
Link to GP data in lib_link* instead.
One important thing to keep in mind when using this feature is that you'll need to flip your textures vertically (both the GIMP and Photoshop DDS tools I've seen have support for this on export). This is a quirk in using a texture format originally made for DirectX/DirectDraw, and flipping the compressed data is a real headache. Another quick fix for this issue is to change the Y value for the Size in the Mapping panel in the Texture properties to -1 (default is 1).
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction.
For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
Enabled use_gridfill for edgesubdivide called by loopcut. This will break edgeslide in this specific case (intersecting faceloop), but imho makes more sense this way than the other. Very easy to revert anyway, and this should only affect this specific cornercase.
The bug is related to 31581 and the main cause is the small offset that
BM_loop_interp_from_face introduces before calculating barycentric
weights. Solved by only calculating displacement layer.
This function is used to name undo pushes in sculpt mode, was missing
some of the newer brush types. Also tweaked the switch statement so
that it will warn for future missing cases and removed extraneous
breaks.
The 2D Filter system now only copies the game viewport instead of the whole window. This prevents 2D Filters from grabbing data outside of the game viewport. The textures for 2D filters are now also not forced to be powers of two (if NPOT textures are supported), which can save a little bit of VRAM.
Added back face validation to BKE_mesh_validate_arrays.
This is needed because some addons (like OBJ importer) are reading
tessfaces and then converting them to ngons and validation of tessfaces
is needed before such a conversion.
Validation of faces would happen only if there's no polys in mesh.
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping.
Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better.
Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
the idea of using methods instead of attributes is to avoid users abusing of the system calls.
Thanks Campbell Barton for reviewing and small corrections