Age | Commit message (Collapse) | Author |
|
source data layers.
Originally, when transferring all source data layers to destination
meshes, code would abort in case destination did not have all needed
layers, and creating them was not allowed.
Now, it will instead transfer data to layers that exists, merely
skipping source ones for which it cannot find a matching destination.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Part of D4277 by @sobakasu
|
|
|
|
Move all mask-related fields from Object and OperationDepsNode
to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY
if the mask changes after DEG rebuild. Update DEG API and all
code that uses it.
This fixes "source mesh data is not ready" errors from Data
Transfer modifier when parameters are changed in the UI after
the recent mesh_get_eval_final fix.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4025
|
|
It can't be used during modifier evaluation, and rna
enum code should access the evaluated objects.
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
That area is now officially purged from the Devil.. errr... DerivedMesh!
|
|
Not needed anymore, we only actually need to know wether it's orig mesh
or eval one in a few places...
|
|
Removing that stuff should be valid with new depsgraph/modifiers stack
evaluation system... BUT it might not be, so rather have those in
separate own well-isolated commit.
|
|
This was actually rather hairy, this code is huge and complicated, easy
to make mistakes...
Good thing is, it will allow for significant simplification and more
(name) cleanup in following commits ;)
|
|
The function definitions still reside in DerivedMesh.c. Once we're done
porting all the DerivedMesh use to Mesh, we'll move the still-relevant
functions to mesh_runtime.c. This move is now cumbersome due to shared
statically-declared utility functions in DerivedMesh.c
|
|
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
|
|
|
|
|
|
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.
Also use const to prevent unexpected modifications.
This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
- MTexPoly structure & layer type.
- The 'Mesh.uv_textures' layers.
- DerivedMesh TexFace drawing.
- Scripts & UI.
|
|
Data transfer was not checking if the required geometry existed, thus
causing a segfault when it didn't. This adds the required checks, and
reports errors if geometry is missing.
This also replaces instances of the words "polygon" and "loop" in error
messages with "face" and "corner" respectively, to be consistent with
the rest of the existing UI.
Reviewed By: mont29
Differential Revision: http://developer.blender.org/D2410
|
|
Also renamed BKE_mesh_calc_islands_loop_poly_uv to BKE_mesh_calc_islands_loop_poly_edgeseam,
to avoid confusion...
|
|
freestyle data.
Freestyle edge/face marks are (afaik) our only actual customdata bitflags... Original work
kinda assumed we had no such things. :P
|
|
|
|
There is no real elegant solution here, ideally a modifier shall never *modify*
a source DM, but that would imply much better ways to ensure required data
is available in that source DM, which we do not have currently.
So instead, let's use brute force solution for now and always create a local copy
of our source DM, that we can modify to our heart content!
|
|
The final stage of the process (copying/interpolating new dst cddata from src cddata)
was simply broken in normal case, where we need to convert from source to destination
object space.
This patch is a bit verbose, but I cannot see how to avoid it really.
To think this code is in master since over 6 months and it only gets reported now... :/
|
|
shapekey.
Title says pretty much everything, we now have BKE and RNA funcs to get vertex, poly and
loop normals of a given shapekey.
This will be used e.g. in FBX exporter (shapekeys need normal data too).
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D1510
|
|
matches best the source one.
This allows to match and transfer data between two meshes with similar shape but complete arbitrary different transform.
Note that the result will be best if the meshes (more precisely, their vertices) are exact copies of each other.
Otherwise, method used can only perform an approximated best match, which means you'll likely get better
results if you 'visually' make them match in 3D space (and use 'Object Transform') instead.
|
|
loops.
Simply check and early return in case we have no source or destination items
(verts/edges/loops/polys) available...
Also, fix an assert in `BKE_mesh_calc_normals_poly()`, when called with no poly.
|
|
|
|
Titles says everything, just two notes:
* We have to actually transfer plain *normals*, not 'compressed' clnors,
so had to add pre/post process to transfer to make the conversions.
* Also added interpolation and advanced copy/mixing to CD_NORMAL, for same reasons.
|
|
|
|
Issue was, when requesting (building) lnors for a mesh that has
autosmooth disabled, one would expect to simply get vnors as lnors.
Until now, it wasn't the case, which was bad e.g. for normal projections
of loops in recent remap code (projecting along split loop normals
when you would expect projection along vertex normals...).
Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`.
This should *always* use mesh settings (both autosmooth and smoothresh),
otherwise once again we'd get inconsistencies in some cases.
Will update fbx and obj addons too.
|
|
Mesh stores its dvert in a specific pointer too, in addition of regular CD layer...
That whole vgroup handling is really breaking apart the 'universality' of CD system. :(
Also added some DAG and WM updates in operators...
|
|
UVSeam, Freestyle marks, etc.
|
|
same file names with ED_object's one.
|