A plugin for blender that exports in a custom file format that describes a “setting” (as in a story setting, an environment). The format is a zip file containing a json file that describes the setting, plus texture files and gltf models.
A setting file is composed of scenes, which are defined by blender collections. So collections need an additional panel defining if they are exported in the setting file (boolean), and if it’s a “multiple” scene (boolean) a multiple scene means a scene that can have replicas, but in the plugin they only need to be marked as such, nothing else). A scene name is the same as it’s collection’s name.
Regular blender objects also need a panel describing how they are going to be exported in the setting file. It has to have a way of selecting the UV with which it will be exported (select file), an optional texture that the object can use, and if the object is editable (select file).
If the object in question is editable(boolean), another panel is enabled where it’s “elements” are defined (list). The element list is a growable list of elements, which are named and, each element has a group of faces associated with it (face selected with element)
Can also select objects and assign some action (list or insert new action)
There’s also a collision generator. A collision polygon is a 2d polygon in the xy plane where no character can move to. It is generated for every exported object, by analysing what vertices of the mesh lie in the space between z=0 and z=2 meters.
All objects in an exported collection are also exported automatically. An exported object is exported as a gltf inside the zip file, it is exported with the selected uv in the panel. It also has an entry in the json description describing which gltf file (insert) and which texture file corresponds to it, and the elements and the collision. It also has an entry in the scene section it belongs to, describing the position and rotation for each instance of the object in the scene.
Note: You can see in the attachments:
plugin mockup => It is a guide on how the plugin should be finished
blender plugin first [login to view URL] => It is a suggestion of basic tasks if you have not developed this type of plugin before.
pabellon-zip => It is an example of the generated zip.
[login to view URL] => It is an example of the generated json.