简体   繁体   English

如何破解搅拌机帮助按钮?

[英]How do I hack the blender help button?

I do not have/will_not_have constant internet access, and I am a blender noob, so I did the sensible thing and downloaded the offline manual, however, the "help button" will still link to the internet.我没有/will_not_have 经常访问互联网,而且我是一个搅拌机菜鸟,所以我做了明智的事情并下载了离线手册,但是,“帮助按钮”仍将链接到互联网。 I'm very insaneley forgetful, also I like my development environments to be self-reliant.我非常健忘,我也喜欢我的开发环境是自力更生的。

Therefore: I am afraid I may forget I have the manual on my system and attempt to download it a second time, or that I will have to constantly open up file manager just to use it real quick.因此:我担心我可能会忘记我的系统上有手册并尝试第二次下载它,或者我必须不断打开文件管理器才能真正快速使用它。

All this could be fixed by changing the default URL to the file directory location I have the html doc of said manual within, but I'm also a newb to python and can't find the exact name of the folder nor file that contains the script for the little URL.所有这一切都可以通过将默认 URL 更改为文件目录位置来修复,我在其中有所述手册的 html 文档,但我也是 python 的新手,找不到文件夹的确切名称,也找不到包含文件的文件小 URL 的脚本。 I do have c++ programming experience as well as a basic comprehension of the command line.我确实有 C++ 编程经验以及对命令行的基本理解。 All this is driving me nuts;这一切都让我发疯; I'm willing to work for the result, but I'm in desperate need of some pointers at the very least, I am much obliged.我愿意为结果而努力,但至少我迫切需要一些指示,我非常感激。

Thank You to anyone who took the time to read this!!!感谢所有花时间阅读本文的人!!!

(I have an explanatory screenshot here: { https://drive.google.com/file/d/0B4stTAVYtcSVR3I0Z0R3bVR3RjQ/view?usp=drivesdk }(via google drive) (don't have enough rep to post image directly apparently)) [ this is a photo of the button I'm talking about ] (我在这里有一个解释性屏幕截图:{ https://drive.google.com/file/d/0B4stTAVYtcSVR3I0Z0R3bVR3RjQ/view?usp=drivesdk }(通过谷歌驱动器)(显然没有足够的代表直接发布图像)) [这是我正在谈论的按钮的照片]

OP's goal is to find where, in Blender's sources, is called some specific url, say some_url . OP 的目标是在 Blender 的源代码中找到称为某些特定 url 的位置,比如some_url

To find some_url in all the python files inside of the src directory, you can do the following in bash:要在src目录内的所有 python 文件中查找some_url ,可以在 bash 中执行以下操作:

$ find src -name "*py" | xargs grep some_url

虽然上面/早期的答案足够正确,可以帮助我找到解决方案,因此是很好的答案(因为没有它们我将无法做到):一个非常直接的答案是:“转到:”~ /blender/scripts/bl_ui ”文件位置。我要查找的特定 URL 在“space_info.py”文件中。在该文件中使用“ctrl F”搜索(假设您已在文本编辑器中打开它,并且您有 root 权限),找到恰好嵌套在描述“帮助”按钮如何操作的代码中的所述 URL 的版本(建议在下一步之前保存备份),然后将该 URL 替换为确切的指向您希望它带您访问的离线 html 文件的文件路径”这些是我遵循的步骤,所以很可能其他人会有相同或非常相似的问题:这是我的答案,我希望它简化你的追求

How to Force Blender to Load Local Blender Docs instead external Help Link of url =如何强制 Blender 加载本地 Blender 文档而不是 url 的外部帮助链接 =
"https://docs.blender.org/manual/en/dev/" “https://docs.blender.org/manual/en/dev/”

HOW I did it.我是怎么做到的。 I downloaded the "blender_manual.zip" file ( Blender 3.3 Version at the time I tried this Hack) from the URL "https://docs.blender.org/manual/en/dev/" which has a link on that page,which is https://docs.blender.org/manual/en/dev/blender_manual_html.zip (Don't use the EPUB download option ( https://docs.blender.org/manual/en/dev/blender_manual_epub.zip ). I un-Zipped the downloaded "blender_manual.zip" file into a new folder "BlenderDocs" I made in my root directory ( the drive on which Blender is installed) c:\BlenderDocs and removed the contents of the "html-en-dev-r4466" folder to which it had been unzipped and pasted the contents into the main "c:\BlenderDocs" folder. Then as adviced in the blog I launched Notepad++ and dragged the file "space_info.py" from the "C:\Program Files\Blender Foundation\Blender\2.79\scripts\startup\bl_ui" folder into Notepad++ and saved a back-up of it into the folder where you found this notepad text file. Using Notepad++ save "ALL Types" mode I saved it我从 URL“https://docs.blender.org/manual/en/dev/”下载了“blender_manual.zip”文件(我尝试这个 Hack 时的 Blender 3.3 版本),该页面上有一个链接,这是https://docs.blender.org/manual/en/dev/blender_manual_html.zip (不要使用 EPUB 下载选项( https://docs.blender.org/manual/en/dev/blender_manual_epub.zip ). 我将下载的“blender_manual.zip”文件解压缩到我在根目录(安装了 Blender 的驱动器)c:\BlenderDocs 中创建的新文件夹“BlenderDocs”中,并删除了“html-en”的内容-dev-r4466”文件夹,它已解压缩并将内容粘贴到主“c:\ BlenderDocs”文件夹中。然后按照博客中的建议,我启动了Notepad ++并从“C: \Program Files\Blender Foundation\Blender\2.79\scripts\startup\bl_ui" 文件夹到 Notepad++ 中,并将它的备份保存到您找到此记事本文本文件的文件夹中。使用 Notepad++ 保存“所有类型”模式我保存了它 as "space_info.py.UNCHANGED" for safe keeping to a known folder.作为“space_info.py.UNCHANGED”,以安全保存到已知文件夹。 Then I went into " C:\BlenderDocs" folder and double clicked on "index.html" to launch in my Firefox web browser.然后我进入“C:\BlenderDocs”文件夹并双击“index.html”在我的 Firefox 网络浏览器中启动。 I Highlighted the URL indicated in the Firefox URL slot at the top which said "file:///C:/Blender%20Docs/index.html".我突出显示顶部 Firefox URL 插槽中指示的 URL,其中显示“file:///C:/Blender%20Docs/index.html”。 copy pated into a new notepad.txt file and I changed the statement to file:///C:/BlenderDocs/index.html and replaced the statement "https://docs.blender.org/manual/en/dev/" on line 321 of Notepad++ with "file:///C:/BlenderDocs/index.html" instead.复制到一个新的 notepad.txt 文件中,我将语句更改为 file:///C:/BlenderDocs/index.html 并替换了语句“https://docs.blender.org/manual/en/dev/”在 Notepad++ 的第 321 行,使用“file:///C:/BlenderDocs/index.html”代替。

I changed the "space_info.py" file extension in the "C:\Program Files\Blender Foundation\Blender\2.79\scripts\startup\bl_ui" folder to "space_info.py.ORIGINAL.WORKING" as a safety precaution.作为安全预防措施,我将“C:\Program Files\Blender Foundation\Blender\2.79\scripts\startup\bl_ui”文件夹中的“space_info.py”文件扩展名更改为“space_info.py.ORIGINAL.WORKING”。

and from inside Notepad++ I saved the modified "space_info.py" first to my desktop for safe-keeping reference and then copy pasted the same file into the "C:\Program Files\Blender Foundation\Blender\2.79\scripts\startup\bl_ui" folder with ADMINISTRATION privilege to replace the original.从Notepad ++内部,我首先将修改后的“space_info.py”保存到我的桌面以供安全参考,然后将相同的文件复制粘贴到“C:\Program Files\Blender Foundation\Blender\2.79\scripts\startup\bl_ui " 具有管理员权限的文件夹以替换原始文件夹。

I launched Blender in the Usual way by double clicking on its Desktop Icon and tested the Help Menu first item.我通过双击桌面图标以通常的方式启动了 Blender,并测试了帮助菜单的第一项。 Perfectly the internal Help HTML pack from the BlenderDocs folder was presented to me in my Firefox browser. BlenderDocs 文件夹中的内部帮助 HTML 包完美地呈现在我的 Firefox 浏览器中。 All except the External links work.除外部链接外的所有链接都有效。 But that is understood as the blender_manual.zip file cannot contain all the vast help material from outside the Help Wiki!但这被理解为 blender_manual.zip 文件不能包含来自 Help Wiki 之外的所有大量帮助材料! Of course in a clinch you can now change the "space_info.py.ORIGINAL.WORKING" [after deleting "space_info.py" the modified version] back to "space_info.py" and re launch Blender.当然,您现在可以将“space_info.py.ORIGINAL.WORKING”[删除“space_info.py”修改后的版本]改回“space_info.py”并重新启动Blender。 It will link to the Web based help WIKI.它将链接到基于 Web 的帮助 WIKI。 You can modify the statement at LINE 321 of Notepad++ to any URL for that matter and get blender HELP to link to that new URL.您可以将 Notepad++ 的第 321 行的语句修改为任何 URL,并让 blender HELP 链接到该新 URL。 I believe This is a handy get local HELP HACK for all Blender Users.我相信这对于所有 Blender 用户来说都是一个方便的获取本地帮助的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM