Blender  V3.3
MOD_wave.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2005 Blender Foundation. All rights reserved. */
3 
8 #include "BLI_utildefines.h"
9 
10 #include "BLI_math.h"
11 
12 #include "BLT_translation.h"
13 
14 #include "DNA_defaults.h"
15 #include "DNA_mesh_types.h"
16 #include "DNA_meshdata_types.h"
17 #include "DNA_object_types.h"
18 #include "DNA_scene_types.h"
19 #include "DNA_screen_types.h"
20 
21 #include "BKE_context.h"
22 #include "BKE_deform.h"
23 #include "BKE_editmesh.h"
24 #include "BKE_lib_id.h"
25 #include "BKE_lib_query.h"
26 #include "BKE_mesh.h"
27 #include "BKE_mesh_wrapper.h"
28 #include "BKE_scene.h"
29 #include "BKE_screen.h"
30 #include "BKE_texture.h"
31 
32 #include "UI_interface.h"
33 #include "UI_resources.h"
34 
35 #include "RNA_access.h"
36 #include "RNA_prototypes.h"
37 
38 #include "MEM_guardedalloc.h"
39 
40 #include "RE_texture.h"
41 
42 #include "MOD_modifiertypes.h"
43 #include "MOD_ui_common.h"
44 #include "MOD_util.h"
45 
46 #include "DEG_depsgraph.h"
47 #include "DEG_depsgraph_query.h"
48 
49 static void initData(ModifierData *md)
50 {
52 
54 
56 }
57 
58 static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md))
59 {
60  return true;
61 }
62 
63 static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
64 {
66 
67  walk(userData, ob, (ID **)&wmd->texture, IDWALK_CB_USER);
68  walk(userData, ob, (ID **)&wmd->objectcenter, IDWALK_CB_NOP);
69  walk(userData, ob, (ID **)&wmd->map_object, IDWALK_CB_NOP);
70 }
71 
72 static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData)
73 {
74  walk(userData, ob, md, "texture");
75 }
76 
78 {
80  bool need_transform_relation = false;
81 
82  if (wmd->objectcenter != NULL) {
83  DEG_add_object_relation(ctx->node, wmd->objectcenter, DEG_OB_COMP_TRANSFORM, "Wave Modifier");
84  need_transform_relation = true;
85  }
86 
87  if (wmd->texture != NULL) {
88  DEG_add_generic_id_relation(ctx->node, &wmd->texture->id, "Wave Modifier");
89 
90  if ((wmd->texmapping == MOD_DISP_MAP_OBJECT) && wmd->map_object != NULL) {
92  ctx->node, wmd->map_object, wmd->map_bone, "Wave Modifier");
93  need_transform_relation = true;
94  }
95  else if (wmd->texmapping == MOD_DISP_MAP_GLOBAL) {
96  need_transform_relation = true;
97  }
98  }
99 
100  if (need_transform_relation) {
101  DEG_add_modifier_to_transform_relation(ctx->node, "Wave Modifier");
102  }
103 }
104 
105 static void requiredDataMask(Object *UNUSED(ob),
106  ModifierData *md,
107  CustomData_MeshMasks *r_cddata_masks)
108 {
109  WaveModifierData *wmd = (WaveModifierData *)md;
110 
111  /* ask for UV coordinates if we need them */
112  if (wmd->texture && wmd->texmapping == MOD_DISP_MAP_UV) {
113  r_cddata_masks->fmask |= CD_MASK_MTFACE;
114  }
115 
116  /* ask for vertexgroups if we need them */
117  if (wmd->defgrp_name[0] != '\0') {
118  r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
119  }
120 }
121 
123 {
124  WaveModifierData *wmd = (WaveModifierData *)md;
125 
126  return (wmd->flag & MOD_WAVE_NORM) != 0;
127 }
128 
130  const ModifierEvalContext *ctx,
131  Object *ob,
132  Mesh *mesh,
133  float (*vertexCos)[3],
134  int verts_num)
135 {
136  WaveModifierData *wmd = (WaveModifierData *)md;
137  MVert *mvert = NULL;
138  MDeformVert *dvert;
139  int defgrp_index;
140  float ctime = DEG_get_ctime(ctx->depsgraph);
141  float minfac = (float)(1.0 / exp(wmd->width * wmd->narrow * wmd->width * wmd->narrow));
142  float lifefac = wmd->height;
143  float(*tex_co)[3] = NULL;
144  const int wmd_axis = wmd->flag & (MOD_WAVE_X | MOD_WAVE_Y);
145  const float falloff = wmd->falloff;
146  float falloff_fac = 1.0f; /* when falloff == 0.0f this stays at 1.0f */
147  const bool invert_group = (wmd->flag & MOD_WAVE_INVERT_VGROUP) != 0;
148 
149  const float(*vert_normals)[3] = NULL;
150  if ((wmd->flag & MOD_WAVE_NORM) && (mesh != NULL)) {
151  mvert = mesh->mvert;
152  vert_normals = BKE_mesh_vertex_normals_ensure(mesh);
153  }
154 
155  if (wmd->objectcenter != NULL) {
156  float mat[4][4];
157  /* get the control object's location in local coordinates */
158  invert_m4_m4(ob->imat, ob->obmat);
159  mul_m4_m4m4(mat, ob->imat, wmd->objectcenter->obmat);
160 
161  wmd->startx = mat[3][0];
162  wmd->starty = mat[3][1];
163  }
164 
165  /* get the index of the deform group */
166  MOD_get_vgroup(ob, mesh, wmd->defgrp_name, &dvert, &defgrp_index);
167 
168  if (wmd->damp == 0.0f) {
169  wmd->damp = 10.0f;
170  }
171 
172  if (wmd->lifetime != 0.0f) {
173  float x = ctime - wmd->timeoffs;
174 
175  if (x > wmd->lifetime) {
176  lifefac = x - wmd->lifetime;
177 
178  if (lifefac > wmd->damp) {
179  lifefac = 0.0;
180  }
181  else {
182  lifefac = (float)(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp)));
183  }
184  }
185  }
186 
187  Tex *tex_target = wmd->texture;
188  if (mesh != NULL && tex_target != NULL) {
189  tex_co = MEM_malloc_arrayN(verts_num, sizeof(*tex_co), "waveModifier_do tex_co");
190  MOD_get_texture_coords((MappingInfoModifierData *)wmd, ctx, ob, mesh, vertexCos, tex_co);
191 
193  }
194 
195  if (lifefac != 0.0f) {
196  /* avoid divide by zero checks within the loop */
197  float falloff_inv = falloff != 0.0f ? 1.0f / falloff : 1.0f;
198  int i;
199 
200  for (i = 0; i < verts_num; i++) {
201  float *co = vertexCos[i];
202  float x = co[0] - wmd->startx;
203  float y = co[1] - wmd->starty;
204  float amplit = 0.0f;
205  float def_weight = 1.0f;
206 
207  /* get weights */
208  if (dvert) {
209  def_weight = invert_group ? 1.0f - BKE_defvert_find_weight(&dvert[i], defgrp_index) :
210  BKE_defvert_find_weight(&dvert[i], defgrp_index);
211 
212  /* if this vert isn't in the vgroup, don't deform it */
213  if (def_weight == 0.0f) {
214  continue;
215  }
216  }
217 
218  switch (wmd_axis) {
219  case MOD_WAVE_X | MOD_WAVE_Y:
220  amplit = sqrtf(x * x + y * y);
221  break;
222  case MOD_WAVE_X:
223  amplit = x;
224  break;
225  case MOD_WAVE_Y:
226  amplit = y;
227  break;
228  }
229 
230  /* this way it makes nice circles */
231  amplit -= (ctime - wmd->timeoffs) * wmd->speed;
232 
233  if (wmd->flag & MOD_WAVE_CYCL) {
234  amplit = (float)fmodf(amplit - wmd->width, 2.0f * wmd->width) + wmd->width;
235  }
236 
237  if (falloff != 0.0f) {
238  float dist = 0.0f;
239 
240  switch (wmd_axis) {
241  case MOD_WAVE_X | MOD_WAVE_Y:
242  dist = sqrtf(x * x + y * y);
243  break;
244  case MOD_WAVE_X:
245  dist = fabsf(x);
246  break;
247  case MOD_WAVE_Y:
248  dist = fabsf(y);
249  break;
250  }
251 
252  falloff_fac = (1.0f - (dist * falloff_inv));
253  CLAMP(falloff_fac, 0.0f, 1.0f);
254  }
255 
256  /* GAUSSIAN */
257  if ((falloff_fac != 0.0f) && (amplit > -wmd->width) && (amplit < wmd->width)) {
258  amplit = amplit * wmd->narrow;
259  amplit = (float)(1.0f / expf(amplit * amplit) - minfac);
260 
261  /* Apply texture. */
262  if (tex_co) {
264  TexResult texres;
265  BKE_texture_get_value(scene, tex_target, tex_co[i], &texres, false);
266  amplit *= texres.tin;
267  }
268 
269  /* Apply weight & falloff. */
270  amplit *= def_weight * falloff_fac;
271 
272  if (mvert) {
273  /* move along normals */
274  if (wmd->flag & MOD_WAVE_NORM_X) {
275  co[0] += (lifefac * amplit) * vert_normals[i][0];
276  }
277  if (wmd->flag & MOD_WAVE_NORM_Y) {
278  co[1] += (lifefac * amplit) * vert_normals[i][1];
279  }
280  if (wmd->flag & MOD_WAVE_NORM_Z) {
281  co[2] += (lifefac * amplit) * vert_normals[i][2];
282  }
283  }
284  else {
285  /* move along local z axis */
286  co[2] += lifefac * amplit;
287  }
288  }
289  }
290  }
291 
292  MEM_SAFE_FREE(tex_co);
293 }
294 
295 static void deformVerts(ModifierData *md,
296  const ModifierEvalContext *ctx,
297  Mesh *mesh,
298  float (*vertexCos)[3],
299  int verts_num)
300 {
301  WaveModifierData *wmd = (WaveModifierData *)md;
302  Mesh *mesh_src = NULL;
303 
304  if (wmd->flag & MOD_WAVE_NORM) {
305  mesh_src = MOD_deform_mesh_eval_get(
306  ctx->object, NULL, mesh, vertexCos, verts_num, true, false);
307  }
308  else if (wmd->texture != NULL || wmd->defgrp_name[0] != '\0') {
309  mesh_src = MOD_deform_mesh_eval_get(ctx->object, NULL, mesh, NULL, verts_num, false, false);
310  }
311 
312  waveModifier_do(wmd, ctx, ctx->object, mesh_src, vertexCos, verts_num);
313 
314  if (!ELEM(mesh_src, NULL, mesh)) {
315  BKE_id_free(NULL, mesh_src);
316  }
317 }
318 
319 static void deformVertsEM(ModifierData *md,
320  const ModifierEvalContext *ctx,
321  struct BMEditMesh *editData,
322  Mesh *mesh,
323  float (*vertexCos)[3],
324  int verts_num)
325 {
326  WaveModifierData *wmd = (WaveModifierData *)md;
327  Mesh *mesh_src = NULL;
328 
329  if (wmd->flag & MOD_WAVE_NORM) {
330  /* NOTE(@campbellbarton): don't request normals here because `use_normals == false`
331  * because #BKE_mesh_wrapper_ensure_mdata has not run yet.
332  * While this could be supported the argument is documented to be removed,
333  * so pass false here and let the normals be created when requested. */
334  mesh_src = MOD_deform_mesh_eval_get(
335  ctx->object, editData, mesh, vertexCos, verts_num, false, false);
336  }
337  else if (wmd->texture != NULL || wmd->defgrp_name[0] != '\0') {
338  mesh_src = MOD_deform_mesh_eval_get(
339  ctx->object, editData, mesh, NULL, verts_num, false, false);
340  }
341 
342  /* TODO(Campbell): use edit-mode data only (remove this line). */
343  if (mesh_src != NULL) {
345  }
346 
347  waveModifier_do(wmd, ctx, ctx->object, mesh_src, vertexCos, verts_num);
348 
349  if (!ELEM(mesh_src, NULL, mesh)) {
350  /* Important not to free `vertexCos` owned by the caller. */
351  EditMeshData *edit_data = mesh_src->runtime.edit_data;
352  if (edit_data->vertexCos == vertexCos) {
353  edit_data->vertexCos = NULL;
354  }
355 
356  BKE_id_free(NULL, mesh_src);
357  }
358 }
359 
360 static void panel_draw(const bContext *UNUSED(C), Panel *panel)
361 {
362  uiLayout *sub, *row, *col;
363  uiLayout *layout = panel->layout;
364 
365  PointerRNA ob_ptr;
367 
368  uiLayoutSetPropSep(layout, true);
369 
370  row = uiLayoutRowWithHeading(layout, true, IFACE_("Motion"));
371  uiItemR(row, ptr, "use_x", UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE, NULL, ICON_NONE);
372  uiItemR(row, ptr, "use_y", UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE, NULL, ICON_NONE);
373 
374  uiItemR(layout, ptr, "use_cyclic", 0, NULL, ICON_NONE);
375 
376  row = uiLayoutRowWithHeading(layout, true, IFACE_("Along Normals"));
377  uiItemR(row, ptr, "use_normal", 0, "", ICON_NONE);
378  sub = uiLayoutRow(row, true);
379  uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_normal"));
380  uiItemR(sub, ptr, "use_normal_x", UI_ITEM_R_TOGGLE, "X", ICON_NONE);
381  uiItemR(sub, ptr, "use_normal_y", UI_ITEM_R_TOGGLE, "Y", ICON_NONE);
382  uiItemR(sub, ptr, "use_normal_z", UI_ITEM_R_TOGGLE, "Z", ICON_NONE);
383 
384  col = uiLayoutColumn(layout, false);
385  uiItemR(col, ptr, "falloff_radius", 0, IFACE_("Falloff"), ICON_NONE);
386  uiItemR(col, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
387  uiItemR(col, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
388  uiItemR(col, ptr, "narrowness", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
389 
390  modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL);
391 
392  modifier_panel_end(layout, ptr);
393 }
394 
395 static void position_panel_draw(const bContext *UNUSED(C), Panel *panel)
396 {
397  uiLayout *col;
398  uiLayout *layout = panel->layout;
399 
401 
402  uiLayoutSetPropSep(layout, true);
403 
404  uiItemR(layout, ptr, "start_position_object", 0, IFACE_("Object"), ICON_NONE);
405 
406  col = uiLayoutColumn(layout, true);
407  uiItemR(col, ptr, "start_position_x", 0, IFACE_("Start Position X"), ICON_NONE);
408  uiItemR(col, ptr, "start_position_y", 0, "Y", ICON_NONE);
409 }
410 
411 static void time_panel_draw(const bContext *UNUSED(C), Panel *panel)
412 {
413  uiLayout *col;
414  uiLayout *layout = panel->layout;
415 
417 
418  uiLayoutSetPropSep(layout, true);
419 
420  col = uiLayoutColumn(layout, false);
421  uiItemR(col, ptr, "time_offset", 0, IFACE_("Offset"), ICON_NONE);
422  uiItemR(col, ptr, "lifetime", 0, IFACE_("Life"), ICON_NONE);
423  uiItemR(col, ptr, "damping_time", 0, IFACE_("Damping"), ICON_NONE);
424  uiItemR(col, ptr, "speed", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
425 }
426 
427 static void texture_panel_draw(const bContext *C, Panel *panel)
428 {
429  uiLayout *col;
430  uiLayout *layout = panel->layout;
431 
432  PointerRNA ob_ptr;
434 
435  int texture_coords = RNA_enum_get(ptr, "texture_coords");
436 
437  uiTemplateID(layout, C, ptr, "texture", "texture.new", NULL, NULL, 0, ICON_NONE, NULL);
438 
439  uiLayoutSetPropSep(layout, true);
440 
441  col = uiLayoutColumn(layout, false);
442  uiItemR(col, ptr, "texture_coords", 0, IFACE_("Coordinates"), ICON_NONE);
443  if (texture_coords == MOD_DISP_MAP_OBJECT) {
444  uiItemR(col, ptr, "texture_coords_object", 0, IFACE_("Object"), ICON_NONE);
445  PointerRNA texture_coords_obj_ptr = RNA_pointer_get(ptr, "texture_coords_object");
446  if (!RNA_pointer_is_null(&texture_coords_obj_ptr) &&
447  (RNA_enum_get(&texture_coords_obj_ptr, "type") == OB_ARMATURE)) {
448  PointerRNA texture_coords_obj_data_ptr = RNA_pointer_get(&texture_coords_obj_ptr, "data");
450  ptr,
451  "texture_coords_bone",
452  &texture_coords_obj_data_ptr,
453  "bones",
454  IFACE_("Bone"),
455  ICON_NONE);
456  }
457  }
458  else if (texture_coords == MOD_DISP_MAP_UV && RNA_enum_get(&ob_ptr, "type") == OB_MESH) {
459  PointerRNA obj_data_ptr = RNA_pointer_get(&ob_ptr, "data");
460  uiItemPointerR(col, ptr, "uv_layer", &obj_data_ptr, "uv_layers", NULL, ICON_NONE);
461  }
462 }
463 
464 static void panelRegister(ARegionType *region_type)
465 {
466  PanelType *panel_type = modifier_panel_register(region_type, eModifierType_Wave, panel_draw);
468  region_type, "position", "Start Position", NULL, position_panel_draw, panel_type);
469  modifier_subpanel_register(region_type, "time", "Time", NULL, time_panel_draw, panel_type);
471  region_type, "texture", "Texture", NULL, texture_panel_draw, panel_type);
472 }
473 
475  /* name */ N_("Wave"),
476  /* structName */ "WaveModifierData",
477  /* structSize */ sizeof(WaveModifierData),
478  /* srna */ &RNA_WaveModifier,
479  /* type */ eModifierTypeType_OnlyDeform,
482  /* icon */ ICON_MOD_WAVE,
483 
484  /* copyData */ BKE_modifier_copydata_generic,
485 
486  /* deformVerts */ deformVerts,
487  /* deformMatrices */ NULL,
488  /* deformVertsEM */ deformVertsEM,
489  /* deformMatricesEM */ NULL,
490  /* modifyMesh */ NULL,
491  /* modifyGeometrySet */ NULL,
492 
493  /* initData */ initData,
494  /* requiredDataMask */ requiredDataMask,
495  /* freeData */ NULL,
496  /* isDisabled */ NULL,
497  /* updateDepsgraph */ updateDepsgraph,
498  /* dependsOnTime */ dependsOnTime,
499  /* dependsOnNormals */ dependsOnNormals,
500  /* foreachIDLink */ foreachIDLink,
501  /* foreachTexLink */ foreachTexLink,
502  /* freeRuntimeData */ NULL,
503  /* panelRegister */ panelRegister,
504  /* blendWrite */ NULL,
505  /* blendRead */ NULL,
506 };
typedef float(TangentPoint)[2]
support for deformation groups and hooks.
float BKE_defvert_find_weight(const struct MDeformVert *dvert, int defgroup)
Definition: deform.c:704
void BKE_id_free(struct Main *bmain, void *idv)
@ IDWALK_CB_USER
Definition: BKE_lib_query.h:73
@ IDWALK_CB_NOP
Definition: BKE_lib_query.h:33
const float(* BKE_mesh_vertex_normals_ensure(const struct Mesh *mesh))[3]
void BKE_mesh_wrapper_ensure_mdata(struct Mesh *me)
Definition: mesh_wrapper.cc:94
void(* IDWalkFunc)(void *userData, struct Object *ob, struct ID **idpoin, int cb_flag)
Definition: BKE_modifier.h:107
@ eModifierTypeFlag_AcceptsCVs
Definition: BKE_modifier.h:67
@ eModifierTypeFlag_SupportsEditmode
Definition: BKE_modifier.h:69
@ eModifierTypeFlag_AcceptsVertexCosOnly
Definition: BKE_modifier.h:100
void(* TexWalkFunc)(void *userData, struct Object *ob, struct ModifierData *md, const char *propname)
Definition: BKE_modifier.h:108
void BKE_modifier_copydata_generic(const struct ModifierData *md, struct ModifierData *md_dst, int flag)
@ eModifierTypeType_OnlyDeform
Definition: BKE_modifier.h:44
void BKE_texture_get_value(const struct Scene *scene, struct Tex *texture, const float *tex_co, struct TexResult *texres, bool use_color_management)
#define BLI_assert(a)
Definition: BLI_assert.h:46
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
Definition: math_matrix.c:259
bool invert_m4_m4(float R[4][4], const float A[4][4])
Definition: math_matrix.c:1287
#define UNUSED(x)
#define ELEM(...)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
#define IFACE_(msgid)
void DEG_add_object_relation(struct DepsNodeHandle *node_handle, struct Object *object, eDepsObjectComponentType component, const char *description)
void DEG_add_modifier_to_transform_relation(struct DepsNodeHandle *node_handle, const char *description)
void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle, struct ID *id, const char *description)
@ DEG_OB_COMP_TRANSFORM
float DEG_get_ctime(const Depsgraph *graph)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
#define CD_MASK_MDEFORMVERT
#define CD_MASK_MTFACE
#define DNA_struct_default_get(struct_name)
Definition: DNA_defaults.h:29
@ MOD_WAVE_NORM_Y
@ MOD_WAVE_NORM_X
@ MOD_WAVE_CYCL
@ MOD_WAVE_INVERT_VGROUP
@ MOD_WAVE_Y
@ MOD_WAVE_NORM
@ MOD_WAVE_X
@ MOD_WAVE_NORM_Z
@ eModifierType_Wave
@ MOD_DISP_MAP_OBJECT
@ MOD_DISP_MAP_GLOBAL
@ MOD_DISP_MAP_UV
struct WaveModifierData WaveModifierData
Object is a sort of wrapper for general info.
@ OB_ARMATURE
@ OB_MESH
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
Read Guarded memory(de)allocation.
#define MEM_SAFE_FREE(v)
PointerRNA * modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr)
void modifier_panel_end(uiLayout *layout, PointerRNA *ptr)
Definition: MOD_ui_common.c:91
PanelType * modifier_panel_register(ARegionType *region_type, ModifierType type, PanelDrawFn draw)
void modifier_vgroup_ui(uiLayout *layout, PointerRNA *ptr, PointerRNA *ob_ptr, const char *vgroup_prop, const char *invert_vgroup_prop, const char *text)
PanelType * modifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
Mesh * MOD_deform_mesh_eval_get(Object *ob, struct BMEditMesh *em, Mesh *mesh, const float(*vertexCos)[3], const int verts_num, const bool use_normals, const bool use_orco)
Definition: MOD_util.c:167
void MOD_init_texture(MappingInfoModifierData *dmd, const ModifierEvalContext *ctx)
Definition: MOD_util.c:45
void MOD_depsgraph_update_object_bone_relation(struct DepsNodeHandle *node, Object *object, const char *bonename, const char *description)
Definition: MOD_util.c:258
void MOD_get_texture_coords(MappingInfoModifierData *dmd, const ModifierEvalContext *UNUSED(ctx), Object *ob, Mesh *mesh, float(*cos)[3], float(*r_texco)[3])
Definition: MOD_util.c:59
void MOD_get_vgroup(Object *ob, struct Mesh *mesh, const char *name, MDeformVert **dvert, int *defgrp_index)
Definition: MOD_util.c:235
static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md))
Definition: MOD_wave.c:58
static void deformVerts(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, float(*vertexCos)[3], int verts_num)
Definition: MOD_wave.c:295
static void deformVertsEM(ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData, Mesh *mesh, float(*vertexCos)[3], int verts_num)
Definition: MOD_wave.c:319
static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
Definition: MOD_wave.c:77
static void texture_panel_draw(const bContext *C, Panel *panel)
Definition: MOD_wave.c:427
static bool dependsOnNormals(ModifierData *md)
Definition: MOD_wave.c:122
static void time_panel_draw(const bContext *UNUSED(C), Panel *panel)
Definition: MOD_wave.c:411
ModifierTypeInfo modifierType_Wave
Definition: MOD_wave.c:474
static void position_panel_draw(const bContext *UNUSED(C), Panel *panel)
Definition: MOD_wave.c:395
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
Definition: MOD_wave.c:63
static void waveModifier_do(WaveModifierData *md, const ModifierEvalContext *ctx, Object *ob, Mesh *mesh, float(*vertexCos)[3], int verts_num)
Definition: MOD_wave.c:129
static void panel_draw(const bContext *UNUSED(C), Panel *panel)
Definition: MOD_wave.c:360
static void initData(ModifierData *md)
Definition: MOD_wave.c:49
static void panelRegister(ARegionType *region_type)
Definition: MOD_wave.c:464
static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData)
Definition: MOD_wave.c:72
static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
Definition: MOD_wave.c:105
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
#define C
Definition: RandGen.cpp:25
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetActive(uiLayout *layout, bool active)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
@ UI_ITEM_R_TOGGLE
@ UI_ITEM_R_FORCE_BLANK_DECORATE
@ UI_ITEM_R_SLIDER
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiTemplateID(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, bool live_icon, const char *text)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
#define expf(x)
Definition: cuda/compat.h:106
Scene scene
uint col
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
Definition: mallocn.c:34
ccl_device_inline float3 exp(float3 v)
Definition: math_float3.h:392
#define fmodf(x, y)
Definition: metal/compat.h:230
#define fabsf(x)
Definition: metal/compat.h:219
#define sqrtf(x)
Definition: metal/compat.h:243
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5167
bool RNA_pointer_is_null(const PointerRNA *ptr)
Definition: rna_access.c:164
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4863
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5004
const float(* vertexCos)[3]
Definition: DNA_ID.h:368
struct EditMeshData * edit_data
struct MVert * mvert
Mesh_Runtime runtime
struct Depsgraph * depsgraph
Definition: BKE_modifier.h:140
struct Object * object
Definition: BKE_modifier.h:141
struct DepsNodeHandle * node
Definition: BKE_modifier.h:134
float imat[4][4]
float obmat[4][4]
struct uiLayout * layout
float tin
Definition: RE_texture.h:86
struct Object * objectcenter
struct Object * map_object
#define N_(msgid)
PointerRNA * ptr
Definition: wm_files.c:3480