2003-06-28 15:10:23 +00:00
|
|
|
# Blender.Object module and the Object PyType object
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
The Blender.Object submodule
|
|
|
|
|
|
2005-02-02 03:38:31 +00:00
|
|
|
B{New}: L{Object.getData} now accepts an optional bool keyword argument to
|
|
|
|
|
define if the user wants the data object or just its name.
|
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
|
|
|
|
|
|
|
|
Object
|
|
|
|
|
======
|
|
|
|
|
|
|
|
|
|
This module provides access to the B{Objects} in Blender.
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
|
|
import Blender
|
2004-01-03 03:50:58 +00:00
|
|
|
scene = Blender.Scene.getCurrent () # get the current scene
|
2003-06-28 15:10:23 +00:00
|
|
|
ob = Blender.Object.New ('Camera') # make camera object
|
|
|
|
|
cam = Blender.Camera.New ('ortho') # make ortho camera data object
|
|
|
|
|
ob.link (cam) # link camera data with the object
|
|
|
|
|
scene.link (ob) # link the object into the scene
|
|
|
|
|
ob.setLocation (0.0, -5.0, 1.0) # position the object in the scene
|
2003-08-06 22:08:56 +00:00
|
|
|
|
|
|
|
|
Blender.Redraw() # redraw the scene to show the updates.
|
2003-06-28 15:10:23 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def New (type, name='type'):
|
|
|
|
|
"""
|
|
|
|
|
Creates a new Object.
|
|
|
|
|
@type type: string
|
2003-07-12 18:21:07 +00:00
|
|
|
@param type: The Object type: 'Armature', 'Camera', 'Curve', 'Lamp', 'Mesh'
|
|
|
|
|
or 'Empty'.
|
2003-06-28 15:10:23 +00:00
|
|
|
@type name: string
|
2003-07-12 18:21:07 +00:00
|
|
|
@param name: The name of the object. By default, the name will be the same
|
|
|
|
|
as the object type.
|
2003-06-28 15:10:23 +00:00
|
|
|
@return: The created Object.
|
2003-08-06 22:08:56 +00:00
|
|
|
|
|
|
|
|
I{B{Example:}}
|
|
|
|
|
|
|
|
|
|
The example below creates a new Lamp object and puts it at the default
|
|
|
|
|
location (0, 0, 0) in the current scene::
|
2004-06-08 04:41:02 +00:00
|
|
|
import Blender
|
|
|
|
|
|
|
|
|
|
object = Blender.Object.New ('Lamp')
|
|
|
|
|
lamp = Blender.Lamp.New ('Spot')
|
|
|
|
|
object.link (lamp)
|
|
|
|
|
scene = Blender.Scene.getCurrent ()
|
|
|
|
|
scene.link (object)
|
|
|
|
|
|
|
|
|
|
Blender.Redraw()
|
2003-06-28 15:10:23 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def Get (name = None):
|
|
|
|
|
"""
|
|
|
|
|
Get the Object from Blender.
|
|
|
|
|
@type name: string
|
|
|
|
|
@param name: The name of the requested Object.
|
|
|
|
|
@return: It depends on the 'name' parameter:
|
|
|
|
|
- (name): The Object with the given name;
|
|
|
|
|
- (): A list with all Objects in the current scene.
|
2003-08-06 22:08:56 +00:00
|
|
|
|
|
|
|
|
I{B{Example 1:}}
|
|
|
|
|
|
|
|
|
|
The example below works on the default scene. The script returns the plane
|
|
|
|
|
object and prints the location of the plane::
|
|
|
|
|
import Blender
|
|
|
|
|
|
|
|
|
|
object = Blender.Object.Get ('plane')
|
|
|
|
|
print object.getLocation()
|
|
|
|
|
|
|
|
|
|
I{B{Example 2:}}
|
|
|
|
|
|
|
|
|
|
The example below works on the default scene. The script returns all objects
|
|
|
|
|
in the scene and prints the list of object names::
|
|
|
|
|
import Blender
|
|
|
|
|
|
|
|
|
|
objects = Blender.Object.Get ()
|
|
|
|
|
print objects
|
2003-06-28 15:10:23 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def GetSelected ():
|
|
|
|
|
"""
|
2003-08-06 22:08:56 +00:00
|
|
|
Get the selected objects from Blender. If no objects are selected, an empty
|
|
|
|
|
list will be returned.
|
2003-06-28 15:10:23 +00:00
|
|
|
@return: A list of all selected Objects in the current scene.
|
2003-08-06 22:08:56 +00:00
|
|
|
|
|
|
|
|
I{B{Example:}}
|
|
|
|
|
|
|
|
|
|
The example below works on the default scene. Select one or more objects and
|
|
|
|
|
the script will print the selected objects::
|
|
|
|
|
import Blender
|
|
|
|
|
|
|
|
|
|
objects = Blender.Object.GetSelected ()
|
|
|
|
|
print objects
|
2003-06-28 15:10:23 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
class Object:
|
|
|
|
|
"""
|
|
|
|
|
The Object object
|
|
|
|
|
=================
|
|
|
|
|
This object gives access to generic data from all objects in Blender.
|
|
|
|
|
@cvar LocX: The X location coordinate of the object.
|
|
|
|
|
@cvar LocY: The Y location coordinate of the object.
|
|
|
|
|
@cvar LocZ: The Z location coordinate of the object.
|
|
|
|
|
@cvar loc: The (X,Y,Z) location coordinates of the object (vector).
|
|
|
|
|
@cvar dLocX: The delta X location coordinate of the object.
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar dLocY: The delta Y location coordinate of the object.
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar dLocZ: The delta Z location coordinate of the object.
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar dloc: The delta (X,Y,Z) location coordinates of the object (vector).
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar RotX: The X rotation angle (in radians) of the object.
|
|
|
|
|
@cvar RotY: The Y rotation angle (in radians) of the object.
|
|
|
|
|
@cvar RotZ: The Z rotation angle (in radians) of the object.
|
|
|
|
|
@cvar rot: The (X,Y,Z) rotation angles (in radians) of the object (vector).
|
|
|
|
|
@cvar dRotX: The delta X rotation angle (in radians) of the object.
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar dRotY: The delta Y rotation angle (in radians) of the object.
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar dRotZ: The delta Z rotation angle (in radians) of the object.
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-07-12 18:21:07 +00:00
|
|
|
@cvar drot: The delta (X,Y,Z) rotation angles (in radians) of the object
|
|
|
|
|
(vector).
|
2003-08-06 22:08:56 +00:00
|
|
|
This variable applies to IPO Objects only.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar SizeX: The X size of the object.
|
|
|
|
|
@cvar SizeY: The Y size of the object.
|
|
|
|
|
@cvar SizeZ: The Z size of the object.
|
|
|
|
|
@cvar size: The (X,Y,Z) size of the object (vector).
|
|
|
|
|
@cvar dSizeX: The delta X size of the object.
|
|
|
|
|
@cvar dSizeY: The delta Y size of the object.
|
|
|
|
|
@cvar dSizeZ: The delta Z size of the object.
|
|
|
|
|
@cvar dsize: The delta (X,Y,Z) size of the object.
|
|
|
|
|
@cvar EffX: The X effector coordinate of the object. Only applies to IKA.
|
|
|
|
|
@cvar EffY: The Y effector coordinate of the object. Only applies to IKA.
|
|
|
|
|
@cvar EffZ: The Z effector coordinate of the object. Only applies to IKA.
|
2004-05-20 07:21:07 +00:00
|
|
|
@cvar Layer: The object layer. This value is a bitmask with one position
|
|
|
|
|
set for each of the 20 possible layers starting from the low order bit.
|
2004-06-08 04:41:02 +00:00
|
|
|
The easiest way to deal with these values in in hexadecimal notation.
|
|
|
|
|
Example::
|
|
|
|
|
ob.Layer = 0x04 # sets layer 3 ( bit pattern 0100 )
|
|
|
|
|
After setting the Layer value, call Blender.Redraw( -1 ) to update
|
|
|
|
|
the interface.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar parent: The parent object of the object. (Read-only)
|
|
|
|
|
@cvar track: The object tracking this object. (Read-only)
|
|
|
|
|
@cvar data: The data of the object. (Read-only)
|
|
|
|
|
@cvar ipo: The ipo data associated with the object. (Read-only)
|
2004-07-04 19:57:41 +00:00
|
|
|
@cvar mat: The matrix of the object relative to its parent. (Read-only)
|
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
|
|
|
@cvar matrix: The matrix of the object in world space. (Read-only)
|
2004-07-04 19:57:41 +00:00
|
|
|
@cvar matrixLocal: The matrix of the object relative to its parent. (Read-only)
|
|
|
|
|
@cvar matrixWorld: The matrix of the object in world space. (Read-only)
|
2003-07-12 18:21:07 +00:00
|
|
|
@cvar colbits: The Material usage mask. A set bit #n means: the Material
|
|
|
|
|
#n in the Object's material list is used. Otherwise, the Material #n
|
|
|
|
|
of the Objects Data material list is displayed.
|
|
|
|
|
@cvar drawType: The object's drawing type used. 1 - Bounding box,
|
|
|
|
|
2 - wire, 3 - Solid, 4- Shaded, 5 - Textured.
|
|
|
|
|
@cvar drawMode: The object's drawing mode used. The value can be a sum
|
|
|
|
|
of: 2 - axis, 4 - texspace, 8 - drawname, 16 - drawimage,
|
|
|
|
|
32 - drawwire.
|
2003-06-28 15:10:23 +00:00
|
|
|
@cvar name: The name of the object.
|
2004-06-02 06:19:56 +00:00
|
|
|
@cvar sel: The selection state of the object, 1/0.
|
2003-06-28 15:10:23 +00:00
|
|
|
"""
|
|
|
|
|
|
2003-07-25 19:53:42 +00:00
|
|
|
def buildParts():
|
|
|
|
|
"""
|
2003-08-06 17:04:36 +00:00
|
|
|
Recomputes the particle system. This method only applies to an Object of
|
|
|
|
|
the type Effect.
|
2003-07-25 19:53:42 +00:00
|
|
|
"""
|
2003-10-29 01:37:32 +00:00
|
|
|
|
|
|
|
|
def clearIpo():
|
2003-10-28 23:25:59 +00:00
|
|
|
"""
|
2003-10-29 01:37:32 +00:00
|
|
|
Unlinks the ipo from this object.
|
|
|
|
|
@return: True if there was an ipo linked or False otherwise.
|
2003-10-28 23:25:59 +00:00
|
|
|
"""
|
2003-08-06 17:04:36 +00:00
|
|
|
|
2003-06-28 15:10:23 +00:00
|
|
|
def clrParent(mode = 0, fast = 0):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
|
|
|
|
Clears parent object.
|
2003-08-06 17:04:36 +00:00
|
|
|
@type mode: Integer
|
|
|
|
|
@type fast: Integer
|
2003-07-12 18:21:07 +00:00
|
|
|
@param mode: A mode flag. If mode flag is 2, then the object transform will
|
|
|
|
|
be kept. Any other value, or no value at all will update the object
|
|
|
|
|
transform.
|
|
|
|
|
@param fast: If the value is 0, the scene hierarchy will not be updated. Any
|
|
|
|
|
other value, or no value at all will update the scene hierarchy.
|
|
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2005-02-09 05:19:24 +00:00
|
|
|
def getData(name_only = False):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2005-04-02 17:01:56 +00:00
|
|
|
Returns the Datablock object (Mesh, Lamp, Camera, etc.) linked to this Object. If the keyword parameter 'name_only' is True, only the Datablock name is returned as a string.
|
2005-02-09 05:19:24 +00:00
|
|
|
@type name_only: bool
|
2005-04-02 17:01:56 +00:00
|
|
|
@param name_only: This is a keyword parameter. if True (or nonzero), only the name of the data object is returned. The default value is False.
|
|
|
|
|
@rtype: specific Object type or string
|
|
|
|
|
@return: Depends on the type of Datablock linked to the Object. If name_only is True, it returns a string.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getDeltaLocation():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object's delta location in a list (x, y, z)
|
2003-08-06 17:04:36 +00:00
|
|
|
@rtype: A vector triple
|
2003-07-30 20:52:35 +00:00
|
|
|
@return: (x, y, z)
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getDrawMode():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object draw mode.
|
2003-08-06 17:04:36 +00:00
|
|
|
@rtype: Integer
|
|
|
|
|
@return: a sum of the following:
|
|
|
|
|
- 2 - axis
|
|
|
|
|
- 4 - texspace
|
|
|
|
|
- 8 - drawname
|
|
|
|
|
- 16 - drawimage
|
|
|
|
|
- 32 - drawwire
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getDrawType():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object draw type
|
2003-08-06 17:04:36 +00:00
|
|
|
@rtype: Integer
|
|
|
|
|
@return: One of the following:
|
|
|
|
|
- 1 - Bounding box
|
|
|
|
|
- 2 - Wire
|
|
|
|
|
- 3 - Solid
|
|
|
|
|
- 4 - Shaded
|
|
|
|
|
- 5 - Textured
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getEuler():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2004-03-25 06:18:56 +00:00
|
|
|
Returns the object's rotation as Euler rotation vector (rotX, rotY, rotZ). Angles are in radians.
|
2004-05-02 14:29:31 +00:00
|
|
|
@rtype: Py_Euler
|
|
|
|
|
@return: A python euler
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getInverseMatrix():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object's inverse matrix.
|
2004-05-02 14:29:31 +00:00
|
|
|
@rtype: Py_Matrix
|
|
|
|
|
@return: A python matrix 4x4
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2003-10-29 01:37:32 +00:00
|
|
|
def getIpo():
|
|
|
|
|
"""
|
|
|
|
|
Returns the Ipo associated to this object or None if there's no linked ipo.
|
|
|
|
|
@rtype: Ipo
|
|
|
|
|
@return: the wrapped ipo or None.
|
|
|
|
|
"""
|
2004-06-02 06:19:56 +00:00
|
|
|
def isSelected():
|
|
|
|
|
"""
|
|
|
|
|
Returns the objects selection state as a boolean value True or False.
|
|
|
|
|
@rtype: Boolean
|
|
|
|
|
@return: Selection state as True or False
|
|
|
|
|
"""
|
|
|
|
|
|
2003-06-28 15:10:23 +00:00
|
|
|
def getLocation():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object's location (x, y, z).
|
|
|
|
|
@return: (x, y, z)
|
2003-08-06 22:08:56 +00:00
|
|
|
|
|
|
|
|
I{B{Example:}}
|
|
|
|
|
|
|
|
|
|
The example below works on the default scene. It retrieves all objects in
|
|
|
|
|
the scene and prints the name and location of each object::
|
|
|
|
|
import Blender
|
|
|
|
|
|
|
|
|
|
objects = Blender.Object.Get()
|
|
|
|
|
|
|
|
|
|
for obj in objects:
|
|
|
|
|
print obj.getName()
|
|
|
|
|
print obj.getLocation()
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2004-05-02 14:29:31 +00:00
|
|
|
def getAction():
|
|
|
|
|
"""
|
|
|
|
|
Returns an action if one is associated with this object (only useful for armature types).
|
|
|
|
|
@rtype: Py_Action
|
|
|
|
|
@return: a python action.
|
|
|
|
|
"""
|
|
|
|
|
|
2004-07-20 08:16:46 +00:00
|
|
|
def getMaterials(what = 0):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns a list of materials assigned to the object.
|
2004-07-20 08:16:46 +00:00
|
|
|
@type what: int
|
|
|
|
|
@param what: if nonzero, empty slots will be returned as None's instead
|
|
|
|
|
of being ignored (default way). See L{NMesh.NMesh.getMaterials}.
|
2003-07-30 20:52:35 +00:00
|
|
|
@rtype: list of Material Objects
|
|
|
|
|
@return: list of Material Objects assigned to the object.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
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
|
|
|
def getMatrix(space = 'worldspace'):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object matrix.
|
- Blender: added option 'scriptsdir' to Blender.Get();
- small updates to the docs;
- Object: small fix to getMatrix: check during_script() to avoid undesired loops; added old behavior (pre 2.34) as option: .getMatrix('oldlocal');
- tentative fix for bug #1275: scene REDRAW scriptlinks were not being executed (the call to do so was missing):
http://projects.blender.org/tracker/index.php?func=detail&aid=1275&group_id=9&atid=125
added the call in drawview.c, in drawview3dspace(). This causes the scriptlink to be called for each visible view3d, but that's what happens with object redraw scriptlinks, too. Anyway, this is still a test. The place was chosen based on the idea that a scene redraw scriptlink is like an object redraw one, but for all objs in the scene at once.
- Window.Theme: new submodule, to get/set theme options in Blender;
- Added the script save_theme.py (Help menu for now), to save the current theme in Blender as an executable script (currently shown in the Scripts->Misc menu).
There's more work to do for themes, like defining a proper place for them in the interface, adding documentation (for now the added script and the ones it generates can give a pretty good idea of how to use the new module), probably extending themes to support SpaceScript and so on.
2004-09-21 05:28:17 +00:00
|
|
|
@type space: string
|
|
|
|
|
@param space: The desired matrix:
|
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
|
|
|
- worldspace (default): absolute, taking vertex parents, tracking and
|
|
|
|
|
ipo's into account;
|
|
|
|
|
- localspace: relative to the object's parent;
|
|
|
|
|
- old_worldspace: old behavior, prior to Blender 2.34, where eventual
|
|
|
|
|
changes made by the script itself were not taken into account until
|
|
|
|
|
a redraw happened, either called by the script or upon its exit.
|
2004-07-04 19:57:41 +00:00
|
|
|
Returns the object matrix.
|
2004-05-02 14:29:31 +00:00
|
|
|
@rtype: Py_Matrix
|
- Blender: added option 'scriptsdir' to Blender.Get();
- small updates to the docs;
- Object: small fix to getMatrix: check during_script() to avoid undesired loops; added old behavior (pre 2.34) as option: .getMatrix('oldlocal');
- tentative fix for bug #1275: scene REDRAW scriptlinks were not being executed (the call to do so was missing):
http://projects.blender.org/tracker/index.php?func=detail&aid=1275&group_id=9&atid=125
added the call in drawview.c, in drawview3dspace(). This causes the scriptlink to be called for each visible view3d, but that's what happens with object redraw scriptlinks, too. Anyway, this is still a test. The place was chosen based on the idea that a scene redraw scriptlink is like an object redraw one, but for all objs in the scene at once.
- Window.Theme: new submodule, to get/set theme options in Blender;
- Added the script save_theme.py (Help menu for now), to save the current theme in Blender as an executable script (currently shown in the Scripts->Misc menu).
There's more work to do for themes, like defining a proper place for them in the interface, adding documentation (for now the added script and the ones it generates can give a pretty good idea of how to use the new module), probably extending themes to support SpaceScript and so on.
2004-09-21 05:28:17 +00:00
|
|
|
@return: a python 4x4 matrix object
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getName():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the name of the object
|
2003-08-06 17:04:36 +00:00
|
|
|
@return: The name of the object
|
2003-08-06 22:08:56 +00:00
|
|
|
|
|
|
|
|
I{B{Example:}}
|
|
|
|
|
|
|
|
|
|
The example below works on the default scene. It retrieves all objects in
|
|
|
|
|
the scene and prints the name of each object::
|
|
|
|
|
import Blender
|
|
|
|
|
|
|
|
|
|
objects = Blender.Object.Get()
|
|
|
|
|
|
|
|
|
|
for obj in objects:
|
|
|
|
|
print obj.getName()
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getParent():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object's parent object.
|
|
|
|
|
@rtype: Object
|
|
|
|
|
@return: The parent object of the object. If not available, None will be
|
|
|
|
|
returned.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2004-01-23 19:24:45 +00:00
|
|
|
def getSize():
|
|
|
|
|
"""
|
|
|
|
|
Returns the object's size.
|
|
|
|
|
@return: (SizeX, SizeY, SizeZ)
|
|
|
|
|
"""
|
|
|
|
|
|
2004-04-02 19:53:53 +00:00
|
|
|
def getTimeOffset():
|
|
|
|
|
"""
|
|
|
|
|
Returns the time offset of the object's animation.
|
|
|
|
|
@return: TimeOffset
|
|
|
|
|
"""
|
|
|
|
|
|
2003-06-28 15:10:23 +00:00
|
|
|
def getTracked():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the object's tracked object.
|
|
|
|
|
@rtype: Object
|
|
|
|
|
@return: The tracked object of the object. If not available, None will be
|
|
|
|
|
returned.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def getType():
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Returns the type of the object.
|
|
|
|
|
@return: The type of object.
|
2003-08-06 22:08:56 +00:00
|
|
|
|
|
|
|
|
I{B{Example:}}
|
|
|
|
|
|
|
|
|
|
The example below works on the default scene. It retrieves all objects in
|
|
|
|
|
the scene and updates the location and rotation of the camera. When run,
|
|
|
|
|
the camera will rotate 180 degrees and moved to the oposite side of the X
|
|
|
|
|
axis. Note that the number 'pi' in the example is an approximation of the
|
|
|
|
|
true number 'pi'::
|
|
|
|
|
import Blender
|
|
|
|
|
|
|
|
|
|
objects = Blender.Object.Get()
|
|
|
|
|
|
|
|
|
|
for obj in objects:
|
|
|
|
|
if obj.getType() == 'Camera':
|
|
|
|
|
obj.LocY = -obj.LocY
|
|
|
|
|
obj.RotZ = 3.141592 - obj.RotZ
|
|
|
|
|
|
|
|
|
|
Blender.Redraw()
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2005-03-12 12:31:33 +00:00
|
|
|
def getDupliVerts():
|
|
|
|
|
"""
|
|
|
|
|
Get state of DupliVerts anim propertie
|
|
|
|
|
@return: a boolean value.
|
|
|
|
|
"""
|
2005-03-20 03:50:56 +00:00
|
|
|
|
|
|
|
|
def insertIpoKey(keytype):
|
|
|
|
|
"""
|
|
|
|
|
Inserts keytype values in object ipo at curframe. Uses module constants.
|
|
|
|
|
@type keytype: Integer
|
|
|
|
|
@param keytype:
|
|
|
|
|
-LOC
|
|
|
|
|
-ROT
|
|
|
|
|
-SIZE
|
|
|
|
|
-LOCROT
|
|
|
|
|
-LOCROTSIZE
|
2005-04-14 17:56:37 +00:00
|
|
|
-PI_STRENGTH
|
|
|
|
|
-PI_FALLOFF
|
|
|
|
|
-PI_PERM
|
|
|
|
|
-PI_SURFACEDAMP
|
|
|
|
|
-PI_RANDOMDAMP
|
2005-03-20 03:50:56 +00:00
|
|
|
@return: py_none
|
|
|
|
|
"""
|
2005-03-12 12:31:33 +00:00
|
|
|
|
2003-06-28 15:10:23 +00:00
|
|
|
def link(object):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Links Object with data provided in the argument. The data must match the
|
|
|
|
|
Object's type, so you cannot link a Lamp to a Mesh type object.
|
|
|
|
|
@type object: Blender Object
|
|
|
|
|
@param object: A Blender Object.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def makeParent(objects, noninverse = 0, fast = 0):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Makes the object the parent of the objects provided in the argument which
|
|
|
|
|
must be a list of valid Objects.
|
|
|
|
|
@type objects: Blender Object
|
|
|
|
|
@param objects: A Blender Object.
|
2003-08-06 17:04:36 +00:00
|
|
|
@type noninverse: Integer
|
|
|
|
|
@param noninverse:
|
|
|
|
|
0 - make parent with inverse
|
|
|
|
|
1 - make parent without inverse
|
|
|
|
|
@type fast: Integer
|
|
|
|
|
@param fast:
|
|
|
|
|
0 - update scene hierarchy automatically
|
|
|
|
|
1 - don't update scene hierarchy (faster). In this case, you must
|
|
|
|
|
explicitely update the Scene hierarchy.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2003-07-30 20:52:35 +00:00
|
|
|
def setDeltaLocation(delta_location):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Sets the object's delta location which must be a vector triple.
|
|
|
|
|
@type delta_location: A vector triple
|
|
|
|
|
@param delta_location: A vector triple (x, y, z) specifying the new
|
|
|
|
|
location.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2003-07-30 20:52:35 +00:00
|
|
|
def setDrawMode(drawmode):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Sets the object's drawing mode. The drawing mode can be a mix of modes. To
|
|
|
|
|
enable these, add up the values.
|
2003-08-06 17:04:36 +00:00
|
|
|
@type drawmode: Integer
|
2003-07-30 20:52:35 +00:00
|
|
|
@param drawmode: A sum of the following:
|
2003-08-06 17:04:36 +00:00
|
|
|
- 2 - axis
|
|
|
|
|
- 4 - texspace
|
|
|
|
|
- 8 - drawname
|
|
|
|
|
- 16 - drawimage
|
|
|
|
|
- 32 - drawwire
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2003-07-30 20:52:35 +00:00
|
|
|
def setDrawType(drawtype):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Sets the object's drawing type.
|
2003-08-06 17:04:36 +00:00
|
|
|
@type drawtype: Integer
|
|
|
|
|
@param drawtype: One of the following:
|
|
|
|
|
- 1 - Bounding box
|
|
|
|
|
- 2 - Wire
|
|
|
|
|
- 3 - Solid
|
|
|
|
|
- 4 - Shaded
|
|
|
|
|
- 5 - Textured
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2004-05-02 14:29:31 +00:00
|
|
|
def setEuler(euler):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-08-06 22:08:56 +00:00
|
|
|
Sets the object's rotation according to the specified Euler angles.
|
2004-05-02 14:29:31 +00:00
|
|
|
@type euler: Py_Euler or a list of floats
|
|
|
|
|
@param euler: a python euler or x,y,z rotations as floats
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2003-10-29 01:37:32 +00:00
|
|
|
def setIpo(ipo):
|
|
|
|
|
"""
|
|
|
|
|
Links an ipo to this object.
|
|
|
|
|
@type ipo: Blender Ipo
|
|
|
|
|
@param ipo: an object type ipo.
|
|
|
|
|
"""
|
|
|
|
|
|
2003-08-06 22:08:56 +00:00
|
|
|
def setLocation(x, y, z):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-08-06 22:08:56 +00:00
|
|
|
Sets the object's location.
|
|
|
|
|
@type x: float
|
|
|
|
|
@param x: The X coordinate of the new location.
|
|
|
|
|
@type y: float
|
|
|
|
|
@param y: The Y coordinate of the new location.
|
|
|
|
|
@type z: float
|
|
|
|
|
@param z: The Z coordinate of the new location.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
|
|
|
|
def setMaterials(materials):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Sets the materials. The argument must be a list of valid material objects.
|
|
|
|
|
@type materials: Materials list
|
|
|
|
|
@param materials: A list of Blender material objects.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-06-28 15:10:23 +00:00
|
|
|
|
2004-05-02 14:29:31 +00:00
|
|
|
def setMatrix(matrix):
|
|
|
|
|
"""
|
|
|
|
|
Sets the object's matrix and updates it's tranformation.
|
|
|
|
|
@type matrix: Py_Matrix 4x4
|
|
|
|
|
@param matrix: a python matrix 4x4.
|
|
|
|
|
"""
|
|
|
|
|
|
2003-07-30 20:52:35 +00:00
|
|
|
def setName(name):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2003-07-30 20:52:35 +00:00
|
|
|
Sets the name of the object.
|
|
|
|
|
@type name: String
|
|
|
|
|
@param name: The new name for the object.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2004-01-23 19:24:45 +00:00
|
|
|
|
|
|
|
|
def setSize(x, y, z):
|
|
|
|
|
"""
|
|
|
|
|
Sets the object's size.
|
|
|
|
|
@type x: float
|
|
|
|
|
@param x: The X size multiplier.
|
|
|
|
|
@type y: float
|
|
|
|
|
@param y: The Y size multiplier.
|
|
|
|
|
@type z: float
|
|
|
|
|
@param z: The Z size multiplier.
|
|
|
|
|
"""
|
|
|
|
|
|
2004-04-02 19:53:53 +00:00
|
|
|
def setTimeOffset(timeOffset):
|
|
|
|
|
"""
|
|
|
|
|
Sets the time offset of the object's animation.
|
|
|
|
|
@type timeOffset: float
|
|
|
|
|
@param timeOffset: The new time offset for the object's animation.
|
|
|
|
|
"""
|
2004-06-08 04:41:02 +00:00
|
|
|
|
2003-07-30 20:52:35 +00:00
|
|
|
def shareFrom(object):
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2004-07-20 08:16:46 +00:00
|
|
|
Link data of object specified in the argument with self. This works only
|
2003-07-30 20:52:35 +00:00
|
|
|
if self and the object specified are of the same type.
|
|
|
|
|
@type object: Blender Object
|
|
|
|
|
@param object: A Blender Object of the same type.
|
2003-07-12 18:21:07 +00:00
|
|
|
"""
|
2004-06-02 06:19:56 +00:00
|
|
|
|
|
|
|
|
def select(boolean):
|
|
|
|
|
"""
|
|
|
|
|
Sets the object's selection state.
|
|
|
|
|
@type boolean: Integer
|
|
|
|
|
@param boolean:
|
|
|
|
|
- 0 - unselected
|
|
|
|
|
- 1 - selected
|
|
|
|
|
"""
|
|
|
|
|
|
2003-09-20 03:40:16 +00:00
|
|
|
def getBoundBox():
|
|
|
|
|
"""
|
|
|
|
|
Returns the bounding box of this object. This works for meshes (out of
|
|
|
|
|
edit mode) and curves.
|
|
|
|
|
@rtype: list of 8 (x,y,z) float coordinate vectors
|
|
|
|
|
@return: The coordinates of the 8 corners of the bounding box.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def makeDisplayList():
|
|
|
|
|
"""
|
|
|
|
|
Updates this object's display list. Blender uses display lists to store
|
|
|
|
|
already transformed data (like a mesh with its vertices already modified
|
|
|
|
|
by coordinate transformations and armature deformation). If the object
|
|
|
|
|
isn't modified, there's no need to recalculate this data. This method is
|
|
|
|
|
here for the *few cases* where a script may need it, like when toggling
|
|
|
|
|
the "SubSurf" mode for a mesh:
|
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
|
|
|
|
2003-09-20 03:40:16 +00:00
|
|
|
Example::
|
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
|
|
|
object = Blender.Object.Get("Sphere")
|
|
|
|
|
nmesh = object.getData()
|
|
|
|
|
nmesh.setMode("SubSurf")
|
|
|
|
|
nmesh.update() # don't forget to update!
|
|
|
|
|
object.makeDisplayList()
|
|
|
|
|
Blender.Window.Redraw()
|
2003-09-20 03:40:16 +00:00
|
|
|
|
|
|
|
|
If you try this example without the line to update the display list, the
|
|
|
|
|
object will disappear from the screen until you press "SubSurf".
|
|
|
|
|
@warn: If after running your script objects disappear from the screen or
|
|
|
|
|
are not displayed correctly, try this method function. But if the script
|
|
|
|
|
works properly without it, there's no reason to use it.
|
|
|
|
|
"""
|
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
|
|
|
|
|
|
|
|
def getScriptLinks (event):
|
|
|
|
|
"""
|
|
|
|
|
Get a list with this Object's script links of type 'event'.
|
|
|
|
|
@type event: string
|
|
|
|
|
@param event: "FrameChanged" or "Redraw".
|
|
|
|
|
@rtype: list
|
|
|
|
|
@return: a list with Blender L{Text} names (the script links of the given
|
|
|
|
|
'event' type) or None if there are no script links at all.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def clearScriptLinks ():
|
|
|
|
|
"""
|
|
|
|
|
Delete all this Object's script links.
|
|
|
|
|
@rtype: bool
|
|
|
|
|
@return: 0 if some internal problem occurred or 1 if successful.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def addScriptLink (text, event):
|
|
|
|
|
"""
|
|
|
|
|
Add a new script link to this Object.
|
|
|
|
|
@type text: string
|
|
|
|
|
@param text: the name of an existing Blender L{Text}.
|
|
|
|
|
@type event: string
|
|
|
|
|
@param event: "FrameChanged" or "Redraw".
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def makeTrack (tracked, fast = 0):
|
|
|
|
|
"""
|
|
|
|
|
Make this Object track another.
|
|
|
|
|
@type tracked: Blender Object
|
|
|
|
|
@param tracked: the object to be tracked.
|
|
|
|
|
@type fast: int (bool)
|
|
|
|
|
@param fast: if zero, the scene hierarchy is updated automatically. If
|
|
|
|
|
you set 'fast' to a nonzero value, don't forget to update the scene
|
|
|
|
|
yourself (see L{Scene.Scene.update}).
|
|
|
|
|
@note: you also need to clear the rotation (L{setEuler}) of this object
|
|
|
|
|
if it was not (0,0,0) already.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def clearTrack (mode = 0, fast = 0):
|
|
|
|
|
"""
|
|
|
|
|
Make this Object not track another anymore.
|
|
|
|
|
@type mode: int (bool)
|
|
|
|
|
@param mode: if nonzero the matrix transformation used for tracking is kept.
|
|
|
|
|
@type fast: int (bool)
|
|
|
|
|
@param fast: if zero, the scene hierarchy is updated automatically. If
|
|
|
|
|
you set 'fast' to a nonzero value, don't forget to update the scene
|
|
|
|
|
yourself (see L{Scene.Scene.update}).
|
|
|
|
|
"""
|
2004-07-04 19:57:41 +00:00
|
|
|
|
|
|
|
|
def getAllProperties ():
|
|
|
|
|
"""
|
|
|
|
|
Return a list of properties from this object.
|
|
|
|
|
@rtype: PyList
|
|
|
|
|
@return: List of Property objects.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getProperty (name):
|
|
|
|
|
"""
|
|
|
|
|
Return a properties from this object based on name.
|
|
|
|
|
@type name: string
|
|
|
|
|
@param name: the name of the property to get.
|
|
|
|
|
@rtype: Property object
|
|
|
|
|
@return: The first property that matches name.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def addProperty (name, data, type):
|
|
|
|
|
"""
|
|
|
|
|
Add a property to object.
|
|
|
|
|
@type name: string
|
|
|
|
|
@param name: the property name.
|
|
|
|
|
@type data: string, int or float
|
|
|
|
|
@param data: depends on what is passed in:
|
|
|
|
|
- string: string type property
|
|
|
|
|
- int: integer type property
|
|
|
|
|
- float: float type property
|
|
|
|
|
@type type: string (optional)
|
|
|
|
|
@param type: can be the following:
|
|
|
|
|
- 'BOOL'
|
|
|
|
|
- 'INT'
|
|
|
|
|
- 'FLOAT'
|
|
|
|
|
- 'TIME'
|
|
|
|
|
- 'STRING'
|
|
|
|
|
@warn: If a type is not declared string data will
|
|
|
|
|
become string type, int data will become int type
|
|
|
|
|
and float data will become float type. Override type
|
|
|
|
|
to declare bool type, and time type.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def addProperty (property):
|
|
|
|
|
"""
|
|
|
|
|
Add a property to object.
|
|
|
|
|
@type property: Property object
|
|
|
|
|
@param property: property object to add to object.
|
|
|
|
|
@warn: A property object can be added only once to an object'
|
|
|
|
|
you must remove the property from an object to add it elsewhere.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def removeProperty (name):
|
|
|
|
|
"""
|
|
|
|
|
Remove a property from an object by name.
|
|
|
|
|
@type property: Property object
|
|
|
|
|
@param property: property to remove by name.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def removeProperty (property):
|
|
|
|
|
"""
|
|
|
|
|
Remove a property from an object.
|
|
|
|
|
@type property: Property object
|
|
|
|
|
@param property: property object to remove.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def removeAllProperties():
|
|
|
|
|
"""
|
|
|
|
|
Removes all properties from an object.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def copyAllPropertiesTo (object):
|
|
|
|
|
"""
|
|
|
|
|
Copies all properties from one object to another.
|
|
|
|
|
@type object: Object object
|
|
|
|
|
@param object: Object that will recieve the properties.
|
|
|
|
|
"""
|
|
|
|
|
|
2005-03-12 12:31:33 +00:00
|
|
|
def setDupliVerts(data):
|
|
|
|
|
"""
|
|
|
|
|
Set state of DupliVerts anim propertie
|
|
|
|
|
@param data: boolean value True, False, 0 or not 0.
|
|
|
|
|
"""
|
|
|
|
|
|
2004-07-04 19:57:41 +00:00
|
|
|
class Property:
|
|
|
|
|
"""
|
|
|
|
|
The Property object
|
|
|
|
|
===================
|
|
|
|
|
This property gives access to object property data in Blender.
|
|
|
|
|
@cvar name: The property name.
|
|
|
|
|
@cvar data: Data for this property. Depends on property type.
|
|
|
|
|
@cvar type: The property type.
|
|
|
|
|
@warn: Comparisons between properties will only be true when
|
|
|
|
|
both the name and data pairs are the same.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getName ():
|
|
|
|
|
"""
|
|
|
|
|
Get the name of this property.
|
|
|
|
|
@rtype: string
|
|
|
|
|
@return: The property name.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setName (name):
|
|
|
|
|
"""
|
|
|
|
|
Set the name of this property.
|
|
|
|
|
@type name: string
|
|
|
|
|
@param name: The new name of the property
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getData ():
|
|
|
|
|
"""
|
|
|
|
|
Get the data for this property.
|
|
|
|
|
@rtype: string, int, or float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setData (data):
|
|
|
|
|
"""
|
|
|
|
|
Set the data for this property.
|
|
|
|
|
@type data: string, int, or float
|
|
|
|
|
@param data: The data to set for this property.
|
|
|
|
|
@warn: See object.setProperty(). Changing data
|
|
|
|
|
which is of a different type then the property is
|
|
|
|
|
set to (i.e. setting an int value to a float type'
|
|
|
|
|
property) will change the type of the property
|
|
|
|
|
automatically.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getType ():
|
|
|
|
|
"""
|
|
|
|
|
Get the type for this property.
|
|
|
|
|
@rtype: string
|
2004-07-20 08:16:46 +00:00
|
|
|
"""
|
2005-03-12 12:31:33 +00:00
|
|
|
|
2005-04-14 17:56:37 +00:00
|
|
|
|
|
|
|
|
def getPIStregth():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction Strength.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIStrength(strength):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction Strength.
|
|
|
|
|
Values between -1000.0 to 1000.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type strength: float
|
|
|
|
|
@param strength: the Object's Particle Interaction New Strength.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPIFalloff():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction falloff.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIFalloff(falloff):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction falloff.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type falloff: float
|
|
|
|
|
@param falloff: the Object's Particle Interaction New falloff.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPIMaxDist():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction MaxDist.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIMaxDist(MaxDist):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction MaxDist.
|
|
|
|
|
Values between 0 to 1000.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type MaxDist: float
|
|
|
|
|
@param MaxDist: the Object's Particle Interaction New MaxDist.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPIType():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction Type.
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIType(type):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction type.
|
|
|
|
|
Use Module Constants
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
- NONE
|
|
|
|
|
- WIND
|
|
|
|
|
- FORCE
|
|
|
|
|
- VORTEX
|
|
|
|
|
- MAGNET
|
2005-04-14 17:56:37 +00:00
|
|
|
@rtype: PyNone
|
|
|
|
|
@type type: int
|
|
|
|
|
@param type: the Object's Particle Interaction Type.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPIUseMaxDist():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction if using MaxDist.
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIUseMaxDist(status):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction MaxDist.
|
|
|
|
|
0 = Off, 1 = on
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type status: int
|
|
|
|
|
@param status: the new status
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPIDeflection():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction Deflection Setting.
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIDeflection(status):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction Deflection Setting.
|
|
|
|
|
0 = Off, 1 = on
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type status: int
|
|
|
|
|
@param status: the new status
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPIPermf():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction Permiability.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIPerm(perm):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction Permiability.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type perm: float
|
|
|
|
|
@param perm: the Object's Particle Interaction New Permiability.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPIRandomDamp():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction RandomDamp.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPIRandomDamp(damp):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction RandomDamp.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type damp: float
|
|
|
|
|
@param damp: the Object's Particle Interaction New RandomDamp.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getPISurfaceDamp():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's Particle Interaction SurfaceDamp.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setPISurfaceDamp(damp):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's Particle Interaction SurfaceDamp.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type damp: float
|
|
|
|
|
@param damp: the Object's Particle Interaction New SurfaceDamp.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getSBMass():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB Mass.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBMass(mass):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB Mass.
|
|
|
|
|
Values between 0 to 50.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type mass: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param mass: the Object's SB New mass.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBGravity():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB Gravity.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBGravity(grav):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB Gravity.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type grav: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param grav: the Object's SB New Gravity.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBFriction():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB Friction.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBFriction(frict):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB Friction.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type frict: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param frict: the Object's SB New Friction.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBErrorLimit():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB ErrorLimit.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBErrorLimit(err):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB ErrorLimit.
|
|
|
|
|
Values between 0 to 1.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type err: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param err: the Object's SB New ErrorLimit.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBGoalSpring():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB GoalSpring.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBGoalSpring(gs):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB GoalSpring.
|
|
|
|
|
Values between 0 to 0.999
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type gs: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param gs: the Object's SB New GoalSpring.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBGoalFriction():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB GoalFriction.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBGoalFriction(gf):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB GoalFriction.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type gf: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param gf: the Object's SB New GoalFriction.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBMinGoal():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB MinGoal.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBMinGoal(mg):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB MinGoal.
|
|
|
|
|
Values between 0 to 1.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type mg: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param mg: the Object's SB New MinGoal.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBMaxGoal():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB MaxGoal.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBMaxGoal(mg):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB MaxGoal.
|
|
|
|
|
Values between 0 to 1.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type mg: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param mg: the Object's SB New MaxGoal.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBInnerSpring():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB InnerSpring.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBInnerSpring(sprr):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB InnerSpring.
|
|
|
|
|
Values between 0 to 0.999
|
|
|
|
|
@rtype: PyNone
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@type sprr: float
|
|
|
|
|
@param sprr: the Object's SB New InnerSpring.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBInnerSpringFriction():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB InnerSpringFriction.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBInnerSpringFriction(sprf):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB InnerSpringFriction.
|
|
|
|
|
Values between 0 to 10.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type sprf: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param sprf: the Object's SB New InnerSpringFriction.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBDefaultGoal():
|
|
|
|
|
"""
|
|
|
|
|
Get the Object's SB DefaultGoal.
|
|
|
|
|
@rtype: float
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBDefaultGoal(goal):
|
|
|
|
|
"""
|
|
|
|
|
Set the the Object's SB DefaultGoal.
|
|
|
|
|
Values between 0 to 1.0
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type goal: float
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param goal: the Object's SB New DefaultGoal.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBEnable():
|
|
|
|
|
"""
|
|
|
|
|
Get if the Object's SB is Enabled.
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBEnable(switch):
|
|
|
|
|
"""
|
|
|
|
|
Enable / Disable Softbodies.
|
|
|
|
|
1: on
|
|
|
|
|
0: off
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type switch: int
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param switch: the Object's SB New Enable Value.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBPostDef():
|
|
|
|
|
"""
|
|
|
|
|
get Softbodies PostDef option
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBPostDef(switch):
|
|
|
|
|
"""
|
|
|
|
|
Enable / Disable Softbodies PostDef option
|
|
|
|
|
1: on
|
|
|
|
|
0: off
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type switch: int
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param switch: the Object's SB New PostDef Value.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBUseGoal():
|
|
|
|
|
"""
|
|
|
|
|
get Softbodies UseGoal option
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBUseGoal(switch):
|
|
|
|
|
"""
|
|
|
|
|
Enable / Disable Softbodies UseGoal option
|
|
|
|
|
1: on
|
|
|
|
|
0: off
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type switch: int
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param switch: the Object's SB New UseGoal Value.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
def getSBUseEdges():
|
|
|
|
|
"""
|
|
|
|
|
get Softbodies UseEdges option
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBUseEdges(switch):
|
|
|
|
|
"""
|
|
|
|
|
Enable / Disable Softbodies UseEdges option
|
|
|
|
|
1: on
|
|
|
|
|
0: off
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type switch: int
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param switch: the Object's SB New UseEdges Value.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def getSBStiffQuads():
|
|
|
|
|
"""
|
|
|
|
|
get Softbodies StiffQuads option
|
|
|
|
|
@rtype: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def setSBStiffQuads(switch):
|
|
|
|
|
"""
|
|
|
|
|
Enable / Disable Softbodies StiffQuads option
|
|
|
|
|
1: on
|
|
|
|
|
0: off
|
|
|
|
|
@rtype: PyNone
|
|
|
|
|
@type switch: int
|
Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!). It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version. For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System). Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago. For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9
BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode. Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves. This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True). Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
|
|
|
@param switch: the Object's SB New StiffQuads Value.
|
2005-04-14 17:56:37 +00:00
|
|
|
"""
|