I made this script to reduce the time taken when setting up assets to export to CryEngine. This script will create and link all selected objects to a dummy. As well as giving the option to rename the dummy and unlink it from the objects if needed. The dummy will be placed at the pivot point of the object, if its only 1 object selected, otherwise it will be in the centre lowest point of the group of objects.
-- Elliott Pacel: Create Dummy for Selected Objects -- Select objects and press button -- Will create dummy at pivot point for single object or in the centre bottom of group selection rollout rol_DummySelected "Connect Dummy to Selected" width:104 height:72 ( label lbl1 "Select Objects to Attach Dummy" pos:[8,8] width:88 height:32 button btn_DummySelected "Dummy Selected" pos:[8,40] width:88 height:24 on btn_DummySelected pressed do ( undo on ( ( if selection.count == 1 then ( place = 0 place = selection.pos global nDummy = Dummy pos:place ) else ( place = 0 deselect $*'proxy'* deselect $*'lod'* global nDummy = Dummy pos:[selection.center.x,selection.center.y,selection.min.z] ) selection.parent = nDummy select nDummy rollout rol_Rename "Enter Name for CryEngine Export" width:168 height:176 ( edittext BASE_NAME "" pos:[8,32] width:152 height:17 label rename_lbl "Rename Dummy to:" pos:[16,16] width:104 height:16 button rename_them "Done" pos:[24,135] width:120 height:21 button unlink_dummy "Unlink Dummy from Objects" pos:[8,64] width:152 height:21 label reminder_lbl "Warning: Once unlinked will require manual re-link" pos:[24,96] width:128 height:32 on rename_them pressed do ( if base_name.text != "" do for i in selection do i.name = base_name.text Destroydialog rol_Rename ) on unlink_dummy pressed do ( d = dummy() for i in selection do ( select i.children ) selection.parent = d delete d select nDummy ) ) ) createDialog rol_Rename ) ) ) CreateDialog rol_DummySelected NewDlg cui.registerdialogbar rol_DummySelected style:#(#cui_dock_left,#cui_dock_right,#cui_floatable)
I am Elliott Pacel, a Technical Artist at Reflections, Ubisoft. This blog includes all the MaxScript/ Blueprints I have developed and for any working progress updates for script projects I am currently working on.
If you have any crits/ comments please comment on a relative post or contact me at email@example.com, alternatively use the contact me section of my 'About' page.
Also, if you have any script that you may want developing please feel free to contact me.