[Bf-python] RNA paths

James Crowther jamesharrycrowther at gmail.com
Wed Jun 8 09:34:44 CEST 2016


Hi there, I am experimenting with using RNA paths, I would really like a
way to access the bps.ops.ui.copy_data-_path_button() from python. however
it doesn't look like this is possible. I have also tried using the method
path_from_id() with no argument on a number of id blocks but I don't think
I understand what this is really used for since it keeps on giving me the
following error:

>>> D.materials['Material'].path_from_id()
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ValueError: Material.path_from_id() does not support path creation for this
type

I have tried this with other ID blocks but keep getting the same error.

Currently running 2.76 on windows 7 can do a system info dump if that would
help.

My current goal is to be able to generate a path to the active object
dynamically in python so something like bpy.data.objects['Cube']

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20160608/d6b4991e/attachment.html>


More information about the Bf-python mailing list