Blender  V2.93
MOD_wave.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2005 by the Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include "BLI_utildefines.h"
25 
26 #include "BLI_math.h"
27 
28 #include "BLT_translation.h"
29 
30 #include "DNA_defaults.h"
31 #include "DNA_mesh_types.h"
32 #include "DNA_meshdata_types.h"
33 #include "DNA_object_types.h"
34 #include "DNA_scene_types.h"
35 #include "DNA_screen_types.h"
36 
37 #include "BKE_context.h"
38 #include "BKE_deform.h"
39 #include "BKE_editmesh.h"
40 #include "BKE_lib_id.h"
41 #include "BKE_lib_query.h"
42 #include "BKE_mesh.h"
43 #include "BKE_mesh_wrapper.h"
44 #include "BKE_scene.h"
45 #include "BKE_screen.h"
46 #include "BKE_texture.h"
47 
48 #include "UI_interface.h"
49 #include "UI_resources.h"
50 
51 #include "RNA_access.h"
52 
53 #include "MEM_guardedalloc.h"
54 
55 #include "RE_texture.h"
56 
57 #include "MOD_modifiertypes.h"
58 #include "MOD_ui_common.h"
59 #include "MOD_util.h"
60 
61 #include "DEG_depsgraph.h"
62 #include "DEG_depsgraph_query.h"
63 
64 static void initData(ModifierData *md)
65 {
67 
69 
71 }
72 
74 {
75  return true;
76 }
77 
78 static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
79 {
81 
82  walk(userData, ob, (ID **)&wmd->texture, IDWALK_CB_USER);
83  walk(userData, ob, (ID **)&wmd->objectcenter, IDWALK_CB_NOP);
84  walk(userData, ob, (ID **)&wmd->map_object, IDWALK_CB_NOP);
85 }
86 
87 static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData)
88 {
89  walk(userData, ob, md, "texture");
90 }
91 
93 {
95  bool need_transform_relation = false;
96 
97  if (wmd->objectcenter != NULL) {
98  DEG_add_object_relation(ctx->node, wmd->objectcenter, DEG_OB_COMP_TRANSFORM, "Wave Modifier");
99  need_transform_relation = true;
100  }
101 
102  if (wmd->texture != NULL) {
103  DEG_add_generic_id_relation(ctx->node, &wmd->texture->id, "Wave Modifier");
104 
105  if ((wmd->texmapping == MOD_DISP_MAP_OBJECT) && wmd->map_object != NULL) {
107  ctx->node, wmd->map_object, wmd->map_bone, "Wave Modifier");
108  need_transform_relation = true;
109  }
110  else if (wmd->texmapping == MOD_DISP_MAP_GLOBAL) {
111  need_transform_relation = true;
112  }
113  }
114 
115  if (need_transform_relation) {
116  DEG_add_modifier_to_transform_relation(ctx->node, "Wave Modifier");
117  }
118 }
119 
120 static void requiredDataMask(Object *UNUSED(ob),
121  ModifierData *md,
122  CustomData_MeshMasks *r_cddata_masks)
123 {
124  WaveModifierData *wmd = (WaveModifierData *)md;
125 
126  /* ask for UV coordinates if we need them */
127  if (wmd->texture && wmd->texmapping == MOD_DISP_MAP_UV) {
128  r_cddata_masks->fmask |= CD_MASK_MTFACE;
129  }
130 
131  /* ask for vertexgroups if we need them */
132  if (wmd->defgrp_name[0] != '\0') {
133  r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
134  }
135 }
136 
138 {
139  WaveModifierData *wmd = (WaveModifierData *)md;
140 
141  return (wmd->flag & MOD_WAVE_NORM) != 0;
142 }
143 
145  const ModifierEvalContext *ctx,
146  Object *ob,
147  Mesh *mesh,
148  float (*vertexCos)[3],
149  int numVerts)
150 {
151  WaveModifierData *wmd = (WaveModifierData *)md;
152  MVert *mvert = NULL;
153  MDeformVert *dvert;
154  int defgrp_index;
155  float ctime = DEG_get_ctime(ctx->depsgraph);
156  float minfac = (float)(1.0 / exp(wmd->width * wmd->narrow * wmd->width * wmd->narrow));
157  float lifefac = wmd->height;
158  float(*tex_co)[3] = NULL;
159  const int wmd_axis = wmd->flag & (MOD_WAVE_X | MOD_WAVE_Y);
160  const float falloff = wmd->falloff;
161  float falloff_fac = 1.0f; /* when falloff == 0.0f this stays at 1.0f */
162  const bool invert_group = (wmd->flag & MOD_WAVE_INVERT_VGROUP) != 0;
163 
164  if ((wmd->flag & MOD_WAVE_NORM) && (mesh != NULL)) {
165  mvert = mesh->mvert;
166  }
167 
168  if (wmd->objectcenter != NULL) {
169  float mat[4][4];
170  /* get the control object's location in local coordinates */
171  invert_m4_m4(ob->imat, ob->obmat);
172  mul_m4_m4m4(mat, ob->imat, wmd->objectcenter->obmat);
173 
174  wmd->startx = mat[3][0];
175  wmd->starty = mat[3][1];
176  }
177 
178  /* get the index of the deform group */
179  MOD_get_vgroup(ob, mesh, wmd->defgrp_name, &dvert, &defgrp_index);
180 
181  if (wmd->damp == 0.0f) {
182  wmd->damp = 10.0f;
183  }
184 
185  if (wmd->lifetime != 0.0f) {
186  float x = ctime - wmd->timeoffs;
187 
188  if (x > wmd->lifetime) {
189  lifefac = x - wmd->lifetime;
190 
191  if (lifefac > wmd->damp) {
192  lifefac = 0.0;
193  }
194  else {
195  lifefac = (float)(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp)));
196  }
197  }
198  }
199 
200  Tex *tex_target = wmd->texture;
201  if (mesh != NULL && tex_target != NULL) {
202  tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co), "waveModifier_do tex_co");
203  MOD_get_texture_coords((MappingInfoModifierData *)wmd, ctx, ob, mesh, vertexCos, tex_co);
204 
206  }
207 
208  if (lifefac != 0.0f) {
209  /* avoid divide by zero checks within the loop */
210  float falloff_inv = falloff != 0.0f ? 1.0f / falloff : 1.0f;
211  int i;
212 
213  for (i = 0; i < numVerts; i++) {
214  float *co = vertexCos[i];
215  float x = co[0] - wmd->startx;
216  float y = co[1] - wmd->starty;
217  float amplit = 0.0f;
218  float def_weight = 1.0f;
219 
220  /* get weights */
221  if (dvert) {
222  def_weight = invert_group ? 1.0f - BKE_defvert_find_weight(&dvert[i], defgrp_index) :
223  BKE_defvert_find_weight(&dvert[i], defgrp_index);
224 
225  /* if this vert isn't in the vgroup, don't deform it */
226  if (def_weight == 0.0f) {
227  continue;
228  }
229  }
230 
231  switch (wmd_axis) {
232  case MOD_WAVE_X | MOD_WAVE_Y:
233  amplit = sqrtf(x * x + y * y);
234  break;
235  case MOD_WAVE_X:
236  amplit = x;
237  break;
238  case MOD_WAVE_Y:
239  amplit = y;
240  break;
241  }
242 
243  /* this way it makes nice circles */
244  amplit -= (ctime - wmd->timeoffs) * wmd->speed;
245 
246  if (wmd->flag & MOD_WAVE_CYCL) {
247  amplit = (float)fmodf(amplit - wmd->width, 2.0f * wmd->width) + wmd->width;
248  }
249 
250  if (falloff != 0.0f) {
251  float dist = 0.0f;
252 
253  switch (wmd_axis) {
254  case MOD_WAVE_X | MOD_WAVE_Y:
255  dist = sqrtf(x * x + y * y);
256  break;
257  case MOD_WAVE_X:
258  dist = fabsf(x);
259  break;
260  case MOD_WAVE_Y:
261  dist = fabsf(y);
262  break;
263  }
264 
265  falloff_fac = (1.0f - (dist * falloff_inv));
266  CLAMP(falloff_fac, 0.0f, 1.0f);
267  }
268 
269  /* GAUSSIAN */
270  if ((falloff_fac != 0.0f) && (amplit > -wmd->width) && (amplit < wmd->width)) {
271  amplit = amplit * wmd->narrow;
272  amplit = (float)(1.0f / expf(amplit * amplit) - minfac);
273 
274  /*apply texture*/
275  if (tex_co) {
277  TexResult texres;
278  texres.nor = NULL;
279  BKE_texture_get_value(scene, tex_target, tex_co[i], &texres, false);
280  amplit *= texres.tin;
281  }
282 
283  /*apply weight & falloff */
284  amplit *= def_weight * falloff_fac;
285 
286  if (mvert) {
287  /* move along normals */
288  if (wmd->flag & MOD_WAVE_NORM_X) {
289  co[0] += (lifefac * amplit) * mvert[i].no[0] / 32767.0f;
290  }
291  if (wmd->flag & MOD_WAVE_NORM_Y) {
292  co[1] += (lifefac * amplit) * mvert[i].no[1] / 32767.0f;
293  }
294  if (wmd->flag & MOD_WAVE_NORM_Z) {
295  co[2] += (lifefac * amplit) * mvert[i].no[2] / 32767.0f;
296  }
297  }
298  else {
299  /* move along local z axis */
300  co[2] += lifefac * amplit;
301  }
302  }
303  }
304  }
305 
306  MEM_SAFE_FREE(tex_co);
307 }
308 
309 static void deformVerts(ModifierData *md,
310  const ModifierEvalContext *ctx,
311  Mesh *mesh,
312  float (*vertexCos)[3],
313  int numVerts)
314 {
315  WaveModifierData *wmd = (WaveModifierData *)md;
316  Mesh *mesh_src = NULL;
317 
318  if (wmd->flag & MOD_WAVE_NORM) {
319  mesh_src = MOD_deform_mesh_eval_get(ctx->object, NULL, mesh, vertexCos, numVerts, true, false);
320  }
321  else if (wmd->texture != NULL || wmd->defgrp_name[0] != '\0') {
322  mesh_src = MOD_deform_mesh_eval_get(ctx->object, NULL, mesh, NULL, numVerts, false, false);
323  }
324 
325  waveModifier_do(wmd, ctx, ctx->object, mesh_src, vertexCos, numVerts);
326 
327  if (!ELEM(mesh_src, NULL, mesh)) {
328  BKE_id_free(NULL, mesh_src);
329  }
330 }
331 
332 static void deformVertsEM(ModifierData *md,
333  const ModifierEvalContext *ctx,
334  struct BMEditMesh *editData,
335  Mesh *mesh,
336  float (*vertexCos)[3],
337  int numVerts)
338 {
339  WaveModifierData *wmd = (WaveModifierData *)md;
340  Mesh *mesh_src = NULL;
341 
342  if (wmd->flag & MOD_WAVE_NORM) {
343  /* NOTE(@campbellbarton): don't request normals here because `use_normals == false`
344  * because #BKE_mesh_wrapper_ensure_mdata has not run yet.
345  * While this could be supported the argument is documented to be removed,
346  * so pass false here and let the normals be created when requested. */
347  mesh_src = MOD_deform_mesh_eval_get(
348  ctx->object, editData, mesh, vertexCos, numVerts, false, false);
349  }
350  else if (wmd->texture != NULL || wmd->defgrp_name[0] != '\0') {
351  mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, NULL, numVerts, false, false);
352  }
353 
354  /* TODO(Campbell): use edit-mode data only (remove this line). */
355  if (mesh_src != NULL) {
357  }
358 
359  waveModifier_do(wmd, ctx, ctx->object, mesh_src, vertexCos, numVerts);
360 
361  if (!ELEM(mesh_src, NULL, mesh)) {
362  /* Important not to free `vertexCos` owned by the caller. */
363  EditMeshData *edit_data = mesh_src->runtime.edit_data;
364  if (edit_data->vertexCos == vertexCos) {
365  edit_data->vertexCos = NULL;
366  }
367 
368  BKE_id_free(NULL, mesh_src);
369  }
370 }
371 
372 static void panel_draw(const bContext *UNUSED(C), Panel *panel)
373 {
374  uiLayout *sub, *row, *col;
375  uiLayout *layout = panel->layout;
376 
377  PointerRNA ob_ptr;
379 
380  uiLayoutSetPropSep(layout, true);
381 
382  row = uiLayoutRowWithHeading(layout, true, IFACE_("Motion"));
383  uiItemR(row, ptr, "use_x", UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE, NULL, ICON_NONE);
384  uiItemR(row, ptr, "use_y", UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE, NULL, ICON_NONE);
385 
386  uiItemR(layout, ptr, "use_cyclic", 0, NULL, ICON_NONE);
387 
388  row = uiLayoutRowWithHeading(layout, true, IFACE_("Along Normals"));
389  uiItemR(row, ptr, "use_normal", 0, "", ICON_NONE);
390  sub = uiLayoutRow(row, true);
391  uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_normal"));
392  uiItemR(sub, ptr, "use_normal_x", UI_ITEM_R_TOGGLE, "X", ICON_NONE);
393  uiItemR(sub, ptr, "use_normal_y", UI_ITEM_R_TOGGLE, "Y", ICON_NONE);
394  uiItemR(sub, ptr, "use_normal_z", UI_ITEM_R_TOGGLE, "Z", ICON_NONE);
395 
396  col = uiLayoutColumn(layout, false);
397  uiItemR(col, ptr, "falloff_radius", 0, "Falloff", ICON_NONE);
398  uiItemR(col, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
399  uiItemR(col, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
400  uiItemR(col, ptr, "narrowness", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
401 
402  modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL);
403 
404  modifier_panel_end(layout, ptr);
405 }
406 
407 static void position_panel_draw(const bContext *UNUSED(C), Panel *panel)
408 {
409  uiLayout *col;
410  uiLayout *layout = panel->layout;
411 
413 
414  uiLayoutSetPropSep(layout, true);
415 
416  uiItemR(layout, ptr, "start_position_object", 0, IFACE_("Object"), ICON_NONE);
417 
418  col = uiLayoutColumn(layout, true);
419  uiItemR(col, ptr, "start_position_x", 0, "Start Position X", ICON_NONE);
420  uiItemR(col, ptr, "start_position_y", 0, "Y", ICON_NONE);
421 }
422 
423 static void time_panel_draw(const bContext *UNUSED(C), Panel *panel)
424 {
425  uiLayout *col;
426  uiLayout *layout = panel->layout;
427 
429 
430  uiLayoutSetPropSep(layout, true);
431 
432  col = uiLayoutColumn(layout, false);
433  uiItemR(col, ptr, "time_offset", 0, "Offset", ICON_NONE);
434  uiItemR(col, ptr, "lifetime", 0, "Life", ICON_NONE);
435  uiItemR(col, ptr, "damping_time", 0, "Damping", ICON_NONE);
436  uiItemR(col, ptr, "speed", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
437 }
438 
439 static void texture_panel_draw(const bContext *C, Panel *panel)
440 {
441  uiLayout *col;
442  uiLayout *layout = panel->layout;
443 
444  PointerRNA ob_ptr;
446 
447  int texture_coords = RNA_enum_get(ptr, "texture_coords");
448 
449  uiTemplateID(layout, C, ptr, "texture", "texture.new", NULL, NULL, 0, ICON_NONE, NULL);
450 
451  uiLayoutSetPropSep(layout, true);
452 
453  col = uiLayoutColumn(layout, false);
454  uiItemR(col, ptr, "texture_coords", 0, IFACE_("Coordinates"), ICON_NONE);
455  if (texture_coords == MOD_DISP_MAP_OBJECT) {
456  uiItemR(col, ptr, "texture_coords_object", 0, IFACE_("Object"), ICON_NONE);
457  PointerRNA texture_coords_obj_ptr = RNA_pointer_get(ptr, "texture_coords_object");
458  if (!RNA_pointer_is_null(&texture_coords_obj_ptr) &&
459  (RNA_enum_get(&texture_coords_obj_ptr, "type") == OB_ARMATURE)) {
460  PointerRNA texture_coords_obj_data_ptr = RNA_pointer_get(&texture_coords_obj_ptr, "data");
462  ptr,
463  "texture_coords_bone",
464  &texture_coords_obj_data_ptr,
465  "bones",
466  IFACE_("Bone"),
467  ICON_NONE);
468  }
469  }
470  else if (texture_coords == MOD_DISP_MAP_UV && RNA_enum_get(&ob_ptr, "type") == OB_MESH) {
471  PointerRNA obj_data_ptr = RNA_pointer_get(&ob_ptr, "data");
472  uiItemPointerR(col, ptr, "uv_layer", &obj_data_ptr, "uv_layers", NULL, ICON_NONE);
473  }
474 }
475 
476 static void panelRegister(ARegionType *region_type)
477 {
478  PanelType *panel_type = modifier_panel_register(region_type, eModifierType_Wave, panel_draw);
480  region_type, "position", "Start Position", NULL, position_panel_draw, panel_type);
481  modifier_subpanel_register(region_type, "time", "Time", NULL, time_panel_draw, panel_type);
483  region_type, "texture", "Texture", NULL, texture_panel_draw, panel_type);
484 }
485 
487  /* name */ "Wave",
488  /* structName */ "WaveModifierData",
489  /* structSize */ sizeof(WaveModifierData),
490  /* srna */ &RNA_WaveModifier,
491  /* type */ eModifierTypeType_OnlyDeform,
494  /* icon */ ICON_MOD_WAVE,
495 
496  /* copyData */ BKE_modifier_copydata_generic,
497 
498  /* deformVerts */ deformVerts,
499  /* deformMatrices */ NULL,
500  /* deformVertsEM */ deformVertsEM,
501  /* deformMatricesEM */ NULL,
502  /* modifyMesh */ NULL,
503  /* modifyHair */ NULL,
504  /* modifyGeometrySet */ NULL,
505  /* modifyVolume */ NULL,
506 
507  /* initData */ initData,
508  /* requiredDataMask */ requiredDataMask,
509  /* freeData */ NULL,
510  /* isDisabled */ NULL,
511  /* updateDepsgraph */ updateDepsgraph,
512  /* dependsOnTime */ dependsOnTime,
513  /* dependsOnNormals */ dependsOnNormals,
514  /* foreachIDLink */ foreachIDLink,
515  /* foreachTexLink */ foreachTexLink,
516  /* freeRuntimeData */ NULL,
517  /* panelRegister */ panelRegister,
518  /* blendWrite */ NULL,
519  /* blendRead */ NULL,
520 };
typedef float(TangentPoint)[2]
support for deformation groups and hooks.
float BKE_defvert_find_weight(const struct MDeformVert *dvert, const int defgroup)
Definition: deform.c:632
void BKE_id_free(struct Main *bmain, void *idv)
@ IDWALK_CB_USER
Definition: BKE_lib_query.h:87
@ IDWALK_CB_NOP
Definition: BKE_lib_query.h:47
void BKE_mesh_wrapper_ensure_mdata(struct Mesh *me)
Definition: mesh_wrapper.c:98
void(* IDWalkFunc)(void *userData, struct Object *ob, struct ID **idpoin, int cb_flag)
Definition: BKE_modifier.h:120
@ eModifierTypeFlag_AcceptsCVs
Definition: BKE_modifier.h:81
@ eModifierTypeFlag_SupportsEditmode
Definition: BKE_modifier.h:83
@ eModifierTypeFlag_AcceptsVertexCosOnly
Definition: BKE_modifier.h:114
void(* TexWalkFunc)(void *userData, struct Object *ob, struct ModifierData *md, const char *propname)
Definition: BKE_modifier.h:121
void BKE_modifier_copydata_generic(const struct ModifierData *md, struct ModifierData *md_dst, const int flag)
@ eModifierTypeType_OnlyDeform
Definition: BKE_modifier.h:58
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:58
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
Definition: math_matrix.c:262
bool invert_m4_m4(float R[4][4], const float A[4][4])
Definition: math_matrix.c:1278
#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:44
@ MOD_DISP_MAP_OBJECT
@ MOD_DISP_MAP_GLOBAL
@ MOD_DISP_MAP_UV
@ eModifierType_Wave
@ 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
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 GLsizei width
_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
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)
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 num_verts, const bool use_normals, const bool use_orco)
Definition: MOD_util.c:186
void MOD_init_texture(MappingInfoModifierData *dmd, const ModifierEvalContext *ctx)
Definition: MOD_util.c:61
void MOD_depsgraph_update_object_bone_relation(struct DepsNodeHandle *node, Object *object, const char *bonename, const char *description)
Definition: MOD_util.c:270
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:76
void MOD_get_vgroup(Object *ob, struct Mesh *mesh, const char *name, MDeformVert **dvert, int *defgrp_index)
Definition: MOD_util.c:254
static void deformVertsEM(ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData, Mesh *mesh, float(*vertexCos)[3], int numVerts)
Definition: MOD_wave.c:332
static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
Definition: MOD_wave.c:92
static void texture_panel_draw(const bContext *C, Panel *panel)
Definition: MOD_wave.c:439
static bool dependsOnNormals(ModifierData *md)
Definition: MOD_wave.c:137
static void time_panel_draw(const bContext *UNUSED(C), Panel *panel)
Definition: MOD_wave.c:423
static void deformVerts(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, float(*vertexCos)[3], int numVerts)
Definition: MOD_wave.c:309
ModifierTypeInfo modifierType_Wave
Definition: MOD_wave.c:486
static void position_panel_draw(const bContext *UNUSED(C), Panel *panel)
Definition: MOD_wave.c:407
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
Definition: MOD_wave.c:78
static bool dependsOnTime(ModifierData *UNUSED(md))
Definition: MOD_wave.c:73
static void waveModifier_do(WaveModifierData *md, const ModifierEvalContext *ctx, Object *ob, Mesh *mesh, float(*vertexCos)[3], int numVerts)
Definition: MOD_wave.c:144
static void panel_draw(const bContext *UNUSED(C), Panel *panel)
Definition: MOD_wave.c:372
static void initData(ModifierData *md)
Definition: MOD_wave.c:64
static void panelRegister(ARegionType *region_type)
Definition: MOD_wave.c:476
static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData)
Definition: MOD_wave.c:87
static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
Definition: MOD_wave.c:120
Group RGB to Bright Vector Camera CLAMP
StructRNA RNA_WaveModifier
#define C
Definition: RandGen.cpp:39
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetActive(uiLayout *layout, bool active)
@ UI_ITEM_R_TOGGLE
@ UI_ITEM_R_FORCE_BLANK_DECORATE
@ UI_ITEM_R_SLIDER
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
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, const bool live_icon, const char *text)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
Scene scene
uint col
#define expf(x)
#define fmodf(x, y)
#define fabsf(x)
#define sqrtf(x)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
Definition: mallocn.c:48
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:295
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6562
bool RNA_pointer_is_null(const PointerRNA *ptr)
Definition: rna_access.c:174
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6261
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6402
const float(* vertexCos)[3]
Definition: DNA_ID.h:273
struct EditMeshData * edit_data
struct MVert * mvert
Mesh_Runtime runtime
struct Depsgraph * depsgraph
Definition: BKE_modifier.h:153
struct Object * object
Definition: BKE_modifier.h:154
struct DepsNodeHandle * node
Definition: BKE_modifier.h:147
float imat[4][4]
float obmat[4][4]
struct uiLayout * layout
float * nor
Definition: RE_texture.h:86
float tin
Definition: RE_texture.h:84
struct Object * objectcenter
struct Object * map_object
PointerRNA * ptr
Definition: wm_files.c:3157