Area :: Header
Interested in making Indie games?

Register for a Meet the Experts webinar with Digital-Tutors today!
Discussion Groups

Python

Reply
Valued Contributor
Avalon_1
Posts: 52
Registered: ‎08-22-2006

BUG? MB2010 Shaders

10 Views, 2 Replies
01-15-2010 02:54 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.
Please use plain text.
Valued Contributor
Jacques.LIAO
Posts: 92
Registered: ‎05-28-2008

Re: BUG? MB2010 Shaders

01-21-2010 06:19 AM in reply to: Avalon_1
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
Please use plain text.
Valued Contributor
Avalon_1
Posts: 52
Registered: ‎08-22-2006

Re: BUG? MB2010 Shaders

01-21-2010 06:44 AM in reply to: Jacques.LIAO
Excellent!
Thank you for that info!

Cheers,
Av
Choose a job you love, and you will never have to work a day in your life.
Please use plain text.