Skip to content

Patch v2.1.8 #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/godotvmf/godotvmt/vmt_loader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ static func load(path: String):

if material is ShaderMaterial:
var mat: ShaderMaterial = material;
if uniforms.find(key) > -1:
var is_texture = value.has("/");
var uniform_index: int = uniforms.find_custom(func(uniform): return uniform.name == key);
if uniform_index > -1:
var is_texture = uniforms[uniform_index].hint_string == "Texture2D";
mat.set_shader_parameter(key, VTFLoader.get_texture(value) if is_texture else value);
continue;

Expand Down
2 changes: 1 addition & 1 deletion addons/godotvmf/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="GodotVMF"
description="Allows use VMF files in Godot"
author="H2xDev"
version="2.1.7"
version="2.1.8"
script="godotvmf.gd"
11 changes: 7 additions & 4 deletions addons/godotvmf/src/ValveIONode.gd
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
@tool
class_name ValveIONode extends Node3D;

static var named_entities = {};
static var named_entities := {};
static var scene_instance: Node = null;

## Assigns global targetname for the node
static func define_alias(name: String, value: Node):
if name == '!self' or name in aliases:
if name == '!self':
VMFLogger.error('The alias "' + name + '" is already defined');
return;

aliases[name] = value;

static func remove_alias(name: String):
if name in aliases:
aliases.erase(name);

@export var entity := {};
@export var enabled := true;
@export var flags: int = 0;

var config:
get: return VMFConfig;
var config := VMFConfig;

static var aliases: Dictionary = {};

Expand Down