Jump to content
nicoladanese

how to export material stylesheet

Recommended Posts

Hey!

I'm working on some material stylesheet for crowd, and I'm wondering if there's a way to export those rules to a separate file, so I can import it in different lighting scenes

cheers!

Share this post


Link to post
Share on other sites

In the Data Tree right-click on the stylesheet and select view JSON. You can view and save the stylesheet from there.

Share this post


Link to post
Share on other sites

Hey, thanks for your reply, I'm using 16.5 and it doesn't seem to work, I can't find the "view JSON" option...

Screenshot from 2019-07-09 16-47-39.png

Share this post


Link to post
Share on other sites
Posted (edited)

You can copy-paste text from the "Shaders" tab, its a stylesheets JSON data.

stylesheet.PNG.ef2c78a36d49bf271745603a3bf2cc0a.PNG

 

# Select Geometry node with a stylesheet and run the script

import hou
import json

geo = hou.selectedNodes()[0]
stylesheet_data = geo.parm('shop_materialstylesheet').eval()

dataFile = 'C:/temp/stylesheet.json'
json.dump(stylesheet_data, open(dataFile, 'w'), indent = 4)

 

Edited by kiryha

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×