2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2005 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup modifiers
|
2011-02-25 13:57:17 +00:00
|
|
|
*/
|
|
|
|
|
|
2022-10-06 16:05:56 -05:00
|
|
|
#include <cstring>
|
2010-04-12 22:33:43 +00:00
|
|
|
|
2019-02-25 11:39:14 +01:00
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
|
|
|
|
|
#include "BLI_bitmap.h"
|
|
|
|
|
#include "BLI_math_matrix.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BLI_math_vector.h"
|
2019-02-25 11:39:14 +01:00
|
|
|
|
2012-04-10 14:11:45 +00:00
|
|
|
#include "DNA_image_types.h"
|
2018-04-19 11:03:58 +02:00
|
|
|
#include "DNA_mesh_types.h"
|
2010-04-11 22:12:30 +00:00
|
|
|
#include "DNA_modifier_types.h"
|
|
|
|
|
#include "DNA_object_types.h"
|
|
|
|
|
|
2020-04-10 14:03:36 +02:00
|
|
|
#include "BKE_action.h" /* BKE_pose_channel_find_name */
|
2023-12-12 17:49:51 -05:00
|
|
|
#include "BKE_attribute.hh"
|
2024-01-29 18:57:16 -05:00
|
|
|
#include "BKE_deform.hh"
|
2023-11-16 11:41:55 +01:00
|
|
|
#include "BKE_editmesh.hh"
|
2012-04-10 14:11:45 +00:00
|
|
|
#include "BKE_image.h"
|
2023-11-16 11:41:55 +01:00
|
|
|
#include "BKE_lattice.hh"
|
2011-01-07 19:18:31 +00:00
|
|
|
|
2023-11-14 09:30:40 +01:00
|
|
|
#include "BKE_modifier.hh"
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2023-09-22 03:18:17 +02:00
|
|
|
#include "DEG_depsgraph.hh"
|
|
|
|
|
#include "DEG_depsgraph_query.hh"
|
2018-05-23 15:52:35 +02:00
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
#include "MOD_modifiertypes.hh"
|
|
|
|
|
#include "MOD_util.hh"
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2010-04-12 22:33:43 +00:00
|
|
|
#include "MEM_guardedalloc.h"
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2018-12-07 15:45:53 +01:00
|
|
|
void MOD_init_texture(MappingInfoModifierData *dmd, const ModifierEvalContext *ctx)
|
2012-04-10 14:11:45 +00:00
|
|
|
{
|
2019-03-26 11:25:07 +01:00
|
|
|
Tex *tex = dmd->texture;
|
2018-12-07 15:45:53 +01:00
|
|
|
|
2022-10-06 16:05:56 -05:00
|
|
|
if (tex == nullptr) {
|
2012-04-10 14:11:45 +00:00
|
|
|
return;
|
2018-12-07 15:45:53 +01:00
|
|
|
}
|
2012-04-10 14:11:45 +00:00
|
|
|
|
2014-01-14 04:59:58 +11:00
|
|
|
if (tex->ima && BKE_image_is_animated(tex->ima)) {
|
2019-06-17 11:39:52 +02:00
|
|
|
BKE_image_user_frame_calc(tex->ima, &tex->iuser, DEG_get_ctime(ctx->depsgraph));
|
2014-01-14 04:59:58 +11:00
|
|
|
}
|
2012-04-10 14:11:45 +00:00
|
|
|
}
|
|
|
|
|
|
2018-05-07 18:14:15 +02:00
|
|
|
void MOD_get_texture_coords(MappingInfoModifierData *dmd,
|
2022-10-12 10:27:27 +11:00
|
|
|
const ModifierEvalContext * /*ctx*/,
|
2018-05-07 18:14:15 +02:00
|
|
|
Object *ob,
|
|
|
|
|
Mesh *mesh,
|
2018-05-08 11:57:34 +02:00
|
|
|
float (*cos)[3],
|
2018-05-07 18:14:15 +02:00
|
|
|
float (*r_texco)[3])
|
|
|
|
|
{
|
2023-03-29 14:16:31 +11:00
|
|
|
/* TODO: to be renamed to `get_texture_coords` once we are done with moving modifiers to Mesh. */
|
|
|
|
|
|
Mesh: Replace MLoop struct with generic attributes
Implements #102359.
Split the `MLoop` struct into two separate integer arrays called
`corner_verts` and `corner_edges`, referring to the vertex each corner
is attached to and the next edge around the face at each corner. These
arrays can be sliced to give access to the edges or vertices in a face.
Then they are often referred to as "poly_verts" or "poly_edges".
The main benefits are halving the necessary memory bandwidth when only
one array is used and simplifications from using regular integer indices
instead of a special-purpose struct.
The commit also starts a renaming from "loop" to "corner" in mesh code.
Like the other mesh struct of array refactors, forward compatibility is
kept by writing files with the older format. This will be done until 4.0
to ease the transition process.
Looking at a small portion of the patch should give a good impression
for the rest of the changes. I tried to make the changes as small as
possible so it's easy to tell the correctness from the diff. Though I
found Blender developers have been very inventive over the last decade
when finding different ways to loop over the corners in a face.
For performance, nearly every piece of code that deals with `Mesh` is
slightly impacted. Any algorithm that is memory bottle-necked should
see an improvement. For example, here is a comparison of interpolating
a vertex float attribute to face corners (Ryzen 3700x):
**Before** (Average: 3.7 ms, Min: 3.4 ms)
```
threading::parallel_for(loops.index_range(), 4096, [&](IndexRange range) {
for (const int64_t i : range) {
dst[i] = src[loops[i].v];
}
});
```
**After** (Average: 2.9 ms, Min: 2.6 ms)
```
array_utils::gather(src, corner_verts, dst);
```
That's an improvement of 28% to the average timings, and it's also a
simplification, since an index-based routine can be used instead.
For more examples using the new arrays, see the design task.
Pull Request: https://projects.blender.org/blender/blender/pulls/104424
2023-03-20 15:55:13 +01:00
|
|
|
using namespace blender;
|
2023-12-20 02:21:48 +01:00
|
|
|
const int verts_num = mesh->verts_num;
|
2018-05-07 18:14:15 +02:00
|
|
|
int i;
|
|
|
|
|
int texmapping = dmd->texmapping;
|
2020-04-10 14:03:36 +02:00
|
|
|
float mapref_imat[4][4];
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-05-07 18:14:15 +02:00
|
|
|
if (texmapping == MOD_DISP_MAP_OBJECT) {
|
2022-10-06 16:05:56 -05:00
|
|
|
if (dmd->map_object != nullptr) {
|
2019-03-26 11:25:07 +01:00
|
|
|
Object *map_object = dmd->map_object;
|
2020-04-10 14:03:36 +02:00
|
|
|
if (dmd->map_bone[0] != '\0') {
|
|
|
|
|
bPoseChannel *pchan = BKE_pose_channel_find_name(map_object->pose, dmd->map_bone);
|
|
|
|
|
if (pchan) {
|
|
|
|
|
float mat_bone_world[4][4];
|
2024-02-14 16:14:49 +01:00
|
|
|
mul_m4_m4m4(mat_bone_world, map_object->object_to_world().ptr(), pchan->pose_mat);
|
2020-04-10 14:03:36 +02:00
|
|
|
invert_m4_m4(mapref_imat, mat_bone_world);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2024-02-14 16:14:49 +01:00
|
|
|
invert_m4_m4(mapref_imat, map_object->object_to_world().ptr());
|
2020-04-10 14:03:36 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
2024-02-14 16:14:49 +01:00
|
|
|
invert_m4_m4(mapref_imat, map_object->object_to_world().ptr());
|
2020-04-10 14:03:36 +02:00
|
|
|
}
|
2018-12-07 15:45:53 +01:00
|
|
|
}
|
|
|
|
|
else { /* if there is no map object, default to local */
|
2018-05-07 18:14:15 +02:00
|
|
|
texmapping = MOD_DISP_MAP_LOCAL;
|
2018-12-07 15:45:53 +01:00
|
|
|
}
|
2018-05-07 18:14:15 +02:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-05-07 18:14:15 +02:00
|
|
|
/* UVs need special handling, since they come from faces */
|
|
|
|
|
if (texmapping == MOD_DISP_MAP_UV) {
|
2023-12-19 20:38:59 -05:00
|
|
|
if (CustomData_has_layer(&mesh->corner_data, CD_PROP_FLOAT2)) {
|
2023-07-24 22:06:55 +02:00
|
|
|
const OffsetIndices faces = mesh->faces();
|
Mesh: Replace MLoop struct with generic attributes
Implements #102359.
Split the `MLoop` struct into two separate integer arrays called
`corner_verts` and `corner_edges`, referring to the vertex each corner
is attached to and the next edge around the face at each corner. These
arrays can be sliced to give access to the edges or vertices in a face.
Then they are often referred to as "poly_verts" or "poly_edges".
The main benefits are halving the necessary memory bandwidth when only
one array is used and simplifications from using regular integer indices
instead of a special-purpose struct.
The commit also starts a renaming from "loop" to "corner" in mesh code.
Like the other mesh struct of array refactors, forward compatibility is
kept by writing files with the older format. This will be done until 4.0
to ease the transition process.
Looking at a small portion of the patch should give a good impression
for the rest of the changes. I tried to make the changes as small as
possible so it's easy to tell the correctness from the diff. Though I
found Blender developers have been very inventive over the last decade
when finding different ways to loop over the corners in a face.
For performance, nearly every piece of code that deals with `Mesh` is
slightly impacted. Any algorithm that is memory bottle-necked should
see an improvement. For example, here is a comparison of interpolating
a vertex float attribute to face corners (Ryzen 3700x):
**Before** (Average: 3.7 ms, Min: 3.4 ms)
```
threading::parallel_for(loops.index_range(), 4096, [&](IndexRange range) {
for (const int64_t i : range) {
dst[i] = src[loops[i].v];
}
});
```
**After** (Average: 2.9 ms, Min: 2.6 ms)
```
array_utils::gather(src, corner_verts, dst);
```
That's an improvement of 28% to the average timings, and it's also a
simplification, since an index-based routine can be used instead.
For more examples using the new arrays, see the design task.
Pull Request: https://projects.blender.org/blender/blender/pulls/104424
2023-03-20 15:55:13 +01:00
|
|
|
const Span<int> corner_verts = mesh->corner_verts();
|
2022-03-28 12:29:47 +11:00
|
|
|
BLI_bitmap *done = BLI_BITMAP_NEW(verts_num, __func__);
|
2018-05-07 18:14:15 +02:00
|
|
|
char uvname[MAX_CUSTOMDATA_LAYER_NAME];
|
2023-12-19 20:38:59 -05:00
|
|
|
CustomData_validate_layer_name(
|
|
|
|
|
&mesh->corner_data, CD_PROP_FLOAT2, dmd->uvlayer_name, uvname);
|
2023-12-12 17:49:51 -05:00
|
|
|
const bke::AttributeAccessor attributes = mesh->attributes();
|
|
|
|
|
const VArraySpan uv_map = *attributes.lookup_or_default<float2>(
|
2023-12-20 13:13:16 -05:00
|
|
|
uvname, bke::AttrDomain::Corner, float2(0));
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-05-07 18:14:15 +02:00
|
|
|
/* verts are given the UV from the first face that uses them */
|
2023-07-24 22:06:55 +02:00
|
|
|
for (const int i : faces.index_range()) {
|
|
|
|
|
const IndexRange face = faces[i];
|
2023-07-25 10:24:46 -04:00
|
|
|
for (const int corner : face) {
|
|
|
|
|
const int vert = corner_verts[corner];
|
|
|
|
|
if (!BLI_BITMAP_TEST(done, vert)) {
|
2018-05-07 18:14:15 +02:00
|
|
|
/* remap UVs from [0, 1] to [-1, 1] */
|
2023-12-12 17:49:51 -05:00
|
|
|
r_texco[vert][0] = (uv_map[corner][0] * 2.0f) - 1.0f;
|
|
|
|
|
r_texco[vert][1] = (uv_map[corner][1] * 2.0f) - 1.0f;
|
2023-07-25 10:24:46 -04:00
|
|
|
BLI_BITMAP_ENABLE(done, vert);
|
2018-05-07 18:14:15 +02:00
|
|
|
}
|
2023-07-25 10:24:46 -04:00
|
|
|
}
|
2018-05-07 18:14:15 +02:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-05-07 18:14:15 +02:00
|
|
|
MEM_freeN(done);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2020-08-07 12:40:29 +02:00
|
|
|
|
|
|
|
|
/* if there are no UVs, default to local */
|
|
|
|
|
texmapping = MOD_DISP_MAP_LOCAL;
|
2018-05-07 18:14:15 +02:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2023-06-14 11:59:32 -04:00
|
|
|
const Span<float3> positions = mesh->vert_positions();
|
Mesh: Move positions to a generic attribute
**Changes**
As described in T93602, this patch removes all use of the `MVert`
struct, replacing it with a generic named attribute with the name
`"position"`, consistent with other geometry types.
Variable names have been changed from `verts` to `positions`, to align
with the attribute name and the more generic design (positions are not
vertices, they are just an attribute stored on the point domain).
This change is made possible by previous commits that moved all other
data out of `MVert` to runtime data or other generic attributes. What
remains is mostly a simple type change. Though, the type still shows up
859 times, so the patch is quite large.
One compromise is that now `CD_MASK_BAREMESH` now contains
`CD_PROP_FLOAT3`. With the general move towards generic attributes
over custom data types, we are removing use of these type masks anyway.
**Benefits**
The most obvious benefit is reduced memory usage and the benefits
that brings in memory-bound situations. `float3` is only 3 bytes, in
comparison to `MVert` which was 4. When there are millions of vertices
this starts to matter more.
The other benefits come from using a more generic type. Instead of
writing algorithms specifically for `MVert`, code can just use arrays
of vectors. This will allow eliminating many temporary arrays or
wrappers used to extract positions.
Many possible improvements aren't implemented in this patch, though
I did switch simplify or remove the process of creating temporary
position arrays in a few places.
The design clarity that "positions are just another attribute" brings
allows removing explicit copying of vertices in some procedural
operations-- they are just processed like most other attributes.
**Performance**
This touches so many areas that it's hard to benchmark exhaustively,
but I observed some areas as examples.
* The mesh line node with 4 million count was 1.5x (8ms to 12ms) faster.
* The Spring splash screen went from ~4.3 to ~4.5 fps.
* The subdivision surface modifier/node was slightly faster
RNA access through Python may be slightly slower, since now we need
a name lookup instead of just a custom data type lookup for each index.
**Future Improvements**
* Remove uses of "vert_coords" functions:
* `BKE_mesh_vert_coords_alloc`
* `BKE_mesh_vert_coords_get`
* `BKE_mesh_vert_coords_apply{_with_mat4}`
* Remove more hidden copying of positions
* General simplification now possible in many areas
* Convert more code to C++ to use `float3` instead of `float[3]`
* Currently `reinterpret_cast` is used for those C-API functions
Differential Revision: https://developer.blender.org/D15982
2023-01-10 00:10:43 -05:00
|
|
|
for (i = 0; i < verts_num; i++, r_texco++) {
|
2018-05-07 18:14:15 +02:00
|
|
|
switch (texmapping) {
|
|
|
|
|
case MOD_DISP_MAP_LOCAL:
|
Mesh: Move positions to a generic attribute
**Changes**
As described in T93602, this patch removes all use of the `MVert`
struct, replacing it with a generic named attribute with the name
`"position"`, consistent with other geometry types.
Variable names have been changed from `verts` to `positions`, to align
with the attribute name and the more generic design (positions are not
vertices, they are just an attribute stored on the point domain).
This change is made possible by previous commits that moved all other
data out of `MVert` to runtime data or other generic attributes. What
remains is mostly a simple type change. Though, the type still shows up
859 times, so the patch is quite large.
One compromise is that now `CD_MASK_BAREMESH` now contains
`CD_PROP_FLOAT3`. With the general move towards generic attributes
over custom data types, we are removing use of these type masks anyway.
**Benefits**
The most obvious benefit is reduced memory usage and the benefits
that brings in memory-bound situations. `float3` is only 3 bytes, in
comparison to `MVert` which was 4. When there are millions of vertices
this starts to matter more.
The other benefits come from using a more generic type. Instead of
writing algorithms specifically for `MVert`, code can just use arrays
of vectors. This will allow eliminating many temporary arrays or
wrappers used to extract positions.
Many possible improvements aren't implemented in this patch, though
I did switch simplify or remove the process of creating temporary
position arrays in a few places.
The design clarity that "positions are just another attribute" brings
allows removing explicit copying of vertices in some procedural
operations-- they are just processed like most other attributes.
**Performance**
This touches so many areas that it's hard to benchmark exhaustively,
but I observed some areas as examples.
* The mesh line node with 4 million count was 1.5x (8ms to 12ms) faster.
* The Spring splash screen went from ~4.3 to ~4.5 fps.
* The subdivision surface modifier/node was slightly faster
RNA access through Python may be slightly slower, since now we need
a name lookup instead of just a custom data type lookup for each index.
**Future Improvements**
* Remove uses of "vert_coords" functions:
* `BKE_mesh_vert_coords_alloc`
* `BKE_mesh_vert_coords_get`
* `BKE_mesh_vert_coords_apply{_with_mat4}`
* Remove more hidden copying of positions
* General simplification now possible in many areas
* Convert more code to C++ to use `float3` instead of `float[3]`
* Currently `reinterpret_cast` is used for those C-API functions
Differential Revision: https://developer.blender.org/D15982
2023-01-10 00:10:43 -05:00
|
|
|
copy_v3_v3(*r_texco, cos != nullptr ? *cos : positions[i]);
|
2018-05-07 18:14:15 +02:00
|
|
|
break;
|
|
|
|
|
case MOD_DISP_MAP_GLOBAL:
|
2024-02-14 16:14:49 +01:00
|
|
|
mul_v3_m4v3(*r_texco, ob->object_to_world().ptr(), cos != nullptr ? *cos : positions[i]);
|
2018-05-07 18:14:15 +02:00
|
|
|
break;
|
|
|
|
|
case MOD_DISP_MAP_OBJECT:
|
2024-02-14 16:14:49 +01:00
|
|
|
mul_v3_m4v3(*r_texco, ob->object_to_world().ptr(), cos != nullptr ? *cos : positions[i]);
|
2020-04-10 14:03:36 +02:00
|
|
|
mul_m4_v3(mapref_imat, *r_texco);
|
2018-05-07 18:14:15 +02:00
|
|
|
break;
|
|
|
|
|
}
|
2022-10-06 16:05:56 -05:00
|
|
|
if (cos != nullptr) {
|
2018-05-08 11:57:34 +02:00
|
|
|
cos++;
|
|
|
|
|
}
|
2018-05-07 18:14:15 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-12 14:29:59 +10:00
|
|
|
void MOD_previous_vcos_store(ModifierData *md, const float (*vert_coords)[3])
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2012-05-06 13:38:33 +00:00
|
|
|
while ((md = md->next) && md->type == eModifierType_Armature) {
|
|
|
|
|
ArmatureModifierData *amd = (ArmatureModifierData *)md;
|
2022-10-06 16:05:56 -05:00
|
|
|
if (amd->multi && amd->vert_coords_prev == nullptr) {
|
|
|
|
|
amd->vert_coords_prev = static_cast<float(*)[3]>(MEM_dupallocN(vert_coords));
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
|
|
|
|
else {
|
2010-04-11 22:12:30 +00:00
|
|
|
break;
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
/* lattice/mesh modifier too */
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-05 16:02:05 -04:00
|
|
|
void MOD_get_vgroup(const Object *ob,
|
|
|
|
|
const Mesh *mesh,
|
|
|
|
|
const char *name,
|
|
|
|
|
const MDeformVert **dvert,
|
|
|
|
|
int *defgrp_index)
|
2018-04-19 11:03:58 +02:00
|
|
|
{
|
2021-07-13 12:10:34 -04:00
|
|
|
if (mesh) {
|
|
|
|
|
*defgrp_index = BKE_id_defgroup_name_index(&mesh->id, name);
|
|
|
|
|
if (*defgrp_index != -1) {
|
2023-12-12 20:45:16 -05:00
|
|
|
*dvert = mesh->deform_verts().data();
|
2021-07-13 12:10:34 -04:00
|
|
|
}
|
|
|
|
|
else {
|
2022-10-06 16:05:56 -05:00
|
|
|
*dvert = nullptr;
|
2021-07-13 12:10:34 -04:00
|
|
|
}
|
|
|
|
|
}
|
2023-09-27 15:33:34 -04:00
|
|
|
else if (OB_TYPE_SUPPORT_VGROUP(ob->type)) {
|
2021-07-13 12:10:34 -04:00
|
|
|
*defgrp_index = BKE_object_defgroup_name_index(ob, name);
|
|
|
|
|
if (*defgrp_index != -1 && ob->type == OB_LATTICE) {
|
2018-04-19 11:03:58 +02:00
|
|
|
*dvert = BKE_lattice_deform_verts_get(ob);
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2021-07-13 12:10:34 -04:00
|
|
|
else {
|
2022-10-06 16:05:56 -05:00
|
|
|
*dvert = nullptr;
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2018-04-19 11:03:58 +02:00
|
|
|
}
|
2023-09-27 15:33:34 -04:00
|
|
|
else {
|
|
|
|
|
*defgrp_index = -1;
|
|
|
|
|
*dvert = nullptr;
|
|
|
|
|
}
|
2018-04-19 11:03:58 +02:00
|
|
|
}
|
|
|
|
|
|
2023-06-03 08:36:28 +10:00
|
|
|
void MOD_depsgraph_update_object_bone_relation(DepsNodeHandle *node,
|
2020-04-10 22:00:21 +02:00
|
|
|
Object *object,
|
|
|
|
|
const char *bonename,
|
|
|
|
|
const char *description)
|
|
|
|
|
{
|
2022-10-06 16:05:56 -05:00
|
|
|
if (object == nullptr) {
|
2020-04-10 22:00:21 +02:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (bonename[0] != '\0' && object->type == OB_ARMATURE) {
|
|
|
|
|
DEG_add_object_relation(node, object, DEG_OB_COMP_EVAL_POSE, description);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
DEG_add_object_relation(node, object, DEG_OB_COMP_TRANSFORM, description);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-14 06:29:17 +00:00
|
|
|
void modifier_type_init(ModifierTypeInfo *types[])
|
2010-04-25 01:10:03 +00:00
|
|
|
{
|
|
|
|
|
#define INIT_TYPE(typeName) (types[eModifierType_##typeName] = &modifierType_##typeName)
|
|
|
|
|
INIT_TYPE(None);
|
|
|
|
|
INIT_TYPE(Curve);
|
|
|
|
|
INIT_TYPE(Lattice);
|
|
|
|
|
INIT_TYPE(Subsurf);
|
|
|
|
|
INIT_TYPE(Build);
|
|
|
|
|
INIT_TYPE(Array);
|
|
|
|
|
INIT_TYPE(Mirror);
|
|
|
|
|
INIT_TYPE(EdgeSplit);
|
|
|
|
|
INIT_TYPE(Bevel);
|
|
|
|
|
INIT_TYPE(Displace);
|
|
|
|
|
INIT_TYPE(UVProject);
|
|
|
|
|
INIT_TYPE(Decimate);
|
|
|
|
|
INIT_TYPE(Smooth);
|
|
|
|
|
INIT_TYPE(Cast);
|
|
|
|
|
INIT_TYPE(Wave);
|
|
|
|
|
INIT_TYPE(Armature);
|
|
|
|
|
INIT_TYPE(Hook);
|
|
|
|
|
INIT_TYPE(Softbody);
|
|
|
|
|
INIT_TYPE(Cloth);
|
|
|
|
|
INIT_TYPE(Collision);
|
|
|
|
|
INIT_TYPE(Boolean);
|
|
|
|
|
INIT_TYPE(MeshDeform);
|
2011-11-13 12:17:27 +00:00
|
|
|
INIT_TYPE(Ocean);
|
2010-04-25 01:10:03 +00:00
|
|
|
INIT_TYPE(ParticleSystem);
|
|
|
|
|
INIT_TYPE(ParticleInstance);
|
|
|
|
|
INIT_TYPE(Explode);
|
|
|
|
|
INIT_TYPE(Shrinkwrap);
|
|
|
|
|
INIT_TYPE(Mask);
|
|
|
|
|
INIT_TYPE(SimpleDeform);
|
|
|
|
|
INIT_TYPE(Multires);
|
|
|
|
|
INIT_TYPE(Surface);
|
2019-12-16 15:50:14 +01:00
|
|
|
INIT_TYPE(Fluid);
|
2010-04-25 01:10:03 +00:00
|
|
|
INIT_TYPE(ShapeKey);
|
|
|
|
|
INIT_TYPE(Solidify);
|
|
|
|
|
INIT_TYPE(Screw);
|
2011-05-01 15:16:59 +00:00
|
|
|
INIT_TYPE(Warp);
|
2011-07-25 15:27:01 +00:00
|
|
|
INIT_TYPE(WeightVGEdit);
|
|
|
|
|
INIT_TYPE(WeightVGMix);
|
|
|
|
|
INIT_TYPE(WeightVGProximity);
|
2011-05-24 07:08:58 +00:00
|
|
|
INIT_TYPE(DynamicPaint);
|
2011-12-30 21:11:40 +00:00
|
|
|
INIT_TYPE(Remesh);
|
2012-05-22 15:29:01 +00:00
|
|
|
INIT_TYPE(Skin);
|
2012-10-24 10:39:11 +00:00
|
|
|
INIT_TYPE(LaplacianSmooth);
|
2012-11-19 20:40:08 +00:00
|
|
|
INIT_TYPE(Triangulate);
|
2012-12-14 04:07:30 +00:00
|
|
|
INIT_TYPE(UVWarp);
|
2013-01-21 15:41:00 +00:00
|
|
|
INIT_TYPE(MeshCache);
|
2013-11-24 07:00:49 +11:00
|
|
|
INIT_TYPE(LaplacianDeform);
|
2013-12-22 07:08:35 +11:00
|
|
|
INIT_TYPE(Wireframe);
|
2019-12-11 22:31:20 -03:00
|
|
|
INIT_TYPE(Weld);
|
2015-01-09 21:19:12 +01:00
|
|
|
INIT_TYPE(DataTransfer);
|
2015-02-05 14:49:44 +01:00
|
|
|
INIT_TYPE(NormalEdit);
|
2015-03-29 04:44:05 +11:00
|
|
|
INIT_TYPE(CorrectiveSmooth);
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
INIT_TYPE(MeshSequenceCache);
|
2017-02-27 12:39:14 -03:00
|
|
|
INIT_TYPE(SurfaceDeform);
|
2018-05-25 22:24:24 +05:30
|
|
|
INIT_TYPE(WeightedNormal);
|
2020-09-29 16:02:40 +02:00
|
|
|
INIT_TYPE(MeshToVolume);
|
2020-10-07 18:03:07 +02:00
|
|
|
INIT_TYPE(VolumeDisplace);
|
2020-10-19 12:11:38 +02:00
|
|
|
INIT_TYPE(VolumeToMesh);
|
2020-12-02 13:25:25 +01:00
|
|
|
INIT_TYPE(Nodes);
|
2024-01-16 16:56:14 +01:00
|
|
|
INIT_TYPE(GreasePencilOpacity);
|
2024-01-18 13:02:53 +01:00
|
|
|
INIT_TYPE(GreasePencilSubdiv);
|
2024-01-19 16:59:39 +01:00
|
|
|
INIT_TYPE(GreasePencilColor);
|
|
|
|
|
INIT_TYPE(GreasePencilTint);
|
2024-01-24 04:36:36 +01:00
|
|
|
INIT_TYPE(GreasePencilSmooth);
|
2024-01-24 16:57:58 +01:00
|
|
|
INIT_TYPE(GreasePencilOffset);
|
2024-01-29 16:49:16 +01:00
|
|
|
INIT_TYPE(GreasePencilNoise);
|
2024-01-30 12:10:33 +01:00
|
|
|
INIT_TYPE(GreasePencilMirror);
|
2024-01-30 13:04:30 +01:00
|
|
|
INIT_TYPE(GreasePencilThickness);
|
2024-02-08 14:09:11 +01:00
|
|
|
INIT_TYPE(GreasePencilLattice);
|
2024-02-08 15:35:20 +01:00
|
|
|
INIT_TYPE(GreasePencilDash);
|
2024-02-15 14:19:50 +01:00
|
|
|
INIT_TYPE(GreasePencilMultiply);
|
2024-02-15 16:37:54 +01:00
|
|
|
INIT_TYPE(GreasePencilLength);
|
2024-02-16 12:30:43 +01:00
|
|
|
INIT_TYPE(GreasePencilWeightAngle);
|
2024-02-16 14:04:01 +01:00
|
|
|
INIT_TYPE(GreasePencilArray);
|
2024-02-19 11:16:38 +01:00
|
|
|
INIT_TYPE(GreasePencilWeightProximity);
|
2024-02-21 14:20:47 +01:00
|
|
|
INIT_TYPE(GreasePencilHook);
|
2024-02-26 15:28:15 +01:00
|
|
|
INIT_TYPE(GreasePencilLineart);
|
2024-02-26 19:36:10 +01:00
|
|
|
INIT_TYPE(GreasePencilArmature);
|
2024-02-27 14:17:22 +01:00
|
|
|
INIT_TYPE(GreasePencilTime);
|
2024-03-28 18:16:14 +01:00
|
|
|
INIT_TYPE(GreasePencilSimplify);
|
2024-03-01 10:42:41 +01:00
|
|
|
INIT_TYPE(GreasePencilEnvelope);
|
2024-03-04 16:54:07 +01:00
|
|
|
INIT_TYPE(GreasePencilOutline);
|
2024-03-06 12:05:00 +01:00
|
|
|
INIT_TYPE(GreasePencilShrinkwrap);
|
2024-03-20 13:28:28 +01:00
|
|
|
INIT_TYPE(GreasePencilBuild);
|
2024-03-29 21:42:30 +01:00
|
|
|
INIT_TYPE(GreasePencilTexture);
|
2010-04-25 01:10:03 +00:00
|
|
|
#undef INIT_TYPE
|
|
|
|
|
}
|