Skip to content

Commit

Permalink
Multiple Texture Users Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspirata committed Jun 12, 2024
1 parent 4920971 commit 96287e0
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 151 deletions.
Binary file modified Animated Textures Test.blend
Binary file not shown.
7 changes: 5 additions & 2 deletions Mcblend Source/Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@

Absolute_Solver_Errors = {

"000": {
"Error Name": "Absolute Solver Error",
"Description": "Absolute Solver Can't Display This Error - {Data}, Please Report To Aspirata",
},

"001": {
"Error Name": "Unknown",
"Description": "An Unknown Error",
Expand Down Expand Up @@ -254,8 +259,6 @@

SSS_Materials = ["leaves", "grass", "tulip", "oxeye_daisy", "dandelion", "poppy", "blue_orchid", "torchflower", "lily_of_the_valley", "cornflower", "allium", "azure bluet"]

Biome_Fix_Materials = ["leaves", "grass", "water"]

Metal = ["iron", "gold", "copper", "diamond", "netherite", "minecart", "lantern", "chain", "anvil", "clock", "cauldron", "spyglass", "rail"]

Reflective = ["glass", "ender", "amethyst", "water", "emerald"]
Expand Down
19 changes: 11 additions & 8 deletions Mcblend Source/MCB_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ def InitOnStart():

def Absolute_Solver(error_code="None", data=None, err=None, error_name=None, description=None):

def GetASText(error_code, text, data=None):
try:
def GetASText(error_code, text, data=None):
if data != None:
return Absolute_Solver_Errors[error_code][text].format(Data=data)
else:
return Absolute_Solver_Errors[error_code][text]

if data != None:
return Absolute_Solver_Errors[error_code][text].format(Data=data)
bpy.ops.wm.absolute_solver('INVOKE_DEFAULT', Error_Code = error_code, Error_Name = (error_name if error_code != None else GetASText(error_code, "Error Name")), Description=(GetASText(error_code, 'Description')) if description == None else description.format(Data=data), Tech_Things = (str(err) if err != None else "None"))
else:
return Absolute_Solver_Errors[error_code][text]
bpy.ops.wm.absolute_solver('INVOKE_DEFAULT', Error_Code = error_code, Error_Name = (error_name if error_code != None else GetASText(error_code, "Error Name")), Description=(GetASText(error_code, 'Description')) if description == None else description, Tech_Things = (str(err) if err != None else "None"))
except:
bpy.ops.wm.absolute_solver('INVOKE_DEFAULT', Error_Code = "000", Error_Name = GetASText("000", "Error Name"), Description=GetASText("000", 'Description', error_code if error_code != None else error_name), Tech_Things = str(traceback.format_exc()))

if data != None:
bpy.ops.wm.absolute_solver('INVOKE_DEFAULT', Error_Code = error_code, Error_Name = (error_name if error_code != None else GetASText(error_code, 'Error Name')), Description=(GetASText(error_code, 'Description')) if description == None else description.format(Data=data), Tech_Things = str(err) if err != None else "None")
else:
bpy.ops.wm.absolute_solver('INVOKE_DEFAULT', Error_Code = error_code, Error_Name = (error_name if error_code != None else GetASText(error_code, 'Error Name')), Description=(GetASText(error_code, 'Description')) if description == None else description, Tech_Things = str(err) if err != None else "None")

def checkconfig(name):
if "const" in main_directory:
return Preferences_List["Dev"][name]
Expand Down
Binary file modified Mcblend Source/Materials/Materials.blend
Binary file not shown.
Loading

0 comments on commit 96287e0

Please sign in to comment.