Blender  V3.3
rna_modifier.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include <float.h>
8 #include <limits.h>
9 #include <stdlib.h>
10 
11 #include "DNA_armature_types.h"
12 #include "DNA_cachefile_types.h"
13 #include "DNA_mesh_types.h"
14 #include "DNA_modifier_types.h"
15 #include "DNA_object_force_types.h"
16 #include "DNA_object_types.h"
17 #include "DNA_scene_types.h"
18 
19 #include "MEM_guardedalloc.h"
20 
21 #include "BLI_math.h"
22 
23 #include "BLT_translation.h"
24 
25 #include "BKE_animsys.h"
26 #include "BKE_attribute.h"
27 #include "BKE_curveprofile.h"
28 #include "BKE_data_transfer.h"
29 #include "BKE_dynamicpaint.h"
30 #include "BKE_effect.h"
31 #include "BKE_fluid.h" /* For BKE_fluid_modifier_free & BKE_fluid_modifier_create_type_data */
32 #include "BKE_idprop.h"
33 #include "BKE_mesh_mapping.h"
34 #include "BKE_mesh_remap.h"
35 #include "BKE_multires.h"
36 #include "BKE_ocean.h"
37 
38 #include "RNA_access.h"
39 #include "RNA_define.h"
40 #include "RNA_enum_types.h"
41 
42 #include "rna_internal.h"
43 
44 #include "WM_api.h"
45 #include "WM_types.h"
46 
47 #include "MOD_nodes.h"
48 
50  RNA_ENUM_ITEM_HEADING(N_("Modify"), NULL),
52  "DATA_TRANSFER",
53  ICON_MOD_DATA_TRANSFER,
54  "Data Transfer",
55  "Transfer several types of data (vertex groups, UV maps, vertex colors, custom normals) from "
56  "one mesh to another"},
58  "MESH_CACHE",
59  ICON_MOD_MESHDEFORM,
60  "Mesh Cache",
61  "Deform the mesh using an external frame-by-frame vertex transform cache"},
63  "MESH_SEQUENCE_CACHE",
64  ICON_MOD_MESHDEFORM,
65  "Mesh Sequence Cache",
66  "Deform the mesh or curve using an external mesh cache in Alembic format"},
68  "NORMAL_EDIT",
69  ICON_MOD_NORMALEDIT,
70  "Normal Edit",
71  "Modify the direction of the surface normals"},
73  "WEIGHTED_NORMAL",
74  ICON_MOD_NORMALEDIT,
75  "Weighted Normal",
76  "Modify the direction of the surface normals using a weighting method"},
78  "UV_PROJECT",
79  ICON_MOD_UVPROJECT,
80  "UV Project",
81  "Project the UV map coordinates from the negative Z axis of another object"},
83  "UV_WARP",
84  ICON_MOD_UVPROJECT,
85  "UV Warp",
86  "Transform the UV map using the difference between two objects"},
88  "VERTEX_WEIGHT_EDIT",
89  ICON_MOD_VERTEX_WEIGHT,
90  "Vertex Weight Edit",
91  "Modify of the weights of a vertex group"},
93  "VERTEX_WEIGHT_MIX",
94  ICON_MOD_VERTEX_WEIGHT,
95  "Vertex Weight Mix",
96  "Mix the weights of two vertex groups"},
98  "VERTEX_WEIGHT_PROXIMITY",
99  ICON_MOD_VERTEX_WEIGHT,
100  "Vertex Weight Proximity",
101  "Set the vertex group weights based on the distance to another target object"},
102 
103  RNA_ENUM_ITEM_HEADING(N_("Generate"), NULL),
105  "ARRAY",
106  ICON_MOD_ARRAY,
107  "Array",
108  "Create copies of the shape with offsets"},
110  "BEVEL",
111  ICON_MOD_BEVEL,
112  "Bevel",
113  "Generate sloped corners by adding geometry to the mesh's edges or vertices"},
115  "BOOLEAN",
116  ICON_MOD_BOOLEAN,
117  "Boolean",
118  "Use another shape to cut, combine or perform a difference operation"},
120  "BUILD",
121  ICON_MOD_BUILD,
122  "Build",
123  "Cause the faces of the mesh object to appear or disappear one after the other over time"},
125  "DECIMATE",
126  ICON_MOD_DECIM,
127  "Decimate",
128  "Reduce the geometry density"},
130  "EDGE_SPLIT",
131  ICON_MOD_EDGESPLIT,
132  "Edge Split",
133  "Split away joined faces at the edges"},
134  {eModifierType_Nodes, "NODES", ICON_GEOMETRY_NODES, "Geometry Nodes", ""},
136  "MASK",
137  ICON_MOD_MASK,
138  "Mask",
139  "Dynamically hide vertices based on a vertex group or armature"},
141  "MIRROR",
142  ICON_MOD_MIRROR,
143  "Mirror",
144  "Mirror along the local X, Y and/or Z axes, over the object origin"},
146  "MESH_TO_VOLUME",
147  ICON_VOLUME_DATA,
148  "Mesh to Volume",
149  ""}, /* TODO: Use correct icon. */
151  "MULTIRES",
152  ICON_MOD_MULTIRES,
153  "Multiresolution",
154  "Subdivide the mesh in a way that allows editing the higher subdivision levels"},
156  "REMESH",
157  ICON_MOD_REMESH,
158  "Remesh",
159  "Generate new mesh topology based on the current shape"},
161  "SCREW",
162  ICON_MOD_SCREW,
163  "Screw",
164  "Lathe around an axis, treating the input mesh as a profile"},
166  "SKIN",
167  ICON_MOD_SKIN,
168  "Skin",
169  "Create a solid shape from vertices and edges, using the vertex radius to define the "
170  "thickness"},
171  {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", "Make the surface thick"},
173  "SUBSURF",
174  ICON_MOD_SUBSURF,
175  "Subdivision Surface",
176  "Split the faces into smaller parts, giving it a smoother appearance"},
178  "TRIANGULATE",
179  ICON_MOD_TRIANGULATE,
180  "Triangulate",
181  "Convert all polygons to triangles"},
183  "VOLUME_TO_MESH",
184  ICON_VOLUME_DATA,
185  "Volume to Mesh",
186  ""}, /* TODO: Use correct icon. */
188  "WELD",
189  ICON_AUTOMERGE_OFF,
190  "Weld",
191  "Find groups of vertices closer than dist and merge them together"},
193  "WIREFRAME",
194  ICON_MOD_WIREFRAME,
195  "Wireframe",
196  "Convert faces into thickened edges"},
197 
198  RNA_ENUM_ITEM_HEADING(N_("Deform"), NULL),
200  "ARMATURE",
201  ICON_MOD_ARMATURE,
202  "Armature",
203  "Deform the shape using an armature object"},
205  "CAST",
206  ICON_MOD_CAST,
207  "Cast",
208  "Shift the shape towards a predefined primitive"},
209  {eModifierType_Curve, "CURVE", ICON_MOD_CURVE, "Curve", "Bend the mesh using a curve object"},
211  "DISPLACE",
212  ICON_MOD_DISPLACE,
213  "Displace",
214  "Offset vertices based on a texture"},
215  {eModifierType_Hook, "HOOK", ICON_HOOK, "Hook", "Deform specific points using another object"},
217  "LAPLACIANDEFORM",
218  ICON_MOD_MESHDEFORM,
219  "Laplacian Deform",
220  "Deform based a series of anchor points"},
222  "LATTICE",
223  ICON_MOD_LATTICE,
224  "Lattice",
225  "Deform using the shape of a lattice object"},
227  "MESH_DEFORM",
228  ICON_MOD_MESHDEFORM,
229  "Mesh Deform",
230  "Deform using a different mesh, which acts as a deformation cage"},
232  "SHRINKWRAP",
233  ICON_MOD_SHRINKWRAP,
234  "Shrinkwrap",
235  "Project the shape onto another object"},
237  "SIMPLE_DEFORM",
238  ICON_MOD_SIMPLEDEFORM,
239  "Simple Deform",
240  "Deform the shape by twisting, bending, tapering or stretching"},
242  "SMOOTH",
243  ICON_MOD_SMOOTH,
244  "Smooth",
245  "Smooth the mesh by flattening the angles between adjacent faces"},
247  "CORRECTIVE_SMOOTH",
248  ICON_MOD_SMOOTH,
249  "Smooth Corrective",
250  "Smooth the mesh while still preserving the volume"},
252  "LAPLACIANSMOOTH",
253  ICON_MOD_SMOOTH,
254  "Smooth Laplacian",
255  "Reduce the noise on a mesh surface with minimal changes to its shape"},
257  "SURFACE_DEFORM",
258  ICON_MOD_MESHDEFORM,
259  "Surface Deform",
260  "Transfer motion from another mesh"},
262  "WARP",
263  ICON_MOD_WARP,
264  "Warp",
265  "Warp parts of a mesh to a new location in a very flexible way thanks to 2 specified "
266  "objects"},
268  "WAVE",
269  ICON_MOD_WAVE,
270  "Wave",
271  "Adds a ripple-like motion to an object's geometry"},
273  "VOLUME_DISPLACE",
274  ICON_VOLUME_DATA,
275  "Volume Displace",
276  "Deform volume based on noise or other vector fields"}, /* TODO: Use correct icon. */
277 
278  RNA_ENUM_ITEM_HEADING(N_("Physics"), NULL),
279  {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
280  {eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
281  {eModifierType_DynamicPaint, "DYNAMIC_PAINT", ICON_MOD_DYNAMICPAINT, "Dynamic Paint", ""},
283  "EXPLODE",
284  ICON_MOD_EXPLODE,
285  "Explode",
286  "Break apart the mesh faces and let them follow particles"},
287  {eModifierType_Fluid, "FLUID", ICON_MOD_FLUIDSIM, "Fluid", ""},
288  {eModifierType_Ocean, "OCEAN", ICON_MOD_OCEAN, "Ocean", "Generate a moving ocean surface"},
290  "PARTICLE_INSTANCE",
291  ICON_MOD_PARTICLE_INSTANCE,
292  "Particle Instance",
293  ""},
295  "PARTICLE_SYSTEM",
296  ICON_MOD_PARTICLES,
297  "Particle System",
298  "Spawn particles from the shape"},
299  {eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
300  {eModifierType_Surface, "SURFACE", ICON_MODIFIER, "Surface", ""},
301  {0, NULL, 0, NULL, NULL},
302 };
303 
306  "BEAUTY",
307  0,
308  "Beauty",
309  "Split the quads in nice triangles, slower method"},
311  "FIXED",
312  0,
313  "Fixed",
314  "Split the quads on the first and third vertices"},
316  "FIXED_ALTERNATE",
317  0,
318  "Fixed Alternate",
319  "Split the quads on the 2nd and 4th vertices"},
321  "SHORTEST_DIAGONAL",
322  0,
323  "Shortest Diagonal",
324  "Split the quads along their shortest diagonal"},
326  "LONGEST_DIAGONAL",
327  0,
328  "Longest Diagonal",
329  "Split the quads along their longest diagonal"},
330  {0, NULL, 0, NULL, NULL},
331 };
332 
335  "BEAUTY",
336  0,
337  "Beauty",
338  "Arrange the new triangles evenly (slow)"},
340  "CLIP",
341  0,
342  "Clip",
343  "Split the polygons with an ear clipping algorithm"},
344  {0, NULL, 0, NULL, NULL},
345 };
346 
349  "ON_SURFACE",
350  0,
351  "On Surface",
352  "The point is constrained to the surface of the target object, "
353  "with distance offset towards the original point location"},
355  "INSIDE",
356  0,
357  "Inside",
358  "The point is constrained to be inside the target object"},
360  "OUTSIDE",
361  0,
362  "Outside",
363  "The point is constrained to be outside the target object"},
365  "OUTSIDE_SURFACE",
366  0,
367  "Outside Surface",
368  "The point is constrained to the surface of the target object, "
369  "with distance offset always to the outside, towards or away from the original location"},
371  "ABOVE_SURFACE",
372  0,
373  "Above Surface",
374  "The point is constrained to the surface of the target object, "
375  "with distance offset applied exactly along the target normal"},
376  {0, NULL, 0, NULL, NULL},
377 };
378 
381  "NEAREST_SURFACEPOINT",
382  0,
383  "Nearest Surface Point",
384  "Shrink the mesh to the nearest target surface"},
386  "PROJECT",
387  0,
388  "Project",
389  "Shrink the mesh to the nearest target surface along a given axis"},
391  "NEAREST_VERTEX",
392  0,
393  "Nearest Vertex",
394  "Shrink the mesh to the nearest target vertex"},
396  "TARGET_PROJECT",
397  0,
398  "Target Normal Project",
399  "Shrink the mesh to the nearest target surface "
400  "along the interpolated vertex normals of the target"},
401  {0, NULL, 0, NULL, NULL},
402 };
403 
405  {0, "OFF", 0, "Off", "No culling"},
407  "FRONT",
408  0,
409  "Front",
410  "No projection when in front of the face"},
411  {MOD_SHRINKWRAP_CULL_TARGET_BACKFACE, "BACK", 0, "Back", "No projection when behind the face"},
412  {0, NULL, 0, NULL, NULL},
413 };
414 
415 #ifndef RNA_RUNTIME
416 /* use eWarp_Falloff_*** & eHook_Falloff_***, they're in sync */
418  {eWarp_Falloff_None, "NONE", 0, "No Falloff", ""},
419  {eWarp_Falloff_Curve, "CURVE", 0, "Curve", ""},
420  {eWarp_Falloff_Smooth, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
421  {eWarp_Falloff_Sphere, "SPHERE", ICON_SPHERECURVE, "Sphere", ""},
422  {eWarp_Falloff_Root, "ROOT", ICON_ROOTCURVE, "Root", ""},
423  {eWarp_Falloff_InvSquare, "INVERSE_SQUARE", ICON_ROOTCURVE, "Inverse Square", ""},
424  {eWarp_Falloff_Sharp, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
425  {eWarp_Falloff_Linear, "LINEAR", ICON_LINCURVE, "Linear", ""},
426  {eWarp_Falloff_Const, "CONSTANT", ICON_NOCURVE, "Constant", ""},
427  {0, NULL, 0, NULL, NULL},
428 };
429 #endif
430 
431 /* ***** Data Transfer ***** */
432 
434  {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"},
435  {MREMAP_MODE_VERT_NEAREST, "NEAREST", 0, "Nearest Vertex", "Copy from closest vertex"},
437  "EDGE_NEAREST",
438  0,
439  "Nearest Edge Vertex",
440  "Copy from closest vertex of closest edge"},
442  "EDGEINTERP_NEAREST",
443  0,
444  "Nearest Edge Interpolated",
445  "Copy from interpolated values of vertices from closest point on closest edge"},
447  "POLY_NEAREST",
448  0,
449  "Nearest Face Vertex",
450  "Copy from closest vertex of closest face"},
452  "POLYINTERP_NEAREST",
453  0,
454  "Nearest Face Interpolated",
455  "Copy from interpolated values of vertices from closest point on closest face"},
457  "POLYINTERP_VNORPROJ",
458  0,
459  "Projected Face Interpolated",
460  "Copy from interpolated values of vertices from point on closest face hit by "
461  "normal-projection"},
462  {0, NULL, 0, NULL, NULL},
463 };
464 
466  {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"},
468  "VERT_NEAREST",
469  0,
470  "Nearest Vertices",
471  "Copy from most similar edge (edge which vertices are the closest of destination edge's "
472  "ones)"},
474  "NEAREST",
475  0,
476  "Nearest Edge",
477  "Copy from closest edge (using midpoints)"},
479  "POLY_NEAREST",
480  0,
481  "Nearest Face Edge",
482  "Copy from closest edge of closest face (using midpoints)"},
484  "EDGEINTERP_VNORPROJ",
485  0,
486  "Projected Edge Interpolated",
487  "Interpolate all source edges hit by the projection of destination one along its own normal "
488  "(from vertices)"},
489  {0, NULL, 0, NULL, NULL},
490 };
491 
493  {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"},
495  "NEAREST_NORMAL",
496  0,
497  "Nearest Corner and Best Matching Normal",
498  "Copy from nearest corner which has the best matching normal"},
500  "NEAREST_POLYNOR",
501  0,
502  "Nearest Corner and Best Matching Face Normal",
503  "Copy from nearest corner which has the face with the best matching normal to destination "
504  "corner's face one"},
506  "NEAREST_POLY",
507  0,
508  "Nearest Corner of Nearest Face",
509  "Copy from nearest corner of nearest polygon"},
511  "POLYINTERP_NEAREST",
512  0,
513  "Nearest Face Interpolated",
514  "Copy from interpolated corners of the nearest source polygon"},
516  "POLYINTERP_LNORPROJ",
517  0,
518  "Projected Face Interpolated",
519  "Copy from interpolated corners of the source polygon hit by corner normal projection"},
520  {0, NULL, 0, NULL, NULL},
521 };
522 
524  {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"},
526  "NEAREST",
527  0,
528  "Nearest Face",
529  "Copy from nearest polygon (using center points)"},
531  "NORMAL",
532  0,
533  "Best Normal-Matching",
534  "Copy from source polygon which normal is the closest to destination one"},
536  "POLYINTERP_PNORPROJ",
537  0,
538  "Projected Face Interpolated",
539  "Interpolate all source polygons intersected by the projection of destination one along its "
540  "own normal"},
541  {0, NULL, 0, NULL, NULL},
542 };
543 
545  {CDT_MIX_TRANSFER, "REPLACE", 0, "Replace", "Overwrite all elements' data"},
547  "ABOVE_THRESHOLD",
548  0,
549  "Above Threshold",
550  "Only replace destination elements where data is above given threshold (exact behavior "
551  "depends on data type)"},
553  "BELOW_THRESHOLD",
554  0,
555  "Below Threshold",
556  "Only replace destination elements where data is below given threshold (exact behavior "
557  "depends on data type)"},
558  {CDT_MIX_MIX,
559  "MIX",
560  0,
561  "Mix",
562  "Mix source value into destination one, using given threshold as factor"},
563  {CDT_MIX_ADD,
564  "ADD",
565  0,
566  "Add",
567  "Add source value to destination one, using given threshold as factor"},
568  {CDT_MIX_SUB,
569  "SUB",
570  0,
571  "Subtract",
572  "Subtract source value to destination one, using given threshold as factor"},
573  {CDT_MIX_MUL,
574  "MUL",
575  0,
576  "Multiply",
577  "Multiply source value to destination one, using given threshold as factor"},
578  /* Etc. */
579  {0, NULL, 0, NULL, NULL},
580 };
581 
583  {DT_LAYERS_ACTIVE_SRC, "ACTIVE", 0, "Active Layer", "Only transfer active data layer"},
584  {DT_LAYERS_ALL_SRC, "ALL", 0, "All Layers", "Transfer all data layers"},
586  "BONE_SELECT",
587  0,
588  "Selected Pose Bones",
589  "Transfer all vertex groups used by selected pose bones"},
591  "BONE_DEFORM",
592  0,
593  "Deform Pose Bones",
594  "Transfer all vertex groups used by deform bones"},
595  {0, NULL, 0, NULL, NULL},
596 };
597 
599  {DT_LAYERS_ACTIVE_DST, "ACTIVE", 0, "Active Layer", "Affect active data layer of all targets"},
600  {DT_LAYERS_NAME_DST, "NAME", 0, "By Name", "Match target data layers to affect by name"},
602  "INDEX",
603  0,
604  "By Order",
605  "Match target data layers to affect by order (indices)"},
606  {0, NULL, 0, NULL, NULL},
607 };
608 
610  {0, "X", 0, "X", ""},
611  {1, "Y", 0, "Y", ""},
612  {0, NULL, 0, NULL, NULL},
613 };
614 
616  {0, "X", 0, "X", ""},
617  {1, "Y", 0, "Y", ""},
618  {2, "Z", 0, "Z", ""},
619  {0, NULL, 0, NULL, NULL},
620 };
621 
623  {(1 << 0), "X", 0, "X", ""},
624  {(1 << 1), "Y", 0, "Y", ""},
625  {(1 << 2), "Z", 0, "Z", ""},
626  {0, NULL, 0, NULL, NULL},
627 };
628 
630  {SUBSURF_UV_SMOOTH_NONE, "NONE", 0, "None", "UVs are not smoothed, boundaries are kept sharp"},
632  "PRESERVE_CORNERS",
633  0,
634  "Keep Corners",
635  "UVs are smoothed, corners on discontinuous boundary are kept sharp"},
637  "PRESERVE_CORNERS_AND_JUNCTIONS",
638  0,
639  "Keep Corners, Junctions",
640  "UVs are smoothed, corners on discontinuous boundary and "
641  "junctions of 3 or more regions are kept sharp"},
643  "PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE",
644  0,
645  "Keep Corners, Junctions, Concave",
646  "UVs are smoothed, corners on discontinuous boundary, "
647  "junctions of 3 or more regions and darts and concave corners are kept sharp"},
649  "PRESERVE_BOUNDARIES",
650  0,
651  "Keep Boundaries",
652  "UVs are smoothed, boundaries are kept sharp"},
653  {SUBSURF_UV_SMOOTH_ALL, "SMOOTH_ALL", 0, "All", "UVs and boundaries are smoothed"},
654  {0, NULL, 0, NULL, NULL},
655 };
656 
659  "PRESERVE_CORNERS",
660  0,
661  "Keep Corners",
662  "Smooth boundaries, but corners are kept sharp"},
663  {SUBSURF_BOUNDARY_SMOOTH_ALL, "ALL", 0, "All", "Smooth boundaries, including corners"},
664  {0, NULL, 0, NULL, NULL},
665 };
666 
667 #ifdef RNA_RUNTIME
668 # include "DNA_curve_types.h"
669 # include "DNA_fluid_types.h"
670 # include "DNA_particle_types.h"
671 
672 # include "BKE_cachefile.h"
673 # include "BKE_context.h"
674 # include "BKE_deform.h"
675 # include "BKE_mesh_runtime.h"
676 # include "BKE_modifier.h"
677 # include "BKE_object.h"
678 # include "BKE_particle.h"
679 
680 # include "BLI_sort_utils.h"
681 
682 # include "DEG_depsgraph.h"
683 # include "DEG_depsgraph_build.h"
684 # include "DEG_depsgraph_query.h"
685 
686 # ifdef WITH_ALEMBIC
687 # include "ABC_alembic.h"
688 # endif
689 
690 static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
691 {
694  iter, (void *)uvp->projectors, sizeof(Object *), uvp->projectors_num, 0, NULL);
695 }
696 
697 static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
698 {
699  ModifierData *md = (ModifierData *)ptr->data;
700  const ModifierTypeInfo *modifier_type = BKE_modifier_get_info(md->type);
701  if (modifier_type != NULL) {
702  return modifier_type->srna;
703  }
704  return &RNA_Modifier;
705 }
706 
707 static void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
708 {
709  ModifierData *md = ptr->data;
710  char oldname[sizeof(md->name)];
711 
712  /* make a copy of the old name first */
713  BLI_strncpy(oldname, md->name, sizeof(md->name));
714 
715  /* copy the new name into the name slot */
716  BLI_strncpy_utf8(md->name, value, sizeof(md->name));
717 
718  /* make sure the name is truly unique */
719  if (ptr->owner_id) {
720  Object *ob = (Object *)ptr->owner_id;
722  }
723 
724  /* fix all the animation data which may link to this */
725  BKE_animdata_fix_paths_rename_all(NULL, "modifiers", oldname, md->name);
726 }
727 
728 static char *rna_Modifier_path(const PointerRNA *ptr)
729 {
730  const ModifierData *md = ptr->data;
731  char name_esc[sizeof(md->name) * 2];
732 
733  BLI_str_escape(name_esc, md->name, sizeof(name_esc));
734  return BLI_sprintfN("modifiers[\"%s\"]", name_esc);
735 }
736 
737 static void rna_Modifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
738 {
741 }
742 
743 static void rna_Modifier_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
744 {
745  rna_Modifier_update(bmain, scene, ptr);
747 }
748 
749 static void rna_Modifier_is_active_set(PointerRNA *ptr, bool value)
750 {
751  ModifierData *md = ptr->data;
752 
753  if (value) {
754  /* Disable the active flag of all other modifiers. */
755  for (ModifierData *prev_md = md->prev; prev_md != NULL; prev_md = prev_md->prev) {
756  prev_md->flag &= ~eModifierFlag_Active;
757  }
758  for (ModifierData *next_md = md->next; next_md != NULL; next_md = next_md->next) {
759  next_md->flag &= ~eModifierFlag_Active;
760  }
761 
762  md->flag |= eModifierFlag_Active;
764  }
765 }
766 
767 /* Vertex Groups */
768 
769 # define RNA_MOD_VGROUP_NAME_SET(_type, _prop) \
770  static void rna_##_type##Modifier_##_prop##_set(PointerRNA *ptr, const char *value) \
771  { \
772  _type##ModifierData *tmd = (_type##ModifierData *)ptr->data; \
773  rna_object_vgroup_name_set(ptr, value, tmd->_prop, sizeof(tmd->_prop)); \
774  }
775 
776 RNA_MOD_VGROUP_NAME_SET(Armature, defgrp_name);
777 RNA_MOD_VGROUP_NAME_SET(Bevel, defgrp_name);
778 RNA_MOD_VGROUP_NAME_SET(Cast, defgrp_name);
779 RNA_MOD_VGROUP_NAME_SET(Curve, name);
780 RNA_MOD_VGROUP_NAME_SET(DataTransfer, defgrp_name);
781 RNA_MOD_VGROUP_NAME_SET(Decimate, defgrp_name);
782 RNA_MOD_VGROUP_NAME_SET(CorrectiveSmooth, defgrp_name);
783 RNA_MOD_VGROUP_NAME_SET(Displace, defgrp_name);
784 RNA_MOD_VGROUP_NAME_SET(Hook, name);
785 RNA_MOD_VGROUP_NAME_SET(LaplacianDeform, anchor_grp_name);
786 RNA_MOD_VGROUP_NAME_SET(LaplacianSmooth, defgrp_name);
787 RNA_MOD_VGROUP_NAME_SET(Lattice, name);
788 RNA_MOD_VGROUP_NAME_SET(Mask, vgroup);
789 RNA_MOD_VGROUP_NAME_SET(MeshCache, defgrp_name);
790 RNA_MOD_VGROUP_NAME_SET(MeshDeform, defgrp_name);
791 RNA_MOD_VGROUP_NAME_SET(NormalEdit, defgrp_name);
792 RNA_MOD_VGROUP_NAME_SET(Shrinkwrap, vgroup_name);
793 RNA_MOD_VGROUP_NAME_SET(SimpleDeform, vgroup_name);
794 RNA_MOD_VGROUP_NAME_SET(Smooth, defgrp_name);
795 RNA_MOD_VGROUP_NAME_SET(Solidify, defgrp_name);
796 RNA_MOD_VGROUP_NAME_SET(Solidify, shell_defgrp_name);
797 RNA_MOD_VGROUP_NAME_SET(Solidify, rim_defgrp_name);
798 RNA_MOD_VGROUP_NAME_SET(SurfaceDeform, defgrp_name);
799 RNA_MOD_VGROUP_NAME_SET(UVWarp, vgroup_name);
800 RNA_MOD_VGROUP_NAME_SET(Warp, defgrp_name);
801 RNA_MOD_VGROUP_NAME_SET(Wave, defgrp_name);
802 RNA_MOD_VGROUP_NAME_SET(WeightVGEdit, defgrp_name);
803 RNA_MOD_VGROUP_NAME_SET(WeightVGEdit, mask_defgrp_name);
804 RNA_MOD_VGROUP_NAME_SET(WeightVGMix, defgrp_name_a);
805 RNA_MOD_VGROUP_NAME_SET(WeightVGMix, defgrp_name_b);
806 RNA_MOD_VGROUP_NAME_SET(WeightVGMix, mask_defgrp_name);
807 RNA_MOD_VGROUP_NAME_SET(WeightVGProximity, defgrp_name);
808 RNA_MOD_VGROUP_NAME_SET(WeightVGProximity, mask_defgrp_name);
809 RNA_MOD_VGROUP_NAME_SET(WeightedNormal, defgrp_name);
810 RNA_MOD_VGROUP_NAME_SET(Weld, defgrp_name);
811 RNA_MOD_VGROUP_NAME_SET(Wireframe, defgrp_name);
812 
813 static void rna_ExplodeModifier_vgroup_get(PointerRNA *ptr, char *value)
814 {
817 }
818 
819 static int rna_ExplodeModifier_vgroup_length(PointerRNA *ptr)
820 {
823 }
824 
825 static void rna_ExplodeModifier_vgroup_set(PointerRNA *ptr, const char *value)
826 {
829 }
830 
831 # undef RNA_MOD_VGROUP_NAME_SET
832 
833 /* UV layers */
834 
835 # define RNA_MOD_UVLAYER_NAME_SET(_type, _prop) \
836  static void rna_##_type##Modifier_##_prop##_set(PointerRNA *ptr, const char *value) \
837  { \
838  _type##ModifierData *tmd = (_type##ModifierData *)ptr->data; \
839  rna_object_uvlayer_name_set(ptr, value, tmd->_prop, sizeof(tmd->_prop)); \
840  }
841 
842 RNA_MOD_UVLAYER_NAME_SET(MappingInfo, uvlayer_name);
843 RNA_MOD_UVLAYER_NAME_SET(UVProject, uvlayer_name);
844 RNA_MOD_UVLAYER_NAME_SET(UVWarp, uvlayer_name);
845 RNA_MOD_UVLAYER_NAME_SET(WeightVGEdit, mask_tex_uvlayer_name);
846 RNA_MOD_UVLAYER_NAME_SET(WeightVGMix, mask_tex_uvlayer_name);
847 RNA_MOD_UVLAYER_NAME_SET(WeightVGProximity, mask_tex_uvlayer_name);
848 
849 # undef RNA_MOD_UVLAYER_NAME_SET
850 
851 /* Objects */
852 
853 static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRNA value)
854 {
855  Object *ob = value.data;
856 
857  if (!self || ob != self) {
858  if (!ob || type == OB_EMPTY || ob->type == type) {
859  id_lib_extern((ID *)ob);
860  *ob_p = ob;
861  }
862  }
863 }
864 
865 # define RNA_MOD_OBJECT_SET(_type, _prop, _obtype) \
866  static void rna_##_type##Modifier_##_prop##_set( \
867  PointerRNA *ptr, PointerRNA value, struct ReportList *UNUSED(reports)) \
868  { \
869  _type##ModifierData *tmd = (_type##ModifierData *)ptr->data; \
870  modifier_object_set((Object *)ptr->owner_id, &tmd->_prop, _obtype, value); \
871  }
872 
873 RNA_MOD_OBJECT_SET(Armature, object, OB_ARMATURE);
874 RNA_MOD_OBJECT_SET(Array, start_cap, OB_MESH);
875 RNA_MOD_OBJECT_SET(Array, end_cap, OB_MESH);
876 RNA_MOD_OBJECT_SET(Array, curve_ob, OB_CURVES_LEGACY);
877 RNA_MOD_OBJECT_SET(Boolean, object, OB_MESH);
878 RNA_MOD_OBJECT_SET(Cast, object, OB_EMPTY);
879 RNA_MOD_OBJECT_SET(Curve, object, OB_CURVES_LEGACY);
880 RNA_MOD_OBJECT_SET(DataTransfer, ob_source, OB_MESH);
881 RNA_MOD_OBJECT_SET(Lattice, object, OB_LATTICE);
882 RNA_MOD_OBJECT_SET(Mask, ob_arm, OB_ARMATURE);
883 RNA_MOD_OBJECT_SET(MeshDeform, object, OB_MESH);
884 RNA_MOD_OBJECT_SET(NormalEdit, target, OB_EMPTY);
885 RNA_MOD_OBJECT_SET(Shrinkwrap, target, OB_MESH);
886 RNA_MOD_OBJECT_SET(Shrinkwrap, auxTarget, OB_MESH);
887 RNA_MOD_OBJECT_SET(SurfaceDeform, target, OB_MESH);
888 
889 static void rna_HookModifier_object_set(PointerRNA *ptr,
890  PointerRNA value,
891  struct ReportList *UNUSED(reports))
892 {
893  Object *owner = (Object *)ptr->owner_id;
894  HookModifierData *hmd = ptr->data;
895  Object *ob = (Object *)value.data;
896 
897  hmd->object = ob;
898  id_lib_extern((ID *)ob);
899  BKE_object_modifier_hook_reset(owner, hmd);
900 }
901 
902 static bool rna_HookModifier_object_override_apply(Main *bmain,
903  PointerRNA *ptr_dst,
904  PointerRNA *ptr_src,
905  PointerRNA *ptr_storage,
906  PropertyRNA *prop_dst,
907  PropertyRNA *prop_src,
908  PropertyRNA *UNUSED(prop_storage),
909  const int len_dst,
910  const int len_src,
911  const int len_storage,
912  PointerRNA *UNUSED(ptr_item_dst),
913  PointerRNA *UNUSED(ptr_item_src),
914  PointerRNA *UNUSED(ptr_item_storage),
916 {
917  BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0);
919  "Unsupported RNA override operation on Hook modifier target object pointer");
920  UNUSED_VARS_NDEBUG(ptr_storage, len_dst, len_src, len_storage, opop);
921 
922  /* We need a special handling here because setting hook target resets invert parent matrix,
923  * which is evil in our case. */
924  HookModifierData *hmd = ptr_dst->data;
925  Object *owner = (Object *)ptr_dst->owner_id;
926  Object *target_dst = RNA_property_pointer_get(ptr_dst, prop_dst).data;
927  Object *target_src = RNA_property_pointer_get(ptr_src, prop_src).data;
928 
929  BLI_assert(target_dst == hmd->object);
930 
931  if (target_src == target_dst) {
932  return false;
933  }
934 
935  hmd->object = target_src;
936  if (target_src == NULL) {
937  /* The only case where we do want default behavior (with matrix reset). */
938  BKE_object_modifier_hook_reset(owner, hmd);
939  }
940  RNA_property_update_main(bmain, NULL, ptr_dst, prop_dst);
941  return true;
942 }
943 
944 static void rna_HookModifier_subtarget_set(PointerRNA *ptr, const char *value)
945 {
946  Object *owner = (Object *)ptr->owner_id;
947  HookModifierData *hmd = ptr->data;
948 
949  BLI_strncpy(hmd->subtarget, value, sizeof(hmd->subtarget));
950  BKE_object_modifier_hook_reset(owner, hmd);
951 }
952 
953 static int rna_HookModifier_vertex_indices_get_length(const PointerRNA *ptr,
955 {
956  const HookModifierData *hmd = ptr->data;
957  int indexar_num = hmd->indexar ? hmd->indexar_num : 0;
958  return (length[0] = indexar_num);
959 }
960 
961 static void rna_HookModifier_vertex_indices_get(PointerRNA *ptr, int *values)
962 {
963  HookModifierData *hmd = ptr->data;
964  if (hmd->indexar != NULL) {
965  memcpy(values, hmd->indexar, sizeof(int) * hmd->indexar_num);
966  }
967 }
968 
969 static void rna_HookModifier_vertex_indices_set(HookModifierData *hmd,
970  ReportList *reports,
971  int indices_len,
972  int *indices)
973 {
974  if (indices_len == 0) {
975  MEM_SAFE_FREE(hmd->indexar);
976  hmd->indexar_num = 0;
977  }
978  else {
979  /* Reject negative indices. */
980  for (int i = 0; i < indices_len; i++) {
981  if (indices[i] < 0) {
982  BKE_reportf(reports, RPT_ERROR, "Negative vertex index in vertex_indices_set");
983  return;
984  }
985  }
986 
987  /* Copy and sort the index array. */
988  size_t size = sizeof(int) * indices_len;
989  int *buffer = MEM_mallocN(size, "hook indexar");
990  memcpy(buffer, indices, size);
991 
992  qsort(buffer, indices_len, sizeof(int), BLI_sortutil_cmp_int);
993 
994  /* Reject duplicate indices. */
995  for (int i = 1; i < indices_len; i++) {
996  if (buffer[i] == buffer[i - 1]) {
997  BKE_reportf(reports, RPT_ERROR, "Duplicate index %d in vertex_indices_set", buffer[i]);
998  MEM_freeN(buffer);
999  return;
1000  }
1001  }
1002 
1003  /* Success - save the new array. */
1004  MEM_SAFE_FREE(hmd->indexar);
1005  hmd->indexar = buffer;
1006  hmd->indexar_num = indices_len;
1007  }
1008 }
1009 
1010 static PointerRNA rna_UVProjector_object_get(PointerRNA *ptr)
1011 {
1012  Object **ob = (Object **)ptr->data;
1013  return rna_pointer_inherit_refine(ptr, &RNA_Object, *ob);
1014 }
1015 
1016 static void rna_UVProjector_object_set(PointerRNA *ptr,
1017  PointerRNA value,
1018  struct ReportList *UNUSED(reports))
1019 {
1020  Object **ob_p = (Object **)ptr->data;
1021  Object *ob = (Object *)value.data;
1022  id_lib_extern((ID *)ob);
1023  *ob_p = ob;
1024 }
1025 
1026 # undef RNA_MOD_OBJECT_SET
1027 
1028 /* Other rna callbacks */
1029 
1030 static void rna_fluid_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
1031 {
1033  Object *ob = (Object *)ptr->owner_id;
1034 
1035  /* nothing changed */
1036  if ((fmd->type & MOD_FLUID_TYPE_DOMAIN) && fmd->domain) {
1037  return;
1038  }
1039 
1040 # ifdef WITH_FLUID
1041  BKE_fluid_modifier_free(fmd); /* XXX TODO: completely free all 3 pointers */
1042  BKE_fluid_modifier_create_type_data(fmd); /* create regarding of selected type */
1043 # endif
1044 
1045  switch (fmd->type) {
1046  case MOD_FLUID_TYPE_DOMAIN:
1047  ob->dt = OB_WIRE;
1048  break;
1049  case MOD_FLUID_TYPE_FLOW:
1050  case MOD_FLUID_TYPE_EFFEC:
1051  case 0:
1052  default:
1053  break;
1054  }
1055 
1056  /* update dependency since a domain - other type switch could have happened */
1057  rna_Modifier_dependency_update(bmain, scene, ptr);
1058 }
1059 
1060 static void rna_MultiresModifier_level_range(
1061  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
1062 {
1064 
1065  *min = 0;
1066  *max = max_ii(0, mmd->totlvl); /* intentionally _not_ -1 */
1067 }
1068 
1069 static bool rna_MultiresModifier_external_get(PointerRNA *ptr)
1070 {
1071  Object *ob = (Object *)ptr->owner_id;
1072  Mesh *me = ob->data;
1073 
1074  return CustomData_external_test(&me->ldata, CD_MDISPS);
1075 }
1076 
1077 static void rna_MultiresModifier_filepath_get(PointerRNA *ptr, char *value)
1078 {
1079  Object *ob = (Object *)ptr->owner_id;
1080  CustomDataExternal *external = ((Mesh *)ob->data)->ldata.external;
1081 
1082  BLI_strncpy(value, (external) ? external->filepath : "", sizeof(external->filepath));
1083 }
1084 
1085 static void rna_MultiresModifier_filepath_set(PointerRNA *ptr, const char *value)
1086 {
1087  Object *ob = (Object *)ptr->owner_id;
1088  CustomDataExternal *external = ((Mesh *)ob->data)->ldata.external;
1089 
1090  if (external && !STREQ(external->filepath, value)) {
1091  BLI_strncpy(external->filepath, value, sizeof(external->filepath));
1093  }
1094 }
1095 
1096 static int rna_MultiresModifier_filepath_length(PointerRNA *ptr)
1097 {
1098  Object *ob = (Object *)ptr->owner_id;
1099  CustomDataExternal *external = ((Mesh *)ob->data)->ldata.external;
1100 
1101  return strlen((external) ? external->filepath : "");
1102 }
1103 
1104 static int rna_ShrinkwrapModifier_face_cull_get(PointerRNA *ptr)
1105 {
1108 }
1109 
1110 static void rna_ShrinkwrapModifier_face_cull_set(struct PointerRNA *ptr, int value)
1111 {
1113  swm->shrinkOpts = (swm->shrinkOpts & ~MOD_SHRINKWRAP_CULL_TARGET_MASK) | value;
1114 }
1115 
1116 static bool rna_MeshDeformModifier_is_bound_get(PointerRNA *ptr)
1117 {
1118  return (((MeshDeformModifierData *)ptr->data)->bindcagecos != NULL);
1119 }
1120 
1121 static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)
1122 {
1123  Object *ob = (Object *)ptr->owner_id;
1124  return rna_pointer_inherit_refine(ptr, &RNA_SoftBodySettings, ob->soft);
1125 }
1126 
1127 static PointerRNA rna_SoftBodyModifier_point_cache_get(PointerRNA *ptr)
1128 {
1129  Object *ob = (Object *)ptr->owner_id;
1130  return rna_pointer_inherit_refine(ptr, &RNA_PointCache, ob->soft->shared->pointcache);
1131 }
1132 
1133 static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
1134 {
1135  Object *ob = (Object *)ptr->owner_id;
1136  return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
1137 }
1138 
1139 /* Special update function for setting the number of segments of the modifier that also resamples
1140  * the segments in the custom profile. */
1141 static void rna_BevelModifier_update_segments(Main *bmain, Scene *scene, PointerRNA *ptr)
1142 {
1144  if (RNA_enum_get(ptr, "profile_type") == MOD_BEVEL_PROFILE_CUSTOM) {
1145  short segments = (short)RNA_int_get(ptr, "segments");
1146  BKE_curveprofile_init(bmd->custom_profile, segments);
1147  }
1148  rna_Modifier_update(bmain, scene, ptr);
1149 }
1150 
1151 static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value)
1152 {
1154  int a;
1155 
1157  for (a = md->projectors_num; a < MOD_UVPROJECT_MAXPROJECTORS; a++) {
1158  md->projectors[a] = NULL;
1159  }
1160 }
1161 
1162 static void rna_OceanModifier_init_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1163 {
1165 
1167  rna_Modifier_update(bmain, scene, ptr);
1168 }
1169 
1170 static void rna_OceanModifier_ocean_chop_set(PointerRNA *ptr, float value)
1171 {
1173  float old_value = omd->chop_amount;
1174 
1175  omd->chop_amount = value;
1176 
1177  if ((old_value == 0.0f && value > 0.0f) || (old_value > 0.0f && value == 0.0f)) {
1179  }
1180 }
1181 
1182 static bool rna_LaplacianDeformModifier_is_bind_get(PointerRNA *ptr)
1183 {
1185  return ((lmd->flag & MOD_LAPLACIANDEFORM_BIND) && (lmd->vertexco != NULL));
1186 }
1187 
1188 /* NOTE: Curve and array modifiers requires curve path to be evaluated,
1189  * dependency graph will make sure that curve eval would create such a path,
1190  * but if curve was already evaluated we might miss path.
1191  *
1192  * So what we do here is: if path was not calculated for target curve we
1193  * tag it for update.
1194  */
1195 
1196 static void rna_CurveModifier_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1197 {
1199  rna_Modifier_update(bmain, scene, ptr);
1200  DEG_relations_tag_update(bmain);
1201  if (cmd->object != NULL) {
1202  Curve *curve = cmd->object->data;
1203  if ((curve->flag & CU_PATH) == 0) {
1205  }
1206  }
1207 }
1208 
1209 static void rna_ArrayModifier_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1210 {
1212  rna_Modifier_update(bmain, scene, ptr);
1213  DEG_relations_tag_update(bmain);
1214  if (amd->curve_ob != NULL) {
1215  Curve *curve = amd->curve_ob->data;
1216  if ((curve->flag & CU_PATH) == 0) {
1218  }
1219  }
1220 }
1221 
1222 static void rna_DataTransferModifier_use_data_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1223 {
1225 
1226  if (!(dtmd->flags & MOD_DATATRANSFER_USE_VERT)) {
1227  dtmd->data_types &= ~DT_TYPE_VERT_ALL;
1228  }
1229  if (!(dtmd->flags & MOD_DATATRANSFER_USE_EDGE)) {
1230  dtmd->data_types &= ~DT_TYPE_EDGE_ALL;
1231  }
1232  if (!(dtmd->flags & MOD_DATATRANSFER_USE_LOOP)) {
1233  dtmd->data_types &= ~DT_TYPE_LOOP_ALL;
1234  }
1235  if (!(dtmd->flags & MOD_DATATRANSFER_USE_POLY)) {
1236  dtmd->data_types &= ~DT_TYPE_POLY_ALL;
1237  }
1238 
1239  rna_Modifier_dependency_update(bmain, scene, ptr);
1240 }
1241 
1242 static void rna_DataTransferModifier_data_types_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1243 {
1245  const int item_types = BKE_object_data_transfer_get_dttypes_item_types(dtmd->data_types);
1246 
1247  if (item_types & ME_VERT) {
1249  }
1250  if (item_types & ME_EDGE) {
1252  }
1253  if (item_types & ME_LOOP) {
1255  }
1256  if (item_types & ME_POLY) {
1258  }
1259 
1260  rna_Modifier_dependency_update(bmain, scene, ptr);
1261 }
1262 
1263 static void rna_DataTransferModifier_verts_data_types_set(struct PointerRNA *ptr, int value)
1264 {
1266 
1267  dtmd->data_types &= ~DT_TYPE_VERT_ALL;
1268  dtmd->data_types |= value;
1269 }
1270 
1271 static void rna_DataTransferModifier_edges_data_types_set(struct PointerRNA *ptr, int value)
1272 {
1274 
1275  dtmd->data_types &= ~DT_TYPE_EDGE_ALL;
1276  dtmd->data_types |= value;
1277 }
1278 
1279 static void rna_DataTransferModifier_loops_data_types_set(struct PointerRNA *ptr, int value)
1280 {
1282 
1283  dtmd->data_types &= ~DT_TYPE_LOOP_ALL;
1284  dtmd->data_types |= value;
1285 }
1286 
1287 static void rna_DataTransferModifier_polys_data_types_set(struct PointerRNA *ptr, int value)
1288 {
1290 
1291  dtmd->data_types &= ~DT_TYPE_POLY_ALL;
1292  dtmd->data_types |= value;
1293 }
1294 
1295 static const EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bContext *C,
1296  PointerRNA *ptr,
1297  PropertyRNA *prop,
1298  bool *r_free)
1299 {
1301  EnumPropertyItem *item = NULL, tmp_item = {0};
1302  int totitem = 0;
1303 
1304  if (!C) { /* needed for docs and i18n tools */
1306  }
1307 
1308  /* No active here! */
1311 
1312  if (STREQ(RNA_property_identifier(prop), "layers_vgroup_select_src")) {
1313  Object *ob_src = dtmd->ob_source;
1314 
1315 # if 0 /* XXX Don't think we want this in modifier version... */
1316  if (BKE_object_pose_armature_get(ob_src)) {
1321  }
1322 # endif
1323 
1324  if (ob_src) {
1325  const bDeformGroup *dg;
1326  int i;
1327 
1328  RNA_enum_item_add_separator(&item, &totitem);
1329 
1330  const ListBase *defbase = BKE_object_defgroup_list(ob_src);
1331  for (i = 0, dg = defbase->first; dg; i++, dg = dg->next) {
1332  tmp_item.value = i;
1333  tmp_item.identifier = tmp_item.name = dg->name;
1334  RNA_enum_item_add(&item, &totitem, &tmp_item);
1335  }
1336  }
1337  }
1338  else if (STREQ(RNA_property_identifier(prop), "layers_shapekey_select_src")) {
1339  /* TODO */
1340  }
1341  else if (STREQ(RNA_property_identifier(prop), "layers_uv_select_src")) {
1342  Object *ob_src = dtmd->ob_source;
1343 
1344  if (ob_src) {
1345  Mesh *me_eval;
1346  int num_data, i;
1347 
1349  Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
1350  Object *ob_src_eval = DEG_get_evaluated_object(depsgraph, ob_src);
1351 
1352  CustomData_MeshMasks cddata_masks = CD_MASK_BAREMESH;
1353  cddata_masks.lmask |= CD_MASK_MLOOPUV;
1354  me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_src_eval, &cddata_masks);
1355  num_data = CustomData_number_of_layers(&me_eval->ldata, CD_MLOOPUV);
1356 
1357  RNA_enum_item_add_separator(&item, &totitem);
1358 
1359  for (i = 0; i < num_data; i++) {
1360  tmp_item.value = i;
1361  tmp_item.identifier = tmp_item.name = CustomData_get_layer_name(
1362  &me_eval->ldata, CD_MLOOPUV, i);
1363  RNA_enum_item_add(&item, &totitem, &tmp_item);
1364  }
1365  }
1366  }
1367  else if (STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_src") ||
1368  STREQ(RNA_property_identifier(prop), "layers_vcol_loop_select_src")) {
1369  Object *ob_src = dtmd->ob_source;
1370 
1371  if (ob_src) {
1372  eAttrDomain domain = STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_src") ?
1375 
1377  Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
1378  Object *ob_src_eval = DEG_get_evaluated_object(depsgraph, ob_src);
1379 
1380  CustomData_MeshMasks cddata_masks = CD_MASK_BAREMESH;
1381  CustomData *cdata;
1382 
1383  Mesh *me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_src_eval, &cddata_masks);
1384 
1385  if (domain == ATTR_DOMAIN_POINT) {
1386  cddata_masks.vmask |= CD_MASK_COLOR_ALL;
1387  cdata = &me_eval->vdata;
1388  }
1389  else {
1390  cddata_masks.lmask |= CD_MASK_COLOR_ALL;
1391  cdata = &me_eval->ldata;
1392  }
1393 
1395 
1396  int idx = 0;
1397  for (int i = 0; i < 2; i++) {
1398  int num_data = CustomData_number_of_layers(cdata, types[i]);
1399 
1400  RNA_enum_item_add_separator(&item, &totitem);
1401 
1402  for (int j = 0; j < num_data; j++) {
1403  tmp_item.value = idx++;
1404  tmp_item.identifier = tmp_item.name = CustomData_get_layer_name(cdata, types[i], j);
1405  RNA_enum_item_add(&item, &totitem, &tmp_item);
1406  }
1407  }
1408  }
1409  }
1410 
1411  RNA_enum_item_end(&item, &totitem);
1412  *r_free = true;
1413 
1414  return item;
1415 }
1416 
1417 static const EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bContext *C,
1418  PointerRNA *ptr,
1419  PropertyRNA *prop,
1420  bool *r_free)
1421 {
1423  EnumPropertyItem *item = NULL, tmp_item = {0};
1424  int totitem = 0;
1425 
1426  if (!C) { /* needed for docs and i18n tools */
1428  }
1429 
1430  /* No active here! */
1435 
1436  if (STREQ(RNA_property_identifier(prop), "layers_vgroup_select_dst")) {
1437  /* Only list destination layers if we have a single source! */
1439  Object *ob_dst = CTX_data_active_object(C); /* XXX Is this OK? */
1440 
1441  if (ob_dst) {
1442  const bDeformGroup *dg;
1443  int i;
1444 
1445  RNA_enum_item_add_separator(&item, &totitem);
1446 
1447  const ListBase *defbase = BKE_object_defgroup_list(ob_dst);
1448  for (i = 0, dg = defbase->first; dg; i++, dg = dg->next) {
1449  tmp_item.value = i;
1450  tmp_item.identifier = tmp_item.name = dg->name;
1451  RNA_enum_item_add(&item, &totitem, &tmp_item);
1452  }
1453  }
1454  }
1455  }
1456  else if (STREQ(RNA_property_identifier(prop), "layers_shapekey_select_dst")) {
1457  /* TODO */
1458  }
1459  else if (STREQ(RNA_property_identifier(prop), "layers_uv_select_dst")) {
1460  /* Only list destination layers if we have a single source! */
1461  if (dtmd->layers_select_src[DT_MULTILAYER_INDEX_UV] >= 0) {
1462  Object *ob_dst = CTX_data_active_object(C); /* XXX Is this OK? */
1463 
1464  if (ob_dst && ob_dst->data) {
1465  Mesh *me_dst;
1466  CustomData *ldata;
1467  int num_data, i;
1468 
1469  me_dst = ob_dst->data;
1470  ldata = &me_dst->ldata;
1471  num_data = CustomData_number_of_layers(ldata, CD_MLOOPUV);
1472 
1473  RNA_enum_item_add_separator(&item, &totitem);
1474 
1475  for (i = 0; i < num_data; i++) {
1476  tmp_item.value = i;
1477  tmp_item.identifier = tmp_item.name = CustomData_get_layer_name(ldata, CD_MLOOPUV, i);
1478  RNA_enum_item_add(&item, &totitem, &tmp_item);
1479  }
1480  }
1481  }
1482  }
1483  else if (STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_dst") ||
1484  STREQ(RNA_property_identifier(prop), "layers_vcol_loop_select_dst")) {
1485  int multilayer_index = STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_dst") ?
1488 
1489  /* Only list destination layers if we have a single source! */
1490  if (dtmd->layers_select_src[multilayer_index] >= 0) {
1491  Object *ob_dst = CTX_data_active_object(C); /* XXX Is this OK? */
1492 
1493  if (ob_dst && ob_dst->data) {
1495 
1496  Mesh *me_dst = ob_dst->data;
1497  CustomData *cdata = STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_dst") ?
1498  &me_dst->vdata :
1499  &me_dst->ldata;
1500 
1501  int idx = 0;
1502  for (int i = 0; i < 2; i++) {
1503  int num_data = CustomData_number_of_layers(cdata, types[i]);
1504 
1505  RNA_enum_item_add_separator(&item, &totitem);
1506 
1507  for (int j = 0; j < num_data; j++) {
1508  tmp_item.value = idx++;
1509  tmp_item.identifier = tmp_item.name = CustomData_get_layer_name(cdata, types[i], j);
1510  RNA_enum_item_add(&item, &totitem, &tmp_item);
1511  }
1512  }
1513  }
1514  }
1515  }
1516 
1517  RNA_enum_item_end(&item, &totitem);
1518  *r_free = true;
1519 
1520  return item;
1521 }
1522 
1523 static const EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C,
1524  PointerRNA *ptr,
1525  PropertyRNA *UNUSED(prop),
1526  bool *r_free)
1527 {
1529  EnumPropertyItem *item = NULL;
1530  int totitem = 0;
1531 
1532  bool support_advanced_mixing, support_threshold;
1533 
1534  if (!C) { /* needed for docs and i18n tools */
1536  }
1537 
1539 
1541  dtmd->data_types, &support_advanced_mixing, &support_threshold);
1542 
1543  if (support_threshold) {
1548  }
1549 
1550  if (support_advanced_mixing) {
1551  RNA_enum_item_add_separator(&item, &totitem);
1556  }
1557 
1558  RNA_enum_item_end(&item, &totitem);
1559  *r_free = true;
1560 
1561  return item;
1562 }
1563 
1564 static void rna_CorrectiveSmoothModifier_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1565 {
1567 
1569 
1570  rna_Modifier_update(bmain, scene, ptr);
1571 }
1572 
1573 static void rna_CorrectiveSmoothModifier_rest_source_update(Main *bmain,
1574  Scene *scene,
1575  PointerRNA *ptr)
1576 {
1578 
1580  MEM_SAFE_FREE(csmd->bind_coords);
1581  csmd->bind_coords_num = 0;
1582  }
1583 
1584  rna_CorrectiveSmoothModifier_update(bmain, scene, ptr);
1585 }
1586 
1587 static bool rna_CorrectiveSmoothModifier_is_bind_get(PointerRNA *ptr)
1588 {
1590  return (csmd->bind_coords != NULL);
1591 }
1592 
1593 static bool rna_SurfaceDeformModifier_is_bound_get(PointerRNA *ptr)
1594 {
1595  return (((SurfaceDeformModifierData *)ptr->data)->verts != NULL);
1596 }
1597 
1598 static bool rna_ParticleInstanceModifier_particle_system_poll(PointerRNA *ptr,
1599  const PointerRNA value)
1600 {
1602  ParticleSystem *psys = value.data;
1603 
1604  if (!psmd->ob) {
1605  return false;
1606  }
1607 
1608  /* make sure psys is in the object */
1609  return BLI_findindex(&psmd->ob->particlesystem, psys) != -1;
1610 }
1611 
1612 static PointerRNA rna_ParticleInstanceModifier_particle_system_get(PointerRNA *ptr)
1613 {
1615  ParticleSystem *psys;
1616  PointerRNA rptr;
1617 
1618  if (!psmd->ob) {
1619  return PointerRNA_NULL;
1620  }
1621 
1622  psys = BLI_findlink(&psmd->ob->particlesystem, psmd->psys - 1);
1623  RNA_pointer_create((ID *)psmd->ob, &RNA_ParticleSystem, psys, &rptr);
1624  return rptr;
1625 }
1626 
1627 static void rna_ParticleInstanceModifier_particle_system_set(PointerRNA *ptr,
1628  const PointerRNA value,
1629  struct ReportList *UNUSED(reports))
1630 {
1632 
1633  if (!psmd->ob) {
1634  return;
1635  }
1636 
1637  psmd->psys = BLI_findindex(&psmd->ob->particlesystem, value.data) + 1;
1638  CLAMP_MIN(psmd->psys, 1);
1639 }
1640 
1645 static void rna_Modifier_show_expanded_set(PointerRNA *ptr, bool value)
1646 {
1647  ModifierData *md = ptr->data;
1649 }
1650 
1656 static bool rna_Modifier_show_expanded_get(PointerRNA *ptr)
1657 {
1658  ModifierData *md = ptr->data;
1660 }
1661 
1662 static bool rna_NodesModifier_node_group_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
1663 {
1664  bNodeTree *ntree = value.data;
1665  return ntree->type == NTREE_GEOMETRY;
1666 }
1667 
1668 static void rna_NodesModifier_node_group_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1669 {
1670  Object *object = (Object *)ptr->owner_id;
1671  NodesModifierData *nmd = ptr->data;
1672  rna_Modifier_dependency_update(bmain, scene, ptr);
1673  MOD_nodes_update_interface(object, nmd);
1674 }
1675 
1676 static IDProperty **rna_NodesModifier_properties(PointerRNA *ptr)
1677 {
1678  NodesModifierData *nmd = ptr->data;
1679  NodesModifierSettings *settings = &nmd->settings;
1680  return &settings->properties;
1681 }
1682 #else
1683 
1685 {
1686  PropertyRNA *prop;
1688 
1689  prop = RNA_def_property(srna, "uv_smooth", PROP_ENUM, PROP_NONE);
1690  RNA_def_property_enum_sdna(prop, NULL, "uv_smooth");
1692  RNA_def_property_ui_text(prop, "UV Smooth", "Controls how smoothing is applied to UVs");
1693  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1694 
1695  prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
1696  RNA_def_property_int_sdna(prop, NULL, "quality");
1697  RNA_def_property_range(prop, 1, 10);
1698  RNA_def_property_ui_range(prop, 1, 6, 1, -1);
1700  prop, "Quality", "Accuracy of vertex positions, lower value is faster but less precise");
1701  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1702 
1703  prop = RNA_def_property(srna, "boundary_smooth", PROP_ENUM, PROP_NONE);
1704  RNA_def_property_enum_sdna(prop, NULL, "boundary_smooth");
1706  RNA_def_property_ui_text(prop, "Boundary Smooth", "Controls how open boundaries are smoothed");
1707  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1708 
1710 }
1711 
1713 {
1714  static const EnumPropertyItem prop_subdivision_type_items[] = {
1715  {SUBSURF_TYPE_CATMULL_CLARK, "CATMULL_CLARK", 0, "Catmull-Clark", ""},
1716  {SUBSURF_TYPE_SIMPLE, "SIMPLE", 0, "Simple", ""},
1717  {0, NULL, 0, NULL, NULL},
1718  };
1719 
1720  StructRNA *srna;
1721  PropertyRNA *prop;
1722 
1723  srna = RNA_def_struct(brna, "SubsurfModifier", "Modifier");
1724  RNA_def_struct_ui_text(srna, "Subdivision Surface Modifier", "Subdivision surface modifier");
1725  RNA_def_struct_sdna(srna, "SubsurfModifierData");
1726  RNA_def_struct_ui_icon(srna, ICON_MOD_SUBSURF);
1727 
1729 
1731 
1732  prop = RNA_def_property(srna, "subdivision_type", PROP_ENUM, PROP_NONE);
1733  RNA_def_property_enum_sdna(prop, NULL, "subdivType");
1734  RNA_def_property_enum_items(prop, prop_subdivision_type_items);
1735  RNA_def_property_ui_text(prop, "Subdivision Type", "Select type of subdivision algorithm");
1736  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1737 
1738  /* see CCGSUBSURF_LEVEL_MAX for max limit */
1739  prop = RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
1740  RNA_def_property_int_sdna(prop, NULL, "levels");
1741  RNA_def_property_range(prop, 0, 11);
1742  RNA_def_property_ui_range(prop, 0, 6, 1, -1);
1743  RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform");
1744  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1745 
1746  prop = RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
1747  RNA_def_property_int_sdna(prop, NULL, "renderLevels");
1748  RNA_def_property_range(prop, 0, 11);
1749  RNA_def_property_ui_range(prop, 0, 6, 1, -1);
1751  prop, "Render Levels", "Number of subdivisions to perform when rendering");
1752 
1753  prop = RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
1755  RNA_def_property_ui_text(prop, "Optimal Display", "Skip displaying interior subdivided edges");
1756  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1757 
1758  prop = RNA_def_property(srna, "use_creases", PROP_BOOLEAN, PROP_NONE);
1761  prop, "Use Creases", "Use mesh crease information to sharpen edges or corners");
1762  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1763 
1764  prop = RNA_def_property(srna, "use_custom_normals", PROP_BOOLEAN, PROP_NONE);
1767  prop, "Use Custom Normals", "Interpolates existing custom normals to resulting mesh");
1768  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1769 
1770  prop = RNA_def_property(srna, "use_limit_surface", PROP_BOOLEAN, PROP_NONE);
1774  "Use Limit Surface",
1775  "Place vertices at the surface that would be produced with infinite "
1776  "levels of subdivision (smoothest possible shape)");
1777  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1778 
1780 }
1781 
1783 {
1784  static const EnumPropertyItem prop_texture_coordinates_items[] = {
1786  "LOCAL",
1787  0,
1788  "Local",
1789  "Use the local coordinate system for the texture coordinates"},
1791  "GLOBAL",
1792  0,
1793  "Global",
1794  "Use the global coordinate system for the texture coordinates"},
1796  "OBJECT",
1797  0,
1798  "Object",
1799  "Use the linked object's local coordinate system for the texture coordinates"},
1800  {MOD_DISP_MAP_UV, "UV", 0, "UV", "Use UV coordinates for the texture coordinates"},
1801  {0, NULL, 0, NULL, NULL},
1802  };
1803 
1804  PropertyRNA *prop;
1805 
1807 
1808  prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
1809  RNA_def_property_ui_text(prop, "Texture", "");
1811  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1812 
1813  prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
1814  RNA_def_property_enum_sdna(prop, NULL, "texmapping");
1815  RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
1816  RNA_def_property_ui_text(prop, "Texture Coordinates", "");
1817  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1818 
1819  prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
1820  RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
1821  RNA_def_property_ui_text(prop, "UV Map", "UV map name");
1822  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MappingInfoModifier_uvlayer_name_set");
1823  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1824 
1825  prop = RNA_def_property(srna, "texture_coords_object", PROP_POINTER, PROP_NONE);
1826  RNA_def_property_pointer_sdna(prop, NULL, "map_object");
1828  prop, "Texture Coordinate Object", "Object to set the texture coordinates");
1830  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1831 
1832  prop = RNA_def_property(srna, "texture_coords_bone", PROP_STRING, PROP_NONE);
1833  RNA_def_property_string_sdna(prop, NULL, "map_bone");
1834  RNA_def_property_ui_text(prop, "Texture Coordinate Bone", "Bone to set the texture coordinates");
1835  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1836 
1838 }
1839 
1841 {
1842  StructRNA *srna;
1843  PropertyRNA *prop;
1844 
1845  srna = RNA_def_struct(brna, "WarpModifier", "Modifier");
1846  RNA_def_struct_ui_text(srna, "Warp Modifier", "Warp modifier");
1847  RNA_def_struct_sdna(srna, "WarpModifierData");
1848  RNA_def_struct_ui_icon(srna, ICON_MOD_WARP);
1849 
1851 
1852  prop = RNA_def_property(srna, "object_from", PROP_POINTER, PROP_NONE);
1853  RNA_def_property_pointer_sdna(prop, NULL, "object_from");
1854  RNA_def_property_ui_text(prop, "Object From", "Object to transform from");
1856  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1857 
1858  prop = RNA_def_property(srna, "bone_from", PROP_STRING, PROP_NONE);
1859  RNA_def_property_string_sdna(prop, NULL, "bone_from");
1860  RNA_def_property_ui_text(prop, "Bone From", "Bone to transform from");
1861  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1862 
1863  prop = RNA_def_property(srna, "object_to", PROP_POINTER, PROP_NONE);
1864  RNA_def_property_pointer_sdna(prop, NULL, "object_to");
1865  RNA_def_property_ui_text(prop, "Object To", "Object to transform to");
1867  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1868 
1869  prop = RNA_def_property(srna, "bone_to", PROP_STRING, PROP_NONE);
1870  RNA_def_property_string_sdna(prop, NULL, "bone_to");
1871  RNA_def_property_ui_text(prop, "Bone To", "Bone defining offset");
1872  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1873 
1874  prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
1875  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1876  RNA_def_property_ui_range(prop, -100, 100, 10, 2);
1877  RNA_def_property_ui_text(prop, "Strength", "");
1878  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1879 
1880  prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
1882  RNA_def_property_ui_text(prop, "Falloff Type", "");
1884  BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */
1885  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1886 
1887  prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
1888  RNA_def_property_ui_text(prop, "Radius", "Radius to apply");
1889  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1890 
1891  prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
1892  RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
1893  RNA_def_property_ui_text(prop, "Falloff Curve", "Custom falloff curve");
1894  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1895 
1896  prop = RNA_def_property(srna, "use_volume_preserve", PROP_BOOLEAN, PROP_NONE);
1898  RNA_def_property_ui_text(prop, "Preserve Volume", "Preserve volume when rotations are used");
1899  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1900 
1901  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1902  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
1903  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the deform");
1904  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WarpModifier_defgrp_name_set");
1905  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1906 
1907  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
1909  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
1910  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1911 
1913 
1915 }
1916 
1918 {
1919  StructRNA *srna;
1920  PropertyRNA *prop;
1921 
1922  srna = RNA_def_struct(brna, "MultiresModifier", "Modifier");
1923  RNA_def_struct_ui_text(srna, "Multires Modifier", "Multiresolution mesh modifier");
1924  RNA_def_struct_sdna(srna, "MultiresModifierData");
1925  RNA_def_struct_ui_icon(srna, ICON_MOD_MULTIRES);
1926 
1928 
1930 
1931  prop = RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
1932  RNA_def_property_int_sdna(prop, NULL, "lvl");
1933  RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to use in the viewport");
1934  RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
1935  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1936 
1937  prop = RNA_def_property(srna, "sculpt_levels", PROP_INT, PROP_UNSIGNED);
1938  RNA_def_property_int_sdna(prop, NULL, "sculptlvl");
1939  RNA_def_property_ui_text(prop, "Sculpt Levels", "Number of subdivisions to use in sculpt mode");
1940  RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
1941  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1942 
1943  prop = RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
1944  RNA_def_property_int_sdna(prop, NULL, "renderlvl");
1945  RNA_def_property_ui_text(prop, "Render Levels", "The subdivision level visible at render time");
1946  RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
1947 
1948  prop = RNA_def_property(srna, "total_levels", PROP_INT, PROP_UNSIGNED);
1949  RNA_def_property_int_sdna(prop, NULL, "totlvl");
1952  prop, "Total Levels", "Number of subdivisions for which displacements are stored");
1953 
1954  prop = RNA_def_property(srna, "is_external", PROP_BOOLEAN, PROP_NONE);
1956  RNA_def_property_boolean_funcs(prop, "rna_MultiresModifier_external_get", NULL);
1958  prop, "External", "Store multires displacements outside the .blend file, to save memory");
1959 
1960  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
1962  "rna_MultiresModifier_filepath_get",
1963  "rna_MultiresModifier_filepath_length",
1964  "rna_MultiresModifier_filepath_set");
1965  RNA_def_property_ui_text(prop, "File Path", "Path to external displacements file");
1966  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1967 
1968  prop = RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
1971  prop, "Optimal Display", "Skip drawing/rendering of interior subdivided edges");
1972  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1973 
1974  prop = RNA_def_property(srna, "use_creases", PROP_BOOLEAN, PROP_NONE);
1977  prop, "Use Creases", "Use mesh crease information to sharpen edges or corners");
1978  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1979 
1980  prop = RNA_def_property(srna, "use_custom_normals", PROP_BOOLEAN, PROP_NONE);
1983  prop, "Use Custom Normals", "Interpolates existing custom normals to resulting mesh");
1984  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1985 
1986  prop = RNA_def_property(srna, "use_sculpt_base_mesh", PROP_BOOLEAN, PROP_NONE);
1989  "Sculpt Base Mesh",
1990  "Make Sculpt Mode tools deform the base mesh while previewing the "
1991  "displacement of higher subdivision levels");
1992  RNA_def_property_update(prop, 0, "rna_Modifier_update");
1993 
1995 }
1996 
1998 {
1999  StructRNA *srna;
2000  PropertyRNA *prop;
2001 
2002  srna = RNA_def_struct(brna, "LatticeModifier", "Modifier");
2003  RNA_def_struct_ui_text(srna, "Lattice Modifier", "Lattice deformation modifier");
2004  RNA_def_struct_sdna(srna, "LatticeModifierData");
2005  RNA_def_struct_ui_icon(srna, ICON_MOD_LATTICE);
2006 
2008 
2009  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
2010  RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with");
2012  prop, NULL, "rna_LatticeModifier_object_set", NULL, "rna_Lattice_object_poll");
2014  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2015 
2016  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2017  RNA_def_property_string_sdna(prop, NULL, "name");
2019  prop,
2020  "Vertex Group",
2021  "Name of Vertex Group which determines influence of modifier per point");
2022  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_name_set");
2023  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2024 
2025  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2027  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
2028  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2029 
2030  prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
2031  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2032  RNA_def_property_ui_range(prop, 0, 1, 10, 2);
2033  RNA_def_property_ui_text(prop, "Strength", "Strength of modifier effect");
2034  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2035 
2037 }
2038 
2040 {
2041  StructRNA *srna;
2042  PropertyRNA *prop;
2043 
2044  static const EnumPropertyItem prop_deform_axis_items[] = {
2045  {MOD_CURVE_POSX, "POS_X", 0, "X", ""},
2046  {MOD_CURVE_POSY, "POS_Y", 0, "Y", ""},
2047  {MOD_CURVE_POSZ, "POS_Z", 0, "Z", ""},
2048  {MOD_CURVE_NEGX, "NEG_X", 0, "-X", ""},
2049  {MOD_CURVE_NEGY, "NEG_Y", 0, "-Y", ""},
2050  {MOD_CURVE_NEGZ, "NEG_Z", 0, "-Z", ""},
2051  {0, NULL, 0, NULL, NULL},
2052  };
2053 
2054  srna = RNA_def_struct(brna, "CurveModifier", "Modifier");
2055  RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve deformation modifier");
2056  RNA_def_struct_sdna(srna, "CurveModifierData");
2057  RNA_def_struct_ui_icon(srna, ICON_MOD_CURVE);
2058 
2060 
2061  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
2062  RNA_def_property_ui_text(prop, "Object", "Curve object to deform with");
2064  prop, NULL, "rna_CurveModifier_object_set", NULL, "rna_Curve_object_poll");
2066  RNA_def_property_update(prop, 0, "rna_CurveModifier_dependency_update");
2067 
2068  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2069  RNA_def_property_string_sdna(prop, NULL, "name");
2071  prop,
2072  "Vertex Group",
2073  "Name of Vertex Group which determines influence of modifier per point");
2074  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CurveModifier_name_set");
2075  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2076 
2077  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2079  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
2080  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2081 
2082  prop = RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
2083  RNA_def_property_enum_sdna(prop, NULL, "defaxis");
2084  RNA_def_property_enum_items(prop, prop_deform_axis_items);
2085  RNA_def_property_ui_text(prop, "Deform Axis", "The axis that the curve deforms along");
2086  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2087 
2089 }
2090 
2092 {
2093  StructRNA *srna;
2094  PropertyRNA *prop;
2095 
2096  srna = RNA_def_struct(brna, "BuildModifier", "Modifier");
2097  RNA_def_struct_ui_text(srna, "Build Modifier", "Build effect modifier");
2098  RNA_def_struct_sdna(srna, "BuildModifierData");
2099  RNA_def_struct_ui_icon(srna, ICON_MOD_BUILD);
2100 
2102 
2103  prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
2104  RNA_def_property_float_sdna(prop, NULL, "start");
2106  RNA_def_property_ui_text(prop, "Start Frame", "Start frame of the effect");
2107  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2108 
2109  prop = RNA_def_property(srna, "frame_duration", PROP_FLOAT, PROP_TIME);
2110  RNA_def_property_float_sdna(prop, NULL, "length");
2112  RNA_def_property_ui_text(prop, "Length", "Total time the build effect requires");
2113  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2114 
2115  prop = RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE);
2117  RNA_def_property_ui_text(prop, "Reversed", "Deconstruct the mesh instead of building it");
2118  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2119 
2120  prop = RNA_def_property(srna, "use_random_order", PROP_BOOLEAN, PROP_NONE);
2122  RNA_def_property_ui_text(prop, "Randomize", "Randomize the faces or edges during build");
2123  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2124 
2125  prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
2127  RNA_def_property_ui_text(prop, "Seed", "Seed for random if used");
2128  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2129 
2131 }
2132 
2134 {
2135  StructRNA *srna;
2136  PropertyRNA *prop;
2137 
2138  srna = RNA_def_struct(brna, "MirrorModifier", "Modifier");
2139  RNA_def_struct_ui_text(srna, "Mirror Modifier", "Mirroring modifier");
2140  RNA_def_struct_sdna(srna, "MirrorModifierData");
2141  RNA_def_struct_ui_icon(srna, ICON_MOD_MIRROR);
2142 
2144 
2145  prop = RNA_def_property(srna, "use_axis", PROP_BOOLEAN, PROP_NONE);
2147  RNA_def_property_array(prop, 3);
2148  RNA_def_property_ui_text(prop, "Mirror Axis", "Enable axis mirror");
2149  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2150 
2151  prop = RNA_def_property(srna, "use_bisect_axis", PROP_BOOLEAN, PROP_NONE);
2153  RNA_def_property_array(prop, 3);
2154  RNA_def_property_ui_text(prop, "Bisect Axis", "Cuts the mesh across the mirror plane");
2155  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2156 
2157  prop = RNA_def_property(srna, "use_bisect_flip_axis", PROP_BOOLEAN, PROP_NONE);
2159  RNA_def_property_array(prop, 3);
2160  RNA_def_property_ui_text(prop, "Bisect Flip Axis", "Flips the direction of the slice");
2161  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2162 
2163  prop = RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
2166  prop, "Clip", "Prevent vertices from going through the mirror during transform");
2167  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2168 
2169  prop = RNA_def_property(srna, "use_mirror_vertex_groups", PROP_BOOLEAN, PROP_NONE);
2171  RNA_def_property_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L)");
2172  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2173 
2174  prop = RNA_def_property(srna, "use_mirror_merge", PROP_BOOLEAN, PROP_NONE);
2176  RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices within the merge threshold");
2177  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2178 
2179  prop = RNA_def_property(srna, "use_mirror_u", PROP_BOOLEAN, PROP_NONE);
2182  prop, "Mirror U", "Mirror the U texture coordinate around the flip offset point");
2183  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2184 
2185  prop = RNA_def_property(srna, "use_mirror_v", PROP_BOOLEAN, PROP_NONE);
2188  prop, "Mirror V", "Mirror the V texture coordinate around the flip offset point");
2189  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2190 
2191  prop = RNA_def_property(srna, "use_mirror_udim", PROP_BOOLEAN, PROP_NONE);
2194  prop, "Mirror UDIM", "Mirror the texture coordinate around each tile center");
2195  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2196 
2197  prop = RNA_def_property(srna, "mirror_offset_u", PROP_FLOAT, PROP_FACTOR);
2198  RNA_def_property_float_sdna(prop, NULL, "uv_offset[0]");
2199  RNA_def_property_range(prop, -1, 1);
2200  RNA_def_property_ui_range(prop, -1, 1, 2, 4);
2202  prop,
2203  "Flip U Offset",
2204  "Amount to offset mirrored UVs flipping point from the 0.5 on the U axis");
2205  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2206 
2207  prop = RNA_def_property(srna, "mirror_offset_v", PROP_FLOAT, PROP_FACTOR);
2208  RNA_def_property_float_sdna(prop, NULL, "uv_offset[1]");
2209  RNA_def_property_range(prop, -1, 1);
2210  RNA_def_property_ui_range(prop, -1, 1, 2, 4);
2212  prop,
2213  "Flip V Offset",
2214  "Amount to offset mirrored UVs flipping point from the 0.5 point on the V axis");
2215  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2216 
2217  prop = RNA_def_property(srna, "offset_u", PROP_FLOAT, PROP_FACTOR);
2218  RNA_def_property_float_sdna(prop, NULL, "uv_offset_copy[0]");
2219  RNA_def_property_range(prop, -10000.0f, 10000.0f);
2220  RNA_def_property_ui_range(prop, -1, 1, 2, 4);
2221  RNA_def_property_ui_text(prop, "U Offset", "Mirrored UV offset on the U axis");
2222  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2223 
2224  prop = RNA_def_property(srna, "offset_v", PROP_FLOAT, PROP_FACTOR);
2225  RNA_def_property_float_sdna(prop, NULL, "uv_offset_copy[1]");
2226  RNA_def_property_range(prop, -10000.0f, 10000.0f);
2227  RNA_def_property_ui_range(prop, -1, 1, 2, 4);
2228  RNA_def_property_ui_text(prop, "V Offset", "Mirrored UV offset on the V axis");
2229  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2230 
2231  prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
2232  RNA_def_property_float_sdna(prop, NULL, "tolerance");
2233  RNA_def_property_range(prop, 0, FLT_MAX);
2234  RNA_def_property_ui_range(prop, 0, 1, 0.01, 6);
2236  prop, "Merge Distance", "Distance within which mirrored vertices are merged");
2237  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2238 
2239  prop = RNA_def_property(srna, "bisect_threshold", PROP_FLOAT, PROP_DISTANCE);
2240  RNA_def_property_float_sdna(prop, NULL, "bisect_threshold");
2241  RNA_def_property_range(prop, 0, FLT_MAX);
2242  RNA_def_property_ui_range(prop, 0, 1, 0.01, 6);
2244  prop, "Bisect Distance", "Distance from the bisect plane within which vertices are removed");
2245  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2246 
2247  prop = RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE);
2248  RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob");
2249  RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror");
2251  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2252 
2254 }
2255 
2257 {
2258  static const EnumPropertyItem modifier_decim_mode_items[] = {
2259  {MOD_DECIM_MODE_COLLAPSE, "COLLAPSE", 0, "Collapse", "Use edge collapsing"},
2260  {MOD_DECIM_MODE_UNSUBDIV, "UNSUBDIV", 0, "Un-Subdivide", "Use un-subdivide face reduction"},
2262  "DISSOLVE",
2263  0,
2264  "Planar",
2265  "Dissolve geometry to form planar polygons"},
2266  {0, NULL, 0, NULL, NULL},
2267  };
2268 
2269  /* NOTE: keep in sync with operator 'MESH_OT_decimate'. */
2270 
2271  StructRNA *srna;
2272  PropertyRNA *prop;
2273 
2274  srna = RNA_def_struct(brna, "DecimateModifier", "Modifier");
2275  RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimation modifier");
2276  RNA_def_struct_sdna(srna, "DecimateModifierData");
2277  RNA_def_struct_ui_icon(srna, ICON_MOD_DECIM);
2278 
2280 
2281  prop = RNA_def_property(srna, "decimate_type", PROP_ENUM, PROP_NONE);
2282  RNA_def_property_enum_sdna(prop, NULL, "mode");
2283  RNA_def_property_enum_items(prop, modifier_decim_mode_items);
2284  RNA_def_property_ui_text(prop, "Mode", "");
2285  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2286 
2287  /* (mode == MOD_DECIM_MODE_COLLAPSE) */
2288  prop = RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_FACTOR);
2289  RNA_def_property_float_sdna(prop, NULL, "percent");
2290  RNA_def_property_range(prop, 0, 1);
2291  RNA_def_property_ui_range(prop, 0, 1, 1, 4);
2292  RNA_def_property_ui_text(prop, "Ratio", "Ratio of triangles to reduce to (collapse only)");
2293  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2294 
2295  /* (mode == MOD_DECIM_MODE_UNSUBDIV) */
2296  prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_UNSIGNED);
2297  RNA_def_property_int_sdna(prop, NULL, "iter");
2298  RNA_def_property_range(prop, 0, SHRT_MAX);
2299  RNA_def_property_ui_range(prop, 0, 100, 1, -1);
2301  prop, "Iterations", "Number of times reduce the geometry (unsubdivide only)");
2302  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2303 
2304  /* (mode == MOD_DECIM_MODE_DISSOLVE) */
2305  prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
2306  RNA_def_property_float_sdna(prop, NULL, "angle");
2307  RNA_def_property_range(prop, 0, DEG2RAD(180));
2308  RNA_def_property_ui_range(prop, 0, DEG2RAD(180), 10, 2);
2309  RNA_def_property_ui_text(prop, "Angle Limit", "Only dissolve angles below this (planar only)");
2310  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2311 
2312  /* (mode == MOD_DECIM_MODE_COLLAPSE) */
2313  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2314  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
2315  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name (collapse only)");
2316  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DecimateModifier_defgrp_name_set");
2317  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2318 
2319  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2321  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence (collapse only)");
2322  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2323 
2324  prop = RNA_def_property(srna, "use_collapse_triangulate", PROP_BOOLEAN, PROP_NONE);
2327  prop, "Triangulate", "Keep triangulated faces resulting from decimation (collapse only)");
2328  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2329 
2330  prop = RNA_def_property(srna, "use_symmetry", PROP_BOOLEAN, PROP_NONE);
2332  RNA_def_property_ui_text(prop, "Symmetry", "Maintain symmetry on an axis");
2333  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2334 
2335  prop = RNA_def_property(srna, "symmetry_axis", PROP_ENUM, PROP_NONE);
2336  RNA_def_property_enum_sdna(prop, NULL, "symmetry_axis");
2338  RNA_def_property_ui_text(prop, "Axis", "Axis of symmetry");
2339  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2340 
2341  prop = RNA_def_property(srna, "vertex_group_factor", PROP_FLOAT, PROP_FACTOR);
2342  RNA_def_property_float_sdna(prop, NULL, "defgrp_factor");
2343  RNA_def_property_range(prop, 0, 1000);
2344  RNA_def_property_ui_range(prop, 0, 10, 1, 4);
2345  RNA_def_property_ui_text(prop, "Factor", "Vertex group strength");
2346  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2347  /* end collapse-only option */
2348 
2349  /* (mode == MOD_DECIM_MODE_DISSOLVE) */
2350  prop = RNA_def_property(srna, "use_dissolve_boundaries", PROP_BOOLEAN, PROP_NONE);
2353  prop, "All Boundaries", "Dissolve all vertices in between face boundaries (planar only)");
2354  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2355 
2356  prop = RNA_def_property(srna, "delimit", PROP_ENUM, PROP_NONE);
2357  RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */
2359  RNA_def_property_ui_text(prop, "Delimit", "Limit merging geometry");
2360  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2361 
2362  /* end dissolve-only option */
2363 
2364  /* all modes use this */
2365  prop = RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
2368  prop, "Face Count", "The current number of faces in the decimated mesh");
2369 
2371 }
2372 
2374 {
2375  StructRNA *srna;
2376  PropertyRNA *prop;
2377 
2378  srna = RNA_def_struct(brna, "WaveModifier", "Modifier");
2379  RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave effect modifier");
2380  RNA_def_struct_sdna(srna, "WaveModifierData");
2381  RNA_def_struct_ui_icon(srna, ICON_MOD_WAVE);
2382 
2384 
2385  prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
2387  RNA_def_property_ui_text(prop, "X", "X axis motion");
2388  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2389 
2390  prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
2392  RNA_def_property_ui_text(prop, "Y", "Y axis motion");
2393  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2394 
2395  prop = RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
2397  RNA_def_property_ui_text(prop, "Cyclic", "Cyclic wave effect");
2398  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2399 
2400  prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
2402  RNA_def_property_ui_text(prop, "Normals", "Displace along normals");
2403  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2404 
2405  prop = RNA_def_property(srna, "use_normal_x", PROP_BOOLEAN, PROP_NONE);
2407  RNA_def_property_ui_text(prop, "X Normal", "Enable displacement along the X normal");
2408  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2409 
2410  prop = RNA_def_property(srna, "use_normal_y", PROP_BOOLEAN, PROP_NONE);
2412  RNA_def_property_ui_text(prop, "Y Normal", "Enable displacement along the Y normal");
2413  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2414 
2415  prop = RNA_def_property(srna, "use_normal_z", PROP_BOOLEAN, PROP_NONE);
2417  RNA_def_property_ui_text(prop, "Z Normal", "Enable displacement along the Z normal");
2418  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2419 
2420  prop = RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_TIME);
2421  RNA_def_property_float_sdna(prop, NULL, "timeoffs");
2424  prop,
2425  "Time Offset",
2426  "Either the starting frame (for positive speed) or ending frame (for negative speed.)");
2427  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2428 
2429  prop = RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
2430  RNA_def_property_float_sdna(prop, NULL, "lifetime");
2433  prop, "Lifetime", "Lifetime of the wave in frames, zero means infinite");
2434  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2435 
2436  prop = RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
2437  RNA_def_property_float_sdna(prop, NULL, "damp");
2440  prop, "Damping Time", "Number of frames in which the wave damps out after it dies");
2441  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2442 
2443  prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
2444  RNA_def_property_float_sdna(prop, NULL, "falloff");
2445  RNA_def_property_range(prop, 0, FLT_MAX);
2446  RNA_def_property_ui_range(prop, 0, 100, 100, 2);
2447  RNA_def_property_ui_text(prop, "Falloff Radius", "Distance after which it fades out");
2448  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2449 
2450  prop = RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
2451  RNA_def_property_float_sdna(prop, NULL, "startx");
2452  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2453  RNA_def_property_ui_range(prop, -100, 100, 100, 2);
2454  RNA_def_property_ui_text(prop, "Start Position X", "X coordinate of the start position");
2455  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2456 
2457  prop = RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
2458  RNA_def_property_float_sdna(prop, NULL, "starty");
2459  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2460  RNA_def_property_ui_range(prop, -100, 100, 100, 2);
2461  RNA_def_property_ui_text(prop, "Start Position Y", "Y coordinate of the start position");
2462  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2463 
2464  prop = RNA_def_property(srna, "start_position_object", PROP_POINTER, PROP_NONE);
2465  RNA_def_property_pointer_sdna(prop, NULL, "objectcenter");
2466  RNA_def_property_ui_text(prop, "Start Position Object", "Object which defines the wave center");
2468  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2469 
2470  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2471  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
2472  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the wave");
2473  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_defgrp_name_set");
2474  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2475 
2476  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2478  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
2479  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2480 
2481  prop = RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
2482  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2483  RNA_def_property_ui_range(prop, -1, 1, 10, 2);
2485  prop, "Speed", "Speed of the wave, towards the starting point when negative");
2486  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2487 
2488  prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
2489  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2490  RNA_def_property_ui_range(prop, -2, 2, 10, 2);
2491  RNA_def_property_ui_text(prop, "Height", "Height of the wave");
2492  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2493 
2494  prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
2495  RNA_def_property_range(prop, 0, FLT_MAX);
2496  RNA_def_property_ui_range(prop, 0, 5, 10, 2);
2497  RNA_def_property_ui_text(prop, "Width", "Distance between the waves");
2498  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2499 
2500  prop = RNA_def_property(srna, "narrowness", PROP_FLOAT, PROP_DISTANCE);
2501  RNA_def_property_float_sdna(prop, NULL, "narrow");
2502  RNA_def_property_range(prop, 0, FLT_MAX);
2503  RNA_def_property_ui_range(prop, 0, 10, 10, 2);
2505  prop,
2506  "Narrowness",
2507  "Distance between the top and the base of a wave, the higher the value, "
2508  "the more narrow the wave");
2509  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2510 
2512 
2514 }
2515 
2517 {
2518  StructRNA *srna;
2519  PropertyRNA *prop;
2520 
2521  srna = RNA_def_struct(brna, "ArmatureModifier", "Modifier");
2522  RNA_def_struct_ui_text(srna, "Armature Modifier", "Armature deformation modifier");
2523  RNA_def_struct_sdna(srna, "ArmatureModifierData");
2524  RNA_def_struct_ui_icon(srna, ICON_MOD_ARMATURE);
2525 
2527 
2528  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
2529  RNA_def_property_ui_text(prop, "Object", "Armature object to deform with");
2531  prop, NULL, "rna_ArmatureModifier_object_set", NULL, "rna_Armature_object_poll");
2533  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2534 
2535  prop = RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
2536  RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
2538  RNA_def_property_ui_text(prop, "Use Bone Envelopes", "Bind Bone envelopes to armature modifier");
2539  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2540 
2541  prop = RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
2542  RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
2544  RNA_def_property_ui_text(prop, "Use Vertex Groups", "Bind vertex groups to armature modifier");
2545  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2546 
2547  prop = RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
2550  prop, "Preserve Volume", "Deform rotation interpolation with quaternions");
2551  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2552 
2553  prop = RNA_def_property(srna, "use_multi_modifier", PROP_BOOLEAN, PROP_NONE);
2554  RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
2556  prop,
2557  "Multi Modifier",
2558  "Use same input as previous modifier, and mix results using overall vgroup");
2559  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2560 
2561  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2562  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
2564  prop,
2565  "Vertex Group",
2566  "Name of Vertex Group which determines influence of modifier per point");
2567  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ArmatureModifier_defgrp_name_set");
2568  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2569 
2570  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2572  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
2573  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2574 
2576 }
2577 
2579 {
2580  StructRNA *srna;
2581  PropertyRNA *prop;
2582  FunctionRNA *func;
2583  PropertyRNA *parm;
2584 
2585  srna = RNA_def_struct(brna, "HookModifier", "Modifier");
2587  srna, "Hook Modifier", "Hook modifier to modify the location of vertices");
2588  RNA_def_struct_sdna(srna, "HookModifierData");
2589  RNA_def_struct_ui_icon(srna, ICON_HOOK);
2590 
2592 
2593  prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
2594  RNA_def_property_float_sdna(prop, NULL, "force");
2595  RNA_def_property_range(prop, 0, 1);
2596  RNA_def_property_ui_text(prop, "Strength", "Relative force of the hook");
2597  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2598 
2599  prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
2600  RNA_def_property_enum_items(prop, modifier_warp_falloff_items); /* share the enum */
2601  RNA_def_property_ui_text(prop, "Falloff Type", "");
2603  BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */
2604  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2605 
2606  prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
2607  RNA_def_property_float_sdna(prop, NULL, "falloff");
2608  RNA_def_property_range(prop, 0, FLT_MAX);
2609  RNA_def_property_ui_range(prop, 0, 100, 100, 2);
2611  prop, "Radius", "If not zero, the distance from the hook where influence ends");
2612  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2613 
2614  prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
2615  RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
2616  RNA_def_property_ui_text(prop, "Falloff Curve", "Custom falloff curve");
2617  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2618 
2619  prop = RNA_def_property(srna, "center", PROP_FLOAT, PROP_TRANSLATION);
2620  RNA_def_property_float_sdna(prop, NULL, "cent");
2622  prop, "Hook Center", "Center of the hook, used for falloff and display");
2623  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2624 
2625  prop = RNA_def_property(srna, "matrix_inverse", PROP_FLOAT, PROP_MATRIX);
2626  RNA_def_property_float_sdna(prop, NULL, "parentinv");
2629  prop, "Matrix", "Reverse the transformation between this object and its target");
2630  RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Modifier_update");
2631 
2632  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
2634  prop, "Object", "Parent Object for hook, also recalculates and clears offset");
2636  RNA_def_property_override_funcs(prop, NULL, NULL, "rna_HookModifier_object_override_apply");
2637  RNA_def_property_pointer_funcs(prop, NULL, "rna_HookModifier_object_set", NULL, NULL);
2638  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2639 
2640  prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
2641  RNA_def_property_string_sdna(prop, NULL, "subtarget");
2643  prop,
2644  "Sub-Target",
2645  "Name of Parent Bone for hook (if applicable), also recalculates and clears offset");
2646  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_HookModifier_subtarget_set");
2647  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2648 
2649  prop = RNA_def_property(srna, "use_falloff_uniform", PROP_BOOLEAN, PROP_NONE);
2651  RNA_def_property_ui_text(prop, "Uniform Falloff", "Compensate for non-uniform object scale");
2652  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2653 
2654  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2655  RNA_def_property_string_sdna(prop, NULL, "name");
2657  prop,
2658  "Vertex Group",
2659  "Name of Vertex Group which determines influence of modifier per point");
2660  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_HookModifier_name_set");
2661  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2662 
2663  prop = RNA_def_property(srna, "vertex_indices", PROP_INT, PROP_UNSIGNED);
2667  RNA_def_property_dynamic_array_funcs(prop, "rna_HookModifier_vertex_indices_get_length");
2668  RNA_def_property_int_funcs(prop, "rna_HookModifier_vertex_indices_get", NULL, NULL);
2670  "Vertex Indices",
2671  "Indices of vertices bound to the modifier. For bezier curves, "
2672  "handles count as additional vertices");
2673 
2674  func = RNA_def_function(srna, "vertex_indices_set", "rna_HookModifier_vertex_indices_set");
2676  func, "Validates and assigns the array of vertex indices bound to the modifier");
2678  parm = RNA_def_int_array(
2679  func, "indices", 1, NULL, INT_MIN, INT_MAX, "", "Vertex Indices", 0, INT_MAX);
2682 
2683  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2685  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
2686  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2687 
2689 }
2690 
2692 {
2693  StructRNA *srna;
2694  PropertyRNA *prop;
2695 
2696  srna = RNA_def_struct(brna, "SoftBodyModifier", "Modifier");
2697  RNA_def_struct_ui_text(srna, "Soft Body Modifier", "Soft body simulation modifier");
2698  RNA_def_struct_sdna(srna, "SoftbodyModifierData");
2699  RNA_def_struct_ui_icon(srna, ICON_MOD_SOFT);
2700 
2701  prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
2703  RNA_def_property_struct_type(prop, "SoftBodySettings");
2704  RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_settings_get", NULL, NULL, NULL);
2705  RNA_def_property_ui_text(prop, "Soft Body Settings", "");
2706 
2707  prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
2709  RNA_def_property_struct_type(prop, "PointCache");
2710  RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_point_cache_get", NULL, NULL, NULL);
2711  RNA_def_property_ui_text(prop, "Soft Body Point Cache", "");
2712 }
2713 
2715 {
2716  StructRNA *srna;
2717  PropertyRNA *prop;
2718 
2719  static const EnumPropertyItem prop_operand_items[] = {
2721  "OBJECT",
2722  0,
2723  "Object",
2724  "Use a mesh object as the operand for the Boolean operation"},
2726  "COLLECTION",
2727  0,
2728  "Collection",
2729  "Use a collection of mesh objects as the operand for the Boolean operation"},
2730  {0, NULL, 0, NULL, NULL},
2731  };
2732 
2733  static const EnumPropertyItem prop_operation_items[] = {
2735  "INTERSECT",
2736  0,
2737  "Intersect",
2738  "Keep the part of the mesh that is common between all operands"},
2739  {eBooleanModifierOp_Union, "UNION", 0, "Union", "Combine meshes in an additive way"},
2741  "DIFFERENCE",
2742  0,
2743  "Difference",
2744  "Combine meshes in a subtractive way"},
2745  {0, NULL, 0, NULL, NULL},
2746  };
2747 
2748  static const EnumPropertyItem prop_solver_items[] = {
2750  "FAST",
2751  0,
2752  "Fast",
2753  "Simple solver for the best performance, without support for overlapping geometry"},
2754  {eBooleanModifierSolver_Exact, "EXACT", 0, "Exact", "Advanced solver for the best result"},
2755  {0, NULL, 0, NULL, NULL},
2756  };
2757 
2758  srna = RNA_def_struct(brna, "BooleanModifier", "Modifier");
2759  RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier");
2760  RNA_def_struct_sdna(srna, "BooleanModifierData");
2761  RNA_def_struct_ui_icon(srna, ICON_MOD_BOOLEAN);
2762 
2764 
2765  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
2766  RNA_def_property_ui_text(prop, "Object", "Mesh object to use for Boolean operation");
2768  prop, NULL, "rna_BooleanModifier_object_set", NULL, "rna_Mesh_object_poll");
2770  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2771 
2772  prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE);
2773  RNA_def_property_pointer_sdna(prop, NULL, "collection");
2774  RNA_def_property_struct_type(prop, "Collection");
2777  prop, "Collection", "Use mesh objects in this collection for Boolean operation");
2778  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2779 
2780  prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
2781  RNA_def_property_enum_items(prop, prop_operation_items);
2783  RNA_def_property_ui_text(prop, "Operation", "");
2784  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2785 
2786  prop = RNA_def_property(srna, "operand_type", PROP_ENUM, PROP_NONE);
2788  RNA_def_property_enum_items(prop, prop_operand_items);
2789  RNA_def_property_ui_text(prop, "Operand Type", "");
2790  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2791 
2792  prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE);
2793  RNA_def_property_float_sdna(prop, NULL, "double_threshold");
2794  RNA_def_property_range(prop, 0, 1.0f);
2795  RNA_def_property_ui_range(prop, 0, 1, 1.0, 6);
2798  prop, "Overlap Threshold", "Threshold for checking overlapping geometry");
2799  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2800 
2801  prop = RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
2804  RNA_def_property_ui_text(prop, "Solver", "Method for calculating booleans");
2805  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2806 
2807  prop = RNA_def_property(srna, "use_self", PROP_BOOLEAN, PROP_NONE);
2809  RNA_def_property_ui_text(prop, "Self Intersection", "Allow self-intersection in operands");
2810  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2811 
2812  prop = RNA_def_property(srna, "use_hole_tolerant", PROP_BOOLEAN, PROP_NONE);
2814  RNA_def_property_ui_text(prop, "Hole Tolerant", "Better results when there are holes (slower)");
2815  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2816 
2817  /* BMesh debugging options, only used when G_DEBUG is set */
2818 
2819  /* BMesh intersection options */
2820  static const EnumPropertyItem debug_items[] = {
2821  {eBooleanModifierBMeshFlag_BMesh_Separate, "SEPARATE", 0, "Separate", ""},
2822  {eBooleanModifierBMeshFlag_BMesh_NoDissolve, "NO_DISSOLVE", 0, "No Dissolve", ""},
2824  "NO_CONNECT_REGIONS",
2825  0,
2826  "No Connect Regions",
2827  ""},
2828  {0, NULL, 0, NULL, NULL},
2829  };
2830 
2831  prop = RNA_def_property(srna, "debug_options", PROP_ENUM, PROP_NONE);
2832  RNA_def_property_enum_items(prop, debug_items);
2833  RNA_def_property_enum_sdna(prop, NULL, "bm_flag");
2835  RNA_def_property_ui_text(prop, "Debug", "Debugging options, only when started with '-d'");
2836  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2837 
2839 }
2840 
2842 {
2843  StructRNA *srna;
2844  PropertyRNA *prop;
2845 
2846  static const EnumPropertyItem prop_fit_type_items[] = {
2848  "FIXED_COUNT",
2849  0,
2850  "Fixed Count",
2851  "Duplicate the object a certain number of times"},
2853  "FIT_LENGTH",
2854  0,
2855  "Fit Length",
2856  "Duplicate the object as many times as fits in a certain length"},
2857  {MOD_ARR_FITCURVE, "FIT_CURVE", 0, "Fit Curve", "Fit the duplicated objects to a curve"},
2858  {0, NULL, 0, NULL, NULL},
2859  };
2860 
2861  srna = RNA_def_struct(brna, "ArrayModifier", "Modifier");
2862  RNA_def_struct_ui_text(srna, "Array Modifier", "Array duplication modifier");
2863  RNA_def_struct_sdna(srna, "ArrayModifierData");
2864  RNA_def_struct_ui_icon(srna, ICON_MOD_ARRAY);
2865 
2867 
2868  /* Length parameters */
2869  prop = RNA_def_property(srna, "fit_type", PROP_ENUM, PROP_NONE);
2870  RNA_def_property_enum_items(prop, prop_fit_type_items);
2871  RNA_def_property_ui_text(prop, "Fit Type", "Array length calculation method");
2872  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2873 
2874  prop = RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
2875  RNA_def_property_range(prop, 1, INT_MAX);
2876  RNA_def_property_ui_range(prop, 1, 1000, 1, -1);
2877  RNA_def_property_ui_text(prop, "Count", "Number of duplicates to make");
2878  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2879 
2880  prop = RNA_def_property(srna, "fit_length", PROP_FLOAT, PROP_DISTANCE);
2881  RNA_def_property_float_sdna(prop, NULL, "length");
2882  RNA_def_property_range(prop, 0, INT_MAX);
2883  RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
2884  RNA_def_property_ui_text(prop, "Length", "Length to fit array within");
2885  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2886 
2887  prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
2888  RNA_def_property_pointer_sdna(prop, NULL, "curve_ob");
2889  RNA_def_property_ui_text(prop, "Curve", "Curve object to fit array length to");
2891  prop, NULL, "rna_ArrayModifier_curve_ob_set", NULL, "rna_Curve_object_poll");
2893  RNA_def_property_update(prop, 0, "rna_ArrayModifier_dependency_update");
2894 
2895  /* Offset parameters */
2896  prop = RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_NONE);
2897  RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
2898  RNA_def_property_ui_text(prop, "Constant Offset", "Add a constant offset");
2899  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2900 
2901  prop = RNA_def_property(srna, "constant_offset_displace", PROP_FLOAT, PROP_TRANSLATION);
2902  RNA_def_property_float_sdna(prop, NULL, "offset");
2904  prop, "Constant Offset Displacement", "Value for the distance between arrayed items");
2905  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
2906  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2907 
2908  prop = RNA_def_property(srna, "use_relative_offset", PROP_BOOLEAN, PROP_NONE);
2911  prop, "Relative Offset", "Add an offset relative to the object's bounding box");
2912  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2913 
2914  /* PROP_TRANSLATION causes units to be used which we don't want */
2915  prop = RNA_def_property(srna, "relative_offset_displace", PROP_FLOAT, PROP_XYZ);
2916  RNA_def_property_float_sdna(prop, NULL, "scale");
2918  prop,
2919  "Relative Offset Displacement",
2920  "The size of the geometry will determine the distance between arrayed items");
2921  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2922 
2923  /* Vertex merging parameters */
2924  prop = RNA_def_property(srna, "use_merge_vertices", PROP_BOOLEAN, PROP_NONE);
2926  RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in adjacent duplicates");
2927  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2928 
2929  prop = RNA_def_property(srna, "use_merge_vertices_cap", PROP_BOOLEAN, PROP_NONE);
2932  prop, "Merge End Vertices", "Merge vertices in first and last duplicates");
2933  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2934 
2935  prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
2936  RNA_def_property_float_sdna(prop, NULL, "merge_dist");
2937  RNA_def_property_range(prop, 0, FLT_MAX);
2938  RNA_def_property_ui_range(prop, 0, 1, 1, 4);
2939  RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices");
2940  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2941 
2942  /* Offset object */
2943  prop = RNA_def_property(srna, "use_object_offset", PROP_BOOLEAN, PROP_NONE);
2944  RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_OBJ);
2946  prop, "Object Offset", "Add another object's transformation to the total offset");
2947  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2948 
2949  prop = RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
2950  RNA_def_property_pointer_sdna(prop, NULL, "offset_ob");
2952  prop,
2953  "Object Offset",
2954  "Use the location and rotation of another object to determine the distance and "
2955  "rotational change between arrayed items");
2957  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2958 
2959  /* Caps */
2960  prop = RNA_def_property(srna, "start_cap", PROP_POINTER, PROP_NONE);
2961  RNA_def_property_ui_text(prop, "Start Cap", "Mesh object to use as a start cap");
2963  prop, NULL, "rna_ArrayModifier_start_cap_set", NULL, "rna_Mesh_object_poll");
2965  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2966 
2967  prop = RNA_def_property(srna, "end_cap", PROP_POINTER, PROP_NONE);
2968  RNA_def_property_ui_text(prop, "End Cap", "Mesh object to use as an end cap");
2970  prop, NULL, "rna_ArrayModifier_end_cap_set", NULL, "rna_Mesh_object_poll");
2972  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2973 
2974  prop = RNA_def_property(srna, "offset_u", PROP_FLOAT, PROP_FACTOR);
2975  RNA_def_property_float_sdna(prop, NULL, "uv_offset[0]");
2976  RNA_def_property_range(prop, -1, 1);
2977  RNA_def_property_ui_range(prop, -1, 1, 2, 4);
2978  RNA_def_property_ui_text(prop, "U Offset", "Amount to offset array UVs on the U axis");
2979  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2980 
2981  prop = RNA_def_property(srna, "offset_v", PROP_FLOAT, PROP_FACTOR);
2982  RNA_def_property_float_sdna(prop, NULL, "uv_offset[1]");
2983  RNA_def_property_range(prop, -1, 1);
2984  RNA_def_property_ui_range(prop, -1, 1, 2, 4);
2985  RNA_def_property_ui_text(prop, "V Offset", "Amount to offset array UVs on the V axis");
2986  RNA_def_property_update(prop, 0, "rna_Modifier_update");
2987 
2989 }
2990 
2992 {
2993  StructRNA *srna;
2994  PropertyRNA *prop;
2995 
2996  srna = RNA_def_struct(brna, "EdgeSplitModifier", "Modifier");
2998  srna, "EdgeSplit Modifier", "Edge splitting modifier to create sharp edges");
2999  RNA_def_struct_sdna(srna, "EdgeSplitModifierData");
3000  RNA_def_struct_ui_icon(srna, ICON_MOD_EDGESPLIT);
3001 
3003 
3004  prop = RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_ANGLE);
3005  RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
3006  RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 2);
3007  RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges");
3008  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3009 
3010  prop = RNA_def_property(srna, "use_edge_angle", PROP_BOOLEAN, PROP_NONE);
3012  RNA_def_property_ui_text(prop, "Use Edge Angle", "Split edges with high angle between faces");
3013  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3014 
3015  prop = RNA_def_property(srna, "use_edge_sharp", PROP_BOOLEAN, PROP_NONE);
3017  RNA_def_property_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp");
3018  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3019 
3021 }
3022 
3024 {
3025  StructRNA *srna;
3026  PropertyRNA *prop;
3027 
3028  static const EnumPropertyItem prop_direction_items[] = {
3029  {MOD_DISP_DIR_X,
3030  "X",
3031  0,
3032  "X",
3033  "Use the texture's intensity value to displace in the X direction"},
3034  {MOD_DISP_DIR_Y,
3035  "Y",
3036  0,
3037  "Y",
3038  "Use the texture's intensity value to displace in the Y direction"},
3039  {MOD_DISP_DIR_Z,
3040  "Z",
3041  0,
3042  "Z",
3043  "Use the texture's intensity value to displace in the Z direction"},
3045  "NORMAL",
3046  0,
3047  "Normal",
3048  "Use the texture's intensity value to displace along the vertex normal"},
3050  "CUSTOM_NORMAL",
3051  0,
3052  "Custom Normal",
3053  "Use the texture's intensity value to displace along the (averaged) custom normal (falls "
3054  "back to vertex)"},
3056  "RGB_TO_XYZ",
3057  0,
3058  "RGB to XYZ",
3059  "Use the texture's RGB values to displace the mesh in the XYZ direction"},
3060  {0, NULL, 0, NULL, NULL},
3061  };
3062 
3063  static const EnumPropertyItem prop_space_items[] = {
3064  {MOD_DISP_SPACE_LOCAL, "LOCAL", 0, "Local", "Direction is defined in local coordinates"},
3065  {MOD_DISP_SPACE_GLOBAL, "GLOBAL", 0, "Global", "Direction is defined in global coordinates"},
3066  {0, NULL, 0, NULL, NULL},
3067  };
3068 
3069  srna = RNA_def_struct(brna, "DisplaceModifier", "Modifier");
3070  RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier");
3071  RNA_def_struct_sdna(srna, "DisplaceModifierData");
3072  RNA_def_struct_ui_icon(srna, ICON_MOD_DISPLACE);
3073 
3075 
3076  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
3077  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
3079  prop,
3080  "Vertex Group",
3081  "Name of Vertex Group which determines influence of modifier per point");
3082  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_defgrp_name_set");
3083  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3084 
3085  prop = RNA_def_property(srna, "mid_level", PROP_FLOAT, PROP_FACTOR);
3086  RNA_def_property_float_sdna(prop, NULL, "midlevel");
3087  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3088  RNA_def_property_ui_range(prop, 0, 1, 10, 3);
3089  RNA_def_property_ui_text(prop, "Midlevel", "Material value that gives no displacement");
3090  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3091 
3092  prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
3093  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3094  RNA_def_property_ui_range(prop, -100, 100, 10, 3);
3095  RNA_def_property_ui_text(prop, "Strength", "Amount to displace geometry");
3096  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3097 
3098  prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
3100  RNA_def_property_ui_text(prop, "Direction", "");
3101  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3102 
3103  prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
3104  RNA_def_property_enum_items(prop, prop_space_items);
3105  RNA_def_property_ui_text(prop, "Space", "");
3106  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
3107 
3108  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
3110  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
3111  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3112 
3114 
3116 }
3117 
3119 {
3120  StructRNA *srna;
3121  PropertyRNA *prop;
3122 
3123  srna = RNA_def_struct(brna, "UVProjectModifier", "Modifier");
3125  srna, "UV Project Modifier", "UV projection modifier to set UVs from a projector");
3126  RNA_def_struct_sdna(srna, "UVProjectModifierData");
3127  RNA_def_struct_ui_icon(srna, ICON_MOD_UVPROJECT);
3128 
3130 
3131  prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
3132  RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
3133  RNA_def_property_ui_text(prop, "UV Map", "UV map name");
3134  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVProjectModifier_uvlayer_name_set");
3135  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3136 
3137  prop = RNA_def_property(srna, "projector_count", PROP_INT, PROP_NONE);
3138  RNA_def_property_int_sdna(prop, NULL, "projectors_num");
3139  RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use");
3140  RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
3142  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3143 
3144  prop = RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
3145  RNA_def_property_struct_type(prop, "UVProjector");
3147  "rna_UVProject_projectors_begin",
3148  "rna_iterator_array_next",
3149  "rna_iterator_array_end",
3150  "rna_iterator_array_get",
3151  NULL,
3152  NULL,
3153  NULL,
3154  NULL);
3155  RNA_def_property_ui_text(prop, "Projectors", "");
3156 
3157  prop = RNA_def_property(srna, "aspect_x", PROP_FLOAT, PROP_NONE);
3158  RNA_def_property_float_sdna(prop, NULL, "aspectx");
3160  RNA_def_property_range(prop, 1, FLT_MAX);
3161  RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
3163  prop, "Aspect X", "Horizontal aspect ratio (only used for camera projectors)");
3164  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3165 
3166  prop = RNA_def_property(srna, "aspect_y", PROP_FLOAT, PROP_NONE);
3167  RNA_def_property_float_sdna(prop, NULL, "aspecty");
3169  RNA_def_property_range(prop, 1, FLT_MAX);
3170  RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
3172  prop, "Aspect Y", "Vertical aspect ratio (only used for camera projectors)");
3173  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3174 
3175  prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_NONE);
3176  RNA_def_property_float_sdna(prop, NULL, "scalex");
3178  RNA_def_property_range(prop, 0, FLT_MAX);
3179  RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
3180  RNA_def_property_ui_text(prop, "Scale X", "Horizontal scale (only used for camera projectors)");
3181  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3182 
3183  prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_NONE);
3184  RNA_def_property_float_sdna(prop, NULL, "scaley");
3186  RNA_def_property_range(prop, 0, FLT_MAX);
3187  RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
3188  RNA_def_property_ui_text(prop, "Scale Y", "Vertical scale (only used for camera projectors)");
3189  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3190 
3191  srna = RNA_def_struct(brna, "UVProjector", NULL);
3192  RNA_def_struct_ui_text(srna, "UVProjector", "UV projector used by the UV project modifier");
3193 
3194  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
3195  RNA_def_property_struct_type(prop, "Object");
3197  prop, "rna_UVProjector_object_get", "rna_UVProjector_object_set", NULL, NULL);
3199  RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform");
3200  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
3201 
3203 }
3204 
3206 {
3207  StructRNA *srna;
3208  PropertyRNA *prop;
3209 
3210  srna = RNA_def_struct(brna, "SmoothModifier", "Modifier");
3211  RNA_def_struct_ui_text(srna, "Smooth Modifier", "Smoothing effect modifier");
3212  RNA_def_struct_sdna(srna, "SmoothModifierData");
3213  RNA_def_struct_ui_icon(srna, ICON_MOD_SMOOTH);
3214 
3216 
3217  prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
3219  RNA_def_property_ui_text(prop, "X", "Smooth object along X axis");
3220  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3221 
3222  prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
3224  RNA_def_property_ui_text(prop, "Y", "Smooth object along Y axis");
3225  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3226 
3227  prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
3229  RNA_def_property_ui_text(prop, "Z", "Smooth object along Z axis");
3230  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3231 
3232  prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_FACTOR);
3233  RNA_def_property_float_sdna(prop, NULL, "fac");
3234  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3235  RNA_def_property_ui_range(prop, -10, 10, 1, 3);
3236  RNA_def_property_ui_text(prop, "Factor", "Strength of modifier effect");
3237  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3238 
3239  prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
3240  RNA_def_property_int_sdna(prop, NULL, "repeat");
3241  RNA_def_property_ui_range(prop, 0, 30, 1, -1);
3242  RNA_def_property_ui_text(prop, "Repeat", "");
3243  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3244 
3245  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
3246  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
3248  prop,
3249  "Vertex Group",
3250  "Name of Vertex Group which determines influence of modifier per point");
3251  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SmoothModifier_defgrp_name_set");
3252  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3253 
3254  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
3256  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
3257  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3258 
3260 }
3261 
3263 {
3264  StructRNA *srna;
3265  PropertyRNA *prop;
3266 
3267  static const EnumPropertyItem modifier_smooth_type_items[] = {
3269  "SIMPLE",
3270  0,
3271  "Simple",
3272  "Use the average of adjacent edge-vertices"},
3274  "LENGTH_WEIGHTED",
3275  0,
3276  "Length Weight",
3277  "Use the average of adjacent edge-vertices weighted by their length"},
3278  {0, NULL, 0, NULL, NULL},
3279  };
3280 
3281  static const EnumPropertyItem modifier_rest_source_items[] = {
3283  "ORCO",
3284  0,
3285  "Original Coords",
3286  "Use base mesh vertex coords as the rest position"},
3288  "BIND",
3289  0,
3290  "Bind Coords",
3291  "Use bind vertex coords for rest position"},
3292  {0, NULL, 0, NULL, NULL},
3293  };
3294 
3295  srna = RNA_def_struct(brna, "CorrectiveSmoothModifier", "Modifier");
3297  srna, "Corrective Smooth Modifier", "Correct distortion caused by deformation");
3298  RNA_def_struct_sdna(srna, "CorrectiveSmoothModifierData");
3299  RNA_def_struct_ui_icon(srna, ICON_MOD_SMOOTH);
3300 
3302 
3303  prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_FACTOR);
3304  RNA_def_property_float_sdna(prop, NULL, "lambda");
3305  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3306  RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 3);
3307  RNA_def_property_ui_text(prop, "Lambda Factor", "Smooth factor effect");
3308  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
3309 
3310  prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
3311  RNA_def_property_int_sdna(prop, NULL, "repeat");
3312  RNA_def_property_ui_range(prop, 0, 200, 1, -1);
3313  RNA_def_property_ui_text(prop, "Repeat", "");
3314  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
3315 
3316  prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_FACTOR);
3317  RNA_def_property_float_sdna(prop, NULL, "scale");
3318  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3319  RNA_def_property_ui_range(prop, 0.0, 10.0, 5, 3);
3320  RNA_def_property_ui_text(prop, "Scale", "Compensate for scale applied by other modifiers");
3321  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
3322 
3323  prop = RNA_def_property(srna, "rest_source", PROP_ENUM, PROP_NONE);
3324  RNA_def_property_enum_sdna(prop, NULL, "rest_source");
3325  RNA_def_property_enum_items(prop, modifier_rest_source_items);
3326  RNA_def_property_ui_text(prop, "Rest Source", "Select the source of rest positions");
3327  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_rest_source_update");
3328 
3329  prop = RNA_def_property(srna, "smooth_type", PROP_ENUM, PROP_NONE);
3330  RNA_def_property_enum_sdna(prop, NULL, "smooth_type");
3331  RNA_def_property_enum_items(prop, modifier_smooth_type_items);
3332  RNA_def_property_ui_text(prop, "Smooth Type", "Method used for smoothing");
3333  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
3334 
3335  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
3337  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
3338  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
3339 
3340  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
3341  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
3343  prop,
3344  "Vertex Group",
3345  "Name of Vertex Group which determines influence of modifier per point");
3346  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CorrectiveSmoothModifier_defgrp_name_set");
3347  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
3348 
3349  prop = RNA_def_property(srna, "is_bind", PROP_BOOLEAN, PROP_NONE);
3350  RNA_def_property_ui_text(prop, "Bind current shape", "");
3351  RNA_def_property_boolean_funcs(prop, "rna_CorrectiveSmoothModifier_is_bind_get", NULL);
3353  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3354 
3355  prop = RNA_def_property(srna, "use_only_smooth", PROP_BOOLEAN, PROP_NONE);
3358  prop, "Only Smooth", "Apply smoothing without reconstructing the surface");
3359  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3360 
3361  prop = RNA_def_property(srna, "use_pin_boundary", PROP_BOOLEAN, PROP_NONE);
3364  prop, "Pin Boundaries", "Excludes boundary vertices from being smoothed");
3365  RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
3366 
3368 }
3369 
3371 {
3372  StructRNA *srna;
3373  PropertyRNA *prop;
3374 
3375  srna = RNA_def_struct(brna, "LaplacianSmoothModifier", "Modifier");
3376  RNA_def_struct_ui_text(srna, "Laplacian Smooth Modifier", "Smoothing effect modifier");
3377  RNA_def_struct_sdna(srna, "LaplacianSmoothModifierData");
3378  RNA_def_struct_ui_icon(srna, ICON_MOD_SMOOTH);
3379 
3381 
3382  prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
3384  RNA_def_property_ui_text(prop, "X", "Smooth object along X axis");
3385  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3386 
3387  prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
3389  RNA_def_property_ui_text(prop, "Y", "Smooth object along Y axis");
3390  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3391 
3392  prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
3394  RNA_def_property_ui_text(prop, "Z", "Smooth object along Z axis");
3395  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3396 
3397  prop = RNA_def_property(srna, "use_volume_preserve", PROP_BOOLEAN, PROP_NONE);
3399  RNA_def_property_ui_text(prop, "Preserve Volume", "Apply volume preservation after smooth");
3400  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3401 
3402  prop = RNA_def_property(srna, "use_normalized", PROP_BOOLEAN, PROP_NONE);
3404  RNA_def_property_ui_text(prop, "Normalized", "Improve and stabilize the enhanced shape");
3405  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3406 
3407  prop = RNA_def_property(srna, "lambda_factor", PROP_FLOAT, PROP_NONE);
3408  RNA_def_property_float_sdna(prop, NULL, "lambda");
3409  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3410  RNA_def_property_ui_range(prop, -1000.0, 1000.0, 5, 3);
3411  RNA_def_property_ui_text(prop, "Lambda Factor", "Smooth factor effect");
3412  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3413 
3414  prop = RNA_def_property(srna, "lambda_border", PROP_FLOAT, PROP_NONE);
3415  RNA_def_property_float_sdna(prop, NULL, "lambda_border");
3416  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3417  RNA_def_property_ui_range(prop, -1000.0, 1000.0, 5, 3);
3418  RNA_def_property_ui_text(prop, "Lambda Border", "Lambda factor in border");
3419  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3420 
3421  prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
3422  RNA_def_property_int_sdna(prop, NULL, "repeat");
3423  RNA_def_property_ui_range(prop, 0, 200, 1, -1);
3424  RNA_def_property_ui_text(prop, "Repeat", "");
3425  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3426 
3427  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
3428  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
3430  prop,
3431  "Vertex Group",
3432  "Name of Vertex Group which determines influence of modifier per point");
3433  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LaplacianSmoothModifier_defgrp_name_set");
3434  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3435 
3436  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
3438  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
3439  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3440 
3442 }
3443 
3445 {
3446  StructRNA *srna;
3447  PropertyRNA *prop;
3448 
3449  static const EnumPropertyItem prop_cast_type_items[] = {
3450  {MOD_CAST_TYPE_SPHERE, "SPHERE", 0, "Sphere", ""},
3451  {MOD_CAST_TYPE_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
3452  {MOD_CAST_TYPE_CUBOID, "CUBOID", 0, "Cuboid", ""},
3453  {0, NULL, 0, NULL, NULL},
3454  };
3455 
3456  srna = RNA_def_struct(brna, "CastModifier", "Modifier");
3457  RNA_def_struct_ui_text(srna, "Cast Modifier", "Modifier to cast to other shapes");
3458  RNA_def_struct_sdna(srna, "CastModifierData");
3459  RNA_def_struct_ui_icon(srna, ICON_MOD_CAST);
3460 
3462 
3463  prop = RNA_def_property(srna, "cast_type", PROP_ENUM, PROP_NONE);
3464  RNA_def_property_enum_sdna(prop, NULL, "type");
3465  RNA_def_property_enum_items(prop, prop_cast_type_items);
3466  RNA_def_property_ui_text(prop, "Shape", "Target object shape");
3467  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3468 
3469  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
3471  prop,
3472  "Object",
3473  "Control object: if available, its location determines the center of the effect");
3474  RNA_def_property_pointer_funcs(prop, NULL, "rna_CastModifier_object_set", NULL, NULL);
3476  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
3477 
3478  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
3480  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
3481  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3482 
3483  prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
3485  RNA_def_property_ui_text(prop, "X", "");
3486  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3487 
3488  prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
3490  RNA_def_property_ui_text(prop, "Y", "");
3491  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3492 
3493  prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
3495  RNA_def_property_ui_text(prop, "Z", "");
3496  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3497 
3498  prop = RNA_def_property(srna, "use_radius_as_size", PROP_BOOLEAN, PROP_NONE);
3501  prop, "Size from Radius", "Use radius as size of projection shape (0 = auto)");
3502  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3503 
3504  prop = RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE);
3507  prop, "Use Transform", "Use object transform to control projection shape");
3508  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3509 
3510  prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_FACTOR);
3511  RNA_def_property_float_sdna(prop, NULL, "fac");
3512  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3513  RNA_def_property_ui_range(prop, -10, 10, 5, 2);
3514  RNA_def_property_ui_text(prop, "Factor", "");
3515  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3516 
3517  prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
3518  RNA_def_property_range(prop, 0, FLT_MAX);
3519  RNA_def_property_ui_range(prop, 0, 100, 5, 2);
3521  prop,
3522  "Radius",
3523  "Only deform vertices within this distance from the center of the effect "
3524  "(leave as 0 for infinite.)");
3525  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3526 
3527  prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
3528  RNA_def_property_range(prop, 0, FLT_MAX);
3529  RNA_def_property_ui_range(prop, 0, 100, 5, 2);
3530  RNA_def_property_ui_text(prop, "Size", "Size of projection shape (leave as 0 for auto)");
3531  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3532 
3533  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
3534  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
3535  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
3536  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CastModifier_defgrp_name_set");
3537  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3538 
3540 }
3541 
3543 {
3544  StructRNA *srna;
3545  PropertyRNA *prop;
3546 # if 0
3547  static const EnumPropertyItem prop_mode_items[] = {
3548  {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"},
3549  {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"},
3550  {0, NULL, 0, NULL, NULL},
3551  };
3552 # endif
3553 
3554  srna = RNA_def_struct(brna, "MeshDeformModifier", "Modifier");
3556  srna, "MeshDeform Modifier", "Mesh deformation modifier to deform with other meshes");
3557  RNA_def_struct_sdna(srna, "MeshDeformModifierData");
3558  RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM);
3559 
3561 
3562  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
3563  RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with");
3565  prop, NULL, "rna_MeshDeformModifier_object_set", NULL, "rna_Mesh_object_poll");
3567  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
3568 
3569  prop = RNA_def_property(srna, "is_bound", PROP_BOOLEAN, PROP_NONE);
3570  RNA_def_property_boolean_funcs(prop, "rna_MeshDeformModifier_is_bound_get", NULL);
3571  RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to control cage");
3573 
3574  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
3576  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
3577  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3578 
3579  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
3580  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
3581  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
3582  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshDeformModifier_defgrp_name_set");
3583  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3584 
3585  prop = RNA_def_property(srna, "precision", PROP_INT, PROP_NONE);
3586  RNA_def_property_int_sdna(prop, NULL, "gridsize");
3587  RNA_def_property_range(prop, 2, 10);
3588  RNA_def_property_ui_text(prop, "Precision", "The grid size for binding");
3589  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3590 
3591  prop = RNA_def_property(srna, "use_dynamic_bind", PROP_BOOLEAN, PROP_NONE);
3594  "Dynamic",
3595  "Recompute binding dynamically on top of other deformers "
3596  "(slower and more memory consuming)");
3597  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3598 
3599 # if 0
3600  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
3601  RNA_def_property_enum_items(prop, prop_mode_items);
3602  RNA_def_property_ui_text(prop, "Mode", "Method of binding vertices are bound to cage mesh");
3603  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3604 # endif
3605 
3607 }
3608 
3610 {
3611  StructRNA *srna;
3612  PropertyRNA *prop;
3613 
3614  srna = RNA_def_struct(brna, "ParticleSystemModifier", "Modifier");
3615  RNA_def_struct_ui_text(srna, "ParticleSystem Modifier", "Particle system simulation modifier");
3616  RNA_def_struct_sdna(srna, "ParticleSystemModifierData");
3617  RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
3618 
3620 
3621  prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
3623  RNA_def_property_pointer_sdna(prop, NULL, "psys");
3624  RNA_def_property_ui_text(prop, "Particle System", "Particle System that this modifier controls");
3625 
3627 }
3628 
3630 {
3631  StructRNA *srna;
3632  PropertyRNA *prop;
3633 
3634  static EnumPropertyItem particleinstance_space[] = {
3636  "LOCAL",
3637  0,
3638  "Local",
3639  "Use offset from the particle object in the instance object"},
3641  "WORLD",
3642  0,
3643  "World",
3644  "Use world space offset in the instance object"},
3645  {0, NULL, 0, NULL, NULL},
3646  };
3647 
3648  srna = RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier");
3649  RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier");
3650  RNA_def_struct_sdna(srna, "ParticleInstanceModifierData");
3651  RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
3652 
3654 
3655  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
3656  RNA_def_property_pointer_sdna(prop, NULL, "ob");
3657  RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll");
3658  RNA_def_property_ui_text(prop, "Object", "Object that has the particle system");
3660  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
3661 
3662  prop = RNA_def_property(srna, "particle_system_index", PROP_INT, PROP_NONE);
3663  RNA_def_property_int_sdna(prop, NULL, "psys");
3664  RNA_def_property_range(prop, 1, SHRT_MAX);
3665  RNA_def_property_ui_text(prop, "Particle System Number", "");
3666  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3667 
3668  prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
3669  RNA_def_property_struct_type(prop, "ParticleSystem");
3671  "rna_ParticleInstanceModifier_particle_system_get",
3672  "rna_ParticleInstanceModifier_particle_system_set",
3673  NULL,
3674  "rna_ParticleInstanceModifier_particle_system_poll");
3676  RNA_def_property_ui_text(prop, "Particle System", "");
3677  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3678 
3679  prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
3680  RNA_def_property_enum_sdna(prop, NULL, "axis");
3682  RNA_def_property_ui_text(prop, "Axis", "Pole axis for rotation");
3683  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3684 
3685  prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
3686  RNA_def_property_enum_sdna(prop, NULL, "space");
3687  RNA_def_property_enum_items(prop, particleinstance_space);
3688  RNA_def_property_ui_text(prop, "Space", "Space to use for copying mesh data");
3689  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3690 
3691  prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
3693  RNA_def_property_ui_text(prop, "Regular", "Create instances from normal particles");
3694  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3695 
3696  prop = RNA_def_property(srna, "use_children", PROP_BOOLEAN, PROP_NONE);
3698  RNA_def_property_ui_text(prop, "Children", "Create instances from child particles");
3700  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3701 
3702  prop = RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
3704  RNA_def_property_ui_text(prop, "Path", "Create instances along particle paths");
3705  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3706 
3707  prop = RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
3709  RNA_def_property_ui_text(prop, "Unborn", "Show instances when particles are unborn");
3710  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3711 
3712  prop = RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
3714  RNA_def_property_ui_text(prop, "Alive", "Show instances when particles are alive");
3715  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3716 
3717  prop = RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
3719  RNA_def_property_ui_text(prop, "Dead", "Show instances when particles are dead");
3720  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3721 
3722  prop = RNA_def_property(srna, "use_preserve_shape", PROP_BOOLEAN, PROP_NONE);
3724  RNA_def_property_ui_text(prop, "Keep Shape", "Don't stretch the object");
3725  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3726 
3727  prop = RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
3729  RNA_def_property_ui_text(prop, "Size", "Use particle size to scale the instances");
3730  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3731 
3732  prop = RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
3733  RNA_def_property_float_sdna(prop, NULL, "position");
3734  RNA_def_property_range(prop, 0.0, 1.0);
3735  RNA_def_property_ui_text(prop, "Position", "Position along path");
3736  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3737 
3738  prop = RNA_def_property(srna, "random_position", PROP_FLOAT, PROP_NONE);
3739  RNA_def_property_float_sdna(prop, NULL, "random_position");
3740  RNA_def_property_range(prop, 0.0, 1.0);
3741  RNA_def_property_ui_text(prop, "Random Position", "Randomize position along path");
3742  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3743 
3744  prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_FACTOR);
3745  RNA_def_property_float_sdna(prop, NULL, "rotation");
3746  RNA_def_property_range(prop, 0.0, 1.0);
3747  RNA_def_property_ui_text(prop, "Rotation", "Rotation around path");
3748  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3749 
3750  prop = RNA_def_property(srna, "random_rotation", PROP_FLOAT, PROP_FACTOR);
3751  RNA_def_property_float_sdna(prop, NULL, "random_rotation");
3752  RNA_def_property_range(prop, 0.0, 1.0);
3753  RNA_def_property_ui_text(prop, "Random Rotation", "Randomize rotation around path");
3754  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3755 
3756  prop = RNA_def_property(srna, "particle_amount", PROP_FLOAT, PROP_FACTOR);
3757  RNA_def_property_range(prop, 0.0, 1.0);
3758  RNA_def_property_ui_text(prop, "Particle Amount", "Amount of particles to use for instancing");
3759  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3760 
3761  prop = RNA_def_property(srna, "particle_offset", PROP_FLOAT, PROP_FACTOR);
3762  RNA_def_property_range(prop, 0.0, 1.0);
3764  "Particle Offset",
3765  "Relative offset of particles to use for instancing, to avoid overlap "
3766  "of multiple instances");
3767  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3768 
3769  prop = RNA_def_property(srna, "index_layer_name", PROP_STRING, PROP_NONE);
3770  RNA_def_property_string_sdna(prop, NULL, "index_layer_name");
3771  RNA_def_property_ui_text(prop, "Index Layer Name", "Custom data layer name for the index");
3772  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3773 
3774  prop = RNA_def_property(srna, "value_layer_name", PROP_STRING, PROP_NONE);
3775  RNA_def_property_string_sdna(prop, NULL, "value_layer_name");
3777  prop, "Value Layer Name", "Custom data layer name for the randomized value");
3778  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3779 
3781 }
3782 
3784 {
3785  StructRNA *srna;
3786  PropertyRNA *prop;
3787 
3788  srna = RNA_def_struct(brna, "ExplodeModifier", "Modifier");
3790  srna, "Explode Modifier", "Explosion effect modifier based on a particle system");
3791  RNA_def_struct_sdna(srna, "ExplodeModifierData");
3792  RNA_def_struct_ui_icon(srna, ICON_MOD_EXPLODE);
3793 
3795 
3796  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
3798  "rna_ExplodeModifier_vgroup_get",
3799  "rna_ExplodeModifier_vgroup_length",
3800  "rna_ExplodeModifier_vgroup_set");
3801  RNA_def_property_ui_text(prop, "Vertex Group", "");
3802 
3803  prop = RNA_def_property(srna, "protect", PROP_FLOAT, PROP_NONE);
3804  RNA_def_property_range(prop, 0, 1);
3805  RNA_def_property_ui_text(prop, "Protect", "Clean vertex group edges");
3806  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3807 
3808  prop = RNA_def_property(srna, "use_edge_cut", PROP_BOOLEAN, PROP_NONE);
3810  RNA_def_property_ui_text(prop, "Cut Edges", "Cut face edges for nicer shrapnel");
3811  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3812 
3813  prop = RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
3815  RNA_def_property_ui_text(prop, "Unborn", "Show mesh when particles are unborn");
3816  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3817 
3818  prop = RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
3820  RNA_def_property_ui_text(prop, "Alive", "Show mesh when particles are alive");
3821  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3822 
3823  prop = RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
3825  RNA_def_property_ui_text(prop, "Dead", "Show mesh when particles are dead");
3826  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3827 
3828  prop = RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
3830  RNA_def_property_ui_text(prop, "Size", "Use particle size for the shrapnel");
3831  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3832 
3833  prop = RNA_def_property(srna, "particle_uv", PROP_STRING, PROP_NONE);
3834  RNA_def_property_string_sdna(prop, NULL, "uvname");
3836  RNA_def_property_ui_text(prop, "Particle UV", "UV map to change with particle age");
3837  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3838 
3839  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
3841  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
3842  RNA_def_property_update(prop, 0, "rna_Modifier_update");
3843 
3845 }
3846 
3848 {
3849  StructRNA *srna;
3850  PropertyRNA *prop;
3851 
3852  srna = RNA_def_struct(brna, "ClothModifier", "Modifier");
3853  RNA_def_struct_ui_text(srna, "Cloth Modifier", "Cloth simulation modifier");
3854  RNA_def_struct_sdna(srna, "ClothModifierData");
3855  RNA_def_struct_ui_icon(srna, ICON_MOD_CLOTH);
3856 
3858 
3859  prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
3861  RNA_def_property_pointer_sdna(prop, NULL, "sim_parms");
3862  RNA_def_property_ui_text(prop, "Cloth Settings", "");
3863 
3864  prop = RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NONE);
3866  RNA_def_property_pointer_sdna(prop, NULL, "coll_parms");
3867  RNA_def_property_ui_text(prop, "Cloth Collision Settings", "");
3868 
3869  prop = RNA_def_property(srna, "solver_result", PROP_POINTER, PROP_NONE);
3870  RNA_def_property_struct_type(prop, "ClothSolverResult");
3871  RNA_def_property_pointer_sdna(prop, NULL, "solver_result");
3872  RNA_def_property_ui_text(prop, "Solver Result", "");
3873 
3874  prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
3876  RNA_def_property_ui_text(prop, "Point Cache", "");
3877 
3878  prop = RNA_def_property(srna, "hair_grid_min", PROP_FLOAT, PROP_NONE);
3879  RNA_def_property_float_sdna(prop, NULL, "hair_grid_min");
3881  RNA_def_property_ui_text(prop, "Hair Grid Minimum", "");
3882 
3883  prop = RNA_def_property(srna, "hair_grid_max", PROP_FLOAT, PROP_NONE);
3884  RNA_def_property_float_sdna(prop, NULL, "hair_grid_max");
3886  RNA_def_property_ui_text(prop, "Hair Grid Maximum", "");
3887 
3888  prop = RNA_def_property(srna, "hair_grid_resolution", PROP_INT, PROP_NONE);
3889  RNA_def_property_int_sdna(prop, NULL, "hair_grid_res");
3891  RNA_def_property_ui_text(prop, "Hair Grid Resolution", "");
3892 
3894 }
3895 
3897 {
3898  StructRNA *srna;
3899  PropertyRNA *prop;
3900 
3901  static const EnumPropertyItem prop_fluid_type_items[] = {
3902  {0, "NONE", 0, "None", ""},
3903  {MOD_FLUID_TYPE_DOMAIN, "DOMAIN", 0, "Domain", ""},
3904  {MOD_FLUID_TYPE_FLOW, "FLOW", 0, "Flow", "Inflow/Outflow"},
3905  {MOD_FLUID_TYPE_EFFEC, "EFFECTOR", 0, "Effector", ""},
3906  {0, NULL, 0, NULL, NULL},
3907  };
3908 
3909  srna = RNA_def_struct(brna, "FluidModifier", "Modifier");
3910  RNA_def_struct_ui_text(srna, "Fluid Modifier", "Fluid simulation modifier");
3911  RNA_def_struct_sdna(srna, "FluidModifierData");
3912  RNA_def_struct_ui_icon(srna, ICON_MOD_FLUIDSIM);
3913 
3915 
3916  prop = RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE);
3917  RNA_def_property_pointer_sdna(prop, NULL, "domain");
3918  RNA_def_property_ui_text(prop, "Domain Settings", "");
3919 
3920  prop = RNA_def_property(srna, "flow_settings", PROP_POINTER, PROP_NONE);
3921  RNA_def_property_pointer_sdna(prop, NULL, "flow");
3922  RNA_def_property_ui_text(prop, "Flow Settings", "");
3923 
3924  prop = RNA_def_property(srna, "effector_settings", PROP_POINTER, PROP_NONE);
3925  RNA_def_property_pointer_sdna(prop, NULL, "effector");
3926  RNA_def_property_ui_text(prop, "Effector Settings", "");
3927 
3928  prop = RNA_def_property(srna, "fluid_type", PROP_ENUM, PROP_NONE);
3929  RNA_def_property_enum_sdna(prop, NULL, "type");
3930  RNA_def_property_enum_items(prop, prop_fluid_type_items);
3931  RNA_def_property_ui_text(prop, "Type", "");
3933  RNA_def_property_update(prop, 0, "rna_fluid_set_type");
3934 
3936 }
3937 
3939 {
3940  StructRNA *srna;
3941  PropertyRNA *prop;
3942 
3943  srna = RNA_def_struct(brna, "DynamicPaintModifier", "Modifier");
3944  RNA_def_struct_ui_text(srna, "Dynamic Paint Modifier", "Dynamic Paint modifier");
3945  RNA_def_struct_sdna(srna, "DynamicPaintModifierData");
3946  RNA_def_struct_ui_icon(srna, ICON_MOD_DYNAMICPAINT);
3947 
3949 
3950  prop = RNA_def_property(srna, "canvas_settings", PROP_POINTER, PROP_NONE);
3951  RNA_def_property_pointer_sdna(prop, NULL, "canvas");
3952  RNA_def_property_ui_text(prop, "Canvas Settings", "");
3953 
3954  prop = RNA_def_property(srna, "brush_settings", PROP_POINTER, PROP_NONE);
3955  RNA_def_property_pointer_sdna(prop, NULL, "brush");
3956  RNA_def_property_ui_text(prop, "Brush Settings", "");
3957 
3958  prop = RNA_def_property(srna, "ui_type", PROP_ENUM, PROP_NONE);
3960  RNA_def_property_enum_sdna(prop, NULL, "type");
3962  RNA_def_property_ui_text(prop, "Type", "");
3963 
3965 }
3966 
3968 {
3969  StructRNA *srna;
3970  PropertyRNA *prop;
3971 
3972  srna = RNA_def_struct(brna, "CollisionModifier", "Modifier");
3974  "Collision Modifier",
3975  "Collision modifier defining modifier stack position used for collision");
3976  RNA_def_struct_sdna(srna, "CollisionModifierData");
3977  RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
3978 
3980 
3981  prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
3983  RNA_def_property_struct_type(prop, "CollisionSettings");
3984  RNA_def_property_pointer_funcs(prop, "rna_CollisionModifier_settings_get", NULL, NULL, NULL);
3985  RNA_def_property_ui_text(prop, "Settings", "");
3986 
3988 }
3989 
3991 {
3992  StructRNA *srna;
3993  PropertyRNA *prop;
3994 
3995  static const EnumPropertyItem prop_limit_method_items[] = {
3996  {0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount"},
3997  {MOD_BEVEL_ANGLE,
3998  "ANGLE",
3999  0,
4000  "Angle",
4001  "Only bevel edges with sharp enough angles between faces"},
4003  "WEIGHT",
4004  0,
4005  "Weight",
4006  "Use bevel weights to determine how much bevel is applied in edge mode"},
4008  "VGROUP",
4009  0,
4010  "Vertex Group",
4011  "Use vertex group weights to select whether vertex or edge is beveled"},
4012  {0, NULL, 0, NULL, NULL},
4013  };
4014 
4015  static const EnumPropertyItem prop_val_type_items[] = {
4016  {MOD_BEVEL_AMT_OFFSET, "OFFSET", 0, "Offset", "Amount is offset of new edges from original"},
4017  {MOD_BEVEL_AMT_WIDTH, "WIDTH", 0, "Width", "Amount is width of new face"},
4019  "DEPTH",
4020  0,
4021  "Depth",
4022  "Amount is perpendicular distance from original edge to bevel face"},
4024  "PERCENT",
4025  0,
4026  "Percent",
4027  "Amount is percent of adjacent edge length"},
4029  "ABSOLUTE",
4030  0,
4031  "Absolute",
4032  "Amount is absolute distance along adjacent edge"},
4033  {0, NULL, 0, NULL, NULL},
4034  };
4035 
4036  static const EnumPropertyItem prop_profile_type_items[] = {
4038  "SUPERELLIPSE",
4039  0,
4040  "Superellipse",
4041  "The profile can be a concave or convex curve"},
4043  "CUSTOM",
4044  0,
4045  "Custom",
4046  "The profile can be any arbitrary path between its endpoints"},
4047  {0, NULL, 0, NULL, NULL},
4048  };
4049 
4050  static EnumPropertyItem prop_harden_normals_items[] = {
4051  {MOD_BEVEL_FACE_STRENGTH_NONE, "FSTR_NONE", 0, "None", "Do not set face strength"},
4052  {MOD_BEVEL_FACE_STRENGTH_NEW, "FSTR_NEW", 0, "New", "Set face strength on new faces only"},
4054  "FSTR_AFFECTED",
4055  0,
4056  "Affected",
4057  "Set face strength on new and affected faces only"},
4058  {MOD_BEVEL_FACE_STRENGTH_ALL, "FSTR_ALL", 0, "All", "Set face strength on all faces"},
4059  {0, NULL, 0, NULL, NULL},
4060  };
4061 
4062  static const EnumPropertyItem prop_miter_outer_items[] = {
4063  {MOD_BEVEL_MITER_SHARP, "MITER_SHARP", 0, "Sharp", "Outside of miter is sharp"},
4064  {MOD_BEVEL_MITER_PATCH, "MITER_PATCH", 0, "Patch", "Outside of miter is squared-off patch"},
4065  {MOD_BEVEL_MITER_ARC, "MITER_ARC", 0, "Arc", "Outside of miter is arc"},
4066  {0, NULL, 0, NULL, NULL},
4067  };
4068 
4069  static const EnumPropertyItem prop_miter_inner_items[] = {
4070  {MOD_BEVEL_MITER_SHARP, "MITER_SHARP", 0, "Sharp", "Inside of miter is sharp"},
4071  {MOD_BEVEL_MITER_ARC, "MITER_ARC", 0, "Arc", "Inside of miter is arc"},
4072  {0, NULL, 0, NULL, NULL},
4073  };
4074 
4075  static EnumPropertyItem prop_vmesh_method_items[] = {
4076  {MOD_BEVEL_VMESH_ADJ, "ADJ", 0, "Grid Fill", "Default patterned fill"},
4078  "CUTOFF",
4079  0,
4080  "Cutoff",
4081  "A cut-off at the end of each profile before the intersection"},
4082  {0, NULL, 0, NULL, NULL},
4083  };
4084 
4085  static const EnumPropertyItem prop_affect_items[] = {
4086  {MOD_BEVEL_AFFECT_VERTICES, "VERTICES", 0, "Vertices", "Affect only vertices"},
4087  {MOD_BEVEL_AFFECT_EDGES, "EDGES", 0, "Edges", "Affect only edges"},
4088  {0, NULL, 0, NULL, NULL},
4089  };
4090 
4091  srna = RNA_def_struct(brna, "BevelModifier", "Modifier");
4093  srna, "Bevel Modifier", "Bevel modifier to make edges and vertices more rounded");
4094  RNA_def_struct_sdna(srna, "BevelModifierData");
4095  RNA_def_struct_ui_icon(srna, ICON_MOD_BEVEL);
4096 
4098 
4099  prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
4100  RNA_def_property_float_sdna(prop, NULL, "value");
4101  RNA_def_property_range(prop, 0, FLT_MAX);
4102  RNA_def_property_ui_range(prop, 0.0f, 100.0f, 0.1, 4);
4103  RNA_def_property_ui_text(prop, "Width", "Bevel amount");
4104  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4105 
4106  prop = RNA_def_property(srna, "width_pct", PROP_FLOAT, PROP_PERCENTAGE);
4107  RNA_def_property_float_sdna(prop, NULL, "value");
4108  RNA_def_property_range(prop, 0, FLT_MAX);
4109  RNA_def_property_ui_range(prop, 0.0f, 100.0f, 5.0, 2);
4110  RNA_def_property_ui_text(prop, "Width Percent", "Bevel amount for percentage method");
4111  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4112 
4113  prop = RNA_def_property(srna, "segments", PROP_INT, PROP_NONE);
4114  RNA_def_property_int_sdna(prop, NULL, "res");
4115  RNA_def_property_range(prop, 1, 1000);
4116  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
4117  RNA_def_property_ui_text(prop, "Segments", "Number of segments for round edges/verts");
4118  RNA_def_property_update(prop, 0, "rna_BevelModifier_update_segments");
4119 
4120  prop = RNA_def_property(srna, "affect", PROP_ENUM, PROP_NONE); /* as an enum */
4121  RNA_def_property_enum_sdna(prop, NULL, "affect_type");
4122  RNA_def_property_enum_items(prop, prop_affect_items);
4123  RNA_def_property_ui_text(prop, "Affect", "Affect edges or vertices");
4124  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4125 
4126  prop = RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
4127  RNA_def_property_enum_sdna(prop, NULL, "lim_flags");
4128  RNA_def_property_enum_items(prop, prop_limit_method_items);
4129  RNA_def_property_ui_text(prop, "Limit Method", "");
4130  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4131 
4132  prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
4133  RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
4134  RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
4135  RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 2);
4136  RNA_def_property_ui_text(prop, "Angle", "Angle above which to bevel edges");
4137  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4138 
4139  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
4140  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
4141  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
4142  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_BevelModifier_defgrp_name_set");
4143  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4144 
4145  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
4147  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
4148  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4149 
4150  prop = RNA_def_property(srna, "use_clamp_overlap", PROP_BOOLEAN, PROP_NONE);
4152  RNA_def_property_ui_text(prop, "Clamp Overlap", "Clamp the width to avoid overlap");
4153  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4154 
4155  prop = RNA_def_property(srna, "offset_type", PROP_ENUM, PROP_NONE);
4156  RNA_def_property_enum_sdna(prop, NULL, "val_flags");
4157  RNA_def_property_enum_items(prop, prop_val_type_items);
4158  RNA_def_property_ui_text(prop, "Width Type", "What distance Width measures");
4159  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4160 
4161  prop = RNA_def_property(srna, "profile_type", PROP_ENUM, PROP_NONE);
4162  RNA_def_property_enum_sdna(prop, NULL, "profile_type");
4163  RNA_def_property_enum_items(prop, prop_profile_type_items);
4165  prop, "Profile Type", "The type of shape used to rebuild a beveled section");
4166  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4167 
4168  prop = RNA_def_property(srna, "profile", PROP_FLOAT, PROP_FACTOR);
4169  RNA_def_property_range(prop, 0.0f, 1.0f);
4170  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.05, 2);
4171  RNA_def_property_ui_text(prop, "Profile", "The profile shape (0.5 = round)");
4172  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4173 
4174  prop = RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
4175  RNA_def_property_int_sdna(prop, NULL, "mat");
4176  RNA_def_property_range(prop, -1, SHRT_MAX);
4178  prop, "Material Index", "Material index of generated faces, -1 for automatic");
4179  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4180 
4181  prop = RNA_def_property(srna, "loop_slide", PROP_BOOLEAN, PROP_NONE);
4183  RNA_def_property_ui_text(prop, "Loop Slide", "Prefer sliding along edges to having even widths");
4184  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4185 
4186  prop = RNA_def_property(srna, "mark_seam", PROP_BOOLEAN, PROP_NONE);
4188  RNA_def_property_ui_text(prop, "Mark Seams", "Mark Seams along beveled edges");
4189  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4190 
4191  prop = RNA_def_property(srna, "mark_sharp", PROP_BOOLEAN, PROP_NONE);
4193  RNA_def_property_ui_text(prop, "Mark Sharp", "Mark beveled edges as sharp");
4194  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4195 
4196  prop = RNA_def_property(srna, "harden_normals", PROP_BOOLEAN, PROP_NONE);
4198  RNA_def_property_ui_text(prop, "Harden Normals", "Match normals of new faces to adjacent faces");
4199  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4200 
4201  prop = RNA_def_property(srna, "face_strength_mode", PROP_ENUM, PROP_NONE);
4202  RNA_def_property_enum_sdna(prop, NULL, "face_str_mode");
4203  RNA_def_property_enum_items(prop, prop_harden_normals_items);
4205  prop, "Face Strength", "Whether to set face strength, and which faces to set it on");
4206  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4207 
4208  prop = RNA_def_property(srna, "miter_outer", PROP_ENUM, PROP_NONE);
4209  RNA_def_property_enum_sdna(prop, NULL, "miter_outer");
4210  RNA_def_property_enum_items(prop, prop_miter_outer_items);
4211  RNA_def_property_ui_text(prop, "Outer Miter", "Pattern to use for outside of miters");
4212  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4213 
4214  prop = RNA_def_property(srna, "miter_inner", PROP_ENUM, PROP_NONE);
4215  RNA_def_property_enum_sdna(prop, NULL, "miter_inner");
4216  RNA_def_property_enum_items(prop, prop_miter_inner_items);
4217  RNA_def_property_ui_text(prop, "Inner Miter", "Pattern to use for inside of miters");
4218  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4219 
4220  prop = RNA_def_property(srna, "spread", PROP_FLOAT, PROP_DISTANCE);
4221  RNA_def_property_float_sdna(prop, NULL, "spread");
4222  RNA_def_property_range(prop, 0, FLT_MAX);
4223  RNA_def_property_ui_range(prop, 0.0f, 100.0f, 0.1, 4);
4224  RNA_def_property_ui_text(prop, "Spread", "Spread distance for inner miter arcs");
4225  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4226 
4227  prop = RNA_def_property(srna, "custom_profile", PROP_POINTER, PROP_NONE);
4228  RNA_def_property_struct_type(prop, "CurveProfile");
4229  RNA_def_property_pointer_sdna(prop, NULL, "custom_profile");
4230  RNA_def_property_ui_text(prop, "Custom Profile Path", "The path for the custom profile");
4231  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4232 
4233  prop = RNA_def_property(srna, "vmesh_method", PROP_ENUM, PROP_NONE);
4234  RNA_def_property_enum_sdna(prop, NULL, "vmesh_method");
4235  RNA_def_property_enum_items(prop, prop_vmesh_method_items);
4237  prop, "Vertex Mesh Method", "The method to use to create the mesh at intersections");
4238  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4239 
4241 }
4242 
4244 {
4245  StructRNA *srna;
4246  PropertyRNA *prop;
4247 
4248  srna = RNA_def_struct(brna, "ShrinkwrapModifier", "Modifier");
4250  "Shrinkwrap Modifier",
4251  "Shrink wrapping modifier to shrink wrap and object to a target");
4252  RNA_def_struct_sdna(srna, "ShrinkwrapModifierData");
4253  RNA_def_struct_ui_icon(srna, ICON_MOD_SHRINKWRAP);
4254 
4256 
4257  prop = RNA_def_property(srna, "wrap_method", PROP_ENUM, PROP_NONE);
4258  RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
4260  RNA_def_property_ui_text(prop, "Wrap Method", "");
4261  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4262 
4263  prop = RNA_def_property(srna, "wrap_mode", PROP_ENUM, PROP_NONE);
4264  RNA_def_property_enum_sdna(prop, NULL, "shrinkMode");
4267  prop, "Snap Mode", "Select how vertices are constrained to the target surface");
4268  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4269 
4270  prop = RNA_def_property(srna, "cull_face", PROP_ENUM, PROP_NONE);
4271  RNA_def_property_enum_sdna(prop, NULL, "shrinkOpts");
4274  prop, "rna_ShrinkwrapModifier_face_cull_get", "rna_ShrinkwrapModifier_face_cull_set", NULL);
4276  prop,
4277  "Face Cull",
4278  "Stop vertices from projecting to a face on the target when facing towards/away");
4279  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4280 
4281  prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
4282  RNA_def_property_ui_text(prop, "Target", "Mesh target to shrink to");
4284  prop, NULL, "rna_ShrinkwrapModifier_target_set", NULL, "rna_Mesh_object_poll");
4286  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4287 
4288  prop = RNA_def_property(srna, "auxiliary_target", PROP_POINTER, PROP_NONE);
4289  RNA_def_property_pointer_sdna(prop, NULL, "auxTarget");
4290  RNA_def_property_ui_text(prop, "Auxiliary Target", "Additional mesh target to shrink to");
4292  prop, NULL, "rna_ShrinkwrapModifier_auxTarget_set", NULL, "rna_Mesh_object_poll");
4294  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4295 
4296  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
4297  RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
4298  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
4299  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShrinkwrapModifier_vgroup_name_set");
4300  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4301 
4302  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_DISTANCE);
4303  RNA_def_property_float_sdna(prop, NULL, "keepDist");
4304  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
4305  RNA_def_property_ui_range(prop, -100, 100, 1, 2);
4306  RNA_def_property_ui_text(prop, "Offset", "Distance to keep from the target");
4307  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4308 
4309  prop = RNA_def_property(srna, "project_limit", PROP_FLOAT, PROP_DISTANCE);
4310  RNA_def_property_float_sdna(prop, NULL, "projLimit");
4311  RNA_def_property_range(prop, 0.0, FLT_MAX);
4312  RNA_def_property_ui_range(prop, 0, 100, 1, 2);
4314  prop, "Project Limit", "Limit the distance used for projection (zero disables)");
4315  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4316 
4317  prop = RNA_def_property(srna, "use_project_x", PROP_BOOLEAN, PROP_NONE);
4319  RNA_def_property_ui_text(prop, "X", "");
4320  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4321 
4322  prop = RNA_def_property(srna, "use_project_y", PROP_BOOLEAN, PROP_NONE);
4324  RNA_def_property_ui_text(prop, "Y", "");
4325  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4326 
4327  prop = RNA_def_property(srna, "use_project_z", PROP_BOOLEAN, PROP_NONE);
4329  RNA_def_property_ui_text(prop, "Z", "");
4330  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4331 
4332  prop = RNA_def_property(srna, "subsurf_levels", PROP_INT, PROP_NONE);
4333  RNA_def_property_int_sdna(prop, NULL, "subsurfLevels");
4334  RNA_def_property_range(prop, 0, 6);
4335  RNA_def_property_ui_range(prop, 0, 6, 1, -1);
4337  prop,
4338  "Subdivision Levels",
4339  "Number of subdivisions that must be performed before extracting vertices' "
4340  "positions and normals");
4341  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4342 
4343  prop = RNA_def_property(srna, "use_negative_direction", PROP_BOOLEAN, PROP_NONE);
4346  prop, "Negative", "Allow vertices to move in the negative direction of axis");
4347  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4348 
4349  prop = RNA_def_property(srna, "use_positive_direction", PROP_BOOLEAN, PROP_NONE);
4352  prop, "Positive", "Allow vertices to move in the positive direction of axis");
4353  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4354 
4355  prop = RNA_def_property(srna, "use_invert_cull", PROP_BOOLEAN, PROP_NONE);
4358  prop, "Invert Cull", "When projecting in the negative direction invert the face cull mode");
4359  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4360 
4361  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
4363  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
4364  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4365 
4367 }
4368 
4370 {
4371  StructRNA *srna;
4372  PropertyRNA *prop;
4373 
4374  static const EnumPropertyItem modifier_mask_mode_items[] = {
4375  {MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", 0, "Vertex Group", ""},
4376  {MOD_MASK_MODE_ARM, "ARMATURE", 0, "Armature", ""},
4377  {0, NULL, 0, NULL, NULL},
4378  };
4379 
4380  srna = RNA_def_struct(brna, "MaskModifier", "Modifier");
4381  RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask modifier to hide parts of the mesh");
4382  RNA_def_struct_sdna(srna, "MaskModifierData");
4383  RNA_def_struct_ui_icon(srna, ICON_MOD_MASK);
4384 
4386 
4387  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
4388  RNA_def_property_enum_items(prop, modifier_mask_mode_items);
4389  RNA_def_property_ui_text(prop, "Mode", "");
4390  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4391 
4392  prop = RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
4393  RNA_def_property_pointer_sdna(prop, NULL, "ob_arm");
4394  RNA_def_property_ui_text(prop, "Armature", "Armature to use as source of bones to mask");
4396  prop, NULL, "rna_MaskModifier_ob_arm_set", NULL, "rna_Armature_object_poll");
4398  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4399 
4400  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
4401  RNA_def_property_string_sdna(prop, NULL, "vgroup");
4402  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
4403  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MaskModifier_vgroup_set");
4404  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4405 
4406  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
4408  RNA_def_property_ui_text(prop, "Invert", "Use vertices that are not part of region defined");
4409  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4410 
4411  prop = RNA_def_property(srna, "use_smooth", PROP_BOOLEAN, PROP_NONE);
4414  prop, "Smooth", "Use vertex group weights to cut faces at the weight contour");
4415  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4416 
4417  prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_FACTOR);
4418  RNA_def_property_float_sdna(prop, NULL, "threshold");
4419  RNA_def_property_range(prop, 0.0, 1.0);
4420  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
4421  RNA_def_property_ui_text(prop, "Threshold", "Weights over this threshold remain");
4422  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4423 
4425 }
4426 
4428 {
4429  StructRNA *srna;
4430  PropertyRNA *prop;
4431 
4432  static const EnumPropertyItem simple_deform_mode_items[] = {
4434  "TWIST",
4435  0,
4436  "Twist",
4437  "Rotate around the Z axis of the modifier space"},
4439  "BEND",
4440  0,
4441  "Bend",
4442  "Bend the mesh over the Z axis of the modifier space"},
4444  "TAPER",
4445  0,
4446  "Taper",
4447  "Linearly scale along Z axis of the modifier space"},
4449  "STRETCH",
4450  0,
4451  "Stretch",
4452  "Stretch the object along the Z axis of the modifier space"},
4453  {0, NULL, 0, NULL, NULL},
4454  };
4455 
4456  srna = RNA_def_struct(brna, "SimpleDeformModifier", "Modifier");
4458  srna,
4459  "SimpleDeform Modifier",
4460  "Simple deformation modifier to apply effects such as twisting and bending");
4461  RNA_def_struct_sdna(srna, "SimpleDeformModifierData");
4462  RNA_def_struct_ui_icon(srna, ICON_MOD_SIMPLEDEFORM);
4463 
4465 
4466  prop = RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
4467  RNA_def_property_enum_sdna(prop, NULL, "mode");
4468  RNA_def_property_enum_items(prop, simple_deform_mode_items);
4469  RNA_def_property_ui_text(prop, "Mode", "");
4470  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4471 
4472  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
4473  RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
4474  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
4475  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SimpleDeformModifier_vgroup_name_set");
4476  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4477 
4478  prop = RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
4480  RNA_def_property_ui_text(prop, "Axis", "Deform around local axis");
4481  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4482 
4483  prop = RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
4484  RNA_def_property_ui_text(prop, "Origin", "Offset the origin and orientation of the deformation");
4486  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4487 
4488  prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
4489  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
4490  RNA_def_property_ui_range(prop, -10.0, 10.0, 1.0, 3);
4491  RNA_def_property_ui_text(prop, "Factor", "Amount to deform object");
4492  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4493 
4494  prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
4495  RNA_def_property_float_sdna(prop, NULL, "factor");
4496  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
4497  RNA_def_property_ui_range(prop, DEG2RAD(-360.0), DEG2RAD(360.0), 10.0, 3);
4498  RNA_def_property_ui_text(prop, "Angle", "Angle of deformation");
4499  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4500 
4501  prop = RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE);
4502  RNA_def_property_float_sdna(prop, NULL, "limit");
4503  RNA_def_property_array(prop, 2);
4504  RNA_def_property_range(prop, 0, 1);
4505  RNA_def_property_ui_range(prop, 0, 1, 5, 2);
4506  RNA_def_property_ui_text(prop, "Limits", "Lower/Upper limits for deform");
4507  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4508 
4509  prop = RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
4511  RNA_def_property_ui_text(prop, "X", "Do not allow deformation along the X axis");
4512  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4513 
4514  prop = RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
4516  RNA_def_property_ui_text(prop, "Y", "Do not allow deformation along the Y axis");
4517  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4518 
4519  prop = RNA_def_property(srna, "lock_z", PROP_BOOLEAN, PROP_NONE);
4521  RNA_def_property_ui_text(prop, "Z", "Do not allow deformation along the Z axis");
4522  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4523 
4524  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
4526  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
4527  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4528 
4530 }
4531 
4533 {
4534  StructRNA *srna;
4535 
4536  srna = RNA_def_struct(brna, "SurfaceModifier", "Modifier");
4538  srna,
4539  "Surface Modifier",
4540  "Surface modifier defining modifier stack position used for surface fields");
4541  RNA_def_struct_sdna(srna, "SurfaceModifierData");
4542  RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
4543 }
4544 
4546 {
4547  static const EnumPropertyItem mode_items[] = {
4549  "EXTRUDE",
4550  0,
4551  "Simple",
4552  "Output a solidified version of a mesh by simple extrusion"},
4554  "NON_MANIFOLD",
4555  0,
4556  "Complex",
4557  "Output a manifold mesh even if the base mesh is non-manifold, "
4558  "where edges have 3 or more connecting faces. "
4559  "This method is slower"},
4560  {0, NULL, 0, NULL, NULL},
4561  };
4562 
4563  static const EnumPropertyItem nonmanifold_thickness_mode_items[] = {
4565  "FIXED",
4566  0,
4567  "Fixed",
4568  "Most basic thickness calculation"},
4570  "EVEN",
4571  0,
4572  "Even",
4573  "Even thickness calculation which takes the angle between faces into account"},
4575  "CONSTRAINTS",
4576  0,
4577  "Constraints",
4578  "Thickness calculation using constraints, most advanced"},
4579  {0, NULL, 0, NULL, NULL},
4580  };
4581 
4582  static const EnumPropertyItem nonmanifold_boundary_mode_items[] = {
4583  {MOD_SOLIDIFY_NONMANIFOLD_BOUNDARY_MODE_NONE, "NONE", 0, "None", "No shape correction"},
4585  "ROUND",
4586  0,
4587  "Round",
4588  "Round open perimeter shape"},
4590  "FLAT",
4591  0,
4592  "Flat",
4593  "Flat open perimeter shape"},
4594  {0, NULL, 0, NULL, NULL},
4595  };
4596 
4597  StructRNA *srna;
4598  PropertyRNA *prop;
4599 
4600  srna = RNA_def_struct(brna, "SolidifyModifier", "Modifier");
4602  srna, "Solidify Modifier", "Create a solid skin, compensating for sharp angles");
4603  RNA_def_struct_sdna(srna, "SolidifyModifierData");
4604  RNA_def_struct_ui_icon(srna, ICON_MOD_SOLIDIFY);
4605 
4607 
4608  prop = RNA_def_property(srna, "solidify_mode", PROP_ENUM, PROP_NONE);
4609  RNA_def_property_enum_sdna(prop, NULL, "mode");
4611  RNA_def_property_ui_text(prop, "Mode", "Selects the used algorithm");
4612  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4613 
4614  prop = RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_DISTANCE);
4615  RNA_def_property_float_sdna(prop, NULL, "offset");
4616  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
4617  RNA_def_property_ui_range(prop, -10, 10, 0.1, 4);
4618  RNA_def_property_ui_text(prop, "Thickness", "Thickness of the shell");
4619  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4620 
4621  prop = RNA_def_property(srna, "thickness_clamp", PROP_FLOAT, PROP_FACTOR);
4622  RNA_def_property_float_sdna(prop, NULL, "offset_clamp");
4623  RNA_def_property_range(prop, 0, 100.0);
4624  RNA_def_property_ui_range(prop, 0, 2.0, 0.1, 4);
4625  RNA_def_property_ui_text(prop, "Clamp", "Offset clamp based on geometry scale");
4626  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4627 
4628  prop = RNA_def_property(srna, "use_thickness_angle_clamp", PROP_BOOLEAN, PROP_NONE);
4630  RNA_def_property_ui_text(prop, "Angle Clamp", "Clamp thickness based on angles");
4631  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4632 
4633  prop = RNA_def_property(srna, "thickness_vertex_group", PROP_FLOAT, PROP_FACTOR);
4634  RNA_def_property_float_sdna(prop, NULL, "offset_fac_vg");
4635  RNA_def_property_range(prop, 0.0, 1.0);
4636  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
4638  prop, "Vertex Group Factor", "Thickness factor to use for zero vertex group influence");
4639  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4640 
4641  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_FACTOR);
4642  RNA_def_property_float_sdna(prop, NULL, "offset_fac");
4643  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
4644  RNA_def_property_ui_range(prop, -1, 1, 0.1, 4);
4645  RNA_def_property_ui_text(prop, "Offset", "Offset the thickness from the center");
4646  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4647 
4648  prop = RNA_def_property(srna, "edge_crease_inner", PROP_FLOAT, PROP_FACTOR);
4649  RNA_def_property_float_sdna(prop, NULL, "crease_inner");
4650  RNA_def_property_range(prop, 0, 1);
4651  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
4652  RNA_def_property_ui_text(prop, "Inner Crease", "Assign a crease to inner edges");
4653  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4654 
4655  prop = RNA_def_property(srna, "edge_crease_outer", PROP_FLOAT, PROP_FACTOR);
4656  RNA_def_property_float_sdna(prop, NULL, "crease_outer");
4657  RNA_def_property_range(prop, 0, 1);
4658  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
4659  RNA_def_property_ui_text(prop, "Outer Crease", "Assign a crease to outer edges");
4660  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4661 
4662  prop = RNA_def_property(srna, "edge_crease_rim", PROP_FLOAT, PROP_FACTOR);
4663  RNA_def_property_float_sdna(prop, NULL, "crease_rim");
4664  RNA_def_property_range(prop, 0, 1);
4665  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
4666  RNA_def_property_ui_text(prop, "Rim Crease", "Assign a crease to the edges making up the rim");
4667  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4668 
4669  prop = RNA_def_property(srna, "material_offset", PROP_INT, PROP_NONE);
4670  RNA_def_property_int_sdna(prop, NULL, "mat_ofs");
4671  RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX);
4672  RNA_def_property_ui_text(prop, "Material Offset", "Offset material index of generated faces");
4673  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4674 
4675  prop = RNA_def_property(srna, "material_offset_rim", PROP_INT, PROP_NONE);
4676  RNA_def_property_int_sdna(prop, NULL, "mat_ofs_rim");
4677  RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX);
4679  prop, "Rim Material Offset", "Offset material index of generated rim faces");
4680  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4681 
4682  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
4683  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
4684  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
4685  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SolidifyModifier_defgrp_name_set");
4686  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4687 
4688  prop = RNA_def_property(srna, "shell_vertex_group", PROP_STRING, PROP_NONE);
4689  RNA_def_property_string_sdna(prop, NULL, "shell_defgrp_name");
4691  "Shell Vertex Group",
4692  "Vertex group that the generated shell geometry will be weighted to");
4693  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SolidifyModifier_shell_defgrp_name_set");
4694  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4695 
4696  prop = RNA_def_property(srna, "rim_vertex_group", PROP_STRING, PROP_NONE);
4697  RNA_def_property_string_sdna(prop, NULL, "rim_defgrp_name");
4699  "Rim Vertex Group",
4700  "Vertex group that the generated rim geometry will be weighted to");
4701  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SolidifyModifier_rim_defgrp_name_set");
4702  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4703 
4704  prop = RNA_def_property(srna, "use_rim", PROP_BOOLEAN, PROP_NONE);
4707  "Fill Rim",
4708  "Create edge loops between the inner and outer surfaces on face edges "
4709  "(slow, disable when not needed)");
4710  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4711 
4712  prop = RNA_def_property(srna, "use_even_offset", PROP_BOOLEAN, PROP_NONE);
4715  prop,
4716  "Even Thickness",
4717  "Maintain thickness by adjusting for sharp corners (slow, disable when not needed)");
4718  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4719 
4720  prop = RNA_def_property(srna, "use_quality_normals", PROP_BOOLEAN, PROP_NONE);
4723  prop,
4724  "High Quality Normals",
4725  "Calculate normals which result in more even thickness (slow, disable when not needed)");
4726  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4727 
4728  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
4730  RNA_def_property_ui_text(prop, "Vertex Group Invert", "Invert the vertex group influence");
4731  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4732 
4733  prop = RNA_def_property(srna, "use_flat_faces", PROP_BOOLEAN, PROP_NONE);
4736  "Flat Faces",
4737  "Make faces use the minimal vertex weight assigned to their vertices"
4738  "(ensures new faces remain parallel to their original ones, slow, "
4739  "disable when not needed)");
4740  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4741 
4742  prop = RNA_def_property(srna, "use_flip_normals", PROP_BOOLEAN, PROP_NONE);
4744  RNA_def_property_ui_text(prop, "Flip Normals", "Invert the face direction");
4745  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4746 
4747  prop = RNA_def_property(srna, "use_rim_only", PROP_BOOLEAN, PROP_NONE);
4749  RNA_def_property_ui_text(prop, "Only Rim", "Only add the rim to the original data");
4750  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4751 
4752  /* Settings for #MOD_SOLIDIFY_MODE_NONMANIFOLD */
4753  prop = RNA_def_property(srna, "nonmanifold_thickness_mode", PROP_ENUM, PROP_NONE);
4754  RNA_def_property_enum_sdna(prop, NULL, "nonmanifold_offset_mode");
4755  RNA_def_property_enum_items(prop, nonmanifold_thickness_mode_items);
4756  RNA_def_property_ui_text(prop, "Thickness Mode", "Selects the used thickness algorithm");
4757  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4758 
4759  prop = RNA_def_property(srna, "nonmanifold_boundary_mode", PROP_ENUM, PROP_NONE);
4760  RNA_def_property_enum_items(prop, nonmanifold_boundary_mode_items);
4761  RNA_def_property_ui_text(prop, "Boundary Shape", "Selects the boundary adjustment algorithm");
4762  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4763 
4764  prop = RNA_def_property(srna, "nonmanifold_merge_threshold", PROP_FLOAT, PROP_DISTANCE);
4765  RNA_def_property_float_sdna(prop, NULL, "merge_tolerance");
4766  RNA_def_property_range(prop, 0.0, 1.0);
4767  RNA_def_property_ui_range(prop, 0.0, 1.0, 0.01, 4);
4769  prop, "Merge Threshold", "Distance within which degenerated geometry is merged");
4770  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4771 
4772  prop = RNA_def_property(srna, "bevel_convex", PROP_FLOAT, PROP_NONE);
4773  RNA_def_property_float_sdna(prop, NULL, "bevel_convex");
4774  RNA_def_property_range(prop, -1.0, 1.0);
4775  RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3);
4776  RNA_def_property_ui_text(prop, "Bevel Convex", "Edge bevel weight to be added to outside edges");
4777  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4778 
4780 }
4781 
4783 {
4784  StructRNA *srna;
4785  PropertyRNA *prop;
4786 
4787  srna = RNA_def_struct(brna, "ScrewModifier", "Modifier");
4788  RNA_def_struct_ui_text(srna, "Screw Modifier", "Revolve edges");
4789  RNA_def_struct_sdna(srna, "ScrewModifierData");
4790  RNA_def_struct_ui_icon(srna, ICON_MOD_SCREW);
4791 
4793 
4794  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
4795  RNA_def_property_pointer_sdna(prop, NULL, "ob_axis");
4796  RNA_def_property_ui_text(prop, "Object", "Object to define the screw axis");
4798  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4799 
4800  prop = RNA_def_property(srna, "steps", PROP_INT, PROP_UNSIGNED);
4801  RNA_def_property_range(prop, 1, 10000);
4802  RNA_def_property_ui_range(prop, 1, 512, 1, -1);
4803  RNA_def_property_ui_text(prop, "Steps", "Number of steps in the revolution");
4804  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4805 
4806  prop = RNA_def_property(srna, "render_steps", PROP_INT, PROP_UNSIGNED);
4807  RNA_def_property_range(prop, 1, 10000);
4808  RNA_def_property_ui_range(prop, 1, 512, 1, -1);
4809  RNA_def_property_ui_text(prop, "Render Steps", "Number of steps in the revolution");
4810  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4811 
4812  prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_UNSIGNED);
4813  RNA_def_property_int_sdna(prop, NULL, "iter");
4814  RNA_def_property_range(prop, 1, 10000);
4815  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
4816  RNA_def_property_ui_text(prop, "Iterations", "Number of times to apply the screw operation");
4817  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4818 
4819  prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
4821  RNA_def_property_ui_text(prop, "Axis", "Screw axis");
4822  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4823 
4824  prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
4825  RNA_def_property_ui_range(prop, -M_PI * 2, M_PI * 2, 10, -1);
4826  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
4827  RNA_def_property_ui_text(prop, "Angle", "Angle of revolution");
4828  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4829 
4830  prop = RNA_def_property(srna, "screw_offset", PROP_FLOAT, PROP_DISTANCE);
4831  RNA_def_property_float_sdna(prop, NULL, "screw_ofs");
4832  RNA_def_property_ui_text(prop, "Screw", "Offset the revolution along its axis");
4833  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4834 
4835  prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
4836  RNA_def_property_float_sdna(prop, NULL, "merge_dist");
4837  RNA_def_property_range(prop, 0, FLT_MAX);
4838  RNA_def_property_ui_range(prop, 0, 1, 1, 4);
4839  RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices");
4840  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4841 
4842  prop = RNA_def_property(srna, "use_normal_flip", PROP_BOOLEAN, PROP_NONE);
4844  RNA_def_property_ui_text(prop, "Flip", "Flip normals of lathed faces");
4845  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4846 
4847  prop = RNA_def_property(srna, "use_normal_calculate", PROP_BOOLEAN, PROP_NONE);
4850  prop, "Calculate Order", "Calculate the order of edges (needed for meshes, but not curves)");
4851  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4852 
4853  prop = RNA_def_property(srna, "use_object_screw_offset", PROP_BOOLEAN, PROP_NONE);
4856  prop, "Object Screw", "Use the distance between the objects to make a screw");
4857  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4858 
4859  /* Vertex merging parameters */
4860  prop = RNA_def_property(srna, "use_merge_vertices", PROP_BOOLEAN, PROP_NONE);
4863  prop, "Merge Vertices", "Merge adjacent vertices (screw offset must be zero)");
4864  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4865 
4866  prop = RNA_def_property(srna, "use_smooth_shade", PROP_BOOLEAN, PROP_NONE);
4869  prop, "Smooth Shading", "Output faces with smooth shading rather than flat shaded");
4870  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4871 
4872  prop = RNA_def_property(srna, "use_stretch_u", PROP_BOOLEAN, PROP_NONE);
4875  prop, "Stretch U", "Stretch the U coordinates between 0 and 1 when UV's are present");
4876  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4877 
4878  prop = RNA_def_property(srna, "use_stretch_v", PROP_BOOLEAN, PROP_NONE);
4881  prop, "Stretch V", "Stretch the V coordinates between 0 and 1 when UV's are present");
4882  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4883 
4884 # if 0
4885  prop = RNA_def_property(srna, "use_angle_object", PROP_BOOLEAN, PROP_NONE);
4886  RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_OBJECT_ANGLE);
4888  prop, "Object Angle", "Use the angle between the objects rather than the fixed angle");
4889  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4890 # endif
4891 
4893 }
4894 
4896 {
4897  StructRNA *srna;
4898  PropertyRNA *prop;
4899 
4900  srna = RNA_def_struct(brna, "UVWarpModifier", "Modifier");
4901  RNA_def_struct_ui_text(srna, "UVWarp Modifier", "Add target position to uv coordinates");
4902  RNA_def_struct_sdna(srna, "UVWarpModifierData");
4903  RNA_def_struct_ui_icon(srna, ICON_MOD_UVPROJECT);
4904 
4906 
4907  prop = RNA_def_property(srna, "axis_u", PROP_ENUM, PROP_NONE);
4908  RNA_def_property_enum_sdna(prop, NULL, "axis_u");
4910  RNA_def_property_ui_text(prop, "U-Axis", "Pole axis for rotation");
4911  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4912 
4913  prop = RNA_def_property(srna, "axis_v", PROP_ENUM, PROP_NONE);
4914  RNA_def_property_enum_sdna(prop, NULL, "axis_v");
4916  RNA_def_property_ui_text(prop, "V-Axis", "Pole axis for rotation");
4917  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4918 
4919  prop = RNA_def_property(srna, "center", PROP_FLOAT, PROP_NONE);
4920  RNA_def_property_float_sdna(prop, NULL, "center");
4921  RNA_def_property_ui_text(prop, "UV Center", "Center point for rotate/scale");
4922  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4923 
4924  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
4925  RNA_def_property_float_sdna(prop, NULL, "offset");
4926  RNA_def_property_ui_text(prop, "Offset", "2D Offset for the warp");
4927  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4928 
4929  prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
4930  RNA_def_property_float_sdna(prop, NULL, "scale");
4931  RNA_def_property_ui_text(prop, "Scale", "2D Scale for the warp");
4932  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4933 
4934  prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE);
4935  RNA_def_property_float_sdna(prop, NULL, "rotation");
4936  RNA_def_property_ui_text(prop, "Rotation", "2D Rotation for the warp");
4937  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4938 
4939  prop = RNA_def_property(srna, "object_from", PROP_POINTER, PROP_NONE);
4940  RNA_def_property_pointer_sdna(prop, NULL, "object_src");
4941  RNA_def_property_ui_text(prop, "Object From", "Object defining offset");
4943  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4944 
4945  prop = RNA_def_property(srna, "bone_from", PROP_STRING, PROP_NONE);
4946  RNA_def_property_string_sdna(prop, NULL, "bone_src");
4947  RNA_def_property_ui_text(prop, "Bone From", "Bone defining offset");
4948  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4949 
4950  prop = RNA_def_property(srna, "object_to", PROP_POINTER, PROP_NONE);
4951  RNA_def_property_pointer_sdna(prop, NULL, "object_dst");
4952  RNA_def_property_ui_text(prop, "Object To", "Object defining offset");
4954  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4955 
4956  prop = RNA_def_property(srna, "bone_to", PROP_STRING, PROP_NONE);
4957  RNA_def_property_string_sdna(prop, NULL, "bone_dst");
4958  RNA_def_property_ui_text(prop, "Bone To", "Bone defining offset");
4959  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
4960 
4961  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
4962  RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
4963  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
4964  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVWarpModifier_vgroup_name_set");
4965  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4966 
4967  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
4969  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
4970  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4971 
4972  prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
4973  RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
4974  RNA_def_property_ui_text(prop, "UV Layer", "UV Layer name");
4975  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVWarpModifier_uvlayer_name_set");
4976  RNA_def_property_update(prop, 0, "rna_Modifier_update");
4977 
4979 }
4980 
4982  StructRNA *srna,
4983  const char *mask_flags,
4984  const int invert_vgroup_mask_flag,
4985  const char *mask_vgroup_setter,
4986  const char *mask_uvlayer_setter)
4987 {
4988  static const EnumPropertyItem weightvg_mask_tex_map_items[] = {
4989  {MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Local", "Use local generated coordinates"},
4990  {MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", "Use global coordinates"},
4992  "OBJECT",
4993  0,
4994  "Object",
4995  "Use local generated coordinates of another object"},
4996  {MOD_DISP_MAP_UV, "UV", 0, "UV", "Use coordinates from a UV layer"},
4997  {0, NULL, 0, NULL, NULL},
4998  };
4999 
5000  static const EnumPropertyItem weightvg_mask_tex_used_items[] = {
5001  {MOD_WVG_MASK_TEX_USE_INT, "INT", 0, "Intensity", ""},
5002  {MOD_WVG_MASK_TEX_USE_RED, "RED", 0, "Red", ""},
5003  {MOD_WVG_MASK_TEX_USE_GREEN, "GREEN", 0, "Green", ""},
5004  {MOD_WVG_MASK_TEX_USE_BLUE, "BLUE", 0, "Blue", ""},
5005  {MOD_WVG_MASK_TEX_USE_HUE, "HUE", 0, "Hue", ""},
5006  {MOD_WVG_MASK_TEX_USE_SAT, "SAT", 0, "Saturation", ""},
5007  {MOD_WVG_MASK_TEX_USE_VAL, "VAL", 0, "Value", ""},
5008  {MOD_WVG_MASK_TEX_USE_ALPHA, "ALPHA", 0, "Alpha", ""},
5009  {0, NULL, 0, NULL, NULL},
5010  };
5011 
5012  PropertyRNA *prop;
5013 
5015 
5016  prop = RNA_def_property(srna, "mask_constant", PROP_FLOAT, PROP_FACTOR);
5017  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
5018  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
5020  prop, "Influence", "Global influence of current modifications on vgroup");
5021  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5022 
5023  prop = RNA_def_property(srna, "mask_vertex_group", PROP_STRING, PROP_NONE);
5024  RNA_def_property_string_sdna(prop, NULL, "mask_defgrp_name");
5025  RNA_def_property_ui_text(prop, "Mask Vertex Group", "Masking vertex group name");
5026  RNA_def_property_string_funcs(prop, NULL, NULL, mask_vgroup_setter);
5027  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5028 
5029  prop = RNA_def_property(srna, "invert_mask_vertex_group", PROP_BOOLEAN, PROP_NONE);
5030  RNA_def_property_boolean_sdna(prop, NULL, mask_flags, invert_vgroup_mask_flag);
5031  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group mask influence");
5032  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5033 
5034  prop = RNA_def_property(srna, "mask_texture", PROP_POINTER, PROP_NONE);
5035  RNA_def_property_ui_text(prop, "Masking Tex", "Masking texture");
5037  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
5038 
5039  prop = RNA_def_property(srna, "mask_tex_use_channel", PROP_ENUM, PROP_NONE);
5040  RNA_def_property_enum_items(prop, weightvg_mask_tex_used_items);
5041  RNA_def_property_ui_text(prop, "Use Channel", "Which texture channel to use for masking");
5042  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5043 
5044  prop = RNA_def_property(srna, "mask_tex_mapping", PROP_ENUM, PROP_NONE);
5045  RNA_def_property_enum_items(prop, weightvg_mask_tex_map_items);
5047  "Texture Coordinates",
5048  "Which texture coordinates "
5049  "to use for mapping");
5050  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
5051 
5052  prop = RNA_def_property(srna, "mask_tex_uv_layer", PROP_STRING, PROP_NONE);
5053  RNA_def_property_string_sdna(prop, NULL, "mask_tex_uvlayer_name");
5054  RNA_def_property_ui_text(prop, "UV Map", "UV map name");
5055  RNA_def_property_string_funcs(prop, NULL, NULL, mask_uvlayer_setter);
5056  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5057 
5058  prop = RNA_def_property(srna, "mask_tex_map_object", PROP_POINTER, PROP_NONE);
5059  RNA_def_property_pointer_sdna(prop, NULL, "mask_tex_map_obj");
5061  "Texture Coordinate Object",
5062  "Which object to take texture "
5063  "coordinates from");
5065  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
5066 
5067  prop = RNA_def_property(srna, "mask_tex_map_bone", PROP_STRING, PROP_NONE);
5068  RNA_def_property_string_sdna(prop, NULL, "mask_tex_map_bone");
5070  prop, "Texture Coordinate Bone", "Which bone to take texture coordinates from");
5071  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
5072 
5074 }
5075 
5077 {
5078  static const EnumPropertyItem weightvg_edit_falloff_type_items[] = {
5079  {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", "Null action"},
5080  {MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""},
5081  {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
5082  {MOD_WVG_MAPPING_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
5083  {MOD_WVG_MAPPING_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
5084  {MOD_WVG_MAPPING_SPHERE, "ICON_SPHERECURVE", ICON_SPHERECURVE, "Sphere", ""},
5085  {MOD_WVG_MAPPING_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", ""},
5087  "STEP",
5088  ICON_IPO_CONSTANT,
5089  "Median Step",
5090  "Map all values below 0.5 to 0.0, and all others to 1.0"},
5091  {0, NULL, 0, NULL, NULL},
5092  };
5093 
5094  StructRNA *srna;
5095  PropertyRNA *prop;
5096 
5097  srna = RNA_def_struct(brna, "VertexWeightEditModifier", "Modifier");
5099  srna, "WeightVG Edit Modifier", "Edit the weights of vertices in a group");
5100  RNA_def_struct_sdna(srna, "WeightVGEditModifierData");
5101  RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
5102 
5104 
5105  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
5106  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
5107  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
5108  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGEditModifier_defgrp_name_set");
5109  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5110 
5111  prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
5112  RNA_def_property_enum_items(prop, weightvg_edit_falloff_type_items);
5113  RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values");
5115  BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */
5116  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5117 
5118  prop = RNA_def_property(srna, "invert_falloff", PROP_BOOLEAN, PROP_NONE);
5120  RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight");
5121  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5122 
5123  prop = RNA_def_property(srna, "normalize", PROP_BOOLEAN, PROP_NONE);
5126  prop,
5127  "Normalize Weights",
5128  "Normalize the resulting weights (otherwise they are only clamped within 0.0 to 1.0 range)");
5129  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5130 
5131  prop = RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE);
5132  RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve");
5133  RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve");
5134  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5135 
5136  prop = RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE);
5139  "Group Add",
5140  "Add vertices with weight over threshold "
5141  "to vgroup");
5142  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5143 
5144  prop = RNA_def_property(srna, "use_remove", PROP_BOOLEAN, PROP_NONE);
5147  "Group Remove",
5148  "Remove vertices with weight below threshold "
5149  "from vgroup");
5150  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5151 
5152  prop = RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_FACTOR);
5153  RNA_def_property_range(prop, 0.0, 1.0f);
5154  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
5156  "Default Weight",
5157  "Default weight a vertex will have if "
5158  "it is not in the vgroup");
5159  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5160 
5161  prop = RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE);
5162  RNA_def_property_float_sdna(prop, NULL, "add_threshold");
5163  RNA_def_property_range(prop, 0.0, 1.0);
5164  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
5166  "Add Threshold",
5167  "Lower bound for a vertex's weight "
5168  "to be added to the vgroup");
5169  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5170 
5171  prop = RNA_def_property(srna, "remove_threshold", PROP_FLOAT, PROP_NONE);
5172  RNA_def_property_float_sdna(prop, NULL, "rem_threshold");
5173  RNA_def_property_range(prop, 0.0, 1.0);
5174  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
5176  "Remove Threshold",
5177  "Upper bound for a vertex's weight "
5178  "to be removed from the vgroup");
5179  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5180 
5182 
5183  /* Common masking properties. */
5185  srna,
5186  "edit_flags",
5188  "rna_WeightVGEditModifier_mask_defgrp_name_set",
5189  "rna_WeightVGEditModifier_mask_tex_uvlayer_name_set");
5190 }
5191 
5193 {
5194  static const EnumPropertyItem weightvg_mix_modes_items[] = {
5195  {MOD_WVG_MIX_SET, "SET", 0, "Replace", "Replace VGroup A's weights by VGroup B's ones"},
5196  {MOD_WVG_MIX_ADD, "ADD", 0, "Add", "Add VGroup B's weights to VGroup A's ones"},
5197  {MOD_WVG_MIX_SUB, "SUB", 0, "Subtract", "Subtract VGroup B's weights from VGroup A's ones"},
5198  {MOD_WVG_MIX_MUL, "MUL", 0, "Multiply", "Multiply VGroup A's weights by VGroup B's ones"},
5199  {MOD_WVG_MIX_DIV, "DIV", 0, "Divide", "Divide VGroup A's weights by VGroup B's ones"},
5200  {MOD_WVG_MIX_DIF,
5201  "DIF",
5202  0,
5203  "Difference",
5204  "Difference between VGroup A's and VGroup B's weights"},
5205  {MOD_WVG_MIX_AVG, "AVG", 0, "Average", "Average value of VGroup A's and VGroup B's weights"},
5206  {MOD_WVG_MIX_MIN, "MIN", 0, "Minimum", "Minimum of VGroup A's and VGroup B's weights"},
5207  {MOD_WVG_MIX_MAX, "MAX", 0, "Maximum", "Maximum of VGroup A's and VGroup B's weights"},
5208  {0, NULL, 0, NULL, NULL},
5209  };
5210 
5211  static const EnumPropertyItem weightvg_mix_set_items[] = {
5212  {MOD_WVG_SET_ALL, "ALL", 0, "All", "Affect all vertices (might add some to VGroup A)"},
5213  {MOD_WVG_SET_A, "A", 0, "VGroup A", "Affect vertices in VGroup A"},
5214  {MOD_WVG_SET_B,
5215  "B",
5216  0,
5217  "VGroup B",
5218  "Affect vertices in VGroup B (might add some to VGroup A)"},
5219  {MOD_WVG_SET_OR,
5220  "OR",
5221  0,
5222  "VGroup A or B",
5223  "Affect vertices in at least one of both VGroups (might add some to VGroup A)"},
5224  {MOD_WVG_SET_AND, "AND", 0, "VGroup A and B", "Affect vertices in both groups"},
5225  {0, NULL, 0, NULL, NULL},
5226  };
5227 
5228  StructRNA *srna;
5229  PropertyRNA *prop;
5230 
5231  srna = RNA_def_struct(brna, "VertexWeightMixModifier", "Modifier");
5232  RNA_def_struct_ui_text(srna, "WeightVG Mix Modifier", "Mix the weights of two vertex groups");
5233  RNA_def_struct_sdna(srna, "WeightVGMixModifierData");
5234  RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
5235 
5237 
5238  prop = RNA_def_property(srna, "vertex_group_a", PROP_STRING, PROP_NONE);
5239  RNA_def_property_string_sdna(prop, NULL, "defgrp_name_a");
5240  RNA_def_property_ui_text(prop, "Vertex Group A", "First vertex group name");
5241  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGMixModifier_defgrp_name_a_set");
5242  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5243 
5244  prop = RNA_def_property(srna, "vertex_group_b", PROP_STRING, PROP_NONE);
5245  RNA_def_property_string_sdna(prop, NULL, "defgrp_name_b");
5246  RNA_def_property_ui_text(prop, "Vertex Group B", "Second vertex group name");
5247  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGMixModifier_defgrp_name_b_set");
5248  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5249 
5250  prop = RNA_def_property(srna, "invert_vertex_group_a", PROP_BOOLEAN, PROP_NONE);
5252  RNA_def_property_ui_text(prop, "Invert Weights A", "Invert the influence of vertex group A");
5253  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5254 
5255  prop = RNA_def_property(srna, "invert_vertex_group_b", PROP_BOOLEAN, PROP_NONE);
5257  RNA_def_property_ui_text(prop, "Invert Weights B", "Invert the influence of vertex group B");
5258  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5259 
5260  prop = RNA_def_property(srna, "default_weight_a", PROP_FLOAT, PROP_FACTOR);
5261  RNA_def_property_range(prop, 0.0, 1.0f);
5262  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
5264  "Default Weight A",
5265  "Default weight a vertex will have if "
5266  "it is not in the first A vgroup");
5267  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5268 
5269  prop = RNA_def_property(srna, "default_weight_b", PROP_FLOAT, PROP_FACTOR);
5270  RNA_def_property_range(prop, 0.0, 1.0f);
5271  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
5273  "Default Weight B",
5274  "Default weight a vertex will have if "
5275  "it is not in the second B vgroup");
5276  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5277 
5278  prop = RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE);
5279  RNA_def_property_enum_items(prop, weightvg_mix_modes_items);
5281  "Mix Mode",
5282  "How weights from vgroup B affect weights "
5283  "of vgroup A");
5284  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5285 
5286  prop = RNA_def_property(srna, "mix_set", PROP_ENUM, PROP_NONE);
5287  RNA_def_property_enum_items(prop, weightvg_mix_set_items);
5288  RNA_def_property_ui_text(prop, "Vertex Set", "Which vertices should be affected");
5289  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5290 
5291  prop = RNA_def_property(srna, "normalize", PROP_BOOLEAN, PROP_NONE);
5294  prop,
5295  "Normalize Weights",
5296  "Normalize the resulting weights (otherwise they are only clamped within 0.0 to 1.0 range)");
5297  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5298 
5300 
5301  /* Common masking properties. */
5303  srna,
5304  "flag",
5306  "rna_WeightVGMixModifier_mask_defgrp_name_set",
5307  "rna_WeightVGMixModifier_mask_tex_uvlayer_name_set");
5308 }
5309 
5311 {
5312  static const EnumPropertyItem weightvg_proximity_modes_items[] = {
5314  "OBJECT",
5315  0,
5316  "Object",
5317  "Use distance between affected and target objects"},
5319  "GEOMETRY",
5320  0,
5321  "Geometry",
5322  "Use distance between affected object's vertices and target "
5323  "object, or target object's geometry"},
5324  {0, NULL, 0, NULL, NULL},
5325  };
5326 
5327  static const EnumPropertyItem proximity_geometry_items[] = {
5328  {MOD_WVG_PROXIMITY_GEOM_VERTS, "VERTEX", 0, "Vertex", "Compute distance to nearest vertex"},
5329  {MOD_WVG_PROXIMITY_GEOM_EDGES, "EDGE", 0, "Edge", "Compute distance to nearest edge"},
5330  {MOD_WVG_PROXIMITY_GEOM_FACES, "FACE", 0, "Face", "Compute distance to nearest face"},
5331  {0, NULL, 0, NULL, NULL},
5332  };
5333 
5334  static const EnumPropertyItem weightvg_proximity_falloff_type_items[] = {
5335  {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", "Null action"},
5336  {MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""},
5337  {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
5338  {MOD_WVG_MAPPING_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
5339  {MOD_WVG_MAPPING_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
5340  {MOD_WVG_MAPPING_SPHERE, "ICON_SPHERECURVE", ICON_SPHERECURVE, "Sphere", ""},
5341  {MOD_WVG_MAPPING_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", ""},
5343  "STEP",
5344  ICON_IPO_CONSTANT,
5345  "Median Step",
5346  "Map all values below 0.5 to 0.0, and all others to 1.0"},
5347  {0, NULL, 0, NULL, NULL},
5348  };
5349 
5350  StructRNA *srna;
5351  PropertyRNA *prop;
5352 
5353  srna = RNA_def_struct(brna, "VertexWeightProximityModifier", "Modifier");
5355  "WeightVG Proximity Modifier",
5356  "Set the weights of vertices in a group from a target object's "
5357  "distance");
5358  RNA_def_struct_sdna(srna, "WeightVGProximityModifierData");
5359  RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
5360 
5362 
5363  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
5364  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
5365  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
5366  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGProximityModifier_defgrp_name_set");
5367  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5368 
5369  prop = RNA_def_property(srna, "proximity_mode", PROP_ENUM, PROP_NONE);
5370  RNA_def_property_enum_items(prop, weightvg_proximity_modes_items);
5372  RNA_def_property_ui_text(prop, "Proximity Mode", "Which distances to target object to use");
5373  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5374 
5375  prop = RNA_def_property(srna, "proximity_geometry", PROP_ENUM, PROP_NONE);
5376  RNA_def_property_enum_sdna(prop, NULL, "proximity_flags");
5377  RNA_def_property_enum_items(prop, proximity_geometry_items);
5378  RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */
5381  "Proximity Geometry",
5382  "Use the shortest computed distance to target object's geometry "
5383  "as weight");
5384  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5385 
5386  prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
5387  RNA_def_property_pointer_sdna(prop, NULL, "proximity_ob_target");
5388  RNA_def_property_ui_text(prop, "Target Object", "Object to calculate vertices distances from");
5390  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
5391 
5392  prop = RNA_def_property(srna, "min_dist", PROP_FLOAT, PROP_DISTANCE);
5393  RNA_def_property_range(prop, 0.0, FLT_MAX);
5394  RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, -1);
5395  RNA_def_property_ui_text(prop, "Lowest", "Distance mapping to weight 0.0");
5396  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5397 
5398  prop = RNA_def_property(srna, "max_dist", PROP_FLOAT, PROP_DISTANCE);
5399  RNA_def_property_range(prop, 0.0, FLT_MAX);
5400  RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, -1);
5401  RNA_def_property_ui_text(prop, "Highest", "Distance mapping to weight 1.0");
5402  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5403 
5404  prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
5405  RNA_def_property_enum_items(prop, weightvg_proximity_falloff_type_items);
5406  RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values");
5408  BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */
5409  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5410 
5411  prop = RNA_def_property(srna, "invert_falloff", PROP_BOOLEAN, PROP_NONE);
5413  RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight");
5414  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5415 
5416  prop = RNA_def_property(srna, "normalize", PROP_BOOLEAN, PROP_NONE);
5418  prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_WEIGHTS_NORMALIZE);
5420  prop,
5421  "Normalize Weights",
5422  "Normalize the resulting weights (otherwise they are only clamped within 0.0 to 1.0 range)");
5423  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5424 
5425  prop = RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE);
5426  RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve");
5427  RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve");
5428  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5429 
5431 
5432  /* Common masking properties. */
5434  srna,
5435  "proximity_flags",
5437  "rna_WeightVGProximityModifier_mask_defgrp_name_set",
5438  "rna_WeightVGProximityModifier_mask_tex_uvlayer_name_set");
5439 }
5440 
5442 {
5443  static const EnumPropertyItem mode_items[] = {
5444  {MOD_REMESH_CENTROID, "BLOCKS", 0, "Blocks", "Output a blocky surface with no smoothing"},
5446  "SMOOTH",
5447  0,
5448  "Smooth",
5449  "Output a smooth surface with no sharp-features detection"},
5451  "SHARP",
5452  0,
5453  "Sharp",
5454  "Output a surface that reproduces sharp edges and corners from the input mesh"},
5456  "VOXEL",
5457  0,
5458  "Voxel",
5459  "Output a mesh corresponding to the volume of the original mesh"},
5460  {0, NULL, 0, NULL, NULL},
5461  };
5462 
5463  StructRNA *srna;
5464  PropertyRNA *prop;
5465 
5466  srna = RNA_def_struct(brna, "RemeshModifier", "Modifier");
5468  srna,
5469  "Remesh Modifier",
5470  "Generate a new surface with regular topology that follows the shape of the input mesh");
5471  RNA_def_struct_sdna(srna, "RemeshModifierData");
5472  RNA_def_struct_ui_icon(srna, ICON_MOD_REMESH);
5473 
5475 
5476  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
5478  RNA_def_property_ui_text(prop, "Mode", "");
5479  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5480 
5481  prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
5482  RNA_def_property_ui_range(prop, 0, 0.99, 0.01, 3);
5483  RNA_def_property_range(prop, 0, 0.99);
5485  prop, "Scale", "The ratio of the largest dimension of the model over the size of the grid");
5486  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5487 
5488  prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
5489  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
5490  RNA_def_property_range(prop, 0, 1);
5492  prop,
5493  "Threshold",
5494  "If removing disconnected pieces, minimum size of components to preserve as a ratio "
5495  "of the number of polygons in the largest component");
5496  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5497 
5498  prop = RNA_def_property(srna, "octree_depth", PROP_INT, PROP_NONE);
5499  RNA_def_property_int_sdna(prop, NULL, "depth");
5500  RNA_def_property_range(prop, 1, 24);
5501  RNA_def_property_ui_range(prop, 1, 12, 1, 3);
5503  prop, "Octree Depth", "Resolution of the octree; higher values give finer details");
5504  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5505 
5506  prop = RNA_def_property(srna, "sharpness", PROP_FLOAT, PROP_NONE);
5507  RNA_def_property_float_sdna(prop, NULL, "hermite_num");
5508  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
5510  prop,
5511  "Sharpness",
5512  "Tolerance for outliers; lower values filter noise while higher values will reproduce "
5513  "edges closer to the input");
5514  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5515 
5516  prop = RNA_def_property(srna, "voxel_size", PROP_FLOAT, PROP_DISTANCE);
5517  RNA_def_property_float_sdna(prop, NULL, "voxel_size");
5518  RNA_def_property_range(prop, 0.0001f, FLT_MAX);
5519  RNA_def_property_ui_range(prop, 0.0001, 2, 0.1, 3);
5522  "Voxel Size",
5523  "Size of the voxel in object space used for volume evaluation. Lower "
5524  "values preserve finer details");
5525  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5526 
5527  prop = RNA_def_property(srna, "adaptivity", PROP_FLOAT, PROP_DISTANCE);
5528  RNA_def_property_float_sdna(prop, NULL, "adaptivity");
5529  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
5531  prop,
5532  "Adaptivity",
5533  "Reduces the final face count by simplifying geometry where detail is not needed, "
5534  "generating triangles. A value greater than 0 disables Fix Poles");
5535  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5536 
5537  prop = RNA_def_property(srna, "use_remove_disconnected", PROP_BOOLEAN, PROP_NONE);
5539  RNA_def_property_ui_text(prop, "Remove Disconnected", "");
5540  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5541 
5542  prop = RNA_def_property(srna, "use_smooth_shade", PROP_BOOLEAN, PROP_NONE);
5545  prop, "Smooth Shading", "Output faces with smooth shading rather than flat shaded");
5546  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5547 
5549 }
5550 
5552 {
5553  StructRNA *srna;
5554  PropertyRNA *prop;
5555 
5556  static const EnumPropertyItem geometry_items[] = {
5558  "GENERATE",
5559  0,
5560  "Generate",
5561  "Generate ocean surface geometry at the specified resolution"},
5563  "DISPLACE",
5564  0,
5565  "Displace",
5566  "Displace existing geometry according to simulation"},
5567 # if 0
5569  "SIM_ONLY",
5570  0,
5571  "Sim Only",
5572  "Leaves geometry unchanged, but still runs simulation (to be used from texture)"},
5573 # endif
5574  {0, NULL, 0, NULL, NULL},
5575  };
5576 
5577  static const EnumPropertyItem spectrum_items[] = {
5579  "PHILLIPS",
5580  0,
5581  "Turbulent Ocean",
5582  "Use for turbulent seas with foam"},
5584  "PIERSON_MOSKOWITZ",
5585  0,
5586  "Established Ocean",
5587  "Use for a large area, established ocean (Pierson-Moskowitz method)"},
5589  "JONSWAP",
5590  0,
5591  "Established Ocean (Sharp Peaks)",
5592  "Use for sharp peaks ('JONSWAP', Pierson-Moskowitz method) with peak sharpening"},
5594  "TEXEL_MARSEN_ARSLOE",
5595  0,
5596  "Shallow Water",
5597  "Use for shallow water ('JONSWAP', 'TMA' - Texel-Marsen-Arsloe method)"},
5598  {0, NULL, 0, NULL, NULL},
5599  };
5600 
5601  srna = RNA_def_struct(brna, "OceanModifier", "Modifier");
5602  RNA_def_struct_ui_text(srna, "Ocean Modifier", "Simulate an ocean surface");
5603  RNA_def_struct_sdna(srna, "OceanModifierData");
5604  RNA_def_struct_ui_icon(srna, ICON_MOD_OCEAN);
5605 
5607 
5608  prop = RNA_def_property(srna, "geometry_mode", PROP_ENUM, PROP_NONE);
5609  RNA_def_property_enum_sdna(prop, NULL, "geometry_mode");
5610  RNA_def_property_enum_items(prop, geometry_items);
5611  RNA_def_property_ui_text(prop, "Geometry", "Method of modifying geometry");
5612  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5613 
5614  prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_UNSIGNED);
5615  RNA_def_property_float_sdna(prop, NULL, "size");
5617  prop, "Size", "Surface scale factor (does not affect the height of the waves)");
5618  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, -1);
5619  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5620 
5621  prop = RNA_def_property(srna, "repeat_x", PROP_INT, PROP_UNSIGNED);
5622  RNA_def_property_int_sdna(prop, NULL, "repeat_x");
5624  RNA_def_property_range(prop, 1, 1024);
5625  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
5626  RNA_def_property_ui_text(prop, "Repeat X", "Repetitions of the generated surface in X");
5627  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5628 
5629  prop = RNA_def_property(srna, "repeat_y", PROP_INT, PROP_UNSIGNED);
5630  RNA_def_property_int_sdna(prop, NULL, "repeat_y");
5632  RNA_def_property_range(prop, 1, 1024);
5633  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
5634  RNA_def_property_ui_text(prop, "Repeat Y", "Repetitions of the generated surface in Y");
5635  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5636 
5637  prop = RNA_def_property(srna, "use_normals", PROP_BOOLEAN, PROP_NONE);
5641  prop,
5642  "Generate Normals",
5643  "Output normals for bump mapping - disabling can speed up performance if its not needed");
5644  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5645 
5646  prop = RNA_def_property(srna, "use_foam", PROP_BOOLEAN, PROP_NONE);
5649  RNA_def_property_ui_text(prop, "Generate Foam", "Generate foam mask as a vertex color channel");
5650  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5651 
5652  prop = RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
5656  prop, "Generate Spray Map", "Generate map of spray direction as a vertex color channel");
5657  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5658 
5659  prop = RNA_def_property(srna, "invert_spray", PROP_BOOLEAN, PROP_NONE);
5662  RNA_def_property_ui_text(prop, "Invert Spray", "Invert the spray direction map");
5663  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5664 
5665  prop = RNA_def_property(srna, "spray_layer_name", PROP_STRING, PROP_NONE);
5666  RNA_def_property_string_sdna(prop, NULL, "spraylayername");
5669  prop, "Spray Map", "Name of the vertex color layer used for the spray direction map");
5670  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5671 
5672  prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
5673  RNA_def_property_int_sdna(prop, NULL, "resolution");
5675  RNA_def_property_range(prop, 1, 1024);
5676  RNA_def_property_ui_range(prop, 1, 32, 1, -1);
5678  prop, "Render Resolution", "Resolution of the generated surface for rendering and baking");
5679  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5680 
5681  prop = RNA_def_property(srna, "viewport_resolution", PROP_INT, PROP_UNSIGNED);
5682  RNA_def_property_int_sdna(prop, NULL, "viewport_resolution");
5684  RNA_def_property_range(prop, 1, 1024);
5685  RNA_def_property_ui_range(prop, 1, 32, 1, -1);
5687  prop, "Viewport Resolution", "Viewport resolution of the generated surface");
5688  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5689 
5690  prop = RNA_def_property(srna, "spatial_size", PROP_INT, PROP_NONE);
5691  RNA_def_property_int_sdna(prop, NULL, "spatial_size");
5692  RNA_def_property_ui_range(prop, 1, 512, 2, -1);
5695  prop,
5696  "Spatial Size",
5697  "Size of the simulation domain (in meters), and of the generated geometry (in BU)");
5698  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5699 
5700  prop = RNA_def_property(srna, "wind_velocity", PROP_FLOAT, PROP_VELOCITY);
5701  RNA_def_property_float_sdna(prop, NULL, "wind_velocity");
5703  RNA_def_property_ui_text(prop, "Wind Velocity", "Wind speed");
5704  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5705 
5706  prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_FACTOR);
5707  RNA_def_property_float_sdna(prop, NULL, "damp");
5710  prop, "Damping", "Damp reflected waves going in opposite direction to the wind");
5711  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5712 
5713  prop = RNA_def_property(srna, "wave_scale_min", PROP_FLOAT, PROP_DISTANCE);
5714  RNA_def_property_float_sdna(prop, NULL, "smallest_wave");
5716  RNA_def_property_range(prop, 0.0, FLT_MAX);
5717  RNA_def_property_ui_text(prop, "Smallest Wave", "Shortest allowed wavelength");
5718  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5719 
5720  prop = RNA_def_property(srna, "wave_alignment", PROP_FLOAT, PROP_UNSIGNED);
5721  RNA_def_property_float_sdna(prop, NULL, "wave_alignment");
5723  RNA_def_property_range(prop, 0.0, 1.0);
5724  RNA_def_property_ui_text(prop, "Wave Alignment", "How much the waves are aligned to each other");
5725  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5726 
5727  prop = RNA_def_property(srna, "wave_direction", PROP_FLOAT, PROP_ANGLE);
5728  RNA_def_property_float_sdna(prop, NULL, "wave_direction");
5731  prop, "Wave Direction", "Main direction of the waves when they are (partially) aligned");
5732  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5733 
5734  prop = RNA_def_property(srna, "wave_scale", PROP_FLOAT, PROP_UNSIGNED);
5735  RNA_def_property_float_sdna(prop, NULL, "wave_scale");
5736  RNA_def_property_ui_text(prop, "Wave Scale", "Scale of the displacement effect");
5737  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5738 
5739  prop = RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
5740  RNA_def_property_float_sdna(prop, NULL, "depth");
5742  RNA_def_property_ui_text(prop, "Depth", "Depth of the solid ground below the water surface");
5743  RNA_def_property_ui_range(prop, 0, 250, 1, -1);
5744  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5745 
5746  prop = RNA_def_property(srna, "foam_coverage", PROP_FLOAT, PROP_NONE);
5747  RNA_def_property_float_sdna(prop, NULL, "foam_coverage");
5748  RNA_def_property_ui_text(prop, "Foam Coverage", "Amount of generated foam");
5749  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5750 
5751  prop = RNA_def_property(srna, "bake_foam_fade", PROP_FLOAT, PROP_UNSIGNED);
5752  RNA_def_property_float_sdna(prop, NULL, "foam_fade");
5755  prop, "Foam Fade", "How much foam accumulates over time (baked ocean only)");
5756  RNA_def_property_ui_range(prop, 0.0, 10.0, 1, -1);
5757  RNA_def_property_update(prop, 0, NULL);
5758 
5759  prop = RNA_def_property(srna, "foam_layer_name", PROP_STRING, PROP_NONE);
5760  RNA_def_property_string_sdna(prop, NULL, "foamlayername");
5762  prop, "Foam Layer Name", "Name of the vertex color layer used for foam");
5763  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5764 
5765  prop = RNA_def_property(srna, "choppiness", PROP_FLOAT, PROP_UNSIGNED);
5766  RNA_def_property_float_sdna(prop, NULL, "chop_amount");
5768  prop,
5769  "Choppiness",
5770  "Choppiness of the wave's crest (adds some horizontal component to the displacement)");
5771  RNA_def_property_ui_range(prop, 0.0, 4.0, 3, -1);
5772  RNA_def_property_float_funcs(prop, NULL, "rna_OceanModifier_ocean_chop_set", NULL);
5773  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5774 
5775  prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
5776  RNA_def_property_float_sdna(prop, NULL, "time");
5777  RNA_def_property_ui_text(prop, "Time", "Current time of the simulation");
5778  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, -1);
5779  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5780 
5781  prop = RNA_def_property(srna, "spectrum", PROP_ENUM, PROP_NONE);
5782  RNA_def_property_enum_sdna(prop, NULL, "spectrum");
5784  RNA_def_property_enum_items(prop, spectrum_items);
5785  RNA_def_property_ui_text(prop, "Spectrum", "Spectrum to use");
5786  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5787 
5788  prop = RNA_def_property(srna, "fetch_jonswap", PROP_FLOAT, PROP_UNSIGNED);
5789  RNA_def_property_float_sdna(prop, NULL, "fetch_jonswap");
5791  RNA_def_property_range(prop, 0.0, FLT_MAX);
5793  prop,
5794  "Fetch",
5795  "This is the distance from a lee shore, "
5796  "called the fetch, or the distance over which the wind blows with constant velocity. "
5797  "Used by 'JONSWAP' and 'TMA' models");
5798  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5799 
5800  prop = RNA_def_property(srna, "sharpen_peak_jonswap", PROP_FLOAT, PROP_UNSIGNED);
5801  RNA_def_property_float_sdna(prop, NULL, "sharpen_peak_jonswap");
5803  RNA_def_property_range(prop, 0.0, 1.0);
5804  RNA_def_property_ui_text(prop, "Sharpen peak", "Peak sharpening for 'JONSWAP' and 'TMA' models");
5805  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5806 
5807  prop = RNA_def_property(srna, "random_seed", PROP_INT, PROP_UNSIGNED);
5808  RNA_def_property_int_sdna(prop, NULL, "seed");
5810  RNA_def_property_ui_text(prop, "Random Seed", "Seed of the random generator");
5811  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5812 
5813  prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
5814  RNA_def_property_int_sdna(prop, NULL, "bakestart");
5816  RNA_def_property_ui_text(prop, "Bake Start", "Start frame of the ocean baking");
5817  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5818 
5819  prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
5820  RNA_def_property_int_sdna(prop, NULL, "bakeend");
5822  RNA_def_property_ui_text(prop, "Bake End", "End frame of the ocean baking");
5823  RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
5824 
5825  prop = RNA_def_property(srna, "is_cached", PROP_BOOLEAN, PROP_NONE);
5826  RNA_def_property_boolean_sdna(prop, NULL, "cached", 1);
5829  prop, "Ocean is Cached", "Whether the ocean is using cached data or simulating");
5830 
5831  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH);
5832  RNA_def_property_string_sdna(prop, NULL, "cachepath");
5833  RNA_def_property_ui_text(prop, "Cache Path", "Path to a folder to store external baked images");
5834  // RNA_def_property_update(prop, 0, "rna_Modifier_update");
5835  /* XXX how to update? */
5836 
5838 }
5839 
5841 {
5842  StructRNA *srna;
5843  PropertyRNA *prop;
5844 
5845  srna = RNA_def_struct(brna, "SkinModifier", "Modifier");
5846  RNA_def_struct_ui_text(srna, "Skin Modifier", "Generate Skin");
5847  RNA_def_struct_sdna(srna, "SkinModifierData");
5848  RNA_def_struct_ui_icon(srna, ICON_MOD_SKIN);
5849 
5851 
5852  prop = RNA_def_property(srna, "branch_smoothing", PROP_FLOAT, PROP_FACTOR);
5853  RNA_def_property_ui_text(prop, "Branch Smoothing", "Smooth complex geometry around branches");
5854  RNA_def_property_ui_range(prop, 0, 1, 1, -1);
5855  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5856 
5857  prop = RNA_def_property(srna, "use_smooth_shade", PROP_BOOLEAN, PROP_NONE);
5860  prop, "Smooth Shading", "Output faces with smooth shading rather than flat shaded");
5861  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5862 
5863  prop = RNA_def_property(srna, "use_x_symmetry", PROP_BOOLEAN, PROP_NONE);
5864  RNA_def_property_boolean_sdna(prop, NULL, "symmetry_axes", MOD_SKIN_SYMM_X);
5865  RNA_def_property_ui_text(prop, "X", "Avoid making unsymmetrical quads across the X axis");
5866  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5867 
5868  prop = RNA_def_property(srna, "use_y_symmetry", PROP_BOOLEAN, PROP_NONE);
5869  RNA_def_property_boolean_sdna(prop, NULL, "symmetry_axes", MOD_SKIN_SYMM_Y);
5870  RNA_def_property_ui_text(prop, "Y", "Avoid making unsymmetrical quads across the Y axis");
5871  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5872 
5873  prop = RNA_def_property(srna, "use_z_symmetry", PROP_BOOLEAN, PROP_NONE);
5874  RNA_def_property_boolean_sdna(prop, NULL, "symmetry_axes", MOD_SKIN_SYMM_Z);
5875  RNA_def_property_ui_text(prop, "Z", "Avoid making unsymmetrical quads across the Z axis");
5876  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5877 
5879 }
5880 
5882 {
5883  StructRNA *srna;
5884  PropertyRNA *prop;
5885 
5886  srna = RNA_def_struct(brna, "TriangulateModifier", "Modifier");
5887  RNA_def_struct_ui_text(srna, "Triangulate Modifier", "Triangulate Mesh");
5888  RNA_def_struct_sdna(srna, "TriangulateModifierData");
5889  RNA_def_struct_ui_icon(srna, ICON_MOD_TRIANGULATE);
5890 
5892 
5893  prop = RNA_def_property(srna, "quad_method", PROP_ENUM, PROP_NONE);
5894  RNA_def_property_enum_sdna(prop, NULL, "quad_method");
5896  RNA_def_property_ui_text(prop, "Quad Method", "Method for splitting the quads into triangles");
5897  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5898 
5899  prop = RNA_def_property(srna, "ngon_method", PROP_ENUM, PROP_NONE);
5900  RNA_def_property_enum_sdna(prop, NULL, "ngon_method");
5902  RNA_def_property_ui_text(prop, "N-gon Method", "Method for splitting the n-gons into triangles");
5903  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5904 
5905  prop = RNA_def_property(srna, "min_vertices", PROP_INT, PROP_UNSIGNED);
5906  RNA_def_property_int_sdna(prop, NULL, "min_vertices");
5907  RNA_def_property_range(prop, 4, INT_MAX);
5909  prop,
5910  "Minimum Vertices",
5911  "Triangulate only polygons with vertex count greater than or equal to this number");
5912  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5913 
5914  prop = RNA_def_property(srna, "keep_custom_normals", PROP_BOOLEAN, PROP_NONE);
5917  prop,
5918  "Keep Normals",
5919  "Try to preserve custom normals.\n"
5920  "Warning: Depending on chosen triangulation method, "
5921  "shading may not be fully preserved, \"Fixed\" method usually gives the best result here");
5922  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5923 
5925 }
5926 
5928 {
5929  static const EnumPropertyItem prop_format_type_items[] = {
5930  {MOD_MESHCACHE_TYPE_MDD, "MDD", 0, "MDD", ""},
5931  {MOD_MESHCACHE_TYPE_PC2, "PC2", 0, "PC2", ""},
5932  {0, NULL, 0, NULL, NULL},
5933  };
5934 
5935  static const EnumPropertyItem prop_deform_mode_items[] = {
5937  "OVERWRITE",
5938  0,
5939  "Overwrite",
5940  "Replace vertex coords with cached values"},
5942  "INTEGRATE",
5943  0,
5944  "Integrate",
5945  "Integrate deformation from this modifiers input with the mesh-cache coords (useful for "
5946  "shape keys)"},
5947  {0, NULL, 0, NULL, NULL},
5948  };
5949 
5950  static const EnumPropertyItem prop_interpolation_type_items[] = {
5951  {MOD_MESHCACHE_INTERP_NONE, "NONE", 0, "None", ""},
5952  {MOD_MESHCACHE_INTERP_LINEAR, "LINEAR", 0, "Linear", ""},
5953  /* for cardinal we'd need to read 4x cache's */
5954  // {MOD_MESHCACHE_INTERP_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
5955  {0, NULL, 0, NULL, NULL},
5956  };
5957 
5958  static const EnumPropertyItem prop_time_type_items[] = {
5959  /* use 'eval_frame' */
5961  "FRAME",
5962  0,
5963  "Frame",
5964  "Control playback using a frame-number "
5965  "(ignoring time FPS and start frame from the file)"},
5966  /* use 'eval_time' */
5967  {MOD_MESHCACHE_TIME_SECONDS, "TIME", 0, "Time", "Control playback using time in seconds"},
5968  /* use 'eval_factor' */
5970  "FACTOR",
5971  0,
5972  "Factor",
5973  "Control playback using a value between 0 and 1"},
5974  {0, NULL, 0, NULL, NULL},
5975  };
5976 
5977  static const EnumPropertyItem prop_time_play_items[] = {
5978  {MOD_MESHCACHE_PLAY_CFEA, "SCENE", 0, "Scene", "Use the time from the scene"},
5979  {MOD_MESHCACHE_PLAY_EVAL, "CUSTOM", 0, "Custom", "Use the modifier's own time evaluation"},
5980  {0, NULL, 0, NULL, NULL},
5981  };
5982 
5983  StructRNA *srna;
5984  PropertyRNA *prop;
5985 
5986  srna = RNA_def_struct(brna, "MeshCacheModifier", "Modifier");
5987  RNA_def_struct_ui_text(srna, "Cache Modifier", "Cache Mesh");
5988  RNA_def_struct_sdna(srna, "MeshCacheModifierData");
5989  RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM); /* XXX, needs own icon */
5990 
5992 
5993  prop = RNA_def_property(srna, "cache_format", PROP_ENUM, PROP_NONE);
5994  RNA_def_property_enum_sdna(prop, NULL, "type");
5995  RNA_def_property_enum_items(prop, prop_format_type_items);
5996  RNA_def_property_ui_text(prop, "Format", "");
5997  RNA_def_property_update(prop, 0, "rna_Modifier_update");
5998 
5999  prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
6000  RNA_def_property_enum_sdna(prop, NULL, "interp");
6001  RNA_def_property_enum_items(prop, prop_interpolation_type_items);
6002  RNA_def_property_ui_text(prop, "Interpolation", "");
6003  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6004 
6005  prop = RNA_def_property(srna, "time_mode", PROP_ENUM, PROP_NONE);
6006  RNA_def_property_enum_sdna(prop, NULL, "time_mode");
6007  RNA_def_property_enum_items(prop, prop_time_type_items);
6008  RNA_def_property_ui_text(prop, "Time Mode", "Method to control playback time");
6009  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6010 
6011  prop = RNA_def_property(srna, "play_mode", PROP_ENUM, PROP_NONE);
6012  RNA_def_property_enum_sdna(prop, NULL, "play_mode");
6013  RNA_def_property_enum_items(prop, prop_time_play_items);
6014  RNA_def_property_ui_text(prop, "Play Mode", "");
6015  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6016 
6017  prop = RNA_def_property(srna, "deform_mode", PROP_ENUM, PROP_NONE);
6018  RNA_def_property_enum_sdna(prop, NULL, "deform_mode");
6019  RNA_def_property_enum_items(prop, prop_deform_mode_items);
6020  RNA_def_property_ui_text(prop, "Deform Mode", "");
6021  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6022 
6023  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
6024  RNA_def_property_ui_text(prop, "File Path", "Path to external displacements file");
6025  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6026 
6027  prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
6028  RNA_def_property_float_sdna(prop, NULL, "factor");
6029  RNA_def_property_range(prop, 0.0f, 1.0f);
6030  RNA_def_property_ui_text(prop, "Influence", "Influence of the deformation");
6031  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6032 
6033  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
6034  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
6036  prop,
6037  "Vertex Group",
6038  "Name of the Vertex Group which determines the influence of the modifier per point");
6039  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshCacheModifier_defgrp_name_set");
6040  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6041 
6042  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
6044  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
6045  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6046 
6047  /* -------------------------------------------------------------------- */
6048  /* Axis Conversion */
6049  prop = RNA_def_property(srna, "forward_axis", PROP_ENUM, PROP_NONE);
6050  RNA_def_property_enum_sdna(prop, NULL, "forward_axis");
6052  RNA_def_property_ui_text(prop, "Forward", "");
6053  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6054 
6055  prop = RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
6056  RNA_def_property_enum_sdna(prop, NULL, "up_axis");
6058  RNA_def_property_ui_text(prop, "Up", "");
6059  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6060 
6061  prop = RNA_def_property(srna, "flip_axis", PROP_ENUM, PROP_NONE);
6062  RNA_def_property_enum_sdna(prop, NULL, "flip_axis");
6065  RNA_def_property_ui_text(prop, "Flip Axis", "");
6066  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6067 
6068  /* -------------------------------------------------------------------- */
6069  /* For Scene time */
6070  prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
6071  RNA_def_property_float_sdna(prop, NULL, "frame_start");
6073  RNA_def_property_ui_text(prop, "Frame Start", "Add this to the start frame");
6074  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6075 
6076  prop = RNA_def_property(srna, "frame_scale", PROP_FLOAT, PROP_NONE);
6077  RNA_def_property_float_sdna(prop, NULL, "frame_scale");
6078  RNA_def_property_range(prop, 0.0f, 100.0f);
6079  RNA_def_property_ui_text(prop, "Frame Scale", "Evaluation time in seconds");
6080  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6081 
6082  /* -------------------------------------------------------------------- */
6083  /* eval values depend on 'time_mode' */
6084  prop = RNA_def_property(srna, "eval_frame", PROP_FLOAT, PROP_NONE);
6085  RNA_def_property_float_sdna(prop, NULL, "eval_frame");
6087  RNA_def_property_ui_text(prop, "Evaluation Frame", "The frame to evaluate (starting at 0)");
6088  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6089 
6090  prop = RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
6091  RNA_def_property_float_sdna(prop, NULL, "eval_time");
6092  RNA_def_property_range(prop, 0.0f, FLT_MAX);
6093  RNA_def_property_ui_text(prop, "Evaluation Time", "Evaluation time in seconds");
6094  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6095 
6096  prop = RNA_def_property(srna, "eval_factor", PROP_FLOAT, PROP_FACTOR);
6097  RNA_def_property_float_sdna(prop, NULL, "eval_factor");
6098  RNA_def_property_range(prop, 0.0f, 1.0f);
6099  RNA_def_property_ui_text(prop, "Evaluation Factor", "Evaluation time in seconds");
6100  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6101 
6103 }
6104 
6106 {
6107  StructRNA *srna;
6108  PropertyRNA *prop;
6109 
6110  srna = RNA_def_struct(brna, "MeshSequenceCacheModifier", "Modifier");
6111  RNA_def_struct_ui_text(srna, "Cache Modifier", "Cache Mesh");
6112  RNA_def_struct_sdna(srna, "MeshSeqCacheModifierData");
6113  RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM); /* XXX, needs own icon */
6114 
6116 
6117  prop = RNA_def_property(srna, "cache_file", PROP_POINTER, PROP_NONE);
6118  RNA_def_property_pointer_sdna(prop, NULL, "cache_file");
6119  RNA_def_property_struct_type(prop, "CacheFile");
6120  RNA_def_property_ui_text(prop, "Cache File", "");
6122  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
6123 
6124  prop = RNA_def_property(srna, "object_path", PROP_STRING, PROP_NONE);
6126  prop,
6127  "Object Path",
6128  "Path to the object in the Alembic archive used to lookup geometric data");
6129  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6130 
6131  static const EnumPropertyItem read_flag_items[] = {
6132  {MOD_MESHSEQ_READ_VERT, "VERT", 0, "Vertex", ""},
6133  {MOD_MESHSEQ_READ_POLY, "POLY", 0, "Faces", ""},
6134  {MOD_MESHSEQ_READ_UV, "UV", 0, "UV", ""},
6135  {MOD_MESHSEQ_READ_COLOR, "COLOR", 0, "Color", ""},
6136  {0, NULL, 0, NULL, NULL},
6137  };
6138 
6139  prop = RNA_def_property(srna, "read_data", PROP_ENUM, PROP_NONE);
6141  RNA_def_property_enum_sdna(prop, NULL, "read_flag");
6142  RNA_def_property_enum_items(prop, read_flag_items);
6143  RNA_def_property_ui_text(prop, "Read Data", "Data to read from the cache");
6144  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6145 
6146  prop = RNA_def_property(srna, "use_vertex_interpolation", PROP_BOOLEAN, PROP_NONE);
6149  prop, "Vertex Interpolation", "Allow interpolation of vertex positions");
6150  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6151 
6152  prop = RNA_def_property(srna, "velocity_scale", PROP_FLOAT, PROP_NONE);
6153  RNA_def_property_float_sdna(prop, NULL, "velocity_scale");
6154  RNA_def_property_range(prop, 0.0f, FLT_MAX);
6156  prop,
6157  "Velocity Scale",
6158  "Multiplier used to control the magnitude of the velocity vectors for time effects");
6159  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6160 
6162 }
6163 
6165 {
6166  StructRNA *srna;
6167  PropertyRNA *prop;
6168 
6169  srna = RNA_def_struct(brna, "LaplacianDeformModifier", "Modifier");
6170  RNA_def_struct_ui_text(srna, "Laplacian Deform Modifier", "Mesh deform modifier");
6171  RNA_def_struct_sdna(srna, "LaplacianDeformModifierData");
6172  RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM);
6173 
6175 
6176  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
6177  RNA_def_property_string_sdna(prop, NULL, "anchor_grp_name");
6179  prop, "Anchor Weights", "Name of Vertex Group which determines Anchors");
6181  prop, NULL, NULL, "rna_LaplacianDeformModifier_anchor_grp_name_set");
6182 
6183  prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
6184  RNA_def_property_int_sdna(prop, NULL, "repeat");
6185  RNA_def_property_ui_range(prop, 1, 50, 1, -1);
6186  RNA_def_property_ui_text(prop, "Repeat", "");
6187  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6188 
6189  prop = RNA_def_property(srna, "is_bind", PROP_BOOLEAN, PROP_NONE);
6190  RNA_def_property_boolean_funcs(prop, "rna_LaplacianDeformModifier_is_bind_get", NULL);
6191  RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to anchors");
6193 
6194  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
6196  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
6197  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6198 
6200 
6201  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6202 }
6203 
6205 {
6206  StructRNA *srna;
6207  PropertyRNA *prop;
6208 
6209  static const EnumPropertyItem mode_items[] = {
6210  {MOD_WELD_MODE_ALL, "ALL", 0, "All", "Full merge by distance"},
6211  {MOD_WELD_MODE_CONNECTED, "CONNECTED", 0, "Connected", "Only merge along the edges"},
6212  {0, NULL, 0, NULL, NULL},
6213  };
6214 
6215  srna = RNA_def_struct(brna, "WeldModifier", "Modifier");
6216  RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier");
6217  RNA_def_struct_sdna(srna, "WeldModifierData");
6218  RNA_def_struct_ui_icon(srna, ICON_AUTOMERGE_OFF);
6219 
6221 
6222  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
6224  RNA_def_property_ui_text(prop, "Mode", "Mode defines the merge rule");
6225  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6226 
6227  prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
6228  RNA_def_property_float_sdna(prop, NULL, "merge_dist");
6229  RNA_def_property_range(prop, 0, FLT_MAX);
6230  RNA_def_property_ui_range(prop, 0, 1, 0.001, 6);
6231  RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices");
6232  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6233 
6234  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
6235  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
6237  prop, "Vertex Group", "Vertex group name for selecting the affected areas");
6238  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeldModifier_defgrp_name_set");
6239  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6240 
6241  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
6243  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
6244  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6245 
6246  prop = RNA_def_property(srna, "loose_edges", PROP_BOOLEAN, PROP_NONE);
6249  prop, "Only Loose Edges", "Collapse edges without faces, cloth sewing edges");
6250  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6251 
6253 }
6254 
6256 {
6257  StructRNA *srna;
6258  PropertyRNA *prop;
6259 
6260  srna = RNA_def_struct(brna, "WireframeModifier", "Modifier");
6261  RNA_def_struct_ui_text(srna, "Wireframe Modifier", "Wireframe effect modifier");
6262  RNA_def_struct_sdna(srna, "WireframeModifierData");
6263  RNA_def_struct_ui_icon(srna, ICON_MOD_WIREFRAME);
6264 
6266 
6267  prop = RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_DISTANCE);
6268  RNA_def_property_float_sdna(prop, NULL, "offset");
6269  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
6270  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 4);
6271  RNA_def_property_ui_text(prop, "Thickness", "Thickness factor");
6272  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6273 
6274  prop = RNA_def_property(srna, "thickness_vertex_group", PROP_FLOAT, PROP_FACTOR);
6275  RNA_def_property_float_sdna(prop, NULL, "offset_fac_vg");
6276  RNA_def_property_range(prop, 0.0, 1.0);
6277  RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
6279  prop, "Vertex Group Factor", "Thickness factor to use for zero vertex group influence");
6280  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6281 
6282  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_FACTOR);
6283  RNA_def_property_float_sdna(prop, NULL, "offset_fac");
6284  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
6285  RNA_def_property_ui_range(prop, -1, 1, 0.1, 4);
6286  RNA_def_property_ui_text(prop, "Offset", "Offset the thickness from the center");
6287  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6288 
6289  prop = RNA_def_property(srna, "use_replace", PROP_BOOLEAN, PROP_NONE);
6291  RNA_def_property_ui_text(prop, "Replace", "Remove original geometry");
6292  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6293 
6294  prop = RNA_def_property(srna, "use_boundary", PROP_BOOLEAN, PROP_NONE);
6296  RNA_def_property_ui_text(prop, "Boundary", "Support face boundaries");
6297  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6298 
6299  prop = RNA_def_property(srna, "use_even_offset", PROP_BOOLEAN, PROP_NONE);
6301  RNA_def_property_ui_text(prop, "Offset Even", "Scale the offset to give more even thickness");
6302  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6303 
6304  prop = RNA_def_property(srna, "use_relative_offset", PROP_BOOLEAN, PROP_NONE);
6306  RNA_def_property_ui_text(prop, "Offset Relative", "Scale the offset by surrounding geometry");
6307  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6308 
6309  prop = RNA_def_property(srna, "use_crease", PROP_BOOLEAN, PROP_NONE);
6312  prop, "Offset Relative", "Crease hub edges for improved subdivision surface");
6313  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6314 
6315  prop = RNA_def_property(srna, "crease_weight", PROP_FLOAT, PROP_NONE);
6316  RNA_def_property_float_sdna(prop, NULL, "crease_weight");
6317  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
6318  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 1);
6319  RNA_def_property_ui_text(prop, "Weight", "Crease weight (if active)");
6320  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6321 
6322  prop = RNA_def_property(srna, "material_offset", PROP_INT, PROP_NONE);
6323  RNA_def_property_int_sdna(prop, NULL, "mat_ofs");
6324  RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX);
6325  RNA_def_property_ui_text(prop, "Material Offset", "Offset material index of generated faces");
6326  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6327 
6328  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
6329  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
6331  prop, "Vertex Group", "Vertex group name for selecting the affected areas");
6332  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WireframeModifier_defgrp_name_set");
6333  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6334 
6335  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
6337  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
6338  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6339 
6341 }
6342 
6344 {
6345  StructRNA *srna;
6346  PropertyRNA *prop;
6347 
6348  static const EnumPropertyItem DT_layer_vert_items[] = {
6350  "VGROUP_WEIGHTS",
6351  0,
6352  "Vertex Groups",
6353  "Transfer active or all vertex groups"},
6354 # if 0 /* TODO */
6355  {DT_TYPE_SHAPEKEY, "SHAPEKEYS", 0, "Shapekey(s)", "Transfer active or all shape keys"},
6356 # endif
6357  /* XXX When SkinModifier is enabled,
6358  * it seems to erase its own CD_MVERT_SKIN layer from final DM :( */
6359 # if 0
6360  {DT_TYPE_SKIN, "SKIN", 0, "Skin Weight", "Transfer skin weights"},
6361 # endif
6362  {DT_TYPE_BWEIGHT_VERT, "BEVEL_WEIGHT_VERT", 0, "Bevel Weight", "Transfer bevel weights"},
6364  "COLOR_VERTEX",
6365  0,
6366  "Colors",
6367  "Transfer color attributes"},
6368  {0, NULL, 0, NULL, NULL},
6369  };
6370 
6371  static const EnumPropertyItem DT_layer_edge_items[] = {
6372  {DT_TYPE_SHARP_EDGE, "SHARP_EDGE", 0, "Sharp", "Transfer sharp mark"},
6373  {DT_TYPE_SEAM, "SEAM", 0, "UV Seam", "Transfer UV seam mark"},
6374  {DT_TYPE_CREASE, "CREASE", 0, "Crease", "Transfer subdivision crease values"},
6375  {DT_TYPE_BWEIGHT_EDGE, "BEVEL_WEIGHT_EDGE", 0, "Bevel Weight", "Transfer bevel weights"},
6376  {DT_TYPE_FREESTYLE_EDGE, "FREESTYLE_EDGE", 0, "Freestyle", "Transfer Freestyle edge mark"},
6377  {0, NULL, 0, NULL, NULL},
6378  };
6379 
6380  static const EnumPropertyItem DT_layer_loop_items[] = {
6381  {DT_TYPE_LNOR, "CUSTOM_NORMAL", 0, "Custom Normals", "Transfer custom normals"},
6383  "COLOR_CORNER",
6384  0,
6385  "Colors",
6386  "Transfer color attributes"},
6387  {DT_TYPE_UV, "UV", 0, "UVs", "Transfer UV layers"},
6388  {0, NULL, 0, NULL, NULL},
6389  };
6390 
6391  static const EnumPropertyItem DT_layer_poly_items[] = {
6392  {DT_TYPE_SHARP_FACE, "SMOOTH", 0, "Smooth", "Transfer flat/smooth mark"},
6394  "FREESTYLE_FACE",
6395  0,
6396  "Freestyle Mark",
6397  "Transfer Freestyle face mark"},
6398  {0, NULL, 0, NULL, NULL},
6399  };
6400 
6401  srna = RNA_def_struct(brna, "DataTransferModifier", "Modifier");
6403  srna, "Data Transfer Modifier", "Modifier transferring some data from a source mesh");
6404  RNA_def_struct_sdna(srna, "DataTransferModifierData");
6405  RNA_def_struct_ui_icon(srna, ICON_MOD_DATA_TRANSFER);
6406 
6408 
6409  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
6410  RNA_def_property_pointer_sdna(prop, NULL, "ob_source");
6411  RNA_def_property_ui_text(prop, "Source Object", "Object to transfer data from");
6414  prop, NULL, "rna_DataTransferModifier_ob_source_set", NULL, "rna_Mesh_object_poll");
6415  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
6416 
6417  prop = RNA_def_boolean(srna,
6418  "use_object_transform",
6419  true,
6420  "Object Transform",
6421  "Evaluate source and destination meshes in global space");
6423  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6424 
6425  /* Generic, UI-only data types toggles. */
6426  prop = RNA_def_boolean(
6427  srna, "use_vert_data", false, "Vertex Data", "Enable vertex data transfer");
6429  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_use_data_update");
6430 
6431  prop = RNA_def_boolean(srna, "use_edge_data", false, "Edge Data", "Enable edge data transfer");
6433  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_use_data_update");
6434 
6435  prop = RNA_def_boolean(
6436  srna, "use_loop_data", false, "Face Corner Data", "Enable face corner data transfer");
6438  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_use_data_update");
6439 
6440  prop = RNA_def_boolean(srna, "use_poly_data", false, "Face Data", "Enable face data transfer");
6442  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_use_data_update");
6443 
6444  /* Actual data types selection. */
6445  prop = RNA_def_enum(srna,
6446  "data_types_verts",
6447  DT_layer_vert_items,
6448  0,
6449  "Vertex Data Types",
6450  "Which vertex data layers to transfer");
6452  RNA_def_property_enum_sdna(prop, NULL, "data_types");
6453  RNA_def_property_enum_funcs(prop, NULL, "rna_DataTransferModifier_verts_data_types_set", NULL);
6454  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_data_types_update");
6455 
6456  prop = RNA_def_enum(srna,
6457  "data_types_edges",
6458  DT_layer_edge_items,
6459  0,
6460  "Edge Data Types",
6461  "Which edge data layers to transfer");
6463  RNA_def_property_enum_sdna(prop, NULL, "data_types");
6464  RNA_def_property_enum_funcs(prop, NULL, "rna_DataTransferModifier_edges_data_types_set", NULL);
6465  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_data_types_update");
6466 
6467  prop = RNA_def_enum(srna,
6468  "data_types_loops",
6469  DT_layer_loop_items,
6470  0,
6471  "Face Corner Data Types",
6472  "Which face corner data layers to transfer");
6474  RNA_def_property_enum_sdna(prop, NULL, "data_types");
6475  RNA_def_property_enum_funcs(prop, NULL, "rna_DataTransferModifier_loops_data_types_set", NULL);
6476  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_data_types_update");
6477 
6478  prop = RNA_def_enum(srna,
6479  "data_types_polys",
6480  DT_layer_poly_items,
6481  0,
6482  "Poly Data Types",
6483  "Which poly data layers to transfer");
6485  RNA_def_property_enum_sdna(prop, NULL, "data_types");
6486  RNA_def_property_enum_funcs(prop, NULL, "rna_DataTransferModifier_polys_data_types_set", NULL);
6487  RNA_def_property_update(prop, 0, "rna_DataTransferModifier_data_types_update");
6488 
6489  /* Mapping methods. */
6490  prop = RNA_def_enum(srna,
6491  "vert_mapping",
6494  "Vertex Mapping",
6495  "Method used to map source vertices to destination ones");
6496  RNA_def_property_enum_sdna(prop, NULL, "vmap_mode");
6497  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6498 
6499  prop = RNA_def_enum(srna,
6500  "edge_mapping",
6503  "Edge Mapping",
6504  "Method used to map source edges to destination ones");
6505  RNA_def_property_enum_sdna(prop, NULL, "emap_mode");
6506  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6507 
6508  prop = RNA_def_enum(srna,
6509  "loop_mapping",
6512  "Face Corner Mapping",
6513  "Method used to map source faces' corners to destination ones");
6514  RNA_def_property_enum_sdna(prop, NULL, "lmap_mode");
6515  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6516 
6517  prop = RNA_def_enum(srna,
6518  "poly_mapping",
6521  "Face Mapping",
6522  "Method used to map source faces to destination ones");
6523  RNA_def_property_enum_sdna(prop, NULL, "pmap_mode");
6524  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6525 
6526  /* Mapping options and filtering. */
6527  prop = RNA_def_boolean(
6528  srna,
6529  "use_max_distance",
6530  false,
6531  "Only Neighbor Geometry",
6532  "Source elements must be closer than given distance from destination one");
6534  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6535 
6536  prop = RNA_def_float(
6537  srna,
6538  "max_distance",
6539  1.0f,
6540  0.0f,
6541  FLT_MAX,
6542  "Max Distance",
6543  "Maximum allowed distance between source and destination element, for non-topology mappings",
6544  0.0f,
6545  100.0f);
6546  RNA_def_property_float_sdna(prop, NULL, "map_max_distance");
6548  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6549 
6550  prop = RNA_def_float(
6551  srna,
6552  "ray_radius",
6553  0.0f,
6554  0.0f,
6555  FLT_MAX,
6556  "Ray Radius",
6557  "'Width' of rays (especially useful when raycasting against vertices or edges)",
6558  0.0f,
6559  10.0f);
6560  RNA_def_property_float_sdna(prop, NULL, "map_ray_radius");
6562  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6563 
6564  prop = RNA_def_float(
6565  srna,
6566  "islands_precision",
6567  0.0f,
6568  0.0f,
6569  1.0f,
6570  "Islands Precision",
6571  "Factor controlling precision of islands handling "
6572  "(typically, 0.1 should be enough, higher values can make things really slow)",
6573  0.0f,
6574  1.0f);
6576  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6577 
6578  /* How to handle multi-layers types of data. */
6579  prop = RNA_def_enum(srna,
6580  "layers_vgroup_select_src",
6583  "Source Layers Selection",
6584  "Which layers to transfer, in case of multi-layers types");
6585  RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_MDEFORMVERT]");
6587  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf");
6588  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6589 
6590 # if 0
6591  prop = RNA_def_enum(srna,
6592  "layers_shapekey_select_src",
6595  "Source Layers Selection",
6596  "Which layers to transfer, in case of multi-layers types");
6597  RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_SHAPEKEY]");
6599  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf");
6600  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6601 # endif
6602 
6603  prop = RNA_def_enum(srna,
6604  "layers_vcol_vert_select_src",
6607  "Source Layers Selection",
6608  "Which layers to transfer, in case of multi-layers types");
6609  RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_VCOL_VERT]");
6611  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf");
6612  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6613 
6614  prop = RNA_def_enum(srna,
6615  "layers_vcol_loop_select_src",
6618  "Source Layers Selection",
6619  "Which layers to transfer, in case of multi-layers types");
6620  RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_VCOL_LOOP]");
6622  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf");
6623  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6624 
6625  prop = RNA_def_enum(srna,
6626  "layers_uv_select_src",
6629  "Source Layers Selection",
6630  "Which layers to transfer, in case of multi-layers types");
6631  RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_UV]");
6633  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf");
6634  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6635 
6636  prop = RNA_def_enum(srna,
6637  "layers_vgroup_select_dst",
6640  "Destination Layers Matching",
6641  "How to match source and destination layers");
6642  RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_MDEFORMVERT]");
6644  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf");
6645  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6646 
6647 # if 0
6648  prop = RNA_def_enum(srna,
6649  "layers_shapekey_select_dst",
6652  "Destination Layers Matching",
6653  "How to match source and destination layers");
6654  RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_SHAPEKEY]");
6656  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf");
6657  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6658 # endif
6659 
6660  prop = RNA_def_enum(srna,
6661  "layers_vcol_vert_select_dst",
6664  "Destination Layers Matching",
6665  "How to match source and destination layers");
6666  RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_VCOL_VERT]");
6668  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf");
6669  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6670 
6671  prop = RNA_def_enum(srna,
6672  "layers_vcol_loop_select_dst",
6675  "Destination Layers Matching",
6676  "How to match source and destination layers");
6677  RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_VCOL_LOOP]");
6679  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf");
6680  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6681 
6682  prop = RNA_def_enum(srna,
6683  "layers_uv_select_dst",
6686  "Destination Layers Matching",
6687  "How to match source and destination layers");
6688  RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_UV]");
6690  prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf");
6691  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6692 
6693  /* Mix stuff */
6694  prop = RNA_def_enum(srna,
6695  "mix_mode",
6698  "Mix Mode",
6699  "How to affect destination elements with source values");
6700  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_mix_mode_itemf");
6701  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6702 
6703  prop = RNA_def_float_factor(
6704  srna,
6705  "mix_factor",
6706  0.0f,
6707  0.0f,
6708  1.0f,
6709  "Mix Factor",
6710  "Factor to use when applying data to destination (exact behavior depends on mix mode, "
6711  "multiplied with weights from vertex group when defined)",
6712  0.0f,
6713  1.0f);
6714  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6715 
6716  prop = RNA_def_string(srna,
6717  "vertex_group",
6718  NULL,
6720  "Vertex Group",
6721  "Vertex group name for selecting the affected areas");
6722  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
6723  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DataTransferModifier_defgrp_name_set");
6724  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6725 
6726  prop = RNA_def_boolean(
6727  srna, "invert_vertex_group", false, "Invert", "Invert vertex group influence");
6729  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6730 
6732 }
6733 
6735 {
6736  StructRNA *srna;
6737  PropertyRNA *prop;
6738 
6739  static const EnumPropertyItem prop_mode_items[] = {
6741  "RADIAL",
6742  0,
6743  "Radial",
6744  "From an ellipsoid (shape defined by the boundbox's dimensions, target is optional)"},
6746  "DIRECTIONAL",
6747  0,
6748  "Directional",
6749  "Normals 'track' (point to) the target object"},
6750  {0, NULL, 0, NULL, NULL},
6751  };
6752 
6753  static const EnumPropertyItem prop_mix_mode_items[] = {
6754  {MOD_NORMALEDIT_MIX_COPY, "COPY", 0, "Copy", "Copy new normals (overwrite existing)"},
6755  {MOD_NORMALEDIT_MIX_ADD, "ADD", 0, "Add", "Copy sum of new and old normals"},
6756  {MOD_NORMALEDIT_MIX_SUB, "SUB", 0, "Subtract", "Copy new normals minus old normals"},
6758  "MUL",
6759  0,
6760  "Multiply",
6761  "Copy product of old and new normals (not cross product)"},
6762  {0, NULL, 0, NULL, NULL},
6763  };
6764 
6765  srna = RNA_def_struct(brna, "NormalEditModifier", "Modifier");
6767  srna, "Normal Edit Modifier", "Modifier affecting/generating custom normals");
6768  RNA_def_struct_sdna(srna, "NormalEditModifierData");
6769  RNA_def_struct_ui_icon(srna, ICON_MOD_NORMALEDIT);
6770 
6772 
6773  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
6774  RNA_def_property_enum_items(prop, prop_mode_items);
6775  RNA_def_property_ui_text(prop, "Mode", "How to affect (generate) normals");
6776  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6777 
6778  prop = RNA_def_float_array(srna,
6779  "offset",
6780  3,
6781  NULL,
6782  -FLT_MAX,
6783  FLT_MAX,
6784  "Offset",
6785  "Offset from object's center",
6786  -100.0f,
6787  100.0f);
6789  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6790 
6791  prop = RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE);
6792  RNA_def_property_enum_items(prop, prop_mix_mode_items);
6793  RNA_def_property_ui_text(prop, "Mix Mode", "How to mix generated normals with existing ones");
6794  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6795 
6796  prop = RNA_def_property(srna, "mix_factor", PROP_FLOAT, PROP_FACTOR);
6797  RNA_def_property_range(prop, 0.0, 1.0);
6799  prop, "Mix Factor", "How much of generated normals to mix with exiting ones");
6800  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6801 
6802  prop = RNA_def_property(srna, "mix_limit", PROP_FLOAT, PROP_ANGLE);
6803  RNA_def_property_range(prop, 0.0, DEG2RADF(180.0f));
6804  RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle between old and new normals");
6805  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6806 
6807  prop = RNA_def_property(srna, "no_polynors_fix", PROP_BOOLEAN, PROP_NONE);
6809  RNA_def_property_boolean_default(prop, false);
6811  "Lock Polygon Normals",
6812  "Do not flip polygons when their normals are not consistent "
6813  "with their newly computed custom vertex normals");
6814  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6815 
6816  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
6817  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
6819  prop, "Vertex Group", "Vertex group name for selecting/weighting the affected areas");
6820  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_NormalEditModifier_defgrp_name_set");
6821  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6822 
6823  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
6825  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
6826  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6827 
6828  prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
6829  RNA_def_property_ui_text(prop, "Target", "Target object used to affect normals");
6830  RNA_def_property_pointer_funcs(prop, NULL, "rna_NormalEditModifier_target_set", NULL, NULL);
6832  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
6833 
6834  prop = RNA_def_property(srna, "use_direction_parallel", PROP_BOOLEAN, PROP_NONE);
6838  "Parallel Normals",
6839  "Use same direction for all normals, from origin to target's center "
6840  "(Directional mode only)");
6841  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6842 
6844 }
6845 
6847 {
6848  StructRNA *srna;
6849  PropertyRNA *prop;
6850 
6851  srna = RNA_def_struct(brna, "SurfaceDeformModifier", "Modifier");
6852  RNA_def_struct_ui_text(srna, "SurfaceDeform Modifier", "");
6853  RNA_def_struct_sdna(srna, "SurfaceDeformModifierData");
6854  RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM);
6855 
6857 
6858  prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
6859  RNA_def_property_ui_text(prop, "Target", "Mesh object to deform with");
6861  prop, NULL, "rna_SurfaceDeformModifier_target_set", NULL, "rna_Mesh_object_poll");
6863  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
6864 
6865  prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
6866  RNA_def_property_range(prop, 2.0f, 16.0f);
6868  prop, "Interpolation Falloff", "Controls how much nearby polygons influence deformation");
6869  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6870 
6871  prop = RNA_def_property(srna, "is_bound", PROP_BOOLEAN, PROP_NONE);
6872  RNA_def_property_boolean_funcs(prop, "rna_SurfaceDeformModifier_is_bound_get", NULL);
6873  RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to target mesh");
6875 
6876  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
6877  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
6879  prop, "Vertex Group", "Vertex group name for selecting/weighting the affected areas");
6880  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SurfaceDeformModifier_defgrp_name_set");
6881  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6882 
6883  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
6885  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
6886  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6887 
6888  prop = RNA_def_property(srna, "use_sparse_bind", PROP_BOOLEAN, PROP_NONE);
6892  prop,
6893  "Sparse Bind",
6894  "Only record binding data for vertices matching the vertex group at the time of bind");
6895  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6896 
6897  prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
6898  RNA_def_property_range(prop, -100, 100);
6899  RNA_def_property_ui_range(prop, -100, 100, 10, 2);
6900  RNA_def_property_ui_text(prop, "Strength", "Strength of modifier deformations");
6901  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6902 
6904 }
6905 
6907 {
6908  StructRNA *srna;
6909  PropertyRNA *prop;
6910 
6911  static EnumPropertyItem prop_weighting_mode_items[] = {
6913  "FACE_AREA",
6914  0,
6915  "Face Area",
6916  "Generate face area weighted normals"},
6918  "CORNER_ANGLE",
6919  0,
6920  "Corner Angle",
6921  "Generate corner angle weighted normals"},
6923  "FACE_AREA_WITH_ANGLE",
6924  0,
6925  "Face Area And Angle",
6926  "Generated normals weighted by both face area and angle"},
6927  {0, NULL, 0, NULL, NULL},
6928  };
6929 
6930  srna = RNA_def_struct(brna, "WeightedNormalModifier", "Modifier");
6931  RNA_def_struct_ui_text(srna, "WeightedNormal Modifier", "");
6932  RNA_def_struct_sdna(srna, "WeightedNormalModifierData");
6933  RNA_def_struct_ui_icon(srna, ICON_MOD_NORMALEDIT);
6934 
6936 
6937  prop = RNA_def_property(srna, "weight", PROP_INT, PROP_NONE);
6938  RNA_def_property_range(prop, 1, 100);
6939  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
6941  "Weight",
6942  "Corrective factor applied to faces' weights, 50 is neutral, "
6943  "lower values increase weight of weak faces, "
6944  "higher values increase weight of strong faces");
6945  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6946 
6947  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
6948  RNA_def_property_enum_items(prop, prop_weighting_mode_items);
6949  RNA_def_property_ui_text(prop, "Weighting Mode", "Weighted vertex normal mode to use");
6950  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6951 
6952  prop = RNA_def_property(srna, "thresh", PROP_FLOAT, PROP_NONE);
6953  RNA_def_property_range(prop, 0, 10);
6954  RNA_def_property_ui_range(prop, 0, 10, 1, 2);
6956  prop, "Threshold", "Threshold value for different weights to be considered equal");
6957  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6958 
6959  prop = RNA_def_property(srna, "keep_sharp", PROP_BOOLEAN, PROP_NONE);
6962  "Keep Sharp",
6963  "Keep sharp edges as computed for default split normals, "
6964  "instead of setting a single weighted normal for each vertex");
6965  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6966 
6967  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
6968  RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
6970  prop, "Vertex Group", "Vertex group name for modifying the selected areas");
6971  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightedNormalModifier_defgrp_name_set");
6972  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6973 
6974  prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
6976  RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
6977  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6978 
6979  prop = RNA_def_property(srna, "use_face_influence", PROP_BOOLEAN, PROP_NONE);
6981  RNA_def_property_ui_text(prop, "Face Influence", "Use influence of face for weighting");
6982  RNA_def_property_update(prop, 0, "rna_Modifier_update");
6983 
6985 }
6986 
6988 {
6989  StructRNA *srna;
6990  PropertyRNA *prop;
6991 
6992  srna = RNA_def_struct(brna, "NodesModifier", "Modifier");
6993  RNA_def_struct_ui_text(srna, "Nodes Modifier", "");
6994  RNA_def_struct_sdna(srna, "NodesModifierData");
6995  RNA_def_struct_idprops_func(srna, "rna_NodesModifier_properties");
6996  RNA_def_struct_ui_icon(srna, ICON_GEOMETRY_NODES);
6997 
6999 
7000  prop = RNA_def_property(srna, "node_group", PROP_POINTER, PROP_NONE);
7001  RNA_def_property_ui_text(prop, "Node Group", "Node group that controls what this modifier does");
7002  RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_NodesModifier_node_group_poll");
7004  RNA_def_property_update(prop, 0, "rna_NodesModifier_node_group_update");
7005 
7007 }
7008 
7010 {
7011  StructRNA *srna;
7012  PropertyRNA *prop;
7013 
7014  static EnumPropertyItem resolution_mode_items[] = {
7016  "VOXEL_AMOUNT",
7017  0,
7018  "Voxel Amount",
7019  "Desired number of voxels along one axis"},
7021  "VOXEL_SIZE",
7022  0,
7023  "Voxel Size",
7024  "Desired voxel side length"},
7025  {0, NULL, 0, NULL, NULL},
7026  };
7027 
7028  srna = RNA_def_struct(brna, "MeshToVolumeModifier", "Modifier");
7029  RNA_def_struct_ui_text(srna, "Mesh to Volume Modifier", "");
7030  RNA_def_struct_sdna(srna, "MeshToVolumeModifierData");
7031  RNA_def_struct_ui_icon(srna, ICON_VOLUME_DATA); /* TODO: Use correct icon. */
7032 
7034 
7035  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
7036  RNA_def_property_ui_text(prop, "Object", "Object");
7038  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
7039 
7040  prop = RNA_def_property(srna, "resolution_mode", PROP_ENUM, PROP_NONE);
7041  RNA_def_property_enum_items(prop, resolution_mode_items);
7043  prop, "Resolution Mode", "Mode for how the desired voxel size is specified");
7044  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7045 
7046  prop = RNA_def_property(srna, "voxel_size", PROP_FLOAT, PROP_NONE);
7048  prop, "Voxel Size", "Smaller values result in a higher resolution output");
7049  RNA_def_property_range(prop, 0.0, FLT_MAX);
7050  RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 0.01, 4);
7051  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7052 
7053  prop = RNA_def_property(srna, "voxel_amount", PROP_INT, PROP_NONE);
7054  RNA_def_property_ui_text(prop, "Voxel Amount", "Approximate number of voxels along one axis");
7055  RNA_def_property_range(prop, 0, INT_MAX);
7056  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7057 
7058  prop = RNA_def_property(srna, "use_fill_volume", PROP_BOOLEAN, PROP_NONE);
7059  RNA_def_property_boolean_sdna(prop, NULL, "fill_volume", 1);
7061  prop, "Fill Volume", "Initialize the density grid in every cell inside the enclosed volume");
7062  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7063 
7064  prop = RNA_def_property(srna, "interior_band_width", PROP_FLOAT, PROP_NONE);
7065  RNA_def_property_ui_text(prop, "Interior Band Width", "Width of the volume inside of the mesh");
7066  RNA_def_property_range(prop, 0.0, FLT_MAX);
7067  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7068 
7069  prop = RNA_def_property(srna, "exterior_band_width", PROP_FLOAT, PROP_NONE);
7070  RNA_def_property_ui_text(prop, "Exterior Band Width", "Width of the volume outside of the mesh");
7071  RNA_def_property_range(prop, 0.0, FLT_MAX);
7072  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7073 
7074  prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_NONE);
7075  RNA_def_property_ui_text(prop, "Density", "Density of the new volume");
7076  RNA_def_property_range(prop, 0.0, FLT_MAX);
7077  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7078 
7080 }
7081 
7083 {
7084  static const EnumPropertyItem prop_texture_map_mode_items[] = {
7086  "LOCAL",
7087  0,
7088  "Local",
7089  "Use the local coordinate system for the texture coordinates"},
7091  "GLOBAL",
7092  0,
7093  "Global",
7094  "Use the global coordinate system for the texture coordinates"},
7096  "OBJECT",
7097  0,
7098  "Object",
7099  "Use the linked object's local coordinate system for the texture coordinates"},
7100  {0, NULL, 0, NULL, NULL},
7101  };
7102 
7103  StructRNA *srna;
7104  PropertyRNA *prop;
7105 
7106  srna = RNA_def_struct(brna, "VolumeDisplaceModifier", "Modifier");
7107  RNA_def_struct_ui_text(srna, "Volume Displace Modifier", "");
7108  RNA_def_struct_sdna(srna, "VolumeDisplaceModifierData");
7109  RNA_def_struct_ui_icon(srna, ICON_VOLUME_DATA); /* TODO: Use correct icon. */
7110 
7112 
7113  prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
7114  RNA_def_property_ui_text(prop, "Strength", "Strength of the displacement");
7115  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 0.1, 4);
7116  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7117 
7118  prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
7119  RNA_def_property_ui_text(prop, "Texture", "");
7121  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
7122 
7123  prop = RNA_def_property(srna, "texture_map_mode", PROP_ENUM, PROP_NONE);
7124  RNA_def_property_enum_items(prop, prop_texture_map_mode_items);
7125  RNA_def_property_ui_text(prop, "Texture Mapping Mode", "");
7126  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
7127 
7128  prop = RNA_def_property(srna, "texture_map_object", PROP_POINTER, PROP_NONE);
7129  RNA_def_property_ui_text(prop, "Object", "Object to use for texture mapping");
7131  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
7132 
7133  prop = RNA_def_property(srna, "texture_mid_level", PROP_FLOAT, PROP_XYZ);
7135  prop, "Texture Mid Level", "Subtracted from the texture color to get a displacement vector");
7136  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
7137  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 5);
7138  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7139 
7140  prop = RNA_def_property(srna, "texture_sample_radius", PROP_FLOAT, PROP_FACTOR);
7142  prop,
7143  "Texture Sample Radius",
7144  "Smaller values result in better performance but might cut off the volume");
7145  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7146  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 5);
7147  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7148 
7150 }
7151 
7153 {
7154  StructRNA *srna;
7155  PropertyRNA *prop;
7156 
7157  static EnumPropertyItem resolution_mode_items[] = {
7159  "GRID",
7160  0,
7161  "Grid",
7162  "Use resolution of the volume grid"},
7164  "VOXEL_AMOUNT",
7165  0,
7166  "Voxel Amount",
7167  "Desired number of voxels along one axis"},
7169  "VOXEL_SIZE",
7170  0,
7171  "Voxel Size",
7172  "Desired voxel side length"},
7173  {0, NULL, 0, NULL, NULL},
7174  };
7175 
7176  srna = RNA_def_struct(brna, "VolumeToMeshModifier", "Modifier");
7177  RNA_def_struct_ui_text(srna, "Volume to Mesh Modifier", "");
7178  RNA_def_struct_sdna(srna, "VolumeToMeshModifierData");
7179  RNA_def_struct_ui_icon(srna, ICON_VOLUME_DATA); /* TODO: Use correct icon. */
7180 
7182 
7183  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
7184  RNA_def_property_ui_text(prop, "Object", "Object");
7186  RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
7187 
7188  prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
7190  prop, "Threshold", "Voxels with a larger value are inside the generated mesh");
7191  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7192  RNA_def_property_ui_range(prop, 0.001f, 1.0f, 0.1f, 5);
7193  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7194 
7195  prop = RNA_def_property(srna, "adaptivity", PROP_FLOAT, PROP_NONE);
7197  prop,
7198  "Adaptivity",
7199  "Reduces the final face count by simplifying geometry where detail is not needed");
7200  RNA_def_property_range(prop, 0.0f, 1.0f);
7201  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7202 
7203  prop = RNA_def_property(srna, "use_smooth_shade", PROP_BOOLEAN, PROP_NONE);
7206  prop, "Smooth Shading", "Output faces with smooth shading rather than flat shaded");
7207  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7208 
7209  prop = RNA_def_property(srna, "grid_name", PROP_STRING, PROP_NONE);
7211  prop, "Grid Name", "Grid in the volume object that is converted to a mesh");
7212  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7213 
7214  prop = RNA_def_property(srna, "resolution_mode", PROP_ENUM, PROP_NONE);
7215  RNA_def_property_enum_items(prop, resolution_mode_items);
7217  prop, "Resolution Mode", "Mode for how the desired voxel size is specified");
7218  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7219 
7220  prop = RNA_def_property(srna, "voxel_size", PROP_FLOAT, PROP_NONE);
7222  prop, "Voxel Size", "Smaller values result in a higher resolution output");
7223  RNA_def_property_range(prop, 0.0, FLT_MAX);
7224  RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 0.01, 4);
7225  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7226 
7227  prop = RNA_def_property(srna, "voxel_amount", PROP_INT, PROP_NONE);
7228  RNA_def_property_ui_text(prop, "Voxel Amount", "Approximate number of voxels along one axis");
7229  RNA_def_property_range(prop, 0, INT_MAX);
7230  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7231 
7233 }
7234 
7236 {
7237  StructRNA *srna;
7238  PropertyRNA *prop;
7239 
7240  /* data */
7241  srna = RNA_def_struct(brna, "Modifier", NULL);
7242  RNA_def_struct_ui_text(srna, "Modifier", "Modifier affecting the geometry data of an object");
7243  RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
7244  RNA_def_struct_path_func(srna, "rna_Modifier_path");
7245  RNA_def_struct_sdna(srna, "ModifierData");
7246  RNA_def_struct_ui_icon(srna, ICON_MODIFIER);
7247 
7248  /* strings */
7249  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
7250  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Modifier_name_set");
7251  RNA_def_property_ui_text(prop, "Name", "Modifier name");
7253  RNA_def_struct_name_property(srna, prop);
7254 
7255  /* enums */
7256  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
7258  RNA_def_property_enum_sdna(prop, NULL, "type");
7260  RNA_def_property_ui_text(prop, "Type", "");
7261 
7262  /* flags */
7263  prop = RNA_def_property(srna, "show_viewport", PROP_BOOLEAN, PROP_NONE);
7265  RNA_def_property_ui_text(prop, "Realtime", "Display modifier in viewport");
7268  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7269  RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_ON, 1);
7270 
7271  prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
7274  RNA_def_property_ui_text(prop, "Render", "Use modifier during render");
7275  RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_ON, 1);
7277 
7278  prop = RNA_def_property(srna, "show_in_editmode", PROP_BOOLEAN, PROP_NONE);
7280  RNA_def_property_ui_text(prop, "Edit Mode", "Display modifier in Edit mode");
7281  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7282  RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
7283 
7284  prop = RNA_def_property(srna, "show_on_cage", PROP_BOOLEAN, PROP_NONE);
7286  RNA_def_property_ui_text(prop, "On Cage", "Adjust edit cage to modifier result");
7287  RNA_def_property_ui_icon(prop, ICON_MESH_DATA, 0);
7288  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7289 
7290  prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
7292  prop, "rna_Modifier_show_expanded_get", "rna_Modifier_show_expanded_set");
7294  RNA_def_property_boolean_sdna(prop, NULL, "ui_expand_flag", 0);
7296  RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
7297  RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
7299 
7300  prop = RNA_def_property(srna, "is_active", PROP_BOOLEAN, PROP_NONE);
7302  RNA_def_property_boolean_funcs(prop, NULL, "rna_Modifier_is_active_set");
7306  RNA_def_property_ui_text(prop, "Active", "The active modifier in the list");
7308 
7309  prop = RNA_def_boolean(srna,
7310  "is_override_data",
7311  false,
7312  "Override Modifier",
7313  "In a local override object, whether this modifier comes from the linked "
7314  "reference object, or is local to the override");
7317 
7318  prop = RNA_def_property(srna, "use_apply_on_spline", PROP_BOOLEAN, PROP_NONE);
7321  prop,
7322  "Apply on Spline",
7323  "Apply this and all preceding deformation modifiers on splines' points rather than "
7324  "on filled curve/surface");
7325  RNA_def_property_ui_icon(prop, ICON_SURFACE_DATA, 0);
7326  RNA_def_property_update(prop, 0, "rna_Modifier_update");
7327 
7328  /* types */
7331  rna_def_modifier_curve(brna);
7332  rna_def_modifier_build(brna);
7335  rna_def_modifier_wave(brna);
7337  rna_def_modifier_hook(brna);
7340  rna_def_modifier_array(brna);
7346  rna_def_modifier_cast(brna);
7351  rna_def_modifier_cloth(brna);
7353  rna_def_modifier_bevel(brna);
7355  rna_def_modifier_mask(brna);
7357  rna_def_modifier_warp(brna);
7360  rna_def_modifier_fluid(brna);
7362  rna_def_modifier_screw(brna);
7368  rna_def_modifier_ocean(brna);
7370  rna_def_modifier_skin(brna);
7375  rna_def_modifier_weld(brna);
7382  rna_def_modifier_nodes(brna);
7386 }
7387 
7388 #endif
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
Definition: anim_data.c:1287
Generic geometry attributes built on CustomData.
eAttrDomain
Definition: BKE_attribute.h:25
@ ATTR_DOMAIN_POINT
Definition: BKE_attribute.h:27
@ ATTR_DOMAIN_CORNER
Definition: BKE_attribute.h:30
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Definition: context.c:1528
struct Object * CTX_data_active_object(const bContext *C)
Definition: context.c:1353
void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len)
const char * CustomData_get_layer_name(const struct CustomData *data, int type, int n)
int CustomData_number_of_layers(const struct CustomData *data, int type)
@ ME_VERT
@ ME_POLY
@ ME_LOOP
@ ME_EDGE
const CustomData_MeshMasks CD_MASK_BAREMESH
Definition: customdata.cc:2051
bool CustomData_external_test(struct CustomData *data, int type)
Definition: customdata.cc:4772
@ CDT_MIX_SUB
@ CDT_MIX_REPLACE_BELOW_THRESHOLD
@ CDT_MIX_REPLACE_ABOVE_THRESHOLD
@ CDT_MIX_ADD
@ CDT_MIX_MUL
@ CDT_MIX_TRANSFER
@ CDT_MIX_MIX
@ DT_MULTILAYER_INDEX_MDEFORMVERT
@ DT_MULTILAYER_INDEX_UV
@ DT_MULTILAYER_INDEX_VCOL_VERT
@ DT_MULTILAYER_INDEX_VCOL_LOOP
@ DT_LAYERS_VGROUP_SRC_BONE_SELECT
@ DT_LAYERS_VGROUP_SRC_BONE_DEFORM
@ DT_LAYERS_ALL_SRC
@ DT_LAYERS_ACTIVE_SRC
int BKE_object_data_transfer_get_dttypes_item_types(int dtdata_types)
bool BKE_object_data_transfer_get_dttypes_capacity(int dtdata_types, bool *r_advanced_mixing, bool *r_threshold)
Definition: data_transfer.c:80
@ DT_LAYERS_ACTIVE_DST
@ DT_LAYERS_INDEX_DST
@ DT_LAYERS_NAME_DST
@ DT_TYPE_MLOOPCOL_LOOP
@ DT_TYPE_SKIN
@ DT_TYPE_UV
@ DT_TYPE_MPROPCOL_VERT
@ DT_TYPE_VERT_ALL
@ DT_TYPE_BWEIGHT_VERT
@ DT_TYPE_FREESTYLE_FACE
@ DT_TYPE_SHAPEKEY
@ DT_TYPE_CREASE
@ DT_TYPE_LOOP_ALL
@ DT_TYPE_SEAM
@ DT_TYPE_POLY_ALL
@ DT_TYPE_MLOOPCOL_VERT
@ DT_TYPE_LNOR
@ DT_TYPE_MPROPCOL_LOOP
@ DT_TYPE_EDGE_ALL
@ DT_TYPE_SHARP_FACE
@ DT_TYPE_MDEFORMVERT
@ DT_TYPE_BWEIGHT_EDGE
@ DT_TYPE_FREESTYLE_EDGE
@ DT_TYPE_SHARP_EDGE
support for deformation groups and hooks.
const struct ListBase * BKE_object_defgroup_list(const struct Object *ob)
void BKE_fluid_modifier_create_type_data(struct FluidModifierData *fmd)
Definition: fluid.c:4809
void BKE_fluid_modifier_free(struct FluidModifierData *fmd)
Definition: fluid.c:4798
void id_lib_extern(struct ID *id)
Definition: lib_id.c:237
@ MREMAP_MODE_VERT_EDGE_NEAREST
@ MREMAP_MODE_LOOP_POLYINTERP_NEAREST
@ MREMAP_MODE_VERT_POLYINTERP_VNORPROJ
@ MREMAP_MODE_EDGE_POLY_NEAREST
@ MREMAP_MODE_VERT_EDGEINTERP_NEAREST
@ MREMAP_MODE_VERT_NEAREST
@ MREMAP_MODE_LOOP_NEAREST_POLYNOR
@ MREMAP_MODE_EDGE_VERT_NEAREST
@ MREMAP_MODE_TOPOLOGY
@ MREMAP_MODE_EDGE_NEAREST
@ MREMAP_MODE_POLY_NOR
@ MREMAP_MODE_LOOP_POLYINTERP_LNORPROJ
@ MREMAP_MODE_LOOP_NEAREST_LOOPNOR
@ MREMAP_MODE_LOOP_POLY_NEAREST
@ MREMAP_MODE_EDGE_EDGEINTERP_VNORPROJ
@ MREMAP_MODE_POLY_POLYINTERP_PNORPROJ
@ MREMAP_MODE_VERT_POLY_NEAREST
@ MREMAP_MODE_POLY_NEAREST
@ MREMAP_MODE_VERT_POLYINTERP_NEAREST
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
bool BKE_modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md)
void multires_force_external_reload(struct Object *object)
Definition: multires.c:457
General operations, lookup, etc. for blender objects.
void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd)
Definition: object.cc:1320
struct Object * BKE_object_pose_armature_get(struct Object *ob)
Definition: object.cc:2511
void BKE_ocean_free_modifier_cache(struct OceanModifierData *omd)
Definition: ocean.c:1717
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
#define BLI_assert(a)
Definition: BLI_assert.h:46
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
#define M_PI
Definition: BLI_math_base.h:20
#define DEG2RAD(_deg)
#define DEG2RADF(_deg)
int BLI_sortutil_cmp_int(const void *a_, const void *b_)
Definition: sort_utils.c:52
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
Definition: string.c:250
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(1
#define CLAMPIS(a, b, c)
#define UNUSED_VARS_NDEBUG(...)
#define UNUSED(x)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define STREQ(a, b)
#define CLAMP_MIN(a, b)
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
@ ID_RECALC_GEOMETRY
Definition: DNA_ID.h:791
@ IDOVERRIDE_LIBRARY_OP_REPLACE
Definition: DNA_ID.h:220
@ ARM_DEF_VGROUP
@ ARM_DEF_QUATERNION
@ ARM_DEF_INVERT_VGROUP
@ ARM_DEF_ENVELOPE
@ CU_PATH
#define MAX_CUSTOMDATA_LAYER_NAME
#define CD_MASK_COLOR_ALL
eCustomDataType
@ CD_PROP_BYTE_COLOR
@ CD_PROP_COLOR
@ CD_MLOOPUV
#define CD_MASK_MLOOPUV
@ MOD_SDEF_INVERT_VGROUP
@ MOD_SDEF_SPARSE_BIND
@ eModifierFlag_OverrideLibrary_Local
@ eModifierFlag_Active
@ MOD_REMESH_FLOOD_FILL
@ MOD_REMESH_SMOOTH_SHADING
@ MOD_DISP_SPACE_GLOBAL
@ MOD_DISP_SPACE_LOCAL
@ MOD_WVG_SET_AND
@ MOD_WVG_SET_B
@ MOD_WVG_SET_ALL
@ MOD_WVG_SET_OR
@ MOD_WVG_SET_A
@ MOD_OCEAN_GEOM_GENERATE
@ MOD_OCEAN_GEOM_SIM_ONLY
@ MOD_OCEAN_GEOM_DISPLACE
@ eWarp_Falloff_Linear
@ eWarp_Falloff_Curve
@ eWarp_Falloff_Sharp
@ eWarp_Falloff_Const
@ eWarp_Falloff_InvSquare
@ eWarp_Falloff_Smooth
@ eWarp_Falloff_None
@ eWarp_Falloff_Sphere
@ eWarp_Falloff_Root
@ MOD_BEVEL_AMT_DEPTH
@ MOD_BEVEL_AMT_PERCENT
@ MOD_BEVEL_AMT_OFFSET
@ MOD_BEVEL_AMT_ABSOLUTE
@ MOD_BEVEL_AMT_WIDTH
@ MOD_BEVEL_PROFILE_CUSTOM
@ MOD_BEVEL_PROFILE_SUPERELLIPSE
@ eMultiresModifierFlag_UseSculptBaseMesh
@ eMultiresModifierFlag_UseCrease
@ eMultiresModifierFlag_UseCustomNormals
@ eMultiresModifierFlag_ControlEdges
@ eModifierMode_Render
@ eModifierMode_ApplyOnSpline
@ eModifierMode_Editmode
@ eModifierMode_Realtime
@ eModifierMode_OnCage
@ MOD_LAPLACIANDEFORM_BIND
@ MOD_LAPLACIANDEFORM_INVERT_VGROUP
@ MOD_WVG_MIX_INVERT_VGROUP_MASK
@ MOD_WVG_MIX_INVERT_VGROUP_B
@ MOD_WVG_MIX_WEIGHTS_NORMALIZE
@ MOD_WVG_MIX_INVERT_VGROUP_A
@ MOD_WVG_EDIT_INVERT_VGROUP_MASK
@ MOD_WVG_EDIT_WEIGHTS_NORMALIZE
@ MOD_WVG_INVERT_FALLOFF
@ MOD_WVG_EDIT_REMFVG
@ MOD_WVG_EDIT_ADD2VG
@ MOD_SOLIDIFY_MODE_NONMANIFOLD
@ MOD_SOLIDIFY_MODE_EXTRUDE
@ MOD_LATTICE_INVERT_VGROUP
@ eBooleanModifierSolver_Exact
@ eBooleanModifierSolver_Fast
@ MOD_WVG_MASK_TEX_USE_SAT
@ MOD_WVG_MASK_TEX_USE_BLUE
@ MOD_WVG_MASK_TEX_USE_INT
@ MOD_WVG_MASK_TEX_USE_ALPHA
@ MOD_WVG_MASK_TEX_USE_RED
@ MOD_WVG_MASK_TEX_USE_HUE
@ MOD_WVG_MASK_TEX_USE_VAL
@ MOD_WVG_MASK_TEX_USE_GREEN
@ MOD_SOLIDIFY_NONMANIFOLD_BOUNDARY_MODE_FLAT
@ MOD_SOLIDIFY_NONMANIFOLD_BOUNDARY_MODE_ROUND
@ MOD_SOLIDIFY_NONMANIFOLD_BOUNDARY_MODE_NONE
@ MOD_CORRECTIVESMOOTH_RESTSOURCE_ORCO
@ MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND
@ eParticleInstanceFlag_Parents
@ eParticleInstanceFlag_Alive
@ eParticleInstanceFlag_Dead
@ eParticleInstanceFlag_Children
@ eParticleInstanceFlag_Unborn
@ eParticleInstanceFlag_Path
@ eParticleInstanceFlag_UseSize
@ eParticleInstanceFlag_KeepShape
@ eBooleanModifierFlag_Collection
@ eBooleanModifierFlag_Self
@ eBooleanModifierFlag_HoleTolerant
@ eBooleanModifierFlag_Object
@ SUBSURF_TYPE_SIMPLE
@ SUBSURF_TYPE_CATMULL_CLARK
@ MOD_REMESH_VOXEL
@ MOD_REMESH_MASS_POINT
@ MOD_REMESH_SHARP_FEATURES
@ MOD_REMESH_CENTROID
@ MOD_VOLUME_DISPLACE_MAP_GLOBAL
@ MOD_VOLUME_DISPLACE_MAP_LOCAL
@ MOD_VOLUME_DISPLACE_MAP_OBJECT
@ MOD_LAPLACIANSMOOTH_X
@ MOD_LAPLACIANSMOOTH_Y
@ MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME
@ MOD_LAPLACIANSMOOTH_NORMALIZED
@ MOD_LAPLACIANSMOOTH_Z
@ MOD_LAPLACIANSMOOTH_INVERT_VGROUP
@ MOD_TRIANGULATE_NGON_BEAUTY
@ MOD_TRIANGULATE_NGON_EARCLIP
@ MOD_DECIM_FLAG_INVERT_VGROUP
@ MOD_DECIM_FLAG_SYMMETRY
@ MOD_DECIM_FLAG_TRIANGULATE
@ MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS
#define MOD_SHRINKWRAP_CULL_TARGET_MASK
@ MOD_OCEAN_SPECTRUM_TEXEL_MARSEN_ARSLOE
@ MOD_OCEAN_SPECTRUM_JONSWAP
@ MOD_OCEAN_SPECTRUM_PHILLIPS
@ MOD_OCEAN_SPECTRUM_PIERSON_MOSKOWITZ
@ MOD_ARR_OFF_RELATIVE
@ MOD_ARR_OFF_CONST
@ MOD_ARR_OFF_OBJ
@ MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR
@ MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE
@ MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR
@ MOD_SHRINKWRAP_CULL_TARGET_BACKFACE
@ MOD_SHRINKWRAP_INVERT_VGROUP
@ MOD_SHRINKWRAP_INVERT_CULL_TARGET
@ MOD_BEVEL_HARDEN_NORMALS
@ MOD_BEVEL_INVERT_VGROUP
@ MOD_BEVEL_WEIGHT
@ MOD_BEVEL_OVERLAP_OK
@ MOD_BEVEL_VGROUP
@ MOD_BEVEL_EVEN_WIDTHS
@ MOD_BEVEL_ANGLE
@ SUBSURF_BOUNDARY_SMOOTH_ALL
@ SUBSURF_BOUNDARY_SMOOTH_PRESERVE_CORNERS
@ MOD_MESHCACHE_TYPE_PC2
@ MOD_MESHCACHE_TYPE_MDD
@ MOD_BEVEL_MARK_SHARP
@ MOD_BEVEL_MARK_SEAM
@ MOD_OCEAN_GENERATE_NORMALS
@ MOD_OCEAN_GENERATE_FOAM
@ MOD_OCEAN_INVERT_SPRAY
@ MOD_OCEAN_GENERATE_SPRAY
@ MOD_CORRECTIVESMOOTH_SMOOTH_LENGTH_WEIGHT
@ MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE
@ MOD_DATATRANSFER_USE_VERT
@ MOD_DATATRANSFER_USE_EDGE
@ MOD_DATATRANSFER_OBSRC_TRANSFORM
@ MOD_DATATRANSFER_MAP_MAXDIST
@ MOD_DATATRANSFER_INVERT_VGROUP
@ MOD_DATATRANSFER_USE_LOOP
@ MOD_DATATRANSFER_USE_POLY
@ MOD_ARR_FITCURVE
@ MOD_ARR_FIXEDCOUNT
@ MOD_ARR_FITLENGTH
@ MOD_CAST_TYPE_CYLINDER
@ MOD_CAST_TYPE_SPHERE
@ MOD_CAST_TYPE_CUBOID
@ MOD_MESHCACHE_DEFORM_INTEGRATE
@ MOD_MESHCACHE_DEFORM_OVERWRITE
@ MOD_BUILD_FLAG_REVERSE
@ MOD_BUILD_FLAG_RANDOMIZE
@ MOD_CAST_USE_OB_TRANSFORM
@ MOD_CAST_INVERT_VGROUP
@ MOD_CAST_Y
@ MOD_CAST_X
@ MOD_CAST_Z
@ MOD_CAST_SIZE_FROM_RADIUS
@ MOD_CORRECTIVESMOOTH_ONLY_SMOOTH
@ MOD_CORRECTIVESMOOTH_PIN_BOUNDARY
@ MOD_CORRECTIVESMOOTH_INVERT_VGROUP
@ MOD_SMOOTH_Y
@ MOD_SMOOTH_INVERT_VGROUP
@ MOD_SMOOTH_X
@ MOD_SMOOTH_Z
@ 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
@ MOD_WVG_PROXIMITY_OBJECT
@ MOD_WVG_PROXIMITY_GEOMETRY
@ MOD_MASK_SMOOTH
@ MOD_MASK_INV
@ MOD_NORMALEDIT_NO_POLYNORS_FIX
@ MOD_NORMALEDIT_INVERT_VGROUP
@ MOD_NORMALEDIT_USE_DIRECTION_PARALLEL
@ MOD_SHRINKWRAP_TARGET_PROJECT
@ MOD_SHRINKWRAP_NEAREST_VERTEX
@ MOD_SHRINKWRAP_PROJECT
@ MOD_SHRINKWRAP_NEAREST_SURFACE
@ MOD_SCREW_NORMAL_CALC
@ MOD_SCREW_SMOOTH_SHADING
@ MOD_SCREW_UV_STRETCH_V
@ MOD_SCREW_MERGE
@ MOD_SCREW_UV_STRETCH_U
@ MOD_SCREW_NORMAL_FLIP
@ MOD_SCREW_OBJECT_OFFSET
@ MOD_CURVE_NEGZ
@ MOD_CURVE_POSX
@ MOD_CURVE_NEGX
@ MOD_CURVE_POSZ
@ MOD_CURVE_NEGY
@ MOD_CURVE_POSY
@ MOD_SIMPLEDEFORM_MODE_TAPER
@ MOD_SIMPLEDEFORM_MODE_STRETCH
@ MOD_SIMPLEDEFORM_MODE_BEND
@ MOD_SIMPLEDEFORM_MODE_TWIST
@ MOD_SHRINKWRAP_ON_SURFACE
@ MOD_SHRINKWRAP_OUTSIDE
@ MOD_SHRINKWRAP_INSIDE
@ MOD_SHRINKWRAP_ABOVE_SURFACE
@ MOD_SHRINKWRAP_OUTSIDE_SURFACE
@ MOD_TRIANGULATE_KEEP_CUSTOMLOOP_NORMALS
@ MOD_NORMALEDIT_MIX_COPY
@ MOD_NORMALEDIT_MIX_ADD
@ MOD_NORMALEDIT_MIX_SUB
@ MOD_NORMALEDIT_MIX_MUL
@ MOD_HOOK_UNIFORM_SPACE
@ MOD_HOOK_INVERT_VGROUP
@ MOD_SKIN_SMOOTH_SHADING
@ eModifierType_MeshToVolume
@ eModifierType_Weld
@ eModifierType_ParticleSystem
@ eModifierType_Mask
@ eModifierType_MeshDeform
@ eModifierType_Solidify
@ eModifierType_Explode
@ eModifierType_Subsurf
@ eModifierType_LaplacianSmooth
@ eModifierType_Mirror
@ eModifierType_WeightVGProximity
@ eModifierType_Boolean
@ eModifierType_SimpleDeform
@ eModifierType_Curve
@ eModifierType_Lattice
@ eModifierType_Surface
@ eModifierType_NormalEdit
@ eModifierType_Skin
@ eModifierType_Wave
@ eModifierType_Cloth
@ eModifierType_Fluid
@ eModifierType_VolumeToMesh
@ eModifierType_Shrinkwrap
@ eModifierType_MeshSequenceCache
@ eModifierType_EdgeSplit
@ eModifierType_Hook
@ eModifierType_Wireframe
@ eModifierType_WeightVGMix
@ eModifierType_Screw
@ eModifierType_VolumeDisplace
@ eModifierType_Ocean
@ eModifierType_LaplacianDeform
@ eModifierType_DataTransfer
@ eModifierType_UVProject
@ eModifierType_Armature
@ eModifierType_UVWarp
@ eModifierType_SurfaceDeform
@ eModifierType_Warp
@ eModifierType_CorrectiveSmooth
@ eModifierType_ParticleInstance
@ eModifierType_Nodes
@ eModifierType_Collision
@ eModifierType_Smooth
@ eModifierType_Bevel
@ eModifierType_DynamicPaint
@ eModifierType_Remesh
@ eModifierType_MeshCache
@ eModifierType_WeightVGEdit
@ eModifierType_Displace
@ eModifierType_Array
@ eModifierType_Softbody
@ eModifierType_Multires
@ eModifierType_Cast
@ eModifierType_WeightedNormal
@ eModifierType_Decimate
@ eModifierType_Build
@ eModifierType_Triangulate
@ MOD_DISP_MAP_OBJECT
@ MOD_DISP_MAP_GLOBAL
@ MOD_DISP_MAP_LOCAL
@ MOD_DISP_MAP_UV
@ MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS
@ MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS
@ MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS
@ MOD_MESHCACHE_INVERT_VERTEX_GROUP
@ MOD_MESHCACHE_INTERP_LINEAR
@ MOD_MESHCACHE_INTERP_NONE
@ MOD_MDEF_DYNAMIC_BIND
@ MOD_MDEF_INVERT_VGROUP
@ MOD_SIMPLEDEFORM_FLAG_INVERT_VGROUP
@ MOD_MESHCACHE_TIME_FRAME
@ MOD_MESHCACHE_TIME_FACTOR
@ MOD_MESHCACHE_TIME_SECONDS
@ MOD_WIREFRAME_OFS_EVEN
@ MOD_WIREFRAME_OFS_RELATIVE
@ MOD_WIREFRAME_INVERT_VGROUP
@ MOD_WIREFRAME_CREASE
@ MOD_WIREFRAME_BOUNDARY
@ MOD_WIREFRAME_REPLACE
@ MOD_SIMPLEDEFORM_LOCK_AXIS_Z
@ MOD_SIMPLEDEFORM_LOCK_AXIS_X
@ MOD_SIMPLEDEFORM_LOCK_AXIS_Y
@ MOD_UVWARP_INVERT_VGROUP
@ MOD_MIR_MIRROR_U
@ MOD_MIR_BISECT_AXIS_X
@ MOD_MIR_CLIPPING
@ MOD_MIR_MIRROR_V
@ MOD_MIR_AXIS_X
@ MOD_MIR_BISECT_FLIP_AXIS_X
@ MOD_MIR_VGROUP
@ MOD_MIR_NO_MERGE
@ MOD_MIR_MIRROR_UDIM
@ MOD_WVG_MAPPING_SHARP
@ MOD_WVG_MAPPING_SPHERE
@ MOD_WVG_MAPPING_STEP
@ MOD_WVG_MAPPING_NONE
@ MOD_WVG_MAPPING_ROOT
@ MOD_WVG_MAPPING_CURVE
@ MOD_WVG_MAPPING_RANDOM
@ MOD_WVG_MAPPING_SMOOTH
@ MOD_SOLIDIFY_RIM
@ MOD_SOLIDIFY_FLIP
@ MOD_SOLIDIFY_NORMAL_CALC
@ MOD_SOLIDIFY_EVEN
@ MOD_SOLIDIFY_OFFSET_ANGLE_CLAMP
@ MOD_SOLIDIFY_NONMANIFOLD_FLAT_FACES
@ MOD_SOLIDIFY_VGROUP_INV
@ MOD_SOLIDIFY_NOSHELL
@ MOD_WELD_MODE_CONNECTED
@ MOD_WELD_MODE_ALL
@ MOD_MESHSEQ_READ_COLOR
@ MOD_MESHSEQ_READ_VERT
@ MOD_MESHSEQ_INTERPOLATE_VERTICES
@ MOD_MESHSEQ_READ_UV
@ MOD_MESHSEQ_READ_POLY
@ MOD_BEVEL_FACE_STRENGTH_NONE
@ MOD_BEVEL_FACE_STRENGTH_AFFECTED
@ MOD_BEVEL_FACE_STRENGTH_NEW
@ MOD_BEVEL_FACE_STRENGTH_ALL
@ MOD_SKIN_SYMM_X
@ MOD_SKIN_SYMM_Z
@ MOD_SKIN_SYMM_Y
@ VOLUME_TO_MESH_USE_SMOOTH_SHADE
@ eExplodeFlag_Alive
@ eExplodeFlag_Dead
@ eExplodeFlag_EdgeCut
@ eExplodeFlag_INVERT_VGROUP
@ eExplodeFlag_PaSize
@ eExplodeFlag_Unborn
@ eSubsurfModifierFlag_UseRecursiveSubdivision
@ eSubsurfModifierFlag_UseCrease
@ eSubsurfModifierFlag_ControlEdges
@ eSubsurfModifierFlag_UseCustomNormals
@ MOD_WEIGHTEDNORMAL_KEEP_SHARP
@ MOD_WEIGHTEDNORMAL_FACE_INFLUENCE
@ MOD_WEIGHTEDNORMAL_INVERT_VGROUP
@ MOD_WVG_PROXIMITY_WEIGHTS_NORMALIZE
@ MOD_WVG_PROXIMITY_INVERT_VGROUP_MASK
@ MOD_WVG_PROXIMITY_GEOM_VERTS
@ MOD_WVG_PROXIMITY_INVERT_FALLOFF
@ MOD_WVG_PROXIMITY_GEOM_EDGES
@ MOD_WVG_PROXIMITY_GEOM_FACES
@ MOD_DISP_INVERT_VGROUP
@ MOD_NORMALEDIT_MODE_RADIAL
@ MOD_NORMALEDIT_MODE_DIRECTIONAL
@ MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_SIZE
@ MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_AMOUNT
@ VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE
@ VOLUME_TO_MESH_RESOLUTION_MODE_GRID
@ VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT
@ MOD_WARP_VOLUME_PRESERVE
@ MOD_WARP_INVERT_VGROUP
@ MOD_FLUID_TYPE_EFFEC
@ MOD_FLUID_TYPE_DOMAIN
@ MOD_FLUID_TYPE_FLOW
@ MOD_MESHCACHE_PLAY_CFEA
@ MOD_MESHCACHE_PLAY_EVAL
@ MOD_DECIM_MODE_UNSUBDIV
@ MOD_DECIM_MODE_COLLAPSE
@ MOD_DECIM_MODE_DISSOLVE
@ MOD_EDGESPLIT_FROMANGLE
@ MOD_EDGESPLIT_FROMFLAG
#define MOD_UVPROJECT_MAXPROJECTORS
@ eBooleanModifierOp_Intersect
@ eBooleanModifierOp_Union
@ eBooleanModifierOp_Difference
@ MOD_WELD_LOOSE_EDGES
@ MOD_WELD_INVERT_VGROUP
@ MOD_TRIANGULATE_QUAD_SHORTEDGE
@ MOD_TRIANGULATE_QUAD_FIXED
@ MOD_TRIANGULATE_QUAD_LONGEDGE
@ MOD_TRIANGULATE_QUAD_BEAUTY
@ MOD_TRIANGULATE_QUAD_ALTERNATE
@ MOD_CURVE_INVERT_VGROUP
@ eParticleInstanceSpace_World
@ eParticleInstanceSpace_Local
@ MOD_BEVEL_AFFECT_EDGES
@ MOD_BEVEL_AFFECT_VERTICES
@ MOD_SOLIDIFY_NONMANIFOLD_OFFSET_MODE_EVEN
@ MOD_SOLIDIFY_NONMANIFOLD_OFFSET_MODE_FIXED
@ MOD_SOLIDIFY_NONMANIFOLD_OFFSET_MODE_CONSTRAINTS
@ MOD_ARR_MERGE
@ MOD_ARR_MERGEFINAL
@ MOD_MASK_MODE_ARM
@ MOD_MASK_MODE_VGROUP
@ MOD_BEVEL_MITER_PATCH
@ MOD_BEVEL_MITER_SHARP
@ MOD_BEVEL_MITER_ARC
@ MOD_BEVEL_VMESH_ADJ
@ MOD_BEVEL_VMESH_CUTOFF
@ MOD_WEIGHTEDNORMAL_MODE_FACE
@ MOD_WEIGHTEDNORMAL_MODE_FACE_ANGLE
@ MOD_WEIGHTEDNORMAL_MODE_ANGLE
@ eBooleanModifierBMeshFlag_BMesh_NoDissolve
@ eBooleanModifierBMeshFlag_BMesh_Separate
@ eBooleanModifierBMeshFlag_BMesh_NoConnectRegions
@ SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_AND_JUNCTIONS
@ SUBSURF_UV_SMOOTH_ALL
@ SUBSURF_UV_SMOOTH_PRESERVE_CORNERS
@ SUBSURF_UV_SMOOTH_NONE
@ SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES
@ SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE
@ MOD_WVG_MIX_ADD
@ MOD_WVG_MIX_SUB
@ MOD_WVG_MIX_MIN
@ MOD_WVG_MIX_DIF
@ MOD_WVG_MIX_SET
@ MOD_WVG_MIX_MAX
@ MOD_WVG_MIX_DIV
@ MOD_WVG_MIX_AVG
@ MOD_WVG_MIX_MUL
@ MOD_DISP_DIR_RGB_XYZ
@ MOD_DISP_DIR_Z
@ MOD_DISP_DIR_Y
@ MOD_DISP_DIR_NOR
@ MOD_DISP_DIR_X
@ MOD_DISP_DIR_CLNOR
#define NTREE_GEOMETRY
@ OB_WIRE
Object is a sort of wrapper for general info.
@ OB_LATTICE
@ OB_EMPTY
@ OB_ARMATURE
@ OB_MESH
@ OB_CURVES_LEGACY
#define MAX_VGROUP_NAME
#define MINFRAME
#define MAXFRAMEF
#define MINAFRAMEF
#define MAXFRAME
@ UI_PANEL_DATA_EXPAND_ROOT
_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 type
Read Guarded memory(de)allocation.
#define MEM_SAFE_FREE(v)
void MOD_nodes_update_interface(Object *object, NodesModifierData *nmd)
Definition: MOD_nodes.cc:643
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color or the default fallback if none is specified Separate Split a vector into its and Z components Bevel
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Wireframe
#define RNA_MAX_ARRAY_LENGTH
Definition: RNA_define.h:25
#define RNA_MAX_ARRAY_DIMENSION
Definition: RNA_define.h:28
@ PARM_REQUIRED
Definition: RNA_types.h:352
@ PROP_SCALE_LOG
Definition: RNA_types.h:103
@ FUNC_USE_REPORTS
Definition: RNA_types.h:663
@ PROP_FLOAT
Definition: RNA_types.h:61
@ PROP_BOOLEAN
Definition: RNA_types.h:59
@ PROP_ENUM
Definition: RNA_types.h:63
@ PROP_INT
Definition: RNA_types.h:60
@ PROP_STRING
Definition: RNA_types.h:62
@ PROP_POINTER
Definition: RNA_types.h:64
@ PROP_COLLECTION
Definition: RNA_types.h:65
#define RNA_TRANSLATION_PREC_DEFAULT
Definition: RNA_types.h:117
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition: RNA_types.h:312
@ PROP_DYNAMIC
Definition: RNA_types.h:290
@ PROP_ANIMATABLE
Definition: RNA_types.h:202
@ PROP_PROPORTIONAL
Definition: RNA_types.h:223
@ PROP_EDITABLE
Definition: RNA_types.h:189
@ PROP_ENUM_FLAG
Definition: RNA_types.h:266
@ PROP_LIB_EXCEPTION
Definition: RNA_types.h:195
@ PROP_NEVER_NULL
Definition: RNA_types.h:239
@ PROP_NO_DEG_UPDATE
Definition: RNA_types.h:301
@ PROP_ID_SELF_CHECK
Definition: RNA_types.h:232
@ PROP_ID_REFCOUNT
Definition: RNA_types.h:226
#define RNA_ENUM_ITEM_HEADING(name, description)
Definition: RNA_types.h:477
@ PROP_TIME
Definition: RNA_types.h:146
@ PROP_MATRIX
Definition: RNA_types.h:158
@ PROP_XYZ
Definition: RNA_types.h:162
@ PROP_DISTANCE
Definition: RNA_types.h:149
@ PROP_ANGLE
Definition: RNA_types.h:145
@ PROP_COORDS
Definition: RNA_types.h:167
@ PROP_NONE
Definition: RNA_types.h:126
@ PROP_DIRPATH
Definition: RNA_types.h:130
@ PROP_PERCENTAGE
Definition: RNA_types.h:143
@ PROP_FACTOR
Definition: RNA_types.h:144
@ PROP_TRANSLATION
Definition: RNA_types.h:154
@ PROP_UNSIGNED
Definition: RNA_types.h:142
@ PROP_FILEPATH
Definition: RNA_types.h:129
@ PROP_VELOCITY
Definition: RNA_types.h:156
#define C
Definition: RandGen.cpp:25
#define ND_MODIFIER
Definition: WM_types.h:411
#define ND_TRANSFORM
Definition: WM_types.h:405
#define NA_RENAME
Definition: WM_types.h:527
#define NC_OBJECT
Definition: WM_types.h:329
return(oflags[bm->toolflag_index].f &oflag) !=0
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
Scene scene
Curve curve
const Depsgraph * depsgraph
bNodeTree * ntree
ccl_global float * buffer
ccl_gpu_kernel_postfix int ccl_global int * indices
static char ** types
Definition: makesdna.c:67
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:33
static unsigned a[3]
Definition: RandGen.cpp:78
T length(const vec_base< T, Size > &a)
static const EnumPropertyItem mode_items[]
Definition: paint_mask.c:59
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:136
const char * RNA_property_identifier(const PropertyRNA *prop)
Definition: rna_access.c:1000
const PointerRNA PointerRNA_NULL
Definition: rna_access.c:61
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:3493
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
Definition: rna_access.c:4781
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4910
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2143
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:186
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5004
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
Definition: rna_define.c:3836
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
Definition: rna_define.c:1148
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2740
void RNA_define_lib_overridable(const bool make_overridable)
Definition: rna_define.c:742
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
Definition: rna_define.c:1193
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2236
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
Definition: rna_define.c:3655
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3285
PropertyRNA * RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
Definition: rna_define.c:4076
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
Definition: rna_define.c:2106
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3126
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1645
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2695
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
Definition: rna_define.c:1653
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4273
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
Definition: rna_define.c:3420
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1237
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
Definition: rna_define.c:1937
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2944
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
Definition: rna_define.c:2926
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
Definition: rna_define.c:1598
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1872
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1048
void RNA_def_property_array(PropertyRNA *prop, int length)
Definition: rna_define.c:1539
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1737
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
Definition: rna_define.c:4144
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
Definition: rna_define.c:1920
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1772
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4347
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2900
const int rna_matrix_dimsize_4x4[]
Definition: rna_define.c:1595
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3224
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1257
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2669
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4487
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1103
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4342
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1495
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
Definition: rna_define.c:3385
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1028
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2601
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4436
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3028
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
Definition: rna_define.c:1245
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3687
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
Definition: rna_define.c:1160
void RNA_def_property_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
Definition: rna_define.c:2879
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2848
void RNA_def_property_ui_scale_type(PropertyRNA *prop, PropertyScaleType ui_scale_type)
Definition: rna_define.c:1715
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4459
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
Definition: rna_define.c:1534
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2493
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
Definition: rna_define.c:4472
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1664
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2343
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2327
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
Definition: rna_define.c:1503
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1518
const EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[]
void rna_object_vgroup_name_index_set(struct PointerRNA *ptr, const char *value, short *index)
void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index)
int rna_object_vgroup_name_index_length(struct PointerRNA *ptr, int index)
const EnumPropertyItem rna_enum_mesh_delimit_mode_items[]
Definition: rna_mesh.c:36
const EnumPropertyItem rna_enum_axis_xy_items[]
Definition: rna_modifier.c:609
static void rna_def_modifier_nodes(BlenderRNA *brna)
static void rna_def_modifier_fluid(BlenderRNA *brna)
static void rna_def_modifier_smooth(BlenderRNA *brna)
const EnumPropertyItem rna_enum_subdivision_uv_smooth_items[]
Definition: rna_modifier.c:629
const EnumPropertyItem rna_enum_dt_method_loop_items[]
Definition: rna_modifier.c:492
static void rna_def_modifier_screw(BlenderRNA *brna)
static void rna_def_modifier_uvproject(BlenderRNA *brna)
static void rna_def_modifier_particleinstance(BlenderRNA *brna)
static void rna_def_modifier_edgesplit(BlenderRNA *brna)
static void rna_def_modifier_bevel(BlenderRNA *brna)
const EnumPropertyItem rna_enum_dt_method_edge_items[]
Definition: rna_modifier.c:465
static void rna_def_modifier_cloth(BlenderRNA *brna)
static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
static void rna_def_modifier_uvwarp(BlenderRNA *brna)
static void rna_def_modifier_meshseqcache(BlenderRNA *brna)
static void rna_def_modifier_simpledeform(BlenderRNA *brna)
static void rna_def_modifier_datatransfer(BlenderRNA *brna)
static void rna_def_modifier_weightvgmix(BlenderRNA *brna)
static void rna_def_modifier_meshdeform(BlenderRNA *brna)
static void rna_def_modifier_laplaciandeform(BlenderRNA *brna)
const EnumPropertyItem rna_enum_dt_method_poly_items[]
Definition: rna_modifier.c:523
static void rna_def_modifier_explode(BlenderRNA *brna)
const EnumPropertyItem rna_enum_axis_flag_xyz_items[]
Definition: rna_modifier.c:622
static const EnumPropertyItem modifier_warp_falloff_items[]
Definition: rna_modifier.c:417
static void rna_def_modifier_particlesystem(BlenderRNA *brna)
static void rna_def_modifier_dynamic_paint(BlenderRNA *brna)
static void rna_def_modifier_generic_map_info(StructRNA *srna)
const EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[]
Definition: rna_modifier.c:333
static void rna_def_modifier_mirror(BlenderRNA *brna)
static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna), StructRNA *srna, const char *mask_flags, const int invert_vgroup_mask_flag, const char *mask_vgroup_setter, const char *mask_uvlayer_setter)
static void rna_def_modifier_normaledit(BlenderRNA *brna)
static void rna_def_modifier_displace(BlenderRNA *brna)
const EnumPropertyItem rna_enum_shrinkwrap_face_cull_items[]
Definition: rna_modifier.c:404
static void rna_def_modifier_meshcache(BlenderRNA *brna)
static void rna_def_modifier_skin(BlenderRNA *brna)
const EnumPropertyItem rna_enum_object_modifier_type_items[]
Definition: rna_modifier.c:49
static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
const EnumPropertyItem rna_enum_dt_mix_mode_items[]
Definition: rna_modifier.c:544
static void rna_def_modifier_weld(BlenderRNA *brna)
static void rna_def_modifier_cast(BlenderRNA *brna)
static void rna_def_modifier_surface(BlenderRNA *brna)
static void rna_def_modifier_curve(BlenderRNA *brna)
static void rna_def_modifier_wireframe(BlenderRNA *brna)
static void rna_def_modifier_softbody(BlenderRNA *brna)
const EnumPropertyItem rna_enum_dt_layers_select_src_items[]
Definition: rna_modifier.c:582
static void rna_def_modifier_subsurf(BlenderRNA *brna)
static void rna_def_modifier_volume_displace(BlenderRNA *brna)
const EnumPropertyItem rna_enum_shrinkwrap_type_items[]
Definition: rna_modifier.c:379
static void rna_def_modifier_wave(BlenderRNA *brna)
static void rna_def_modifier_surfacedeform(BlenderRNA *brna)
const EnumPropertyItem rna_enum_axis_xyz_items[]
Definition: rna_modifier.c:615
static void rna_def_modifier_lattice(BlenderRNA *brna)
static void rna_def_property_subdivision_common(StructRNA *srna)
const EnumPropertyItem rna_enum_dt_method_vertex_items[]
Definition: rna_modifier.c:433
const EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[]
Definition: rna_modifier.c:304
void RNA_def_modifier(BlenderRNA *brna)
static void rna_def_modifier_multires(BlenderRNA *brna)
static void rna_def_modifier_triangulate(BlenderRNA *brna)
static void rna_def_modifier_mask(BlenderRNA *brna)
static void rna_def_modifier_warp(BlenderRNA *brna)
static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
static void rna_def_modifier_laplaciansmooth(BlenderRNA *brna)
static void rna_def_modifier_hook(BlenderRNA *brna)
static void rna_def_modifier_solidify(BlenderRNA *brna)
static void rna_def_modifier_ocean(BlenderRNA *brna)
static void rna_def_modifier_array(BlenderRNA *brna)
static void rna_def_modifier_collision(BlenderRNA *brna)
static void rna_def_modifier_armature(BlenderRNA *brna)
static void rna_def_modifier_weightednormal(BlenderRNA *brna)
static void rna_def_modifier_decimate(BlenderRNA *brna)
static void rna_def_modifier_mesh_to_volume(BlenderRNA *brna)
const EnumPropertyItem rna_enum_dt_layers_select_dst_items[]
Definition: rna_modifier.c:598
static void rna_def_modifier_boolean(BlenderRNA *brna)
const EnumPropertyItem rna_enum_subdivision_boundary_smooth_items[]
Definition: rna_modifier.c:657
static void rna_def_modifier_remesh(BlenderRNA *brna)
static void rna_def_modifier_build(BlenderRNA *brna)
const EnumPropertyItem rna_enum_modifier_shrinkwrap_mode_items[]
Definition: rna_modifier.c:347
static void rna_def_modifier_correctivesmooth(BlenderRNA *brna)
static void rna_def_modifier_volume_to_mesh(BlenderRNA *brna)
const EnumPropertyItem rna_enum_object_axis_items[]
Definition: rna_object.c:297
static const EnumPropertyItem prop_solver_items[]
Definition: rna_pose.c:919
static const EnumPropertyItem prop_direction_items[]
Definition: screen_ops.c:2544
#define min(a, b)
Definition: sort.c:35
struct Object * curve_ob
struct CurveProfile * custom_profile
CorrectiveSmoothDeltaCache delta_cache
struct Object * object
struct FluidDomainSettings * domain
struct Object * object
Definition: DNA_ID.h:368
void * first
Definition: DNA_listBase.h:31
Definition: BKE_main.h:121
CustomData vdata
CustomData ldata
struct ModifierData * next
struct ModifierData * prev
struct StructRNA * srna
Definition: BKE_modifier.h:158
struct NodesModifierSettings settings
struct IDProperty * properties
ListBase particlesystem
ListBase modifiers
struct PartDeflect * pd
struct SoftBody * soft
void * data
void * data
Definition: RNA_types.h:38
struct ID * owner_id
Definition: RNA_types.h:36
struct PointCache * pointcache
struct SoftBody_Shared * shared
struct Object * projectors[10]
struct bDeformGroup * next
float max
#define N_(msgid)
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3480