1
$\begingroup$

In blender menus, I can CTRL+C on a menu item and get it's full address (correct me if this is the wrong terminology) that is ready to paste in python code. In a properties window, there are some buttons that I can right click on and choose "Copy Python Command." However, if I right click on the X field in the Transform Location in the same Properties window, I only have the option "Copy Data Path" which puts the text "location" in the clipboard. If I hover over the same X field, I see at the bottom of the tool tip:

bpy.data.objects["Plane"].location[0]

Is there any way to copy this to the clipboard?

Here's why I'm doing this: I have an idea on how to simplify the workflow for Drivers to somewhat mimic similar functionality in the best compositor in the history of VFX; Shake (R.I.P.) and want to make a proof of concept for how this will work. Basically copying an address to a value number field and pasting that in another number field with the option of using it as part of an expression. The expression would be parsed and then executed via

exec()

and

eval()

commands.

So basically enabling expressions in a number field and allowing that expression to include updated values from object parameters.

I think that this would be a great addition to blender, but noone seems to be interested in the idea. But if I could show everyone what a great idea it is...

$\endgroup$
2
$\begingroup$

There are a number of keyboard shortcuts you can use to copy different forms of fields and components out of the interface.

The simplest is Ctrl+C - this copies the value of the field (eg, 0.0).

The next is Ctrl+Shift+C - this copies the local path to that value (eg, location).

Finally, you can use Ctrl+Shift+Alt+C - this copies the absolute path to that value (eg, bpy.data.objects["Cube"].location[0]).

$\endgroup$
  • $\begingroup$ And there it is. I thought I'd tried every key combination of CTRL SHIFT ALT & C, but I guess I missed the big one. $\endgroup$ – dpdp May 9 '18 at 14:39
  • 1
    $\begingroup$ It looks like Absolute Path was the terminology I was looking for. Thanks for the help, Rich. $\endgroup$ – dpdp May 9 '18 at 14:49

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.