1
Fork 0

Add preset material, pull more variables into the template #5

Merged
danreeves merged 8 commits from improved-material-support-1 into master 2025-04-22 10:28:40 +02:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit f8f2a955ea - Show all commits

View file

@ -198,12 +198,12 @@ classes = [
def import_template():
cwd = os.path.dirname(os.path.realpath(__file__))
blendfile = cwd + "\\BitsquidPBR.blend"
section = "\\Material\\"
blendfile = "BitsquidPBR.blend"
section = "Material"
object = "Stingray Standard"
filepath = blendfile + section + object
directory = blendfile + section
filepath = os.path.join(cwd, blendfile, section, object)
directory = os.path.join(cwd, blendfile, section)
filename = object
bpy.ops.wm.append(

View file

@ -117,7 +117,7 @@ def save(self, context, material):
namespace['emissive'] = nodes["Emissive"].outputs[0].default_value
namespace['emissive_intensity'] = nodes["Emissive Intensity"].outputs[0].default_value
except:
print("Couldn't find Stingray Standard nodes")
self.report({'WARNING'}, "Couldn't find Stingray Standard nodes")
content = step.Template(template, strip=False).expand(namespace)