On Wed, Sep 12, 2018, 5:07 AM likage <dissidia....@gmail.com> wrote:

> Hi Justin, thank you for getting back.
>
> I added your code into my get_contents() function.
> It seems that only an item is being stored? Tried doing a `print
> it.text()`, it is only returning me `camera` as the result instead of the
> full path..
> As such, only that item is being appended with icon..
>
> Wondering if I had done it wrong in any case?
>


text() is always going to be equivalent to data(Qt.DisplayRole), which is
the split name component you set when you constructed the item. The full
Maya path is being stored as extra data in a custom role. So you need to do
data(self.MayaPath) to get that back again.

> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/a15b269f-180f-485a-88c3-8afd78fabbc3%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/a15b269f-180f-485a-88c3-8afd78fabbc3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0ZdjNmbBMQmP5EZwLvk4kRHPFTaha_BF7kBimHDtLncw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to