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