-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve the binding hash to the shader resource binding name (#70)
Added NameHashValueHandler, which creates crc32 lookup table for the shader resource binding names Colorized some decorators for better readability ![NameHashValueHandler](https://github.com/ShadelessFox/decima/assets/49768797/555cff3e-ce46-4044-8215-bb25b42f0907) Extended ModelViewer for *MeshResourcePart types Extended texture decorator and viewer: Added selector for "MenuStreamingTexture" and "UITextureBindingOverride" types ![MultiMeshParts+MenuStreamingTextures](https://github.com/ShadelessFox/decima/assets/49768797/9f22927f-f526-4116-99c6-8452516f9cb0) --------- Co-authored-by: ShadelessFox <[email protected]>
- Loading branch information
1 parent
2ae0d26
commit 9b0fc57
Showing
17 changed files
with
549 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...es/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/MeshResourcePartHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.shade.decima.ui.data.handlers; | ||
|
||
import com.shade.decima.model.rtti.RTTIType; | ||
import com.shade.decima.model.rtti.objects.RTTIObject; | ||
import com.shade.decima.ui.data.registry.ValueHandlerRegistration; | ||
import com.shade.decima.ui.data.registry.ValueHandlerRegistration.Selector; | ||
import com.shade.decima.ui.data.registry.ValueHandlerRegistration.Type; | ||
import com.shade.util.NotNull; | ||
import com.shade.util.Nullable; | ||
|
||
import javax.swing.*; | ||
|
||
@ValueHandlerRegistration(id = "meshPart", name = "Mesh part", value = { | ||
@Selector(type = @Type(name = "MultiMeshResourcePart")), | ||
@Selector(type = @Type(name = "LodMeshResourcePart")) | ||
}) | ||
public class MeshResourcePartHandler extends ObjectValueHandler { | ||
@Nullable | ||
@Override | ||
public Decorator getDecorator(@NotNull RTTIType<?> type) { | ||
return (value, component) -> { | ||
final RTTIObject obj = (RTTIObject) value; | ||
ReferenceValueHandler.INSTANCE.getDecorator(type).decorate(obj.get("Mesh"), component); | ||
}; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public Icon getIcon(@NotNull RTTIType<?> type) { | ||
return UIManager.getIcon("Node.modelIcon"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.