3
$\begingroup$

How To Append a Node group from another Blend file that is Present in my D drive on my windows computer. I wan't to Append a Material and path to my material is - - D:\2.8\Test01.blend\Material\Test_Material using a python script.

Can Anyone Help me Out ?

$\endgroup$
3
  • 1
    $\begingroup$ blender.stackexchange.com/a/92676/442 $\endgroup$ Commented Sep 26, 2019 at 7:21
  • $\begingroup$ This Script which you suggested is not loading my file path it is showing error - (Traceback (most recent call last): File "C:\Users\Rakesh\Desktop\Script.blend\Text", line 16, in <module> OSError: load: C:\Users\Rakesh\Desktop\Fire Shader Advanced.blend\Material failed to open blend file Error: Python script failed, check the message in the system console) $\endgroup$ Commented Sep 26, 2019 at 8:05
  • 1
    $\begingroup$ Also see blender.stackexchange.com/questions/139322 $\endgroup$ Commented Sep 26, 2019 at 9:42

1 Answer 1

2
$\begingroup$

I finally got the answer of this problem this scipt worked for me - I got this from somewhere on internet

import bpy
path = "/Users/Rakesh\Desktop/wallpapers/FIRE SHADER/Fire Shader Advanced.blend\\Material\\"
material_name = "domain"
bpy.ops.wm.append( filename = material_name, directory = path)
$\endgroup$
2
  • $\begingroup$ Could you please post your code? $\endgroup$ Commented Sep 28, 2019 at 11:27
  • $\begingroup$ I just Made a New Material and Imported it using this script - import bpy path = "/Users/Rakesh\Desktop/wallpapers/FIRE SHADER/Fire Shader Advanced.blend\\Material\\" material_name = "domain" bpy.ops.wm.append(filename=material_name,directory=path) $\endgroup$ Commented Sep 28, 2019 at 11:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.