Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object_force.c
| Show First 20 Lines • Show All 724 Lines • ▼ Show 20 Lines | |||||
| static void rna_softbody_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_softbody_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| Object *ob = (Object *)ptr->id.data; | Object *ob = (Object *)ptr->id.data; | ||||
| DAG_id_tag_update(&ob->id, OB_RECALC_DATA); | DAG_id_tag_update(&ob->id, OB_RECALC_DATA); | ||||
| WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); | WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); | ||||
| } | } | ||||
| static void rna_softbody_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) | |||||
| { | |||||
| DAG_relations_tag_update(bmain); | |||||
| rna_softbody_update(bmain, scene, ptr); | |||||
| } | |||||
| static EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr, | static EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr, | ||||
| PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) | PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) | ||||
| { | { | ||||
| Object *ob = NULL; | Object *ob = NULL; | ||||
| if (particle_id_check(ptr)) | if (particle_id_check(ptr)) | ||||
| return empty_shape_items; | return empty_shape_items; | ||||
| ▲ Show 20 Lines • Show All 632 Lines • ▼ Show 20 Lines | static void rna_def_field(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "apply_to_rotation", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "apply_to_rotation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_DO_ROTATION); | RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_DO_ROTATION); | ||||
| RNA_def_property_ui_text(prop, "Rotation", "Effect particles' dynamic rotation"); | RNA_def_property_ui_text(prop, "Rotation", "Effect particles' dynamic rotation"); | ||||
| RNA_def_property_update(prop, 0, "rna_FieldSettings_update"); | RNA_def_property_update(prop, 0, "rna_FieldSettings_update"); | ||||
| prop = RNA_def_property(srna, "use_absorption", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_absorption", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_VISIBILITY); | RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_VISIBILITY); | ||||
| RNA_def_property_ui_text(prop, "Absorption", "Force gets absorbed by collision objects"); | RNA_def_property_ui_text(prop, "Absorption", "Force gets absorbed by collision objects"); | ||||
| RNA_def_property_update(prop, 0, "rna_FieldSettings_update"); | RNA_def_property_update(prop, 0, "rna_FieldSettings_dependency_update"); | ||||
| prop = RNA_def_property(srna, "use_multiple_springs", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_multiple_springs", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_MULTIPLE_SPRINGS); | RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_MULTIPLE_SPRINGS); | ||||
| RNA_def_property_ui_text(prop, "Multiple Springs", "Every point is effected by multiple springs"); | RNA_def_property_ui_text(prop, "Multiple Springs", "Every point is effected by multiple springs"); | ||||
| RNA_def_property_update(prop, 0, "rna_FieldSettings_update"); | RNA_def_property_update(prop, 0, "rna_FieldSettings_update"); | ||||
| prop = RNA_def_property(srna, "use_smoke_density", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_smoke_density", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_SMOKE_DENSITY); | RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_SMOKE_DENSITY); | ||||
| ▲ Show 20 Lines • Show All 460 Lines • ▼ Show 20 Lines | RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_self_collision_get", | ||||
| "rna_SoftBodySettings_self_collision_set"); | "rna_SoftBodySettings_self_collision_set"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision"); | RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision"); | ||||
| RNA_def_property_update(prop, 0, "rna_softbody_update"); | RNA_def_property_update(prop, 0, "rna_softbody_update"); | ||||
| prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Collision Group", "Limit colliders to this Group"); | RNA_def_property_ui_text(prop, "Collision Group", "Limit colliders to this Group"); | ||||
| RNA_def_property_update(prop, 0, "rna_softbody_update"); | RNA_def_property_update(prop, 0, "rna_softbody_dependency_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_pointer_sdna(prop, NULL, "effector_weights"); | RNA_def_property_pointer_sdna(prop, NULL, "effector_weights"); | ||||
| 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", ""); | ||||
| } | } | ||||
| Show All 11 Lines | |||||