4
$\begingroup$

I found some really useful code for keyframe animations. But i need a specific property (in this case for the Cycles camera visibility) and i only found "location", "gravity" or "value". Is there some kind of List of all the keyframe data_paths? Or a option to "see" the names of the animationpaths ?

$\endgroup$
1

2 Answers 2

2
$\begingroup$

As CoDEmanX describes below, your best bet is to go to the API Documentation and search for bpy.types. plus the type and property (for example, search for bpy.types.Object.hide). There you can find how to hide.

You can also see here how to figure out data paths.

$\endgroup$
2
8
$\begingroup$

You can right click the property in the user interface and choose Copy Data Path

You can also key it manually and explore the object's animation data with the outliner using the data block option.

outliner

or view it in the graph editor

graph editor

You might try to create a list yourself:

import bpy

obj = bpy.context.active_object
txt = bpy.data.texts.new("list")
for prop in obj.bl_rna.properties:
    if prop.is_animatable and not prop.is_readonly:
        txt.write(prop.identifier + '\n')
    elif prop.type == "POINTER":
        txt.write("---Pointer--- \n" + prop.identifier + '\n')
        for sub in prop.fixed_type.bl_rna.properties:
            if sub.is_animatable and not sub.is_readonly:
                txt.write(sub.identifier + '\n')
        txt.write("------------- \n")

It is possible to explore the properties with the outliner:

rna_properties

$\endgroup$
1
  • $\begingroup$ this should be the validated answer $\endgroup$
    – Phil
    Commented May 22, 2022 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .