user: Describe Bpy.Types.Bpy Struct from the Blender manual or Python API, including usage steps and snippets.

assistant: ePencilTimeModifierSegment , GreasePencilTreeNode , GreasePencilv3LayerGroup , GreasePencilv3Layers , Header , Histogram , ID , IDMaterials , IDOverrideLibrary , IDOverrideLibraryProperties , IDOverrideLibraryProperty , IDOverrideLibraryPropertyOperation , IDOverrideLibraryPropertyOperations , IDPropertyWrapPtr , IKParam , ImageFormatSettings , ImagePackedFile , ImagePreview , ImageUser , IndexSwitchItem , Int2AttributeValue , IntAttributeValue , KeyConfig , KeyConfigPreferences , KeyConfigurations , KeyMap , KeyMapItem , KeyMapItems , KeyMaps , Keyframe , KeyingSet , KeyingSetInfo , KeyingSetPath , KeyingSetPaths , KeyingSets , KeyingSetsAll , LatticePoint , LayerCollection , LayerObjects , LayoutPanelState , LibraryWeakReference , Lightgroup , Lightgroups , LineStyleAlphaModifiers , LineStyleColorModifiers , LineStyleGeometryModifiers , LineStyleModifier , LineStyleTextureSlots , LineStyleThicknessModifiers , Linesets , LoopColors , Macro , MaskLayer , MaskLayers , MaskParent , MaskSpline , MaskSplinePoint , MaskSplinePointUW , MaskSplinePoints , MaskSplines , MaterialGPencilStyle , MaterialLineArt , MaterialSlot , Menu , MeshEdge , MeshEdges , MeshLoop , MeshLoopColor , MeshLoopColorLayer , MeshLoopTriangle , MeshLoopTriangles , MeshLoops , MeshNormalValue , MeshPolygon , MeshPolygons , MeshSkinVertex , MeshSkinVertexLayer , MeshStatVis , 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 , NDOFMotionEventData , NlaStrip , NlaStripFCurves , NlaStrips , NlaTrack , NlaTracks , Node , NodeClosureInputItem , NodeClosureInputItems , NodeClosureOutputItem , NodeClosureOutputItems , NodeCombineBundleItem , NodeCombineBundleItems , NodeCompositorFileOutputItem , NodeCompositorFileOutputItems , NodeEnumItem , NodeEvaluateClosureInputItem , NodeEvaluateClosureInputItems , NodeEvaluateClosureOutputItem , NodeEvaluateClosureOutputItems , NodeFunctionFormatStringItem , NodeFunctionFormatStringItems , NodeGeometryBakeItem , NodeGeometryBakeItems , NodeGeometryCaptureAttributeItem , NodeGeometryCaptureAttributeItems , NodeGeometryForeachGeometryElementGenerationItems , NodeGeometryForeachGeometryElementInputItems , NodeGeometryForeachGeometryElementMainItems , NodeGeometryRepeatOutputItems , NodeGeometrySimulationOutputItems , NodeGeometryViewerItem , NodeGeometryViewerItems , NodeIndexSwitchItems , NodeInputs , NodeInstanceHash , NodeInternalSocketTemplate , NodeLink , NodeLinks , NodeMenuSwitchItems , NodeOutputs , NodeSeparateBundleItem , NodeSeparateBundleItems , NodeSocket , NodeTreeInterface , NodeTreeInterfaceItem , NodeTreePath , Nodes , NodesModifierBake , NodesModifierBakeDataBlocks , NodesModifierBakes , NodesModifierDataBlock , NodesModifierPanel , NodesModifierPanels , NodesModifierWarning , ObjectBase , ObjectConstraints , ObjectDisplay , ObjectLightLinking , ObjectLineArt , ObjectModifiers , ObjectShaderFx , Operator , OperatorMacro , OperatorOptions , OperatorProperties , PackedFile , Paint , PaintModeSettings , PaletteColor , PaletteColors , Panel , Particle , ParticleBrush , ParticleDupliWeight , ParticleEdit , ParticleHairKey , ParticleKey , ParticleSettingsTextureSlots , ParticleSystem , ParticleSystems , ParticleTarget , PathCompare , PathCompareCollection , Point , PointCache , PointCacheItem , PointCaches , Pose , PoseBone , PoseBoneConstraints , Preferences , PreferencesApps , PreferencesEdit , PreferencesExperimental , PreferencesExtensions , PreferencesFilePaths , PreferencesInput , PreferencesKeymap , PreferencesSystem , PreferencesView , PrimitiveBoolean , PrimitiveFloat , PrimitiveInt , PrimitiveString , Property , PropertyGroup , PropertyGroupItem , QuaternionAttributeValue , RaytraceEEVEE , ReadOnlyInteger , Region , RegionView3D , RenderEngine , RenderLayer , RenderPass , RenderPasses , RenderResult , RenderSettings , RenderSlot , RenderSlots , RenderView , RenderViews , RepeatItem , RetimingKey , RetimingKeys , RigidBodyConstraint , RigidBodyObject , RigidBodyWorld , SPHFluidSettings , SceneDisplay , SceneEEVEE , SceneGpencil , SceneHydra , SceneObjects , SceneRenderView , Scopes , ScriptDirectory , ScriptDirectoryCollection , SequenceEditor , SequenceTimelineChannel , SequencerCacheOverlay , SequencerPreviewOverlay , SequencerTimelineOverlay , SequencerToolSettings , ShaderFx , ShapeKey , ShapeKeyBezierPoint , ShapeKeyCurvePoint , ShapeKeyPoint , Short2AttributeValue , SimulationStateItem , SoftBodySettings , Space , SpaceClipOverlay , SpaceDopeSheetOverlay , SpaceImageOverlay , SpaceNodeEditorPath , SpaceNodeOverlay , SpaceUVEditor , Spline , SplineBezierPoints , SplinePoint , SplinePoints , SpreadsheetColumn , SpreadsheetColumnID , SpreadsheetRowFilter , SpreadsheetTable , SpreadsheetTableID , SpreadsheetTables , Stereo3dDisplay , Stereo3dFormat , StringAttributeValue , Strip , StripColorBalanceData , StripCrop , StripElement , StripElements , StripModifier , StripModifiers , StripProxy , StripTransform , StripsMeta , StripsTopLevel , Struct , StudioLight , StudioLights , TexMapping , TexPaintSlot , TextBox , TextCharacterFormat , TextLine , TextureSlot , Theme , ThemeBoneColorSet , ThemeClipEditor , ThemeCollectionColor , ThemeCommon , ThemeCommonAnim , ThemeCommonCurves , ThemeConsole , ThemeDopeSheet , ThemeFileBrowser , ThemeFontStyle , ThemeGradientColors , ThemeGraphEditor , ThemeImageEditor , ThemeInfo , ThemeNLAEditor , ThemeNodeEditor , ThemeOutliner , ThemePreferences , ThemeProperties , ThemeRegions , ThemeRegionsAssetShelf , ThemeRegionsChannels , ThemeRegionsScrubbing , ThemeRegionsSidebars , ThemeSequenceEditor , ThemeSpaceGeneric , ThemeSpaceGradient , ThemeSpreadsheet , ThemeStatusBar , ThemeStripColor , ThemeStyle , ThemeTextEditor , ThemeTopBar , ThemeUserInterface , ThemeView3D , ThemeWidgetColors , ThemeWidgetStateColors , TimelineMarker , TimelineMarkers , Timer , ToolSettings , TransformOrientation , TransformOrientationSlot , UDIMTile , UDIMTiles , UILayout , UIList , UIPieMenu , UIPopover , UIPopupMenu , USDHook , UVLoopLayers , UVProjector , UnifiedPaintSettings , UnitSettings , UnknownType , UserAssetLibrary , UserExtensionRepo , UserExtensionRepoCollection , UserSolidLight , UvSculpt , VertexGroup , VertexGroupElement , VertexGroups , View2D , View3DCursor , View3DOverlay , View3DShading , ViewLayer , ViewLayerEEVEE , ViewLayers , ViewerPath , ViewerPathElem , VolumeDisplay , VolumeGrid , VolumeGrids , VolumeRender , WalkNavigation , Window , WorkSpaceTool , WorldLighting , WorldMistSettings , XrActionMap , XrActionMapBinding , XrActionMapBindings , XrActionMapItem , XrActionMapItems , XrActionMaps , XrComponentPath , XrComponentPaths , XrEventData , XrNavigation , XrSessionSettings , XrSessionState , XrUserPath , XrUserPaths , wmOwnerID , wmOwnerIDs , wmTools 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 Blender’s 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. driver_add ( path , index = -1 , / ) ¶ Adds driver(s) to the given property Parameters : path ( str ) – 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 indices or a single channel if the property is not an array. Returns : The driver added or a list of drivers when index is -1. Return type : bpy.types.FCurve | list[ bpy.types.FCurve ] driver_remove ( path , index = -1 , / ) ¶ Remove driver(s) from the given property Parameters : path ( str ) – 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 indices or a single channel if the property is not an array. Returns : Success of driver removal. Return type : bool get ( key , default = None , / ) ¶ Returns the value of the custom property assigned to key or default when not found (matches Python’s dictionary function of the same name). Parameters : key ( str ) – The key associated with the custom property. default ( Any ) – Optional argument for the value to return if key is not found. Returns : Custom property value or default. Return type : Any Note Limited to: Types with Custom Property Support . id_properties_clear ( ) ¶ Returns : Remove the parent group for an RNA struct’s custom IDProperties. id_properties_ensure ( ) ¶ Returns : the parent group for an RNA struct’s custom IDProperties. Return type : idprop.types.IDPropertyGroup id_properties_ui ( key , / ) ¶ Returns : Return an object used to manage an IDProperty’s UI data. Parameters : key ( str. ) – String name of the property. Return type : bpy.types.IDPropertyUIManager is_property_hidden ( property , / ) ¶ Check if a property is hidden. Parameters : property ( str ) – Property name. Returns : True when the property is hidden. Return type : bool is_property_overridable_library ( property , / ) ¶ Check if a property is overridable. Parameters : property ( str ) – Property name. Returns : True when the property is overridable. Return type : bool is_property_readonly ( property , / ) ¶ Check if a property is readonly. Parameters : property ( str ) – Property name. Returns : True when the property is readonly (not writable). Return type : bool is_property_set ( property , / , * , ghost = True ) ¶ Check if a property is set, use for testing operator properties. Parameters : property ( str ) – Property name. ghost ( bool ) – Used for operators that re-run with previous settings. In this case the property is not marked as set, yet the value from the previous execution is used. In rare cases you may want to set this option to false. Returns : True when the property has been set. Return type : bool Note Properties defined at run-time store the values of the properties as custom-properties. This method checks if the underlying data exists, causing the property to be considered set . A common pattern for operators is to calculate a value for the properties that have not had their values explicitly set by the caller (where the caller could be a key-binding, menu-items or Python script for example). In the case of executing operators multiple times, values are re-used from the previous execution. For example: subdividing a mesh with a smooth value of 1.0 will keep using that value on subsequent calls to subdivision, unless the operator is called with that property set to a different value. This behavior can be disabled using the SKIP_SAVE option when the property is declared (see: bpy.props ). The ghost argument allows detecting how a value from a previous execution is handled. When true: The property is considered unset even if the value from a previous call is used. When false: The existence of any values causes is_property_set to return true. While this argument should typically be omitted, there are times when it’s important to know if a value is anything besides the default. For example, the previous value may have been scaled by the scene’s unit scale. In this case scaling the value multiple times would cause problems, so the ghost argument should be false. items ( ) ¶ Returns the items of this objects custom properties (matches Python’s dictionary function of the same name). Returns : custom property key, value pairs. Return type : idprop.types.IDPropertyGroupViewItems Note Limited to: Types with Custom Property Support . keyframe_delete ( data_path , / , * , index = -1 , frame = bpy.context.scene.frame_current , group = '' ) ¶ Remove a keyframe from this properties fcurve. Parameters : data_path ( str ) – 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 indices 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 deletion. Return type : bool keyframe_insert ( data_path , / , * , index = -1 , frame = bpy.context.scene.frame_current , group = '' , options = set() , keytype = 'KEYFRAME' ) ¶ Insert a keyframe on the property given, adding fcurves and animation data when necessary. Parameters : data_path ( str ) – 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 indices 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. options ( set [ str ] ) – Optional set of flags: INSERTKEY_NEEDED Only insert keyframes where they’re needed in the relevant F-Curves. INSERTKEY_VISUAL Insert keyframes based on ‘visual transforms’. INSERTKEY_REPLACE Only replace already existing keyframes. INSERTKEY_AVAILABLE Only insert into already existing F-Curves. INSERTKEY_CYCLE_AWARE Take cyclic extrapolation into account (Cycle-Aware Keying option). keytype ( str ) – Type of the key: ‘KEYFRAME’, ‘BREAKDOWN’, ‘MOVING_HOLD’, ‘EXTREME’, ‘JITTER’, or ‘GENERATED’ Returns : Success of keyframe insertion. Return type : bool 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 than the bone. import bpy from bpy.props import ( FloatProperty , PointerProperty , ) # Define a nested property. class MyPropGroup ( bpy . types . PropertyGroup ): nested : 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 . nested = 10 arm . keyframe_insert ( data_path = &#39;bones["Bone"].my_prop.nested&#39; , frame = 1 , group = "Nested Group" , ) keys ( ) ¶ Returns the keys of this objects custom properties (matches Python’s dictionary function of the same name). Returns : custom property keys. Return type : idprop.types.IDPropertyGroupViewKeys Note Limited to: Types with Custom Property Support . path_from_id ( property = '' , / ) ¶ Returns the data path from the ID to this object (string). Parameters : property ( str ) – 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 path_from_module ( property = '' , index = -1 , / ) ¶ Returns the full data path to this struct (as a string) from the bpy module. Parameters : property ( str ) – Optional property name to get the full path from index ( int ) – Optional index of the property. “-1” means that the property has no indices. Returns : The full path to the data. Return type : str Raises : ValueError – if the input data cannot be converted into a full data path. Note Even if all input data is correct, this function might error out because Blender cannot derive a valid path. The incomplete path will be printed in the error message. path_resolve ( path , coerce = True , / ) ¶ Returns the property from the path, raise an exception when not found. Parameters : path ( str ) – path which this property resolves. coerce ( bool ) – optional argument, when True, the property will be converted into its Python representation. Returns : Property value or property object. Return type : Any | bpy.types.bpy_prop pop ( key , default = None , / ) ¶ Remove and return the value of the custom property assigned to key or default when not found (matches Python’s dictionary function of the same name). Parameters : key ( str ) – The key associated with the custom property. default ( Any ) – Optional argument for the value to return if key is not found. Returns : Custom property value or default. Return type : Any Note Limited to: Types with Custom Property Support . property_overridable_library_set ( property , overridable , / ) ¶ Define a property as overridable or not (only for custom properties!). Parameters : property ( str ) – Property name. overridable ( bool ) – Overridable status to set. Returns : True when the overridable status of the property was successfully set. Return type : bool property_unset ( property , / ) ¶ Unset a property, will use default value afterward. Parameters : property ( str ) – Property name. rna_ancestors ( ) ¶ Return the chain of data containing this struct, if known. The first item is the root (typically an ID), the last one is the immediate parent. May be empty. Returns : a list of this object’s ancestors. Return type : list[ bpy.types.bpy_struct ] type_recast ( ) ¶ Return a new instance,