「テンプレート:Release Notes/2.43/Python/API」の版間の差分

提供: wiki
移動先: 案内検索
 
(1版 をインポートしました)
 
(相違点なし)

2018年6月29日 (金) 02:50時点における最新版

Misc

  • Python scripts can be added to the UV Image menu - "Image"
  • Python scripts can be added to the UV "UVCalculate" menu.
  • Blender.Get('icondir') - returns the icon directory.

Blender.Mathutils

  • (vectors)- Multiplying a 3d vector by a 4x4 matrix, now applied the translation component. (resizing the vector to 4d isnt needed anymore)
  • (vectors) you can divide a vector by a float again.
  • (vectors) - undeprecated vector.negate() method. "-vector" now doesn't modify the vector in place.
  • (vectors) - vector.length can be set - it scales the vector to the desired length.
  • (matrix,vector,euler,quat) - added .copy() methodm as an alternative to the existing.
  • RotationMatrix() - now accept values outside 360.

Blender.Mesh

  • new faces added from Mesh are now white by default (were black)
  • mesh data now has a texMesh attribute.
  • Added an optional arg to getFromObject to 'render' so you can choose to get the mesh displayed in the 3d view or generate one with render settings.
  • Nested loops with mesh verts, faces, face.verts work as expected now, (they used to conflict with each other)
  • Added .key .removeAllKeys() and .insertKey()
  • Added list like access to face colors col[0] is the same as col.r
  • made mesh.getFromObject() accept a python object as well as the object name.
  • Added sharp edge flag access.
  • Added edge.key and face.edge_keys to edge and face data.
  • allow image of mesh's UV faces to be removed/cleared by "del f.image" or "f.image = None.
  • New keyword parameters for Mesh.faces.extend() method:
    • ignoreDups: turns off checks for duplicate faces in the input list and existing mesh faces. Intended for constructing new meshes where the faces are known to be unique.
    • indexList: makes the method return a list of new faces indices's, which can be used to index new faces to add other attributes like color. If duplicate faces are removed, None is placed in their list slot.
    • allow faces with 2 verts or duplicate verts to remain in the input list (although they are still not added to the mesh) so that indexList option can return None for them. The goal is for all faces which are discarded to still be ignored but return None.
  • Added multires variables to Mesh data. multires, multiresLevelCount, multiresDrawLevel, multiresEdgeLevel, multiresPinLevel, multiresRenderLevel (cannot add ore remove multires data yet)
  • Added access to UV and VCol layers with... getColorLayerNames(), getUVLayerNames(), addColorLayer(name), addUVLayer(name), removeColorLayer(name), removeUVLayer(name), renameColorLayer(name, newname), renameUVLayer(name, newname), and

attributes activeColorLayer and activeUVLayer.

Blender.Text3d

  • Renamed Text3d.Font.New() to Text3d.Font.Load() since New was acting like load anyway.
  • Blender.Text3d.Font.Get() was just calling Text3d.Font.New(), made it get from a name or return a list of all fonts.
  • (font data) - renamed the 'name' to 'filename' and added access to the font name.

Blender.Sound

  • (sound data) Added setName() and setFilename() and made the filename attribute writable.

Blender.Object

  • (object data) - added a "passIndex", "game_properties" and "type" attribute, can be used instead of "getType()"
  • (object data) - Added Read only object property to be used for the collada exporter ob.parentType and a constant dict Blender.Object.ParentTypes.
  • (object data) - Added restrictDraw/Select/Render attributes set in the outliner.
  • (object data) - rbHalfExtents was accidentally named wrongly rbShapeBoundType.
  • (object data) - Enable/Disable DupFaces from the Python API.
  • (object data) - Adding ob_arm.makeParentBone([ob1, ob2...], bonename), ob.parentbonename is also settable now as long as it already has a bone parent.
  • (object data) - adding ob.activeMaterial - allows you

to get/set the active material for an object.

Blender.Effect

  • (getting particles) - now gets strands as a list of vectors and other improvements, see docs for details.
  • (effect attributes) - "disp" and "staticStep" data access added.

Blender Data Attributes (library data as seen in the data browser)

  • Added a __copy__() method to data types Armature,

Object, Mesh, Material, Metaball, Lattice, Lamp, Curve, Group, Camera and World (still missing from texture, NLA and IPOs) - this returns a copy of the data.

  • Added "fakeUser" attribute to data types Armature,

Object, Mesh, Material, Metaball, Group and Camera.

  • Added comparison function to many python types so

you can now do == and =!, Effects Armature, Constraint, Curve, Font, Group, Image, Ipo, IpoCurve, Key, Lamp, Lattice, Material, Mesh, NLA, Object, Pose, Scene, Sound, Text and World.

  • Added IDproperties to most libdata - a way you can assign arbitrary properties data to any Blender libdata.

Blender.Material

  • (material data) - Added access to the materials "lightGroup" and "shadAlpha" attribute.
  • (material data) - Added tangent_v and tangent space modes to python material modes.
  • (material data) - Added the flag group_exclusive to material.

Blender.Curve

  • (curve point) - Added access to the curves "radius" attribute and .materials access.
  • (curve Nurb) - Added a method curNurb.switchDirection()
  • New API for accessing surface data (SurbNurb type)

Blender.Constraint

  • (new constrants) - added python access to new constraints loc/rot/size limit, 6DOF and rigidbody.

Blender.Camera

  • Added camera.dofDist attribute.

Blender.Modifiers

  • Added missing settings to Modifiers (Render/Cage/Editmode)
  • Made it possible to copy modifiers from the python API ob1.modifiers = ob2.modifiers
  • Added support for adding and modifying the EdgeSplit modifier
  • Renamed Modifier.Type to Modifier.Types (old one kept for compatibility)

Blender.Armature

  • Added tipRadius and headRadius bone attributes.

Blender.Scene

  • New iterator type for scene data called "objects" has methods .new() .link() and .unlink() and attributes .active, .context and .selected see Scene docs for details.

Blender.Scene (render data)

  • renderdata.threads is now an int from 1 to 8
  • added boolean get/setters 'compositor', 'freeImages', 'singleLayer', 'saveBuffers' and 'compositeFree'

Blender.Window

  • Blender.Window.windowTheme - added access to iconTheme and sharp_edge color.
  • Added Node space to Window.Types dict.

Blender.NLA

  • Adds toggle to Object API for enabling NLA animation versus active Action animation. Object.enableNLAOverride=True sets to use NLA; Object.enableNLAOverride=False sets to use active Action;
  • Adds groupTarget get/setters to the NLA API. Takes an object and returns an object. groupTarget tells the animation system which object within a dupligroup should be used for NLA. Equivalent to filling in the "target" field in the NLA N-key panel.

Blender.Pose

  • (posebone) - added .sel to pose bones as well as read only .parent property.
  • (posebone) - added pose_bone.displayObject for getting/setting custom bones.

Blender.Image

  • Added img.makeCurrent() and img.has_data so you can see if an image contains pixel info.
  • Added img.fields, img.fields_odd, img.antialias

Blender.Metaballs

  • API Rewrite - many changes including...
    • removed get/set in favor of setsetattrs
    • added an element iterator to the metaball data type.
    • now accepts vectors and quat for location dimensions and rotation.

Blender.Library

  • Added the option to Blender.Library to 'link' data.
  • Blender.Library now supports loading relative libraries. the // at the start of the path mean that the file will be loaded relaive to the existing blend files path.

Blender.Geometry

  • Added python func Blender.Geometry.LineIntersect2D(v1,v2,v3,v4)

Blender.Lattice

  • Removed lattice.applyDeform()

Blender.Group

  • (group data) Added group.layers bitfield.
  • (group data) deprecated grp.append() and grp.remove() and replaced with .link() and .unlink() to match scene.objcts

Blender.Draw

  • Added Draw.BeginAlign(), Draw.EndAlign() to allow python scripts to control button alignment.
  • Added Draw.Normal() for the normal rotating sphere button, mostly the same as the ColorPicker in code and syntax.

Blender.IpoCurve

  • Added ipoCurve.driverExpression to get and set the string for a python expression.