How to save objects as prefabs?
by 3dblocks · in Constructor · 04/10/2007 (10:54 am) · 4 replies
I have constructed several objects (columns, stairs, so on). And for now I save them as scenes. But how do I save them or what folder do I place them in so they are available under the prefabs tab? This would be very convenient for building larger scenes from my sub assemblies.
Also how to make prefabs available to others in the community?
Thanks for the help.
Also how to make prefabs available to others in the community?
Thanks for the help.
#3
A Prefab may be either a CSX or MAP file. You could place them in the prefabs directory where the Constructor application is located, but I'd recommend that you give them their own directory. Then use the System->Manage Prefabs... menu.
This will open a new window that lets you add new prefab directories and change the order they will appear under the Prefab tab of the Tools Form. This is where placing them in their own directory is handy as they'll show in their own group under the Prefab tab.
If you'd like to have a preview thumbnail/icon for your prefab, create a 32x32 bitmap with the same name as your prefab file with a 32 appended to it. For example if your prefab is named ramp.csx then your icon would be ramp32.png.
The prefab system also supports 64x64 and 128x128 icons but the Tools Form was never updated to take advantage of this. That's why you'll see these sized files in the default prefabs directory.
If you don't provide an icon then a default one will be used. And don't forget that the Form menu of the Tools Form has options for how to display the prefabs in the list as documented here: tdn.garagegames.com/wiki/Constructor/Reference/ToolsForm
I hope that helps!
- Dave
04/10/2007 (3:32 pm)
Greetings!A Prefab may be either a CSX or MAP file. You could place them in the prefabs directory where the Constructor application is located, but I'd recommend that you give them their own directory. Then use the System->Manage Prefabs... menu.
This will open a new window that lets you add new prefab directories and change the order they will appear under the Prefab tab of the Tools Form. This is where placing them in their own directory is handy as they'll show in their own group under the Prefab tab.
If you'd like to have a preview thumbnail/icon for your prefab, create a 32x32 bitmap with the same name as your prefab file with a 32 appended to it. For example if your prefab is named ramp.csx then your icon would be ramp32.png.
The prefab system also supports 64x64 and 128x128 icons but the Tools Form was never updated to take advantage of this. That's why you'll see these sized files in the default prefabs directory.
If you don't provide an icon then a default one will be used. And don't forget that the Form menu of the Tools Form has options for how to display the prefabs in the list as documented here: tdn.garagegames.com/wiki/Constructor/Reference/ToolsForm
I hope that helps!
- Dave
Torque 3D Owner Vincent D