Skip to content

Commit

Permalink
correct material range
Browse files Browse the repository at this point in the history
Clark was here :V
  • Loading branch information
ClarkThyLord committed Jan 16, 2021
1 parent 7da4268 commit 776866a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/Voxel-Core/controls/VoxelViewer/VoxelViewer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ func hide_texture_menu() -> void:
func show_material_menu(voxel := get_viewing_voxel()) -> void:
if is_instance_valid(MaterialMenu):
MaterialRef.value = Voxel.get_material(voxel)
MaterialRef.max_value = voxel_set.materials.size()
MaterialRef.max_value = voxel_set.materials.size() - 1
Metallic.value = Voxel.get_metallic(voxel)
Specular.value = Voxel.get_specular(voxel)
Roughness.value = Voxel.get_roughness(voxel)
Expand Down
42 changes: 38 additions & 4 deletions addons/Voxel-Core/controls/VoxelViewer/VoxelViewer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,23 @@ anchor_top = 0.366667
anchor_right = 0.34082
anchor_bottom = 0.646667
toggle_mode = true
voxel_color = Color( 0, 0, 0, 1 )
voxel_texture = null
voxel_id = -1
voxel_face = Vector3( 0, 0, 0 )
voxel_set = null

[node name="Front" parent="View2D" instance=ExtResource( 2 )]
anchor_left = 0.34082
anchor_top = 0.366667
anchor_right = 0.504883
anchor_bottom = 0.646667
toggle_mode = true
voxel_color = Color( 0, 0, 0, 1 )
voxel_texture = null
voxel_id = -1
voxel_face = Vector3( 0, 0, 0 )
voxel_set = null

[node name="Right" parent="View2D" instance=ExtResource( 2 )]
anchor_left = 0.504883
Expand All @@ -62,6 +72,11 @@ margin_top = 0.000335693
margin_right = -1.0
margin_bottom = 0.000335693
toggle_mode = true
voxel_color = Color( 0, 0, 0, 1 )
voxel_texture = null
voxel_id = -1
voxel_face = Vector3( 0, 0, 0 )
voxel_set = null

[node name="Back" parent="View2D" instance=ExtResource( 2 )]
anchor_left = 0.668945
Expand All @@ -72,20 +87,35 @@ margin_left = -0.999939
margin_top = 1.52588e-05
margin_right = -0.999939
toggle_mode = true
voxel_color = Color( 0, 0, 0, 1 )
voxel_texture = null
voxel_id = -1
voxel_face = Vector3( 0, 0, 0 )
voxel_set = null

[node name="Top" parent="View2D" instance=ExtResource( 2 )]
anchor_left = 0.34082
anchor_top = 0.0866667
anchor_right = 0.504883
anchor_bottom = 0.366666
toggle_mode = true
voxel_color = Color( 0, 0, 0, 1 )
voxel_texture = null
voxel_id = -1
voxel_face = Vector3( 0, 0, 0 )
voxel_set = null

[node name="Bottom" parent="View2D" instance=ExtResource( 2 )]
anchor_left = 0.34082
anchor_top = 0.646667
anchor_right = 0.504883
anchor_bottom = 0.926667
toggle_mode = true
voxel_color = Color( 0, 0, 0, 1 )
voxel_texture = null
voxel_id = -1
voxel_face = Vector3( 0, 0, 0 )
voxel_set = null

[node name="View3D" type="ViewportContainer" parent="."]
anchor_right = 1.0
Expand Down Expand Up @@ -190,10 +220,10 @@ __meta__ = {
}

[node name="VoxelColor" type="ColorPicker" parent="ColorMenu/VBoxContainer"]
margin_left = 36.0
margin_top = 36.0
margin_right = 360.0
margin_bottom = 521.0
margin_left = 40.0
margin_top = 40.0
margin_right = 364.0
margin_bottom = 525.0
size_flags_horizontal = 3
size_flags_vertical = 3
edit_alpha = false
Expand Down Expand Up @@ -250,6 +280,10 @@ margin_bottom = 219.0
size_flags_horizontal = 3
size_flags_vertical = 3
selection_max = 1
hovered_color = Color( 1, 1, 1, 0.6 )
selected_color = Color( 1, 1, 1, 1 )
invalid_color = Color( 1, 0, 0, 1 )
voxel_set = null

[node name="HBoxContainer" type="HBoxContainer" parent="TextureMenu/VBoxContainer"]
margin_top = 223.0
Expand Down
34 changes: 34 additions & 0 deletions assets/promo.jpg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/promo.jpg-cc4ade6b028ccd982c4f1e280b0afbf0.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/promo.jpg"
dest_files=[ "res://.import/promo.jpg-cc4ade6b028ccd982c4f1e280b0afbf0.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

0 comments on commit 776866a

Please sign in to comment.