Age | Commit message (Collapse) | Author |
|
apply right.
Some deform modifiers (like armature) use passed Mesh parameter to
retrieve some extra data (vgroups in our case), and default to obdata
when it is not available.
This should be fine in theory in the 'apply modifier to obdata' case,
since this is always the first modifier, but here upper-level code
passes **evaluated** object, not orig one, so ob->data is not orig
anymore, and might miss some stuff...
Note that am quiet unsure whether the way evaluated data is passed
around in that apply modifier operator code is actually OK, but for now
it seems to work at least...
|
|
and object.
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
Was a mistake in df26f28835f, which caused access uninitialized variable.
|
|
|
|
Only mesh objects have all modifiers applied on the evaluated
object's data, other object types are to apply modifiers during
the conversion process.
|
|
- Passing original object with apply_modifiers=false will give a
non-modified non-deformed mesh.
The result mesh will point to datablocks from the original "domain". For
example, materials will be original.
- Passing original object with apply_modifiers=true will give a mesh which
has all modifiers applied.
The result mesh will point to datablocks from the original "domain". For
example, materials will be original.
- Passing evaluated object will ignore apply_modifiers argument, and the
result always contains all modifiers applied.
The result mesh will point to an evaluated datablocks. For example,
materials will be an evaluated IDs from the dependency graph.
Fixes T62916: Applying boolean modifier does not set material properly
Differential Revision: https://developer.blender.org/D4604
|
|
It is up to the operator to pass valid object to the modifiers
evaluation.
Fixes T62916: Applying boolean modifier does not set materials properly
|
|
Ownership flag was not set, but was it was meanted to be. So the set
runtime data to NULL disconnected the Mesh with no ownership.
|
|
Use the term "AFTER" instead of "OFS" since it wasn't obvious these
macros operate on everything after the struct member passed.
Avoid casting to non-const types when only reading.
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.
Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!
As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).
Reviewers: brecht, campbellbarton, sergey
Differential Revision: https://developer.blender.org/D4407
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
This was caused by curves pointing to each other
creating a cyclic dependency.
While the dependency graph detects this, generating a mesh for render
recursively generates data which cashes in this case.
Add in a check to detect cyclic links.
Note, this bug exists in 2.7x too - but only crashes on render
since 2.7x didn't use 'for_render' when converting data.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
|
|
When generating a mesh from a curve object, do not generate temp objects
and curves in main, but rather as 'localized' copies.
This is cleaner, and might add a marginal speed-up in some cases (like
rendering thousands of curve objects), since we save some processing.
Note that this is the function behind py API's `Object.to_mesh()` too.
|
|
|
|
That way it is obvious when we are using default ID copy behaviour, and
when we are using advanced/specialized ones.
|
|
Turns out most of our 'local working copy' cases can use same set of
flags.
Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes
copying, however this is no-op since that flag is unused during mesh
copying... We may want to add another set of flags without that one at
some point, but for now it would not be useful imho.
|
|
This was used in *one* place only... much better to have a dedicated
helper for that kind of things. ;)
|
|
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
|
|
|
|
|
|
|
|
C.active_object.to_mesh(C.depsgraph, True) - on curve.
More like a band-aid than anything else really, that code is horribly
weak and need to be fully re-written at some point (putting all those
temp data-blocks fully outside of bmain...). But for now should do.
|
|
The issue was caused by shape keys datablock from evaluated mesh
being added to the main database.
This commit makes it so shape keys are not copied for the mesh
used as cage.
|
|
|
|
|
|
|
|
If the caller wants loop-tris, there is a function to calculate them.
|
|
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.
Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.
Details on porting code to loop triangles is in the release notes.
Differential Revision: https://developer.blender.org/D3539
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
The main goal of this patch is to cleanup the interface of every modifier. More specifically the interface of modifiers should be DerivedMesh-free.
Internally some modifiers still use DerivedMesh. However I think it is better when the wrappers are in the modifiers so that higher level functions can use the simplified interface.
This patch removes the applyModifier_DM and applyModifierEM_DM functions. In a previous patch (rB3614d9d) the other functions that used DerivedMesh have been removed.
Reviewers: brecht
|
|
Specifically the deformVerts_DM, deformMatrices_DM, deformVertsEM_DM and deformMatricesEM_DM functions are not used anymore.
Reviewer: brecht
|
|
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
|
|
|
|
Also, fix missing cleanup of Object.runtime when copying Object
datablocks!
|
|
|
|
|
|
...Instead of doing own dirty/risky version of the same thing!
|
|
|
|
|
|
This is first commit in series of changes to get rid of md->scene.
|
|
Conflicts:
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/intern/mesh_convert.c
source/blender/editors/interface/interface_eyedropper_color.c
source/blender/editors/object/object_add.c
source/blender/editors/space_image/image_ops.c
source/blender/makesrna/intern/rna_image.c
source/blender/windowmanager/intern/wm_draw.c
|