[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41954] trunk/blender/doc/python_api/rst/ info_gotcha.rst: tab -> spaces
Campbell Barton
ideasman42 at gmail.com
Fri Nov 18 05:55:46 CET 2011
Revision: 41954
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41954
Author: campbellbarton
Date: 2011-11-18 04:55:43 +0000 (Fri, 18 Nov 2011)
Log Message:
-----------
tab -> spaces
Modified Paths:
--------------
trunk/blender/doc/python_api/rst/info_gotcha.rst
Modified: trunk/blender/doc/python_api/rst/info_gotcha.rst
===================================================================
--- trunk/blender/doc/python_api/rst/info_gotcha.rst 2011-11-18 04:48:27 UTC (rev 41953)
+++ trunk/blender/doc/python_api/rst/info_gotcha.rst 2011-11-18 04:55:43 UTC (rev 41954)
@@ -147,7 +147,7 @@
.. note::
- In the following examples ``bpy.context.object`` is assumed to be an armature object.
+ In the following examples ``bpy.context.object`` is assumed to be an armature object.
Edit Bones
@@ -163,11 +163,11 @@
This will be empty outside of editmode.
- >>> mybones = bpy.context.selected_editable_bones
+ >>> mybones = bpy.context.selected_editable_bones
Returns an editbone only in edit mode.
- >>> bpy.context.active_bone
+ >>> bpy.context.active_bone
Bones (Object Mode)
@@ -179,15 +179,15 @@
Returns a bone (not an editbone) outside of edit mode
- >>> bpy.context.active_bone
+ >>> bpy.context.active_bone
This works, as with blender the setting can be edited in any mode
- >>> bpy.context.object.data.bones["Bone"].use_deform = True
+ >>> bpy.context.object.data.bones["Bone"].use_deform = True
Accessible but read-only
- >>> tail = myobj.data.bones["Bone"].tail
+ >>> tail = myobj.data.bones["Bone"].tail
Pose Bones
@@ -199,20 +199,20 @@
.. code-block:: python
- # Gets the name of the first constraint (if it exists)
- bpy.context.object.pose.bones["Bone"].constraints[0].name
+ # Gets the name of the first constraint (if it exists)
+ bpy.context.object.pose.bones["Bone"].constraints[0].name
- # Gets the last selected pose bone (pose mode only)
- bpy.context.active_pose_bone
+ # Gets the last selected pose bone (pose mode only)
+ bpy.context.active_pose_bone
.. note::
- Notice the pose is accessed from the object rather than the object data, this is why blender can have 2 or more objects sharing the same armature in different poses.
+ Notice the pose is accessed from the object rather than the object data, this is why blender can have 2 or more objects sharing the same armature in different poses.
.. note::
- Strictly speaking PoseBone's are not bones, they are just the state of the armature, stored in the :class:`bpy.types.Object` rather than the :class:`bpy.types.Armature`, the real bones are however accessible from the pose bones - :class:`bpy.types.PoseBone.bone`
+ Strictly speaking PoseBone's are not bones, they are just the state of the armature, stored in the :class:`bpy.types.Object` rather than the :class:`bpy.types.Armature`, the real bones are however accessible from the pose bones - :class:`bpy.types.PoseBone.bone`
Armature Mode Switching
@@ -236,20 +236,20 @@
.. code-block:: python
- bpy.data.meshes.new(name=meshid)
-
- # normally some code, function calls...
- bpy.data.meshes[meshid]
+ bpy.data.meshes.new(name=meshid)
+
+ # normally some code, function calls...
+ bpy.data.meshes[meshid]
Or with name assignment...
.. code-block:: python
- obj.name = objname
-
- # normally some code, function calls...
- obj = bpy.data.meshes[objname]
+ obj.name = objname
+
+ # normally some code, function calls...
+ obj = bpy.data.meshes[objname]
Data names may not match the assigned values if they exceed the maximum length, are already used or an empty string.
@@ -262,16 +262,16 @@
.. code-block:: python
- # typically declared in the main body of the function.
- mesh_name_mapping = {}
-
- mesh = bpy.data.meshes.new(name=meshid)
- mesh_name_mapping[meshid] = mesh
-
- # normally some code, or function calls...
-
- # use own dictionary rather then bpy.data
- mesh = mesh_name_mapping[meshid]
+ # typically declared in the main body of the function.
+ mesh_name_mapping = {}
+
+ mesh = bpy.data.meshes.new(name=meshid)
+ mesh_name_mapping[meshid] = mesh
+
+ # normally some code, or function calls...
+
+ # use own dictionary rather then bpy.data
+ mesh = mesh_name_mapping[meshid]
Library Collisions
More information about the Bf-blender-cvs
mailing list