subclasses — ActionFCurves, ActionGroup, ActionGroups, ActionPoseMarkers, Actuator, Addon, AddonPreferences, Addons, AnimData, AnimDataDrivers, AnimViz, AnimVizMotionPaths, AnimVizOnionSkinning, AnyType, Area, AreaSpaces, ArmatureBones, ArmatureEditBones, BackgroundImage, BackgroundImages, BakePixel, BakeSettings, BezierSplinePoint, BlendData, BlendDataActions, BlendDataArmatures, BlendDataBrushes, BlendDataCameras, BlendDataCurves, BlendDataFonts, BlendDataGreasePencils, BlendDataGroups, BlendDataImages, BlendDataLamps, BlendDataLattices, BlendDataLibraries, BlendDataLineStyles, BlendDataMasks, BlendDataMaterials, BlendDataMeshes, BlendDataMetaBalls, BlendDataMovieClips, BlendDataNodeTrees, BlendDataObjects, BlendDataParticles, BlendDataScenes, BlendDataScreens, BlendDataSounds, BlendDataSpeakers, BlendDataTexts, BlendDataTextures, BlendDataWindowManagers, BlendDataWorlds, BlenderRNA, BoidRule, BoidSettings, BoidState, Bone, BoneGroup, BoneGroups, BrushCapabilities, ChannelDriverVariables, ChildParticle, ClothCollisionSettings, ClothSettings, CollisionSettings, ColorManagedDisplaySettings, ColorManagedInputColorspaceSettings, ColorManagedSequencerColorspaceSettings, ColorManagedViewSettings, ColorMapping, ColorRamp, ColorRampElement, ColorRampElements, CompositorNodeOutputFileFileSlots, CompositorNodeOutputFileLayerSlots, ConsoleLine, Constraint, ConstraintTarget, Context, Controller, CurveMap, CurveMapPoint, CurveMapPoints, CurveMapping, CurveSplines, DopeSheet, Driver, DriverTarget, DriverVariable, DupliObject, DynamicPaintBrushSettings, DynamicPaintCanvasSettings, DynamicPaintSurface, DynamicPaintSurfaces, EditBone, EffectorWeights, EnumPropertyItem, EnvironmentMap, Event, FCurve, FCurveKeyframePoints, FCurveModifiers, FCurveSample, FFmpegSettings, FModifier, FModifierEnvelopeControlPoint, FModifierEnvelopeControlPoints, FieldSettings, FileSelectParams, FloatProperties, FluidMeshVertex, FluidSettings, FreestyleLineSet, FreestyleModuleSettings, FreestyleModules, FreestyleSettings, Function, GPencilFrame, GPencilFrames, GPencilLayer, GPencilStroke, GPencilStrokePoint, GPencilStrokePoints, GPencilStrokes, GameObjectSettings, GameProperty, GameSoftBodySettings, GreasePencilLayers, GroupObjects, Header, Histogram, ID, IDMaterials, IKParam, ImageFormatSettings, ImageUser, ImapaintToolCapabilities, IntProperties, KeyConfig, KeyConfigurations, KeyMap, KeyMapItem, KeyMapItems, KeyMaps, Keyframe, KeyingSet, KeyingSetInfo, KeyingSetPath, KeyingSetPaths, KeyingSets, KeyingSetsAll, LampSkySettings, LampTextureSlots, LatticePoint, LineStyleAlphaModifiers, LineStyleColorModifiers, LineStyleGeometryModifiers, LineStyleModifier, LineStyleTextureSlots, LineStyleThicknessModifiers, Linesets, LodLevel, LoopColors, Macro, MaskLayer, MaskLayers, MaskParent, MaskSpline, MaskSplinePoint, MaskSplinePointUW, MaskSplinePoints, MaskSplines, MaterialGameSettings, MaterialHalo, MaterialPhysics, MaterialRaytraceMirror, MaterialRaytraceTransparency, MaterialSlot, MaterialStrand, MaterialSubsurfaceScattering, MaterialTextureSlots, MaterialVolume, Menu, MeshColor, MeshColorLayer, MeshEdge, MeshEdges, MeshFloatProperty, MeshFloatPropertyLayer, MeshIntProperty, MeshIntPropertyLayer, MeshLoop, MeshLoopColor, MeshLoopColorLayer, MeshLoops, MeshPolygon, MeshPolygons, MeshSkinVertex, MeshSkinVertexLayer, MeshStatVis, MeshStringProperty, MeshStringPropertyLayer, MeshTessFace, MeshTessFaces, MeshTextureFace, MeshTextureFaceLayer, MeshTexturePoly, MeshTexturePolyLayer, MeshUVLoop, MeshUVLoopLayer, MeshVertex, MeshVertices, MetaBallElements, MetaElement, Modifier, MotionPath, MotionPathVert, MovieClipProxy, MovieClipScopes, MovieClipUser, MovieReconstructedCamera, MovieTracking, MovieTrackingCamera, MovieTrackingDopesheet, MovieTrackingMarker, MovieTrackingMarkers, MovieTrackingObject, MovieTrackingObjectPlaneTracks, MovieTrackingObjectTracks, MovieTrackingObjects, MovieTrackingPlaneMarker, MovieTrackingPlaneMarkers, MovieTrackingPlaneTrack, MovieTrackingPlaneTracks, MovieTrackingReconstructedCameras, MovieTrackingReconstruction, MovieTrackingSettings, MovieTrackingStabilization, MovieTrackingTrack, MovieTrackingTracks, NlaStrip, NlaStrips, NlaTrack, NlaTracks, Node, NodeInputs, NodeInstanceHash, NodeInternalSocketTemplate, NodeLink, NodeLinks, NodeOutputFileSlotFile, NodeOutputFileSlotLayer, NodeOutputs, NodeSocket, NodeSocketInterface, NodeTreeInputs, NodeTreeOutputs, NodeTreePath, Nodes, ObjectBase, ObjectConstraints, ObjectModifiers, OceanTexData, Operator, OperatorMacro, OperatorProperties, PackedFile, Paint, PaletteColor, Panel, Particle, ParticleBrush, ParticleDupliWeight, ParticleEdit, ParticleHairKey, ParticleKey, ParticleSettingsTextureSlots, ParticleSystem, ParticleSystems, ParticleTarget, PathCompare, PathCompareCollection, PointCache, PointCaches, PointDensity, Pose, PoseBone, PoseBoneConstraints, Property, PropertyGroup, PropertyGroupItem, Region, RegionView3D, RenderEngine, RenderLayer, RenderLayers, RenderPass, RenderResult, RenderSettings, RenderSlot, RenderSlots, RigidBodyConstraint, RigidBodyObject, RigidBodyWorld, SPHFluidSettings, SceneBases, SceneGameData, SceneGameRecastData, SceneObjects, SceneRenderLayer, Scopes, SculptToolCapabilities, Sensor, Sequence, SequenceColorBalanceData, SequenceCrop, SequenceEditor, SequenceElement, SequenceElements, SequenceModifier, SequenceModifiers, SequenceProxy, SequenceTransform, Sequences, ShapeKey, ShapeKeyBezierPoint, ShapeKeyCurvePoint, ShapeKeyPoint, SmokeCollSettings, SmokeDomainSettings, SmokeFlowSettings, SoftBodySettings, Space, SpaceNodeEditorPath, SpaceUVEditor, Spline, SplineBezierPoints, SplinePoint, SplinePoints, StringProperties, Struct, TessfaceUVTextures, TexMapping, TexPaintSlot, TextBox, TextCharacterFormat, TextLine, TextureSlot, Theme, ThemeBoneColorSet, ThemeClipEditor, ThemeConsole, ThemeDopeSheet, ThemeFileBrowser, ThemeFontStyle, ThemeGradientColors, ThemeGraphEditor, ThemeImageEditor, ThemeInfo, ThemeLogicEditor, ThemeNLAEditor, ThemeNodeEditor, ThemeOutliner, ThemePanelColors, ThemeProperties, ThemeSequenceEditor, ThemeSpaceGeneric, ThemeSpaceGradient, ThemeSpaceListGeneric, ThemeStyle, ThemeTextEditor, ThemeTimeline, ThemeUserInterface, ThemeUserPreferences, ThemeView3D, ThemeWidgetColors, ThemeWidgetStateColors, TimelineMarker, TimelineMarkers, Timer, ToolSettings, TransformOrientation, UILayout, UIList, UIPieMenu, UIPopupMenu, UVLoopLayers, UVProjector, UVTextures, UnifiedPaintSettings, UnitSettings, UnknownType, UserPreferences, UserPreferencesEdit, UserPreferencesFilePaths, UserPreferencesInput, UserPreferencesSystem, UserPreferencesView, UserSolidLight, VertexColors, VertexGroup, VertexGroupElement, VertexGroups, View2D, VoxelData, WalkNavigation, Window, WorldLighting, WorldMistSettings, WorldTextureSlots
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.
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.
Adds driver(s) to the given property
Parameters: |
|
---|---|
Returns: | The driver(s) added. |
Return type: | bpy.types.FCurve or list if index is -1 with an array property. |
Remove driver(s) from the given property
Parameters: |
|
---|---|
Returns: | Success of driver removal. |
Return type: | boolean |
Returns the value of the custom property assigned to key or default when not found (matches pythons dictionary function of the same name).
Parameters: |
|
---|
Note
Only bpy.types.ID, bpy.types.Bone and bpy.types.PoseBone classes support custom properties.
Check if a property is hidden.
Returns: | True when the property is hidden. |
---|---|
Return type: | boolean |
Check if a property is set, use for testing operator properties.
Returns: | True when the property has been set. |
---|---|
Return type: | boolean |
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 bpy.types.ID, bpy.types.Bone and bpy.types.PoseBone classes support custom properties.
Remove a keyframe from this properties fcurve.
Parameters: |
|
---|---|
Returns: | Success of keyframe deleation. |
Return type: | boolean |
Insert a keyframe on the property given, adding fcurves and animation data when necessary.
Parameters: |
|
---|---|
Returns: | Success of keyframe insertion. |
Return type: | boolean |
This is the most simple example of inserting a keyframe from python.
import bpy
obj = bpy.context.object
# set the keyframe at frame 1
obj.location = 3.0, 4.0, 10.0
obj.keyframe_insert(data_path="location", frame=1)
Note that when keying data paths which contain nested properties this must be done from the ID subclass, in this case the Armature rather then the bone.
import bpy
from bpy.props import PointerProperty
# define a nested property
class MyPropGroup(bpy.types.PropertyGroup):
nested = bpy.props.FloatProperty(name="Nested", default=0.0)
# register it so its available for all bones
bpy.utils.register_class(MyPropGroup)
bpy.types.Bone.my_prop = PointerProperty(type=MyPropGroup,
name="MyProp")
# get a bone
obj = bpy.data.objects["Armature"]
arm = obj.data
# set the keyframe at frame 1
arm.bones["Bone"].my_prop_group.nested = 10
arm.keyframe_insert(data_path='bones["Bone"].my_prop.nested',
frame=1,
group="Nested Group")
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 bpy.types.ID, bpy.types.Bone and bpy.types.PoseBone classes support custom properties.
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.types.bpy_struct.id_data to this struct and property (when given). |
Return type: | str |
Returns the property from the path, raise an exception when not found.
Parameters: |
|
---|
Unset a property, will use default value afterward.
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.types.bpy_struct |
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 bpy.types.ID, bpy.types.Bone and bpy.types.PoseBone classes support custom properties.
The bpy.types.ID object this datablock is from or None, (not available for all data types)