# \[2.80\] Lily Surface Scraper: Import material from a simple URL

**URL:** <https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897>\
**Category:** Released Add-ons and Extensions\
**Tags:** add-ons, texturing, blender2-80\
**Created:** [April 28, 2019, 8:52pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897 "2019-04-28T20:52:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [April 28, 2019, 8:52pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/1 "2019-04-28T20:52:32Z")

</div>

> **[GitHub - eliemichel/LilySurfaceScraper: Import shaders end environments in...](https://github.com/eliemichel/LilySurfaceScraper)**
>
> Import shaders end environments in Blender from a single URL - GitHub - eliemichel/LilySurfaceScraper: Import shaders end environments in Blender from a single URL

Download [LAST RELEASE](https://github.com/eliemichel/LilySurfaceScrapper/releases/latest) on GitHub.

[![](https://blenderartists.org/uploads/default/original/4X/1/0/4/1045ec3521aeeaeef9b16200e81eebe65b223e48.jpeg "Two-clicks away from any Blender material, using Lily Surface Scrapper") ](https://www.youtube.com/watch?v=KfEhjxvia0Q)

[![](https://blenderartists.org/uploads/default/original/4X/e/7/d/e7d7433c6e81cf0f0b5dbad5084d0ff13fd6167b.jpeg "LilySurfaceScrapper - v1.3.0 - Import from Local Directory") ](https://www.youtube.com/watch?v=BXbNA3nN_HI)

![paste-url](https://blenderartists.org/uploads/default/original/4X/9/a/6/9a6ef6f3f3fc21bdea231dccff2b3e70ebb5d4df.png)

 ![ies-lights](https://blenderartists.org/uploads/default/original/4X/c/8/0/c8094531b5496c1ef6178c4b7da6785517bb6645.jpeg)

Hello, I release a script to import materials from online libraries like CC0Textures and cgbookcase by just copy-pasting the URL. That way, one can just browse the website, then quickly import the material.

You can find more information and the download link on the GitHub page, but I need your help for two things:

- Finding **more sources of textures**. I am open to suggestions, and I made it as easy as possible for one to implement a new scrapper, see the README.

- Telling me the proper way of **including third party modules** in a Blender add-on. This add-on relies on lxml, so I just copied it in my repository, but it is not clean at all, and I will have to ask linux users to send me their version of lxml so that I can add it to the repo. Anybody knows about this?

Hope you’ll enjoy it!

[edit]  
Supported sources so far

Materials:

- cgbookcase: [https://www.cgbookcase.com](https://www.cgbookcase.com)
- CC0Textures: [https://cc0textures.com](https://cc0textures.com)
- TextureHaven: [https://texturehaven.com](https://texturehaven.com)

Worlds:

- HDRI Haven: [https://hdrihaven.com/](https://hdrihaven.com/)

Lights:

- IES Library: [https://ieslibrary.com/](https://ieslibrary.com/)

---

<div class="post-metadata">

**Author:** ![uruburei](https://blenderartists.org/letter_avatar_proxy/v4/letter/u/5f9b8f/32.png) [@uruburei](https://blenderartists.org/u/uruburei)\
**Post date:** [April 28, 2019, 10:26pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/2 "2019-04-28T22:26:44Z")

</div>

Thank you this is very useful and fast.

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [April 28, 2019, 10:52pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/3 "2019-04-28T22:52:28Z")

</div>

I just added support for [TextureHaven](https://texturehaven.com/), hence a v1.0.1:

> **[Release Lily Surface Scraper v1.0.1 · eliemichel/LilySurfaceScraper](https://github.com/eliemichel/LilySurfaceScraper/releases/tag/v1.0.1)**
>
> New minor update, to test the flexibility of adding a new scrapper.
> Changelog
> 
> Added a new source: https://texturehaven.com

---

<div class="post-metadata">

**Author:** ![horstk](https://blenderartists.org/letter_avatar_proxy/v4/letter/h/4da419/32.png) [@horstk](https://blenderartists.org/u/horstk)\
**Post date:** [April 28, 2019, 11:44pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/4 "2019-04-28T23:44:40Z")

</div>

uhh, I’ll try this one out tomorrow. Looks super nice

---

<div class="post-metadata">

**Author:** ![draguu](https://blenderartists.org/user_avatar/blenderartists.org/draguu/32/15444_2.png) [@draguu](https://blenderartists.org/u/draguu)\
**Post date:** [April 29, 2019, 7:04am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/5 "2019-04-29T07:04:30Z")

</div>

got error

```auto
Traceback (most recent call last):
  File "/home/weybec02/Downloads/blender-2.80-337cac760ba9-linux-glibc224-x86_64/2.80/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__ (module_name)
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/ __init__.py", line 36, in <module>
    from . import frontend
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/frontend.py", line 26, in <module>
    from .CyclesMaterialData import CyclesMaterialData
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/CyclesMaterialData.py", line 27, in <module>
    from .MaterialData import MaterialData
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/MaterialData.py", line 26, in <module>
    from .Scrappers.AbstractScrapper import AbstractScrapper
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/Scrappers/AbstractScrapper.py", line 30, in <module>
    from lxml import etree
ImportError: cannot import name 'etree' from 'lxml' (/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/site-packages/lxml/ __init__.py)

```

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [April 29, 2019, 7:19am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/6 "2019-04-29T07:19:41Z")

</div>

@draguu This was expected for linux users, but hopefully can be easily solved.

The problem is that I don’t have a linux at hand at the moment. Can you install lxml on your system (or in a python virtual env) using `pip3.7 install lxml`, then browse to /usr/lib/python3.7/site-packages and copy the lxml directory? I will add it to the repository so that it works for everybody out of the box.

---

<div class="post-metadata">

**Author:** ![draguu](https://blenderartists.org/user_avatar/blenderartists.org/draguu/32/15444_2.png) [@draguu](https://blenderartists.org/u/draguu)\
**Post date:** [April 29, 2019, 10:14am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/7 "2019-04-29T10:14:02Z")

</div>

i did pip instal lxml, and copied lxml to blender2.8 python lib but it didnt work

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [April 29, 2019, 2:21pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/8 "2019-04-29T14:21:45Z")

</div>

Yes, because it still tries to load the lxml provided with the addon. Can you zip me the lxml lib so that I can embed it? And did you check that you downloaded the python3.7 version? It has to match Blender’s Python, which is 3.7.

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [May 1, 2019, 11:03pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/9 "2019-05-01T23:03:32Z")

</div>

@draguu I finally put a hand on the linux binaries for lxml, so the new version the Lily Surface Scrapper now works on linux!

This new release also introduces the import of Worlds from [HDRI Haven](https://hdrihaven.com/).

> **[Release Lily Surface Scraper v1.1.0 · eliemichel/LilySurfaceScraper](https://github.com/eliemichel/LilySurfaceScraper/releases/tag/v1.1.0)**
>
> Introducing Sky Scrapping!
> 
> Changelog
> 
> Add lxml binaries for linux
> Add World scrapping
> New source: HDRI Haven https://hdrihaven.com/

---

<div class="post-metadata">

**Author:** ![draguu](https://blenderartists.org/user_avatar/blenderartists.org/draguu/32/15444_2.png) [@draguu](https://blenderartists.org/u/draguu)\
**Post date:** [May 2, 2019, 6:26am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/10 "2019-05-02T06:26:04Z")

</div>

still got some errors

```auto
Traceback (most recent call last):
  File "/home/weybec02/Downloads/blender-2.80-337cac760ba9-linux-glibc224-x86_64/2.80/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__ (module_name)
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/ __init__.py", line 36, in <module>
    from . import frontend
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/frontend.py", line 26, in <module>
    from .CyclesMaterialData import CyclesMaterialData
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/CyclesMaterialData.py", line 26, in <module>
    from .MaterialData import MaterialData
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/MaterialData.py", line 24, in <module>
    from .ScrappersManager import ScrappersManager
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/ScrappersManager.py", line 26, in <module>
    from .Scrappers.AbstractScrapper import AbstractScrapper
  File "/home/weybec02/.config/blender/2.80/scripts/addons/LilySurfaceScrapper/Scrappers/AbstractScrapper.py", line 30, in <module>
    from lxml import etree
ImportError: cannot import name 'etree' from 'lxml' (/home/weybec02/Downloads/blender-2.80-337cac760ba9-linux-glibc224-x86_64/2.80/python/lib/python3.7/lxml/ __init__.py)

```

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [May 2, 2019, 6:50am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/11 "2019-05-02T06:50:46Z")

</div>

The `lxml` directory in `2.80/python/lib/python3.7` is the one you copied manually, right? You should remove it since it shadows the lxml of the add-on. I suspect it is for a slightly different version of python (maybe 3.6).

---

<div class="post-metadata">

**Author:** ![loveordie](https://blenderartists.org/letter_avatar_proxy/v4/letter/l/57b2e6/32.png) [@loveordie](https://blenderartists.org/u/loveordie)\
**Post date:** [May 2, 2019, 10:03am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/12 "2019-05-02T10:03:25Z")

</div>

![2019-05-02%2017-59-12%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE](https://blenderartists.org/uploads/default/original/4X/7/2/f/72f63387afcde27471b45885d391c80475fd61c4.png)  
I am using Linux too, and there isn’t a lxml directory in 2.80/python/lib/python3.7,the add-on doesn’t work,I don’t know why

---

<div class="post-metadata">

**Author:** ![RealityFox](https://blenderartists.org/letter_avatar_proxy/v4/letter/r/4bbf92/32.png) [@RealityFox](https://blenderartists.org/u/RealityFox)\
**Post date:** [May 2, 2019, 12:05pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/13 "2019-05-02T12:05:51Z")

</div>

Nice, love this idea. Where does it save everything? I can’t test it out at the moment.

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [May 2, 2019, 12:08pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/14 "2019-05-02T12:08:58Z")

</div>

@draguu @loveordie My bad, sorry, I messed up with the release zip, I just updated it:  
[https://github.com/eliemichel/LilySurfaceScrapper/releases/download/v1.1.0/LilySurfaceScrapper-v1.1.0.zip](https://github.com/eliemichel/LilySurfaceScrapper/releases/download/v1.1.0/LilySurfaceScrapper-v1.1.0.zip)

@RealityFox It creates a directory `LilySurface/` next to the blend file, and sort downloaded files per source site, then material name, then variant (1K, 2K, etc.). If you have several blend in the same folder, they share this directory and hence the add-on does not download again stuff that is already here. If needed I could add a way to customize this directory.

---

<div class="post-metadata">

**Author:** ![RealityFox](https://blenderartists.org/letter_avatar_proxy/v4/letter/r/4bbf92/32.png) [@RealityFox](https://blenderartists.org/u/RealityFox)\
**Post date:** [May 2, 2019, 12:48pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/15 "2019-05-02T12:48:13Z")

</div>

Dope, when I get home I’ll be sure to give this a go. Especially like how it works with hdri haven.

---

<div class="post-metadata">

**Author:** ![loveordie](https://blenderartists.org/letter_avatar_proxy/v4/letter/l/57b2e6/32.png) [@loveordie](https://blenderartists.org/u/loveordie)\
**Post date:** [May 2, 2019, 2:34pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/16 "2019-05-02T14:34:58Z")

</div>

It’s great! It works now!

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [May 7, 2019, 7:11am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/17 "2019-05-07T07:11:26Z")

</div>

The next release of BATS (Substance Painter inspired add-on) by [JoshuaKnauber](https://blenderartists.org/u/JoshuaKnauber) will use Lily Surface Scrapper if it is installed, as shown on the demo video:

> [@Layer Painter - Material Editing With Layers - RELEASED](https://blenderartists.org/t/bats-material-editing-with-layers-released/1141382/142):
>
> The awesome Lily Surface Scrapper addon now is supported by BATS. This means you can now enter a URL and import textures in a layer with just a few clicks! You can check the addon out here:

This explain the last two commits, making it easier for third party developpers to include Lily Surface Scrapper into their pipelines!

---

<div class="post-metadata">

**Author:** ![draguu](https://blenderartists.org/user_avatar/blenderartists.org/draguu/32/15444_2.png) [@draguu](https://blenderartists.org/u/draguu)\
**Post date:** [May 7, 2019, 10:38am UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/18 "2019-05-07T10:38:26Z")

</div>

super awesome … it works well now 🙂

---

<div class="post-metadata">

**Author:** ![uruburei](https://blenderartists.org/letter_avatar_proxy/v4/letter/u/5f9b8f/32.png) [@uruburei](https://blenderartists.org/u/uruburei)\
**Post date:** [May 7, 2019, 4:42pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/19 "2019-05-07T16:42:27Z")

</div>

It would be possible to save the top URLs in a dropdow field. not to be looking for a URL every time you need a new material. First you would search the general URL field for easier access to the material-specific URL.

---

<div class="post-metadata">

**Author:** ![Mink](https://blenderartists.org/user_avatar/blenderartists.org/mink/32/11683_2.png) [@Mink](https://blenderartists.org/u/Mink)\
**Post date:** [May 7, 2019, 9:19pm UTC](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897/20 "2019-05-07T21:19:12Z")

</div>

Mmh why not using the list of materials already present in the scene? Once a material has been downloaded, it is accessible in the drop down list as any material.

[Next page](https://blenderartists.org/t/2-80-lily-surface-scraper-import-material-from-a-simple-url/1157897.md?page=2)
