#1
|
|||
|
|||
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) ** ERROR: Failed to copy node ** ERROR: Failed to copy node Is there any special way to copy a light object? Best regards, Alex. |
#2
|
|||
|
|||
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) |
|
|
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 |