Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Setting Global Light / Ambient Color
  RSS 2.0 ATOM  

Setting Global Light / Ambient Color
Rate this thread
 
38890
 
Permlink of this thread  
avatar
  • Mekelan
  • Posted: 19 January 2010 09:36 PM
  • Location: Billund, Denmark
  • Total Posts: 11
  • Joined: 29 May 2008 11:25 AM

Hi, new to Motionbuilder in general and Python in particular. I have scripted a fair bit in Max, and various other languages though.

Anyway, I was looking for help on a specific topic:

I want a script to set the Ambient Color of a scene’s Global Light to 0,0,0 (default is 0.4,0.4,0.4) - we have a script that is run just after importing some MoCap data, and while it’s a small thing, might as well automate as much as possible, right?

So, lacking a reference or “listener” like there is in Max (unless I haven’t found them?), I’m a bit stumped.

cheers,

Mikkel

edit: MB 2010 if it makes a difference



Replies: 0
avatar
  • sublist
  • Posted: 20 January 2010 02:40 AM

Try this ;)

gLight FBGlobalLight()
gLight
.AmbientColor FBColor(0,0,0)

Cheerz



Replies: 0
avatar
  • Mekelan
  • Posted: 20 January 2010 03:03 AM

Worked beautifully, thanks!

Incidentally, I got it to work using “from pyfbsdk import *” - what specific class is the right one if I just wanted this to work without importing everything? (and is that even worth worrying about?).



Replies: 0
avatar
  • sublist
  • Posted: 20 January 2010 03:20 AM

Importing everything is ok. Never had any Memory issues…



Replies: 0
avatar
  • Mekelan
  • Posted: 20 January 2010 06:12 PM

sublist 20 January 2010 11:20 AM

Importing everything is ok. Never had any Memory issues…

Excellent, it’s easier too so I won’t worry about it then. Thanks again!



Replies: 0