WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-03-2012, 10:45 AM
kovitch kovitch is offline
Member
 
Join Date: Sep 2010
Posts: 30
Copy light object

Hi,

I'am trying to copy light objects by using the following code:

Code:
general_light= viz.addLight()
general_light.position(11.496,4.195,2.63)
general_light.direction(0,-1,0)
general_light.spread(180)
general_light.intensity(1)
general_light.spotexponent(3)

light_1 = general_light.copy()
light_1.setPosition(11.496,4.195,5.63)
light_2 = general_light.copy()
light_2.setPosition(11.496,4.195,7.289)
...and I get the error:
** ERROR: Failed to copy node
** ERROR: Failed to copy node

Is there any special way to copy a light object?

Best regards,

Alex.
Reply With Quote
  #2  
Old 04-04-2012, 04:57 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
No, this is not currently supported. In your specific case you can define a function that creates the light and sets the parameters:
Code:
def addGeneralLight():
	general_light= viz.addLight()
	general_light.position(11.496,4.195,2.63)
	general_light.direction(0,-1,0)
	general_light.spread(180)
	general_light.intensity(1)
	general_light.spotexponent(3)
	return general_light

light_1 = addGeneralLight()
light_1.setPosition(11.496,4.195,5.63)
light_2 = addGeneralLight()
light_2.setPosition(11.496,4.195,7.289)
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
How to render a texture of the transparent object and then blur it whj Vizard 1 09-25-2012 03:15 PM
Realistic Light and Shadows Using Vizard and 3DS Max jde Vizard 4 07-13-2012 10:58 AM
Ambient light Enlil Vizard 0 05-03-2011 08:48 AM
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
rotate to object jargon Vizard 1 08-08-2005 12:20 PM


All times are GMT -7. The time now is 04:41 AM.


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