Select objects by Gbuffer (Object id)

Hi there,

I am kinda new to this script thing. So what i need is to select objects by its Gbuffer Channel or Object ids. A small float with insert field where i can type the object id i want and a butten to start selecting. Id did get a start script but i dont know how to pass this.

select ( for i in objects where i.gBufferChannel == ID collect i )

Thx in advance

ralf

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
martinskinner's picture

Hi, This puts your code in a

Hi,
This puts your code in a simple rollout.
Edit it as you want.
Enjoyed looking at your site some great work.

Martin

-- Select by GBuffer.ms

try (destroyDialog GBuff_Roll) catch()

rollout GBuff_Roll "Select by GBuffer ID"
(
spinner spn_GBuffID "G Buffer ID: " type:#integer width:80
button btn_Select "Select Objects" width:120
label lab_1 "www.martinskinner.co.uk"

on btn_Select pressed do
(
clearselection ()
select (for o in objects where o.gbufferChannel == spn_GBuffID.value collect o)
)
)
createDialog GBuff_Roll 150 70

net_ralf's picture

Thank you very much for that

Thank you very much for that script,you saved me a lot of time. And thank you very much for your comment on our work. Your architecture stuff i very well done :)

cheers

Ralf

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.