Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Open Reality / Borderless FBImageContainer?
  RSS 2.0 ATOM  

Borderless FBImageContainer?
Rate this thread
 
44621
 
Permlink of this thread   Subscribe to this thread
avatar
  • Jakobud
  • Posted: 23 June 2010 07:51 AM
  • Total Posts: 11
  • Joined: 18 January 2007 02:11 PM

Is it possible to change/remove the border on FBImageContainer’s ? I can’t seem to get SetBorder to affect it in MB2009. Has anyone been able to do this?



Replies: 0
avatar

You need to create a region to put the FBImageContainer in, then you put the border on the region, if you play with the width and height of the region this will control the width and height of the border:

w2 = FBAddRegionParam(30,FBAttachType.kFBAttachNone,"")
h2 = FBAddRegionParam(30,FBAttachType.kFBAttachNone,"")

This might seem like a workaround but really everything goes in regions, I don’t think you can actual add borders around things like a button or text, you put it around the region and the item sits in the region…

from pyfbsdk import *
from pyfbsdk_additions import *

def PopulateLayout(mainLyt):
#1.  Creating the instruction title
l = FBLabel()
l.Caption = “Select the shot track definition file to use:”
l.Style = FBTextStyle.kFBTextStyleBold
l.WordWrap = True

x = FBAddRegionParam(5,FBAttachType.kFBAttachLeft,"") # Create a label that is left justify
y = FBAddRegionParam(5,FBAttachType.kFBAttachTop,"") # ... and at the top of the layout.
w = FBAddRegionParam(300,FBAttachType.kFBAttachNone,"") # its width is fixed at 300 pixels
h = FBAddRegionParam(20,FBAttachType.kFBAttachNone,"") # and its height is fixed at 15 pixels

mainLyt.AddRegion("lab”,"lab", x, y, w, h)
mainLyt.SetControl("lab",l)

#2.  Creating a temp button for a place holder
Con = FBImageContainer()
Con.Filename = “devices_body.tif”

x2 = FBAddRegionParam(5,FBAttachType.kFBAttachLeft,"")
y2 = FBAddRegionParam(5,FBAttachType.kFBAttachBottom,"lab")
w2 = FBAddRegionParam(30,FBAttachType.kFBAttachNone,"")
h2 = FBAddRegionParam(30,FBAttachType.kFBAttachNone,"")

mainLyt.AddRegion("con”,"con", x2, y2, w2, h2)
mainLyt.SetBorder("con",FBBorderStyle.kFBHighlightBorder,False, False,2,2,90,0)
mainLyt.SetControl("con",Con)

def CreateTool():
# Tool creation will serve as the hub for all other controls
global t
t = CreateUniqueTool("Region Shot Track Setup Tool")
t.StartSizeX = 300
t.StartSizeY = 143

PopulateLayout(t)
ShowTool(t)



KRISTINE MIDDLEMISS | DEVELOPER CONSULTANT
AUTODESK Media & Entertainment

Replies: 0




   
  Settings Choose Theme color: