godot-blender-exporter
godot-blender-exporter copied to clipboard
Added warning and skip objects with negative scale
Added a warning and ignore objects with negative scale, as a basic way to deal with Issue #24
Awesome thanks, ah that's much nicer with the logging. About fully negative scale , I'll do a test and if there's away to show/ allow that I'll certainly try.
On Sat, 31 Oct 2020, 3:33 pm Lu Jiacheng, [email protected] wrote:
@Jason0214 approved this pull request.
Thanks for the change!
In io_scene_godot/export_godot.py https://github.com/godotengine/godot-blender-exporter/pull/367#discussion_r515507865 :
@@ -156,6 +156,10 @@ def export_object(self, obj, parent_gd_node):
def should_export_object(self, obj): """Checks if a node should be exported:"""
for dimension in obj.scale:
Just for your information, looks like scale with all dimensions being negative is valid in Godot (godotengine/godot#26173 https://github.com/godotengine/godot/issues/26173), but with some limitations. I am okay with your implementation by skipping any negative scale object.
In io_scene_godot/export_godot.py https://github.com/godotengine/godot-blender-exporter/pull/367#discussion_r515508419 :
@@ -156,6 +156,10 @@ def export_object(self, obj, parent_gd_node):
def should_export_object(self, obj): """Checks if a node should be exported:"""
for dimension in obj.scale:
if dimension < 0:
logging.info("Negative scale is unsupported, Object '%s' was skipped", obj.name)
May be better to use logging.warning(), we have a hook https://github.com/godotengine/godot-blender-exporter/blob/master/io_scene_godot/export_godot.py#L72 to show warning messages to the GUI. Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot-blender-exporter/pull/367#pullrequestreview-521147359, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2CWRHEW7YNFFSVUPOTJF3SNQU6LANCNFSM4SM4MNEA .