Skip to content

Commit

Permalink
Export issues with Blender 3.1 (absolute-quantum#382)
Browse files Browse the repository at this point in the history
* Blender 3.1 bug with width

* Width bug with blender 3.10

* Update armature_manual.py

* Update atlas.py

* Update common.py

* Update importer.py

* Update armature.py
  • Loading branch information
Moustik06 authored and Mysteryem committed Jun 9, 2022
1 parent 56a4af4 commit 7e59d42
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tools/armature_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def execute(self, context):
def invoke(self, context, event):
context.scene.pose_to_shapekey_name = 'Pose'
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4))

def check(self, context):
# Important for changing options
Expand Down
2 changes: 1 addition & 1 deletion tools/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 5.3)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 5.3))

def check(self, context):
# Important for changing options
Expand Down
2 changes: 1 addition & 1 deletion tools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * dpi_scale)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * dpi_scale))

def draw(self, context):
if not error or len(error) == 0:
Expand Down
14 changes: 7 additions & 7 deletions tools/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 6)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 6))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -391,7 +391,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 3)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 3))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -555,7 +555,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4.5)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4.5))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -592,7 +592,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4.5)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4.5))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -629,7 +629,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4.5)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4.5))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -665,7 +665,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -963,7 +963,7 @@ def invoke(self, context, event):
self.eye_meshes_not_named_body = _eye_meshes_not_named_body

dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 6.1)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 6.1))

def check(self, context):
# Important for changing options
Expand Down
2 changes: 1 addition & 1 deletion ui/armature.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 3.25)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 3.25))

def check(self, context):
# Important for changing options
Expand Down
8 changes: 4 additions & 4 deletions updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def invoke(self, context, event):
global used_updater_panel
used_updater_panel = True
dpi_value = get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 8.2)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 8.2))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -216,7 +216,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4.1)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4.1))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -280,7 +280,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4.1)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4.1))

def check(self, context):
# Important for changing options
Expand Down Expand Up @@ -329,7 +329,7 @@ def execute(self, context):

def invoke(self, context, event):
dpi_value = get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4.6)
return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 4.6))

# def invoke(self, context, event):
# return context.window_manager.invoke_props_dialog(self)
Expand Down

0 comments on commit 7e59d42

Please sign in to comment.