improve inset code by not allocating an array the size of edges - instead count all inset edges and allocate an array only for those.
also fixes an error where edge lengths were being compared while the verts were being placed. (now do beforehand)
- Even option (like solidify even option)
- Relative option (insets based on lengths of surrounding edges)
TODO: merge tares when 2+ face corners meet but don't form a contiguous region.
- BM_edge_loop_pair incase you need the loops rather then the faces.
- BM_edge_ordered_verts_ex() - accepts a loop argument.
- BM_edge_length_calc() - simple length calc, useful if the edge is in some array, saves assigning a var and using len_v3v2().
Should also fix [#30266], [#29451], and partly [#30316].
Here are the changes made by this commit:
* It adds a "dirty" flag to DerivedMesh struct (for now, only DM_DIRTY_TESS_CDLAYERS, but more might be added as needed).
* It adds a new func, DM_update_tessface_data, which assumes tessfaces themselves are valid, but updates tessellated customdata from their poly/loop counter parts.
* At end of modstack, when valid tessellated faces are present in finaldm , but the cdlayers dirty flag is set, call that function (instead of recomputing the whole tessellation).
* Edits to the codes concerned (UVProject, DynamicPaint, and Subsurf modifiers).
* Also add to subsurf dm generation code the creation of a CD_POLYINDEX layer (mandatory for DM_update_tessface_data to work well, and imho all tessellated dm should have one).
Note: some pieces of old code are just #if 0’ed, will clean them later.
- The main problem was that in order to be accurate all particle
rotations have to be calculated incrementally so the only working
solution is to store rotations to the point cache (previously
this was only done for dynamic rotations). This can nearly double
the point cache size so it's not ideal to have this as a default
as in many cases you don't care about particle rotations.
- Particle rotation panel now has a new "enable" checkbox that
enables rotation calculations and the storing of rotations to
point cache.
- Old files will have rotations enabled via do_versions so that in
the worst case old files will only get bigger point caches, but no
sudden loss of particle rotations.
Most of the tool code was already in place, only significant
functionality change is that anchored stroke works now.
TODO:
* Gave it a new icon, but could use a better one
* Default .blend should have a clay strips brush
Fix for:
[#29758] Sequencer `Image Offset` error with render percentage
also:
* make preprocess parameters completely independent from render resolution
(they are always relative to *final* resolution now)
* fix yesterdays fix for proxy resolution rendering (the case of unbuild
proxies wasn't handled correctly)
Note about long lines: I did not touch to two pieces of code (because I don’t see any way to keep a nicely formated, compact code, with shorter lines):
* The node types definitions into rna_nodetree_types.h
* The vgroup name functions into rna_particle.c
use different types for bm.verts.layers, bm.faces.layers, otherwise the layers look to have customdata type that isnt compatible, UV's on edges for eg.
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol.
Loading old files works, saving legacy format works too.
What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge.
(it wont crash but the blue and red will be swapped on vertex color layers).
The fix is to check for cases where BME_Bevel_Dissolve_Disk was trying
to join faces with opposite normals and reverse one. This isn't a great
fix, and the example blend has strange corners at the top after beveling,
but at least it stops the infinite loops.
*Add menu is now translated.
*Nodes' title is now translated.
*Nodes' sockets' labels are now translated.
However, about the last point, and unless I’m mistaking, we’ll have to add the "i18n tag" N_() to all sockets' names, in the input/ouput templates declaration, in all nodes' files, as those sockets are collections created at runtime, I think po-generating script has no way to access that from bpy.types... Quite a piece of (borring) work. :/
split up BMElemSeq into BMVertSeq, BMEdgeSeq, BMFaceSeq and BMLoopSeq
Was becoming cumbersome since each needed their own new() function, and other methods only worked for some of these types.
Added BMesh.loops - since you cant iterate over loops this is for customdata access only.