New scripts:
- hotkeys, obdatacopier and renameobjectbyblock, all from Jean-Michel Soler (jms); - bevel_center by Loic Berthe, suggested for inclusion by jms; - doc_browser, by Daniel Dunbar (Zr) Thanks to them for the new contributions! (I included doc_browser at 'Misc' because only users interested in script writing would actually use it, but it could also be under 'Help'. Opinions?) BPython related: - Added scriptlink methods to object, lamp, camera and world. - Object: added object.makeTrack and object.clearTrack (old track method). - sys: made sys.exists(path) return 0 for not found; 1 for file, 2 for dir and -1 for neither. - doc updates and fixes. - made ONLOAD event work. G.f's SCENESCRIPT bit was being zeroed in set_app_data. - Blender: updated functions Load and Save to support the builtin importers and exporters besides .blend (dxf, videoscape, vrml 1.0, stl, ...) - Draw: added mouse wheel events. - Scene: added scene.play to play back animations (like ALT+A and SHIFT+ALT+A). Makes a good counter, too, when the 'win' attribute is set to a space that doesn't "animate". The scene.play() addition and the fix to ONLOAD scriptlinks is part of the work for a Blender demo mode. It already works, but I'll still add support for Radiosity calculations and fix a thing in main(): it executes onload scripts too early (BIF_Init), giving funny results in alt+a animations and renderings when firing up Blender. Loading after the program is up has no such problems. When I finish I'll post examples of demo mode scripts.
This commit is contained in:
		| @@ -3,7 +3,7 @@ | ||||
| """ | ||||
| The Blender.Scene submodule. | ||||
|  | ||||
| B{New}: scriptLink methods: L{Scene.getScriptLinks}, ... | ||||
| B{New}: L{Scene.play}, scriptLink methods: L{Scene.getScriptLinks}, ... | ||||
|  | ||||
| Scene | ||||
| ===== | ||||
| @@ -219,3 +219,24 @@ class Scene: | ||||
|     @type event: string | ||||
|     @param event: "FrameChanged", "OnLoad" or "Redraw". | ||||
|     """ | ||||
|  | ||||
|   def play (mode = 0, win = '<VIEW3D>'): | ||||
|     """ | ||||
|     Play a realtime animation.  This is the "Play Back Animation" function in | ||||
|     Blender, different from playing a sequence of rendered images (for that | ||||
|     check L{Render.RenderData.play}). | ||||
|     @type mode: int | ||||
|     @param mode: controls playing: | ||||
|         - 0: keep playing in the biggest 'win' window; | ||||
|         - 1: keep playing in all 'win', VIEW3D and SEQ windows; | ||||
|         - 2: play once in the biggest VIEW3D; | ||||
|         - 3: play once in all 'win', VIEW3D and SEQ windows. | ||||
|     @type win: int | ||||
|     @param win: window type, see L{Window.Types}.  Only some of them are | ||||
|         meaningful here: VIEW3D, SEQ, IPO, ACTION, NLA, SOUND.  But the others | ||||
|         are also accepted, since this function can be used simply as an | ||||
|         interruptible timer.  If 'win' is not visible or invalid, VIEW3D is | ||||
|         tried, then any bigger visible window. | ||||
|     @rtype: bool | ||||
|     @return: 0 on normal exit or 1 when play back is canceled by user input. | ||||
|     """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user