Поделюсь всем кодом. Может так смогу кого-нибудь заинтересовать. Помогите плз.
Небольшой скриптик умеет менять часть свойств всем выделенным камерам или ИС:
rollout MB "VrayCam_Options"
(
group "VrayCam Options:"
(
button doitOn "ON" width:40 align:#center border:false across:2
button doitOff "OFF" width:40 align:#center border:false
spinner theSubdivs "Subdivs:" range:[-10000,10000,6] fieldwidth:45 align:#center type:#integer
)
group "VrayLight Options:"
(
spinner theMultiplier "Multiplier:" range:[-10000,10000,30] fieldwidth:45 align:#right type:#float
checkbox theCastShadows "--Cast shadows--" checked: true align:#left
checkbox theDS "Double-sided" align:#left
checkbox theInv "Invisible" align:#left
checkbox theIgnore "Ignore light normals" checked: true align:#left
checkbox theNoDec "No decay" align:#left
checkbox theStoreWIM "Store with irrMap" align:#left
checkbox theAffectDiff "Affect diffuse" checked: true align:#left
checkbox theAffectSpec "Affect specular" checked: true align:#left
checkbox theAffectRef "Affect reflections" checked: true align:#left
spinner theLightSubdivs "Subdivs:" range:[-10000,10000,8] fieldwidth:45 align:#right type:#integer
spinner theShadowBias "Shadow bias:" range:[-10000,10000,0.02] fieldwidth:45 align:#right type:#worldunits
spinner theCutoff "Cutoff:" range:[-10000,10000,0.001] fieldwidth:45 align:#right type:#float
)
on doitOn pressed do for i in selection do if classOf i == VRayPhysicalCamera do try(i.use_moblur = on)catch()
on doitOff pressed do for i in selection do if classOf i == VRayPhysicalCamera do try(i.use_moblur = off)catch()
on theSubdivs changed val do for i in selection do if classOf i == VRayPhysicalCamera do try(i.subdivs = theSubdivs.value)catch()
on theMultiplier changed val do for i in selection do if classOf i == VRayLight do try(i.multiplier = theMultiplier.value)catch()
on theCastShadows changed theState do for i in selection do if classOf i == VRayLight do try(i.cast_Shadows = theCastShadows.checked)catch()
on theDS changed theState do for i in selection do if classOf i == VRayLight do try(i.doubleSided = theDS.checked)catch()
on theInv changed theState do for i in selection do if classOf i == VRayLight do try(i.invisible = theInv.checked)catch()
on theIgnore changed theState do for i in selection do if classOf i == VRayLight do try(i.ignoreNormals = theIgnore.checked)catch()
on theNoDec changed theState do for i in selection do if classOf i == VRayLight do try(i.noDecay = theNoDec.checked)catch()
on theStoreWIM changed theState do for i in selection do if classOf i == VRayLight do try(i.storeWithIrradMap = theStoreWIM.checked)catch()
on theAffectDiff changed theState do for i in selection do if classOf i == VRayLight do try(i.affect_Diffuse = theAffectDiff.checked)catch()
on theAffectSpec changed theState do for i in selection do if classOf i == VRayLight do try(i.affect_Specular = theAffectSpec.checked)catch()
on theAffectRef changed theState do for i in selection do if classOf i == VRayLight do try(i.affect_reflections = theAffectRef.checked)catch()
on theLightSubdivs changed val do for i in selection do if classOf i == VRayLight do try(i.subdivs = theLightSubdivs.value)catch()
on theShadowBias changed val do for i in selection do if classOf i == VRayLight do try(i.ShadowBias = theShadowBias.value)catch()
on theCutoff changed val do for i in selection do if classOf i == VRayLight do try(i.cutoffThreshold = theCutoff.value)catch()
)
createDialog MB 150 365
Узел (Node) VrayLight имеет свойство castShadows.
Базовый объект (baseObject) узла VrayLight тоже имеет свойство castShadows.
Свойство castShadows узла имеет преимущество перед свойством castShadows базового объекта узла.
Этот код меняет свойство castShadows узла:
$.castShadows=off
Этот код меняет свойство castShadows базового объекта узла:
класс! спасибо! Вот бы создать скриптик, наподобие light lister 3D Зверя, чтобы умел менять свойства не просто выделенному ИС, но всем выделенным + камеры...
Доступ к резюме доступен только по пакетному доступу HR менеджерам зарегистрированных компаний. Узнать о вариантах корпоративных пакетов можно по ссылке.
Александр Якушев
Как- то так:
Все бы хорошо, но с CastShadows такой номер не проходит.
ни так:
ни так:
Помогите разобраться плз.
Александр Якушев
Небольшой скриптик умеет менять часть свойств всем выделенным камерам или ИС:
igorznag
Базовый объект (baseObject) узла VrayLight тоже имеет свойство castShadows.
Свойство castShadows узла имеет преимущество перед свойством castShadows базового объекта узла.
Этот код меняет свойство castShadows узла:
Этот код меняет свойство castShadows базового объекта узла:
Александр Якушев
Александр Якушев
Не надо дублировать вопрос в двух темах ! Модератор.