Commit Graph

1274 Commits

Author SHA1 Message Date
4d74f07043 added Draw.Normal() for the normal rotating sphere button, mostly the same as the ColorPicker in code and syntax. 2006-12-27 11:58:03 +00:00
Ken Hughes
20a656db1d Python API
----------
Perform better param checking on Curve bevel and taper objects so that an
curve can't use its own object.  Also stick a big warning in the docs for
Curve.setTotcol(), which seems to be an extremely dangerous method.
2006-12-27 05:30:32 +00:00
9afe662c12 renameing datablocks was imposing a name limit on the python side.
This isnt needed because the limit is alredy being set by rename_id()
some other minor changed- use None returning maro
2006-12-27 05:04:20 +00:00
Ken Hughes
7b14c36a18 Python API
----------
Bugfix: make Constant mp_subscript method return key error if key not found
in dictionary.
2006-12-26 21:12:34 +00:00
Ken Hughes
e6381a04d6 Python API
----------
Bugfix: fix my own over-optimization in insertIpoKey(), allow IPOKEY_LOCROT
and IPOKEY_LOCROTSIZE to again set rotation and size Ipo curves.
2006-12-26 19:47:34 +00:00
Ken Hughes
df2fd95faa Python API
----------
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.
2006-12-26 19:13:13 +00:00
Ken Hughes
d2d86d34d3 Python API
----------
Correct some typos in Ipo API documentation.
2006-12-26 15:07:49 +00:00
46924d32f4 Camera.c refactor, moved to getsetattrs. deprecated get/set functions. and added access to all camera settings.
cam.type now uses 'ortho' and 'persp' rather then 0 and 1

group.c and object.c, minor cleanup
2006-12-26 07:00:32 +00:00
470f91b506 object_cookie_cutter - use edge keys
widgetwizard - made a mistake in last commit, works and also dosnt creash with bug.
https://projects.blender.org/tracker/index.php?func=detail&aid=5289&group_id=9&atid=125
Can others test so we can close?

Object_join was messing up object usercounts
2006-12-26 01:45:58 +00:00
Ken Hughes
576c5b85b6 Python API
----------
Add .materials attribute to BPy Curve API.  Also clean up Mesh.materials
documentation.
2006-12-25 21:15:53 +00:00
Ken Hughes
a2b3eb56f2 Python API
----------
Change "requiresd" to "required" in getChildren() documentation.
2006-12-25 15:07:16 +00:00
2a9fab55ba PyAPI driverExpression:
added "ipocurve.driver = 2" to set the curve to use driver python expressions.
added ipocurve.driverExpression - the string to run.
2006-12-25 10:44:28 +00:00
859b7f207e modified scripts from using older/depricated Python API commands, deprecated scn.getChildren() in the docs. 2006-12-25 09:17:23 +00:00
c5de881413 added CustomData_add_layer_named, same as CustomData_add_layer but accepts a name. saves Mesh.c having to look up the data after adding (just to rename it) 2006-12-24 11:15:54 +00:00
1be58e7a8d initial python support for dealing with multires meshes.
Can only change levels and values at the moment. adding and removing is still needed.

multires: bool
multiresLevelCount: int
multiresDrawLevel: int
multiresEdgeLevel: int
multiresPinLevel: int
multiresRenderLevel: int
2006-12-24 10:51:31 +00:00
b72bfbd923 replaced id->us++ with id_us_plus(id); so any indirect libdata isnt lost on reload.
added camera.dofDist to the python camera module
2006-12-24 03:25:53 +00:00
1c6f41a27a Added CustomData_get_named_layer_index to customdata to get a layer index by name, only used in Mesh.c at the moment.
cleanup Mesh.c, updated the epydocs
2006-12-23 23:33:03 +00:00
Ken Hughes
a4a031e434 Python API
----------
Bugfix submitted through bf-committers: Ipo.getNBezPoints() could cause
segfault due to incorrect check for end-of-list.
2006-12-23 18:16:20 +00:00
bef18061ec Select Grouped editdata- minor fix in the menu.
Updated Python Mesh API to support UV and Color layers with names.
Similar to vertex group's

renamed a function in customdata.c CustomData_free_layers -> CustomData_free_layers_active and made CustomData_free_layers accept an index, this is needed so python could free layers that arnt active.
2006-12-23 17:07:02 +00:00
Ken Hughes
d66f828c9b Python API
----------
Bugfix #5492: correctly distinguish curves and surfaces in Curve iterator.
2006-12-23 15:30:50 +00:00
67630324d3 Preserve multiple UV and vertex color layers in NMesh. 2006-12-23 10:37:50 +00:00
ea837b25e3 Added Draw.BeginAlign(), Draw.EndAlign()
added align to a few scripts where it looks nice.
2006-12-23 00:56:40 +00:00
30cc7499c3 setting/getting mcol by index was flipping red/blue. works now. 2006-12-22 22:57:05 +00:00
Ken Hughes
e56f2b4b9d Python API
----------
Obligatory Englishization of BPy API documents. :-)
2006-12-22 22:05:06 +00:00
ed47053fa6 Arnaure.Get() now raises an error when the name dosnt exist. added warning in docs.
Image - added img.fields, img.fields_odd, img.antialias, also updated the docs. replaced Py_BuildValue with faster list creation for getPixel functions.
2006-12-22 21:23:27 +00:00
9197b25490 removed typo from Render
added extFromFormat to BPyRender to get the extension for a format
2006-12-22 07:07:20 +00:00
1849da92bc document render constants,
these should NOT be set in the Module, very messy!
35 constants are stored in Blender.Scene.Render.* rather then there own dicts arranged by usage.
2006-12-22 05:27:06 +00:00
60a2977dcf adding ob.activeMaterial - allows you to get/set the active material for an object. 2006-12-22 04:46:37 +00:00
0325ee8f22 boxpack2d - python 2.3 compat fix, thanks brecht
gen_utils - needed to include BKE_library.h
off_import - use ed.key
2006-12-21 21:56:11 +00:00
Ken Hughes
5329e0d035 Python API
----------
Silence gcc warnings in Mesh API code.
2006-12-21 16:05:43 +00:00
Ken Hughes
7679634ff8 Python API
----------
Bugfix: Scene.objects.new() didn't check string inputs correctly.
2006-12-21 16:05:01 +00:00
Ken Hughes
1443d3a231 Python API
----------
Bug fix for SurfNurb.flagU and SurfNurb.flagV setters: makeknots() was not
being called with correct arguments.
2006-12-21 00:17:30 +00:00
Ken Hughes
1eded8d677 Python API
----------
Undo for part of previous commit.  Campbell reminded me that UV texture faces
aren't "users" like other objects, so removing the code which changes them.
2006-12-20 23:26:14 +00:00
Ken Hughes
368928220d Python API
----------
Bugfix/enhancement: allow image of mesh's UV faces to be removed/cleared by
"del f.image" or "f.image = None", and handle image user counts correctly
when assigning/clearing images.
2006-12-20 22:56:58 +00:00
Ken Hughes
674289096b Python API
----------
User documentation for scn.objects (SceneObjects class).  Documents what is
implemented right now; there still may be some minor changes prior to release.
2006-12-20 18:07:39 +00:00
253432bfc7 The Big Image refactor!
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html

Or in short:

- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images

Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
2006-12-20 17:57:56 +00:00
Ken Hughes
0a0753b409 Python API
----------
Change Scene.objects.new() to accept the string "Empty" instead of Python
None when creating new empty objects.
2006-12-20 16:02:01 +00:00
Ken Hughes
2260add0f0 Python API
----------
Correcting typos in Object documentation.
2006-12-19 17:17:14 +00:00
1ec3e6f3b6 adding ob_arm.makeParentBone([ob1, ob2...], bonename)
ob.parentbonename is also settable now as long as it already has a bone parent
2006-12-19 09:41:45 +00:00
Ken Hughes
65eda9e6e1 Missing variable initialization from earlier Object.New() patch. 2006-12-17 06:58:02 +00:00
Ken Hughes
940e625702 Python API
----------
Bugfix #5447: bug in determining whether a Curve was a CurNurb or SurfNurb.
2006-12-17 05:55:56 +00:00
Ken Hughes
8b64628e30 Python API
----------
Fixing various typos (hey guys, it's helpful to proofread the documentation
before you commit it :-) )
2006-12-17 04:24:19 +00:00
1041ad4719 added fakeUser and users to more pytypes 2006-12-17 02:16:29 +00:00
0c5eea3911 =IDProperties Python update=
Updated epydocs for next-to-latest
id properties commit.
2006-12-17 00:58:23 +00:00
Ken Hughes
08a7208aa6 Python API
----------
A more robust attempt to avoid creating non-Empty objects with no data while
maintaining backward compatibility.
2006-12-17 00:21:57 +00:00
3a84791b53 =IDProperties Python update=
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.
2006-12-16 23:54:45 +00:00
47ee194922 adding ed.key and face.edge_keys
avoids a lot of boiler place code in scripts that need to build connectivity.
2006-12-16 23:46:43 +00:00
a9447e4273 Enable/Disable DupFaces from the Python API.
Fixed a (own) bug in fakeUsers and added fakeUsers to Objects and Materials as well as Mesh.
2006-12-16 22:04:21 +00:00
dfb811d73d fixed issue: rbHalfExtents was accidently named wrongly rbShapeBoundType 2006-12-16 21:14:36 +00:00
3c9a11f24e Sys.c was getting the path seperator out of the python dict and converting it to a char for all path functions.
made DIRSEP a constant and refer to that directly.
Draw.c's PupBlock limit was 24, made 120 to match blenders internal limit.
2006-12-16 03:36:54 +00:00