prevent add-on being enabled in lower Blender version than 2.8how to install cutout animation toolsHow do you download Blender 2.79How to keep projects of previous blender versions when installing new versions?Removal of Program to reinstall not gone entirelyWhere can I find the custom bone in version 2.8?Activating an imported module - Python version mismatch
Why do electrons tend to be in energy eigenstates?
What would it take to slow down fermentation? (Specific: Wine / grape juice)
How does an aircraft descend without its nose pointing down?
Continents with simplex noise
Why is my Windows 7 recovery folder 53% of my disk
How did the T-850 still function after it removed its second battery?
Was this “caterpillar” strategy a good way to advance my pawns?
Allow all users to create files in a directory, but only the owner can delete
C function to check the validity of a date in DD.MM.YYYY format
Can someone help explain what this FFT workflow is doing to my signal, and why it works?
Impeachment jury tampering
Using parent's property and will as evidence of assets
Finding big cacti between Phoenix, Las Vegas, and Los Angeles
Can only rich people become president?
How do I build a kernel using patches from LKML?
Electric field due to a hydrogen atom
Multiple devices with one IPv6 to the Internet?
18-month-old kicked out of church nursery
Why is the Falcon Heavy center core recovery done at sea?
indent and noindent: details from Knuth's The TeXbook
Joining matrices together
Can a stolen Android phone with USB debugging enabled have screen lock bypassed?
Does no-one standing against the speaker of the house in UK lead to the local electorate being disenfranchised?
What does a single quote inside a C# date time format mean?
prevent add-on being enabled in lower Blender version than 2.8
how to install cutout animation toolsHow do you download Blender 2.79How to keep projects of previous blender versions when installing new versions?Removal of Program to reinstall not gone entirelyWhere can I find the custom bone in version 2.8?Activating an imported module - Python version mismatch
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
$begingroup$
is there a canonical solution to this?
I'm one of the developers of Sverchok and we are more frequently getting installation issues where people install the 2.79 version of Sverchok on Blender 2.8+. We maintain two different Sverchok codebases for Blender 2.79 and 2.8+, and they are massively, massively, different.
Is there anything simple we can stick in the __init__.py
that will prevent the user from enabling the 2.79 version of the add-on in blender version 2.8.0
or above.
scripting add-on versions
$endgroup$
add a comment
|
$begingroup$
is there a canonical solution to this?
I'm one of the developers of Sverchok and we are more frequently getting installation issues where people install the 2.79 version of Sverchok on Blender 2.8+. We maintain two different Sverchok codebases for Blender 2.79 and 2.8+, and they are massively, massively, different.
Is there anything simple we can stick in the __init__.py
that will prevent the user from enabling the 2.79 version of the add-on in blender version 2.8.0
or above.
scripting add-on versions
$endgroup$
add a comment
|
$begingroup$
is there a canonical solution to this?
I'm one of the developers of Sverchok and we are more frequently getting installation issues where people install the 2.79 version of Sverchok on Blender 2.8+. We maintain two different Sverchok codebases for Blender 2.79 and 2.8+, and they are massively, massively, different.
Is there anything simple we can stick in the __init__.py
that will prevent the user from enabling the 2.79 version of the add-on in blender version 2.8.0
or above.
scripting add-on versions
$endgroup$
is there a canonical solution to this?
I'm one of the developers of Sverchok and we are more frequently getting installation issues where people install the 2.79 version of Sverchok on Blender 2.8+. We maintain two different Sverchok codebases for Blender 2.79 and 2.8+, and they are massively, massively, different.
Is there anything simple we can stick in the __init__.py
that will prevent the user from enabling the 2.79 version of the add-on in blender version 2.8.0
or above.
scripting add-on versions
scripting add-on versions
edited Oct 14 at 12:01
zeffii
asked Oct 14 at 11:47
zeffiizeffii
31.9k5 gold badges69 silver badges142 bronze badges
31.9k5 gold badges69 silver badges142 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
$begingroup$
Blender 2.80 already protects against enabling incompatible add-ons. If the Blender version in the bl_info
is too low, it will display a warning in the preferences. Blender will not run the register()
function on these add-ons. However it does allow to tick the checkbox and the user may get the impression that it's properly enabled.
If you want to avoid that, you can check the Blender version and raise an exception in your __init__.py
. This will prevent the checkbox from being enabled and the user gets an error message right away. I'm not sure if it will have the intended effect, since some users may not read or understand the error message.
bl_info =
"name": "Version Check Add-on",
"author": "Robert Guetzkow",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Sidebar > My own addon",
"description": "Checks if the correct version of Blender is used",
"warning": "",
"wiki_url": "",
"category": "3D View"
import bpy
if bpy.app.version > (2, 79, 0):
raise Exception("This add-on is incompatible with Blender versions newer than 2.79.n"
"For Blender 2.8 please download the version from the following link:n"
"[insert link here]")
class EXAMPLE_PT_panel(bpy.types.Panel):
bl_label = "My own addon"
bl_category = "Name of your tab"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
def draw(self, context):
layout = self.layout
layout.label("Congratulations, your Blender version is supported.")
classes = (EXAMPLE_PT_panel,)
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()
$endgroup$
$begingroup$
yep. lovely stuff - thank you.
$endgroup$
– zeffii
Oct 14 at 13:26
$begingroup$
@zeffii you're welcome. Although I'm not (yet) familiar with the add-on activation code in Blender, it may be an easy patch to disable the checkbox when the add-on is recognized to be incompatible.
$endgroup$
– rjg
Oct 14 at 13:30
$begingroup$
we do a lot of stuff in__init__.py
beforeregister
, raising an Exception is fine with me.
$endgroup$
– zeffii
Oct 14 at 13:31
$begingroup$
@zeffii ok. It would still make sense to discuss this with the devs though. I can't think of any reason why it should be possible to enable the checkbox when the add-on is incompatible, other than the code change would be unnecessarily complicated for this small change.
$endgroup$
– rjg
Oct 14 at 13:35
$begingroup$
@zeffii You could also open the URL to the correct add-on version on Github using thewebbrowser
module. This may be not well received though, since it's very invasive behavior for an add-on.
$endgroup$
– rjg
Oct 14 at 13:41
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "502"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f155430%2fprevent-add-on-being-enabled-in-lower-blender-version-than-2-8%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Blender 2.80 already protects against enabling incompatible add-ons. If the Blender version in the bl_info
is too low, it will display a warning in the preferences. Blender will not run the register()
function on these add-ons. However it does allow to tick the checkbox and the user may get the impression that it's properly enabled.
If you want to avoid that, you can check the Blender version and raise an exception in your __init__.py
. This will prevent the checkbox from being enabled and the user gets an error message right away. I'm not sure if it will have the intended effect, since some users may not read or understand the error message.
bl_info =
"name": "Version Check Add-on",
"author": "Robert Guetzkow",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Sidebar > My own addon",
"description": "Checks if the correct version of Blender is used",
"warning": "",
"wiki_url": "",
"category": "3D View"
import bpy
if bpy.app.version > (2, 79, 0):
raise Exception("This add-on is incompatible with Blender versions newer than 2.79.n"
"For Blender 2.8 please download the version from the following link:n"
"[insert link here]")
class EXAMPLE_PT_panel(bpy.types.Panel):
bl_label = "My own addon"
bl_category = "Name of your tab"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
def draw(self, context):
layout = self.layout
layout.label("Congratulations, your Blender version is supported.")
classes = (EXAMPLE_PT_panel,)
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()
$endgroup$
$begingroup$
yep. lovely stuff - thank you.
$endgroup$
– zeffii
Oct 14 at 13:26
$begingroup$
@zeffii you're welcome. Although I'm not (yet) familiar with the add-on activation code in Blender, it may be an easy patch to disable the checkbox when the add-on is recognized to be incompatible.
$endgroup$
– rjg
Oct 14 at 13:30
$begingroup$
we do a lot of stuff in__init__.py
beforeregister
, raising an Exception is fine with me.
$endgroup$
– zeffii
Oct 14 at 13:31
$begingroup$
@zeffii ok. It would still make sense to discuss this with the devs though. I can't think of any reason why it should be possible to enable the checkbox when the add-on is incompatible, other than the code change would be unnecessarily complicated for this small change.
$endgroup$
– rjg
Oct 14 at 13:35
$begingroup$
@zeffii You could also open the URL to the correct add-on version on Github using thewebbrowser
module. This may be not well received though, since it's very invasive behavior for an add-on.
$endgroup$
– rjg
Oct 14 at 13:41
add a comment
|
$begingroup$
Blender 2.80 already protects against enabling incompatible add-ons. If the Blender version in the bl_info
is too low, it will display a warning in the preferences. Blender will not run the register()
function on these add-ons. However it does allow to tick the checkbox and the user may get the impression that it's properly enabled.
If you want to avoid that, you can check the Blender version and raise an exception in your __init__.py
. This will prevent the checkbox from being enabled and the user gets an error message right away. I'm not sure if it will have the intended effect, since some users may not read or understand the error message.
bl_info =
"name": "Version Check Add-on",
"author": "Robert Guetzkow",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Sidebar > My own addon",
"description": "Checks if the correct version of Blender is used",
"warning": "",
"wiki_url": "",
"category": "3D View"
import bpy
if bpy.app.version > (2, 79, 0):
raise Exception("This add-on is incompatible with Blender versions newer than 2.79.n"
"For Blender 2.8 please download the version from the following link:n"
"[insert link here]")
class EXAMPLE_PT_panel(bpy.types.Panel):
bl_label = "My own addon"
bl_category = "Name of your tab"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
def draw(self, context):
layout = self.layout
layout.label("Congratulations, your Blender version is supported.")
classes = (EXAMPLE_PT_panel,)
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()
$endgroup$
$begingroup$
yep. lovely stuff - thank you.
$endgroup$
– zeffii
Oct 14 at 13:26
$begingroup$
@zeffii you're welcome. Although I'm not (yet) familiar with the add-on activation code in Blender, it may be an easy patch to disable the checkbox when the add-on is recognized to be incompatible.
$endgroup$
– rjg
Oct 14 at 13:30
$begingroup$
we do a lot of stuff in__init__.py
beforeregister
, raising an Exception is fine with me.
$endgroup$
– zeffii
Oct 14 at 13:31
$begingroup$
@zeffii ok. It would still make sense to discuss this with the devs though. I can't think of any reason why it should be possible to enable the checkbox when the add-on is incompatible, other than the code change would be unnecessarily complicated for this small change.
$endgroup$
– rjg
Oct 14 at 13:35
$begingroup$
@zeffii You could also open the URL to the correct add-on version on Github using thewebbrowser
module. This may be not well received though, since it's very invasive behavior for an add-on.
$endgroup$
– rjg
Oct 14 at 13:41
add a comment
|
$begingroup$
Blender 2.80 already protects against enabling incompatible add-ons. If the Blender version in the bl_info
is too low, it will display a warning in the preferences. Blender will not run the register()
function on these add-ons. However it does allow to tick the checkbox and the user may get the impression that it's properly enabled.
If you want to avoid that, you can check the Blender version and raise an exception in your __init__.py
. This will prevent the checkbox from being enabled and the user gets an error message right away. I'm not sure if it will have the intended effect, since some users may not read or understand the error message.
bl_info =
"name": "Version Check Add-on",
"author": "Robert Guetzkow",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Sidebar > My own addon",
"description": "Checks if the correct version of Blender is used",
"warning": "",
"wiki_url": "",
"category": "3D View"
import bpy
if bpy.app.version > (2, 79, 0):
raise Exception("This add-on is incompatible with Blender versions newer than 2.79.n"
"For Blender 2.8 please download the version from the following link:n"
"[insert link here]")
class EXAMPLE_PT_panel(bpy.types.Panel):
bl_label = "My own addon"
bl_category = "Name of your tab"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
def draw(self, context):
layout = self.layout
layout.label("Congratulations, your Blender version is supported.")
classes = (EXAMPLE_PT_panel,)
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()
$endgroup$
Blender 2.80 already protects against enabling incompatible add-ons. If the Blender version in the bl_info
is too low, it will display a warning in the preferences. Blender will not run the register()
function on these add-ons. However it does allow to tick the checkbox and the user may get the impression that it's properly enabled.
If you want to avoid that, you can check the Blender version and raise an exception in your __init__.py
. This will prevent the checkbox from being enabled and the user gets an error message right away. I'm not sure if it will have the intended effect, since some users may not read or understand the error message.
bl_info =
"name": "Version Check Add-on",
"author": "Robert Guetzkow",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Sidebar > My own addon",
"description": "Checks if the correct version of Blender is used",
"warning": "",
"wiki_url": "",
"category": "3D View"
import bpy
if bpy.app.version > (2, 79, 0):
raise Exception("This add-on is incompatible with Blender versions newer than 2.79.n"
"For Blender 2.8 please download the version from the following link:n"
"[insert link here]")
class EXAMPLE_PT_panel(bpy.types.Panel):
bl_label = "My own addon"
bl_category = "Name of your tab"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
def draw(self, context):
layout = self.layout
layout.label("Congratulations, your Blender version is supported.")
classes = (EXAMPLE_PT_panel,)
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()
edited Oct 14 at 13:44
answered Oct 14 at 13:22
rjgrjg
6,6882 gold badges4 silver badges22 bronze badges
6,6882 gold badges4 silver badges22 bronze badges
$begingroup$
yep. lovely stuff - thank you.
$endgroup$
– zeffii
Oct 14 at 13:26
$begingroup$
@zeffii you're welcome. Although I'm not (yet) familiar with the add-on activation code in Blender, it may be an easy patch to disable the checkbox when the add-on is recognized to be incompatible.
$endgroup$
– rjg
Oct 14 at 13:30
$begingroup$
we do a lot of stuff in__init__.py
beforeregister
, raising an Exception is fine with me.
$endgroup$
– zeffii
Oct 14 at 13:31
$begingroup$
@zeffii ok. It would still make sense to discuss this with the devs though. I can't think of any reason why it should be possible to enable the checkbox when the add-on is incompatible, other than the code change would be unnecessarily complicated for this small change.
$endgroup$
– rjg
Oct 14 at 13:35
$begingroup$
@zeffii You could also open the URL to the correct add-on version on Github using thewebbrowser
module. This may be not well received though, since it's very invasive behavior for an add-on.
$endgroup$
– rjg
Oct 14 at 13:41
add a comment
|
$begingroup$
yep. lovely stuff - thank you.
$endgroup$
– zeffii
Oct 14 at 13:26
$begingroup$
@zeffii you're welcome. Although I'm not (yet) familiar with the add-on activation code in Blender, it may be an easy patch to disable the checkbox when the add-on is recognized to be incompatible.
$endgroup$
– rjg
Oct 14 at 13:30
$begingroup$
we do a lot of stuff in__init__.py
beforeregister
, raising an Exception is fine with me.
$endgroup$
– zeffii
Oct 14 at 13:31
$begingroup$
@zeffii ok. It would still make sense to discuss this with the devs though. I can't think of any reason why it should be possible to enable the checkbox when the add-on is incompatible, other than the code change would be unnecessarily complicated for this small change.
$endgroup$
– rjg
Oct 14 at 13:35
$begingroup$
@zeffii You could also open the URL to the correct add-on version on Github using thewebbrowser
module. This may be not well received though, since it's very invasive behavior for an add-on.
$endgroup$
– rjg
Oct 14 at 13:41
$begingroup$
yep. lovely stuff - thank you.
$endgroup$
– zeffii
Oct 14 at 13:26
$begingroup$
yep. lovely stuff - thank you.
$endgroup$
– zeffii
Oct 14 at 13:26
$begingroup$
@zeffii you're welcome. Although I'm not (yet) familiar with the add-on activation code in Blender, it may be an easy patch to disable the checkbox when the add-on is recognized to be incompatible.
$endgroup$
– rjg
Oct 14 at 13:30
$begingroup$
@zeffii you're welcome. Although I'm not (yet) familiar with the add-on activation code in Blender, it may be an easy patch to disable the checkbox when the add-on is recognized to be incompatible.
$endgroup$
– rjg
Oct 14 at 13:30
$begingroup$
we do a lot of stuff in
__init__.py
before register
, raising an Exception is fine with me.$endgroup$
– zeffii
Oct 14 at 13:31
$begingroup$
we do a lot of stuff in
__init__.py
before register
, raising an Exception is fine with me.$endgroup$
– zeffii
Oct 14 at 13:31
$begingroup$
@zeffii ok. It would still make sense to discuss this with the devs though. I can't think of any reason why it should be possible to enable the checkbox when the add-on is incompatible, other than the code change would be unnecessarily complicated for this small change.
$endgroup$
– rjg
Oct 14 at 13:35
$begingroup$
@zeffii ok. It would still make sense to discuss this with the devs though. I can't think of any reason why it should be possible to enable the checkbox when the add-on is incompatible, other than the code change would be unnecessarily complicated for this small change.
$endgroup$
– rjg
Oct 14 at 13:35
$begingroup$
@zeffii You could also open the URL to the correct add-on version on Github using the
webbrowser
module. This may be not well received though, since it's very invasive behavior for an add-on.$endgroup$
– rjg
Oct 14 at 13:41
$begingroup$
@zeffii You could also open the URL to the correct add-on version on Github using the
webbrowser
module. This may be not well received though, since it's very invasive behavior for an add-on.$endgroup$
– rjg
Oct 14 at 13:41
add a comment
|
Thanks for contributing an answer to Blender Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f155430%2fprevent-add-on-being-enabled-in-lower-blender-version-than-2-8%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown