Commit Graph

13 Commits

Author SHA1 Message Date
0737153338 BPython:
-- applied patch by Michael Reimpell that lets scripts registration info be either commented out or not (commented, it doesn't interfere with Python documentation tools.  The patch also fixes potential overflows, thanks (and sorry for the confusion) again, Michael.
-- fixed NMesh_hasFaceUV, it was returning true for false and vice-versa.  Reported by Jonas Petersen with patch, thanks.
-- added 'homedir' and 'uscriptsdir' to Blender.Get() to get Blender's home dir and the user defined scripts dir.
-- related to the above doc updates.
2004-11-02 05:13:52 +00:00
fa9135385a BPython:
- Blender.Window: added function GetPerspMatrix() (Tom Musgrave's patch, thanks);
- added Chris Want's patch to tell argc, argv to the Python interpreter (thanks, Hos);
- Blender.Image: added image.glFree() to free textures bound by the recently added
  image.glLoad() (both suggested by Campbell Barton -- thanks, with these Blender can
  be used to load textures for scripts);
- Blender.Sound: removed for now at least a few get/set methods of vars that can't be
  accessed via interface;
- renamed Get/makeActive to Get/setCurrent in Blender.World (actually added alias for
  now), same in Blender.Sound: renamed makeActive to setCurrent.  Stephen Swaney
  pointed this some weeks ago, we should stick to one naming convention.
- added documentation for Sound and Window.Theme modules and the other added
  functions, made other small updates.
- Blender.Object: made 'worldspace' become the default output of .getMatrix and .mat/.matrix:
  after reading a discussion on blender.org's Python forum where eeshlo mentioned the
  pre 2.34 default was worldspace, I took a better look at Blender's relevant code,
  confirmed, talked to Theeth about this and as he suggested am changing the default
  back to 'worldspace'.
2004-10-20 05:51:24 +00:00
446e1fae7c ** Note: two new files added, projectfiles will need an update.
Scripts:
  Campbell Barton (Ideasman, thanks) updated his Wavefront OBJ importer.
BPython:
- Finally committed pending contributions:
    Chris Keith wrote the Blender.Sound module -- still some testing to do this week;
    Joseph (joeedh) added the OnLoad scene script event;
    Satish Goda added 6 GLU functions to Blender.BGL.  Great additions, thanks all!
- Small changes to Blender.Load (leave editmode as Blender wants) and Window.EditMode (allow definition of "undo string");
- Fixed bug #1539: Window.RedrawAll() crashed Blender if an empty spacescript was available while using it in a gui-less script.
- doc updates.
2004-08-17 04:26:00 +00:00
c50e3f374f BPython:
- new submodule Scene.Radio, for radiosity: still incomplete, but in shape for demos, updated SConscript to include it;
- new functions in Window module;
- doc updates: adding a todo file and a new start page for our docs: API_intro.py + other updates;
- small fix in Ipo.c provided by Damien McGuinnes (thanks!): Nathan has a patch with IPO additions and fixes for this and more, but until it is committed, there's this fix for Ipo.getCurve('LocX'), LocY, Z and QuatW,X,Y,Z too, according to Damien.

Other files:
- radpreprocess.c: added check for "during_script()" so eventual msgs don't popup during scripts;
- drawmesh.c: made a pointer (display list) be checked before accessed, fixes crash in scripts that forget to update display lists for subsurf meshes when a 3d view is in textured view mode.

Script: updated bevel_center by Loic Berthe.
2004-07-25 16:55:45 +00:00
7b3b3ae432 Trying to fix bug reported by Peter den Bak and Meino Christian Cramer (thanks!):
-- splash screen disappeared (duh, I did that!) and Blender quits upon exiting from some 225 games:

It was troublesome to find how to run demos in general with the screen correctly redrawn before they started, etc.  Ended up making the above error in screenmain().  About the games, I don't have them and will need some time to get the files for testing, but I'll do it, though only on linux.

BPython:
-- Window: added GetScreens, SetScreen and improved GetScreenInfo.
-- Object, NMesh: updated (added in NMesh) method getMaterials to return either only valid materials as before or also empty slots (as None).  This previous omission can be considered a bug, since it made info about materials incomplete / incompatible with face mat indices.  Thanks Yann Vernier for bringing this up and sending/proposing a patch that also fixed a bug related to assigning lists of materials with different lengths to obj and its mesh. setMaterials also accepts Py_None entries now, which become empty slots in Blender.
-- doc updates.
2004-07-20 08:16:46 +00:00
97bba404fb Demo mode and BPython:
- small additions and fixes to enable the demo mode;

- Added sleep() to Blender.sys and 17 new functions to Blender.Window module:
    things to help demo script writing and as a bonus read / write access to Blender's input event queue;

- updates in docs, those interested please check Window.py in python/api2_2x/doc/ to read about the new Blender.Window functions.

----

Demo mode should be working well now for (I) playing rt animation -- aka ALT+A -- and (II) rendering pics and anims and playing anims.  I'll still add access to radiosity data and functions.

PS: Joseph Gilbert made (II) possible with the Scene.Render module he added for 2.32.  He's been coding great things for bpython, so I'd like to take the chance to point that and thank him here.
2004-07-16 03:08:43 +00:00
9282827720 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.
2004-07-03 05:17:04 +00:00
149fad4be6 BPython: cleaning some bug tracker entries:
(excuse me for doing all in a single commit, but they are tiny
fixes and it's bpython, that dark corner ...)

#1025 - FileSelector SEGV on dynamic callback Category:

  Can't reproduce with current cvs, I'd say recent changes to fix
another crash related to FileSelector in gui-less scripts solved this
one, too.

#1028 - Reserved button event number:

  Menu choices generate two events, one extra related to the menu
itself, with value=4.  Made bpython ignore this extra event.

#1068 - FileSelector No file extension support:

  As Ton wrote there, Blender itself doesn't support this yet.  But the
requester also wanted Window.File/ImageSelector to accept a pathname.  Done.  Also updated doc.

#959 - Segfault on background rendering:

  This happened in bg mode (blender -b filename -a, for example) when
a script with the line "Blender.Redraw()" was linked to FRAMECHANGED events.  As reported in the bug page, it was because curarea is NULL in bg mode.  Made Redraw() check for this and not call functions that expected curarea in Redraw, like one to swap buffers.

#1072 - Blender.Redraw() Segfault:

  Good catch : ). Scripts called from the scripts win that called
Blender.Redraw() or Blender.Window.Redraw() would crash Blender because of a dirty pointer in Spacescript->script.  Fixed.
2004-04-11 04:41:33 +00:00
775f006bf1 Exppython:
- Window: implemented .SetCursorPos, .GetViewMatrix, .GetViewVector
- Lamp: .setDist was not in the methods table:
    Fix by new bpython developer Stephen Swaney
- Scene: .frameSettings was crashing Blender (pointed by jms)
- Added site dirs to sys.path (patch by Stephen Swaney)
- NMesh: small internal change (added pointer to parent object)
- Object: function NMesh_FromPyObject has a new arg: pointer to obj
- Docs: added docs for implemented functions, plus some more info
2003-09-18 00:54:43 +00:00
65746ab10a Exppython:
- Updated two doc files
2003-09-03 04:04:17 +00:00
de60889865 Exppython docs:
- Updates and fixes to the documentation files, only, no code involved.
2003-07-22 00:27:03 +00:00
c467b19c75 Exppython:
- More documentation files for epydoc.
- Few minor changes in other files.
2003-07-12 18:02:54 +00:00
eaf1cdd383 - More renaming all around to follow our conventions
- Implemented partially Blender.Sys
- Worked on issues related to sys, path
- Took away most "debug" printfs
2003-06-28 07:38:21 +00:00