AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / BUG? MB2010 Shaders
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

BUG? MB2010 Shaders
Rate this thread
 
38726
 
Permlink of this thread  
avatar
  • Avalon
  • Posted: 14 January 2010 09:54 PM
  • Total Posts: 52
  • Joined: 22 August 2006 02:48 AM

Hi,
Has anyone else experienced this?
I get the same thing in both OR and from within the python editor… or did I miss something?
I’ve tried it on two different machines and get the same result.

A simple test code:

from pyfbsdk import *

lShaderManager = FBShaderManager()
lBox = FBModelCube("Test")
lBox.Show = True

lShader = lShaderManager.CreateShader("WireShader")

if(lShader):
#All do the same thing...none works
lBox.Shaders.append(lShader)
lShader.ReplaceAll(lBox)
#FBConnect(lShader,lBox)

It actully applies the shader to the model but it doesnt seems to connect it. If I drag and drop it, it works…

Cheers,
AV



Choose a job you love, and you will never have to work a day in your life.

Replies: 0
avatar

Turn on the propriate shading mode, with D&D the application will automatically adjust the shading mode, but with Python Script, you need to do it by yourself.

lBox.ShadingMode FBModelShadingMode.kFBModelShadingAll


Jacques LIAO
Freelancer / Consultant programmer for MotionBuilder and Virtual production

Replies: 1
/userdata/avatar/mb2zh8t49_chris.jpg

Excellent!
Thank you for that info!

Cheers,
Av

Author: Avalon

Replied: 21 January 2010 01:44 AM