Added Cycles image texture support for Sketchfab uploader #51503

Closed
opened 2017-05-15 15:47:43 +02:00 by Florian Meyer · 9 comments
Member

Added Cycles image texture support

simple addition of cycles image texture nodes

pack_for_export.py

                for mat_slot in ob.material_slots:
                    #CYCLES RENDER
                    if bpy.context.scene.render.engine == 'CYCLES':
                        if not mat_slot.material:
                            continue
                        if not mat_slot.material.node_tree:
                            continue
                        imgnodes = [n for n in mat_slot.material.node_tree.nodes if n.type == 'TEX_IMAGE']
                        for node in imgnodes:
                            if node.image is not None:
                                images.add(node.image)
                    #BLENDER RENDER
                    else:
                        if not mat_slot.material:
                            continue
                        for tex_slot in mat_slot.material.texture_slots:
                            if not tex_slot:
                                continue
                            tex = tex_slot.texture
                            if tex.type == 'IMAGE':
                                image = tex.image
                                if image is not None:
                                    images.add(image)
Added Cycles image texture support simple addition of cycles image texture nodes [pack_for_export.py](https://archive.blender.org/developer/F599366/pack_for_export.py) ``` for mat_slot in ob.material_slots: #CYCLES RENDER if bpy.context.scene.render.engine == 'CYCLES': if not mat_slot.material: continue if not mat_slot.material.node_tree: continue imgnodes = [n for n in mat_slot.material.node_tree.nodes if n.type == 'TEX_IMAGE'] for node in imgnodes: if node.image is not None: images.add(node.image) #BLENDER RENDER else: if not mat_slot.material: continue for tex_slot in mat_slot.material.texture_slots: if not tex_slot: continue tex = tex_slot.texture if tex.type == 'IMAGE': image = tex.image if image is not None: images.add(image) ```
Brendon Murphy was assigned by Florian Meyer 2017-05-15 15:47:43 +02:00
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @florianfelix

Added subscriber: @florianfelix
Florian Meyer changed title from Added Cycles image texture support to Added Cycles image texture support for Sketchfab uploader 2017-05-15 15:51:21 +02:00

Added subscribers: @BartCrouch, @Sergey

Added subscribers: @BartCrouch, @Sergey

@BartCrouch, is that one for you? :)

@BartCrouch, is that one for you? :)
Member

Added subscriber: @GaiaClary

Added subscriber: @GaiaClary
Brendon Murphy removed their assignment 2017-05-27 01:28:01 +02:00
Gaia Clary was assigned by Brendon Murphy 2017-05-27 01:28:01 +02:00
Member

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

@GaiaClary
is this done?

@GaiaClary is this done?

This issue was referenced by 2edd24a4e6

This issue was referenced by 2edd24a4e6c5b77ddca88cbddaa581edf0d89e8b
Author
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 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#51503
No description provided.