4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * Contributor(s): Blender Foundation (2008), Juho Veps‰l‰inen
22 * ***** END GPL LICENSE BLOCK *****
25 /** \file blender/makesrna/intern/rna_modifier.c
34 #include "RNA_define.h"
36 #include "rna_internal.h"
38 #include "DNA_armature_types.h"
39 #include "DNA_modifier_types.h"
40 #include "DNA_object_types.h"
41 #include "DNA_object_force.h"
42 #include "DNA_scene_types.h"
44 #include "MEM_guardedalloc.h"
48 #include "BKE_animsys.h"
49 #include "BKE_bmesh.h" /* For BevelModifierData */
50 #include "BKE_multires.h"
51 #include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */
56 EnumPropertyItem modifier_type_items[] ={
57 {0, "", 0, "Generate", ""},
58 {eModifierType_Array, "ARRAY", ICON_MOD_ARRAY, "Array", ""},
59 {eModifierType_Bevel, "BEVEL", ICON_MOD_BEVEL, "Bevel", ""},
60 {eModifierType_Boolean, "BOOLEAN", ICON_MOD_BOOLEAN, "Boolean", ""},
61 {eModifierType_Build, "BUILD", ICON_MOD_BUILD, "Build", ""},
62 {eModifierType_Decimate, "DECIMATE", ICON_MOD_DECIM, "Decimate", ""},
63 {eModifierType_EdgeSplit, "EDGE_SPLIT", ICON_MOD_EDGESPLIT, "Edge Split", ""},
64 {eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
65 {eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
66 {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
67 {eModifierType_Screw, "SCREW", ICON_MOD_SCREW, "Screw", ""},
68 {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""},
69 {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
70 {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
71 {0, "", 0, "Deform", ""},
72 {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
73 {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""},
74 {eModifierType_Curve, "CURVE", ICON_MOD_CURVE, "Curve", ""},
75 {eModifierType_Displace, "DISPLACE", ICON_MOD_DISPLACE, "Displace", ""},
76 {eModifierType_Hook, "HOOK", ICON_HOOK, "Hook", ""},
77 {eModifierType_Lattice, "LATTICE", ICON_MOD_LATTICE, "Lattice", ""},
78 {eModifierType_MeshDeform, "MESH_DEFORM", ICON_MOD_MESHDEFORM, "Mesh Deform", ""},
79 {eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, "Shrinkwrap", ""},
80 {eModifierType_SimpleDeform, "SIMPLE_DEFORM", ICON_MOD_SIMPLEDEFORM, "Simple Deform", ""},
81 {eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
82 {eModifierType_Warp, "WARP", ICON_MOD_SUBSURF, "Warp", ""},
83 {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
84 {0, "", 0, "Simulate", ""},
85 {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
86 {eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
87 {eModifierType_Explode, "EXPLODE", ICON_MOD_EXPLODE, "Explode", ""},
88 {eModifierType_Fluidsim, "FLUID_SIMULATION", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
89 {eModifierType_ParticleInstance, "PARTICLE_INSTANCE", ICON_MOD_PARTICLES, "Particle Instance", ""},
90 {eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, "Particle System", ""},
91 {eModifierType_Smoke, "SMOKE", ICON_MOD_SMOKE, "Smoke", ""},
92 {eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
93 {eModifierType_Surface, "SURFACE", ICON_MOD_PHYSICS, "Surface", ""},
94 {eModifierType_NgonInterp, "NGONINTERP", ICON_MOD_LATTICE, "Precision UV Interpolation", ""},
95 {0, NULL, 0, NULL, NULL}};
99 #include "DNA_particle_types.h"
100 #include "DNA_smoke_types.h"
102 #include "BKE_context.h"
103 #include "BKE_depsgraph.h"
104 #include "BKE_library.h"
105 #include "BKE_modifier.h"
106 #include "BKE_particle.h"
108 static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
110 UVProjectModifierData *uvp= (UVProjectModifierData*)ptr->data;
111 rna_iterator_array_begin(iter, (void*)uvp->projectors, sizeof(Object*), uvp->num_projectors, 0, NULL);
114 static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
116 ModifierData *md= (ModifierData*)ptr->data;
119 case eModifierType_Subsurf:
120 return &RNA_SubsurfModifier;
121 case eModifierType_Lattice:
122 return &RNA_LatticeModifier;
123 case eModifierType_Curve:
124 return &RNA_CurveModifier;
125 case eModifierType_Build:
126 return &RNA_BuildModifier;
127 case eModifierType_Mirror:
128 return &RNA_MirrorModifier;
129 case eModifierType_Decimate:
130 return &RNA_DecimateModifier;
131 case eModifierType_Wave:
132 return &RNA_WaveModifier;
133 case eModifierType_Armature:
134 return &RNA_ArmatureModifier;
135 case eModifierType_Hook:
136 return &RNA_HookModifier;
137 case eModifierType_Softbody:
138 return &RNA_SoftBodyModifier;
139 case eModifierType_Boolean:
140 return &RNA_BooleanModifier;
141 case eModifierType_Array:
142 return &RNA_ArrayModifier;
143 case eModifierType_EdgeSplit:
144 return &RNA_EdgeSplitModifier;
145 case eModifierType_Displace:
146 return &RNA_DisplaceModifier;
147 case eModifierType_UVProject:
148 return &RNA_UVProjectModifier;
149 case eModifierType_Smooth:
150 return &RNA_SmoothModifier;
151 case eModifierType_Cast:
152 return &RNA_CastModifier;
153 case eModifierType_MeshDeform:
154 return &RNA_MeshDeformModifier;
155 case eModifierType_ParticleSystem:
156 return &RNA_ParticleSystemModifier;
157 case eModifierType_ParticleInstance:
158 return &RNA_ParticleInstanceModifier;
159 case eModifierType_Explode:
160 return &RNA_ExplodeModifier;
161 case eModifierType_Cloth:
162 return &RNA_ClothModifier;
163 case eModifierType_Collision:
164 return &RNA_CollisionModifier;
165 case eModifierType_Bevel:
166 return &RNA_BevelModifier;
167 case eModifierType_Shrinkwrap:
168 return &RNA_ShrinkwrapModifier;
169 case eModifierType_Fluidsim:
170 return &RNA_FluidSimulationModifier;
171 case eModifierType_Mask:
172 return &RNA_MaskModifier;
173 case eModifierType_SimpleDeform:
174 return &RNA_SimpleDeformModifier;
175 case eModifierType_Multires:
176 return &RNA_MultiresModifier;
177 case eModifierType_Surface:
178 return &RNA_SurfaceModifier;
179 case eModifierType_NgonInterp:
180 return &RNA_NgonInterpModifier;
181 case eModifierType_Smoke:
182 return &RNA_SmokeModifier;
183 case eModifierType_Solidify:
184 return &RNA_SolidifyModifier;
185 case eModifierType_Screw:
186 return &RNA_ScrewModifier;
187 case eModifierType_Warp:
188 return &RNA_WarpModifier;
190 return &RNA_Modifier;
194 void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
196 ModifierData *md= ptr->data;
197 char oldname[sizeof(md->name)];
199 /* make a copy of the old name first */
200 BLI_strncpy(oldname, md->name, sizeof(md->name));
202 /* copy the new name into the name slot */
203 BLI_strncpy(md->name, value, sizeof(md->name));
205 /* make sure the name is truly unique */
207 Object *ob= ptr->id.data;
208 modifier_unique_name(&ob->modifiers, md);
211 /* fix all the animation data which may link to this */
212 BKE_all_animdata_fix_paths_rename("modifiers", oldname, md->name);
215 static char *rna_Modifier_path(PointerRNA *ptr)
217 return BLI_sprintfN("modifiers[\"%s\"]", ((ModifierData*)ptr->data)->name);
220 static void rna_Modifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
222 DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
223 WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ptr->id.data);
226 static void rna_Modifier_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
228 rna_Modifier_update(bmain, scene, ptr);
229 DAG_scene_sort(bmain, scene);
232 static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
234 SmokeModifierData *smd= (SmokeModifierData *)ptr->data;
235 Object *ob= (Object*)ptr->id.data;
236 ParticleSystemModifierData *psmd = NULL;
237 ParticleSystem *psys = NULL;
238 ParticleSettings *part = NULL;
241 if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
244 smokeModifier_free(smd); // XXX TODO: completely free all 3 pointers
245 smokeModifier_createType(smd); // create regarding of selected type
248 case MOD_SMOKE_TYPE_DOMAIN:
251 case MOD_SMOKE_TYPE_FLOW:
252 for(psys=ob->particlesystem.first; psys; psys=psys->next)
253 if(psys->part->type == PART_EMITTER)
255 if(ob->type == OB_MESH && !psys) {
256 /* add particle system */
257 psmd = (ParticleSystemModifierData *)object_add_particle_system(scene, ob, NULL);
262 part->lifetime = 1.0f;
265 part->ren_as = PART_DRAW_NOT;
266 part->draw_as = PART_DRAW_DOT;
267 sprintf(psys->name, "SmokeParticles");
268 psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
269 DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
273 smd->flow->psys = psys;
274 case MOD_SMOKE_TYPE_COLL:
281 // update dependancy since a domain - other type switch could have happened
282 rna_Modifier_dependency_update(bmain, scene, ptr);
285 static void rna_ExplodeModifier_vgroup_get(PointerRNA *ptr, char *value)
287 ExplodeModifierData *emd= (ExplodeModifierData*)ptr->data;
288 rna_object_vgroup_name_index_get(ptr, value, emd->vgroup);
291 static int rna_ExplodeModifier_vgroup_length(PointerRNA *ptr)
293 ExplodeModifierData *emd= (ExplodeModifierData*)ptr->data;
294 return rna_object_vgroup_name_index_length(ptr, emd->vgroup);
297 static void rna_ExplodeModifier_vgroup_set(PointerRNA *ptr, const char *value)
299 ExplodeModifierData *emd= (ExplodeModifierData*)ptr->data;
300 rna_object_vgroup_name_index_set(ptr, value, &emd->vgroup);
303 static void rna_SimpleDeformModifier_vgroup_set(PointerRNA *ptr, const char *value)
305 SimpleDeformModifierData *smd= (SimpleDeformModifierData*)ptr->data;
306 rna_object_vgroup_name_set(ptr, value, smd->vgroup_name, sizeof(smd->vgroup_name));
309 static void rna_ShrinkwrapModifier_vgroup_set(PointerRNA *ptr, const char *value)
311 ShrinkwrapModifierData *smd= (ShrinkwrapModifierData*)ptr->data;
312 rna_object_vgroup_name_set(ptr, value, smd->vgroup_name, sizeof(smd->vgroup_name));
315 static void rna_LatticeModifier_vgroup_set(PointerRNA *ptr, const char *value)
317 LatticeModifierData *lmd= (LatticeModifierData*)ptr->data;
318 rna_object_vgroup_name_set(ptr, value, lmd->name, sizeof(lmd->name));
321 static void rna_ArmatureModifier_vgroup_set(PointerRNA *ptr, const char *value)
323 ArmatureModifierData *lmd= (ArmatureModifierData*)ptr->data;
324 rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
327 static void rna_CurveModifier_vgroup_set(PointerRNA *ptr, const char *value)
329 CurveModifierData *lmd= (CurveModifierData*)ptr->data;
330 rna_object_vgroup_name_set(ptr, value, lmd->name, sizeof(lmd->name));
333 static void rna_DisplaceModifier_vgroup_set(PointerRNA *ptr, const char *value)
335 DisplaceModifierData *lmd= (DisplaceModifierData*)ptr->data;
336 rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
339 static void rna_HookModifier_vgroup_set(PointerRNA *ptr, const char *value)
341 HookModifierData *lmd= (HookModifierData*)ptr->data;
342 rna_object_vgroup_name_set(ptr, value, lmd->name, sizeof(lmd->name));
345 static void rna_MaskModifier_vgroup_set(PointerRNA *ptr, const char *value)
347 MaskModifierData *lmd= (MaskModifierData*)ptr->data;
348 rna_object_vgroup_name_set(ptr, value, lmd->vgroup, sizeof(lmd->vgroup));
351 static void rna_MeshDeformModifier_vgroup_set(PointerRNA *ptr, const char *value)
353 MeshDeformModifierData *lmd= (MeshDeformModifierData*)ptr->data;
354 rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
357 static void rna_SmoothModifier_vgroup_set(PointerRNA *ptr, const char *value)
359 SmoothModifierData *lmd= (SmoothModifierData*)ptr->data;
360 rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
363 static void rna_WaveModifier_vgroup_set(PointerRNA *ptr, const char *value)
365 WaveModifierData *lmd= (WaveModifierData*)ptr->data;
366 rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
369 static void rna_CastModifier_vgroup_set(PointerRNA *ptr, const char *value)
371 CastModifierData *lmd= (CastModifierData*)ptr->data;
372 rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
375 static void rna_SolidifyModifier_vgroup_set(PointerRNA *ptr, const char *value)
377 SolidifyModifierData *smd= (SolidifyModifierData*)ptr->data;
378 rna_object_vgroup_name_set(ptr, value, smd->defgrp_name, sizeof(smd->defgrp_name));
381 static void rna_MappingInfo_uvlayer_set(PointerRNA *ptr, const char *value)
383 MappingInfoModifierData *mmd= (MappingInfoModifierData *)ptr->data;
384 rna_object_uvlayer_name_set(ptr, value, mmd->uvlayer_name, sizeof(mmd->uvlayer_name));
387 static void rna_UVProjectModifier_uvlayer_set(PointerRNA *ptr, const char *value)
389 UVProjectModifierData *umd= (UVProjectModifierData*)ptr->data;
390 rna_object_uvlayer_name_set(ptr, value, umd->uvlayer_name, sizeof(umd->uvlayer_name));
393 static void RNA_WarpModifier_vgroup_set(PointerRNA *ptr, const char *value)
395 WarpModifierData *tmd= (WarpModifierData*)ptr->data;
396 rna_object_vgroup_name_set(ptr, value, tmd->defgrp_name, sizeof(tmd->defgrp_name));
399 static void rna_WaveModifier_uvlayer_set(PointerRNA *ptr, const char *value)
401 WaveModifierData *wmd= (WaveModifierData*)ptr->data;
402 rna_object_uvlayer_name_set(ptr, value, wmd->uvlayer_name, sizeof(wmd->uvlayer_name));
405 static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max)
407 MultiresModifierData *mmd = (MultiresModifierData*)ptr->data;
413 static int rna_MultiresModifier_external_get(PointerRNA *ptr)
415 Object *ob= (Object*)ptr->id.data;
418 return CustomData_external_test(&me->ldata, CD_MDISPS);
421 static void rna_MultiresModifier_filepath_get(PointerRNA *ptr, char *value)
423 Object *ob= (Object*)ptr->id.data;
424 CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external;
426 BLI_strncpy(value, (external)? external->filename: "", sizeof(external->filename));
429 static void rna_MultiresModifier_filepath_set(PointerRNA *ptr, const char *value)
431 Object *ob= (Object*)ptr->id.data;
432 CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external;
434 if(external && strcmp(external->filename, value)) {
435 BLI_strncpy(external->filename, value, sizeof(external->filename));
436 multires_force_external_reload(ob);
440 static int rna_MultiresModifier_filepath_length(PointerRNA *ptr)
442 Object *ob= (Object*)ptr->id.data;
443 CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external;
445 return strlen((external)? external->filename: "");
448 static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRNA value)
450 Object *ob= value.data;
452 if(!self || ob != self) {
453 if(!ob || type == OB_EMPTY || ob->type == type) {
454 id_lib_extern((ID *)ob);
460 static void rna_LatticeModifier_object_set(PointerRNA *ptr, PointerRNA value)
462 modifier_object_set(ptr->id.data, &((LatticeModifierData*)ptr->data)->object, OB_LATTICE, value);
465 static void rna_BooleanModifier_object_set(PointerRNA *ptr, PointerRNA value)
467 modifier_object_set(ptr->id.data, &((BooleanModifierData*)ptr->data)->object, OB_MESH, value);
470 static void rna_CurveModifier_object_set(PointerRNA *ptr, PointerRNA value)
472 modifier_object_set(ptr->id.data, &((CurveModifierData*)ptr->data)->object, OB_CURVE, value);
475 static void rna_CastModifier_object_set(PointerRNA *ptr, PointerRNA value)
477 modifier_object_set(ptr->id.data, &((CastModifierData*)ptr->data)->object, OB_EMPTY, value);
480 static void rna_ArmatureModifier_object_set(PointerRNA *ptr, PointerRNA value)
482 modifier_object_set(ptr->id.data, &((ArmatureModifierData*)ptr->data)->object, OB_ARMATURE, value);
485 static void rna_MaskModifier_armature_set(PointerRNA *ptr, PointerRNA value)
487 modifier_object_set(ptr->id.data, &((MaskModifierData*)ptr->data)->ob_arm, OB_ARMATURE, value);
490 static void rna_ShrinkwrapModifier_auxiliary_target_set(PointerRNA *ptr, PointerRNA value)
492 modifier_object_set(ptr->id.data, &((ShrinkwrapModifierData*)ptr->data)->auxTarget, OB_MESH, value);
495 static void rna_ShrinkwrapModifier_target_set(PointerRNA *ptr, PointerRNA value)
497 modifier_object_set(ptr->id.data, &((ShrinkwrapModifierData*)ptr->data)->target, OB_MESH, value);
500 static int rna_ShrinkwrapModifier_face_cull_get(PointerRNA *ptr)
502 ShrinkwrapModifierData *swm= (ShrinkwrapModifierData*)ptr->data;
503 return swm->shrinkOpts & (MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE|MOD_SHRINKWRAP_CULL_TARGET_BACKFACE);
506 static void rna_ShrinkwrapModifier_face_cull_set(struct PointerRNA *ptr, int value)
508 ShrinkwrapModifierData *swm= (ShrinkwrapModifierData*)ptr->data;
510 swm->shrinkOpts= (swm->shrinkOpts & ~(MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE|MOD_SHRINKWRAP_CULL_TARGET_BACKFACE)) | value;
513 static void rna_MeshDeformModifier_object_set(PointerRNA *ptr, PointerRNA value)
515 modifier_object_set(ptr->id.data, &((MeshDeformModifierData*)ptr->data)->object, OB_MESH, value);
518 static void rna_ArrayModifier_end_cap_set(PointerRNA *ptr, PointerRNA value)
520 modifier_object_set(ptr->id.data, &((ArrayModifierData*)ptr->data)->end_cap, OB_MESH, value);
523 static void rna_ArrayModifier_start_cap_set(PointerRNA *ptr, PointerRNA value)
525 modifier_object_set(ptr->id.data, &((ArrayModifierData*)ptr->data)->start_cap, OB_MESH, value);
528 static void rna_ArrayModifier_curve_set(PointerRNA *ptr, PointerRNA value)
530 modifier_object_set(ptr->id.data, &((ArrayModifierData*)ptr->data)->curve_ob, OB_CURVE, value);
533 static int rna_MeshDeformModifier_is_bound_get(PointerRNA *ptr)
535 return (((MeshDeformModifierData*)ptr->data)->bindcagecos != NULL);
538 static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)
540 Object *ob= (Object*)ptr->id.data;
541 return rna_pointer_inherit_refine(ptr, &RNA_SoftBodySettings, ob->soft);
544 static PointerRNA rna_SoftBodyModifier_point_cache_get(PointerRNA *ptr)
546 Object *ob= (Object*)ptr->id.data;
547 return rna_pointer_inherit_refine(ptr, &RNA_PointCache, ob->soft->pointcache);
550 static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
552 Object *ob= (Object*)ptr->id.data;
553 return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
556 static PointerRNA rna_UVProjector_object_get(PointerRNA *ptr)
558 Object **ob= (Object**)ptr->data;
559 return rna_pointer_inherit_refine(ptr, &RNA_Object, *ob);
562 static void rna_UVProjector_object_set(PointerRNA *ptr, PointerRNA value)
564 Object **ob= (Object**)ptr->data;
569 id_us_plus((ID*)value.data);
574 static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value)
576 UVProjectModifierData *md= (UVProjectModifierData*)ptr->data;
579 md->num_projectors= CLAMPIS(value, 1, MOD_UVPROJECT_MAX);
580 for(a=md->num_projectors; a<MOD_UVPROJECT_MAX; a++)
581 md->projectors[a]= NULL;
586 static void rna_def_property_subdivision_common(StructRNA *srna, const char type[])
588 static EnumPropertyItem prop_subdivision_type_items[] = {
589 {0, "CATMULL_CLARK", 0, "Catmull-Clark", ""},
590 {1, "SIMPLE", 0, "Simple", ""},
591 {0, NULL, 0, NULL, NULL}};
593 PropertyRNA *prop= RNA_def_property(srna, "subdivision_type", PROP_ENUM, PROP_NONE);
594 RNA_def_property_enum_sdna(prop, NULL, type);
595 RNA_def_property_enum_items(prop, prop_subdivision_type_items);
596 RNA_def_property_ui_text(prop, "Subdivision Type", "Selects type of subdivision algorithm");
597 RNA_def_property_update(prop, 0, "rna_Modifier_update");
600 static void rna_def_modifier_subsurf(BlenderRNA *brna)
605 srna= RNA_def_struct(brna, "SubsurfModifier", "Modifier");
606 RNA_def_struct_ui_text(srna, "Subsurf Modifier", "Subdivision surface modifier");
607 RNA_def_struct_sdna(srna, "SubsurfModifierData");
608 RNA_def_struct_ui_icon(srna, ICON_MOD_SUBSURF);
610 rna_def_property_subdivision_common(srna, "subdivType");
612 prop= RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
613 RNA_def_property_int_sdna(prop, NULL, "levels");
614 RNA_def_property_ui_range(prop, 0, 6, 1, 0);
615 RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform");
616 RNA_def_property_update(prop, 0, "rna_Modifier_update");
618 prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
619 RNA_def_property_int_sdna(prop, NULL, "renderLevels");
620 RNA_def_property_ui_range(prop, 0, 6, 1, 0);
621 RNA_def_property_ui_text(prop, "Render Levels", "Number of subdivisions to perform when rendering");
623 prop= RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
624 RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_ControlEdges);
625 RNA_def_property_ui_text(prop, "Optimal Display", "Skip drawing/rendering of interior subdivided edges");
626 RNA_def_property_update(prop, 0, "rna_Modifier_update");
628 prop= RNA_def_property(srna, "use_subsurf_uv", PROP_BOOLEAN, PROP_NONE);
629 RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_SubsurfUv);
630 RNA_def_property_ui_text(prop, "Subdivide UVs", "Use subsurf to subdivide UVs");
631 RNA_def_property_update(prop, 0, "rna_Modifier_update");
634 static void rna_def_modifier_generic_map_info(StructRNA *srna)
636 static EnumPropertyItem prop_texture_coordinates_items[] = {
637 {MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Map", "Uses the local coordinate system for the texture coordinates"},
638 {MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", "Uses the global coordinate system for the texture coordinates"},
639 {MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object", "Uses the linked object's local coordinate system for the texture coordinates"},
640 {MOD_DISP_MAP_UV, "UV", 0, "UV", "Uses UV coordinates for the texture coordinates"},
641 {0, NULL, 0, NULL, NULL}};
645 prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
646 RNA_def_property_ui_text(prop, "Texture", "");
647 RNA_def_property_flag(prop, PROP_EDITABLE);
648 RNA_def_property_update(prop, 0, "rna_Modifier_update");
650 prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
651 RNA_def_property_enum_sdna(prop, NULL, "texmapping");
652 RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
653 RNA_def_property_ui_text(prop, "Texture Coordinates", "");
654 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
656 prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
657 RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
658 RNA_def_property_ui_text(prop, "UV Layer", "UV layer name");
659 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MappingInfo_uvlayer_set");
660 RNA_def_property_update(prop, 0, "rna_Modifier_update");
662 prop= RNA_def_property(srna, "texture_coords_object", PROP_POINTER, PROP_NONE);
663 RNA_def_property_pointer_sdna(prop, NULL, "map_object");
664 RNA_def_property_ui_text(prop, "Texture Coordinate Object", "Object to set the texture coordinates");
665 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
666 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
669 static void rna_def_modifier_warp(BlenderRNA *brna)
674 static EnumPropertyItem prop_falloff_items[] = {
675 {eWarp_Falloff_None, "NONE", 0, "No Falloff", ""},
676 {eWarp_Falloff_Curve, "CURVE", 0, "Curve", ""},
677 {eWarp_Falloff_Smooth, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
678 {eWarp_Falloff_Sphere, "SPHERE", ICON_SPHERECURVE, "Sphere", ""},
679 {eWarp_Falloff_Root, "ROOT", ICON_ROOTCURVE, "Root", ""},
680 {eWarp_Falloff_Sharp, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
681 {eWarp_Falloff_Linear, "LINEAR", ICON_LINCURVE, "Linear", ""},
682 {eWarp_Falloff_Const, "CONSTANT", ICON_NOCURVE, "Constant", ""},
683 {0, NULL, 0, NULL, NULL}};
685 srna= RNA_def_struct(brna, "WarpModifier", "Modifier");
686 RNA_def_struct_ui_text(srna, "Warp Modifier", "Warp modifier");
687 RNA_def_struct_sdna(srna, "WarpModifierData");
688 //RNA_def_struct_ui_icon(srna, ICON_MOD_SUBSURF);
690 prop= RNA_def_property(srna, "object_from", PROP_POINTER, PROP_NONE);
691 RNA_def_property_ui_text(prop, "From", "Object to transform from");
692 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
693 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
695 prop= RNA_def_property(srna, "object_to", PROP_POINTER, PROP_NONE);
696 RNA_def_property_ui_text(prop, "To", "Object to transform to");
697 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
698 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
700 prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
701 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
702 RNA_def_property_ui_range(prop, -100, 100, 10, 2);
703 RNA_def_property_ui_text(prop, "Strength", "");
704 RNA_def_property_update(prop, 0, "rna_Modifier_update");
706 prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
707 RNA_def_property_enum_items(prop, prop_falloff_items);
708 RNA_def_property_ui_text(prop, "Falloff Type", "");
709 RNA_def_property_update(prop, 0, "rna_Modifier_update");
711 prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_UNSIGNED);
712 RNA_def_property_ui_text(prop, "Radius", "Radius to apply");
713 RNA_def_property_update(prop, 0, "rna_Modifier_update");
715 prop= RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
716 RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
717 RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
718 RNA_def_property_update(prop, 0, "rna_Modifier_update");
720 prop= RNA_def_property(srna, "use_volume_preserve", PROP_BOOLEAN, PROP_NONE);
721 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WARP_VOLUME_PRESERVE);
722 RNA_def_property_ui_text(prop, "Preserve Volume", "Preserve volume when rotations are used");
723 RNA_def_property_update(prop, 0, "rna_Modifier_update");
725 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
726 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
727 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the deform");
728 RNA_def_property_string_funcs(prop, NULL, NULL, "RNA_WarpModifier_vgroup_set");
729 RNA_def_property_update(prop, 0, "rna_Modifier_update");
731 rna_def_modifier_generic_map_info(srna);
734 static void rna_def_modifier_multires(BlenderRNA *brna)
739 srna= RNA_def_struct(brna, "MultiresModifier", "Modifier");
740 RNA_def_struct_ui_text(srna, "Multires Modifier", "Multiresolution mesh modifier");
741 RNA_def_struct_sdna(srna, "MultiresModifierData");
742 RNA_def_struct_ui_icon(srna, ICON_MOD_MULTIRES);
744 rna_def_property_subdivision_common(srna, "simple");
746 prop= RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
747 RNA_def_property_int_sdna(prop, NULL, "lvl");
748 RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to use in the viewport");
749 RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
750 RNA_def_property_update(prop, 0, "rna_Modifier_update");
752 prop= RNA_def_property(srna, "sculpt_levels", PROP_INT, PROP_UNSIGNED);
753 RNA_def_property_int_sdna(prop, NULL, "sculptlvl");
754 RNA_def_property_ui_text(prop, "Sculpt Levels", "Number of subdivisions to use in sculpt mode");
755 RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
756 RNA_def_property_update(prop, 0, "rna_Modifier_update");
758 prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
759 RNA_def_property_int_sdna(prop, NULL, "renderlvl");
760 RNA_def_property_ui_text(prop, "Render Levels", "The subdivision level visible at render time");
761 RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
763 prop= RNA_def_property(srna, "total_levels", PROP_INT, PROP_UNSIGNED);
764 RNA_def_property_int_sdna(prop, NULL, "totlvl");
765 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
766 RNA_def_property_ui_text(prop, "Total Levels", "Number of subdivisions for which displacements are stored");
768 prop= RNA_def_property(srna, "is_external", PROP_BOOLEAN, PROP_NONE);
769 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
770 RNA_def_property_boolean_funcs(prop, "rna_MultiresModifier_external_get", NULL);
771 RNA_def_property_ui_text(prop, "External", "Store multires displacements outside the .blend file, to save memory");
773 prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
774 RNA_def_property_string_funcs(prop, "rna_MultiresModifier_filepath_get", "rna_MultiresModifier_filepath_length", "rna_MultiresModifier_filepath_set");
775 RNA_def_property_ui_text(prop, "File Path", "Path to external displacements file");
776 RNA_def_property_update(prop, 0, "rna_Modifier_update");
778 prop= RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
779 RNA_def_property_boolean_sdna(prop, NULL, "flags", eMultiresModifierFlag_ControlEdges);
780 RNA_def_property_ui_text(prop, "Optimal Display", "Skip drawing/rendering of interior subdivided edges");
781 RNA_def_property_update(prop, 0, "rna_Modifier_update");
784 static void rna_def_modifier_lattice(BlenderRNA *brna)
789 srna= RNA_def_struct(brna, "LatticeModifier", "Modifier");
790 RNA_def_struct_ui_text(srna, "Lattice Modifier", "Lattice deformation modifier");
791 RNA_def_struct_sdna(srna, "LatticeModifierData");
792 RNA_def_struct_ui_icon(srna, ICON_MOD_LATTICE);
794 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
795 RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with");
796 RNA_def_property_pointer_funcs(prop, NULL, "rna_LatticeModifier_object_set", NULL, "rna_Lattice_object_poll");
797 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
798 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
800 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
801 RNA_def_property_string_sdna(prop, NULL, "name");
802 RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
803 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set");
804 RNA_def_property_update(prop, 0, "rna_Modifier_update");
807 static void rna_def_modifier_curve(BlenderRNA *brna)
812 static EnumPropertyItem prop_deform_axis_items[] = {
813 {MOD_CURVE_POSX, "POS_X", 0, "X", ""},
814 {MOD_CURVE_POSY, "POS_Y", 0, "Y", ""},
815 {MOD_CURVE_POSZ, "POS_Z", 0, "Z", ""},
816 {MOD_CURVE_NEGX, "NEG_X", 0, "-X", ""},
817 {MOD_CURVE_NEGY, "NEG_Y", 0, "-Y", ""},
818 {MOD_CURVE_NEGZ, "NEG_Z", 0, "-Z", ""},
819 {0, NULL, 0, NULL, NULL}};
821 srna= RNA_def_struct(brna, "CurveModifier", "Modifier");
822 RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve deformation modifier");
823 RNA_def_struct_sdna(srna, "CurveModifierData");
824 RNA_def_struct_ui_icon(srna, ICON_MOD_CURVE);
826 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
827 RNA_def_property_ui_text(prop, "Object", "Curve object to deform with");
828 RNA_def_property_pointer_funcs(prop, NULL, "rna_CurveModifier_object_set", NULL, "rna_Curve_object_poll");
829 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
830 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
832 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
833 RNA_def_property_string_sdna(prop, NULL, "name");
834 RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
835 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CurveModifier_vgroup_set");
836 RNA_def_property_update(prop, 0, "rna_Modifier_update");
838 prop= RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
839 RNA_def_property_enum_sdna(prop, NULL, "defaxis");
840 RNA_def_property_enum_items(prop, prop_deform_axis_items);
841 RNA_def_property_ui_text(prop, "Deform Axis", "The axis that the curve deforms along");
842 RNA_def_property_update(prop, 0, "rna_Modifier_update");
845 static void rna_def_modifier_build(BlenderRNA *brna)
850 srna= RNA_def_struct(brna, "BuildModifier", "Modifier");
851 RNA_def_struct_ui_text(srna, "Build Modifier", "Build effect modifier");
852 RNA_def_struct_sdna(srna, "BuildModifierData");
853 RNA_def_struct_ui_icon(srna, ICON_MOD_BUILD);
855 prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
856 RNA_def_property_float_sdna(prop, NULL, "start");
857 RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
858 RNA_def_property_ui_text(prop, "Start", "Specify the start frame of the effect");
859 RNA_def_property_update(prop, 0, "rna_Modifier_update");
861 prop= RNA_def_property(srna, "frame_duration", PROP_FLOAT, PROP_TIME);
862 RNA_def_property_float_sdna(prop, NULL, "length");
863 RNA_def_property_range(prop, 1, MAXFRAMEF);
864 RNA_def_property_ui_text(prop, "Length", "Specify the total time the build effect requires");
865 RNA_def_property_update(prop, 0, "rna_Modifier_update");
867 prop= RNA_def_property(srna, "use_random_order", PROP_BOOLEAN, PROP_NONE);
868 RNA_def_property_boolean_sdna(prop, NULL, "randomize", 1);
869 RNA_def_property_ui_text(prop, "Randomize", "Randomize the faces or edges during build");
870 RNA_def_property_update(prop, 0, "rna_Modifier_update");
872 prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
873 RNA_def_property_range(prop, 1, MAXFRAMEF);
874 RNA_def_property_ui_text(prop, "Seed", "Specify the seed for random if used");
875 RNA_def_property_update(prop, 0, "rna_Modifier_update");
878 static void rna_def_modifier_mirror(BlenderRNA *brna)
883 srna= RNA_def_struct(brna, "MirrorModifier", "Modifier");
884 RNA_def_struct_ui_text(srna, "Mirror Modifier", "Mirroring modifier");
885 RNA_def_struct_sdna(srna, "MirrorModifierData");
886 RNA_def_struct_ui_icon(srna, ICON_MOD_MIRROR);
888 prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
889 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_X);
890 RNA_def_property_ui_text(prop, "X", "Enable X axis mirror");
891 RNA_def_property_update(prop, 0, "rna_Modifier_update");
893 prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
894 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Y);
895 RNA_def_property_ui_text(prop, "Y", "Enable Y axis mirror");
896 RNA_def_property_update(prop, 0, "rna_Modifier_update");
898 prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
899 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Z);
900 RNA_def_property_ui_text(prop, "Z", "Enable Z axis mirror");
901 RNA_def_property_update(prop, 0, "rna_Modifier_update");
903 prop= RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
904 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_CLIPPING);
905 RNA_def_property_ui_text(prop, "Clip", "Prevents vertices from going through the mirror during transform");
906 RNA_def_property_update(prop, 0, "rna_Modifier_update");
908 prop= RNA_def_property(srna, "use_mirror_vertex_groups", PROP_BOOLEAN, PROP_NONE);
909 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_VGROUP);
910 RNA_def_property_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L)");
911 RNA_def_property_update(prop, 0, "rna_Modifier_update");
913 prop= RNA_def_property(srna, "use_mirror_merge", PROP_BOOLEAN, PROP_NONE);
914 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", MOD_MIR_NO_MERGE);
915 RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices within the merge threshold");
916 RNA_def_property_update(prop, 0, "rna_Modifier_update");
918 prop= RNA_def_property(srna, "use_mirror_u", PROP_BOOLEAN, PROP_NONE);
919 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_U);
920 RNA_def_property_ui_text(prop, "Mirror U", "Mirror the U texture coordinate around the 0.5 point");
921 RNA_def_property_update(prop, 0, "rna_Modifier_update");
923 prop= RNA_def_property(srna, "use_mirror_v", PROP_BOOLEAN, PROP_NONE);
924 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_V);
925 RNA_def_property_ui_text(prop, "Mirror V", "Mirror the V texture coordinate around the 0.5 point");
926 RNA_def_property_update(prop, 0, "rna_Modifier_update");
928 prop= RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
929 RNA_def_property_float_sdna(prop, NULL, "tolerance");
930 RNA_def_property_range(prop, 0, FLT_MAX);
931 RNA_def_property_ui_range(prop, 0, 1, 0.01, 6);
932 RNA_def_property_ui_text(prop, "Merge Limit", "Distance from axis within which mirrored vertices are merged");
933 RNA_def_property_update(prop, 0, "rna_Modifier_update");
935 prop= RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE);
936 RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob");
937 RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror");
938 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
939 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
942 static void rna_def_modifier_decimate(BlenderRNA *brna)
947 srna= RNA_def_struct(brna, "DecimateModifier", "Modifier");
948 RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimation modifier");
949 RNA_def_struct_sdna(srna, "DecimateModifierData");
950 RNA_def_struct_ui_icon(srna, ICON_MOD_DECIM);
952 prop= RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
953 RNA_def_property_float_sdna(prop, NULL, "percent");
954 RNA_def_property_range(prop, 0, 1);
955 RNA_def_property_ui_range(prop, 0, 1, 1, 2);
956 RNA_def_property_ui_text(prop, "Ratio", "Defines the ratio of triangles to reduce to");
957 RNA_def_property_update(prop, 0, "rna_Modifier_update");
959 prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
960 RNA_def_property_int_sdna(prop, NULL, "faceCount");
961 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
962 RNA_def_property_ui_text(prop, "Face Count", "The current number of faces in the decimated mesh");
965 static void rna_def_modifier_wave(BlenderRNA *brna)
970 static EnumPropertyItem prop_texture_coordinates_items[] = {
971 {MOD_WAV_MAP_LOCAL, "LOCAL", 0, "Local", ""},
972 {MOD_WAV_MAP_GLOBAL, "GLOBAL", 0, "Global", ""},
973 {MOD_WAV_MAP_OBJECT, "OBJECT", 0, "Object", ""},
974 {MOD_WAV_MAP_UV, "MAP_UV", 0, "UV", ""},
975 {0, NULL, 0, NULL, NULL}};
977 srna= RNA_def_struct(brna, "WaveModifier", "Modifier");
978 RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave effect modifier");
979 RNA_def_struct_sdna(srna, "WaveModifierData");
980 RNA_def_struct_ui_icon(srna, ICON_MOD_WAVE);
982 prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
983 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_X);
984 RNA_def_property_ui_text(prop, "X", "X axis motion");
985 RNA_def_property_update(prop, 0, "rna_Modifier_update");
987 prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
988 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_Y);
989 RNA_def_property_ui_text(prop, "Y", "Y axis motion");
990 RNA_def_property_update(prop, 0, "rna_Modifier_update");
992 prop= RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
993 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_CYCL);
994 RNA_def_property_ui_text(prop, "Cyclic", "Cyclic wave effect");
995 RNA_def_property_update(prop, 0, "rna_Modifier_update");
997 prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
998 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM);
999 RNA_def_property_ui_text(prop, "Normals", "Displace along normals");
1000 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1002 prop= RNA_def_property(srna, "use_normal_x", PROP_BOOLEAN, PROP_NONE);
1003 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_X);
1004 RNA_def_property_ui_text(prop, "X Normal", "Enable displacement along the X normal");
1005 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1007 prop= RNA_def_property(srna, "use_normal_y", PROP_BOOLEAN, PROP_NONE);
1008 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Y);
1009 RNA_def_property_ui_text(prop, "Y Normal", "Enable displacement along the Y normal");
1010 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1012 prop= RNA_def_property(srna, "use_normal_z", PROP_BOOLEAN, PROP_NONE);
1013 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Z);
1014 RNA_def_property_ui_text(prop, "Z Normal", "Enable displacement along the Z normal");
1015 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1017 prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
1018 RNA_def_property_float_sdna(prop, NULL, "timeoffs");
1019 RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
1020 RNA_def_property_ui_text(prop, "Time Offset", "Either the starting frame (for positive speed) or ending frame (for negative speed.)");
1021 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1023 prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
1024 RNA_def_property_float_sdna(prop, NULL, "lifetime");
1025 RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
1026 RNA_def_property_ui_text(prop, "Lifetime", "Lifetime of the wave in frames, zero means infinite");
1027 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1029 prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
1030 RNA_def_property_float_sdna(prop, NULL, "damp");
1031 RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
1032 RNA_def_property_ui_text(prop, "Damping Time", "Number of frames in which the waves damps out after it dies");
1033 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1035 prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
1036 RNA_def_property_float_sdna(prop, NULL, "falloff");
1037 RNA_def_property_range(prop, 0, FLT_MAX);
1038 RNA_def_property_ui_range(prop, 0, 100, 100, 2);
1039 RNA_def_property_ui_text(prop, "Falloff Radius", "Distance after which it fades out");
1040 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1042 prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
1043 RNA_def_property_float_sdna(prop, NULL, "startx");
1044 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1045 RNA_def_property_ui_range(prop, -100, 100, 100, 2);
1046 RNA_def_property_ui_text(prop, "Start Position X", "X coordinate of the start position");
1047 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1049 prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
1050 RNA_def_property_float_sdna(prop, NULL, "starty");
1051 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1052 RNA_def_property_ui_range(prop, -100, 100, 100, 2);
1053 RNA_def_property_ui_text(prop, "Start Position Y", "Z coordinate of the start position");
1054 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1056 prop= RNA_def_property(srna, "start_position_object", PROP_POINTER, PROP_NONE);
1057 RNA_def_property_pointer_sdna(prop, NULL, "objectcenter");
1058 RNA_def_property_ui_text(prop, "Start Position Object", "Object which defines the wave center");
1059 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1060 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1062 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1063 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
1064 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the wave");
1065 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_vgroup_set");
1066 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1068 prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
1069 RNA_def_property_ui_text(prop, "Texture", "Texture for modulating the wave");
1070 RNA_def_property_flag(prop, PROP_EDITABLE);
1071 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1073 prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
1074 RNA_def_property_enum_sdna(prop, NULL, "texmapping");
1075 RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
1076 RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used for modulating input");
1077 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1079 prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
1080 RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
1081 RNA_def_property_ui_text(prop, "UV Layer", "UV layer name");
1082 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_uvlayer_set");
1083 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1085 prop= RNA_def_property(srna, "texture_coords_object", PROP_POINTER, PROP_NONE);
1086 RNA_def_property_pointer_sdna(prop, NULL, "map_object");
1087 RNA_def_property_ui_text(prop, "Texture Coordinates Object", "");
1088 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1089 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1091 prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
1092 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1093 RNA_def_property_ui_range(prop, -1, 1, 10, 2);
1094 RNA_def_property_ui_text(prop, "Speed", "Speed of the wave, towards the starting point when negative");
1095 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1097 prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
1098 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1099 RNA_def_property_ui_range(prop, -2, 2, 10, 2);
1100 RNA_def_property_ui_text(prop, "Height", "Height of the wave");
1101 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1103 prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
1104 RNA_def_property_range(prop, 0, FLT_MAX);
1105 RNA_def_property_ui_range(prop, 0, 5, 10, 2);
1106 RNA_def_property_ui_text(prop, "Width", "Distance between the waves");
1107 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1109 prop= RNA_def_property(srna, "narrowness", PROP_FLOAT, PROP_DISTANCE);
1110 RNA_def_property_float_sdna(prop, NULL, "narrow");
1111 RNA_def_property_range(prop, 0, FLT_MAX);
1112 RNA_def_property_ui_range(prop, 0, 10, 10, 2);
1113 RNA_def_property_ui_text(prop, "Narrowness", "Distance between the top and the base of a wave, the higher the value, the more narrow the wave");
1114 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1117 static void rna_def_modifier_armature(BlenderRNA *brna)
1122 srna= RNA_def_struct(brna, "ArmatureModifier", "Modifier");
1123 RNA_def_struct_ui_text(srna, "Armature Modifier", "Armature deformation modifier");
1124 RNA_def_struct_sdna(srna, "ArmatureModifierData");
1125 RNA_def_struct_ui_icon(srna, ICON_MOD_ARMATURE);
1127 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
1128 RNA_def_property_ui_text(prop, "Object", "Armature object to deform with");
1129 RNA_def_property_pointer_funcs(prop, NULL, "rna_ArmatureModifier_object_set", NULL, "rna_Armature_object_poll");
1130 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1131 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1133 prop= RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
1134 RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
1135 RNA_def_property_ui_text(prop, "Use Bone Envelopes", "Binds Bone envelope to armature modifier");
1136 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1138 prop= RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
1139 RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
1140 RNA_def_property_ui_text(prop, "Use Vertex Groups", "Binds vertex group to armature modifier");
1141 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1143 prop= RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
1144 RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
1145 RNA_def_property_ui_text(prop, "Preserve Volume", "Deform rotation interpolation with quaternions");
1146 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1148 prop= RNA_def_property(srna, "use_multi_modifier", PROP_BOOLEAN, PROP_NONE);
1149 RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
1150 RNA_def_property_ui_text(prop, "Multi Modifier", "Use same input as previous modifier, and mix results using overall vgroup");
1151 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1153 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1154 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
1155 RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
1156 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ArmatureModifier_vgroup_set");
1157 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1159 prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
1160 RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
1161 RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
1162 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1165 static void rna_def_modifier_hook(BlenderRNA *brna)
1170 srna= RNA_def_struct(brna, "HookModifier", "Modifier");
1171 RNA_def_struct_ui_text(srna, "Hook Modifier", "Hook modifier to modify the location of vertices");
1172 RNA_def_struct_sdna(srna, "HookModifierData");
1173 RNA_def_struct_ui_icon(srna, ICON_HOOK);
1175 prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_DISTANCE);
1176 RNA_def_property_range(prop, 0, FLT_MAX);
1177 RNA_def_property_ui_range(prop, 0, 100, 100, 2);
1178 RNA_def_property_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends");
1179 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1181 prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
1182 RNA_def_property_range(prop, 0, 1);
1183 RNA_def_property_ui_text(prop, "Force", "Relative force of the hook");
1184 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1186 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
1187 RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset");
1188 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1189 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1191 prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
1192 RNA_def_property_string_sdna(prop, NULL, "subtarget");
1193 RNA_def_property_ui_text(prop, "Sub-Target", "Name of Parent Bone for hook (if applicable), also recalculates and clears offset");
1194 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1196 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1197 RNA_def_property_string_sdna(prop, NULL, "name");
1198 RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
1199 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_HookModifier_vgroup_set");
1200 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1203 static void rna_def_modifier_softbody(BlenderRNA *brna)
1208 srna= RNA_def_struct(brna, "SoftBodyModifier", "Modifier");
1209 RNA_def_struct_ui_text(srna, "Soft Body Modifier", "Soft body simulation modifier");
1210 RNA_def_struct_sdna(srna, "SoftbodyModifierData");
1211 RNA_def_struct_ui_icon(srna, ICON_MOD_SOFT);
1213 prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
1214 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1215 RNA_def_property_struct_type(prop, "SoftBodySettings");
1216 RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_settings_get", NULL, NULL, NULL);
1217 RNA_def_property_ui_text(prop, "Soft Body Settings", "");
1219 prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
1220 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1221 RNA_def_property_struct_type(prop, "PointCache");
1222 RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_point_cache_get", NULL, NULL, NULL);
1223 RNA_def_property_ui_text(prop, "Soft Body Point Cache", "");
1226 static void rna_def_modifier_boolean(BlenderRNA *brna)
1231 static EnumPropertyItem prop_operation_items[] = {
1232 {eBooleanModifierOp_Intersect, "INTERSECT", 0, "Intersect", "Keeps the part of the mesh that intersects with the other selected object"},
1233 {eBooleanModifierOp_Union, "UNION", 0, "Union", "Combines two meshes in an additive way"},
1234 {eBooleanModifierOp_Difference, "DIFFERENCE", 0, "Difference", "Combines two meshes in a subtractive way"},
1235 {0, NULL, 0, NULL, NULL}};
1237 srna= RNA_def_struct(brna, "BooleanModifier", "Modifier");
1238 RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier");
1239 RNA_def_struct_sdna(srna, "BooleanModifierData");
1240 RNA_def_struct_ui_icon(srna, ICON_MOD_BOOLEAN);
1242 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
1243 RNA_def_property_ui_text(prop, "Object", "Mesh object to use for Boolean operation");
1244 RNA_def_property_pointer_funcs(prop, NULL, "rna_BooleanModifier_object_set", NULL, "rna_Mesh_object_poll");
1245 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1246 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1248 prop= RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
1249 RNA_def_property_enum_items(prop, prop_operation_items);
1250 RNA_def_property_ui_text(prop, "Operation", "");
1251 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1254 static void rna_def_modifier_array(BlenderRNA *brna)
1259 static EnumPropertyItem prop_fit_type_items[] = {
1260 {MOD_ARR_FIXEDCOUNT, "FIXED_COUNT", 0, "Fixed Count", "Duplicate the object a certain number of times"},
1261 {MOD_ARR_FITLENGTH, "FIT_LENGTH", 0, "Fit Length", "Duplicate the object as many times as fits in a certain length"},
1262 {MOD_ARR_FITCURVE, "FIT_CURVE", 0, "Fit Curve", "Fit the duplicated objects to a curve"},
1263 {0, NULL, 0, NULL, NULL}};
1265 srna= RNA_def_struct(brna, "ArrayModifier", "Modifier");
1266 RNA_def_struct_ui_text(srna, "Array Modifier", "Array duplication modifier");
1267 RNA_def_struct_sdna(srna, "ArrayModifierData");
1268 RNA_def_struct_ui_icon(srna, ICON_MOD_ARRAY);
1270 /* Length parameters */
1271 prop= RNA_def_property(srna, "fit_type", PROP_ENUM, PROP_NONE);
1272 RNA_def_property_enum_items(prop, prop_fit_type_items);
1273 RNA_def_property_ui_text(prop, "Fit Type", "Array length calculation method");
1274 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1276 prop= RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
1277 RNA_def_property_range(prop, 1, INT_MAX);
1278 RNA_def_property_ui_range(prop, 1, 1000, 1, 0);
1279 RNA_def_property_ui_text(prop, "Count", "Number of duplicates to make");
1280 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1282 prop= RNA_def_property(srna, "fit_length", PROP_FLOAT, PROP_DISTANCE);
1283 RNA_def_property_float_sdna(prop, NULL, "length");
1284 RNA_def_property_range(prop, 0, INT_MAX);
1285 RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
1286 RNA_def_property_ui_text(prop, "Length", "Length to fit array within");
1287 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1289 prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
1290 RNA_def_property_pointer_sdna(prop, NULL, "curve_ob");
1291 RNA_def_property_ui_text(prop, "Curve", "Curve object to fit array length to");
1292 RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_curve_set", NULL, "rna_Curve_object_poll");
1293 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1294 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1296 /* Offset parameters */
1297 prop= RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_TRANSLATION);
1298 RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
1299 RNA_def_property_ui_text(prop, "Constant Offset", "Add a constant offset");
1300 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1302 prop= RNA_def_property(srna, "constant_offset_displace", PROP_FLOAT, PROP_TRANSLATION);
1303 RNA_def_property_float_sdna(prop, NULL, "offset");
1304 RNA_def_property_ui_text(prop, "Constant Offset Displacement", "Value for the distance between arrayed items");
1305 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1307 prop= RNA_def_property(srna, "use_relative_offset", PROP_BOOLEAN, PROP_NONE);
1308 RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_RELATIVE);
1309 RNA_def_property_ui_text(prop, "Relative Offset", "Add an offset relative to the object's bounding box");
1310 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1312 prop= RNA_def_property(srna, "relative_offset_displace", PROP_FLOAT, PROP_NONE); /* PROP_TRANSLATION causes units to be used which we dont want */
1313 RNA_def_property_float_sdna(prop, NULL, "scale");
1314 RNA_def_property_ui_text(prop, "Relative Offset Displacement", "The size of the geometry will determine the distance between arrayed items");
1315 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1317 /* Vertex merging parameters */
1318 prop= RNA_def_property(srna, "use_merge_vertices", PROP_BOOLEAN, PROP_NONE);
1319 RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGE);
1320 RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in adjacent duplicates");
1321 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1323 prop= RNA_def_property(srna, "use_merge_vertices_cap", PROP_BOOLEAN, PROP_NONE);
1324 RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGEFINAL);
1325 RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in first and last duplicates");
1326 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1328 prop= RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
1329 RNA_def_property_float_sdna(prop, NULL, "merge_dist");
1330 RNA_def_property_range(prop, 0, FLT_MAX);
1331 RNA_def_property_ui_range(prop, 0, 1, 1, 4);
1332 RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices");
1333 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1336 prop= RNA_def_property(srna, "use_object_offset", PROP_BOOLEAN, PROP_NONE);
1337 RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_OBJ);
1338 RNA_def_property_ui_text(prop, "Object Offset", "Add another object's transformation to the total offset");
1339 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1341 prop= RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
1342 RNA_def_property_pointer_sdna(prop, NULL, "offset_ob");
1343 RNA_def_property_ui_text(prop, "Object Offset", "Uses the location and rotation of another object to determine the distance and rotational change between arrayed items");
1344 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1345 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1348 prop= RNA_def_property(srna, "start_cap", PROP_POINTER, PROP_NONE);
1349 RNA_def_property_ui_text(prop, "Start Cap", "Mesh object to use as a start cap");
1350 RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_start_cap_set", NULL, "rna_Mesh_object_poll");
1351 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1352 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1354 prop= RNA_def_property(srna, "end_cap", PROP_POINTER, PROP_NONE);
1355 RNA_def_property_ui_text(prop, "End Cap", "Mesh object to use as an end cap");
1356 RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_end_cap_set", NULL, "rna_Mesh_object_poll");
1357 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1358 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1361 static void rna_def_modifier_edgesplit(BlenderRNA *brna)
1366 srna= RNA_def_struct(brna, "EdgeSplitModifier", "Modifier");
1367 RNA_def_struct_ui_text(srna, "EdgeSplit Modifier", "Edge splitting modifier to create sharp edges");
1368 RNA_def_struct_sdna(srna, "EdgeSplitModifierData");
1369 RNA_def_struct_ui_icon(srna, ICON_MOD_EDGESPLIT);
1371 // XXX, convert to radians.
1372 prop= RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_NONE);
1373 RNA_def_property_range(prop, 0, 90);
1374 RNA_def_property_ui_range(prop, 0, 90, 100, 2);
1375 RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges");
1376 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1378 prop= RNA_def_property(srna, "use_edge_angle", PROP_BOOLEAN, PROP_NONE);
1379 RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMANGLE);
1380 RNA_def_property_ui_text(prop, "Use Edge Angle", "Split edges with high angle between faces");
1381 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1383 prop= RNA_def_property(srna, "use_edge_sharp", PROP_BOOLEAN, PROP_NONE);
1384 RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMFLAG);
1385 RNA_def_property_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp");
1386 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1389 static void rna_def_modifier_displace(BlenderRNA *brna)
1394 static EnumPropertyItem prop_direction_items[] = {
1395 {MOD_DISP_DIR_X, "X", 0, "X", "Uses the texture's intensity value to displace in the X direction"},
1396 {MOD_DISP_DIR_Y, "Y", 0, "Y", "Uses the texture's intensity value to displace in the Y direction"},
1397 {MOD_DISP_DIR_Z, "Z", 0, "Z", "Uses the texture's intensity value to displace in the Z direction"},
1398 {MOD_DISP_DIR_NOR, "NORMAL", 0, "Normal", "Uses the texture's intensity value to displace in the normal direction"},
1399 {MOD_DISP_DIR_RGB_XYZ, "RGB_TO_XYZ", 0, "RGB to XYZ", "Uses the texture's RGB values to displace the mesh in the XYZ direction"},
1400 {0, NULL, 0, NULL, NULL}};
1402 srna= RNA_def_struct(brna, "DisplaceModifier", "Modifier");
1403 RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier");
1404 RNA_def_struct_sdna(srna, "DisplaceModifierData");
1405 RNA_def_struct_ui_icon(srna, ICON_MOD_DISPLACE);
1407 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1408 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
1409 RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
1410 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_vgroup_set");
1411 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1413 prop= RNA_def_property(srna, "mid_level", PROP_FLOAT, PROP_DISTANCE);
1414 RNA_def_property_float_sdna(prop, NULL, "midlevel");
1415 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1416 RNA_def_property_ui_range(prop, 0, 1, 10, 3);
1417 RNA_def_property_ui_text(prop, "Midlevel", "Material value that gives no displacement");
1418 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1420 prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
1421 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1422 RNA_def_property_ui_range(prop, -100, 100, 10, 3);
1423 RNA_def_property_ui_text(prop, "Strength", "Amount to displace geometry");
1424 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1426 prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
1427 RNA_def_property_enum_items(prop, prop_direction_items);
1428 RNA_def_property_ui_text(prop, "Direction", "");
1429 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1431 rna_def_modifier_generic_map_info(srna);
1434 static void rna_def_modifier_uvproject(BlenderRNA *brna)
1439 srna= RNA_def_struct(brna, "UVProjectModifier", "Modifier");
1440 RNA_def_struct_ui_text(srna, "UV Project Modifier", "UV projection modifier to sets UVs from a projector");
1441 RNA_def_struct_sdna(srna, "UVProjectModifierData");
1442 RNA_def_struct_ui_icon(srna, ICON_MOD_UVPROJECT);
1444 prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
1445 RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
1446 RNA_def_property_ui_text(prop, "UV Layer", "UV layer name");
1447 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVProjectModifier_uvlayer_set");
1448 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1450 prop= RNA_def_property(srna, "projector_count", PROP_INT, PROP_NONE);
1451 RNA_def_property_int_sdna(prop, NULL, "num_projectors");
1452 RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use");
1453 RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
1454 RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAX);
1455 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1457 prop= RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
1458 RNA_def_property_struct_type(prop, "UVProjector");
1459 RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
1460 RNA_def_property_ui_text(prop, "Projectors", "");
1462 prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
1463 RNA_def_property_ui_text(prop, "Image", "");
1464 RNA_def_property_flag(prop, PROP_EDITABLE);
1465 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1467 prop= RNA_def_property(srna, "aspect_x", PROP_FLOAT, PROP_NONE);
1468 RNA_def_property_float_sdna(prop, NULL, "aspectx");
1469 RNA_def_property_range(prop, 1, FLT_MAX);
1470 RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
1471 RNA_def_property_ui_text(prop, "Horizontal Aspect Ratio", "");
1472 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1474 prop= RNA_def_property(srna, "aspect_y", PROP_FLOAT, PROP_NONE);
1475 RNA_def_property_float_sdna(prop, NULL, "aspecty");
1476 RNA_def_property_range(prop, 1, FLT_MAX);
1477 RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
1478 RNA_def_property_ui_text(prop, "Vertical Aspect Ratio", "");
1479 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1481 prop= RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_NONE);
1482 RNA_def_property_float_sdna(prop, NULL, "scalex");
1483 RNA_def_property_range(prop, 0, FLT_MAX);
1484 RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
1485 RNA_def_property_ui_text(prop, "Horizontal Scale", "");
1486 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1488 prop= RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_NONE);
1489 RNA_def_property_float_sdna(prop, NULL, "scaley");
1490 RNA_def_property_range(prop, 0, FLT_MAX);
1491 RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
1492 RNA_def_property_ui_text(prop, "Vertical Scale", "");
1493 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1495 prop= RNA_def_property(srna, "use_image_override", PROP_BOOLEAN, PROP_NONE);
1496 RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_UVPROJECT_OVERRIDEIMAGE);
1497 RNA_def_property_ui_text(prop, "Override Image", "Override faces' current images with the given image");
1498 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1500 srna= RNA_def_struct(brna, "UVProjector", NULL);
1501 RNA_def_struct_ui_text(srna, "UVProjector", "UV projector used by the UV project modifier");
1503 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
1504 RNA_def_property_struct_type(prop, "Object");
1505 RNA_def_property_pointer_funcs(prop, "rna_UVProjector_object_get", "rna_UVProjector_object_set", NULL, NULL);
1506 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1507 RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform");
1508 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1511 static void rna_def_modifier_smooth(BlenderRNA *brna)
1516 srna= RNA_def_struct(brna, "SmoothModifier", "Modifier");
1517 RNA_def_struct_ui_text(srna, "Smooth Modifier", "Smoothing effect modifier");
1518 RNA_def_struct_sdna(srna, "SmoothModifierData");
1519 RNA_def_struct_ui_icon(srna, ICON_MOD_SMOOTH);
1521 prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
1522 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_X);
1523 RNA_def_property_ui_text(prop, "X", "Smooth object along X axis");
1524 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1526 prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
1527 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Y);
1528 RNA_def_property_ui_text(prop, "Y", "Smooth object along Y axis");
1529 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1531 prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
1532 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Z);
1533 RNA_def_property_ui_text(prop, "Z", "Smooth object along Z axis");
1534 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1536 prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
1537 RNA_def_property_float_sdna(prop, NULL, "fac");
1538 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1539 RNA_def_property_ui_range(prop, -10, 10, 1, 3);
1540 RNA_def_property_ui_text(prop, "Factor", "Strength of modifier effect");
1541 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1543 prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
1544 RNA_def_property_int_sdna(prop, NULL, "repeat");
1545 RNA_def_property_ui_range(prop, 0, 30, 1, 0);
1546 RNA_def_property_ui_text(prop, "Repeat", "");
1547 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1549 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1550 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
1551 RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
1552 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SmoothModifier_vgroup_set");
1553 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1556 static void rna_def_modifier_cast(BlenderRNA *brna)
1561 static EnumPropertyItem prop_cast_type_items[] = {
1562 {MOD_CAST_TYPE_SPHERE, "SPHERE", 0, "Sphere", ""},
1563 {MOD_CAST_TYPE_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
1564 {MOD_CAST_TYPE_CUBOID, "CUBOID", 0, "Cuboid", ""},
1565 {0, NULL, 0, NULL, NULL}};
1567 srna= RNA_def_struct(brna, "CastModifier", "Modifier");
1568 RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast modifier to cast to other shapes");
1569 RNA_def_struct_sdna(srna, "CastModifierData");
1570 RNA_def_struct_ui_icon(srna, ICON_MOD_CAST);
1572 prop= RNA_def_property(srna, "cast_type", PROP_ENUM, PROP_NONE);
1573 RNA_def_property_enum_sdna(prop, NULL, "type");
1574 RNA_def_property_enum_items(prop, prop_cast_type_items);
1575 RNA_def_property_ui_text(prop, "Cast Type", "Target object shape");
1576 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1578 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
1579 RNA_def_property_ui_text(prop, "Object", "Control object: if available, its location determines the center of the effect");
1580 RNA_def_property_pointer_funcs(prop, NULL, "rna_CastModifier_object_set", NULL, NULL);
1581 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1582 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1584 prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
1585 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X);
1586 RNA_def_property_ui_text(prop, "X", "");
1587 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1589 prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
1590 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Y);
1591 RNA_def_property_ui_text(prop, "Y", "");
1592 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1594 prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
1595 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Z);
1596 RNA_def_property_ui_text(prop, "Z", "");
1597 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1599 prop= RNA_def_property(srna, "use_radius_as_size", PROP_BOOLEAN, PROP_NONE);
1600 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_SIZE_FROM_RADIUS);
1601 RNA_def_property_ui_text(prop, "From Radius", "Use radius as size of projection shape (0 = auto)");
1602 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1604 prop= RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE);
1605 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_USE_OB_TRANSFORM);
1606 RNA_def_property_ui_text(prop, "Use transform", "Use object transform to control projection shape");
1607 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1609 prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
1610 RNA_def_property_float_sdna(prop, NULL, "fac");
1611 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
1612 RNA_def_property_ui_range(prop, -10, 10, 5, 2);
1613 RNA_def_property_ui_text(prop, "Factor", "");
1614 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1616 prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
1617 RNA_def_property_range(prop, 0, FLT_MAX);
1618 RNA_def_property_ui_range(prop, 0, 100, 5, 2);
1619 RNA_def_property_ui_text(prop, "Radius", "Only deform vertices within this distance from the center of the effect (leave as 0 for infinite.)");
1620 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1622 prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
1623 RNA_def_property_range(prop, 0, FLT_MAX);
1624 RNA_def_property_ui_range(prop, 0, 100, 5, 2);
1625 RNA_def_property_ui_text(prop, "Size", "Size of projection shape (leave as 0 for auto.)");
1626 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1628 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1629 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
1630 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
1631 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CastModifier_vgroup_set");
1632 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1635 static void rna_def_modifier_meshdeform(BlenderRNA *brna)
1640 static EnumPropertyItem prop_mode_items[] = {
1641 {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"},
1642 {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"},
1643 {0, NULL, 0, NULL, NULL}};
1646 srna= RNA_def_struct(brna, "MeshDeformModifier", "Modifier");
1647 RNA_def_struct_ui_text(srna, "MeshDeform Modifier", "Mesh deformation modifier to deform with other meshes");
1648 RNA_def_struct_sdna(srna, "MeshDeformModifierData");
1649 RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM);
1651 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
1652 RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with");
1653 RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL, NULL);
1654 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1655 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1657 prop= RNA_def_property(srna, "is_bound", PROP_BOOLEAN, PROP_NONE);
1658 RNA_def_property_boolean_funcs(prop, "rna_MeshDeformModifier_is_bound_get", NULL);
1659 RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to control cage");
1660 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1662 prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
1663 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_INVERT_VGROUP);
1664 RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
1665 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1667 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1668 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
1669 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
1670 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshDeformModifier_vgroup_set");
1671 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1673 prop= RNA_def_property(srna, "precision", PROP_INT, PROP_NONE);
1674 RNA_def_property_int_sdna(prop, NULL, "gridsize");
1675 RNA_def_property_range(prop, 2, 10);
1676 RNA_def_property_ui_text(prop, "Precision", "The grid size for binding");
1677 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1679 prop= RNA_def_property(srna, "use_dynamic_bind", PROP_BOOLEAN, PROP_NONE);
1680 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_DYNAMIC_BIND);
1681 RNA_def_property_ui_text(prop, "Dynamic", "Recompute binding dynamically on top of other deformers (slower and more memory consuming.)");
1682 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1685 prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
1686 RNA_def_property_enum_items(prop, prop_mode_items);
1687 RNA_def_property_ui_text(prop, "Mode", "Method of binding vertices are bound to cage mesh");
1688 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1692 static void rna_def_modifier_particlesystem(BlenderRNA *brna)
1697 srna= RNA_def_struct(brna, "ParticleSystemModifier", "Modifier");
1698 RNA_def_struct_ui_text(srna, "ParticleSystem Modifier", "Particle system simulation modifier");
1699 RNA_def_struct_sdna(srna, "ParticleSystemModifierData");
1700 RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
1702 prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
1703 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1704 RNA_def_property_pointer_sdna(prop, NULL, "psys");
1705 RNA_def_property_ui_text(prop, "Particle System", "Particle System that this modifier controls");
1708 static void rna_def_modifier_particleinstance(BlenderRNA *brna)
1713 static EnumPropertyItem particleinstance_axis[] = {
1714 {0, "X", 0, "X", ""},
1715 {1, "Y", 0, "Y", ""},
1716 {2, "Z", 0, "Z", ""},
1717 {0, NULL, 0, NULL, NULL}
1720 srna= RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier");
1721 RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier");
1722 RNA_def_struct_sdna(srna, "ParticleInstanceModifierData");
1723 RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
1725 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
1726 RNA_def_property_pointer_sdna(prop, NULL, "ob");
1727 RNA_def_property_ui_text(prop, "Object", "Object that has the particle system");
1728 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
1729 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
1731 prop= RNA_def_property(srna, "particle_system_index", PROP_INT, PROP_NONE);
1732 RNA_def_property_int_sdna(prop, NULL, "psys");
1733 RNA_def_property_range(prop, 1, 10);
1734 RNA_def_property_ui_text(prop, "Particle System Number", "");
1735 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1737 prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
1738 RNA_def_property_enum_sdna(prop, NULL, "axis");
1739 RNA_def_property_enum_items(prop, particleinstance_axis);
1740 RNA_def_property_ui_text(prop, "Axis", "Pole axis for rotation");
1741 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1743 prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
1744 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Parents);
1745 RNA_def_property_ui_text(prop, "Normal", "Create instances from normal particles");
1746 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1748 prop= RNA_def_property(srna, "use_children", PROP_BOOLEAN, PROP_NONE);
1749 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Children);
1750 RNA_def_property_ui_text(prop, "Children", "Create instances from child particles");
1751 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1753 prop= RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
1754 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Path);
1755 RNA_def_property_ui_text(prop, "Path", "Create instances along particle paths");
1756 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1758 prop= RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
1759 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Unborn);
1760 RNA_def_property_ui_text(prop, "Unborn", "Show instances when particles are unborn");
1761 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1763 prop= RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
1764 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Alive);
1765 RNA_def_property_ui_text(prop, "Alive", "Show instances when particles are alive");
1766 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1768 prop= RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
1769 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Dead);
1770 RNA_def_property_ui_text(prop, "Dead", "Show instances when particles are dead");
1771 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1773 prop= RNA_def_property(srna, "use_preserve_shape", PROP_BOOLEAN, PROP_NONE);
1774 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_KeepShape);
1775 RNA_def_property_ui_text(prop, "Keep Shape", "Don't stretch the object");
1776 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1778 prop= RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
1779 RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_UseSize);
1780 RNA_def_property_ui_text(prop, "Size", "Use particle size to scale the instances");
1781 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1783 prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
1784 RNA_def_property_float_sdna(prop, NULL, "position");
1785 RNA_def_property_range(prop, 0.0, 1.0);
1786 RNA_def_property_ui_text(prop, "Position", "Position along path");
1787 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1789 prop= RNA_def_property(srna, "random_position", PROP_FLOAT, PROP_NONE);
1790 RNA_def_property_float_sdna(prop, NULL, "random_position");
1791 RNA_def_property_range(prop, 0.0, 1.0);
1792 RNA_def_property_ui_text(prop, "Random Position", "Randomize position along path");
1793 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1796 static void rna_def_modifier_explode(BlenderRNA *brna)
1801 srna= RNA_def_struct(brna, "ExplodeModifier", "Modifier");
1802 RNA_def_struct_ui_text(srna, "Explode Modifier", "Explosion effect modifier based on a particle system");
1803 RNA_def_struct_sdna(srna, "ExplodeModifierData");
1804 RNA_def_struct_ui_icon(srna, ICON_MOD_EXPLODE);
1806 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
1807 RNA_def_property_string_funcs(prop, "rna_ExplodeModifier_vgroup_get", "rna_ExplodeModifier_vgroup_length", "rna_ExplodeModifier_vgroup_set");
1808 RNA_def_property_ui_text(prop, "Vertex Group", "");
1810 prop= RNA_def_property(srna, "protect", PROP_FLOAT, PROP_NONE);
1811 RNA_def_property_range(prop, 0, 1);
1812 RNA_def_property_ui_text(prop, "Protect", "Clean vertex group edges");
1813 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1815 prop= RNA_def_property(srna, "use_edge_cut", PROP_BOOLEAN, PROP_NONE);
1816 RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_EdgeCut);
1817 RNA_def_property_ui_text(prop, "Cut Edges", "Cut face edges for nicer shrapnel");
1818 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1820 prop= RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
1821 RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Unborn);
1822 RNA_def_property_ui_text(prop, "Unborn", "Show mesh when particles are unborn");
1823 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1825 prop= RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
1826 RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Alive);
1827 RNA_def_property_ui_text(prop, "Alive", "Show mesh when particles are alive");
1828 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1830 prop= RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
1831 RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Dead);
1832 RNA_def_property_ui_text(prop, "Dead", "Show mesh when particles are dead");
1833 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1835 prop= RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
1836 RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_PaSize);
1837 RNA_def_property_ui_text(prop, "Size", "Use particle size for the shrapnel");
1838 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1840 prop= RNA_def_property(srna, "particle_uv", PROP_STRING, PROP_NONE);
1841 RNA_def_property_string_sdna(prop, NULL, "uvname");
1842 RNA_def_property_string_maxlength(prop, 32);
1843 RNA_def_property_ui_text(prop, "Particle UV", "UV Layer to change with particle age");
1844 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1847 static void rna_def_modifier_cloth(BlenderRNA *brna)
1852 srna= RNA_def_struct(brna, "ClothModifier", "Modifier");
1853 RNA_def_struct_ui_text(srna, "Cloth Modifier", "Cloth simulation modifier");
1854 RNA_def_struct_sdna(srna, "ClothModifierData");
1855 RNA_def_struct_ui_icon(srna, ICON_MOD_CLOTH);
1857 prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
1858 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1859 RNA_def_property_pointer_sdna(prop, NULL, "sim_parms");
1860 RNA_def_property_ui_text(prop, "Cloth Settings", "");
1862 prop= RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NONE);
1863 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1864 RNA_def_property_pointer_sdna(prop, NULL, "coll_parms");
1865 RNA_def_property_ui_text(prop, "Cloth Collision Settings", "");
1867 prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
1868 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1869 RNA_def_property_ui_text(prop, "Point Cache", "");
1872 static void rna_def_modifier_smoke(BlenderRNA *brna)
1877 static EnumPropertyItem prop_smoke_type_items[] = {
1878 {0, "NONE", 0, "None", ""},
1879 {MOD_SMOKE_TYPE_DOMAIN, "DOMAIN", 0, "Domain", ""},
1880 {MOD_SMOKE_TYPE_FLOW, "FLOW", 0, "Flow", "Inflow/Outflow"},
1881 {MOD_SMOKE_TYPE_COLL, "COLLISION", 0, "Collision", ""},
1882 {0, NULL, 0, NULL, NULL}};
1884 srna= RNA_def_struct(brna, "SmokeModifier", "Modifier");
1885 RNA_def_struct_ui_text(srna, "Smoke Modifier", "Smoke simulation modifier");
1886 RNA_def_struct_sdna(srna, "SmokeModifierData");
1887 RNA_def_struct_ui_icon(srna, ICON_MOD_SMOKE);
1889 prop= RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE);
1890 RNA_def_property_pointer_sdna(prop, NULL, "domain");
1891 RNA_def_property_ui_text(prop, "Domain Settings", "");
1893 prop= RNA_def_property(srna, "flow_settings", PROP_POINTER, PROP_NONE);
1894 RNA_def_property_pointer_sdna(prop, NULL, "flow");
1895 RNA_def_property_ui_text(prop, "Flow Settings", "");
1897 prop= RNA_def_property(srna, "coll_settings", PROP_POINTER, PROP_NONE);
1898 RNA_def_property_pointer_sdna(prop, NULL, "coll");
1899 RNA_def_property_ui_text(prop, "Collision Settings", "");
1901 prop= RNA_def_property(srna, "smoke_type", PROP_ENUM, PROP_NONE);
1902 RNA_def_property_enum_sdna(prop, NULL, "type");
1903 RNA_def_property_enum_items(prop, prop_smoke_type_items);
1904 RNA_def_property_ui_text(prop, "Type", "");
1905 RNA_def_property_update(prop, 0, "rna_Smoke_set_type");
1908 static void rna_def_modifier_collision(BlenderRNA *brna)
1913 srna= RNA_def_struct(brna, "CollisionModifier", "Modifier");
1914 RNA_def_struct_ui_text(srna, "Collision Modifier", "Collision modifier defining modifier stack position used for collision");
1915 RNA_def_struct_sdna(srna, "CollisionModifierData");
1916 RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
1918 prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
1919 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1920 RNA_def_property_struct_type(prop, "CollisionSettings");
1921 RNA_def_property_pointer_funcs(prop, "rna_CollisionModifier_settings_get", NULL, NULL, NULL);
1922 RNA_def_property_ui_text(prop, "Settings", "");
1925 static void rna_def_modifier_bevel(BlenderRNA *brna)
1930 static EnumPropertyItem prop_limit_method_items[] = {
1931 {0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount"},
1932 {BME_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces"},
1933 {BME_BEVEL_WEIGHT, "WEIGHT", 0, "Weight", "Use bevel weights to determine how much bevel is applied; apply them separately in vert/edge select mode"},
1934 {0, NULL, 0, NULL, NULL}};
1936 static EnumPropertyItem prop_edge_weight_method_items[] = {
1937 {0, "AVERAGE", 0, "Average", ""},
1938 {BME_BEVEL_EMIN, "SHARPEST", 0, "Sharpest", ""},
1939 {BME_BEVEL_EMAX, "LARGEST", 0, "Largest", ""},
1940 {0, NULL, 0, NULL, NULL}};
1942 srna= RNA_def_struct(brna, "BevelModifier", "Modifier");
1943 RNA_def_struct_ui_text(srna, "Bevel Modifier", "Bevel modifier to make edges and vertices more rounded");
1944 RNA_def_struct_sdna(srna, "BevelModifierData");
1945 RNA_def_struct_ui_icon(srna, ICON_MOD_BEVEL);
1947 prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
1948 RNA_def_property_float_sdna(prop, NULL, "value");
1949 RNA_def_property_range(prop, 0, FLT_MAX);
1950 RNA_def_property_ui_range(prop, 0, 10, 0.1, 4);
1951 RNA_def_property_ui_text(prop, "Width", "Bevel value/amount");
1952 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1954 prop= RNA_def_property(srna, "use_only_vertices", PROP_BOOLEAN, PROP_NONE);
1955 RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_VERT);
1956 RNA_def_property_ui_text(prop, "Only Vertices", "Bevel verts/corners, not edges");
1957 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1959 prop= RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
1960 RNA_def_property_enum_sdna(prop, NULL, "lim_flags");
1961 RNA_def_property_enum_items(prop, prop_limit_method_items);
1962 RNA_def_property_ui_text(prop, "Limit Method", "");
1963 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1965 prop= RNA_def_property(srna, "edge_weight_method", PROP_ENUM, PROP_NONE);
1966 RNA_def_property_enum_sdna(prop, NULL, "e_flags");
1967 RNA_def_property_enum_items(prop, prop_edge_weight_method_items);
1968 RNA_def_property_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex");
1969 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1971 prop= RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_NONE);
1972 RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
1973 RNA_def_property_range(prop, 0, 180);
1974 RNA_def_property_ui_range(prop, 0, 180, 100, 2);
1975 RNA_def_property_ui_text(prop, "Angle", "Angle above which to bevel edges");
1976 RNA_def_property_update(prop, 0, "rna_Modifier_update");
1979 static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
1984 static EnumPropertyItem shrink_type_items[] = {
1985 {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACEPOINT", 0, "Nearest Surface Point", "Shrinks the mesh to the nearest target surface"},
1986 {MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project", "Shrinks the mesh to the nearest target surface along a given axis"},
1987 {MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", 0, "Nearest Vertex", "Shrinks the mesh to the nearest target vertex"},
1988 {0, NULL, 0, NULL, NULL}};
1990 static EnumPropertyItem shrink_face_cull_items[] = {
1991 {0, "OFF", 0, "Off", ""},
1992 {MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE, "FRONT", 0, "Front", ""},
1993 {MOD_SHRINKWRAP_CULL_TARGET_BACKFACE, "BACK", 0, "Back", ""},
1994 {0, NULL, 0, NULL, NULL}};
1996 srna= RNA_def_struct(brna, "ShrinkwrapModifier", "Modifier");
1997 RNA_def_struct_ui_text(srna, "Shrinkwrap Modifier", "Shrink wrapping modifier to shrink wrap and object to a target");
1998 RNA_def_struct_sdna(srna, "ShrinkwrapModifierData");
1999 RNA_def_struct_ui_icon(srna, ICON_MOD_SHRINKWRAP);
2001 prop= RNA_def_property(srna, "wrap_method", PROP_ENUM, PROP_NONE);
2002 RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
2003 RNA_def_property_enum_items(prop, shrink_type_items);
2004 RNA_def_property_ui_text(prop, "Mode", "");
2005 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2007 prop= RNA_def_property(srna, "cull_face", PROP_ENUM, PROP_NONE);
2008 RNA_def_property_enum_sdna(prop, NULL, "shrinkOpts");
2009 RNA_def_property_enum_items(prop, shrink_face_cull_items);
2010 RNA_def_property_enum_funcs(prop, "rna_ShrinkwrapModifier_face_cull_get", "rna_ShrinkwrapModifier_face_cull_set", NULL);
2011 RNA_def_property_ui_text(prop, "Face Cull", "Stop vertices from projecting to a the face on the target when facing towards/away");
2012 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2014 prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
2015 RNA_def_property_ui_text(prop, "Target", "Mesh target to shrink to");
2016 RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_target_set", NULL, "rna_Mesh_object_poll");
2017 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
2018 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2020 prop= RNA_def_property(srna, "auxiliary_target", PROP_POINTER, PROP_NONE);
2021 RNA_def_property_pointer_sdna(prop, NULL, "auxTarget");
2022 RNA_def_property_ui_text(prop, "Auxiliary Target", "Additional mesh target to shrink to");
2023 RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_auxiliary_target_set", NULL, "rna_Mesh_object_poll");
2024 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
2025 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2027 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2028 RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
2029 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
2030 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShrinkwrapModifier_vgroup_set");
2031 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2033 prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
2034 RNA_def_property_float_sdna(prop, NULL, "keepDist");
2035 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2036 RNA_def_property_ui_range(prop, -100, 100, 1, 2);
2037 RNA_def_property_ui_text(prop, "Offset", "Distance to keep from the target");
2038 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2040 prop= RNA_def_property(srna, "use_project_x", PROP_BOOLEAN, PROP_NONE);
2041 RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS);
2042 RNA_def_property_ui_text(prop, "X", "");
2043 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2045 prop= RNA_def_property(srna, "use_project_y", PROP_BOOLEAN, PROP_NONE);
2046 RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS);
2047 RNA_def_property_ui_text(prop, "Y", "");
2048 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2050 prop= RNA_def_property(srna, "use_project_z", PROP_BOOLEAN, PROP_NONE);
2051 RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS);
2052 RNA_def_property_ui_text(prop, "Z", "");
2053 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2055 prop= RNA_def_property(srna, "subsurf_levels", PROP_INT, PROP_NONE);
2056 RNA_def_property_int_sdna(prop, NULL, "subsurfLevels");
2057 RNA_def_property_range(prop, 0, 6);
2058 RNA_def_property_ui_range(prop, 0, 6, 1, 0);
2059 RNA_def_property_ui_text(prop, "Subsurf Levels", "Number of subdivisions that must be performed before extracting vertices' positions and normals");
2060 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2062 prop= RNA_def_property(srna, "use_negative_direction", PROP_BOOLEAN, PROP_NONE);
2063 RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR);
2064 RNA_def_property_ui_text(prop, "Negative", "Allow vertices to move in the negative direction of axis");
2065 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2067 prop= RNA_def_property(srna, "use_positive_direction", PROP_BOOLEAN, PROP_NONE);
2068 RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR);
2069 RNA_def_property_ui_text(prop, "Positive", "Allow vertices to move in the positive direction of axis");
2070 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2072 prop= RNA_def_property(srna, "use_keep_above_surface", PROP_BOOLEAN, PROP_NONE);
2073 RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE);
2074 RNA_def_property_ui_text(prop, "Keep Above Surface", "");
2075 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2078 static void rna_def_modifier_fluidsim(BlenderRNA *brna)
2083 srna= RNA_def_struct(brna, "FluidSimulationModifier", "Modifier");
2084 RNA_def_struct_ui_text(srna, "Fluid Simulation Modifier", "Fluid simulation modifier");
2085 RNA_def_struct_sdna(srna, "FluidsimModifierData");
2086 RNA_def_struct_ui_icon(srna, ICON_MOD_FLUIDSIM);
2088 prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
2089 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2090 RNA_def_property_pointer_sdna(prop, NULL, "fss");
2091 RNA_def_property_ui_text(prop, "Settings", "Settings for how this object is used in the fluid simulation");
2094 static void rna_def_modifier_mask(BlenderRNA *brna)
2099 static EnumPropertyItem modifier_mask_mode_items[] = {
2100 {MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", 0, "Vertex Group", ""},
2101 {MOD_MASK_MODE_ARM, "ARMATURE", 0, "Armature", ""},
2102 {0, NULL, 0, NULL, NULL}};
2104 srna= RNA_def_struct(brna, "MaskModifier", "Modifier");
2105 RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask modifier to hide parts of the mesh");
2106 RNA_def_struct_sdna(srna, "MaskModifierData");
2107 RNA_def_struct_ui_icon(srna, ICON_MOD_MASK);
2109 prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
2110 RNA_def_property_enum_items(prop, modifier_mask_mode_items);
2111 RNA_def_property_ui_text(prop, "Mode", "");
2112 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2114 prop= RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
2115 RNA_def_property_pointer_sdna(prop, NULL, "ob_arm");
2116 RNA_def_property_ui_text(prop, "Armature", "Armature to use as source of bones to mask");
2117 RNA_def_property_pointer_funcs(prop, NULL, "rna_MaskModifier_armature_set", NULL, "rna_Armature_object_poll");
2118 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
2119 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2121 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2122 RNA_def_property_string_sdna(prop, NULL, "vgroup");
2123 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
2124 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MaskModifier_vgroup_set");
2125 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2127 prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2128 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MASK_INV);
2129 RNA_def_property_ui_text(prop, "Invert", "Use vertices that are not part of region defined");
2130 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2133 static void rna_def_modifier_simpledeform(BlenderRNA *brna)
2138 static EnumPropertyItem simple_deform_mode_items[] = {
2139 {MOD_SIMPLEDEFORM_MODE_TWIST, "TWIST", 0, "Twist", "Rotates around the Z axis of the modifier space"},
2140 {MOD_SIMPLEDEFORM_MODE_BEND, "BEND", 0, "Bend", "Bends the mesh over the Z axis of the modifier space"},
2141 {MOD_SIMPLEDEFORM_MODE_TAPER, "TAPER", 0, "Taper", "Linearly scales along Z axis of the modifier space"},
2142 {MOD_SIMPLEDEFORM_MODE_STRETCH, "STRETCH", 0, "Stretch", "Stretches the object along the Z axis of the modifier space"},
2143 {0, NULL, 0, NULL, NULL}};
2145 srna= RNA_def_struct(brna, "SimpleDeformModifier", "Modifier");
2146 RNA_def_struct_ui_text(srna, "SimpleDeform Modifier", "Simple deformation modifier to apply effects such as twisting and bending");
2147 RNA_def_struct_sdna(srna, "SimpleDeformModifierData");
2148 RNA_def_struct_ui_icon(srna, ICON_MOD_SIMPLEDEFORM);
2150 prop= RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
2151 RNA_def_property_enum_sdna(prop, NULL, "mode");
2152 RNA_def_property_enum_items(prop, simple_deform_mode_items);
2153 RNA_def_property_ui_text(prop, "Mode", "");
2154 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2156 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2157 RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
2158 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
2159 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SimpleDeformModifier_vgroup_set");
2160 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2162 prop= RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
2163 RNA_def_property_ui_text(prop, "Origin", "Origin of modifier space coordinates");
2164 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
2165 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2167 prop= RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
2168 RNA_def_property_boolean_sdna(prop, NULL, "originOpts", MOD_SIMPLEDEFORM_ORIGIN_LOCAL);
2169 RNA_def_property_ui_text(prop, "Relative", "Sets the origin of deform space to be relative to the object");
2170 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2172 prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
2173 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2174 RNA_def_property_ui_range(prop, -10, 10, 1, 3);
2175 RNA_def_property_ui_text(prop, "Factor", "Amount to deform object");
2176 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2178 prop= RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE);
2179 RNA_def_property_float_sdna(prop, NULL, "limit");
2180 RNA_def_property_array(prop, 2);
2181 RNA_def_property_range(prop, 0, 1);
2182 RNA_def_property_ui_range(prop, 0, 1, 5, 2);
2183 RNA_def_property_ui_text(prop, "Limits", "Lower/Upper limits for deform");
2184 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2186 prop= RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
2187 RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_X);
2188 RNA_def_property_ui_text(prop, "Lock X Axis", "Do not allow tapering along the X axis");
2189 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2191 prop= RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
2192 RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_Y);
2193 RNA_def_property_ui_text(prop, "Lock Y Axis", "Do not allow tapering along the Y axis");
2194 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2197 static void rna_def_modifier_surface(BlenderRNA *brna)
2201 srna= RNA_def_struct(brna, "SurfaceModifier", "Modifier");
2202 RNA_def_struct_ui_text(srna, "Surface Modifier", "Surface modifier defining modifier stack position used for surface fields");
2203 RNA_def_struct_sdna(srna, "SurfaceModifierData");
2204 RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
2207 static void rna_def_modifier_solidify(BlenderRNA *brna)
2212 srna= RNA_def_struct(brna, "SolidifyModifier", "Modifier");
2213 RNA_def_struct_ui_text(srna, "Solidify Modifier", "Create a solid skin by extruding, compensating for sharp angles");
2214 RNA_def_struct_sdna(srna, "SolidifyModifierData");
2215 RNA_def_struct_ui_icon(srna, ICON_MOD_SOLIDIFY);
2217 prop= RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_DISTANCE);
2218 RNA_def_property_float_sdna(prop, NULL, "offset");
2219 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2220 RNA_def_property_ui_range(prop, -10, 10, 0.1, 4);
2221 RNA_def_property_ui_text(prop, "Thickness", "Thickness of the shell");
2222 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2224 prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_FACTOR);
2225 RNA_def_property_float_sdna(prop, NULL, "offset_fac");
2226 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2227 RNA_def_property_ui_range(prop, -1, 1, 0.1, 4);
2228 RNA_def_property_ui_text(prop, "Offset", "Offset the thickness from the center");
2229 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2231 prop= RNA_def_property(srna, "edge_crease_inner", PROP_FLOAT, PROP_FACTOR);
2232 RNA_def_property_float_sdna(prop, NULL, "crease_inner");
2233 RNA_def_property_range(prop, 0, 1);
2234 RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
2235 RNA_def_property_ui_text(prop, "Inner Crease", "Assign a crease to inner edges");
2236 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2238 prop= RNA_def_property(srna, "edge_crease_outer", PROP_FLOAT, PROP_FACTOR);
2239 RNA_def_property_float_sdna(prop, NULL, "crease_outer");
2240 RNA_def_property_range(prop, 0, 1);
2241 RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
2242 RNA_def_property_ui_text(prop, "Outer Crease", "Assign a crease to outer edges");
2243 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2245 prop= RNA_def_property(srna, "edge_crease_rim", PROP_FLOAT, PROP_FACTOR);
2246 RNA_def_property_float_sdna(prop, NULL, "crease_rim");
2247 RNA_def_property_range(prop, 0, 1);
2248 RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
2249 RNA_def_property_ui_text(prop, "Rim Crease", "Assign a crease to the edges making up the rim");
2250 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2252 prop= RNA_def_property(srna, "material_offset", PROP_INT, PROP_NONE);
2253 RNA_def_property_int_sdna(prop, NULL, "mat_ofs");
2254 RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX);
2255 RNA_def_property_ui_text(prop, "Material Offset", "Offset material index of generated faces");
2256 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2258 prop= RNA_def_property(srna, "material_offset_rim", PROP_INT, PROP_NONE);
2259 RNA_def_property_int_sdna(prop, NULL, "mat_ofs_rim");
2260 RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX);
2261 RNA_def_property_ui_text(prop, "Rim Material Offset", "Offset material index of generated rim faces");
2262 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2264 prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2265 RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
2266 RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
2267 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SolidifyModifier_vgroup_set");
2268 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2270 prop= RNA_def_property(srna, "use_rim", PROP_BOOLEAN, PROP_NONE);
2271 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_RIM);
2272 RNA_def_property_ui_text(prop, "Fill Rim", "Create edge loops between the inner and outer surfaces on face edges (slow, disable when not needed)");
2273 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2275 prop= RNA_def_property(srna, "use_even_offset", PROP_BOOLEAN, PROP_NONE);
2276 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_EVEN);
2277 RNA_def_property_ui_text(prop, "Even Thickness", "Maintain thickness by adjusting for sharp corners (slow, disable when not needed)");
2278 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2280 prop= RNA_def_property(srna, "use_quality_normals", PROP_BOOLEAN, PROP_NONE);
2281 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_NORMAL_CALC);
2282 RNA_def_property_ui_text(prop, "High Quality Normals", "Calculate normals which result in more even thickness (slow, disable when not needed)");
2283 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2285 prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
2286 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_VGROUP_INV);
2287 RNA_def_property_ui_text(prop, "Vertex Group Invert", "Invert the vertex group influence");
2288 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2293 static void rna_def_modifier_screw(BlenderRNA *brna)
2295 static EnumPropertyItem axis_items[]= {
2296 {0, "X", 0, "X Axis", ""},
2297 {1, "Y", 0, "Y Axis", ""},
2298 {2, "Z", 0, "Z Axis", ""},
2299 {0, NULL, 0, NULL, NULL}};
2304 srna= RNA_def_struct(brna, "ScrewModifier", "Modifier");
2305 RNA_def_struct_ui_text(srna, "Screw Modifier", "Revolve edges");
2306 RNA_def_struct_sdna(srna, "ScrewModifierData");
2307 RNA_def_struct_ui_icon(srna, ICON_MOD_SCREW);
2309 prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
2310 RNA_def_property_pointer_sdna(prop, NULL, "ob_axis");
2311 RNA_def_property_ui_text(prop, "Object", "Object to define the screw axis");
2312 RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
2313 RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2315 prop= RNA_def_property(srna, "steps", PROP_INT, PROP_UNSIGNED);
2316 RNA_def_property_range(prop, 2, 10000);
2317 RNA_def_property_ui_range(prop, 2, 512, 1, 0);
2318 RNA_def_property_ui_text(prop, "Steps", "Number of steps in the revolution");
2319 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2321 prop= RNA_def_property(srna, "render_steps", PROP_INT, PROP_UNSIGNED);
2322 RNA_def_property_range(prop, 2, 10000);
2323 RNA_def_property_ui_range(prop, 2, 512, 1, 0);
2324 RNA_def_property_ui_text(prop, "Render Steps", "Number of steps in the revolution");
2325 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2327 prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_UNSIGNED);
2328 RNA_def_property_int_sdna(prop, NULL, "iter");
2329 RNA_def_property_range(prop, 1, 10000);
2330 RNA_def_property_ui_range(prop, 1, 100, 1, 0);
2331 RNA_def_property_ui_text(prop, "Iterations", "Number of times to apply the screw operation");
2332 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2334 prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
2335 RNA_def_property_enum_items(prop, axis_items);
2336 RNA_def_property_ui_text(prop, "Axis", "Screw axis");
2337 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2339 prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
2340 RNA_def_property_ui_range(prop, 0, -M_PI*2, M_PI*2, 2);
2341 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2342 RNA_def_property_ui_text(prop, "Angle", "Angle of revolution");
2343 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2345 prop= RNA_def_property(srna, "screw_offset", PROP_FLOAT, PROP_DISTANCE);
2346 RNA_def_property_float_sdna(prop, NULL, "screw_ofs");
2347 RNA_def_property_ui_text(prop, "Screw", "Offset the revolution along its axis");
2348 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2350 prop= RNA_def_property(srna, "use_normal_flip", PROP_BOOLEAN, PROP_NONE);
2351 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_NORMAL_FLIP);
2352 RNA_def_property_ui_text(prop, "Flip", "Flip normals of lathed faces");
2353 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2355 prop= RNA_def_property(srna, "use_normal_calculate", PROP_BOOLEAN, PROP_NONE);
2356 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_NORMAL_CALC);
2357 RNA_def_property_ui_text(prop, "Calc Order", "Calculate the order of edges (needed for meshes, but not curves)");
2358 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2360 prop= RNA_def_property(srna, "use_object_screw_offset", PROP_BOOLEAN, PROP_NONE);
2361 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_OBJECT_OFFSET);
2362 RNA_def_property_ui_text(prop, "Object Screw", "Use the distance between the objects to make a screw");
2363 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2365 /*prop= RNA_def_property(srna, "use_angle_object", PROP_BOOLEAN, PROP_NONE);
2366 RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_OBJECT_ANGLE);
2367 RNA_def_property_ui_text(prop, "Object Angle", "Use the angle between the objects rather than the fixed angle");
2368 RNA_def_property_update(prop, 0, "rna_Modifier_update");*/
2373 static void rna_def_modifier_ngoninterp(BlenderRNA *brna)
2378 srna= RNA_def_struct(brna, "NgonInterpModifier", "Modifier");
2379 RNA_def_struct_ui_text(srna, "Precision UV Modifier", "Precision UV interpolation");
2380 RNA_def_struct_sdna(srna, "NgonInterpModifierData");
2381 RNA_def_struct_ui_icon(srna, ICON_MOD_SCREW);
2383 prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
2384 RNA_def_property_range(prop, 1, 10000);
2385 RNA_def_property_ui_range(prop, 1, 100, 1, 0);
2386 RNA_def_property_ui_text(prop, "Resolution", "Size of interpolation grids");
2387 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2390 void RNA_def_modifier(BlenderRNA *brna)
2396 srna= RNA_def_struct(brna, "Modifier", NULL);
2397 RNA_def_struct_ui_text(srna , "Modifier", "Modifier affecting the geometry data of an object");
2398 RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
2399 RNA_def_struct_path_func(srna, "rna_Modifier_path");
2400 RNA_def_struct_sdna(srna, "ModifierData");
2403 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
2404 RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Modifier_name_set");
2405 RNA_def_property_ui_text(prop, "Name", "Modifier name");
2406 RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER|NA_RENAME, NULL);
2407 RNA_def_struct_name_property(srna, prop);
2410 prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
2411 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
2412 RNA_def_property_enum_sdna(prop, NULL, "type");
2413 RNA_def_property_enum_items(prop, modifier_type_items);
2414 RNA_def_property_ui_text(prop, "Type", "");
2417 prop= RNA_def_property(srna, "show_viewport", PROP_BOOLEAN, PROP_NONE);
2418 RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Realtime);
2419 RNA_def_property_ui_text(prop, "Realtime", "Realtime display of a modifier");
2420 RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
2421 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2422 RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
2424 prop= RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
2425 RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Render);
2426 RNA_def_property_ui_text(prop, "Render", "Use modifier during rendering");
2427 RNA_def_property_ui_icon(prop, ICON_SCENE, 0);
2428 RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
2430 prop= RNA_def_property(srna, "show_in_editmode", PROP_BOOLEAN, PROP_NONE);
2431 RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Editmode);
2432 RNA_def_property_ui_text(prop, "Editmode", "Use modifier while in the edit mode");
2433 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2434 RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
2436 prop= RNA_def_property(srna, "show_on_cage", PROP_BOOLEAN, PROP_NONE);
2437 RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_OnCage);
2438 RNA_def_property_ui_text(prop, "On Cage", "Enable direct editing of modifier control cage");
2439 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2441 prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
2442 RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
2443 RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
2444 RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
2446 prop= RNA_def_property(srna, "use_apply_on_spline", PROP_BOOLEAN, PROP_NONE);
2447 RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_ApplyOnSpline);
2448 RNA_def_property_ui_text(prop, "Apply on spline", "Apply this and all preceding deformation modifiers on splines' points rather than on filled curve/surface");
2449 RNA_def_property_ui_icon(prop, ICON_SURFACE_DATA, 0);
2450 RNA_def_property_update(prop, 0, "rna_Modifier_update");
2453 rna_def_modifier_subsurf(brna);
2454 rna_def_modifier_lattice(brna);
2455 rna_def_modifier_curve(brna);
2456 rna_def_modifier_build(brna);
2457 rna_def_modifier_mirror(brna);
2458 rna_def_modifier_decimate(brna);
2459 rna_def_modifier_wave(brna);
2460 rna_def_modifier_armature(brna);
2461 rna_def_modifier_hook(brna);
2462 rna_def_modifier_softbody(brna);
2463 rna_def_modifier_boolean(brna);
2464 rna_def_modifier_array(brna);
2465 rna_def_modifier_edgesplit(brna);
2466 rna_def_modifier_displace(brna);
2467 rna_def_modifier_uvproject(brna);
2468 rna_def_modifier_smooth(brna);
2469 rna_def_modifier_cast(brna);
2470 rna_def_modifier_meshdeform(brna);
2471 rna_def_modifier_particlesystem(brna);
2472 rna_def_modifier_particleinstance(brna);
2473 rna_def_modifier_explode(brna);
2474 rna_def_modifier_cloth(brna);
2475 rna_def_modifier_collision(brna);
2476 rna_def_modifier_bevel(brna);
2477 rna_def_modifier_shrinkwrap(brna);
2478 rna_def_modifier_fluidsim(brna);
2479 rna_def_modifier_mask(brna);
2480 rna_def_modifier_simpledeform(brna);
2481 rna_def_modifier_warp(brna);
2482 rna_def_modifier_multires(brna);
2483 rna_def_modifier_surface(brna);
2484 rna_def_modifier_smoke(brna);
2485 rna_def_modifier_solidify(brna);
2486 rna_def_modifier_screw(brna);
2487 rna_def_modifier_ngoninterp(brna);