diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-06 03:30:41 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-06 03:30:41 +0400 |
commit | 0114d78c33edfaef5bc412eefcb5d52a0a6823b0 (patch) | |
tree | 2deb1401eb9152ccf44855b8674ee75560b1ad9f /source/blender/makesrna/intern/rna_fluidsim.c | |
parent | 1eb893a11410955a9cf3ceb41ab50d515f5393b1 (diff) |
Code cleanup in rna files (huge, higly automated with py script).
Addresses:
* C++ comments.
* Spaces after if/for/while/switch statements.
* Spaces around assignment operators.
Diffstat (limited to 'source/blender/makesrna/intern/rna_fluidsim.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluidsim.c | 180 |
1 files changed, 90 insertions, 90 deletions
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index c17f23bb3a0..5a68fdf1c68 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -53,9 +53,9 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr) { - FluidsimSettings *fss= (FluidsimSettings*)ptr->data; + FluidsimSettings *fss = (FluidsimSettings*)ptr->data; - switch(fss->type) { + switch (fss->type) { case OB_FLUIDSIM_DOMAIN: return &RNA_DomainFluidSettings; case OB_FLUIDSIM_FLUID: @@ -77,7 +77,7 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr) static void rna_fluid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - Object *ob= ptr->id.data; + Object *ob = ptr->id.data; DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); @@ -95,17 +95,17 @@ static int fluidsim_find_lastframe(Object *ob, FluidsimSettings *fss) do { BLI_strncpy(targetFileTest, targetFile, sizeof(targetFileTest)); BLI_path_frame(targetFileTest, curFrame++, 0); - } while(BLI_exists(targetFileTest)); + } while (BLI_exists(targetFileTest)); return curFrame - 1; } static void rna_fluid_find_enframe(Main *bmain, Scene *scene, PointerRNA *ptr) { - Object *ob= ptr->id.data; - FluidsimModifierData *fluidmd= (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim); + Object *ob = ptr->id.data; + FluidsimModifierData *fluidmd = (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim); - if(fluidmd->fss->flag & OB_FLUIDSIM_REVERSE) { + if (fluidmd->fss->flag & OB_FLUIDSIM_REVERSE) { fluidmd->fss->lastgoodframe = fluidsim_find_lastframe(ob, fluidmd->fss); } else { @@ -116,46 +116,46 @@ static void rna_fluid_find_enframe(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA *ptr) { - Object *ob= (Object*)ptr->id.data; + Object *ob = (Object*)ptr->id.data; FluidsimModifierData *fluidmd; ParticleSystemModifierData *psmd; ParticleSystem *psys; ParticleSettings *part; - fluidmd= (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim); - fluidmd->fss->flag &= ~OB_FLUIDSIM_REVERSE; // clear flag + fluidmd = (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim); + fluidmd->fss->flag &= ~OB_FLUIDSIM_REVERSE; /* clear flag */ /* remove fluidsim particle system */ - if(fluidmd->fss->type & OB_FLUIDSIM_PARTICLE) { - for(psys=ob->particlesystem.first; psys; psys=psys->next) - if(psys->part->type == PART_FLUID) + if (fluidmd->fss->type & OB_FLUIDSIM_PARTICLE) { + for (psys = ob->particlesystem.first; psys; psys = psys->next) + if (psys->part->type == PART_FLUID) break; - if(ob->type == OB_MESH && !psys) { + if (ob->type == OB_MESH && !psys) { /* add particle system */ - part= psys_new_settings("ParticleSettings", bmain); - psys= MEM_callocN(sizeof(ParticleSystem), "particle_system"); + part = psys_new_settings("ParticleSettings", bmain); + psys = MEM_callocN(sizeof(ParticleSystem), "particle_system"); - part->type= PART_FLUID; - psys->part= part; - psys->pointcache= BKE_ptcache_add(&psys->ptcaches); + part->type = PART_FLUID; + psys->part = part; + psys->pointcache = BKE_ptcache_add(&psys->ptcaches); psys->flag |= PSYS_ENABLED; BLI_strncpy(psys->name, "FluidParticles", sizeof(psys->name)); BLI_addtail(&ob->particlesystem,psys); /* add modifier */ - psmd= (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem); + psmd = (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem); BLI_strncpy(psmd->modifier.name, "FluidParticleSystem", sizeof(psmd->modifier.name)); - psmd->psys= psys; + psmd->psys = psys; BLI_addtail(&ob->modifiers, psmd); modifier_unique_name(&ob->modifiers, (ModifierData *)psmd); } } else { - for(psys=ob->particlesystem.first; psys; psys=psys->next) { - if(psys->part->type == PART_FLUID) { + for (psys = ob->particlesystem.first; psys; psys = psys->next) { + if (psys->part->type == PART_FLUID) { /* clear modifier */ - psmd= psys_get_modifier(ob, psys); + psmd = psys_get_modifier(ob, psys); BLI_remlink(&ob->modifiers, psmd); modifier_free((ModifierData *)psmd); @@ -173,10 +173,10 @@ static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *v { #ifndef WITH_MOD_FLUID (void)ptr; - value[0]= '\0'; + value[0] = '\0'; #else - Object *ob= (Object*)ptr->id.data; - FluidsimSettings *fss= (FluidsimSettings*)ptr->data; + Object *ob = (Object*)ptr->id.data; + FluidsimSettings *fss = (FluidsimSettings*)ptr->data; fluid_estimate_memory(ob, fss, value); #endif @@ -194,7 +194,7 @@ static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *UNUSED(ptr static char *rna_FluidSettings_path(PointerRNA *ptr) { FluidsimSettings *fss = (FluidsimSettings*)ptr->data; - ModifierData *md= (ModifierData *)fss->fmd; + ModifierData *md = (ModifierData *)fss->fmd; return BLI_sprintfN("modifiers[\"%s\"].settings", md->name); } @@ -223,13 +223,13 @@ static void rna_def_fluidsim_slip(StructRNA *srna) {OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky, non moving objects only!)"}, {0, NULL, 0, NULL, NULL}}; - prop= RNA_def_property(srna, "slip_type", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "slip_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "typeFlags"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, slip_items); RNA_def_property_ui_text(prop, "Slip Type", ""); - prop= RNA_def_property(srna, "partial_slip_factor", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "partial_slip_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "partSlipValue"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Partial Slip Amount", "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip"); @@ -240,12 +240,12 @@ static void rna_def_fluid_mesh_vertices(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "FluidMeshVertex", NULL); + srna = RNA_def_struct(brna, "FluidMeshVertex", NULL); RNA_def_struct_sdna(srna, "FluidVertexVelocity"); RNA_def_struct_ui_text(srna, "Fluid Mesh Vertex", "Vertex of a simulated fluid mesh"); RNA_def_struct_ui_icon(srna, ICON_VERTEXSEL); - prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY); + prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY); RNA_def_property_array(prop, 3); RNA_def_property_float_sdna(prop, NULL, "vel"); RNA_def_property_ui_text(prop, "Velocity", ""); @@ -271,107 +271,107 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna) {4, "HONEY", 0, "Honey", "Viscosity of 2.0 * 10^-3"}, {0, NULL, 0, NULL, NULL}}; - srna= RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings"); + srna = RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "Fluid simulation settings for the domain of a fluid simulation"); /* standard settings */ - prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolutionxyz"); RNA_def_property_range(prop, 1, 1024); RNA_def_property_ui_text(prop, "Resolution", "Domain resolution in X,Y and Z direction"); - prop= RNA_def_property(srna, "preview_resolution", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "preview_resolution", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "previewresxyz"); RNA_def_property_range(prop, 1, 100); RNA_def_property_ui_text(prop, "Preview Resolution", "Preview resolution in X,Y and Z direction"); - prop= RNA_def_property(srna, "viewport_display_mode", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "viewport_display_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "guiDisplayMode"); RNA_def_property_enum_items(prop, quality_items); RNA_def_property_ui_text(prop, "Viewport Display Mode", "How to display the mesh in the viewport"); RNA_def_property_update(prop, 0, "rna_fluid_update"); - prop= RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "renderDisplayMode"); RNA_def_property_enum_items(prop, quality_items); RNA_def_property_ui_text(prop, "Render Display Mode", "How to display the mesh for rendering"); - prop= RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE); RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse fluid frames"); RNA_def_property_update(prop, 0, "rna_fluid_find_enframe"); - prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); + prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_maxlength(prop, FILE_MAX); RNA_def_property_string_sdna(prop, NULL, "surfdataPath"); RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store baked fluid simulation files in"); RNA_def_property_update(prop, 0, "rna_fluid_update"); - prop= RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE); + prop = RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_DomainFluidSettings_memory_estimate_get", "rna_DomainFluidSettings_memory_estimate_length", NULL); RNA_def_property_ui_text(prop, "Memory Estimate", "Estimated amount of memory needed for baking the domain"); /* advanced settings */ - prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); + prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); RNA_def_property_float_sdna(prop, NULL, "grav"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -1000.1, 1000.1); RNA_def_property_ui_text(prop, "Gravity", "Gravity in X, Y and Z direction"); - prop= RNA_def_property(srna, "use_time_override", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_time_override", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_OVERRIDE_TIME); RNA_def_property_ui_text(prop, "Override Time", "Use a custom start and end time (in seconds) instead of the scene's timeline"); - prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME); + prop = RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "animStart"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Start Time", "Simulation time of the first blender frame (in seconds)"); - prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME); + prop = RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "animEnd"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "End Time", "Simulation time of the last blender frame (in seconds)"); - prop= RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "frameOffset"); RNA_def_property_ui_text(prop, "Cache Offset", "Offset when reading baked cache"); RNA_def_property_update(prop, NC_OBJECT, "rna_fluid_update"); - prop= RNA_def_property(srna, "simulation_scale", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "simulation_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "realsize"); RNA_def_property_range(prop, 0.001, 10); RNA_def_property_ui_text(prop, "Real World Size", "Size of the simulation domain in metres"); - prop= RNA_def_property(srna, "simulation_rate", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "simulation_rate", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "animRate"); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_text(prop, "Simulation Speed", "Fluid motion rate (0 = stationary, 1 = normal speed)"); - prop= RNA_def_property(srna, "viscosity_preset", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "viscosity_preset", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "viscosityMode"); RNA_def_property_enum_items(prop, viscosity_items); RNA_def_property_ui_text(prop, "Viscosity Preset", "Set viscosity of the fluid to a preset value, or use manual input"); - prop= RNA_def_property(srna, "viscosity_base", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "viscosity_base", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "viscosityValue"); RNA_def_property_range(prop, 0, 10); RNA_def_property_ui_text(prop, "Viscosity Base", "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)"); - prop= RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "viscosityExponent"); RNA_def_property_range(prop, 0, 10); RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6)"); - prop= RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "maxRefine"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, -1, 4); RNA_def_property_ui_text(prop, "Grid Levels", "Number of coarsened grids to use (-1 for automatic)"); - prop= RNA_def_property(srna, "compressibility", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "compressibility", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "gstar"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.001, 0.1); @@ -381,45 +381,45 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna) rna_def_fluidsim_slip(srna); - prop= RNA_def_property(srna, "surface_smooth", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "surface_smooth", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0, 5.0); RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing (a value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing)"); - prop= RNA_def_property(srna, "surface_subdivisions", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "surface_subdivisions", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "surfaceSubdivs"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 5); RNA_def_property_ui_text(prop, "Surface Subdivisions", "Number of isosurface subdivisions (this is necessary for the inclusion of particles into the surface generation - WARNING: can lead to longer computation times !)"); - prop= RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "domainNovecgen", 0); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Generate Speed Vectors", "Generate speed vectors for vector blur"); /* no collision object surface */ - prop= RNA_def_property(srna, "surface_noobs", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "surface_noobs", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSSG_NOOBS); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Hide fluid surface", ""); /* particles */ - prop= RNA_def_property(srna, "tracer_particles", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "tracer_particles", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "generateTracers"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 10000); RNA_def_property_ui_text(prop, "Tracer Particles", "Number of tracer particles to generate"); - prop= RNA_def_property(srna, "generate_particles", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "generate_particles", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "generateParticles"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Generate Particles", "Amount of particles to generate (0=off, 1=normal, >1=more)"); /* simulated fluid mesh data */ - prop= RNA_def_property(srna, "fluid_mesh_vertices", PROP_COLLECTION, PROP_NONE); + prop = RNA_def_property(srna, "fluid_mesh_vertices", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "FluidMeshVertex"); RNA_def_property_ui_text(prop, "Fluid Mesh Vertices", "Vertices of the fluid mesh generated by simulation"); RNA_def_property_collection_funcs(prop, "rna_FluidMeshVertex_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_FluidMeshVertex_data_length", NULL, NULL, NULL); @@ -436,13 +436,13 @@ static void rna_def_fluidsim_volume(StructRNA *srna) {3, "BOTH", 0, "Both", "Use both the inner volume and the outer shell of the mesh"}, {0, NULL, 0, NULL, NULL}}; - prop= RNA_def_property(srna, "volume_initialization", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "volume_initialization", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "volumeInitType"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, volume_type_items); RNA_def_property_ui_text(prop, "Volume Initialization", "Volume initialization type"); - prop= RNA_def_property(srna, "use_animated_mesh", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_animated_mesh", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "domainNovecgen", 0); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one (slower, only use if really necessary [e.g. armatures or parented objects], animated pos/rot/scale F-Curves do not require it)"); @@ -452,7 +452,7 @@ static void rna_def_fluidsim_active(StructRNA *srna) { PropertyRNA *prop; - prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_ACTIVE); RNA_def_property_ui_text(prop, "Enabled", "Object contributes to the fluid simulation"); } @@ -462,14 +462,14 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings"); + srna = RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "Fluid simulation settings for the fluid in the simulation"); rna_def_fluidsim_active(srna); rna_def_fluidsim_volume(srna); - prop= RNA_def_property(srna, "initial_velocity", PROP_FLOAT, PROP_VELOCITY); + prop = RNA_def_property(srna, "initial_velocity", PROP_FLOAT, PROP_VELOCITY); RNA_def_property_float_sdna(prop, NULL, "iniVelx"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -1000.1, 1000.1); @@ -481,7 +481,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings"); + srna = RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "Fluid simulation settings for obstacles in the simulation"); @@ -489,7 +489,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna) rna_def_fluidsim_volume(srna); rna_def_fluidsim_slip(srna); - prop= RNA_def_property(srna, "impact_factor", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "impact_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, -2.0, 10.0); @@ -501,20 +501,20 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings"); + srna = RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "Fluid simulation settings for objects adding fluids in the simulation"); rna_def_fluidsim_active(srna); rna_def_fluidsim_volume(srna); - prop= RNA_def_property(srna, "inflow_velocity", PROP_FLOAT, PROP_VELOCITY); + prop = RNA_def_property(srna, "inflow_velocity", PROP_FLOAT, PROP_VELOCITY); RNA_def_property_float_sdna(prop, NULL, "iniVelx"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -1000.1, 1000.1); RNA_def_property_ui_text(prop, "Inflow Velocity", "Initial velocity of fluid"); - prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSINFLOW_LOCALCOORD); RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow (e.g. for rotating objects)"); @@ -524,7 +524,7 @@ static void rna_def_fluidsim_outflow(BlenderRNA *brna) { StructRNA *srna; - srna= RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings"); + srna = RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "Fluid simulation settings for objects removing fluids from the simulation"); @@ -537,33 +537,33 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "ParticleFluidSettings", "FluidSettings"); + srna = RNA_def_struct(brna, "ParticleFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "Fluid simulation settings for objects storing fluid particles generated by the simulation"); - prop= RNA_def_property(srna, "use_drops", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_drops", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_DROP); RNA_def_property_ui_text(prop, "Drops", "Show drop particles"); - prop= RNA_def_property(srna, "use_floats", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_floats", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_FLOAT); RNA_def_property_ui_text(prop, "Floats", "Show floating foam particles"); - prop= RNA_def_property(srna, "show_tracer", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "show_tracer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_TRACER); RNA_def_property_ui_text(prop, "Tracer", "Show tracer particles"); - prop= RNA_def_property(srna, "particle_influence", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "particle_influence", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "particleInfSize"); RNA_def_property_range(prop, 0.0, 2.0); RNA_def_property_ui_text(prop, "Particle Influence", "Amount of particle size scaling: 0=off (all same size), 1=full (range 0.2-2.0), >1=stronger"); - prop= RNA_def_property(srna, "alpha_influence", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "alpha_influence", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "particleInfAlpha"); RNA_def_property_range(prop, 0.0, 2.0); RNA_def_property_ui_text(prop, "Alpha Influence", "Amount of particle alpha change, inverse of size influence: 0=off (all same alpha), 1=full (large particles get lower alphas, smaller ones higher values)"); - prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); + prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_maxlength(prop, FILE_MAX); RNA_def_property_string_sdna(prop, NULL, "surfdataPath"); RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from"); @@ -575,49 +575,49 @@ static void rna_def_fluidsim_control(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings"); + srna = RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation"); rna_def_fluidsim_active(srna); - prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME); + prop = RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart"); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_text(prop, "Start Time", "Time when the control particles are activated"); - prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME); + prop = RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "cpsTimeEnd"); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_text(prop, "End Time", "Time when the control particles are deactivated"); - prop= RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "attractforceStrength"); RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_ui_text(prop, "Attraction Strength", "Force strength for directional attraction towards the control object"); - prop= RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "attractforceRadius"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Attraction Radius", "Force field radius around the control object"); - prop= RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "velocityforceStrength"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Velocity Strength", "Force strength of how much of the control object's velocity is influencing the fluid velocity"); - prop= RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "velocityforceRadius"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Velocity Radius", "Force field radius around the control object"); - prop= RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cpsQuality"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 5.0, 100.0); RNA_def_property_ui_text(prop, "Quality", "Quality which is used for object sampling (higher = better but slower)"); - prop= RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse control object movement"); @@ -641,21 +641,21 @@ void RNA_def_fluidsim(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; - srna= RNA_def_struct(brna, "FluidSettings", NULL); + srna = RNA_def_struct(brna, "FluidSettings", NULL); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_refine_func(srna, "rna_FluidSettings_refine"); RNA_def_struct_path_func(srna, "rna_FluidSettings_path"); RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "Fluid simulation settings for an object taking part in the simulation"); - prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_fluid_type_items); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Type", "Type of participation in the fluid simulation"); RNA_def_property_update(prop, 0, "rna_FluidSettings_update_type"); - //prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); - //RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by fluid simulation settings"); + /*prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); */ + /*RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by fluid simulation settings"); */ /* types */ |