Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_fluid.c
| Show All 14 Lines | |||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "BKE_fluid.h" | #include "BKE_fluid.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_pointcache.h" | #include "BKE_pointcache.h" | ||||
| #include "BLT_translation.h" | |||||
| #include "DNA_fluid_types.h" | #include "DNA_fluid_types.h" | ||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DNA_object_force_types.h" | #include "DNA_object_force_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_particle_types.h" | #include "DNA_particle_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| ▲ Show 20 Lines • Show All 534 Lines • ▼ Show 20 Lines | static const EnumPropertyItem *rna_Fluid_cachetype_mesh_itemf(bContext *UNUSED(C), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| EnumPropertyItem *item = NULL; | EnumPropertyItem *item = NULL; | ||||
| EnumPropertyItem tmp = {0, "", 0, "", ""}; | EnumPropertyItem tmp = {0, "", 0, "", ""}; | ||||
| int totitem = 0; | int totitem = 0; | ||||
| tmp.value = FLUID_DOMAIN_FILE_BIN_OBJECT; | tmp.value = FLUID_DOMAIN_FILE_BIN_OBJECT; | ||||
| tmp.identifier = "BOBJECT"; | tmp.identifier = "BOBJECT"; | ||||
| tmp.name = "Binary Object"; | tmp.name = N_("Binary Object"); | ||||
| tmp.description = "Binary object file format (.bobj.gz)"; | tmp.description = N_("Binary object file format (.bobj.gz)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FILE_OBJECT; | tmp.value = FLUID_DOMAIN_FILE_OBJECT; | ||||
| tmp.identifier = "OBJECT"; | tmp.identifier = "OBJECT"; | ||||
| tmp.name = "Object"; | tmp.name = N_("Object"); | ||||
| tmp.description = "Object file format (.obj)"; | tmp.description = N_("Object file format (.obj)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| static const EnumPropertyItem *rna_Fluid_cachetype_volume_itemf(bContext *UNUSED(C), | static const EnumPropertyItem *rna_Fluid_cachetype_volume_itemf(bContext *UNUSED(C), | ||||
| PointerRNA *ptr, | PointerRNA *ptr, | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| EnumPropertyItem *item = NULL; | EnumPropertyItem *item = NULL; | ||||
| EnumPropertyItem tmp = {0, "", 0, "", ""}; | EnumPropertyItem tmp = {0, "", 0, "", ""}; | ||||
| int totitem = 0; | int totitem = 0; | ||||
| tmp.value = FLUID_DOMAIN_FILE_UNI; | tmp.value = FLUID_DOMAIN_FILE_UNI; | ||||
| tmp.identifier = "UNI"; | tmp.identifier = "UNI"; | ||||
| tmp.name = "Uni Cache"; | tmp.name = N_("Uni Cache"); | ||||
| tmp.description = "Uni file format (.uni)"; | tmp.description = N_("Uni file format (.uni)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| # ifdef WITH_OPENVDB | # ifdef WITH_OPENVDB | ||||
| tmp.value = FLUID_DOMAIN_FILE_OPENVDB; | tmp.value = FLUID_DOMAIN_FILE_OPENVDB; | ||||
| tmp.identifier = "OPENVDB"; | tmp.identifier = "OPENVDB"; | ||||
| tmp.name = "OpenVDB"; | tmp.name = N_("OpenVDB"); | ||||
| tmp.description = "OpenVDB file format (.vdb)"; | tmp.description = N_("OpenVDB file format (.vdb)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| # endif | # endif | ||||
| /* Support for deprecated .raw format. */ | /* Support for deprecated .raw format. */ | ||||
| FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data; | FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data; | ||||
| if (fds->cache_data_format == FLUID_DOMAIN_FILE_RAW || | if (fds->cache_data_format == FLUID_DOMAIN_FILE_RAW || | ||||
| fds->cache_noise_format == FLUID_DOMAIN_FILE_RAW) { | fds->cache_noise_format == FLUID_DOMAIN_FILE_RAW) { | ||||
| tmp.value = FLUID_DOMAIN_FILE_RAW; | tmp.value = FLUID_DOMAIN_FILE_RAW; | ||||
| tmp.identifier = "RAW"; | tmp.identifier = "RAW"; | ||||
| tmp.name = "Raw Cache"; | tmp.name = N_("Raw Cache"); | ||||
| tmp.description = "Raw file format (.raw)"; | tmp.description = N_("Raw file format (.raw)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| } | } | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| static const EnumPropertyItem *rna_Fluid_cachetype_particle_itemf(bContext *UNUSED(C), | static const EnumPropertyItem *rna_Fluid_cachetype_particle_itemf(bContext *UNUSED(C), | ||||
| PointerRNA *UNUSED(ptr), | PointerRNA *UNUSED(ptr), | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| EnumPropertyItem *item = NULL; | EnumPropertyItem *item = NULL; | ||||
| EnumPropertyItem tmp = {0, "", 0, "", ""}; | EnumPropertyItem tmp = {0, "", 0, "", ""}; | ||||
| int totitem = 0; | int totitem = 0; | ||||
| tmp.value = FLUID_DOMAIN_FILE_UNI; | tmp.value = FLUID_DOMAIN_FILE_UNI; | ||||
| tmp.identifier = "UNI"; | tmp.identifier = "UNI"; | ||||
| tmp.name = "Uni Cache"; | tmp.name = N_("Uni Cache"); | ||||
| tmp.description = "Uni file format"; | tmp.description = N_("Uni file format"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| Show All 21 Lines | static const EnumPropertyItem *rna_Fluid_cobafield_itemf(bContext *UNUSED(C), | ||||
| EnumPropertyItem *item = NULL; | EnumPropertyItem *item = NULL; | ||||
| EnumPropertyItem tmp = {0, "", 0, "", ""}; | EnumPropertyItem tmp = {0, "", 0, "", ""}; | ||||
| int totitem = 0; | int totitem = 0; | ||||
| tmp.value = FLUID_DOMAIN_FIELD_FLAGS; | tmp.value = FLUID_DOMAIN_FIELD_FLAGS; | ||||
| tmp.identifier = "FLAGS"; | tmp.identifier = "FLAGS"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Flags"; | tmp.name = N_("Flags"); | ||||
| tmp.description = "Flag grid of the fluid domain"; | tmp.description = N_("Flag grid of the fluid domain"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_PRESSURE; | tmp.value = FLUID_DOMAIN_FIELD_PRESSURE; | ||||
| tmp.identifier = "PRESSURE"; | tmp.identifier = "PRESSURE"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Pressure"; | tmp.name = N_("Pressure"); | ||||
| tmp.description = "Pressure field of the fluid domain"; | tmp.description = N_("Pressure field of the fluid domain"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_VELOCITY_X; | tmp.value = FLUID_DOMAIN_FIELD_VELOCITY_X; | ||||
| tmp.identifier = "VELOCITY_X"; | tmp.identifier = "VELOCITY_X"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "X Velocity"; | tmp.name = N_("X Velocity"); | ||||
| tmp.description = "X component of the velocity field"; | tmp.description = N_("X component of the velocity field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_VELOCITY_Y; | tmp.value = FLUID_DOMAIN_FIELD_VELOCITY_Y; | ||||
| tmp.identifier = "VELOCITY_Y"; | tmp.identifier = "VELOCITY_Y"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Y Velocity"; | tmp.name = N_("Y Velocity"); | ||||
| tmp.description = "Y component of the velocity field"; | tmp.description = N_("Y component of the velocity field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_VELOCITY_Z; | tmp.value = FLUID_DOMAIN_FIELD_VELOCITY_Z; | ||||
| tmp.identifier = "VELOCITY_Z"; | tmp.identifier = "VELOCITY_Z"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Z Velocity"; | tmp.name = N_("Z Velocity"); | ||||
| tmp.description = "Z component of the velocity field"; | tmp.description = N_("Z component of the velocity field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_FORCE_X; | tmp.value = FLUID_DOMAIN_FIELD_FORCE_X; | ||||
| tmp.identifier = "FORCE_X"; | tmp.identifier = "FORCE_X"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "X Force"; | tmp.name = N_("X Force"); | ||||
| tmp.description = "X component of the force field"; | tmp.description = N_("X component of the force field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_FORCE_Y; | tmp.value = FLUID_DOMAIN_FIELD_FORCE_Y; | ||||
| tmp.identifier = "FORCE_Y"; | tmp.identifier = "FORCE_Y"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Y Force"; | tmp.name = N_("Y Force"); | ||||
| tmp.description = "Y component of the force field"; | tmp.description = N_("Y component of the force field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_FORCE_Z; | tmp.value = FLUID_DOMAIN_FIELD_FORCE_Z; | ||||
| tmp.identifier = "FORCE_Z"; | tmp.identifier = "FORCE_Z"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Z Force"; | tmp.name = N_("Z Force"); | ||||
| tmp.description = "Z component of the force field"; | tmp.description = N_("Z component of the force field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| if (settings->type == FLUID_DOMAIN_TYPE_GAS) { | if (settings->type == FLUID_DOMAIN_TYPE_GAS) { | ||||
| tmp.value = FLUID_DOMAIN_FIELD_COLOR_R; | tmp.value = FLUID_DOMAIN_FIELD_COLOR_R; | ||||
| tmp.identifier = "COLOR_R"; | tmp.identifier = "COLOR_R"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Red"; | tmp.name = N_("Red"); | ||||
| tmp.description = "Red component of the color field"; | tmp.description = N_("Red component of the color field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_COLOR_G; | tmp.value = FLUID_DOMAIN_FIELD_COLOR_G; | ||||
| tmp.identifier = "COLOR_G"; | tmp.identifier = "COLOR_G"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Green"; | tmp.name = N_("Green"); | ||||
| tmp.description = "Green component of the color field"; | tmp.description = N_("Green component of the color field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_COLOR_B; | tmp.value = FLUID_DOMAIN_FIELD_COLOR_B; | ||||
| tmp.identifier = "COLOR_B"; | tmp.identifier = "COLOR_B"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Blue"; | tmp.name = N_("Blue"); | ||||
| tmp.description = "Blue component of the color field"; | tmp.description = N_("Blue component of the color field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_DENSITY; | tmp.value = FLUID_DOMAIN_FIELD_DENSITY; | ||||
| tmp.identifier = "DENSITY"; | tmp.identifier = "DENSITY"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Density"; | tmp.name = N_("Density"); | ||||
| tmp.description = "Quantity of soot in the fluid"; | tmp.description = N_("Quantity of soot in the fluid"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_FLAME; | tmp.value = FLUID_DOMAIN_FIELD_FLAME; | ||||
| tmp.identifier = "FLAME"; | tmp.identifier = "FLAME"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Flame"; | tmp.name = N_("Flame"); | ||||
| tmp.description = "Flame field"; | tmp.description = N_("Flame field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_FUEL; | tmp.value = FLUID_DOMAIN_FIELD_FUEL; | ||||
| tmp.identifier = "FUEL"; | tmp.identifier = "FUEL"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Fuel"; | tmp.name = N_("Fuel"); | ||||
| tmp.description = "Fuel field"; | tmp.description = N_("Fuel field"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_HEAT; | tmp.value = FLUID_DOMAIN_FIELD_HEAT; | ||||
| tmp.identifier = "HEAT"; | tmp.identifier = "HEAT"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Heat"; | tmp.name = N_("Heat"); | ||||
| tmp.description = "Temperature of the fluid"; | tmp.description = N_("Temperature of the fluid"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| } | } | ||||
| else if (settings->type == FLUID_DOMAIN_TYPE_LIQUID) { | else if (settings->type == FLUID_DOMAIN_TYPE_LIQUID) { | ||||
| tmp.value = FLUID_DOMAIN_FIELD_PHI; | tmp.value = FLUID_DOMAIN_FIELD_PHI; | ||||
| tmp.identifier = "PHI"; | tmp.identifier = "PHI"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Fluid Levelset"; | tmp.name = N_("Fluid Levelset"); | ||||
| tmp.description = "Levelset representation of the fluid"; | tmp.description = N_("Levelset representation of the fluid"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_PHI_IN; | tmp.value = FLUID_DOMAIN_FIELD_PHI_IN; | ||||
| tmp.identifier = "PHI_IN"; | tmp.identifier = "PHI_IN"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Inflow Levelset"; | tmp.name = N_("Inflow Levelset"); | ||||
| tmp.description = "Levelset representation of the inflow"; | tmp.description = N_("Levelset representation of the inflow"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_PHI_OUT; | tmp.value = FLUID_DOMAIN_FIELD_PHI_OUT; | ||||
| tmp.identifier = "PHI_OUT"; | tmp.identifier = "PHI_OUT"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Outflow Levelset"; | tmp.name = N_("Outflow Levelset"); | ||||
| tmp.description = "Levelset representation of the outflow"; | tmp.description = N_("Levelset representation of the outflow"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = FLUID_DOMAIN_FIELD_PHI_OBSTACLE; | tmp.value = FLUID_DOMAIN_FIELD_PHI_OBSTACLE; | ||||
| tmp.identifier = "PHI_OBSTACLE"; | tmp.identifier = "PHI_OBSTACLE"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Obstacle Levelset"; | tmp.name = N_("Obstacle Levelset"); | ||||
| tmp.description = "Levelset representation of the obstacles"; | tmp.description = N_("Levelset representation of the obstacles"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| } | } | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| static const EnumPropertyItem *rna_Fluid_data_depth_itemf(bContext *UNUSED(C), | static const EnumPropertyItem *rna_Fluid_data_depth_itemf(bContext *UNUSED(C), | ||||
| PointerRNA *ptr, | PointerRNA *ptr, | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; | FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; | ||||
| EnumPropertyItem *item = NULL; | EnumPropertyItem *item = NULL; | ||||
| EnumPropertyItem tmp = {0, "", 0, "", ""}; | EnumPropertyItem tmp = {0, "", 0, "", ""}; | ||||
| int totitem = 0; | int totitem = 0; | ||||
| tmp.value = VDB_PRECISION_FULL_FLOAT; | tmp.value = VDB_PRECISION_FULL_FLOAT; | ||||
| tmp.identifier = "32"; | tmp.identifier = "32"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Full"; | tmp.name = N_("Full"); | ||||
| tmp.description = "Full float (Use 32 bit for all data)"; | tmp.description = N_("Full float (Use 32 bit for all data)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| tmp.value = VDB_PRECISION_HALF_FLOAT; | tmp.value = VDB_PRECISION_HALF_FLOAT; | ||||
| tmp.identifier = "16"; | tmp.identifier = "16"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Half"; | tmp.name = N_("Half"); | ||||
| tmp.description = "Half float (Use 16 bit for all data)"; | tmp.description = N_("Half float (Use 16 bit for all data)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| if (settings->type == FLUID_DOMAIN_TYPE_LIQUID) { | if (settings->type == FLUID_DOMAIN_TYPE_LIQUID) { | ||||
| tmp.value = VDB_PRECISION_MINI_FLOAT; | tmp.value = VDB_PRECISION_MINI_FLOAT; | ||||
| tmp.identifier = "8"; | tmp.identifier = "8"; | ||||
| tmp.icon = 0; | tmp.icon = 0; | ||||
| tmp.name = "Mini"; | tmp.name = N_("Mini"); | ||||
| tmp.description = "Mini float (Use 8 bit where possible, otherwise use 16 bit)"; | tmp.description = N_("Mini float (Use 8 bit where possible, otherwise use 16 bit)"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| } | } | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 330 Lines • ▼ Show 20 Lines | static const EnumPropertyItem *rna_Fluid_flowsource_itemf(bContext *UNUSED(C), | ||||
| EnumPropertyItem *item = NULL; | EnumPropertyItem *item = NULL; | ||||
| EnumPropertyItem tmp = {0, "", 0, "", ""}; | EnumPropertyItem tmp = {0, "", 0, "", ""}; | ||||
| int totitem = 0; | int totitem = 0; | ||||
| tmp.value = FLUID_FLOW_SOURCE_MESH; | tmp.value = FLUID_FLOW_SOURCE_MESH; | ||||
| tmp.identifier = "MESH"; | tmp.identifier = "MESH"; | ||||
| tmp.icon = ICON_META_CUBE; | tmp.icon = ICON_META_CUBE; | ||||
| tmp.name = "Mesh"; | tmp.name = N_("Mesh"); | ||||
| tmp.description = "Emit fluid from mesh surface or volume"; | tmp.description = N_("Emit fluid from mesh surface or volume"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| if (settings->type != FLUID_FLOW_TYPE_LIQUID) { | if (settings->type != FLUID_FLOW_TYPE_LIQUID) { | ||||
| tmp.value = FLUID_FLOW_SOURCE_PARTICLES; | tmp.value = FLUID_FLOW_SOURCE_PARTICLES; | ||||
| tmp.identifier = "PARTICLES"; | tmp.identifier = "PARTICLES"; | ||||
| tmp.icon = ICON_PARTICLES; | tmp.icon = ICON_PARTICLES; | ||||
| tmp.name = "Particle System"; | tmp.name = N_("Particle System"); | ||||
| tmp.description = "Emit smoke from particles"; | tmp.description = N_("Emit smoke from particles"); | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| } | } | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,788 Lines • Show Last 20 Lines | |||||