![]() |
|
#1
|
|||
|
|||
|
Hello,
After running this piece of code: Code:
toon = viz.add('toon.dlm')
ball = viz.add('ball.wrl')
ball.modify(toon)
Greetings, Joran. |
|
#2
|
|||
|
|||
|
You can apply the toon modifier to a group node and parent/unparent the ball from the group node to toggle toon shading. Here is some sample code:
Code:
import viz
viz.go()
#Create group node for rendering in toon mode
toon = viz.add('toon.dlm')
toonGroup = viz.addGroup()
toonGroup.modify(toon)
#Create ball underneath toon node
ball = viz.add('ball.wrl',parent=toonGroup,pos=(0,1,5))
#Unparent ball from toon node when spacebar pressed
vizact.onkeydown(' ',ball.parent,viz.WORLD)
|
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove the credits on the run screen | Saz | Vizard | 1 | 11-21-2008 09:01 AM |
| How to access scene information in a C++ modifier | m7ossny | Plug-in development | 1 | 03-23-2007 11:02 AM |
| collission and scaling of objects | Johannes | Vizard | 28 | 02-08-2005 10:08 AM |