Add support to Drag and Drop to FileHandlers #116047

Merged
Jesse Yurkovich merged 16 commits from guishe/blender:fh-dnd-support into main 2024-01-06 03:51:57 +01:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 9e6ed29cf8 - Show all commits

View File

@ -42,7 +42,8 @@ class ShaderScriptImport(bpy.types.Operator):
node_tree = context.material.node_tree
text_node = node_tree.nodes.new(type="ShaderNodeScript")
text_node.mode = 'EXTERNAL'
filepath = self.directory + '\\' + file.name
import os
filepath = os.path.join(self.directory, file.name)
text_node.filepath = filepath
text_node.location = Vector((x, y))
x += 20.0