Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_cloth.c
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
| static void rna_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_cloth_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_cloth_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) | |||||
| { | |||||
| DAG_relations_tag_update(bmain); | |||||
| rna_cloth_update(bmain, scene, ptr); | |||||
| } | |||||
| static void rna_cloth_pinning_changed(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_cloth_pinning_changed(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| Object *ob = (Object *)ptr->id.data; | Object *ob = (Object *)ptr->id.data; | ||||
| /* ClothSimSettings *settings = (ClothSimSettings *)ptr->data; */ | /* ClothSimSettings *settings = (ClothSimSettings *)ptr->data; */ | ||||
| ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); | ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); | ||||
| cloth_free_modifier(clmd); | cloth_free_modifier(clmd); | ||||
| ▲ Show 20 Lines • Show All 634 Lines • ▼ Show 20 Lines | static void rna_def_cloth_collision_settings(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Self Collision Quality", | RNA_def_property_ui_text(prop, "Self Collision Quality", | ||||
| "How many self collision iterations should be done " | "How many self collision iterations should be done " | ||||
| "(higher is better quality but slower)"); | "(higher is better quality but slower)"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "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_cloth_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_CollSettings_selfcol_vgroup_get", "rna_CollSettings_selfcol_vgroup_length", | RNA_def_property_string_funcs(prop, "rna_CollSettings_selfcol_vgroup_get", "rna_CollSettings_selfcol_vgroup_length", | ||||
| "rna_CollSettings_selfcol_vgroup_set"); | "rna_CollSettings_selfcol_vgroup_set"); | ||||
| RNA_def_property_ui_text(prop, "Selfcollision Vertex Group", | RNA_def_property_ui_text(prop, "Selfcollision Vertex Group", | ||||
| "Vertex group to define vertices which are not used during self collisions"); | "Vertex group to define vertices which are not used during self collisions"); | ||||
| RNA_def_property_update(prop, 0, "rna_cloth_update"); | RNA_def_property_update(prop, 0, "rna_cloth_update"); | ||||
| } | } | ||||
| Show All 9 Lines | |||||