Python script compatibility with blender 2.5

Bug #571784 reported by Chuck Wilder
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Widelands media development
Fix Released
Medium
Kiscsirke

Bug Description

I'm not sure if this is the right place for this, but:

Syntax and execution failures are encountered in the Windows version of the new blender release 2.5 Alpha2 when running the masking and rendering scripts from our current templates.

I have not yet tried the linux release.

Related branches

Revision history for this message
SirVer (sirver) wrote :

the scripts are python2.5 compatible, but likely the internal python api of blender has changed in the jump to 2.5. I am unsure if scripts can be held compatible between the two versions; this depends if the blender version can be queried from python.

Revision history for this message
SirVer (sirver) wrote :

also, the error outputs/warnings would be most useful. Is there a way to get these?

Revision history for this message
Chuck Wilder (chuckw20) wrote :
Revision history for this message
Chuck Wilder (chuckw20) wrote :
Revision history for this message
SirVer (sirver) wrote :

okay, I just looked this up. Blender 2.5 uses Python 3 which indeed will need some changes to the scripts. More severe is that the internal Blender Python API has changed completely, it should be possible to write scripts that are compatible for all both blender version, but it might be cumbersome.
[1] is the reference for the new API.

Which scripts will need to be changed? Are all scripts linked or are some also embedded?

[1] http://www.blender.org/documentation/250PythonDoc/

Changed in widelands-media:
status: New → Incomplete
Revision history for this message
kingcreole (gerrit-familiegrosskopf) wrote :

blender 2.5 is getting out of beta state maybe next month or the month after that, who can help? are there developers, able to write those scripts in python 3? i don´t think i would need those 2.49b scripts anymore once the 2.5x scripts would work...

Revision history for this message
SirVer (sirver) wrote :

currently the blender 2.5 python API is marked as beta and subject to change. This is no situation to base production work on. For the moment relying on blender 2.5 is a no go for widelands. If anythinng, a branch with ported scripts could be started, this would make the transition to blender 2.5 in the future also easier. But keeping two sets of scripts in sync is something that I do not want to blow my time on.

Revision history for this message
Kiscsirke (csirkeee) wrote :
Revision history for this message
Chuck Wilder (chuckw20) wrote :

The discussion becomes Blender 2.57 specific and continues in the Graphics Forum at:
http://wl.widelands.org/forum/topic/728/

Revision history for this message
Chuck Wilder (chuckw20) wrote :

@ Kiscsirke - The script you created and posted in branch lp:~csirkeee/widelands-media/blender_25 does a great job with the rendering and I especially like the ability to access it via the pulldown in the Render Editor. Nice touch!

A couple observations:
The menu.py script we use in Blender 2.49 creates the rendered files starting with an index of "00". I don't know if the application code in the game expects this, but I would guess it does in some cases. Could your script for v2.5 be enhanced to name the files with a starting index of "00" and increment the file names from there regardless of the starting animation frame number?

Another feature of the old script that I would like to see made available for 2.5 is the ability to move the camera easily from one preset compass point to another without rendering and without the need to manually adjust the camera position. I use this religiously to check if the animation will stay within the boundaries of the MainView because I often find that for some animations a slight adjustment to the scale or dimensions of the frame are required to avoid clipping at certain angles.

Some progress indicator during rendering would be nice to have, too. :)

Thank you for your expertise in this matter!

Kiscsirke (csirkeee)
Changed in widelands-media:
status: Incomplete → In Progress
assignee: nobody → Kiscsirke (csirkeee)
Chuck Wilder (chuckw20)
Changed in widelands-media:
importance: Undecided → Medium
Revision history for this message
Chuck Wilder (chuckw20) wrote :

András (Kiscsirke) has updated the rendering scripts and converted virtually all of the blender files for use in/by Blender2.5+.
I've packed some missing texture files into a few atlantean models.

There are still a few models that the conversion script had to bypass because of similar missing textures. These, however, I feel can be addressed as opportunities arise and will not hinder the implementation of the new formats of Blender2.5+.

Therefor, I will merge the converted files into the media branch and post a note here when it has been accomplished.

We owe a TREMENDOUS vote of thanks to András for his superlative work in this matter. We are now postured to utilize the very latest functionality available to us in Blender.

Revision history for this message
Chuck Wilder (chuckw20) wrote :

The conversion has been pushed to the media branch in rev# 174

Changed in widelands-media:
status: In Progress → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Wow! That was a bunch of work! Congrats media-team, that is a fantastic achievement and moves us forward quite a bit!

Revision history for this message
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands-media:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.