bpy_struct

subclasses — ActionFCurves, ActionGroup, ActionGroups, ActionPoseMarkers, Actuator, Addon, Addons, AnimData, AnimViz, AnimVizMotionPaths, AnimVizOnionSkinning, AnyType, Area, ArmatureBones, ArmatureEditBones, BackgroundImage, BezierSplinePoint, BlendData, BlenderRNA, BoidRule, BoidSettings, BoidState, Bone, BoneGroup, BoneGroups, ChannelDriverVariables, ChildParticle, ClothCollisionSettings, ClothSettings, CollisionSettings, ColorRamp, ColorRampElement, ColorRampElements, ConsoleLine, Constraint, ConstraintTarget, Context, Controller, CurveMap, CurveMapPoint, CurveMapping, CurveSplines, DopeSheet, Driver, DriverTarget, DriverVariable, DupliObject, EditBone, EffectorWeights, EnumPropertyItem, EnvironmentMap, Event, FCurve, FCurveKeyframePoints, FCurveModifiers, FCurveSample, FModifier, FModifierEnvelopeControlPoint, FieldSettings, FileSelectParams, FluidSettings, Function, GPencilFrame, GPencilLayer, GPencilStroke, GPencilStrokePoint, GameObjectSettings, GameProperty, GameSoftBodySettings, GroupObjects, Header, Histogram, ID, IDMaterials, IDProperty, IDPropertyGroup, IKParam, ImageUser, KeyConfig, KeyConfigurations, KeyMap, KeyMapItem, KeyMapItems, KeyMaps, Keyframe, KeyingSet, KeyingSetInfo, KeyingSetPath, KeyingSetPaths, KeyingSets, KeyingSetsAll, LampSkySettings, LampTextureSlots, LatticePoint, Macro, MainActions, MainArmatures, MainBrushes, MainCameras, MainCurves, MainFonts, MainGroups, MainImages, MainLamps, MainLattices, MainMaterials, MainMeshes, MainMetaBalls, MainNodeTrees, MainObjects, MainParticles, MainScenes, MainTexts, MainTextures, MainWorlds, MaterialHalo, MaterialPhysics, MaterialRaytraceMirror, MaterialRaytraceTransparency, MaterialSlot, MaterialStrand, MaterialSubsurfaceScattering, MaterialTextureSlots, MaterialVolume, Menu, MeshColor, MeshColorLayer, MeshEdge, MeshEdges, MeshFace, MeshFaces, MeshFloatProperty, MeshFloatPropertyLayer, MeshIntProperty, MeshIntPropertyLayer, MeshSticky, MeshStringProperty, MeshStringPropertyLayer, MeshTextureFace, MeshTextureFaceLayer, MeshVertex, MeshVertices, MetaBallElements, MetaElement, Modifier, MotionPath, MotionPathVert, NlaStrip, NlaTrack, Node, NodeSocket, ObjectBase, ObjectConstraints, ObjectModifiers, Operator, OperatorProperties, OperatorTypeMacro, PackedFile, Paint, Panel, Particle, ParticleBrush, ParticleDupliWeight, ParticleEdit, ParticleHairKey, ParticleKey, ParticleSystem, ParticleSystems, ParticleTarget, PointCache, PointCaches, PointDensity, Pose, PoseBone, PoseBoneConstraints, Property, RGBANodeSocket, Region, RegionView3D, RenderEngine, RenderLayer, RenderLayers, RenderPass, RenderResult, RenderSettings, SPHFluidSettings, SceneBases, SceneGameData, SceneObjects, SceneRenderLayer, Scopes, Sensor, Sequence, SequenceColorBalance, SequenceCrop, SequenceEditor, SequenceElement, SequenceProxy, SequenceTransform, ShapeKey, ShapeKeyBezierPoint, ShapeKeyCurvePoint, ShapeKeyPoint, SmokeCollSettings, SmokeDomainSettings, SmokeFlowSettings, SoftBodySettings, Space, SpaceUVEditor, Spline, SplineBezierPoints, SplinePoint, SplinePoints, Struct, TexMapping, TextBox, TextCharacterFormat, TextLine, TextMarker, TextureSlot, Theme, ThemeAudioWindow, ThemeBoneColorSet, ThemeConsole, ThemeDopeSheet, ThemeFileBrowser, ThemeFontStyle, ThemeGraphEditor, ThemeImageEditor, ThemeInfo, ThemeLogicEditor, ThemeNLAEditor, ThemeNodeEditor, ThemeOutliner, ThemeProperties, ThemeSequenceEditor, ThemeStyle, ThemeTextEditor, ThemeTimeline, ThemeUserInterface, ThemeUserPreferences, ThemeView3D, ThemeWidgetColors, ThemeWidgetStateColors, TimelineMarker, TimelineMarkers, ToolSettings, TransformOrientation, UILayout, UVProjector, UVTextures, UnitSettings, UnknownType, UserPreferences, UserPreferencesEdit, UserPreferencesFilePaths, UserPreferencesInput, UserPreferencesSystem, UserPreferencesView, UserSolidLight, ValueNodeSocket, VectorNodeSocket, VertexColors, VertexGroup, VertexGroupElement, VertexGroups, VoxelData, Window, WorldLighting, WorldMistSettings, WorldStarsSettings, WorldTextureSlots

class bpy.types.bpy_struct

built-in base class for all classes in bpy.types.

Note

Note that bpy.types.bpy_struct is not actually available from within blender, it only exists for the purpose of documentation.

as_pointer()

Returns the memory address which holds a pointer to blenders internal data

Returns:int (memory address).
Return type:int

Note

This is intended only for advanced script writers who need to pass blender data to their own C/Python modules.

Undocumented (contribute)

Undocumented (contribute)

driver_add(path, index=-1)

Adds driver(s) to the given property

Parameters:
  • path (string) – path to the property to drive, analogous to the fcurve’s data path.
  • index (int) – array index of the property drive. Defaults to -1 for all indicies or a single channel if the property is not an array.
Returns:

The driver(s) added.

Return type:

FCurve or list if index is -1 with an array property.

driver_remove(path, index=-1)

Remove driver(s) from the given property

Parameters:
  • path (string) – path to the property to drive, analogous to the fcurve’s data path.
  • index (int) – array index of the property drive. Defaults to -1 for all indicies or a single channel if the property is not an array.
Returns:

Success of driver removal.

Return type:

boolean

get(key, default=None)

Returns the value of the custom property assigned to key or default when not found (matches pythons dictionary function of the same name).

Parameters:
  • key (string) – The key assosiated with the custom property.
  • default – Optional argument for the value to return if key is not found.

Note

Only ID, Bone and PoseBone classes support custom properties.

is_property_hidden(property)

Check if a property is hidden.

Returns:True when the property is hidden.
Return type:boolean
is_property_set(property)

Check if a property is set, use for testing operator properties.

Returns:True when the property has been set.
Return type:boolean
items()

Returns the items of this objects custom properties (matches pythons dictionary function of the same name).

Returns:custom property key, value pairs.
Return type:list of key, value tuples

Note

Only ID, Bone and PoseBone classes support custom properties.

keyframe_delete(data_path, index=-1, frame=bpy.context.scene.frame_current, group="")

Remove a keyframe from this properties fcurve.

Parameters:
  • data_path (string) – path to the property to remove a key, analogous to the fcurve’s data path.
  • index (int) – array index of the property to remove a key. Defaults to -1 removing all indicies or a single channel if the property is not an array.
  • frame (float) – The frame on which the keyframe is deleted, defaulting to the current frame.
  • group (str) – The name of the group the F-Curve should be added to if it doesn’t exist yet.
Returns:

Success of keyframe deleation.

Return type:

boolean

keyframe_insert(data_path, index=-1, frame=bpy.context.scene.frame_current, group="")

Insert a keyframe on the property given, adding fcurves and animation data when necessary.

Parameters:
  • data_path (string) – path to the property to key, analogous to the fcurve’s data path.
  • index (int) – array index of the property to key. Defaults to -1 which will key all indicies or a single channel if the property is not an array.
  • frame (float) – The frame on which the keyframe is inserted, defaulting to the current frame.
  • group (str) – The name of the group the F-Curve should be added to if it doesn’t exist yet.
Returns:

Success of keyframe insertion.

Return type:

boolean

keys()

Returns the keys of this objects custom properties (matches pythons dictionary function of the same name).

Returns:custom property keys.
Return type:list of strings

Note

Only ID, Bone and PoseBone classes support custom properties.

path_from_id(property="")

Returns the data path from the ID to this object (string).

Parameters:
  • property (string) – Optional property name which can be used if the path is to a property of this object.
Returns:

The path from bpy_struct.id_data to this struct and property (when given).

Return type:

str

path_resolve(path, coerce=True)

Returns the property from the path, raise an exception when not found.

Parameters:
  • path (string) – path which this property resolves.
  • coerce (boolean) – optional argument, when True, the property will be converted into its python representation.
type_recast()

Return a new instance, this is needed because types such as textures can be changed at runtime.

Returns:a new instance of this object with the type initialized again.
Return type:subclass of bpy_struct
values()

Returns the values of this objects custom properties (matches pythons dictionary function of the same name).

Returns:custom property values.
Return type:list

Note

Only ID, Bone and PoseBone classes support custom properties.

id_data

The ID object this datablock is from or None, (not available for all data types)

Previous topic

XorController(Controller)

Next topic

Utilities (bpy.utils)