1
$\begingroup$

How to get active_texture.name via python? Or get active_texture[ID]?

(I mean a texture in active slot)

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

In this case, you can reference it from the brush it is applied to:

bpy.data.brushes['NameOfBrush'].texture

Or use the active brush (if the context is sculpt mode, texture mode, etc.):

bpy.context.brush.texture

Or:

bpy.context.sculpt.brush.texture

https://www.blender.org/api/blender_python_api_current/info_api_reference.html#indirect-data-access

$\endgroup$
2
  • 2
    $\begingroup$ The 2.66 version you use in your link is old - we now have a link that always points to the newest API www.blender.org/api/blender_python_api_current/ $\endgroup$
    – sambler
    Commented Aug 30, 2016 at 4:43
  • $\begingroup$ Fixed, thanks. I didn't know about the /blender_python_api_current/ trick! I normally just type 2.77 when I google something in the api b/c the search bar in the docs works horribly (you have to almost know the answer to what you are looking for to be able to find it). $\endgroup$
    – Jake Dube
    Commented Aug 30, 2016 at 10:57

You must log in to answer this question.

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