程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

(16) Blender source code analysis: loading the menu of the flash window from Python

編輯:Python

In front, we can see the picture of the flash screen , The menu display in the lower half of the flash screen has been analyzed , It displays menu resources from python Code , In this way , You can not modify C Code , You can modify the composition of the menu . To achieve this function , It's a complicated process , If you want to integrate this function into your software , Just look at this article , You can refer to blender How to achieve it . Of course , This article is just a lead , The general research direction is introduced , If you need to study deeply , I have to study it myself blender Source code , To steal some blender Code into your own project , Such a development method must be much faster , At least it's a big victory faster than studying without direction , After all, open source “ teacher ” Is a powerful foreign aid .

This article continues from the previous article python Script wm.py, It defines the display contents and operation actions of the menu . The previous analysis shows how to display this menu , Now let's analyze how it is loaded into memory , In order to show . From the previous analysis, we can see that , It saves a menu resource HASH table , Then find out from the inside , The code is as follows :

The code uses menutypes_hash To represent saving HASH Variable , Use WM_menutype_find Function to find the corresponding menu resource . Now we will ask how to make the menu


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved