6
$\begingroup$

what is the most accurate way to get the full path for a value so I can use it in a single property drivers.

$\endgroup$

1 Answer 1

6
$\begingroup$

I prefer to use the outliner to find the data paths of variables. If you set the outliner type to 'Datablocks' you can see the whole RNA structure of the current Blender file. If you hover with your mouse over a property Blender will show you how you can access it using the python API:

enter image description here

$\endgroup$
2
  • $\begingroup$ If I want to get the path for the x location for an object,I go to the data block and then objects and then my object and then location and then the x location but I couldn't get it right he give me "location only with out the x axis.how can I get that. $\endgroup$
    – Omar Emara
    Feb 21, 2015 at 17:58
  • 1
    $\begingroup$ The location you get is a Python object of type Vector. You can access its x-value by adding .x to the data path. For the default cube this would be bpy.data.objects["Cube"].location.x. Alternatively you can access the vector components by index. ...location[0] also gives you the x value. The index of the y value is 1 and the index of the z value is 2 respectively. $\endgroup$
    – maddin45
    Feb 21, 2015 at 18:13

You must log in to answer this question.

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