WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

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

Hello,

After running this piece of code:

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

Greetings, Joran.
Reply With Quote
  #2  
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:
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)
Reply With Quote
Reply

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:14 AM.


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