io_export_dxf: Fix exporting object with empty material slot #104554

Closed
Oxicid wants to merge 2 commits from (deleted):oxicid-dxf-empty-mat into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Contributor

The code is pretty weird, why duplicate the code and make so many variations of the default color?

Entity Color-> BYLAYER always gives an error, Entity Color-> Object Material gives an error if the object has no material, maybe we should disable these parameters? I don't see much sense in them.

Nevertheless, this fix allows to export object if default parameters were not affected #95835

The code is pretty weird, why duplicate the code and make so many variations of the default color? Entity Color-> BYLAYER always gives an error, Entity Color-> Object Material gives an error if the object has no material, maybe we should disable these parameters? I don't see much sense in them. Nevertheless, this fix allows to export object if default parameters were not affected #95835
Oxicid added 2 commits 2023-04-17 23:04:07 +02:00
Oxicid requested review from Brecht Van Lommel 2023-04-17 23:04:21 +02:00

Entity Color BYLAYER presumably is from the old layer system, that could be removed. Unless you want to update it to work with collections, but I have no problem with it getting removed.

For Entity Color-> Object Material, you could set ob_mat_color = [0.8, 0.8, 0.8, 1.0] so it uses a default color if there is no material.

Entity Color BYLAYER presumably is from the old layer system, that could be removed. Unless you want to update it to work with collections, but I have no problem with it getting removed. For Entity Color-> Object Material, you could set `ob_mat_color = [0.8, 0.8, 0.8, 1.0]` so it uses a default color if there is no material.
Oxicid closed this pull request 2023-04-18 19:34:04 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104554
No description provided.