3
$\begingroup$

I've downloaded the Manual pages to my Hard Drive and would like to access them via the Help>Manual menu. Is there a way to do this either through Prefs or the source code?

Thanks.

$\endgroup$
  • 1
    $\begingroup$ This is certainly possible be modifying the source code, unfortunately this isn't configurable through the user preferences. The operator WM_OT_url_open_preset is implemented in wm.py. $\endgroup$ – Robert Gützkow Jan 4 at 23:13
  • $\begingroup$ Writing an add-on is of course another possibility. $\endgroup$ – Robert Gützkow Jan 5 at 0:25
2
$\begingroup$

Two ways I can see to achieve this.

1 Manually edit the UI script

Either manually edit the space_topbar.py topbar UI file traditionally found at Blender_2.82\2.82\scripts\startup\bl_ui\space_topbar.py and type in an entry there to link to your local file.

You can optionally remove the online manual entry from there and replace it with an instance of wm.url_open operator pointing to your local file. Just copy one of the existing templates and modify it to your own use.

This is a quick and dirty solution, allows removing the existing entry, but is less maintainable, since it will likely not survive a software update nor is it easy to port to other installations.

2 Create a script or addon

Create a script that registers a new menu entry with a link to your own file. Easiest is probably to use wm.url_open operator pointing to your local file.

enter image description here

import bpy

def menu_func(self, context):
    self.layout.operator(
            "wm.url_open", text="Local Maual", icon='HELP',
        ).url = "Z:/Applications/Blender/Documentation/Blender_Manual.pdf"


def register():
    bpy.types.TOPBAR_MT_help.append(menu_func)


def unregister():
    bpy.types.TOPBAR_MT_help.remove(menu_func)


if __name__ == "__main__":
    register()

As far as I know this won't allow removing the existing entry, but you can have the addon under, several instances, and can easily be reinstalled after software updates.

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.