WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 05-27-2009, 01:54 AM
Joran Joran is offline
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Question How to remove a modifier


After running this piece of code:

toon = viz.add('toon.dlm')
ball = viz.add('ball.wrl')
How do you remove the toon modifier from the ball?

Greetings, Joran.
Reply With Quote
Old 05-27-2009, 12:53 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
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:
import viz

#Create group node for rendering in toon mode
toon = viz.add('toon.dlm')
toonGroup = viz.addGroup()

#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)
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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

All times are GMT -7. The time now is 02:18 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC