Dropdown List of objects in scene

Creating a dropdown list that displays the objects in the scene?

Comments

Comment viewing options

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

This is a great help ;)

This is a great help ;)

Budi G's picture

check this.. :) rollout

check this.. :)

rollout drop_roll "Drop Down List"
 
(
 local obj_array = #()
 button updt "update" offset:[10,0]
 dropdownlist obj_dd "Objects :" offset:[0,-20] items:#()
 
	fn update_objs =
	 ( 
	   obj_array = objects --as array
	   obj_dd.items = for i in obj_array collect  i.name
	)
 on drop_roll open do update_objs()
 on obj_dd selected i do select obj_array[i]
 on updt pressed do update_objs() -- update list, if object has been deleted or added again in scene
 
)
 
createDialog drop_roll

Comment viewing options

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