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 / set diffuse and specular color
  RSS 2.0 ATOM  

set diffuse and specular color
Rate this thread
 
33344
 
Permlink of this thread  
avatar
  • Total Posts: 2
  • Joined: 05 September 2006 11:41 AM

Hello, im learning python and im trying to automate an export set-up.
I want all material named blinn1 shininess, specular and diffuse attributes to be set to a specific setting

here’s what I have so far

matList FBSystem().Scene.Materials
for mat in matList:
    print 
mat.Name
    
if mat.Name == "blinn1":
        
mat.Shininess 15
        mat
.Diffuse == (0.300.300.30)
        mat
.Specular == (0.500.500.50)

now I dont get any error, but the diffuse and specular are not set by the script.

Must be a syntax problem...help, anyone?

Thanks



Replies: 0
avatar

found my syntax problem

from pyfbsdk import *

matList FBSystem().Scene.Materials
for mat in matList:
    print 
mat.Name
    
if mat.Name == "blinn1":
        
mat.Shininess 15
        mat
.Diffuse FBColor(0.300.300.30)
        mat
.Specular FBColor(0.500.500.50)


Replies: 0