diff --git a/addons/bitsquid/__init__.py b/addons/bitsquid/__init__.py index fbea03d..a1d32ef 100644 --- a/addons/bitsquid/__init__.py +++ b/addons/bitsquid/__init__.py @@ -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( diff --git a/addons/bitsquid/material/export.py b/addons/bitsquid/material/export.py index 34fe94a..adfb6e3 100644 --- a/addons/bitsquid/material/export.py +++ b/addons/bitsquid/material/export.py @@ -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)