Age | Commit message (Collapse) | Author |
|
EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere).
|
|
convert.
|
|
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
|
|
|
|
args.
|
|
|
|
(edges selected but nothing else).
add arg to BKE_mesh_calc_edges() so selecting newly created edges is optional.
|
|
also correct odd indentation.
|
|
which doesn't do object type conversion.
|
|
use mpolys instead and simplify checks for wire edges.
Also rename BKE_mesh_from_curve() --> BKE_mesh_to_curve() since this function converts a mesh into a curve.
|
|
loading old blend files without edge data.
|
|
Now we do simple triangulation and calculate signed area of triangles to
account for concave polygons.
This only works correct for planar polygons but gives better results
overall.
|
|
|
|
Issue was caused by couple of circumstances:
- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview
All this leads to threading conflict between preview render and undo
system.
Solved it in way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.
This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:
- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
but adds temporary mesh to specified Main.
So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.
Viewport render shall not be an issue because object sync happens from
main thread in this case.
It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.
Thanks to Brecht for review!
|
|
|
|
This means the deformation on the input to the modifier can be re-applied ontop of the mesh cache.
In practice this is most useful for using corrective shape-keys with mesh-cache.
|
|
|
|
|
|
render engines). Replaced generating orco_index by filling the UV loop data
directly which is easier and all that needed to be done anyway.
|
|
unless they are needed.
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
|
|
- free_dverts -> BKE_defvert_array_free
- copy_dverts -> BKE_defvert_array_copy
also move the functions from BKE_mesh into BKE_deform
|
|
speedup for BMesh ngons which never have holes and ensures predictable triangle count (totvert - 2), which is needed for pre-calculating array size.
|
|
isnt fool-proof, will need more work.
|
|
|
|
currently unused.
|
|
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).
|
|
- use 2 omp sections for vert -> (edge, face) selection flushing.
- dont use face-loop iterator for cddm_from_bmesh_ex conversion to give some speedup (some modifiers use this).
- use float(*)[3] for functions that return coords.
|
|
now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
|
|
|
|
which uses stack memory always and doesn't need to be freed explicitly.
|
|
scanfill remove-doubles pass assumes ordered edges (as with curves), otherwise it can hang.
workaround this problem by skipping removing-doubles for mesh ngons, since this isnt such a common case as it is with curves and we can just not support it.
|
|
to avoid many small malloc's by passing a fixes size stack variable instead.
Will give some speedup to edge-split modifier and bevel.
|
|
|
|
|
|
|
|
reported as [#29376] BMESH_TODO: remove tessface CD_ORIGINDEX layer
for a single mesh there could be 3 origindex mappings stored, one on the polygons and 2 on the tessfaces.
(CD_POLYINDEX and CD_ORIGINDEX).
as Andrew suggests, now tessfaces (which are really a cache of polygons), using origindex to point to polygons on
the same derived mesh, and polygons only store the original index values.
|
|
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
|
|
This uses the weighted average of polygon centroids based on area
It work well in most cases but will be slightly wrong when polygons have
many vertices.
|
|
|
|
|
|
for face data was NULL.
|
|
|
|
avoid calculating twice when dupli-scale is enabled.
|
|
concave ngons could flip the dupliface, now use the faces normal when calculating the dupli-face.
|
|
TODO - drop support from the renderer still.
|
|
UNLIKELY().
|
|
|
|
|
|
references in bmesh docs.
|
|
ideally these would be used as generated coordinates, but this is tricly because cycles calculates its own orco's and doesnt know about curve settings.
|