@d954mas - sorry this has been so long in coming. Especially when there was actually a pretty simple solve for it
For the problem with scene changes:
This should now always restore your scene to is original state when exporting. I do need to check for a couple of edge cases so another update may come soon.
For the duplicated meshes, I’m working on a better hierarchy export. I really want the Defold hierarchy to properly reflect the Blender hierarchy, but it turns out Blender has alot of intermediate transforms that complicate the matter. Hopefully I can figure out a nice way to convert coord space, and keep node hierarchy clean.
While working on the new node export and render scripts I noticed (couldnt believe it was broken) that the child location (translation) seemed to be getting embedded into the gltf/glb mesh file. Making it very useless when you get it into defold if you need something like a local propellor spinning on a plane!!!
Have to ask here because getting error when trying to install latest version of the tool. Not sure how to fix it. Any ideas?
Platform: Apple m2 - Sonoma 14.4.1
Blender: 2.93 or 4.1
Blockquote
Traceback (most recent call last):
File “/Applications/Blender.app/Contents/Resources/2.93/scripts/modules/addon_utils.py”, line 351, in enable
mod = import(module_name)
File “/Users/m*******a/Library/Application Support/Blender/2.93/scripts/addons/defender_init_.py”, line 99, in
from defoldsync import defoldUtils
ModuleNotFoundError: No module named ‘defoldsync’
Install add-on by providing path to the zip archive. See log about successful install below
Blockquote Modules Installed () from ‘/Users/m****a/Defold Projects/blender_addons/addons/defender.zip’ into ‘/Users/m*****a/Library/Application Support/Blender/2.93/scripts/addons’
Then click on checkbox of the add-on to enable it and getting the error
BlockquoteTraceback (most recent call last):
File “/Applications/Blender.app/Contents/Resources/2.93/scripts/modules/addon_utils.py”, line 351, in enable
mod = import(module_name)
File “/Users/m*****a/Library/Application Support/Blender/2.93/scripts/addons/defender\init.py”, line 99, in
from defoldsync import defoldUtils
ModuleNotFoundError: No module named ‘defoldsync’
When I go to add-on folder ‘/Users/m****a/Library/Application Support/Blender/2.93/scripts/addons/defender’ I do not see ‘defoldsync’ folder. Files only. Looks like these files can be enclosed into folder but delimiter “\” will not work as a folder in OSX. See screenshot below.
Im not sure what you are doing there. Blender should install directly from the zip file. If this is not working, then this is something more to do with your Blender installation.
Manually extracting can work, but again you will need to check for permissions and security folders.
The problem looks possibly like whether there are problems with your zip extraction tools you are using on OSX - that looks like it is generating the wrong path format - this is not a function of my plugin, but Blender instead (I dont write anything to do with the zip extraction for a plugin, thats Blender).
That’s work this way for both 2.93 and 4.1 Blender version.
Great that everything good with the plug in. I’m sure I’ll enjoy it once manage to fix Blender
Added also, are collider auto generation, texture file remapping, script key/values (accessible in your game), init script commands and update script commands. All which can be applied to specific game objects in the scene.
Some of the features (like material mapping) are only available in mesh buffer exporting - although I will look into how it might be possible to do this with gltf.
This is being used for a little game jam project atm as well as maps for f18 export. I hope to have this tested and in by the end of next week.
Thanks for doing this extension. Which version of Blender are you aiming at? I have 4.2.1 LTS on Linux and the way extensions are added look a bit different to what you are doing. It has a ‘get extensions’ option, above the ‘Add-ons’ option, in the preferences window, where a remote repository can be added. I do not know how to use Blender yet so not an issue for me in any case.
Hi, yes. If you read at the top (recent update) there are notes about working with new versions. It will work with Blender 4.0. sort of. Over the coming weeks I will be adding detection so it can support Blenders internal changes, mainly between v3.4 → v3.6 and there are some recent changes in 4.1 and above that are making gltf embedded a bit of a pain (this will apply for normal gltf embedded export in Blender too, not just my addon).
When I get the auto version detect in, it will also have the game data export built in (that shouldnt be affected by versions - or I hope not! ).
Doing this Game Jam has been a huge help in testing some of the new game data features.
With the “Lets Bounce” game I can build a complete level in about 2 hours, almost entirely in Blender. This is very very nice. I cant wait to punch out a bunch of F18 missions now
Into the tidying up stages (lighting, texturing bugs and game numbers tweaking)… very happy. Will drop a release of this next week. The current new release branch you can use right now, but theres one command I need to test and check more (since I didnt use it much - replace texture command).
And it looks like the Blender upgrade shouldnt be too bad. If you are using gltf/glb it might be a little more painful, but if using the meshbuffer (which is required if you need material mapping) then it looks like it is working as is.
Ive made some changes on the main branch. Will be testing for next day or two and then push another release on the weekend. Then its onto f18 mission builds!
Some sad news. I dont think I will be doing much more on the Defender exporter. Other efforts are now taking priority in my life. I wont be removing the repo, so people are welcome to fork and contribute or develop their own from it. Thanks for everyones interest in it. Has been real fun.
Ok. Due to many new features I needed in my f18 game (since all my missions are built in blender and exported using defender) there has been some updates.
Little summary:
Due to changes needed for my f18 game. I ended up added a number of new features to defender as well as fixing many little bugs.
Mesh buffer generation and collections is much more stable now. This is being used in my f18 game.
Gltf and glb improvements.
Added more properties for obejcts. You can now control script setting better as well as collisions volumes are much better - not perfect yet, but pretty good.
Scene graph is now output to script in a collection. This is a BIG update.
The entire tree for a collection is exported into a lua table in script.
You can access any collection using the gop tables. If your collection is called MyScene then the command to fetch the graph is: gop.get(“SCENE_MYSCENE”)
The table is seen in the declaration in the scripts/MyScene.script file. This can be modified after export if needed. It is auto loaded with the collection.
The scene tree (graph) includes many features like: dimensions, location, rotation, scaling, children and much more. See script file to see what is in there.
I’m not really doing much more on this tool once the f18 game is release. However should I end up doing more theatres and missions for the f18 game, then defender will likely get more updates.
If you would like more details on how properties, and the scene graph works, please reply here and I will respond as best I can. The f18 game is driving most of these changes so there may be a flurry of updates every now and then up until around September, which is when I hope to halt any export changes and lock my assets.