4
$\begingroup$

I love that you can hover your mouse over most of the blender settings and a help bubble pops up and lets you know where the python equivalent attribute lives. However if the location is long it is chopped down with '...' essentially making the-hard-to find attributes harder to find.

enter image description here

Is there a way to disable the chopping so I can see the full path? Or are there other means that people use to find out where stuff lives, aside from searching the code-base?

(searching the code base can suck if the same attribute name is used in many areas of Blender, and even if you find where it is defined, the full path may not be obvious.)

For example, I am looking for the Cycles bake settings attributes, such as "Selected to Active" which is different from the Blender Render "Selected to Active" which lives here: context.scene.render.use_bake_selected_to_active

The Cycles version is truncated to this: bpy.data.scenes["Scene"]...use_selected_to_active

$\endgroup$
4
  • $\begingroup$ You are correct Gandalf3, I did not see that when searching. I am happy to see your comment that says this is fixed in 2.72. That is worthy of downloading a daily build in and of itself! $\endgroup$
    – PolyMesh
    Commented Aug 5, 2014 at 5:32
  • $\begingroup$ Unfortunately I was about to delete that comment, because I just tested it on the checkbox you mentioned and there are still ellipses :( Still, the tooltips are a little bit nicer.. $\endgroup$
    – gandalf3
    Commented Aug 5, 2014 at 5:33
  • 1
    $\begingroup$ Nooooooooooooo! $\endgroup$
    – PolyMesh
    Commented Aug 5, 2014 at 5:36
  • $\begingroup$ This conversation has left me checking chuckling. $\endgroup$
    – Keavon
    Commented Aug 8, 2014 at 7:10

1 Answer 1

3
$\begingroup$

In such cases you could have a look at the source code. Click RMB while the mouse cursor is over the property to open the context menu, select Edit Source.

  • Open a text editor and select the loaded file, you will notice that the cursor is already positioned at the property.

  • In this case the line is:

    sub.prop(cbk, "use_selected_to_active") (line:1258)

Ok, this is what you already knewd , the cbk is another variable holding the context of this property a few lines above (line:1242) you will find the definition.

cbk = scene.render.bake

Now you can assemble the parts to the full path and test it in the console window:

>>> import bpy
>>> print(bpy.data.scenes["Scene"].render.bake.use_selected_to_active)
True

Note: Line numbers are valid for official 2.71, One could have used the D shortcut for bpy.data.

$\endgroup$

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