5
$\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$
4
$\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$
  • $\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 '15 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 '15 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.