diff options
author | Thomas Dinges <blender@dingto.org> | 2013-03-23 10:55:59 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-03-23 10:55:59 +0400 |
commit | dd713654d5bb5e6d66593368922b8178f53fad2e (patch) | |
tree | d75f5ca44850ea38d8db5228e1f521fe3283e88a | |
parent | 2006103a520bbc4fe48169e1125d93b6c052a362 (diff) |
Code cleanup:
* Use bpy.app.build_options for UI checks rather than custom ones.
4 files changed, 4 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index b38e2a7e98c..71178e6afac 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -509,7 +509,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row.label() def OCEAN(self, layout, ob, md): - if not md.is_build_enabled: + if not bpy.app.build_options.mod_oceansim: layout.label("Built without OceanSim modifier") return diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 696e895fa67..b3cd5dc5464 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -51,7 +51,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): fluid = md.settings col = layout.column() - if fluid is None: + if not bpy.app.build_options.mod_fluid: col.label("Built without fluids") return diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index 51c975c3e70..d782bb1b3b9 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -157,7 +157,7 @@ class INFO_MT_file_import(Menu): bl_label = "Import" def draw(self, context): - if hasattr(bpy.types, "WM_OT_collada_import"): + if bpy.app.build_options.collada: self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)") @@ -166,7 +166,7 @@ class INFO_MT_file_export(Menu): bl_label = "Export" def draw(self, context): - if hasattr(bpy.types, "WM_OT_collada_export"): + if bpy.app.build_options.collada: self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)") diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index fa436e30200..185968ded79 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -670,15 +670,6 @@ static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value) md->projectors[a] = NULL; } -static int rna_OceanModifier_is_build_enabled_get(PointerRNA *UNUSED(ptr)) -{ -#ifdef WITH_OCEANSIM - return 1; -#else /* WITH_OCEANSIM */ - return 0; -#endif /* WITH_OCEANSIM */ -} - static void rna_OceanModifier_init_update(Main *bmain, Scene *scene, PointerRNA *ptr) { OceanModifierData *omd = (OceanModifierData *)ptr->data; @@ -3287,12 +3278,6 @@ static void rna_def_modifier_ocean(BlenderRNA *brna) RNA_def_struct_sdna(srna, "OceanModifierData"); RNA_def_struct_ui_icon(srna, ICON_MOD_OCEAN); - /* 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"); - prop = RNA_def_property(srna, "geometry_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "geometry_mode"); RNA_def_property_enum_items(prop, geometry_items); |