Skip to content

Commit

Permalink
Fixes for Unreal export (should not need python path setup anymore).
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Jan 13, 2025
1 parent fef6c93 commit c759fbc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/material_maker/engine/nodes/gen_material.gd
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ func export_material(prefix : String, profile : String, size : int = 0) -> void:
export_context["$(path_prefix)"] = prefix
export_context["$(file_prefix)"] = prefix.get_file()
export_context["$(dir_prefix)"] = prefix.get_base_dir()
export_context["$(material_maker_path)"] = MMPaths.get_resource_dir()
export_context["$(path_separator)"] = "/"
var exported_files : Array = []
var overwrite_files : Array = []
var export_profile = get_export(profile)
Expand Down
2 changes: 2 additions & 0 deletions addons/material_maker/nodes/material.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,8 @@
"file_name": "$(path_prefix).py",
"template": [
"import unreal",
"import sys",
"sys.path.append('$(material_maker_path)$(path_separator)export')",
"import mm",
"from importlib import reload",
"reload(mm)",
Expand Down
2 changes: 2 additions & 0 deletions addons/material_maker/nodes/material_dynamic.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@
"prompt_overwrite": false,
"template": [
"import unreal",
"import sys",
"sys.path.append('$(material_maker_path)$(path_separator)export')",
"import mm",
"from importlib import reload",
"reload(mm)",
Expand Down
2 changes: 2 additions & 0 deletions addons/material_maker/nodes/material_raymarching.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@
"file_name": "$(path_prefix).py",
"template": [
"import unreal",
"import sys",
"sys.path.append('$(material_maker_path)$(path_separator)export')",
"import mm",
"from importlib import reload",
"reload(mm)",
Expand Down
2 changes: 2 additions & 0 deletions addons/material_maker/nodes/material_unlit.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@
"prompt_overwrite": false,
"template": [
"import unreal",
"import sys",
"sys.path.append('$(material_maker_path)$(path_separator)export')",
"import mm",
"from importlib import reload",
"reload(mm)",
Expand Down

0 comments on commit c759fbc

Please sign in to comment.