Notifications
Clear all

[Closed] [Query] Vraylight to Spline Rectangle … Will I be able ?

Spline Rectangle ->>> Vraylight…

15 Replies

easy, just get the position of the vray light and the dimension properties, then create a new rectangle shape with those dimensions.

Select your Vray Light plane.

Rectangle length:($.size1 * 2) width:($.size0 * 2) cornerRadius:0 transform:$.transform

Multi Select your Spline VrayLight

VrayLight to Edittable Spline

hehe…let’s see if I say right:

for i in selection where (classOf i==VRayLight) do if i.type==0 do rectangle length:(i.size1 * 2) width:(i.size0 * 2) cornerRadius:0 transform:i.transform

Spline => VRayLight

try this…

(
	newselection = #()
	for i in selection do
	(
		if classof i == rectangle do
		(
			light = vraylight()
			light.size0 = i.width/2
			light.size1 = i.length/2
			light.transform = i.transform
			append newselection light
		)
	)
	deselect $*
	select newselection
)

< x > Multi Select Rectangle -> VRayLight
< o > Multi Select Editable Spline -> VRayLight

here’s a quick way of doing it…


(
	try (delete $vraylightfromsplineshape*) catch()
	newselection = #()
	for i in selection do 
	(
		if (classof i) == splineshape do
		(
			extrudeMod = extrude amount:0
			addmodifier i extrudeMod
			light = vraylight()
			light.type = 3			
			light.mesh_source = i
			light.transform = i.transform
			light.multiplier = 2		
			--light.mesh_flip = false
			--light.mesh_flip = true
			light.doubleSided = true
			light.name = uniquename "VrayLightFromSplineShape"
			deletemodifier i extrudeMod
			append newselection light
		)
	)
	deselect $*
	select newselection
)

ERROR…

Page 1 / 2