ScriptSpot home

Forum topic · Scripts Wanted

select all objects with vraylight materials (incl. if its part of multi/sub mats)

By 1rv · 2025-01-28

Description

could somebody help with the subject?

Comments (3)
1rv

awesome, thank you so much

Simon Bourgeois

Hi,

You can use this:


(
	UpdateSceneMaterialLib()
	local vrayLightMtlArr = #()
	for m in scenematerials do join vrayLightMtlArr (getClassInstances VRayLightMtl target:m)
	makeUniqueArray vrayLightMtlArr
	local refnodes =#()
	for m in vrayLightMtlArr do join refnodes (refs.dependentNodes m)
	makeUniqueArray refnodes
	if refnodes.count>0 do select refnodes
)