Page 1 of 1
Are non-modal windows possible
Posted: Fri Oct 15, 2021 5:03 pm
by abzivid
Hi,
I would like to create a non modal window to drive object location randomization to generate variations in the scene.
Is this possible at all?
Any other approaches?
Many thanks
Aleksandar
Re: Are non-modal windows possible
Posted: Sat Oct 16, 2021 5:50 am
by abzivid
Think I have found a way to solve my issue.
See the code below that randomizes geometry's translational and rotational placement.
There,
octane.changemanager.update() call can be used to keep the window live while updating the scene.
Code: Select all
local function Randomize()
local rndRotate = {math.random(-maxXRot.value,maxXRot.value), math.random(-maxYRot.value,maxYRot.value), math.random(-maxZRot.value,maxZRot.value)}
local rndTranslate = {math.random(-maxXTr.value, maxXTr.value)/100, math.random(-maxYTr.value, maxYTr.value)/100, math.random(-maxZTr.value, maxZTr.value)/100}
placementTransformation:setAttribute(octane.A_ROTATION, rndRotate)
placementTransformation:setAttribute(octane.A_TRANSLATION, rndTranslate)
octane.changemanager.update()
end