Age | Commit message (Collapse) | Author |
|
- update for the old mathutils rewrite
- update for some other methods ive added
- added explaination of wrapped data
- added a .css file for epydoc gives nice blender/python colors :?
|
|
-- add Key module to index page
-- include cross references for Object.colbits in material descriptions
within Object, NMesh and Mesh modules
|
|
A large chunk of documentation goodness from Campbell Barton (ideasman).
Thanks!
Note that any mispellings, errors, or inconsistencies are due to
my ham-fisted editing.
|
|
- #2781, reported by Ed Blake: crash on undo when there were active space handlers. Space Handler script links belong to screen areas, which do not get saved on undo. Thanks Ton for pointing out the function that restores ui pointers gone bad.
- Applied patch #2822 by Ken Hughes for bug #2647 ("Setting a Face UV"), reported by Campbell Barton.
- #3022, reported by Timothy Wakeham: "Blender.BGL.glDrawPixels crashes when drawing more pixels then buffer size". Made glDrawPixels check buffer dimensions.
- #2882, reported by Campbell: crash in nmesh.getMaterials(arg == 0 or 1) when nmesh came from GetRawFromMesh(). Raw nmeshes are not linked to Blender meshes, so the method doesn't support these options (getting mat info from the actual mesh) for it.
- #2817, reported by Tod Koeckeritz: Dir_Depth var was not being decremented in BPY_Menus.c, causing dir depth limits to be reached prematurely.
- #2954, reported by Daniel Holtz: "Python scripts crash hard with valid windows paths". Blender.Load() was not meant for background mode, now it's been update to support it, using BKE_read_file instead of BIF_read_file in this case. Also found another issue with command line scripts using Blender.Load() that could crash Blender: trying to free the Text when it wasn't available anymore (loading a new .blend already removed it). There are still issues with one case, though, causing a crash on start or "Memoryblock winopen: double free" at end, when running a script that is already a Blender Text (only if the script calls Blender.Load, of course). Will investigate.
- #2897: reported by Timothy Wakeham: object.setMaterials was asking the length of a Python list w/o confirming first if the passed obj was really a list.
Thanks all for the help and for being patient (long delay, again).
|
|
- Pontus Lidman contributed a new module: Blender.Key + access to key objects from NMesh, Lattice and Curve + docs (thanks and sorry for taking so long to check/commit the patch!)
- Allowing EVENT spacehandlers to call the file selector (scriptlinks in general are not allowed, but this special case should be able to). Requested by Paolo Colombo (thanks!)
- tiny doc update (Ken Hughes pointed an error in the space handlers example)
I didn't have time to update the Key module to follow the current bpython design, will do that later and also test it better than I did.
|
|
Blender.NMesh.GetRawFromObject through a displist conversion method as used by
Blender when converting them in the UI.
Notes: Objects with only edges (3D curves/polyline without bevel) do not have
normals, so they are all initialised to (1, 0, 0) on conversion
Converting from meta objects only work on the "mother ball". That is,
the object with the lower base name.
Example: "meta" for all the "meta.*" objects.
Meshes extracted from curve based objects (Font/2D filled curves)
contain both the filled surfaces and the outlines of the shapes.
Materials are taken from the object's material list. Material handling
in NMesh is incorrect anyway, as it always uses the materials from the
mesh, ignoring the setting in ob->colbits.
This patch also makes the include order a little clearer.
A couple of warnings have been fixed by using better types:
- Using char instead of short when parsing color values.
The "constructor" expects and uses char anyway.
- Explicit casting to short when storing normals back in mvert.
- Changing constant doubles to floats with "f" to make compiler happy.
The only warning left regards NMFace.flag which is stored as a short but is
used to fill in TFace.flag which is a char. I didn't want to change the
object's structure so I left it like that. I didn't add an explicit cast when
putting it back in TFace so that the warning can remind us that there might be
something to change there.
|
|
no executable code.
Martin noticed many of our bpy instance variables were
incorrectly marked as class variables in the doc. This
commit essentially changes the title of sections of the doc
from Class Variables to Instance Variables. Now that we are
adding class or module dictionaries for constants, etc. this is
a distinction worth making. Plus it is right.
|
|
(excuse me for not committing earlier)
Patches by Ken Hughes (thanks for all bug fixes!):
1) Setting a scene's MapOld and MapNew values in python does nothing:
bug #2566 submitted by Dominic Agoro-Ombaka (dmao):
https://projects.blender.org/tracker/?func=detail&aid=2566&group_id=9&atid=125
patch #2571:
https://projects.blender.org/tracker/index.php?func=detail&aid=2571&group_id=9&atid=127
2) Calling the file selector after setting the progress bar crashes Blender:
bug #2418 submitted by Alessandro Garosi (brandano):
https://projects.blender.org/tracker/?func=detail&aid=2418&group_id=9&atid=125
patch #2568:
https://projects.blender.org/tracker/index.php?func=detail&aid=2568&group_id=9&atid=127
3) Menus always generate same event when canceled:
bug #2429 submitted by Campbell Barton:
https://projects.blender.org/tracker/?func=detail&aid=2429&group_id=9&atid=125
patch #2579:
https://projects.blender.org/tracker/?func=detail&aid=2579&group_id=9&atid=127
4) Add a vertex to a mesh with groups using a script and then edit that mesh hangs blender:
bug #2211 reported by German Alonso Tamayo (servivo):
https://projects.blender.org/tracker/index.php?func=detail&aid=2211&group_id=9&atid=125
patch #2580
#https://projects.blender.org/tracker/index.php?func=detail&aid=2580&group_id=9&atid=127
About bug #2033, I'm still looking at it, committing a small fix now.
=====
Patches by Campbell Barton (thanks!):
#2482: BGL pydocs fix broken links
https://projects.blender.org/tracker/index.php?func=detail&aid=2482&group_id=9&atid=127
#2426: Large text in Draw.Text and Draw.GetStreingWidth
https://projects.blender.org/tracker/index.php?func=detail&aid=2462&group_id=9&atid=127
#2521: scene.getActiveObject()
https://projects.blender.org/tracker/index.php?func=detail&aid=2521&group_id=9&atid=127
#2523: NMesh.GetNames()
https://projects.blender.org/tracker/index.php?func=detail&aid=2523&group_id=9&atid=127
- docs also updated
|
|
had description for recalc_normals backward.
|
|
- based on a request by Campbell (he also provided a patch for scene.Layer) access to layers was improved a little, keeping the old method (ob.Layers is a bitmask) and adding the nicer one (ob.layers is a list of ints). Done for objects and scenes. House-cleaning: .Layer was renamed to .Layers (actually just using strncmp instead of strcmp, so both work, same done for Window.ViewLayers).
- finally committing patch by Ken Hughes to let .clearScriptLinks() accept a parameter (list of strings) to clear only specified texts.
- doc updates and fixes (JMS reported a problem in nmesh.transform() example code).
Thanks all who contributed.
|
|
release/scripts/bpydata/
It seemed trivial enough, so I updated all systems (makefiles, xcode, scons, scons win installer), please complain if something went wrong. Mostly it was just removing release/bpydata references, since the release/scripts dir is already worked on recursevely, handling dirs inside it.
For the scons nsi file writer script I had to write code for each new dir, but it can be recoded recursively, too (in fact joining all release stuff in a single dir tree with nothing else would be a good idea, making installation code simpler). Since it's just python and I have a little more time now, I can help scons managers if they still need.
Thanks Campbell Barton for reporting.
|
|
- Scripts:
fixed error in "Save Current Theme" which prevented it from automatically updating script registration in menus.
cosmetic changes in a couple of Campbell's sel_same.py script strings + more descriptive name for its new menu place (3d view, face mode -> select menu).
small updates to help_browser.py script.
The above changes are related to this:
- Added new script menu entries: Render (for exporters to renderers), Themes, FaceSelect (this already at the proper place). Updated Scripts win->Scripts menu so it won't show all available entries, only the ones we mean to see there.
- Updated menu registration so that scripts folders can become trees. The release/scripts/ dir should be updated soon with subdirs like converters/, modifiers/, generators/ or whatever -- better discuss first (or is it? /me afraid of long irc discussions during meetings :) ).
- Modules:
Blender: added 'udatadir' option to .Get() function and added var Blender.mode to tell if Blender is in bg or interactive mode.
NMesh: added Campbell's nmesh.transform(matrix, recalc_normals = False) method (reworked, so my fault if it doesn't work).
- Bugs fixed:
#2123: http://projects.blender.org/tracker/?func=detail&atid=125&aid=2123&group_id=9
Reported by Ken Hughes (thanks!), who also found the exact problem later (it was in Text.Load, not with script links -- if only I had checked emails these days ... lost > 1 hour today to find the problem: passed filename to M_Text_Load was later being written over by a function called by add_text). Also saw that Text.Load wasn't checking existence of passed filename (duh!), now it does.
#1655: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1655&group_id=9
Reported by Chris Want (thanks!): command line "blender -P script" not working properly for bg mode ("blender -b blendfile -P script").
Had to make some small updates to get it working (bg mode for scripts was never explicitely handled, it worked due to collateral effects, let's say), interested readers can check the report after I update it or the API_intro.py doc file. After more testing we can make further updates. Updated many places to not call redraws if in bg mode, now it is officially available. Blender outputs its own info when rendering in bg mode, if that is considered a nuissance we'll have to add a few "if (during_script())" calls outside bpython.
- Removed a few warnings here and there and also updated docs.
|
|
- Gert de Roost reported an inconsistency between nmesh.getMode and .setMode. Now .setMode() optionally accepts an int value, as returned by getMode().
- Campbell Barton pointed that object.getData(name_only=True) was by mistake returning the obj name, not the obdata name, as it should. Fixed now.
- small doc updates
Thanks both for the reports.
|
|
Corrections and useful user-oriented hints.
|
|
- NMesh: made nmesh.update accept an optional 'vertex_shade' param to init vcols with shading info, like when you enter vpaint mode or press the relevant "make" button for a mesh without vcols. This is still a test, the functionality was requested by Manuel Bastioni for the SSS script they are working on:
http://www.dedalo-3d.com/index.php?filename=SXCOL/makehuman/articles/subsurface_scattering_in_python.html
- sys: made makename() accept files with max FILE_MAXDIR+FILE_MAXFILE name length, should fix #2192. Was only FILE_MAXFILE, a mistake;
- Image: added .setFilename(), contributed by Campbell Barton;
- Camera: added camera.get/setScale for the new param added by Ton for ortho cameras. Requested by Jean-Michel Soler for the Texture Baker script;
- related doc updates.
|
|
- NMesh: added face.sel and face.hide attributes to NMFaces, to set / get selection and visibility state of faces as they appear in edit mode.
- doc updates, including the right fix to two edge related methods, thanks to Stephane Soppera for pointing it (my fault, Stephane).
|
|
- Fix related to bug #2157: crash in Blender.Image.image.reload() method. "G.sima" was not being checked for validity. Fix by Joilnen B. Leite (pidhash). Thanks!
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2157&group_id=9
- Added optional argument to Blender.Object.object.getData() method: getData(only_name = True) or (only_name = 1) or (1) will return only the obdata name, not a wrapper for the given struct. This is a test based on a request by Campbell Barton who submitted code for his proposed .getDataName() method (thanks!).
- doc updates and small fixes.
|
|
- Stephane Soppera added long missed support for edge data in Blender.NMesh + related doc;
- Michael Reimpell improved script registration (fixes bug report #2160) and the file and image selectors in Blender.Window (improved with suggestions from Yann Vernier). They now suppport methods as callbacks;
- World.get/setMode were not registered, so could not be directly called (reported by Ken Hughes). Still needs some work to improve things, including docs.
Scripts:
- Jean-Michel Soler updated his texture baker based on input from Appolux;
- Campbell and Jean-Michel improved the bvh importer: faster, better float units scaling (by Campbell); supports Poser 3.01 files (by jms).
Thanks guys!
|
|
- fixed bug #1882: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1882&group_id=9
Crash / hang when changing meshes that had edge data. The mesh->totedge value was not being set to 0. Reported by jms, thanks.
- fixed bug #1780: https://projects.blender.org/tracker/index.php?func=detail&aid=1780&group_id=9&atid=125.
Deleting a Text that was being used as script link crashed Blender. Added a check to unlink the Text from eventual script links when it gets removed. Reported by kaito, thanks.
- doc updates (one related to bug #1807: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1807&group_id=9 , actually a little misleading word in the NMesh doc: you can get the subsurfed mesh with NMesh.GetRawFromObject, but it's the display subdivision level that counts).
|
|
- Campbell Barton updated his sel_same.py script;
- Added to Mesh scripts a call to Window.EditMode(0) to leave editmode before changing meshes.
BPython:
- small doc fixes / updates;
- added a call to undo_push_mesh inside Window.EditMode(0).
Mesh scripts could change the mesh but not the editmesh -- that would then overwrite the changed mesh. Made all mesh scripts leave edit mode before changing a mesh.
|
|
- Ben Omari sent an update version of his DirectX8.py, Jean-Michel Soler updated his disp_paint.py and Campbell Barton contributed a new one: sel_same.py (for now it's in the UV menu). Thanks all, great scripts;
- small updates in some other scripts.
BPython:
- Finished wrapping radiosity functions for the Radio submodule;
- doc updates.
|
|
- 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.
|
|
(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.
|
|
- Added function Blender.Save(filename) to save .blend files.
- Added scriptlink-related methods (get, clear, add) to Scene and Materials. Will still add method remove and add these methods to World, Object, Camera and Lamp.
- Updates and small fixes in docs.
|
|
Added more detail for method return types in various doc files.
Changed version number in epy_docgen.sh to BPY_API_232.
|
|
- now the file .Bpymenus is in ~/.blender/, please delete the old one
- both ~/.blender/scripts/ and (if set) user pref scripts dir are scanned for scripts
- 2 scripts of the same group with the same name, one in each dir: user pref overwrites the other's entry
- fixed the problem with trailing backslash, was my fault (used NULL instead of "/" for relbase in BLI_make_file_string
- slightly changed msgs to be less verbose and parsing to be more forgiving
- if a script registers with a wrong group, 'Misc' is used instead
- 'Blender' tag is now checked, gives a warning (notice) msg if script is newer than Blender program
Blender.NMesh module and doc:
- added vertex.sel var to get/set selection state of vertex.
|
|
|
|
- Fixed uninitialized NMFace.mode var in NMesh.c
- Incref'ed a couple Py_None's in Object.c
- Minor update in the docs, changed required version to 2.30
|
|
- Small fix in NMesh.c
- Updates to ipo related methods in Camera, World and Material
- Doc updates
|
|
- Added "Radio" to Material modes
- Fixed bug in bone.getParent (bug report on blender.org py forum)
- Added more types to object.shareFrom (method to share obdata)
- Added nmesh.get/setMaxSmoothAngle and nmesh.get/setSubDivLevels
- Updated NMesh doc
|
|
|
|
|
|
|
|
- Object: implemented getBoundBox and makeDisplayList methods
- NMesh and Object: small internal changes for nicer behavior
- Draw: added function PupMenu
- Docs: updated for the additions above
Auto build tiny fix: added the imbuf include dir to source/creator/Makefile.am
|
|
- 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
|
|
- Updated two doc files
|
|
changed "get_ipo(key, ..." to "get_ipo((ID *)key, ..." in line 107.
* changed insert_meshkey(Mesh *me) to insert_meshkey(Mesh *me, short offline):
To call this function from a script, so that it doesn't pop the
"relative / absolute" dialog window when the "offline" arg is non-zero.
Exppython:
* NMesh module:
- Added method NMesh.addMaterial(mat) to the NMesh module:
alternative safer (aka slower) way to add materials.
- Added optional arg to NMesh_update():
if given and equal to 1, the mesh normals are recalculated.
- Fixed NMesh.getVertexInfluences: it was segfaulting when a NULL bone was
linked to the vertex. Thanks to Jiba on the bf-python mailing list for
bug report and sample .blend file. Also made this method give an IndexError
when the vertex index is out of range.
* Material module:
Added specR, specG, specB vars for compatibility with the 2.25 API.
Pointed by Manuel Bastioni.
* Image module:
Exposed image width, height and depth parameters.
From a suggestion by jms.
* BPython Ref Doc:
- Small updates to reflect the above additions.
- Added info for the Bone type in the Armature doc.
|
|
Fixing a small comment in the nmesh doc, to avoid confusion.
|
|
- Updates and fixes to the documentation files, only, no code involved.
|
|
- Added a very brief intro to the api doc and updated the command to generate
the documentation (it's in a comment in Blender.py). Improved the NMesh ex.
|
|
- "last minute" updates to documentation and two modules.
|
|
- More documentation files for epydoc.
- Few minor changes in other files.
|