Commit Graph

1591 Commits

Author SHA1 Message Date
8975e34439 == PyConstraints - 2 Fixes ==
* Error print for getSettings was lacking a newline
* When adding a PyConstraint using Ctrl-Alt-C, the script is now queried to find out whether it uses a target.
2007-06-20 09:58:16 +00:00
d6330266f2 changed floating point values in python to display one more decimal place- BMAE script needed to display more (as it worked with 2.41) and it seems resionable to add. 2007-06-19 18:40:17 +00:00
25ec0533a9 == PyConstraints - BPy API Access ==
The BPy Access to PyConstraints. I have not implemented the setter for the PyC-ID-Properties access as I'm not too sure how this should be done.

Also fixed a few typos in the py-docs for the Limit Scale constraint.
2007-06-18 10:39:50 +00:00
01e8789f3f == PyConstraints ==
At last! The ability to code constraints in Python. This opens up many interesting rigging possibilities, as well as making prototyping constraints easier.

* A PyConstraint script must begin with the line 
#BPYCONSTRAINT
* It must also define a doConstraint function, which performs the core actions of the constraint.
* PyConstraints use IDProperties to store custom properties for each PyConstraint instance. The scripter can choose which of these ID-Properties to expose to a user to control the behaviour of the constraint. This must be done using the Draw.PupBlock method.

Credits to Joe Eager (joeedh) for coding the original patch on which this is based. I've made heavy revisions to large parts of the patch.

For more detailed information, and some demo scripts, see the following page:
http://aligorith.googlepages.com/pyconstraints2
2007-06-18 07:41:21 +00:00
770291b9ea missing decref.. win Window.RedrawAll() pointed out by ken 2007-06-16 13:57:39 +00:00
84749aa3ff Python API, more METH_VARARGS to METH_O 2007-06-16 13:17:41 +00:00
Ken Hughes
3e490c0203 Fix a Python memory leak with the armature weakref code. setup_armature_weakrefs() wasnt't deallocating the old list, instead just adding a new one to the dictionary. 2007-06-16 13:01:10 +00:00
39a526a963 Python PyMethodDef supports single argument methods (METH_O) but was using METH_VARARGS everywhere and getting the single args from the tuple.
Use METH_O where applicable.
2007-06-16 12:24:41 +00:00
82eab51a29 fix own error - EXPP_getScriptLinks, was returning an unset list. 2007-06-12 05:17:35 +00:00
3db1a55b2d added an optional window ID arg to Window.ViewLayers so you can set the layer for each viewport. 2007-06-08 15:41:31 +00:00
25baab252c yafray settings access from Py API 2007-06-06 19:12:07 +00:00
d01d36ddd6 Another bug found thanks to Coverity.
typo was indexing past last element in an array.

Kent
2007-06-05 15:11:39 +00:00
ba958bea0f -> Custom Properties for Mesh entities
In order to give import/export script authors the ability to add properties
to inidividual faces, vertices and edges in the same manner as they are able
to do with ID structures three new custom data types have been added to blender
for floats, integers and strings.

Things to note:

-Since property Layers are custom data, they are added to all verts, edges 
 or faces at once.
-Only one property layer for each unique property name may exist. In  other 
 words, you cannot have a float layer as well as an integer layer
 both with the same name.
-No user interface for this exists at the moment.

The following methods and attributes have been added to the Blender.Mesh
Python module and it's object types:

->MVert/Edge/FaceSeq:
	addPropertyLayer(name, type)
	removePropertyLayer(name)
	renamePropertyLayer(original name, new name)
	properties(readonly list.)

->MVert/Edge/Face
	getProperty(name)
	setProperty(name, value)

->Mesh module
	PropertyTypes (readonly dictionary)
2007-06-04 19:18:19 +00:00
f368b60baf OBJ smooting groups exported enabled for by default for the first smooth group (should have been disabled)
gen_library.c - Own error, hashing did not decref the tuple it created.
Draw.c - callback also missed a decref
2007-06-04 08:15:27 +00:00
f579a66d7b made change to NMesh decrefing suggested by theeth, and added 2 more missing decrefs in new_NMFace 2007-06-02 02:02:33 +00:00
228e927c04 pointInside wasnt working properly (did work with the examples I was using with many small faces) 2007-06-02 00:31:20 +00:00
f0fe6833db when removing py_build value I removed this but shouldnt have, however theres no need to parse the value in Blender_Redraw since its done in the Window module. 2007-06-01 05:54:16 +00:00
3d6f9b804f buttons editing didnt let lib-obdata to changed once set (thanks for the report broken)
NMesh (error in last commit).
2007-06-01 02:48:36 +00:00
f19b56a541 When converting from TF_SELECT to use the mfaces selection flag only I missed getSelectedFaces.
This broke theeths UV-Exportscript.
updated and added 2 missing decref's, as well as a check not to write a list of faces greater then the size of the NMesh (mesh and NMesh face lengths can differ)
2007-06-01 02:33:23 +00:00
0ea4607308 scene.camera was missing from docs
bad bad mistake- key wasnt returning IPO's
2007-05-31 13:48:16 +00:00
044607a450 == PY API ==
Added some braces to silence gcc warnings about scene.c
2007-05-29 10:28:19 +00:00
189d8b8d28 == PY-API Docs ==
Fixed bad description for a function.

As reported here:
http://www.blender.org/forum/viewtopic.php?t=11752
2007-05-29 06:30:33 +00:00
0059e5118d passing None to Blender.Mathutils.Quaternion would segfault 2007-05-28 21:53:49 +00:00
9b88fb13f5 Adding Text3d.JUSTIFY, thanks "Oliver Schneider" <oliffm@web.de> 2007-05-28 17:06:03 +00:00
a8bc1f3397 fix for a crash in Blender.Mesh,
getting curve data from an object failed (with only 1 curve vertex)
Blender.Mesh didnt check this and crashed.
2007-05-28 16:49:48 +00:00
91ea74c339 adding object.matrixParentInverse 2007-05-28 03:09:46 +00:00
bcc3143119 more memory leak fixes, though only a few are likely to happen 2007-05-27 21:33:48 +00:00
deffce3c19 Key.c/h - Removed unneeded functions. and ipo in struct wasnt being used.
Lattice.c - removed warning
Mesh.c - (own error) when running me.update(key="...") didnt update the right keyframe.

mesh_cleanup.py - Bugfix from a report by plumiferos that started uncovering all the memory leaks.
Removing NAN verts didnt work with mesh keyframes.
2007-05-26 12:58:46 +00:00
30dd4fafd1 More memory leaks fixed - in IDProp, Bone.head, tail, matrix, ob.DupObjects (my fault) and in Effect module as well as a few others.
Also stopped using Py_BuildValue for strings, ints and floats.
2007-05-26 04:39:31 +00:00
Ken Hughes
ea9b3dc387 Fix segfault in PyBonesDict_FromPyArmature() caused by uninitialized memory. 2007-05-25 20:54:48 +00:00
f231bd0d57 Many long standing memory leaks fixed in the BPY api.
Data from Armature.c and logic.c still leaks.

Mostly todo with PyList_Append adding a refcount and the bpython api not decrefing.

Also added some features needed to fix a bug in mesh_clean.py (ob.pinShape and ob.activeShape)
2007-05-25 16:43:25 +00:00
Ken Hughes
617200a01a Python API
==========
Bugfix #6682: some Mesh.Primitive default values didn't match UI values.
2007-05-24 15:00:10 +00:00
d6cbdabfe1 Bugfix for python Image.save()
[ #6702 ] Image doesn't get saved after painting & packing
IMB_saveiff - (general saving function), does not write a file when the image is packed.
so write a file with writePackedFile for packed files.
2007-05-22 19:40:11 +00:00
Ken Hughes
5d1c012c0d 2007-05-22 17:41:32 +00:00
9ac39d2e99 =ID Properties=
The code for preserving ID properties was apparently not
working.  Fixed that by adding a new function,
IDP_ReplaceInGroup, that automatically handles overriding a
property in a group while preserving the property order.

Its odd though that the previous fix I had wasn't
working :/
2007-05-22 04:41:21 +00:00
c4f6ac80df === Bugfix ===
Coverity bugfix (missing NULL check) and ref counting errors. (on module constants, so not really leaking, just not good.)
2007-05-21 19:42:11 +00:00
21bc08a0bb === Bugfix ===
Fix potential problem with Matrix initializer (can't call Matrix_Identity on non square matrices).
2007-05-21 19:41:14 +00:00
bd534f8df8 own bad error. calling scene.timeline would crash blender. 2007-05-20 09:02:16 +00:00
Ken Hughes
4d47e53903 2007-05-19 16:13:20 +00:00
42121b6a3d Fixed a few typos in the documentation for Draw module of Python API. 2007-05-18 11:50:04 +00:00
05dcd05520 Python bugfix reported by reD_Fox1
ob1.shareFrom(ob2) - didnt work with the new type/realtype method of making sure all new objects were emptys until they were linked to data and the realtype is used.
2007-05-16 12:26:17 +00:00
66ffd1d207 more epy doc updates
added a constant dict "Blender.Object.IpoKeyTypes" to pass to ob.insertIpoKey(keytype), previously these constants were not documented well and added to Blender.Object directly
2007-05-05 06:09:03 +00:00
610fca2906 updated epydocs 2007-05-05 03:35:12 +00:00
Ken Hughes
c494a76e35 Python API
----------
Correct some typos.
2007-05-04 13:53:06 +00:00
7bd69efaec added access to SSS settings in Python
buttons_shading.c - 2 tooltips elaborated
2007-05-04 03:23:40 +00:00
c71949419e == UV/Image Editor ==
Patch #6570.

This patch adds color and alpha selectors to Image -> "New..." dialog.
2007-05-03 15:10:44 +00:00
d7235265fe PyAPI, Mesh.c - added renderColorLayer and renderUVLayer to the mesh
buttons_editing.c - use icons for mesh viewport layer/render layer
2007-05-02 00:49:41 +00:00
c40997656e Really minor updates related to code I wrote for the Cast modifier:
- modifier.c: moved a check out of a loop, removed an unneeded var, made a couple cosmetic changes.

- DNA_modifier_types.h: added parentheses to cast and smooth modifier defines that used bit-shifting (like 1<<1, etc.).

Note: realized they were needed when I tried to use "flag &= ~MOD_CAST_Z" in modifier.c. Since MOD_CAST_Z is #defined as 1<<3, ~MOD_CAST_Z ended up as ~1<<3 while I wanted ~(1<<3). There are other places in that header file and others in Blender where it'd be safer to add the parentheses...

- Updated the epydoc documentation for the features added by Ben Batt to the cast modifier; fixed small typo in API_intro.py.

BTW, thanks Ben Batt (artificer) for checking, improving with a couple features and committing these modifiers :).
2007-04-30 19:20:43 +00:00
469208a101 Patch #6192 - Wave Modifier Option to move verts along normals
This patch adds an option to the wave modifier to displace along the normals
of the base mesh, rather than in the local Z direction.

Thanks to Michael Fox (mfoxdoggg) for the patch!
2007-04-30 16:49:12 +00:00
8355326e01 Scene.c - scene.objects.context how dosnt include hidden objects
editview.c - deselect all ignores restricted objects
headerbuttons.c - removing a material didnt redraw the 3d view
vpaint.c - disable vpaint for mesh libdata as well as object libdata
2007-04-30 08:00:48 +00:00