Topic: The current state of the blender script file?
trimard Topic Opener |
Posted at: 2016-12-05, 11:26
I'm searching through the media repo, lancuhpad, the wiki and this forum and come across some conflicting informations. I was wondering if someone could help me understand. First the wiki: 3D Modeling in Blender
So I guess if the update is up, why bother explaining for 20 lines how we should continue to use the old blender version? Shouldn't that be deleted? Seeing the blender script are all updated would be coherent with what I saw on lauchpad or on the first or second post about it. But it is discordant with what I saw in the media repo, where one file is the main one "menu.py" simply don't work with current blender (or I don't how to use it, but from what I read it is using outdated modules). All other scripts are up to date though. I'm ready to help modify the scripts or the wiki for this to be more clear. But first I would like to know what the actual state of the situation is. Actually if anyone who has succeed in making the script work recently could just explain me how he did it, that would already help a lot :D. And I mean that of course, without using blender 2.49! Thanks in advance! Top Quote |
GunChleoc |
Posted at: 2016-12-05, 20:05
The problem is that we currently have no graphic artist who knows these things intimately. I managed to adapt a worker model with some help last year, so I added the quick update note as to the Blender version and added a screenshot. I know nothing about Blender, so I didn't change any other information in the wiki - an update would be much appreciated! I did the export by loading the worker script only, it will find the necessary menu script on its own. I tried rendering some buildings a few weeks ago and got some seriously messed up roof textures, although they all looked fine in Blender. NO clue what is going on there. Alexia_Death can be caught on IRC on the #widelands channel sometimes, she hasn't used the scripts for a long time, but she can help in a pinch. The configuration files for animations are now documented in our scripting reference: https://wl.widelands.org/docs/wl/animations/ Busy indexing nil values Top Quote |
trimard Topic Opener |
Posted at: 2016-12-05, 22:08
Actually, my question goes to developpers too. When you do a build, how do you manage to produce the different pictures needed? In the current media repo, the images aren't available yet! So you mean, there hasn't been new images generated since the last presence of a graphic artist? But barbarian building aren't even present in the repo yet! From what I understand the current procedure for new pictures is someone do the bender > generate images in a special folder > manually moves them in the general widelands repo> and then commit? I feel that could be greatly simplified by a python script, but there must be some reason that hasn't been done before. Top Quote |
SirVer |
Posted at: 2016-12-06, 08:06
Unfortunately, that is exactly how it has worked in the past. And yes, no new pictures since somebody figured out how to get them out of blender.
Barbarian buildings are in the repo. Which ones specifically are you missing?
Yes, that is correct.
I am not sure what potential for optimizing the workflow you see. Could you elaborate? In general, the idea is that on trunk/ the files do not change as often, since every change in a picture is quite a substantial amount to download for all developers. If you touch all pictures, the commit can easily be a few hundred megabytes which will be forever in the trunk/ history. So we only update images in trunk/ as needed. Top Quote |
trimard Topic Opener |
Posted at: 2016-12-06, 10:05
All of the render. I must a problem with bzr :P. That solves that problem! edit: They're not in the pngs directory at least. Isn't that were they should be? edit2: That's actually the case for all tribes. I guess I didn't understand that the media repo didn't stock the pngs. But some are stocked there. Is that an error?
Run a script of blender in which every folder is checked which automatically render the images in the necessary place if they hadn't be rendered. No need to open blender GUI. Yes I understand why you want to keep the manual part, makes sense now. Although the script could check if the image has already been transfered or not. Meaning that would only change images if there was some changes. Another long process is rendering each model by going to the specific file and sending the render. What if you do many small changes in many files? What if you change the script? But yeah I admit it's not the feature of the year
Ok then, I will try to figure it out edit3: Actually what I said at first was false. The script menu_b25.py works fine on current blender version. We should have a discussion on why menu.py was kept in the future. I think it was there for compatibility issue, but if everyone use last blender version, there shouldn't be such problem. Perhaps all models have to be tested with the last blender version? If that's the case, I will definitely make a script for automatic replacement of image in the trunk so that we can bulk test all models. Edited: 2016-12-06, 12:27
Top Quote |
GunChleoc |
Posted at: 2016-12-06, 12:29
We don't keep the pngs in the media repo - it already takes forever to branch it as it is. So, the pngs are all in lp:widelands -> data/ A script would be feasible if you checked out both repos and gave the script the source and destination directories on the command line. We are also slowly working on implementing spritemaps though, and when that is done, any such script will need updating as well. Maybe start off with a script that renders 1 animation for 1 unit only? That script could then later be wrapped by another script that will walk the directories. Busy indexing nil values Top Quote |
trimard Topic Opener |
Posted at: 2016-12-06, 14:08
That's actually what the current script already does! But I think in order to test, I really need to be able to bulk test images. I'll write the script, I don't think that's too much work, I already did that for another project. That way I will be able to say if the current scripts are up to date and all models are working. I cannot do that right now. Top Quote |
GunChleoc |
Posted at: 2016-12-06, 18:18
Sounds like you know what you're doing Busy indexing nil values Top Quote |
trimard Topic Opener |
Posted at: 2016-12-07, 15:27
Lol, I only know how to makes impression . I think I might need to use bash. Is that tolerable for this project? The call to bash would be done with the "subprocess" python package. I have another solution which consist in create one big blender file in which I import successively all models, render them, then remove the model and pass to the next. It's a bit less clean that the bash solution, but it's tolerable. A third problem I got is where do I store the information of where the export folder is? Inside the python script (which will result in a very big script) or inside a config file (in that case which are the format you generally use guys?) I know I do all this for tests, but I guess if I work on that thing, it would be cool if it could be used by other in the future, so I need to be coherent with the rest of the project . Top Quote |
GunChleoc |
Posted at: 2016-12-07, 22:15
Calling a subprocess in Python is fine - we do that in some other utils as well. Especially if it's the less hacky solution! Our directory names are well-named now, so specifying a root dir should be enough. For example, the barbarians' lumberjack's hut is called "barbarians_lumberjacks_hut" and resides in We also canonicalized the animation names, so the files for the "idle" animation are called Busy indexing nil values Top Quote |