Hi , I am new to python and programing in blender and I am not a native speaker so sometime I may tell something does not make sense or cracky gramma … he hee
I start making some blender + python project which making some about advance particle motion and I want it to easy to use with nice interface using…
I having a problem about how to make some of an gui object to always set in the center of the script area…
here is my original code
import Blender from Blender import Image, Draw, Window from Blender.BGL import * def gui(): ##GetInterface Draw.Image(myimage1, posx1, posy1) def event(evt, val): if evt == Draw.ESCKEY: Draw.Exit() areasize = Blender.Window.GetAreaSize() areawidth = areasize areaheight = areasize myimage1 = Image.Load("plugins\opible\mres\interfce\logo.png") posx1 = areawidth/2 posy1 = areaheight/2 Draw.Register(gui, event, None)
The resault is the image set in the center when the script is executed
but when I change it’s area size… it moves after left-bottom of area
The question is :
- How to make some of an gui object to always set in the center of the scripts area whenever I resize it?
- Techniq ? If I load more than 1 image and make it drawed.
- Can I set the size of script area with python code?
Thanks very much for suggestion…