material-maker/addons/material_maker/node_factory.gd
RodZill4 8006f07e04 Updates in transform and voronoi, and compatibility fix
- Fixed compatibility with v0.5 files
- Added a randomness parameter to voronoi
- Changed tranform order (translate applies first so rotate and scale are relative to the center of the source)
2019-10-12 07:10:25 +02:00

19 lines
399 B
GDScript

tool
extends Node
var includes
func _ready():
pass
func create_node(type):
var node = null
var file_name = "res://addons/material_maker/nodes/"+type+".tscn"
if ResourceLoader.exists(file_name):
var node_type = load(file_name)
if node_type != null:
node = node_type.instance()
if node == null:
node = preload("res://addons/material_maker/nodes/generic.tscn").instance()
return node