Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_particle.c
| Show First 20 Lines • Show All 624 Lines • ▼ Show 20 Lines | static void rna_Particle_redo_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| rna_Particle_redo(bmain, scene, ptr); | rna_Particle_redo(bmain, scene, ptr); | ||||
| } | } | ||||
| static void rna_Particle_reset(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_Particle_reset(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET); | particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET); | ||||
| } | } | ||||
| static void rna_Particle_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) | |||||
| { | |||||
| DAG_relations_tag_update(bmain); | |||||
| rna_Particle_reset(bmain, scene, ptr); | |||||
| } | |||||
| static void rna_Particle_change_type(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_Particle_change_type(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET | PSYS_RECALC_TYPE); | particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET | PSYS_RECALC_TYPE); | ||||
| } | } | ||||
| static void rna_Particle_change_physics(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_Particle_change_physics(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET | PSYS_RECALC_PHYS); | particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET | PSYS_RECALC_PHYS); | ||||
| ▲ Show 20 Lines • Show All 2,098 Lines • ▼ Show 20 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| RNA_def_property_float_sdna(prop, NULL, "randsize"); | RNA_def_property_float_sdna(prop, NULL, "randsize"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation"); | RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| 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_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset_dependency"); | ||||
| /* global physical properties */ | /* global physical properties */ | ||||
| prop = RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "dragfac"); | RNA_def_property_float_sdna(prop, NULL, "dragfac"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Drag", "Amount of air-drag"); | RNA_def_property_ui_text(prop, "Drag", "Amount of air-drag"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| ▲ Show 20 Lines • Show All 810 Lines • Show Last 20 Lines | |||||