Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_modifier.c
| Show First 20 Lines • Show All 642 Lines • ▼ Show 20 Lines | static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| smokeModifier_free(smd); /* XXX TODO: completely free all 3 pointers */ | smokeModifier_free(smd); /* XXX TODO: completely free all 3 pointers */ | ||||
| smokeModifier_createType(smd); /* create regarding of selected type */ | smokeModifier_createType(smd); /* create regarding of selected type */ | ||||
| switch (smd->type) { | switch (smd->type) { | ||||
| case MOD_SMOKE_TYPE_DOMAIN: | case MOD_SMOKE_TYPE_DOMAIN: | ||||
| ob->dt = OB_WIRE; | ob->dt = OB_WIRE; | ||||
| break; | break; | ||||
| case MOD_SMOKE_TYPE_FLOW: | case MOD_SMOKE_TYPE_FLOW: | ||||
| case MOD_SMOKE_TYPE_COLL: | case MOD_SMOKE_TYPE_EFFEC: | ||||
| case 0: | case 0: | ||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| /* update dependency since a domain - other type switch could have happened */ | /* update dependency since a domain - other type switch could have happened */ | ||||
| rna_Modifier_dependency_update(bmain, scene, ptr); | rna_Modifier_dependency_update(bmain, scene, ptr); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,274 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem prop_smoke_type_items[] = { | static const EnumPropertyItem prop_smoke_type_items[] = { | ||||
| {0, "NONE", 0, "None", ""}, | {0, "NONE", 0, "None", ""}, | ||||
| {MOD_SMOKE_TYPE_DOMAIN, "DOMAIN", 0, "Domain", ""}, | {MOD_SMOKE_TYPE_DOMAIN, "DOMAIN", 0, "Domain", ""}, | ||||
| {MOD_SMOKE_TYPE_FLOW, "FLOW", 0, "Flow", "Inflow/Outflow"}, | {MOD_SMOKE_TYPE_FLOW, "FLOW", 0, "Flow", "Inflow/Outflow"}, | ||||
| {MOD_SMOKE_TYPE_COLL, "COLLISION", 0, "Collision", ""}, | {MOD_SMOKE_TYPE_EFFEC, "EFFECTOR", 0, "Effector", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| srna = RNA_def_struct(brna, "SmokeModifier", "Modifier"); | srna = RNA_def_struct(brna, "SmokeModifier", "Modifier"); | ||||
| RNA_def_struct_ui_text(srna, "Smoke Modifier", "Smoke simulation modifier"); | RNA_def_struct_ui_text(srna, "Smoke Modifier", "Smoke simulation modifier"); | ||||
| RNA_def_struct_sdna(srna, "SmokeModifierData"); | RNA_def_struct_sdna(srna, "SmokeModifierData"); | ||||
| RNA_def_struct_ui_icon(srna, ICON_MOD_SMOKE); | RNA_def_struct_ui_icon(srna, ICON_MOD_SMOKE); | ||||
| prop = RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "domain"); | RNA_def_property_pointer_sdna(prop, NULL, "domain"); | ||||
| RNA_def_property_ui_text(prop, "Domain Settings", ""); | RNA_def_property_ui_text(prop, "Domain Settings", ""); | ||||
| prop = RNA_def_property(srna, "flow_settings", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "flow_settings", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "flow"); | RNA_def_property_pointer_sdna(prop, NULL, "flow"); | ||||
| RNA_def_property_ui_text(prop, "Flow Settings", ""); | RNA_def_property_ui_text(prop, "Flow Settings", ""); | ||||
| prop = RNA_def_property(srna, "coll_settings", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "effec_settings", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "coll"); | RNA_def_property_pointer_sdna(prop, NULL, "effec"); | ||||
| RNA_def_property_ui_text(prop, "Collision Settings", ""); | RNA_def_property_ui_text(prop, "Effector Settings", ""); | ||||
| prop = RNA_def_property(srna, "smoke_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "smoke_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "type"); | RNA_def_property_enum_sdna(prop, NULL, "type"); | ||||
| RNA_def_property_enum_items(prop, prop_smoke_type_items); | RNA_def_property_enum_items(prop, prop_smoke_type_items); | ||||
| RNA_def_property_ui_text(prop, "Type", ""); | RNA_def_property_ui_text(prop, "Type", ""); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, 0, "rna_Smoke_set_type"); | RNA_def_property_update(prop, 0, "rna_Smoke_set_type"); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,179 Lines • Show Last 20 Lines | |||||