Skip to content

Commit

Permalink
Adding dynamic filter function to hrt/prefab/Material.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
clementlandrin committed Oct 21, 2024
1 parent 70a1a8a commit bd56730
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hrt/prefab/Material.hx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class Material extends Prefab {
return obj;
}

public dynamic function filter(m : h3d.mat.Material) return true;

function renderProps() {
var cur = h3d.mat.MaterialSetup.current;
var setupName = cur.name;
Expand All @@ -65,6 +67,7 @@ class Material extends Prefab {
if (local3d == null)
local3d = findFirstLocal3d();
var mats = local3d.getMaterials();
mats = mats.filter(m -> filter(m));

#if editor
if (this.previewSphere != null)
Expand Down

0 comments on commit bd56730

Please sign in to comment.