Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_modifier.c
| Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | EnumPropertyItem modifier_type_items[] = { | ||||
| {eModifierType_Bevel, "BEVEL", ICON_MOD_BEVEL, "Bevel", ""}, | {eModifierType_Bevel, "BEVEL", ICON_MOD_BEVEL, "Bevel", ""}, | ||||
| {eModifierType_Boolean, "BOOLEAN", ICON_MOD_BOOLEAN, "Boolean", ""}, | {eModifierType_Boolean, "BOOLEAN", ICON_MOD_BOOLEAN, "Boolean", ""}, | ||||
| {eModifierType_Build, "BUILD", ICON_MOD_BUILD, "Build", ""}, | {eModifierType_Build, "BUILD", ICON_MOD_BUILD, "Build", ""}, | ||||
| {eModifierType_Decimate, "DECIMATE", ICON_MOD_DECIM, "Decimate", ""}, | {eModifierType_Decimate, "DECIMATE", ICON_MOD_DECIM, "Decimate", ""}, | ||||
| {eModifierType_EdgeSplit, "EDGE_SPLIT", ICON_MOD_EDGESPLIT, "Edge Split", ""}, | {eModifierType_EdgeSplit, "EDGE_SPLIT", ICON_MOD_EDGESPLIT, "Edge Split", ""}, | ||||
| {eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""}, | {eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""}, | ||||
| {eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""}, | {eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""}, | ||||
| {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""}, | {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""}, | ||||
| {eModifierType_ParticleMesher, "PARTICLE_MESHER", ICON_MOD_PARTICLES, "Particle Mesher", ""}, | |||||
| {eModifierType_Remesh, "REMESH", ICON_MOD_REMESH, "Remesh", ""}, | {eModifierType_Remesh, "REMESH", ICON_MOD_REMESH, "Remesh", ""}, | ||||
| {eModifierType_Screw, "SCREW", ICON_MOD_SCREW, "Screw", ""}, | {eModifierType_Screw, "SCREW", ICON_MOD_SCREW, "Screw", ""}, | ||||
| {eModifierType_Skin, "SKIN", ICON_MOD_SKIN, "Skin", ""}, | {eModifierType_Skin, "SKIN", ICON_MOD_SKIN, "Skin", ""}, | ||||
| {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""}, | {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""}, | ||||
| {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""}, | {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""}, | ||||
| {eModifierType_Triangulate, "TRIANGULATE", ICON_MOD_TRIANGULATE, "Triangulate", ""}, | {eModifierType_Triangulate, "TRIANGULATE", ICON_MOD_TRIANGULATE, "Triangulate", ""}, | ||||
| {eModifierType_Wireframe, "WIREFRAME", ICON_MOD_WIREFRAME, "Wireframe", "Generate a wireframe on the edges of a mesh"}, | {eModifierType_Wireframe, "WIREFRAME", ICON_MOD_WIREFRAME, "Wireframe", "Generate a wireframe on the edges of a mesh"}, | ||||
| {0, "", 0, N_("Deform"), ""}, | {0, "", 0, N_("Deform"), ""}, | ||||
| ▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | EnumPropertyItem DT_layers_select_dst_items[] = { | ||||
| "Affect active data layer of all targets"}, | "Affect active data layer of all targets"}, | ||||
| {DT_LAYERS_NAME_DST, "NAME", 0, "By Name", | {DT_LAYERS_NAME_DST, "NAME", 0, "By Name", | ||||
| "Match target data layers to affect by name"}, | "Match target data layers to affect by name"}, | ||||
| {DT_LAYERS_INDEX_DST, "INDEX", 0, "By Order", | {DT_LAYERS_INDEX_DST, "INDEX", 0, "By Order", | ||||
| "Match target data layers to affect by order (indices)"}, | "Match target data layers to affect by order (indices)"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| EnumPropertyItem part_mesher_filter_items[] = { | |||||
| {MOD_PART_MESH_MEDIAN, "MEDIAN", 0, "Median", ""}, | |||||
| {MOD_PART_MESH_MEAN, "MEAN", 0, "Mean", ""}, | |||||
| {MOD_PART_MESH_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", ""}, | |||||
| {MOD_PART_MESH_MEAN_CURV, "MEAN_CURV", 0, "Mean Curvature", ""}, | |||||
| {MOD_PART_MESH_LAPLACIAN, "LAPLACIAN", 0, "Laplacian", ""}, | |||||
| {MOD_PART_MESH_OFFSET, "OFFSET", 0, "Offset", ""}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| #include "DNA_particle_types.h" | #include "DNA_particle_types.h" | ||||
| #include "DNA_curve_types.h" | #include "DNA_curve_types.h" | ||||
| #include "DNA_smoke_types.h" | #include "DNA_smoke_types.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| ▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | switch ((ModifierType)md->type) { | ||||
| case eModifierType_Cast: | case eModifierType_Cast: | ||||
| return &RNA_CastModifier; | return &RNA_CastModifier; | ||||
| case eModifierType_MeshDeform: | case eModifierType_MeshDeform: | ||||
| return &RNA_MeshDeformModifier; | return &RNA_MeshDeformModifier; | ||||
| case eModifierType_ParticleSystem: | case eModifierType_ParticleSystem: | ||||
| return &RNA_ParticleSystemModifier; | return &RNA_ParticleSystemModifier; | ||||
| case eModifierType_ParticleInstance: | case eModifierType_ParticleInstance: | ||||
| return &RNA_ParticleInstanceModifier; | return &RNA_ParticleInstanceModifier; | ||||
| case eModifierType_ParticleMesher: | |||||
| return &RNA_ParticleMesherModifier; | |||||
| case eModifierType_Explode: | case eModifierType_Explode: | ||||
| return &RNA_ExplodeModifier; | return &RNA_ExplodeModifier; | ||||
| case eModifierType_Cloth: | case eModifierType_Cloth: | ||||
| return &RNA_ClothModifier; | return &RNA_ClothModifier; | ||||
| case eModifierType_Collision: | case eModifierType_Collision: | ||||
| return &RNA_CollisionModifier; | return &RNA_CollisionModifier; | ||||
| case eModifierType_Bevel: | case eModifierType_Bevel: | ||||
| return &RNA_BevelModifier; | return &RNA_BevelModifier; | ||||
| ▲ Show 20 Lines • Show All 436 Lines • ▼ Show 20 Lines | static void rna_ArrayModifier_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| if (amd->curve_ob != NULL) { | if (amd->curve_ob != NULL) { | ||||
| Curve *curve = amd->curve_ob->data; | Curve *curve = amd->curve_ob->data; | ||||
| if ((curve->flag & CU_PATH) == 0) { | if ((curve->flag & CU_PATH) == 0) { | ||||
| DAG_id_tag_update(&curve->id, OB_RECALC_DATA); | DAG_id_tag_update(&curve->id, OB_RECALC_DATA); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static PointerRNA rna_ParticleMesherModifier_active_levelset_filter_get(PointerRNA *ptr) | |||||
| { | |||||
| ParticleMesherModifierData *pmmd = (ParticleMesherModifierData *)ptr->data; | |||||
| LevelSetFilter *filter = (LevelSetFilter *)pmmd->filters.first; | |||||
| for (; filter; filter = filter->next) { | |||||
| if (filter->flag & LVLSETFILTER_CURRENT) | |||||
| return rna_pointer_inherit_refine(ptr, &RNA_LevelSetFilter, filter); | |||||
| } | |||||
| return rna_pointer_inherit_refine(ptr, &RNA_LevelSetFilter, NULL); | |||||
| } | |||||
| static void rna_ParticleMesherModifier_active_levelset_filter_index_range(PointerRNA *ptr, int *min, int *max, | |||||
| int *UNUSED(softmin), int *UNUSED(softmax)) | |||||
| { | |||||
| ParticleMesherModifierData *pmmd = (ParticleMesherModifierData *)ptr->data; | |||||
| *min = 0; | |||||
| *max = max_ii(0, BLI_listbase_count(&pmmd->filters) - 1); | |||||
| } | |||||
| static int rna_ParticleMesherModifier_active_levelset_filter_index_get(PointerRNA *ptr) | |||||
| { | |||||
| ParticleMesherModifierData *pmmd = (ParticleMesherModifierData *)ptr->data; | |||||
| LevelSetFilter *filter = (LevelSetFilter *)pmmd->filters.first; | |||||
| int i = 0; | |||||
| for (; filter; filter = filter->next, i++) { | |||||
| if (filter->flag & LVLSETFILTER_CURRENT) | |||||
| return i; | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| static void rna_ParticleMesherModifier_active_levelset_filter_index_set(struct PointerRNA *ptr, int value) | |||||
| { | |||||
| ParticleMesherModifierData *pmmd = (ParticleMesherModifierData *)ptr->data; | |||||
| LevelSetFilter *filter = (LevelSetFilter *)pmmd->filters.first; | |||||
| int i = 0; | |||||
| for (; filter; filter = filter->next, i++) { | |||||
| if (i == value) | |||||
| filter->flag |= LVLSETFILTER_CURRENT; | |||||
| else | |||||
| filter->flag &= ~LVLSETFILTER_CURRENT; | |||||
| } | |||||
| } | |||||
| static void rna_DataTransferModifier_use_data_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_DataTransferModifier_use_data_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data; | DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data; | ||||
| if (!(dtmd->flags & MOD_DATATRANSFER_USE_VERT)) { | if (!(dtmd->flags & MOD_DATATRANSFER_USE_VERT)) { | ||||
| dtmd->data_types &= ~DT_TYPE_VERT_ALL; | dtmd->data_types &= ~DT_TYPE_VERT_ALL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | static EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) | ||||
| } | } | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| static void rna_LevelSetFilter_name_get(PointerRNA *ptr, char *str) | |||||
| { | |||||
| LevelSetFilter *filter = (LevelSetFilter *)ptr->data; | |||||
| strcpy(str, part_mesher_filter_items[filter->type - 1].name); | |||||
| } | |||||
| static int rna_LevelSetFilter_name_length(PointerRNA *ptr) | |||||
| { | |||||
| char tstr[MAX_ID_NAME + MAX_ID_NAME + 64]; | |||||
| rna_LevelSetFilter_name_get(ptr, tstr); | |||||
| return strlen(tstr); | |||||
| } | |||||
| #else | #else | ||||
| static PropertyRNA *rna_def_property_subdivision_common(StructRNA *srna, const char type[]) | static PropertyRNA *rna_def_property_subdivision_common(StructRNA *srna, const char type[]) | ||||
| { | { | ||||
| static EnumPropertyItem prop_subdivision_type_items[] = { | static EnumPropertyItem prop_subdivision_type_items[] = { | ||||
| {0, "CATMULL_CLARK", 0, "Catmull-Clark", ""}, | {0, "CATMULL_CLARK", 0, "Catmull-Clark", ""}, | ||||
| {1, "SIMPLE", 0, "Simple", ""}, | {1, "SIMPLE", 0, "Simple", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| ▲ Show 20 Lines • Show All 3,309 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DataTransferModifier_defgrp_name_set"); | RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DataTransferModifier_defgrp_name_set"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_boolean(srna, "invert_vertex_group", false, "Invert", "Invert vertex group influence"); | prop = RNA_def_boolean(srna, "invert_vertex_group", false, "Invert", "Invert vertex group influence"); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DATATRANSFER_INVERT_VGROUP); | RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DATATRANSFER_INVERT_VGROUP); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| } | } | ||||
| static void rna_def_level_set_filter(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| static EnumPropertyItem part_mesher_filter_accur_items[] = { | |||||
| {MOD_PART_MESH_ACC_FISRT, "FIRST_BIAS", 0, "First-order accuracy", ""}, | |||||
| {MOD_PART_MESH_ACC_SECOND, "SECOND_BIAS", 0, "Second-order accuracy", ""}, | |||||
| {MOD_PART_MESH_ACC_THIRD, "THIRD_BIAS", 0, "Third-order accuracy", ""}, | |||||
| {MOD_PART_MESH_ACC_WENO5, "WENO_BIAS", 0, "Fifth-order Weno", ""}, | |||||
| {MOD_PART_MESH_ACC_HJWENO5, "HJ_WENO_BIAS", 0, "Fifth-order HJ Weno", ""}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| srna = RNA_def_struct(brna, "LevelSetFilter", NULL); | |||||
| RNA_def_struct_ui_text(srna, "Level set filters", "Level set filters"); | |||||
| //RNA_def_struct_sdna(srna, "LevelSetFilter"); | |||||
| prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | |||||
| //RNA_def_property_string_funcs(prop, "rna_LevelSetFilter_name_get", "rna_LevelSetFilter_name_length", NULL); | |||||
| RNA_def_property_ui_text(prop, "Name", "Level Set filter name"); | |||||
| RNA_def_struct_name_property(srna, prop); | |||||
| prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "type"); | |||||
| RNA_def_property_enum_items(prop, part_mesher_filter_items); | |||||
| RNA_def_property_ui_text(prop, "Filters", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "accuracy", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "accuracy"); | |||||
| RNA_def_property_enum_items(prop, part_mesher_filter_accur_items); | |||||
| RNA_def_property_ui_text(prop, "Filter Accuracy", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "iterations"); | |||||
| RNA_def_property_range(prop, 0, 10); | |||||
| RNA_def_property_ui_text(prop, "Iterations", "Number of times to execute the levelset filtering"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "width", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "width"); | |||||
| RNA_def_property_range(prop, 0, 5); | |||||
| RNA_def_property_ui_text(prop, "Radius", "Filter radius in voxel units"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "offset"); | |||||
| RNA_def_property_range(prop, -10.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Voxel Offset", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", LVLSETFILTER_MUTE); | |||||
| RNA_def_property_ui_text(prop, "Mute", "Mute this filter"); | |||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| } | |||||
| static void rna_def_modifier_particlemesher(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "ParticleMesherModifier", "Modifier"); | |||||
| RNA_def_struct_ui_text(srna, "Particle Mesher Modifier", "Particle mesher modifier"); | |||||
| RNA_def_struct_sdna(srna, "ParticleMesherModifierData"); | |||||
| RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES); | |||||
| prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "psys"); | |||||
| RNA_def_property_struct_type(prop, "ParticleSystem"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_ui_text(prop, "Particle Systems", "Particle system to mesh"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Modifier_dependency_update"); | |||||
| prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "mesher_mask_ob"); | |||||
| RNA_def_property_struct_type(prop, "Object"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_ui_text(prop, "Mask Object", "Object used to define which areas to mesh"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Modifier_dependency_update"); | |||||
| prop = RNA_def_property(srna, "filter", PROP_COLLECTION, PROP_NONE); | |||||
| RNA_def_property_collection_sdna(prop, NULL, "filters", NULL); | |||||
| RNA_def_property_struct_type(prop, "LevelSetFilter"); | |||||
| //RNA_def_property_ui_text(prop, "Filters", ""); | |||||
| prop = RNA_def_property(srna, "voxel_size", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "voxel_size"); | |||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, 0.005f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Voxel Size", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "half_width", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "half_width"); | |||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Half Width", "Half the size of the narrow band"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "min_part_radius", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "min_part_radius"); | |||||
| RNA_def_property_range(prop, 0.001f, 100000.0f); | |||||
| RNA_def_property_ui_range(prop, 0.01, 100, 1, 3); | |||||
| RNA_def_property_ui_text(prop, "Min Radius", | |||||
| "Smallest size a particle should have to be considered for meshing"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "part_scale_factor", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "part_scale_factor"); | |||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Radius Scale", | |||||
| "Value to multiply the particles size by"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "part_vel_factor", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "part_vel_factor"); | |||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Velocity Scale", | |||||
| "Value to multiply the particles velocity by, used for generating the trails"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "trail_size", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "trail_size"); | |||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Trail Size", "Distance between trailing spheres"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "adaptivity", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "adaptivity"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Adaptivity", | |||||
| "Set the level of variation in the resulting mesh"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "isovalue", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "isovalue"); | |||||
| RNA_def_property_range(prop, -1.0f, 1.0f); | |||||
| RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Isovalue", "Determine what values are considered for meshing"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "mask_width", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "mask_width"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Mask Width", "Width of the mask"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "mask_offset", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "mask_offset"); | |||||
| RNA_def_property_range(prop, -10.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Mask Offset", "Offset the mask"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "ext_band", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "ext_band"); | |||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Exterior Band", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "int_band", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "int_band"); | |||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | |||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | |||||
| RNA_def_property_ui_text(prop, "Interior Band", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "invert_mask", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "invert_mask", 1); | |||||
| RNA_def_property_ui_text(prop, "Invert Mask", "Generate sphere instances to have a Motion Blur type of effect"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "generate_trails", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "generate_trails", 1); | |||||
| RNA_def_property_ui_text(prop, "Generate Trails", "Generate sphere instances to have a Motion Blur type of effect"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "generate_mask", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "generate_mask", 1); | |||||
| RNA_def_property_ui_text(prop, "Generate Mask", "Preserve details by generating an alpha mask around the particles"); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | |||||
| prop = RNA_def_property(srna, "active_levelset_filter", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_struct_type(prop, "LevelSetFilter"); | |||||
| RNA_def_property_pointer_funcs(prop, "rna_ParticleMesherModifier_active_levelset_filter_get", NULL, NULL, NULL); | |||||
| RNA_def_property_ui_text(prop, "Active Level Set Filter", ""); | |||||
| prop = RNA_def_property(srna, "active_levelset_filter_index", PROP_INT, PROP_UNSIGNED); | |||||
| RNA_def_property_int_funcs(prop, "rna_ParticleMesherModifier_active_levelset_filter_index_get", | |||||
| "rna_ParticleMesherModifier_active_levelset_filter_index_set", | |||||
| "rna_ParticleMesherModifier_active_levelset_filter_index_range"); | |||||
| RNA_def_property_ui_text(prop, "Active Level Set Filter Index", ""); | |||||
| rna_def_level_set_filter(brna); | |||||
| } | |||||
| void RNA_def_modifier(BlenderRNA *brna) | void RNA_def_modifier(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| /* data */ | /* data */ | ||||
| srna = RNA_def_struct(brna, "Modifier", NULL); | srna = RNA_def_struct(brna, "Modifier", NULL); | ||||
| RNA_def_struct_ui_text(srna, "Modifier", "Modifier affecting the geometry data of an object"); | RNA_def_struct_ui_text(srna, "Modifier", "Modifier affecting the geometry data of an object"); | ||||
| ▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | void RNA_def_modifier(BlenderRNA *brna) | ||||
| rna_def_modifier_remesh(brna); | rna_def_modifier_remesh(brna); | ||||
| rna_def_modifier_skin(brna); | rna_def_modifier_skin(brna); | ||||
| rna_def_modifier_laplaciansmooth(brna); | rna_def_modifier_laplaciansmooth(brna); | ||||
| rna_def_modifier_triangulate(brna); | rna_def_modifier_triangulate(brna); | ||||
| rna_def_modifier_meshcache(brna); | rna_def_modifier_meshcache(brna); | ||||
| rna_def_modifier_laplaciandeform(brna); | rna_def_modifier_laplaciandeform(brna); | ||||
| rna_def_modifier_wireframe(brna); | rna_def_modifier_wireframe(brna); | ||||
| rna_def_modifier_datatransfer(brna); | rna_def_modifier_datatransfer(brna); | ||||
| rna_def_modifier_particlemesher(brna); | |||||
| } | } | ||||
| #endif | #endif | ||||