-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added warning and skip objects with negative scale #367
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change!
@@ -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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for your information, looks like scale with all dimensions being negative is valid in Godot (godotengine/godot#26173), but with some limitations.
I am okay with your implementation by skipping any negative scale object.
io_scene_godot/export_godot.py
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, ***@***.***> wrote:
***@***.**** approved this pull request.
Thanks for the change!
------------------------------
In io_scene_godot/export_godot.py
<#367 (comment)>
:
> @@ -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
<godotengine/godot#26173>), but with some
limitations.
I am okay with your implementation by skipping any negative scale object.
------------------------------
In io_scene_godot/export_godot.py
<#367 (comment)>
:
> @@ -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
<#367 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH2CWRHEW7YNFFSVUPOTJF3SNQU6LANCNFSM4SM4MNEA>
.
|
Sorry it took so long, I'm quite new at using Git.
Added a warning and ignore objects with negative scale, as a basic way to deal with Issue #24