Age | Commit message (Collapse) | Author |
|
I was careful in selectively rolling back revisions, but if you've committed changes unrelated to BPY mixed with BPY changes, I might have reverted those too, so please double check.
|
|
Patch [#7829] "compressfile" parameter for Blender.Set() from JMS
|
|
to fix the bug himself.
Tree From Curve,
- report error when nurbs or poly curves are used.
- don't throw errors when >4 branch's per segment are used. also try deal with this better. though no nice solution exists.
- default speed is 10x slower then before.
|
|
command line) - the initial undo state would be set to the default scene.
So holding Ctrl+Z would go back to the default .B.blend rather then the file that the user opened.
|
|
|
|
METH_VARARGS everywhere and getting the single args from the tuple.
Use METH_O where applicable.
|
|
theres no need to parse the value in Blender_Redraw since its done in the Window module.
|
|
(my fault) and in Effect module as well as a few others.
Also stopped using Py_BuildValue for strings, ints and floats.
|
|
----------
Replace extern declarations for IDProp types with header include.
|
|
* stopped bpy from importing automaticaly as decieded in the meeting.
* removed Blender.Main, since we agree it will be called bpy, renamed files also.
* updated epydocs from this and last commit.
* updated scripts to use bpy.*, and bugfix's for widgetwizard
|
|
|
|
----------
Support for new bpy.libraries module, which is being proposed to replace
the Blender.Library module.
|
|
packing 2400 rectanges is about 38x faster.
Use the C implimentation in uvcalc_lightmap and uvcalc_smart_project
Blender.c - filename returning None raises errors with existing scripts, just return "" so string functions on the filename dont raise an error.
|
|
applied. tested and this is how "filename" should work, so changed Blender.Get("filename") to return None instead of the last opened file.
|
|
|
|
|
|
----------
Removed prototype for recently-removed Blender_RemoveFakeuser().
|
|
Added option "Load Factory Settings" in the "File" menu.
With this, users don't have to remove .B.blend if they want to load the default data stored in Blender. Thanks Ton for ok'ing it and suggesting a better place in the menu (I had put it as "New (factory defaults)").
|
|
|
|
* moved to getseters (use new generic ID funcs)
* added 'reflect' attribute
Text.c
* moved to getseters (new generic ID funcs too)
NLA.c
* moved to getseters (ditto)
Ipo.c
* bugfix, allow nested loops on an IPO's curves.
Blender.c
* removed undocumented function RemoveFakeuser, since actions now have the fakeUser attribute.
|
|
python types can use.
removed a lot of code duplication when moving to this.
Also removed unused functions GetMaterialByName(), same for Mesh, Object, World etc.
|
|
|
|
Has a number of advantages over the existing method, described here.
http://wiki.blender.org/index.php/User:Ideasman42#Post_2.43_Update_to_the_Python_API
Only missing functionality is the ability to add new data through Base.scenes.new('name'), where scenes could be meshes, texts etc.
Other changes are minor,
Scene.h, bad var name in definition.
Text.c/h - moved the Python Struct into the header file, added BPy_Text_Check()
|
|
Turned out somehow I managed to miss adding the proper
type refs in Blender.Types for IDGroupType and IDArrayType,
which made the script not work. So, I've got it all fixed now.
Or at least hopefully :)
|
|
* added .iconTheme variable
* bugfix. drawType was not being saved because Py_BuildValue and __members__ was missing an "s"
* added Blender.Get('icondir')
|
|
----------
Bugfix for at least one annoying "DeprecationWarning: integer argument
expected, got float" followed by garbage printed to the console. The message
happens when PyArg_Parse() is called to parse an integer but is passed a
float. This happens in a few other places, bun unfortunately I can't fix
them all right now.
|
|
Updated id properties interface as per
discussed in python meeting. Basically,
id properties are now entirely accessed
through the dict-like interface if IDGroupType.
Also, tp_getsetters are used throughout the code
now.
Using the dict interface allowed for a major cleanup
of the wrapping code. The biggest change is that ID
properties are no longer wrapped in a structure with
.type .name and .data members; instead when you get
properties from the group it returns the direct value.
Ints, strings and floats return simple python types,
while arrays and groups return special wrappers though.
This means to detect the type of an ID property, you
have to use type(). For string and int types this is
easy; for group and array types (which of course have
their own wrappers) you use type() with Blender.IDGroupType
or Blender.IDArrayType.
Update of epydocs plus a temporary gui script will be
forthcoming; the gui script will be removed before release
as of course by then we'll have a built-in gui for id
properties.
|
|
This commit adds a new constant dict to the top Blender module
called PropertyTypes. This dict represents all the ID Property
constants: STRING, INT, FLOAT, ARRAY and GROUP.
Further python work, including epydocs, are forthcoming.
|
|
because the Blender.Set('curframe', i) called a update command that resulted in no viewable layers updating.
Made Blender.Set('curframe', i) do a
scene_update_for_newframe(G.scene, (1<<20) - 1);
removed 2 unused constants from Scene.c
|
|
The wait cursor was being called during editmode enter and exit for meshes.
This was a problem for several reasons. First of all, python modules like
Mesh now make use of editmode features. These methods that wrap editmode
tools may be called many times during the execution of a script
and lead to the wait cursor rapidly flickering on and off.
The other problem was that the wait cursor wasn't being called for editmode
enter and exit of all data types. This is unified now.
-New Arguments
enter_editmode() should be passed a nonzero integer or simply EM_WAITCURSOR
if the wait cursor is desired. Currently only the python API passes a '0'
to enter_editmode()
exit_editmode() has several options and they are passed in as the bitflags
EM_FREEDATA, EM_FREEUNDO and EM_WAITCURSOR. These flags are defined in
BDR_editobject.h.
|
|
Blender.Set('val', data), also added exception errors which were on the todo.
image.filename was being limited to FILE_MAXDIR rather then FILE_MAXDIR + FILE_MAXFILE when setting.
|
|
New API for accessing surface data (SurbNurb type). Right now it's hooked in
through the Curve API, since Curve.Get() doesn't differentiate between curves
and surfaces. If the curve object is 2D (pntsv > 1), the SurfNurb object is
created.
It is similar to the CurNurb type but not identical. There are only
attributes and no methods yet, and the only methods which will be added are
the non-getStuff/setStuff kind. Read the documentation to see how it works
(sorry, no examples yet).
This is a work in progress. Don't be surprised if the API changes some more.
|
|
epydoc links and updated BPyMesh NGon function
|
|
- Jean-Michel Soler updated the svg to obj module used by Paths
Importer (thanks!)
- user request: added option to control whether user prefers per face
(uv face select "TwoSided" toggle) or per mesh ("Double Sided") single /
double face info in ac3d exporter.
BPY:
- Blender_ShowHelp() was now crashing Blender when called for the
second time, due to EXPP_dict_set_item_str decrementing the reference
count of an object passed as argument to Blender_ShowHelp() (so not
owned by that function).
|
|
of the rt button for setting debugging levels.
|
|
New Constraint API. Constraints are accessible through a "constraints"
attribute in poses and objects. Would be REALLY NICE for armature users to
pound on this code.
|
|
http://projects.blender.org/tracker/?func=detail&atid=127&aid=3246&group_id=9
adds
Blender.c:
Blender.UnpackModes (dict with the unpack modes)
Blender.UnpackAll(mode)
Blender.PackAll()
Blender.CountPackedFiles()
Image.c:
image.packed (this was working)
image.pack()
image.unpack()
Sound.c:
sound.packed
sound.pack()
sound.unpack()
|
|
More Modifier API changes:
* add Blender.Modifier.Settings dict with constants for modifier types
* add mod.type attribute, which returns type of the Modifier
* add some internal consistency checks in ModSeq_remove
|
|
implicit declarations, redundant redeclarations, missing initializers,
nested externs and other cruft.
Cleaned up includes and moved extern _Type decls from Types.h into
Types.c since that is the only place where they are needed now.
Did not touch Ipo.[ch] since work is on-going there.
|
|
A header (BKE_Scene.h) was not included.
|
|
python functions access screen data. but at least Blender.sys.expandpath wont segfault anymore.
|
|
Blender.c python initialization creates a scene when in background mode and when there is no scene.
Needed to skip redrawing when in background mode because it depended on screen data that wasnt there.
|
|
https://projects.blender.org/tracker/index.php?func=detail&aid=3902&group_id=9&atid=125
|
|
The plans for the new Python API are too far off to have this module conform.
Needs testing with MSVC 6
|
|
scenes of Elephants Dream with the final ones: 1) adds removing Fakeusers from Actions to PyAPI, now with a hackish call in the Blender module. Possibility of better ways should be discussed on bf-python. 2) adds BPY Object.copyNLA(otherob) - that was simple 'cause the copy_nla function was nicely in kernel nla.c. 3) Object.convertActionToStrip(), here it gets tricky: the function to convert the active action of an object to a NLA strip was buried inside the respective function in the GUI editnla.c which had also code for reading mouse coordinates and whatnot. So I took the actual copying out of it and moved it to the kernel nla.c as a new function, bActionStrip *convert_action_to_strip (Object *ob). that code used other functions, of which find_stridechannel() was also in editnla.c but free of UI code so i moved it to kernel too. kept things with UI code in editnla.c. tried to be careful with keeping mallocs and the pointer business intact, and tested that this works and after usage Blender gives no memory warnings or anything, so seems ok - but certainly is best reviewed by ppl more active with c coding than me. hopefully this little refactor makes it possible to add this function to the menus too, which was not straightforward earlier when Matt took a look at it.
|
|
|
|
PyDict_SetItemString() with objects that were not properly decrefed
afterwards. Due to the number of places this was used, I added a
wrapper EXPP_dict_set_item_str() to gen_utils.c to handle it.
This started as a scriptlink bug, due to how many times scripts were
being executed I think it just magnified how bad the memory leak in
BPy was. Animating the blend attached with this bug report would cause
memory to grow by about 3MB for every 280 frames. After the patch,
memory did not appear to grow at all (or at least not noticably using
Unix's ps and top utils).
Since many of the PyDict_SetItemString() calls were in initialization
modules I think my tests executed most of the changed code, but would
appreciate script users really giving feedback.
|
|
It was calling PyModule_AddObject() with unassigned pointer. Crashed on
exit here (python 2.3.2). Weird thing was that python 2.3.5 didnt complain
CVSr ----------------------------------------------------------------------
|
|
|
|
- #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).
|