Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dea write err when version 0.7.3 #3

Open
Esp9527 opened this issue Oct 12, 2020 · 4 comments
Open

dea write err when version 0.7.3 #3

Esp9527 opened this issue Oct 12, 2020 · 4 comments

Comments

@Esp9527
Copy link

Esp9527 commented Oct 12, 2020

` for instance in node_data['instances']:
instance_type = instance['instance_type']
instance_name = instance['instance_name']
bind_material = None

            if instance_type == 'CONT':
                instance_controller = SubElement(node, 'instance_controller', url=f'#{instance_name}-cont')
                bind_material = SubElement(instance_controller, 'bind_material')
            elif instance_type == 'GEOM':
                instance_controller = SubElement(node, 'instance_geometry', url=f'#{instance_name}-geom')
                bind_material = SubElement(instance_controller, 'bind_material')

            if instance_type in ['GEOM', 'CONT']:
                technique_common = SubElement(bind_material, 'technique_common')
                for bind in instance['binds']:
                    symbol = bind['symbol']
                    target = bind['target']

                    SubElement(technique_common, 'instance_material',
                               symbol=symbol,
                               target=f'#{target}')
        else:
            if parent_name != '':
                node.attrib['type'] = 'JOINT'

`

==>

` for instance in node_data['instances']:
instance_type = instance['instance_type']
instance_name = instance['instance_name']
bind_material = None

            if instance_type == 'CONT':
                instance_controller = SubElement(node, 'instance_controller', url=f'#{instance_name}-cont')
                bind_material = SubElement(instance_controller, 'bind_material')
            elif instance_type == 'GEOM':
                instance_controller = SubElement(node, 'instance_geometry', url=f'#{instance_name}-geom')
                bind_material = SubElement(instance_controller, 'bind_material')

            if instance_type in ['GEOM', 'CONT']:
                technique_common = SubElement(bind_material, 'technique_common')
                for bind in instance['binds']:
                    symbol = bind['symbol']
                    target = bind['target']

                    SubElement(technique_common, 'instance_material',
                               symbol=symbol,
                               target=f'#{target}')
        if parent_name != '' and len(node_data['instances']) == 0:
            node.attrib['type'] = 'JOINT'

`

@Esp9527
Copy link
Author

Esp9527 commented Oct 12, 2020

thank you for converter scw to dea
and when suport to pack geo scw and anim scw to gltf ;)

@danila-schelkov
Copy link
Owner

Can you give models that I can’t convert without this fix?

@Esp9527
Copy link
Author

Esp9527 commented Oct 12, 2020 via email

@Esp9527
Copy link
Author

Esp9527 commented Oct 12, 2020

i send a mail with a bea modal
i guest is that
if 'for...' no do 'break', then 'else ..,' will exec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants