My suggestions to make BabylonJs Editor v5 more compatible to version control:
All generated content should be regenerated if missing. For example, editor-generated_extracted-textures textures are missing if aren’t added to version control. And if i reassign the textures in Editor, all parameters of the textures reset.
Values shouldn’t change their positions in code until some of them are removed or new values are added. For example, render list of a CascadedShadowGenerator is shuffled every time i save my project.
Node Materials shouldn’t save a time of BABYLON.InputBlock. I think its value should always be zero at start.
Bonus
It would be convenient to have a CLI to export a project for deployment. Now, i have to have the editor to export the project at first, that forces every member of the project to have the editor during development. I see this functionality as node module, which i should install to build the project during Docker build, for example
Do you mean when the input block is set to “system value” with “time” ? If yes, I can maybe do something on my side but I think the right place would be in serialization of the block itself. What do you think @sebavan ?
I assigned textures to a NodeMaterial in the inspector, then i deleted assets/editor-generated_extracted-textures/ folder, then i tried to regenerate the folder with textures, but i couldn’t.
Mode is ‘user-defined’, Animation type is ‘Time’. The description says that the block is the time since a scene was loaded, but i thought it is the time since the scene started playing, so it was strange to me when the block time value was saved
Happy new year. It is always nice to communicate with you
@Ezardy I have to rework the way node materials work in the editor
The way to manage textures is not optimal here: sources can come from the node material itself with encoded textures, or the assets of the project themself when editing from the editor’s inspector. When using it this way I was good but you pointed different problems I did not anticipate. It can take time to rework it and ensure it fits all needed features.
I’ll propose a temporary fix to unlock your situation and I’ll let you know
I just published the v5.2.5 which temporaly fixes the problems with the node materials. Unfortunately, when I spotted the problem, I’m sad to announce that because you removed or untracked the editor-generated_extracted-textures folder you’ll have to reset all the textures of your impacted node materials in your project
I’m focusing on the second point: when opening a project and saving without any change, files should remain untouched
I’m doing my best and again sorry for the inconvenience !
I didn’t miss the files, don’t worry. The problem is just about my team members couldn’t launch the project without the extracted files were added to version control
OMG you see me happy ^^
The concept before this release was that node material textures were extracted to keep only relative paths in name and url properties (to avoid having BIG json files at the end in generated .babylon files in public/scene).
Now, since 5.2.5, it is backward compatible and newly created/edited node materials will keep those encoded textures in their configuration but they are all extracted when generating the scene. In other words only the output will be modified and your source assets will remain untouched.
For the second point, I found a possible fix but I’ll have to highly test it. For a big scene I successfully got 0 change detected by git so it’s going well !