Skip to content

Commit

Permalink
feat(udim): Add the new materials
Browse files Browse the repository at this point in the history
Add the new UDIM materials from 40 (Shiny Car Paint) to 49 (Fabric)

Close #175 Close #176
  • Loading branch information
StjerneIdioten authored Nov 23, 2023
1 parent 90516cb commit 5924672
Show file tree
Hide file tree
Showing 63 changed files with 30 additions and 11 deletions.
Binary file modified addon/i3dio/ui/icons/00_PaintedMetal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/01_PaintedPlastic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/02_Chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/03_Copper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/04_GalvanizedMetal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/05_Rubber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/06_PaintedMetalOld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/07_Fabric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/08_SilverScratched.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/09_SilverBumpy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/0_ColorMaterial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/10_Fabric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/11_Fabric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/12_Leather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/13_Leather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/14_Wood.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/15_Dirt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/16_PaintedMetal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/17_PaintedPlastic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/18_SilverRough.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/19_BrassScratched.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/1_ColorMaterial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/20_ReflectorWhite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/21_ReflectorRed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/22_Reflector_Yellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified addon/i3dio/ui/icons/23_ReflectorDaylight.png
Binary file modified addon/i3dio/ui/icons/24_GearShiftStickPlastic.png
Binary file modified addon/i3dio/ui/icons/25_Leather.png
Binary file modified addon/i3dio/ui/icons/26_PerforatedPlastic.png
Binary file modified addon/i3dio/ui/icons/27_GlassClear.png
Binary file modified addon/i3dio/ui/icons/28_GlassSquare.png
Binary file modified addon/i3dio/ui/icons/29_GlassLine.png
Binary file modified addon/i3dio/ui/icons/2_ColorMaterial.png
Binary file modified addon/i3dio/ui/icons/30_Palladium.png
Binary file modified addon/i3dio/ui/icons/31_Bronze.png
Diff not rendered.
Binary file modified addon/i3dio/ui/icons/33_HalfMetalNoise.png
Binary file modified addon/i3dio/ui/icons/34_GrayShinyPlastic.png
Binary file modified addon/i3dio/ui/icons/35_Gold.png
Binary file added addon/i3dio/ui/icons/36_RoughMetalPainted.png
Binary file removed addon/i3dio/ui/icons/36_RoughPaintedMetal.png
Diff not rendered.
Diff not rendered.
Binary file modified addon/i3dio/ui/icons/38_Fell.png
Binary file removed addon/i3dio/ui/icons/39_CorrugatedMetal.png
Diff not rendered.
Binary file added addon/i3dio/ui/icons/39_MetalDiamondPlate.png
Binary file modified addon/i3dio/ui/icons/3_ColorMaterial.png
Binary file added addon/i3dio/ui/icons/40_ShinyCarPaint.png
Binary file added addon/i3dio/ui/icons/41_Fabric.png
Binary file added addon/i3dio/ui/icons/42_Wood.png
Binary file added addon/i3dio/ui/icons/43_SilverScratchShiny.png
Binary file added addon/i3dio/ui/icons/44_ReflectorYellow.png
Binary file added addon/i3dio/ui/icons/45_CircularBrushed.png
Binary file added addon/i3dio/ui/icons/46_RubberPatterned.png
Binary file added addon/i3dio/ui/icons/47_GrayPlasticShiny.png
Binary file added addon/i3dio/ui/icons/48_ChromeLessShiny.png
Binary file added addon/i3dio/ui/icons/49_Fabric.png
Binary file modified addon/i3dio/ui/icons/4_ColorMaterial.png
Binary file modified addon/i3dio/ui/icons/5_ColorMaterial.png
Binary file modified addon/i3dio/ui/icons/6_ColorMaterial.png
Binary file modified addon/i3dio/ui/icons/7_ColorMaterial.png
41 changes: 30 additions & 11 deletions addon/i3dio/ui/udim_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,30 @@
# Stored in UDIM index order, starting from top-left corner (Makes it easy to show index order in ui)
# Will be valid as long as dictionaries are ordered (Which they are from CPython 3.6 and above)
udim_mapping = {
'33_GraphiteBlackPaintedMetal.png': {'name': 'Graphite Black Painted Metal', 'offset': [0, 4]},
'48_ChromeLessShiny.png': {'name': 'Chrome Less Shiny', 'offset': [0, 6]},
'49_Fabric.png': {'name': 'Fabric', 'offset': [1, 6]},
'PLACEHOLDER1': {'name': 'PLACEHOLDER', 'offset': [2, 6]},
'PLACEHOLDER2': {'name': 'PLACEHOLDER', 'offset': [3, 6]},
'PLACEHOLDER3': {'name': 'PLACEHOLDER', 'offset': [4, 6]},
'PLACEHOLDER4': {'name': 'PLACEHOLDER', 'offset': [5, 6]},
'PLACEHOLDER5': {'name': 'PLACEHOLDER', 'offset': [6, 6]},
'PLACEHOLDER6': {'name': 'PLACEHOLDER', 'offset': [7, 6]},
'40_ShinyCarPaint.png': {'name': 'Shiny Car Paint', 'offset': [0, 5]},
'41_Fabric.png': {'name': 'Fabric', 'offset': [1, 5]},
'42_Wood.png': {'name': 'Wood', 'offset': [2, 5]},
'43_SilverScratchShiny.png': {'name': 'Silver Scratched Shiny', 'offset': [3, 5]},
'44_ReflectorYellow.png': {'name': 'Reflector Yellow', 'offset': [4, 5]},
'45_CircularBrushed.png': {'name': 'Circular Brushed', 'offset': [5, 5]},
'46_RubberPatterned.png': {'name': 'Rubber Patterned', 'offset': [6, 5]},
'47_GrayPlasticShiny.png': {'name': 'Gray Plastic Shiny', 'offset': [7, 5]},
'32_GraphiteBlackPaintedMetal.png': {'name': 'Graphite Black Painted Metal', 'offset': [0, 5]},
'33_HalfMetalNoise.png': {'name': 'Half Metal Noise', 'offset': [1, 4]},
'34_GrayShinyPlastic.png': {'name': 'Gray Shiny Plastic', 'offset': [2, 4]},
'35_Gold.png': {'name': 'Gold', 'offset': [3, 4]},
'36_RoughPaintedMetal.png': {'name': 'Rough Painted Metal', 'offset': [4, 4]},
'37_PerforatedSyntheticFabric02.png': {'name': 'Perforated Synthetic Fabric', 'offset': [5, 4]},
'36_RoughMetalPainted.png': {'name': 'Rough Painted Metal', 'offset': [4, 4]},
'37_PerforatedSyntheticFabric.png': {'name': 'Perforated Synthetic Fabric', 'offset': [5, 4]},
'38_Fell.png': {'name': 'Fell', 'offset': [6, 4]},
'39_CorrugatedMetal.png': {'name': 'Corrugated Metal', 'offset': [7, 4]},
'39_MetalDiamondPlate.png': {'name': 'Corrugated Metal', 'offset': [7, 4]},
'24_GearShiftStickPlastic.png': {'name': 'Gear Shift Stick Plastic', 'offset': [0, 3]},
'25_Leather.png': {'name': 'Leather', 'offset': [1, 3]},
'26_PerforatedPlastic.png': {'name': 'Perforated Synthetic Fabric', 'offset': [2, 3]},
Expand Down Expand Up @@ -285,13 +301,16 @@ def draw(self, context):
grid = layout.grid_flow(row_major=True, columns=8, even_columns=True, even_rows=False)

for udim_id, udim_item in udim_mapping.items():
cell = grid.column().box()
cell.alignment = 'CENTER'
cell.label(text=udim_item['name'])
cell.template_icon(icon_value=preview_collections[udim_picker_preview_collection][udim_id].icon_id, scale=3)
o = cell.operator('i3dio.udim_mover', text='Select')
o.uv_offset = udim_item['offset']
o.mode = 'ABSOLUTE'
if (not udim_item['name'] == 'PLACEHOLDER'):
cell = grid.column().box()
cell.alignment = 'CENTER'
cell.label(text=udim_item['name'])
cell.template_icon(icon_value=preview_collections[udim_picker_preview_collection][udim_id].icon_id, scale=3)
o = cell.operator('i3dio.udim_mover', text='Select')
o.uv_offset = udim_item['offset']
o.mode = 'ABSOLUTE'
else:
grid.column().label(text='')

def execute(self, context):
return {'FINISHED'}
Expand Down

0 comments on commit 5924672

Please sign in to comment.