Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_cloth.c
| Show First 20 Lines • Show All 578 Lines • ▼ Show 20 Lines | static const EnumPropertyItem prop_bending_model_items[] = { | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| srna = RNA_def_struct(brna, "ClothSettings", NULL); | srna = RNA_def_struct(brna, "ClothSettings", NULL); | ||||
| RNA_def_struct_ui_text(srna, "Cloth Settings", "Cloth simulation settings for an object"); | RNA_def_struct_ui_text(srna, "Cloth Settings", "Cloth simulation settings for an object"); | ||||
| RNA_def_struct_sdna(srna, "ClothSimSettings"); | RNA_def_struct_sdna(srna, "ClothSimSettings"); | ||||
| RNA_def_struct_path_func(srna, "rna_ClothSettings_path"); | RNA_def_struct_path_func(srna, "rna_ClothSettings_path"); | ||||
| RNA_define_lib_overridable(true); | |||||
| /* goal */ | /* goal */ | ||||
| prop = RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "mingoal"); | RNA_def_property_float_sdna(prop, NULL, "mingoal"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range"); | prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | static void rna_def_cloth_sim_settings(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Vertex Mass", "The mass of each vertex on the cloth material"); | RNA_def_property_ui_text(prop, "Vertex Mass", "The mass of each vertex on the cloth material"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_ClothSettings_mass_vgroup_get", | "rna_ClothSettings_mass_vgroup_get", | ||||
| "rna_ClothSettings_mass_vgroup_length", | "rna_ClothSettings_mass_vgroup_length", | ||||
| "rna_ClothSettings_mass_vgroup_set"); | "rna_ClothSettings_mass_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices"); | RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_pinning_changed"); | RNA_def_property_update(prop, 0, "rna_cloth_pinning_changed"); | ||||
| prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); | prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); | ||||
| RNA_def_property_array(prop, 3); | RNA_def_property_array(prop, 3); | ||||
| RNA_def_property_range(prop, -100.0, 100.0); | RNA_def_property_range(prop, -100.0, 100.0); | ||||
| RNA_def_property_float_funcs( | RNA_def_property_float_funcs( | ||||
| prop, "rna_ClothSettings_gravity_get", "rna_ClothSettings_gravity_set", NULL); | prop, "rna_ClothSettings_gravity_get", "rna_ClothSettings_gravity_set", NULL); | ||||
| Show All 32 Lines | static void rna_def_cloth_sim_settings(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Speed", "Cloth speed is multiplied by this value"); | RNA_def_property_ui_text(prop, "Speed", "Cloth speed is multiplied by this value"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_shrink", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_shrink", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_ClothSettings_shrink_vgroup_get", | "rna_ClothSettings_shrink_vgroup_get", | ||||
| "rna_ClothSettings_shrink_vgroup_length", | "rna_ClothSettings_shrink_vgroup_length", | ||||
| "rna_ClothSettings_shrink_vgroup_set"); | "rna_ClothSettings_shrink_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text(prop, "Shrink Vertex Group", "Vertex Group for shrinking cloth"); | RNA_def_property_ui_text(prop, "Shrink Vertex Group", "Vertex Group for shrinking cloth"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "shrink_min", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "shrink_min", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "shrink_min"); | RNA_def_property_float_sdna(prop, NULL, "shrink_min"); | ||||
| RNA_def_property_range(prop, -FLT_MAX, 1.0f); | RNA_def_property_range(prop, -FLT_MAX, 1.0f); | ||||
| RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.05f, 3); | RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.05f, 3); | ||||
| RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_shrink_min_set", NULL); | RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_shrink_min_set", NULL); | ||||
| ▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | static void rna_def_cloth_sim_settings(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Sewing Force Max", "Maximum sewing force"); | RNA_def_property_ui_text(prop, "Sewing Force Max", "Maximum sewing force"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_structural_stiffness", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_structural_stiffness", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_ClothSettings_struct_vgroup_get", | "rna_ClothSettings_struct_vgroup_get", | ||||
| "rna_ClothSettings_struct_vgroup_length", | "rna_ClothSettings_struct_vgroup_length", | ||||
| "rna_ClothSettings_struct_vgroup_set"); | "rna_ClothSettings_struct_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Structural Stiffness Vertex Group", | "Structural Stiffness Vertex Group", | ||||
| "Vertex group for fine control over structural stiffness"); | "Vertex group for fine control over structural stiffness"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_shear_stiffness", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_shear_stiffness", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_ClothSettings_shear_vgroup_get", | "rna_ClothSettings_shear_vgroup_get", | ||||
| "rna_ClothSettings_shear_vgroup_length", | "rna_ClothSettings_shear_vgroup_length", | ||||
| "rna_ClothSettings_shear_vgroup_set"); | "rna_ClothSettings_shear_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Shear Stiffness Vertex Group", "Vertex group for fine control over shear stiffness"); | prop, "Shear Stiffness Vertex Group", "Vertex group for fine control over shear stiffness"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "bending"); | RNA_def_property_float_sdna(prop, NULL, "bending"); | ||||
| RNA_def_property_range(prop, 0.0f, 10000.0f); | RNA_def_property_range(prop, 0.0f, 10000.0f); | ||||
| RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_bending_set", NULL); | RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_bending_set", NULL); | ||||
| Show All 20 Lines | static void rna_def_cloth_sim_settings(BlenderRNA *brna) | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_bending", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_bending", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_ClothSettings_bend_vgroup_get", | "rna_ClothSettings_bend_vgroup_get", | ||||
| "rna_ClothSettings_bend_vgroup_length", | "rna_ClothSettings_bend_vgroup_length", | ||||
| "rna_ClothSettings_bend_vgroup_set"); | "rna_ClothSettings_bend_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Bending Stiffness Vertex Group", | "Bending Stiffness Vertex Group", | ||||
| "Vertex group for fine control over bending stiffness"); | "Vertex group for fine control over bending stiffness"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "EffectorWeights"); | RNA_def_property_struct_type(prop, "EffectorWeights"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Effector Weights", ""); | RNA_def_property_ui_text(prop, "Effector Weights", ""); | ||||
| prop = RNA_def_property(srna, "rest_shape_key", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "rest_shape_key", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_struct_type(prop, "ShapeKey"); | RNA_def_property_struct_type(prop, "ShapeKey"); | ||||
| RNA_def_property_pointer_funcs(prop, | RNA_def_property_pointer_funcs(prop, | ||||
| "rna_ClothSettings_rest_shape_key_get", | "rna_ClothSettings_rest_shape_key_get", | ||||
| "rna_ClothSettings_rest_shape_key_set", | "rna_ClothSettings_rest_shape_key_set", | ||||
| NULL, | NULL, | ||||
| NULL); | NULL); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Rest Shape Key", "Shape key to use the rest spring lengths from"); | prop, "Rest Shape Key", "Shape key to use the rest spring lengths from"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "use_dynamic_mesh", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_dynamic_mesh", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH); | RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Dynamic Base Mesh", "Make simulation respect deformations in the base mesh"); | prop, "Dynamic Base Mesh", "Make simulation respect deformations in the base mesh"); | ||||
| ▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | static void rna_def_cloth_sim_settings(BlenderRNA *brna) | ||||
| RNA_def_property_editable_func(prop, "rna_ClothSettings_internal_editable"); | RNA_def_property_editable_func(prop, "rna_ClothSettings_internal_editable"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_intern", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_intern", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_ClothSettings_internal_vgroup_get", | "rna_ClothSettings_internal_vgroup_get", | ||||
| "rna_ClothSettings_internal_vgroup_length", | "rna_ClothSettings_internal_vgroup_length", | ||||
| "rna_ClothSettings_internal_vgroup_set"); | "rna_ClothSettings_internal_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Internal Springs Vertex Group", | "Internal Springs Vertex Group", | ||||
| "Vertex group for fine control over the internal spring stiffness"); | "Vertex group for fine control over the internal spring stiffness"); | ||||
| RNA_def_property_editable_func(prop, "rna_ClothSettings_internal_editable"); | RNA_def_property_editable_func(prop, "rna_ClothSettings_internal_editable"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| /* Pressure */ | /* Pressure */ | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | RNA_def_property_ui_text( | ||||
| "or buoyancy from the surrounding fluid if negative"); | "or buoyancy from the surrounding fluid if negative"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_pressure", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_pressure", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_ClothSettings_pressure_vgroup_get", | "rna_ClothSettings_pressure_vgroup_get", | ||||
| "rna_ClothSettings_pressure_vgroup_length", | "rna_ClothSettings_pressure_vgroup_length", | ||||
| "rna_ClothSettings_pressure_vgroup_set"); | "rna_ClothSettings_pressure_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Pressure Vertex Group", | "Pressure Vertex Group", | ||||
| "Vertex Group for where to apply pressure. Zero weight means no " | "Vertex Group for where to apply pressure. Zero weight means no " | ||||
| "pressure while a weight of one means full pressure. Faces with a vertex " | "pressure while a weight of one means full pressure. Faces with a vertex " | ||||
| "that has zero weight will be excluded from the volume calculation"); | "that has zero weight will be excluded from the volume calculation"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| Show All 22 Lines | # endif | ||||
| /* unused still */ | /* unused still */ | ||||
| # if 0 | # if 0 | ||||
| prop = RNA_def_property(srna, "max_spring_extensions", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "max_spring_extensions", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "maxspringlen"); | RNA_def_property_int_sdna(prop, NULL, "maxspringlen"); | ||||
| RNA_def_property_range(prop, 1.0, 1000.0); | RNA_def_property_range(prop, 1.0, 1000.0); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Maximum Spring Extension", "Maximum extension before spring gets cut"); | prop, "Maximum Spring Extension", "Maximum extension before spring gets cut"); | ||||
| # endif | # endif | ||||
| RNA_define_lib_overridable(false); | |||||
| } | } | ||||
| static void rna_def_cloth_collision_settings(BlenderRNA *brna) | static void rna_def_cloth_collision_settings(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "ClothCollisionSettings", NULL); | srna = RNA_def_struct(brna, "ClothCollisionSettings", NULL); | ||||
| RNA_def_struct_ui_text( | RNA_def_struct_ui_text( | ||||
| srna, | srna, | ||||
| "Cloth Collision Settings", | "Cloth Collision Settings", | ||||
| "Cloth simulation settings for self collision and collision with other objects"); | "Cloth simulation settings for self collision and collision with other objects"); | ||||
| RNA_def_struct_sdna(srna, "ClothCollSettings"); | RNA_def_struct_sdna(srna, "ClothCollSettings"); | ||||
| RNA_def_struct_path_func(srna, "rna_ClothCollisionSettings_path"); | RNA_def_struct_path_func(srna, "rna_ClothCollisionSettings_path"); | ||||
| RNA_define_lib_overridable(true); | |||||
| /* general collision */ | /* general collision */ | ||||
| prop = RNA_def_property(srna, "use_collision", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_collision", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_ENABLED); | RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_ENABLED); | ||||
| RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions with other objects"); | RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions with other objects"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_dependency_update"); | RNA_def_property_update(prop, 0, "rna_cloth_dependency_update"); | ||||
| prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE); | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | static void rna_def_cloth_collision_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "self_friction", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "self_friction", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_range(prop, 0.0f, 80.0f); | RNA_def_property_range(prop, 0.0f, 80.0f); | ||||
| RNA_def_property_ui_text(prop, "Self Friction", "Friction with self contact"); | RNA_def_property_ui_text(prop, "Self Friction", "Friction with self contact"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "group"); | RNA_def_property_pointer_sdna(prop, NULL, "group"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this Collection"); | RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this Collection"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_dependency_update"); | RNA_def_property_update(prop, 0, "rna_cloth_dependency_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_self_collisions", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_self_collisions", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_CollSettings_selfcol_vgroup_get", | "rna_CollSettings_selfcol_vgroup_get", | ||||
| "rna_CollSettings_selfcol_vgroup_length", | "rna_CollSettings_selfcol_vgroup_length", | ||||
| "rna_CollSettings_selfcol_vgroup_set"); | "rna_CollSettings_selfcol_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Selfcollision Vertex Group", | "Selfcollision Vertex Group", | ||||
| "Triangles with all vertices in this group are not used during self collisions"); | "Triangles with all vertices in this group are not used during self collisions"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "vertex_group_object_collisions", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group_object_collisions", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_CollSettings_objcol_vgroup_get", | "rna_CollSettings_objcol_vgroup_get", | ||||
| "rna_CollSettings_objcol_vgroup_length", | "rna_CollSettings_objcol_vgroup_length", | ||||
| "rna_CollSettings_objcol_vgroup_set"); | "rna_CollSettings_objcol_vgroup_set"); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | |||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Collision Vertex Group", | "Collision Vertex Group", | ||||
| "Triangles with all vertices in this group are not used during object collisions"); | "Triangles with all vertices in this group are not used during object collisions"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "self_impulse_clamp", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "self_impulse_clamp", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "self_clamp"); | RNA_def_property_float_sdna(prop, NULL, "self_clamp"); | ||||
| RNA_def_property_range(prop, 0.0f, 100.0f); | RNA_def_property_range(prop, 0.0f, 100.0f); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Impulse Clamping", | "Impulse Clamping", | ||||
| "Clamp collision impulses to avoid instability (0.0 to disable clamping)"); | "Clamp collision impulses to avoid instability (0.0 to disable clamping)"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| RNA_define_lib_overridable(false); | |||||
| } | } | ||||
| void RNA_def_cloth(BlenderRNA *brna) | void RNA_def_cloth(BlenderRNA *brna) | ||||
| { | { | ||||
| rna_def_cloth_solver_result(brna); | rna_def_cloth_solver_result(brna); | ||||
| rna_def_cloth_sim_settings(brna); | rna_def_cloth_sim_settings(brna); | ||||
| rna_def_cloth_collision_settings(brna); | rna_def_cloth_collision_settings(brna); | ||||
| } | } | ||||
| #endif | #endif | ||||