|
| 1 | +# Blender FLIP Fluids Add-on |
| 2 | +# Copyright (C) 2020 Ryan L. Guy |
| 3 | +# |
| 4 | +# This program is free software: you can redistribute it and/or modify |
| 5 | +# it under the terms of the GNU General Public License as published by |
| 6 | +# the Free Software Foundation, either version 3 of the License, or |
| 7 | +# (at your option) any later version. |
| 8 | +# |
| 9 | +# This program is distributed in the hope that it will be useful, |
| 10 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +# GNU General Public License for more details. |
| 13 | +# |
| 14 | +# You should have received a copy of the GNU General Public License |
| 15 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + |
| 17 | +""" |
| 18 | +This addon __init__.py file is not the actual FLIP Fluids addon. The purpose of this |
| 19 | +file is to inform the user that what they have installed is not an installation file |
| 20 | +and is not the correct way to install the FLIP Fluids addon. |
| 21 | +""" |
| 22 | + |
| 23 | +bl_info = { |
| 24 | + "name" : "FLIP Fluids - This is not an installation file", |
| 25 | + "description": "The file you have installed is not an addon. Enable for more info.", |
| 26 | + "author" : "The FLIP Fluids Development Team", |
| 27 | + "version" : (0, 0, 0), |
| 28 | + "blender" : (2, 81, 0), |
| 29 | + "location" : "", |
| 30 | + "warning" : "", |
| 31 | + "wiki_url" : "https://github.com/rlguy/Blender-FLIP-Fluids", |
| 32 | + "tracker_url" : "", |
| 33 | + "category" : "" |
| 34 | +} |
| 35 | + |
| 36 | +import bpy |
| 37 | + |
| 38 | + |
| 39 | +class FLIPFluidInfoAddonPreferences(bpy.types.AddonPreferences): |
| 40 | + bl_idname = __name__.split(".")[0] |
| 41 | + |
| 42 | + def draw(self, context): |
| 43 | + column = self.layout.column(align=True) |
| 44 | + column.label(text="The file you have installed is not an addon.") |
| 45 | + column.label(text="This .zip file only contains the addon and simulation engine source code.") |
| 46 | + column.label(text="") |
| 47 | + column.label(text="The source code must be built and compiled for your system.") |
| 48 | + column.label(text="See the FLIP Fluids GitHub README for instructions.") |
| 49 | + column.operator( |
| 50 | + "wm.url_open", |
| 51 | + text="FLIP Fluids addon GitHub", |
| 52 | + ).url = "https://github.com/rlguy/Blender-FLIP-Fluids" |
| 53 | + column.separator() |
| 54 | + column.operator( |
| 55 | + "wm.url_open", |
| 56 | + text="Try our FLIP Fluids Free Trial", |
| 57 | + ).url = "https://github.com/rlguy/Blender-FLIP-Fluids/wiki/FLIP-Fluids-Demo-Addon" |
| 58 | + column.operator( |
| 59 | + "wm.url_open", |
| 60 | + text="Purchase the FLIP Fluids addon on the Blender Market", |
| 61 | + ).url = "https://blendermarket.com/products/flipfluids" |
| 62 | + |
| 63 | + |
| 64 | +def register(): |
| 65 | + bpy.utils.register_class(FLIPFluidInfoAddonPreferences) |
| 66 | + |
| 67 | + |
| 68 | +def unregister(): |
| 69 | + bpy.utils.unregister_class(FLIPFluidInfoAddonPreferences) |
| 70 | + |
0 commit comments