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
|
|
|
*/
|
|
|
|
|
|
Cleanup: reduce amount of math-related includes
Using ClangBuildAnalyzer on the whole Blender build, it was pointing
out that BLI_math.h is the heaviest "header hub" (i.e. non tiny file
that is included a lot).
However, there's very little (actually zero) source files in Blender
that need "all the math" (base, colors, vectors, matrices,
quaternions, intersection, interpolation, statistics, solvers and
time). A common use case is source files needing just vectors, or
just vectors & matrices, or just colors etc. Actually, 181 files
were including the whole math thing without needing it at all.
This change removes BLI_math.h completely, and instead in all the
places that need it, includes BLI_math_vector.h or BLI_math_color.h
and so on.
Change from that:
- BLI_math_color.h was included 1399 times -> now 408 (took 114.0sec
to parse -> now 36.3sec)
- BLI_simd.h 1403 -> 418 (109.7sec -> 34.9sec).
Full rebuild of Blender (Apple M1, Xcode, RelWithDebInfo) is not
affected much (342sec -> 334sec). Most of benefit would be when
someone's changing BLI_simd.h or BLI_math_color.h or similar files,
that now there's 3x fewer files result in a recompile.
Pull Request #110944
2023-08-09 11:39:20 +03:00
|
|
|
#include "BLI_math_matrix.h"
|
2022-12-21 13:10:51 -06:00
|
|
|
#include "BLI_math_vector.h"
|
2021-04-23 10:06:46 +02:00
|
|
|
#include "BLI_task.h"
|
2021-04-24 00:02:44 +10:00
|
|
|
#include "BLI_utildefines.h"
|
2020-06-05 10:41:03 -04:00
|
|
|
#include "BLT_translation.h"
|
|
|
|
|
|
2020-10-01 09:38:00 -05:00
|
|
|
#include "DNA_defaults.h"
|
2018-04-19 11:03:58 +02:00
|
|
|
#include "DNA_mesh_types.h"
|
2010-04-12 01:09:59 +00:00
|
|
|
#include "DNA_meshdata_types.h"
|
2010-08-04 04:01:27 +00:00
|
|
|
#include "DNA_object_types.h"
|
2020-06-05 10:41:03 -04:00
|
|
|
#include "DNA_screen_types.h"
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2023-11-16 11:41:55 +01:00
|
|
|
#include "BKE_context.hh"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BKE_deform.h"
|
2023-11-16 11:41:55 +01:00
|
|
|
#include "BKE_editmesh.hh"
|
2024-01-15 12:44:04 -05:00
|
|
|
#include "BKE_lib_id.hh"
|
2020-02-10 12:58:59 +01:00
|
|
|
#include "BKE_lib_query.h"
|
2023-08-02 22:14:18 +02:00
|
|
|
#include "BKE_mesh.hh"
|
|
|
|
|
#include "BKE_mesh_wrapper.hh"
|
2023-11-14 09:30:40 +01:00
|
|
|
#include "BKE_modifier.hh"
|
2023-09-25 17:48:21 -04:00
|
|
|
#include "BKE_screen.hh"
|
2020-06-05 10:41:03 -04:00
|
|
|
|
2023-08-05 02:57:52 +02:00
|
|
|
#include "UI_interface.hh"
|
|
|
|
|
#include "UI_resources.hh"
|
2020-06-05 10:41:03 -04:00
|
|
|
|
2023-08-10 22:40:27 +02:00
|
|
|
#include "RNA_access.hh"
|
2022-03-14 16:54:46 +01:00
|
|
|
#include "RNA_prototypes.h"
|
2011-01-07 19:18:31 +00:00
|
|
|
|
2023-09-22 03:18:17 +02:00
|
|
|
#include "DEG_depsgraph_query.hh"
|
2018-12-07 15:45:53 +01:00
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
#include "MOD_ui_common.hh"
|
|
|
|
|
#include "MOD_util.hh"
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2014-04-03 18:57:37 +11:00
|
|
|
#define BEND_EPS 0.000001f
|
|
|
|
|
|
2021-04-23 10:06:46 +02:00
|
|
|
ALIGN_STRUCT struct DeformUserData {
|
|
|
|
|
bool invert_vgroup;
|
|
|
|
|
char mode;
|
|
|
|
|
char deform_axis;
|
|
|
|
|
int lock_axis;
|
|
|
|
|
int vgroup;
|
|
|
|
|
int limit_axis;
|
|
|
|
|
float weight;
|
|
|
|
|
float smd_factor;
|
|
|
|
|
float smd_limit[2];
|
|
|
|
|
float (*vertexCos)[3];
|
2021-04-24 00:02:44 +10:00
|
|
|
const SpaceTransform *transf;
|
|
|
|
|
const MDeformVert *dvert;
|
2021-04-23 10:06:46 +02:00
|
|
|
};
|
|
|
|
|
|
2018-09-03 16:49:08 +02:00
|
|
|
/* Re-maps the indices for X Y Z by shifting them up and wrapping, such that
|
2018-01-09 14:59:45 +11:00
|
|
|
* X = Y, Y = Z, Z = X (for X axis), and X = Z, Y = X, Z = Y (for Y axis). This
|
|
|
|
|
* exists because the deformations (excluding bend) are based on the Z axis.
|
|
|
|
|
* Having this helps avoid long, drawn out switches. */
|
|
|
|
|
static const uint axis_map_table[3][3] = {
|
|
|
|
|
{1, 2, 0},
|
|
|
|
|
{2, 0, 1},
|
|
|
|
|
{0, 1, 2},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
BLI_INLINE void copy_v3_v3_map(float a[3], const float b[3], const uint map[3])
|
|
|
|
|
{
|
|
|
|
|
a[0] = b[map[0]];
|
|
|
|
|
a[1] = b[map[1]];
|
|
|
|
|
a[2] = b[map[2]];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BLI_INLINE void copy_v3_v3_unmap(float a[3], const float b[3], const uint map[3])
|
|
|
|
|
{
|
|
|
|
|
a[map[0]] = b[0];
|
|
|
|
|
a[map[1]] = b[1];
|
|
|
|
|
a[map[2]] = b[2];
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-19 18:53:16 +11:00
|
|
|
/**
|
|
|
|
|
* Clamps/Limits the given coordinate to: limits[0] <= co[axis] <= limits[1]
|
|
|
|
|
* The amount of clamp is saved on `dcut`.
|
|
|
|
|
*/
|
2018-01-09 14:59:45 +11:00
|
|
|
static void axis_limit(const int axis, const float limits[2], float co[3], float dcut[3])
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
|
|
|
|
float val = co[axis];
|
2019-04-22 09:15:10 +10:00
|
|
|
if (limits[0] > val) {
|
2012-03-24 06:24:53 +00:00
|
|
|
val = limits[0];
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
|
|
|
|
if (limits[1] < val) {
|
2012-03-24 06:24:53 +00:00
|
|
|
val = limits[1];
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2010-04-11 22:12:30 +00:00
|
|
|
dcut[axis] = co[axis] - val;
|
|
|
|
|
co[axis] = val;
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
static void simpleDeform_taper(const float factor,
|
2023-05-04 18:35:37 +02:00
|
|
|
const int /*axis*/,
|
2018-01-09 14:59:45 +11:00
|
|
|
const float dcut[3],
|
|
|
|
|
float r_co[3])
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2012-06-12 23:19:52 +00:00
|
|
|
float x = r_co[0], y = r_co[1], z = r_co[2];
|
2012-05-06 13:38:33 +00:00
|
|
|
float scale = z * factor;
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2012-06-12 23:19:52 +00:00
|
|
|
r_co[0] = x + x * scale;
|
|
|
|
|
r_co[1] = y + y * scale;
|
|
|
|
|
r_co[2] = z;
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
add_v3_v3(r_co, dcut);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
static void simpleDeform_stretch(const float factor,
|
2023-05-04 18:35:37 +02:00
|
|
|
const int /*axis*/,
|
2018-01-09 14:59:45 +11:00
|
|
|
const float dcut[3],
|
|
|
|
|
float r_co[3])
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2012-06-12 23:19:52 +00:00
|
|
|
float x = r_co[0], y = r_co[1], z = r_co[2];
|
2010-04-11 22:12:30 +00:00
|
|
|
float scale;
|
|
|
|
|
|
2012-05-06 13:38:33 +00:00
|
|
|
scale = (z * z * factor - factor + 1.0f);
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2012-06-12 23:19:52 +00:00
|
|
|
r_co[0] = x * scale;
|
|
|
|
|
r_co[1] = y * scale;
|
|
|
|
|
r_co[2] = z * (1.0f + factor);
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
add_v3_v3(r_co, dcut);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
static void simpleDeform_twist(const float factor,
|
2023-05-04 18:35:37 +02:00
|
|
|
const int /*axis*/,
|
2018-01-09 14:59:45 +11:00
|
|
|
const float *dcut,
|
|
|
|
|
float r_co[3])
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2012-06-12 23:19:52 +00:00
|
|
|
float x = r_co[0], y = r_co[1], z = r_co[2];
|
2010-04-11 22:12:30 +00:00
|
|
|
float theta, sint, cost;
|
|
|
|
|
|
2012-05-06 13:38:33 +00:00
|
|
|
theta = z * factor;
|
2012-06-12 23:19:52 +00:00
|
|
|
sint = sinf(theta);
|
|
|
|
|
cost = cosf(theta);
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2012-06-12 23:19:52 +00:00
|
|
|
r_co[0] = x * cost - y * sint;
|
|
|
|
|
r_co[1] = x * sint + y * cost;
|
|
|
|
|
r_co[2] = z;
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
add_v3_v3(r_co, dcut);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
static void simpleDeform_bend(const float factor,
|
|
|
|
|
const int axis,
|
|
|
|
|
const float dcut[3],
|
|
|
|
|
float r_co[3])
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2012-06-12 23:19:52 +00:00
|
|
|
float x = r_co[0], y = r_co[1], z = r_co[2];
|
2010-04-11 22:12:30 +00:00
|
|
|
float theta, sint, cost;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-04-03 18:57:37 +11:00
|
|
|
BLI_assert(!(fabsf(factor) < BEND_EPS));
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
switch (axis) {
|
|
|
|
|
case 0:
|
|
|
|
|
ATTR_FALLTHROUGH;
|
|
|
|
|
case 1:
|
|
|
|
|
theta = z * factor;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
theta = x * factor;
|
|
|
|
|
}
|
2012-06-12 23:19:52 +00:00
|
|
|
sint = sinf(theta);
|
|
|
|
|
cost = cosf(theta);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-04-30 23:38:31 +10:00
|
|
|
/* NOTE: the operations below a susceptible to float precision errors
|
2023-02-12 14:37:16 +11:00
|
|
|
* regarding the order of operations, take care when changing, see: #85470 */
|
2018-01-09 14:59:45 +11:00
|
|
|
switch (axis) {
|
|
|
|
|
case 0:
|
|
|
|
|
r_co[0] = x;
|
2021-04-30 23:38:31 +10:00
|
|
|
r_co[1] = y * cost + (1.0f - cost) / factor;
|
2018-01-09 14:59:45 +11:00
|
|
|
r_co[2] = -(y - 1.0f / factor) * sint;
|
|
|
|
|
{
|
|
|
|
|
r_co[0] += dcut[0];
|
|
|
|
|
r_co[1] += sint * dcut[2];
|
|
|
|
|
r_co[2] += cost * dcut[2];
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
2021-04-30 23:38:31 +10:00
|
|
|
r_co[0] = x * cost + (1.0f - cost) / factor;
|
2018-01-09 14:59:45 +11:00
|
|
|
r_co[1] = y;
|
|
|
|
|
r_co[2] = -(x - 1.0f / factor) * sint;
|
|
|
|
|
{
|
|
|
|
|
r_co[0] += sint * dcut[2];
|
|
|
|
|
r_co[1] += dcut[1];
|
|
|
|
|
r_co[2] += cost * dcut[2];
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
r_co[0] = -(y - 1.0f / factor) * sint;
|
2021-04-30 23:38:31 +10:00
|
|
|
r_co[1] = y * cost + (1.0f - cost) / factor;
|
2018-01-09 14:59:45 +11:00
|
|
|
r_co[2] = z;
|
|
|
|
|
{
|
|
|
|
|
r_co[0] += cost * dcut[0];
|
|
|
|
|
r_co[1] += sint * dcut[0];
|
|
|
|
|
r_co[2] += dcut[2];
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2021-04-23 10:06:46 +02:00
|
|
|
static void simple_helper(void *__restrict userdata,
|
|
|
|
|
const int iter,
|
2023-05-04 18:35:37 +02:00
|
|
|
const TaskParallelTLS *__restrict /*tls*/)
|
2021-04-23 10:06:46 +02:00
|
|
|
{
|
2023-05-04 18:35:37 +02:00
|
|
|
const DeformUserData *curr_deform_data = static_cast<const DeformUserData *>(userdata);
|
2021-04-24 00:02:44 +10:00
|
|
|
float weight = BKE_defvert_array_find_weight_safe(
|
|
|
|
|
curr_deform_data->dvert, iter, curr_deform_data->vgroup);
|
2021-04-23 10:06:46 +02:00
|
|
|
const uint *axis_map = axis_map_table[(curr_deform_data->mode != MOD_SIMPLEDEFORM_MODE_BEND) ?
|
|
|
|
|
curr_deform_data->deform_axis :
|
|
|
|
|
2];
|
|
|
|
|
const float base_limit[2] = {0.0f, 0.0f};
|
|
|
|
|
|
|
|
|
|
if (curr_deform_data->invert_vgroup) {
|
|
|
|
|
weight = 1.0f - weight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (weight != 0.0f) {
|
|
|
|
|
float co[3], dcut[3] = {0.0f, 0.0f, 0.0f};
|
|
|
|
|
|
|
|
|
|
if (curr_deform_data->transf) {
|
|
|
|
|
BLI_space_transform_apply(curr_deform_data->transf, curr_deform_data->vertexCos[iter]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
copy_v3_v3(co, curr_deform_data->vertexCos[iter]);
|
|
|
|
|
|
|
|
|
|
/* Apply axis limits, and axis mappings */
|
|
|
|
|
if (curr_deform_data->lock_axis & MOD_SIMPLEDEFORM_LOCK_AXIS_X) {
|
|
|
|
|
axis_limit(0, base_limit, co, dcut);
|
|
|
|
|
}
|
|
|
|
|
if (curr_deform_data->lock_axis & MOD_SIMPLEDEFORM_LOCK_AXIS_Y) {
|
|
|
|
|
axis_limit(1, base_limit, co, dcut);
|
|
|
|
|
}
|
|
|
|
|
if (curr_deform_data->lock_axis & MOD_SIMPLEDEFORM_LOCK_AXIS_Z) {
|
|
|
|
|
axis_limit(2, base_limit, co, dcut);
|
|
|
|
|
}
|
|
|
|
|
axis_limit(curr_deform_data->limit_axis, curr_deform_data->smd_limit, co, dcut);
|
|
|
|
|
|
|
|
|
|
/* apply the deform to a mapped copy of the vertex, and then re-map it back. */
|
|
|
|
|
float co_remap[3];
|
|
|
|
|
float dcut_remap[3];
|
|
|
|
|
copy_v3_v3_map(co_remap, co, axis_map);
|
|
|
|
|
copy_v3_v3_map(dcut_remap, dcut, axis_map);
|
|
|
|
|
switch (curr_deform_data->mode) {
|
|
|
|
|
case MOD_SIMPLEDEFORM_MODE_TWIST:
|
2021-06-23 12:05:40 +10:00
|
|
|
/* Apply deform. */
|
|
|
|
|
simpleDeform_twist(
|
|
|
|
|
curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap);
|
2021-04-23 10:06:46 +02:00
|
|
|
break;
|
|
|
|
|
case MOD_SIMPLEDEFORM_MODE_BEND:
|
2021-06-23 12:05:40 +10:00
|
|
|
/* Apply deform. */
|
|
|
|
|
simpleDeform_bend(
|
|
|
|
|
curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap);
|
2021-04-23 10:06:46 +02:00
|
|
|
break;
|
|
|
|
|
case MOD_SIMPLEDEFORM_MODE_TAPER:
|
2021-06-23 12:05:40 +10:00
|
|
|
/* Apply deform. */
|
|
|
|
|
simpleDeform_taper(
|
|
|
|
|
curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap);
|
2021-04-23 10:06:46 +02:00
|
|
|
break;
|
|
|
|
|
case MOD_SIMPLEDEFORM_MODE_STRETCH:
|
2021-06-23 12:05:40 +10:00
|
|
|
/* Apply deform. */
|
|
|
|
|
simpleDeform_stretch(
|
|
|
|
|
curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap);
|
2021-04-23 10:06:46 +02:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return; /* No simple-deform mode? */
|
|
|
|
|
}
|
|
|
|
|
copy_v3_v3_unmap(co, co_remap, axis_map);
|
|
|
|
|
|
2023-05-05 09:25:45 +10:00
|
|
|
/* Use vertex weight coefficient of the linear interpolation. */
|
2021-04-24 00:02:44 +10:00
|
|
|
interp_v3_v3v3(
|
|
|
|
|
curr_deform_data->vertexCos[iter], curr_deform_data->vertexCos[iter], co, weight);
|
2021-04-23 10:06:46 +02:00
|
|
|
|
|
|
|
|
if (curr_deform_data->transf) {
|
|
|
|
|
BLI_space_transform_invert(curr_deform_data->transf, curr_deform_data->vertexCos[iter]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-11 22:12:30 +00:00
|
|
|
/* simple deform modifier */
|
2018-05-12 08:04:56 +02:00
|
|
|
static void SimpleDeformModifier_do(SimpleDeformModifierData *smd,
|
2023-05-04 18:35:37 +02:00
|
|
|
const ModifierEvalContext * /*ctx*/,
|
|
|
|
|
Object *ob,
|
|
|
|
|
Mesh *mesh,
|
2018-05-12 08:04:56 +02:00
|
|
|
float (*vertexCos)[3],
|
2022-03-28 12:29:47 +11:00
|
|
|
int verts_num)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
float smd_limit[2], smd_factor;
|
2023-05-04 18:35:37 +02:00
|
|
|
SpaceTransform *transf = nullptr, tmp_transf;
|
2011-07-11 09:15:20 +00:00
|
|
|
int vgroup;
|
Mesh: Remove redundant custom data pointers
For copy-on-write, we want to share attribute arrays between meshes
where possible. Mutable pointers like `Mesh.mvert` make that difficult
by making ownership vague. They also make code more complex by adding
redundancy.
The simplest solution is just removing them and retrieving layers from
`CustomData` as needed. Similar changes have already been applied to
curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of
the pointers generally makes code more obvious and more reusable.
Mesh data is now accessed with a C++ API (`Mesh::edges()` or
`Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`).
The CoW changes this commit makes possible are described in T95845
and T95842, and started in D14139 and D14140. The change also simplifies
the ongoing mesh struct-of-array refactors from T95965.
**RNA/Python Access Performance**
Theoretically, accessing mesh elements with the RNA API may become
slower, since the layer needs to be found on every random access.
However, overhead is already high enough that this doesn't make a
noticible differenc, and performance is actually improved in some
cases. Random access can be up to 10% faster, but other situations
might be a bit slower. Generally using `foreach_get/set` are the best
way to improve performance. See the differential revision for more
discussion about Python performance.
Cycles has been updated to use raw pointers and the internal Blender
mesh types, mostly because there is no sense in having this overhead
when it's already compiled with Blender. In my tests this roughly
halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million
face grid).
Differential Revision: https://developer.blender.org/D15488
2022-09-05 11:56:34 -05:00
|
|
|
const MDeformVert *dvert;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
/* This is historically the lock axis, _not_ the deform axis as the name would imply */
|
|
|
|
|
const int deform_axis = smd->deform_axis;
|
|
|
|
|
int lock_axis = smd->axis;
|
2018-09-03 16:49:08 +02:00
|
|
|
if (smd->mode == MOD_SIMPLEDEFORM_MODE_BEND) { /* Bend mode shouldn't have any lock axis */
|
2018-01-09 14:59:45 +11:00
|
|
|
lock_axis = 0;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* Don't lock axis if it is the chosen deform axis, as this flattens
|
|
|
|
|
* the geometry */
|
|
|
|
|
if (deform_axis == 0) {
|
|
|
|
|
lock_axis &= ~MOD_SIMPLEDEFORM_LOCK_AXIS_X;
|
|
|
|
|
}
|
|
|
|
|
if (deform_axis == 1) {
|
|
|
|
|
lock_axis &= ~MOD_SIMPLEDEFORM_LOCK_AXIS_Y;
|
|
|
|
|
}
|
|
|
|
|
if (deform_axis == 2) {
|
|
|
|
|
lock_axis &= ~MOD_SIMPLEDEFORM_LOCK_AXIS_Z;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-05-06 13:38:33 +00:00
|
|
|
/* Safe-check */
|
2019-04-22 09:15:10 +10:00
|
|
|
if (smd->origin == ob) {
|
2023-05-04 18:35:37 +02:00
|
|
|
smd->origin = nullptr; /* No self references */
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 09:15:10 +10:00
|
|
|
if (smd->limit[0] < 0.0f) {
|
2012-03-24 06:24:53 +00:00
|
|
|
smd->limit[0] = 0.0f;
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
|
|
|
|
if (smd->limit[0] > 1.0f) {
|
2012-03-24 06:24:53 +00:00
|
|
|
smd->limit[0] = 1.0f;
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-10-23 13:28:22 +00:00
|
|
|
smd->limit[0] = min_ff(smd->limit[0], smd->limit[1]); /* Upper limit >= than lower limit */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-02-05 16:23:34 +11:00
|
|
|
/* Calculate matrix to convert between coordinate spaces. */
|
2023-05-04 18:35:37 +02:00
|
|
|
if (smd->origin != nullptr) {
|
2010-04-11 22:12:30 +00:00
|
|
|
transf = &tmp_transf;
|
2019-03-26 11:25:07 +01:00
|
|
|
BLI_SPACE_TRANSFORM_SETUP(transf, ob, smd->origin);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-09-25 22:05:40 +00:00
|
|
|
/* Update limits if needed */
|
2018-01-09 14:59:45 +11:00
|
|
|
int limit_axis = deform_axis;
|
|
|
|
|
if (smd->mode == MOD_SIMPLEDEFORM_MODE_BEND) {
|
|
|
|
|
/* Bend is a special case. */
|
|
|
|
|
switch (deform_axis) {
|
|
|
|
|
case 0:
|
|
|
|
|
ATTR_FALLTHROUGH;
|
|
|
|
|
case 1:
|
|
|
|
|
limit_axis = 2;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
limit_axis = 0;
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
2018-01-09 14:59:45 +11:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
|
|
|
|
float lower = FLT_MAX;
|
|
|
|
|
float upper = -FLT_MAX;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2022-03-28 12:29:47 +11:00
|
|
|
for (i = 0; i < verts_num; i++) {
|
2010-04-11 22:12:30 +00:00
|
|
|
float tmp[3];
|
2011-11-06 16:38:21 +00:00
|
|
|
copy_v3_v3(tmp, vertexCos[i]);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-08-01 16:28:31 +02:00
|
|
|
if (transf) {
|
|
|
|
|
BLI_space_transform_apply(transf, tmp);
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-10-23 13:28:22 +00:00
|
|
|
lower = min_ff(lower, tmp[limit_axis]);
|
|
|
|
|
upper = max_ff(upper, tmp[limit_axis]);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-09-03 16:49:08 +02:00
|
|
|
/* SMD values are normalized to the BV, calculate the absolute values */
|
2012-05-06 13:38:33 +00:00
|
|
|
smd_limit[1] = lower + (upper - lower) * smd->limit[1];
|
|
|
|
|
smd_limit[0] = lower + (upper - lower) * smd->limit[0];
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-10-23 13:28:22 +00:00
|
|
|
smd_factor = smd->factor / max_ff(FLT_EPSILON, smd_limit[1] - smd_limit[0]);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-04-03 18:57:37 +11:00
|
|
|
if (smd->mode == MOD_SIMPLEDEFORM_MODE_BEND) {
|
|
|
|
|
if (fabsf(smd_factor) < BEND_EPS) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
|
|
|
|
|
2018-06-29 19:02:19 +02:00
|
|
|
MOD_get_vgroup(ob, mesh, smd->vgroup_name, &dvert, &vgroup);
|
2016-03-07 11:28:21 +11:00
|
|
|
const bool invert_vgroup = (smd->flag & MOD_SIMPLEDEFORM_FLAG_INVERT_VGROUP) != 0;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-04-24 00:02:44 +10:00
|
|
|
/* Build our data. */
|
2023-05-04 18:35:37 +02:00
|
|
|
DeformUserData deform_pool_data{};
|
|
|
|
|
deform_pool_data.mode = smd->mode;
|
|
|
|
|
deform_pool_data.smd_factor = smd_factor;
|
|
|
|
|
deform_pool_data.deform_axis = deform_axis;
|
|
|
|
|
deform_pool_data.transf = transf;
|
|
|
|
|
deform_pool_data.vertexCos = vertexCos;
|
|
|
|
|
deform_pool_data.invert_vgroup = invert_vgroup;
|
|
|
|
|
deform_pool_data.lock_axis = lock_axis;
|
|
|
|
|
deform_pool_data.vgroup = vgroup;
|
|
|
|
|
deform_pool_data.smd_limit[0] = smd_limit[0];
|
|
|
|
|
deform_pool_data.smd_limit[1] = smd_limit[1];
|
|
|
|
|
deform_pool_data.dvert = dvert;
|
|
|
|
|
deform_pool_data.limit_axis = limit_axis;
|
|
|
|
|
|
2021-04-23 10:06:46 +02:00
|
|
|
/* Do deformation. */
|
|
|
|
|
TaskParallelSettings settings;
|
|
|
|
|
BLI_parallel_range_settings_defaults(&settings);
|
2022-03-28 12:29:47 +11:00
|
|
|
BLI_task_parallel_range(0, verts_num, (void *)&deform_pool_data, simple_helper, &settings);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* SimpleDeform */
|
2023-07-27 12:04:18 +10:00
|
|
|
static void init_data(ModifierData *md)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2012-05-06 13:38:33 +00:00
|
|
|
SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2020-10-01 09:38:00 -05:00
|
|
|
BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(smd, modifier));
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2020-10-01 09:38:00 -05:00
|
|
|
MEMCPY_STRUCT_AFTER(smd, DNA_struct_default_get(SimpleDeformModifierData), modifier);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2023-07-27 12:04:18 +10:00
|
|
|
static void required_data_mask(ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
|
|
|
|
SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
|
|
|
|
|
|
2023-05-05 09:25:45 +10:00
|
|
|
/* Ask for vertex-groups if we need them. */
|
Refactor CDData masks, to have one mask per mesh elem type.
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
2019-03-07 11:13:40 +01:00
|
|
|
if (smd->vgroup_name[0] != '\0') {
|
|
|
|
|
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
|
|
|
|
|
}
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2023-07-27 12:04:18 +10:00
|
|
|
static void foreach_ID_link(ModifierData *md, Object *ob, IDWalkFunc walk, void *user_data)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2012-05-06 13:38:33 +00:00
|
|
|
SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
|
2023-07-27 12:04:18 +10:00
|
|
|
walk(user_data, ob, (ID **)&smd->origin, IDWALK_CB_NOP);
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2023-07-27 12:04:18 +10:00
|
|
|
static void update_depsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 15:05:57 +05:00
|
|
|
{
|
|
|
|
|
SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
|
2023-05-04 18:35:37 +02:00
|
|
|
if (smd->origin != nullptr) {
|
2018-02-22 12:54:06 +01:00
|
|
|
DEG_add_object_relation(
|
|
|
|
|
ctx->node, smd->origin, DEG_OB_COMP_TRANSFORM, "SimpleDeform Modifier");
|
2022-08-04 12:11:31 +02:00
|
|
|
DEG_add_depends_on_transform_relation(ctx->node, "SimpleDeform Modifier");
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 15:05:57 +05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-27 12:04:18 +10:00
|
|
|
static void deform_verts(ModifierData *md,
|
|
|
|
|
const ModifierEvalContext *ctx,
|
|
|
|
|
Mesh *mesh,
|
2023-11-14 10:54:57 +01:00
|
|
|
blender::MutableSpan<blender::float3> positions)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2018-11-27 15:49:30 +01:00
|
|
|
SimpleDeformModifierData *sdmd = (SimpleDeformModifierData *)md;
|
2023-11-14 10:54:57 +01:00
|
|
|
SimpleDeformModifier_do(sdmd,
|
|
|
|
|
ctx,
|
|
|
|
|
ctx->object,
|
|
|
|
|
mesh,
|
|
|
|
|
reinterpret_cast<float(*)[3]>(positions.data()),
|
|
|
|
|
positions.size());
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
static void panel_draw(const bContext * /*C*/, Panel *panel)
|
2020-06-05 10:41:03 -04:00
|
|
|
{
|
|
|
|
|
uiLayout *row;
|
|
|
|
|
uiLayout *layout = panel->layout;
|
|
|
|
|
|
|
|
|
|
PointerRNA ob_ptr;
|
2020-09-02 14:13:26 -05:00
|
|
|
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr);
|
2020-06-05 10:41:03 -04:00
|
|
|
|
2020-09-02 14:13:26 -05:00
|
|
|
int deform_method = RNA_enum_get(ptr, "deform_method");
|
2020-06-05 10:41:03 -04:00
|
|
|
|
|
|
|
|
row = uiLayoutRow(layout, false);
|
2023-05-04 18:35:37 +02:00
|
|
|
uiItemR(row, ptr, "deform_method", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
|
|
|
|
|
uiLayoutSetPropSep(layout, true);
|
|
|
|
|
|
|
|
|
|
if (ELEM(deform_method, MOD_SIMPLEDEFORM_MODE_TAPER, MOD_SIMPLEDEFORM_MODE_STRETCH)) {
|
2023-07-29 15:06:33 +10:00
|
|
|
uiItemR(layout, ptr, "factor", UI_ITEM_NONE, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
else {
|
2023-07-29 15:06:33 +10:00
|
|
|
uiItemR(layout, ptr, "angle", UI_ITEM_NONE, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
|
2023-07-29 15:06:33 +10:00
|
|
|
uiItemR(layout, ptr, "origin", UI_ITEM_NONE, nullptr, ICON_NONE);
|
2023-05-04 18:35:37 +02:00
|
|
|
uiItemR(layout, ptr, "deform_axis", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
|
2020-09-02 14:13:26 -05:00
|
|
|
modifier_panel_end(layout, ptr);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
static void restrictions_panel_draw(const bContext * /*C*/, Panel *panel)
|
2020-06-05 10:41:03 -04:00
|
|
|
{
|
|
|
|
|
uiLayout *row;
|
|
|
|
|
uiLayout *layout = panel->layout;
|
2023-07-29 15:06:33 +10:00
|
|
|
const eUI_Item_Flag toggles_flag = UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE;
|
2020-06-05 10:41:03 -04:00
|
|
|
|
|
|
|
|
PointerRNA ob_ptr;
|
2020-09-02 14:13:26 -05:00
|
|
|
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr);
|
2020-06-05 10:41:03 -04:00
|
|
|
|
2020-09-02 14:13:26 -05:00
|
|
|
int deform_method = RNA_enum_get(ptr, "deform_method");
|
2020-06-05 10:41:03 -04:00
|
|
|
|
|
|
|
|
uiLayoutSetPropSep(layout, true);
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
uiItemR(layout, ptr, "limits", UI_ITEM_R_SLIDER, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
|
|
|
|
|
if (ELEM(deform_method,
|
|
|
|
|
MOD_SIMPLEDEFORM_MODE_TAPER,
|
|
|
|
|
MOD_SIMPLEDEFORM_MODE_STRETCH,
|
|
|
|
|
MOD_SIMPLEDEFORM_MODE_TWIST))
|
|
|
|
|
{
|
2020-09-02 14:13:26 -05:00
|
|
|
int deform_axis = RNA_enum_get(ptr, "deform_axis");
|
2020-06-05 10:41:03 -04:00
|
|
|
|
|
|
|
|
row = uiLayoutRowWithHeading(layout, true, IFACE_("Lock"));
|
|
|
|
|
if (deform_axis != 0) {
|
2023-05-04 18:35:37 +02:00
|
|
|
uiItemR(row, ptr, "lock_x", toggles_flag, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
if (deform_axis != 1) {
|
2023-05-04 18:35:37 +02:00
|
|
|
uiItemR(row, ptr, "lock_y", toggles_flag, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
if (deform_axis != 2) {
|
2023-05-04 18:35:37 +02:00
|
|
|
uiItemR(row, ptr, "lock_z", toggles_flag, nullptr, ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", nullptr);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
|
2023-07-27 12:04:18 +10:00
|
|
|
static void panel_register(ARegionType *region_type)
|
2020-06-05 10:41:03 -04:00
|
|
|
{
|
|
|
|
|
PanelType *panel_type = modifier_panel_register(
|
|
|
|
|
region_type, eModifierType_SimpleDeform, panel_draw);
|
|
|
|
|
modifier_subpanel_register(
|
2023-05-04 18:35:37 +02:00
|
|
|
region_type, "restrictions", "Restrictions", nullptr, restrictions_panel_draw, panel_type);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
|
2010-04-11 22:12:30 +00:00
|
|
|
ModifierTypeInfo modifierType_SimpleDeform = {
|
2023-07-26 17:08:14 +02:00
|
|
|
/*idname*/ "SimpleDeform",
|
2023-01-16 12:41:11 +11:00
|
|
|
/*name*/ N_("SimpleDeform"),
|
2023-07-27 12:04:18 +10:00
|
|
|
/*struct_name*/ "SimpleDeformModifierData",
|
|
|
|
|
/*struct_size*/ sizeof(SimpleDeformModifierData),
|
2023-01-16 12:41:11 +11:00
|
|
|
/*srna*/ &RNA_SimpleDeformModifier,
|
2023-11-14 10:03:56 +01:00
|
|
|
/*type*/ ModifierTypeType::OnlyDeform,
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2023-01-16 12:41:11 +11:00
|
|
|
/*flags*/ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs |
|
2020-04-21 13:09:41 +02:00
|
|
|
eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode |
|
2012-10-24 05:45:54 +00:00
|
|
|
eModifierTypeFlag_EnableInEditmode,
|
2023-01-16 12:41:11 +11:00
|
|
|
/*icon*/ ICON_MOD_SIMPLEDEFORM,
|
|
|
|
|
|
2023-07-27 12:04:18 +10:00
|
|
|
/*copy_data*/ BKE_modifier_copydata_generic,
|
|
|
|
|
|
|
|
|
|
/*deform_verts*/ deform_verts,
|
|
|
|
|
/*deform_matrices*/ nullptr,
|
|
|
|
|
/*deform_verts_EM*/ nullptr,
|
|
|
|
|
/*deform_matrices_EM*/ nullptr,
|
|
|
|
|
/*modify_mesh*/ nullptr,
|
|
|
|
|
/*modify_geometry_set*/ nullptr,
|
|
|
|
|
|
|
|
|
|
/*init_data*/ init_data,
|
|
|
|
|
/*required_data_mask*/ required_data_mask,
|
|
|
|
|
/*free_data*/ nullptr,
|
|
|
|
|
/*is_disabled*/ nullptr,
|
|
|
|
|
/*update_depsgraph*/ update_depsgraph,
|
|
|
|
|
/*depends_on_time*/ nullptr,
|
|
|
|
|
/*depends_on_normals*/ nullptr,
|
|
|
|
|
/*foreach_ID_link*/ foreach_ID_link,
|
|
|
|
|
/*foreach_tex_link*/ nullptr,
|
|
|
|
|
/*free_runtime_data*/ nullptr,
|
|
|
|
|
/*panel_register*/ panel_register,
|
|
|
|
|
/*blend_write*/ nullptr,
|
|
|
|
|
/*blend_read*/ nullptr,
|
2010-04-11 22:12:30 +00:00
|
|
|
};
|