Latest Posts

Topic: The current state of the blender script file?

trimard
Avatar
Topic Opener
Joined: 2009-03-05, 22:40
Posts: 230
Ranking
Widelands-Forum-Junkie
Location: Paris
Posted at: 2016-12-07, 23:05

Calling a subprocess in Python is fine - we do that in some other utils as well. Especially if it's the less hacky solution!

That is good news !

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 data/tribes/productionsites/barbarians/lumberjacks_hut.

Yes I was pleasantly suprised by that. Although most files are exception to this rule for example in the immovable folder. In this folder (and maybe others) the name of the file doesn't correspond the name of the blend file.

blackroot-field.blend allow for the render of:

  • backrootfield_tiny

  • backrootfield_small

  • backrootfield_medium

  • backrootfield_ripe

  • backrootfield_harvested

And the names don't correspond! blackroot-field to backrootfield

In total I could only link 176/563 blender file to their render final location. I can of course improve this result by checking the strings better. But if you want some uniformisation, konw that there is some potential face-smile.png .

We also canonicalized the animation names, so the files for the "idle" animation are called idle_00.png, idle_01.png etc... there can be no digit or 3 digits though, depending on the length of the animation.

Yeah that part works really well! face-grin.png

edit: I think I'm gonna have a hard time doing all that with script only. I'm afraid the lack of uniformisation of the names is far higher than I hoped. I'm still trying but I'm not sure it will be concluant...

edit: I'm talking about this type of lack of uniformisation:

"bzr/widelands-media/graphics/tribes/atlanteans/buildings/hunter.blend", 
"bzr/widelands-media/graphics/tribes/empire/workers/hunter/hunter_idle.blend", 
"bzr/widelands-media/graphics/tribes/barbarians/workers/hunter/hunter_idle.blend"

Why aren't they all called hunter.blend?

Why not merge all idle, walk, etc in a single blend file but in different scenes?

Edited: 2016-12-07, 23:48

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-12-08, 09:33

The names of units changed throughout the years. One of the things that I did during the last development cycle was to clean up all the unit names and paths, since we were breaking savegame compatibility anyway. I tried my best to adapt the names of the blend files as well, but looks like there is more work to be done. Any cleanup will be appreciated!

My all means, combine blend files if it makes life easier for Blender artists face-smile.png

You can rename files and directories by calling bzr mv <source> <target> from the command line. Do not just move them in your file browser, as that will mess up the repository history and really blow up the download size as well.

Edited: 2016-12-08, 09:34

Busy indexing nil values

Top Quote
trimard
Avatar
Topic Opener
Joined: 2009-03-05, 22:40
Posts: 230
Ranking
Widelands-Forum-Junkie
Location: Paris
Posted at: 2016-12-08, 11:09

My all means, combine blend files if it makes life easier for Blender artists face-smile.png

Ok, let's do that then!

You can rename files and directories by calling bzr mv <source> <target> from the command line. Do not just move them in your file browser, as that will mess up the repository history and really blow up the download size as well.

bzr does really weird things compared to git sometimes... But ok, good to know face-smile.png


Top Quote
trimard
Avatar
Topic Opener
Joined: 2009-03-05, 22:40
Posts: 230
Ranking
Widelands-Forum-Junkie
Location: Paris
Posted at: 2016-12-08, 13:25

Ok, I was checking a bit what the work load would be in doing that... It is absolutly huge. I would say 80 - 90% of worker model are separeted in different files rather than different scenes. I think it was voluntary from the previous graphists perspectives. I think I should ask them their opinion on the question.

I see Alexia_death on IRC but she didn't answer. Any idea who I could mail or something? I'm not expecting a quick answer so no problem if that takes time.

In the meantime there is always the work of renaming all blend file to be coherent with the widelands repo. Like always using the "_" rather than the "-", merge the different models with a "2" behind it. But I won't merge all idle, walk, walkload, etc until I have the opinion from the previous graphists!


Top Quote
Venatrix
Avatar
Joined: 2010-10-05, 20:31
Posts: 449
Ranking
Tribe Member
Location: Germany
Posted at: 2016-12-08, 13:34

The last elder of graphics was chuckw. You could try to PM him. I don’t know if he reads his messages though.


Two is the oddest prime.

Top Quote
trimard
Avatar
Topic Opener
Joined: 2009-03-05, 22:40
Posts: 230
Ranking
Widelands-Forum-Junkie
Location: Paris
Posted at: 2016-12-08, 14:18

Sent him one, thanks for the suggestion :)!


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-12-10, 11:46

I have a branch open that will rename the critter animation files:

https://code.launchpad.net/~widelands-dev/widelands/critter_editor_categories/+merge/312967

When that is merged, our data file system should be consistent.


Busy indexing nil values

Top Quote
trimard
Avatar
Topic Opener
Joined: 2009-03-05, 22:40
Posts: 230
Ranking
Widelands-Forum-Junkie
Location: Paris
Posted at: 2016-12-10, 12:02

Perfect!

I think I will just make a big commit with all the modifications for name consistency + modification of the script. And we could wait for some older graphist to take a look before the merge?


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-12-10, 15:54

Sounds good to me. If you can't reach any of them in a few weeks, just go ahead with what you think is easiest to use.

Edited: 2016-12-10, 15:55

Busy indexing nil values

Top Quote
trimard
Avatar
Topic Opener
Joined: 2009-03-05, 22:40
Posts: 230
Ranking
Widelands-Forum-Junkie
Location: Paris
Posted at: 2017-01-08, 15:35

Ok, doing one big commit was an error. My branch is already a complete mess. I think I should do it step by step. From most important to least.

  • First fixing all the scripts in the blend files should be done systematically as I doubt the older graphists will disagree with this changes.

  • Second big commit is removing all the test blend files. That is to say the old versions of a model. It should stay in the repo. And it will be accessible in the history anyway, so why bother keeping them?

And finally I will do the more contestable commits:

  • First: Rename all the .blend file for consistency (like my hunter example)

  • Second: move all blender model in different scene when needed.

Yes, I know I could just commit all that before talking about it, but that way it forces me to actually do it..

I also have actual questions though:

  • Should I commit all these in the same personal branch or should I make a new branch for each commit?

  • Is bzr keeping track of the old .blend files so I can delete the old versions without worry?


Top Quote