UI/ImageContainer.py
Main Page
Groups
Classes
Examples
UI/ImageContainer.py
1
# Copyright 2009 Autodesk, Inc. All rights reserved.
2
# Use of this software is subject to the terms of the Autodesk license agreement
3
# provided at the time of installation or download, or which otherwise accompanies
4
# this software in either electronic or hard copy form.
5
#
6
# Script description:
7
# Create a tool that show how to specify an Image in a container
8
#
9
# Topic: FBImageContainer
10
#
11
12
from
pyfbsdk
import
*
13
from
pyfbsdk_additions
import
*
14
15
16
def
PopulateLayout(mainLyt):
17
x =
FBAddRegionParam
(0,FBAttachType.kFBAttachLeft,
""
)
18
y =
FBAddRegionParam
(0,FBAttachType.kFBAttachTop,
""
)
19
w =
FBAddRegionParam
(50,FBAttachType.kFBAttachNone,
""
)
20
h =
FBAddRegionParam
(50,FBAttachType.kFBAttachNone,
""
)
21
mainLyt.AddRegion(
"main"
,
"main"
, x, y, w, h)
22
23
img =
FBImageContainer
()
24
img.Filename =
"tape/tape_play_off.png"
25
mainLyt.SetControl(
"main"
,img)
26
27
def
CreateTool():
28
# Tool creation will serve as the hub for all other controls
29
t =
FBCreateUniqueTool
(
"Image Container Example"
)
30
31
PopulateLayout(t)
32
33
t.StartSizeX = 400
34
t.StartSizeY = 400
35
36
ShowTool
(t)
37
38
CreateTool()