Skip to content

Commit

Permalink
Fixed hide error when selecting disabled trails
Browse files Browse the repository at this point in the history
  • Loading branch information
EspeuteClement committed Sep 1, 2023
1 parent 1cb6374 commit 8aeba20
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hrt/prefab/l3d/Trails.hx
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ class Trails extends Object3D {
super.edit(ctx);

var trailContext = ctx.getContext(this);
var trail = trailContext == null ? create(null) : Std.downcast(trailContext.local3d, TrailObj);
var trailObj = trailContext == null ? null : Std.downcast(trailContext.local3d, TrailObj);
var props = ctx.properties.add(new hide.Element('
<div class="group" name="Trail Properties">
<dl>
Expand All @@ -858,14 +858,16 @@ class Trails extends Object3D {
</dl>
</div>
'),this, function(name:String) {
if(trailObj == null)
return;
if (name == "uvRepeat") {
trail.updateShader();
trailObj.updateShader();
}
if (name == "uvMode") {
trail.reset();
trailObj.reset();
}
if (name == "maxTriangles") {
trail.updateParams();
trailObj.updateParams();
}
});
//ctx.properties.addMaterial( trail.material, props.find("[name=Material] > .content"), function(_) data = trail.save());
Expand Down

0 comments on commit 8aeba20

Please sign in to comment.