make ocean rna more consistent with existing rna names

This commit is contained in:
Campbell Barton 2011-11-14 07:18:32 +00:00
parent 972debc7eb
commit c8f374f486
2 changed files with 21 additions and 21 deletions

@ -415,7 +415,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.label()
def OCEAN(self, layout, ob, md):
if not md.build_enabled:
if not md.is_build_enabled:
layout.label("Built without OceanSim modifier")
return
@ -441,7 +441,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.prop(md, "choppiness")
col.prop(md, "wave_scale", text="Scale")
col.prop(md, "smallest_wave")
col.prop(md, "wave_scale_min")
col.prop(md, "wind_velocity")
col = split.column()
@ -449,16 +449,16 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
sub = col.column()
sub.active = md.wave_alignment > 0
sub.prop(md, "wave_direction", text="Direction")
sub.prop(md, "damp")
sub.prop(md, "damping")
layout.separator()
layout.prop(md, "generate_normals")
layout.prop(md, "use_normals")
row = layout.row()
row.prop(md, "generate_foam")
row.prop(md, "use_foam")
sub = row.row()
sub.active = md.generate_foam
sub.active = md.use_foam
sub.prop(md, "foam_coverage", text="Coverage")
layout.separator()
@ -472,8 +472,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split.enabled = not md.is_cached
col = split.column(align=True)
col.prop(md, "bake_start", text="Start")
col.prop(md, "bake_end", text="End")
col.prop(md, "frame_start", text="Start")
col.prop(md, "frame_end", text="End")
col = split.column(align=True)
col.label(text="Cache path:")

@ -652,13 +652,13 @@ static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value)
md->projectors[a]= NULL;
}
static int rna_OceanModifier_build_enabled_get(PointerRNA *UNUSED(ptr))
static int rna_OceanModifier_is_build_enabled_get(PointerRNA *UNUSED(ptr))
{
#ifdef WITH_OCEANSIM
#ifdef WITH_OCEANSIM
return 1;
#else // WITH_OCEANSIM
#else // WITH_OCEANSIM
return 0;
#endif // WITH_OCEANSIM
#endif // WITH_OCEANSIM
}
static void rna_OceanModifier_init_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@ -2879,9 +2879,9 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "OceanModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_FLUIDSIM);
/* General check if OceanSim modifier code is enabled */
prop= RNA_def_property(srna, "build_enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_OceanModifier_build_enabled_get", NULL);
/* General check if blender was built with OceanSim modifier support */
prop= RNA_def_property(srna, "is_build_enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_OceanModifier_is_build_enabled_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Build Enabled", "True if the OceanSim modifier is enabled in this build");
@ -2913,13 +2913,13 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Repeat Y", "Repetitions of the generated surface in Y");
RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
prop= RNA_def_property(srna, "generate_normals", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "use_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_NORMALS);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Generate Normals", "Outputs normals for bump mapping - disabling can speed up performance if its not needed");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
prop= RNA_def_property(srna, "generate_foam", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "use_foam", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_FOAM);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Generate Foam", "Generates foam mask as a vertex color channel");
@ -2945,13 +2945,13 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Wind Velocity", "Wind speed (m/s)");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
prop= RNA_def_property(srna, "damp", PROP_FLOAT, PROP_FACTOR);
prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "damp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Damping", "Damp reflected waves going in opposite direction to the wind");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
prop= RNA_def_property(srna, "smallest_wave", PROP_FLOAT, PROP_DISTANCE);
prop= RNA_def_property(srna, "wave_scale_min", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "smallest_wave");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0, FLT_MAX);
@ -3012,13 +3012,13 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Random Seed", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
prop= RNA_def_property(srna, "bake_start", PROP_INT, PROP_UNSIGNED);
prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "bakestart");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Bake Start", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
prop= RNA_def_property(srna, "bake_end", PROP_INT, PROP_UNSIGNED);
prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "bakeend");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Bake End", "");