Changeset View
Changeset View
Standalone View
Standalone View
io_scene_x3d/export_x3d.py
| Context not available. | |||||
| fw('%.4f %.4f ' % x3d_v[0][slot_uv]) | fw('%.4f %.4f ' % x3d_v[0][slot_uv]) | ||||
| fw('" />\n') | fw('" />\n') | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| elif gpu_attr['type'] == gpu.CD_MCOL: | elif gpu_attr['type'] == gpu.CD_MCOL: | ||||
| if gpu_attr['datatype'] == gpu.GPU_DATA_4UB: | if gpu_attr['datatype'] == gpu.GPU_DATA_4UB: | ||||
| pass # XXX, H3D can't do | pass # XXX, H3D can't do | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| ident = ident[:-1] | ident = ident[:-1] | ||||
| Context not available. | |||||
| # ------------------------------------------------------ | # ------------------------------------------------------ | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| elif uniform['type'] == gpu.GPU_DYNAMIC_LAMP_DYNCOL: | elif uniform['type'] == gpu.GPU_DYNAMIC_LAMP_DYNCOL: | ||||
| # odd we have both 3, 4 types. | # odd we have both 3, 4 types. | ||||
| Context not available. | |||||
| elif uniform['datatype'] == gpu.GPU_DATA_4F: | elif uniform['datatype'] == gpu.GPU_DATA_4F: | ||||
| fw('%s<field name="%s" type="SFVec4f" accessType="inputOutput" value="%s 1.0" />%s\n' % (ident, uniform['varname'], value, field_descr)) | fw('%s<field name="%s" type="SFVec4f" accessType="inputOutput" value="%s 1.0" />%s\n' % (ident, uniform['varname'], value, field_descr)) | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| elif uniform['type'] == gpu.GPU_DYNAMIC_LAMP_DYNENERGY: | elif uniform['type'] == gpu.GPU_DYNAMIC_LAMP_DYNENERGY: | ||||
| # not used ? | # not used ? | ||||
| assert(0) | assert 0 | ||||
| elif uniform['type'] == gpu.GPU_DYNAMIC_LAMP_DYNVEC: | elif uniform['type'] == gpu.GPU_DYNAMIC_LAMP_DYNVEC: | ||||
| lamp_obj = uniform['lamp'] | lamp_obj = uniform['lamp'] | ||||
| Context not available. | |||||
| (lamp_id, material_id, uniform['varname'], field_descr)) | (lamp_id, material_id, uniform['varname'], field_descr)) | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| elif uniform['type'] == gpu.GPU_DYNAMIC_OBJECT_VIEWIMAT: | elif uniform['type'] == gpu.GPU_DYNAMIC_OBJECT_VIEWIMAT: | ||||
| frag_uniform_var_map[uniform['varname']] = None | frag_uniform_var_map[uniform['varname']] = None | ||||
| Context not available. | |||||
| '<ROUTE fromNode="%s" fromField="glModelViewMatrixInverse" toNode=%s toField="%s" />%s' % | '<ROUTE fromNode="%s" fromField="glModelViewMatrixInverse" toNode=%s toField="%s" />%s' % | ||||
| (H3D_TOP_LEVEL, material_id, uniform['varname'], field_descr)) | (H3D_TOP_LEVEL, material_id, uniform['varname'], field_descr)) | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| elif uniform['type'] == gpu.GPU_DYNAMIC_OBJECT_IMAT: | elif uniform['type'] == gpu.GPU_DYNAMIC_OBJECT_IMAT: | ||||
| frag_uniform_var_map[uniform['varname']] = None | frag_uniform_var_map[uniform['varname']] = None | ||||
| Context not available. | |||||
| field_descr = " <!--- Object Invertex Matrix '%s' -->" % obj.name | field_descr = " <!--- Object Invertex Matrix '%s' -->" % obj.name | ||||
| fw('%s<field name="%s" type="SFMatrix4f" accessType="inputOutput" value="%s" />%s\n' % (ident, uniform['varname'], value, field_descr)) | fw('%s<field name="%s" type="SFMatrix4f" accessType="inputOutput" value="%s" />%s\n' % (ident, uniform['varname'], value, field_descr)) | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| elif uniform['type'] == gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW: | elif uniform['type'] == gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW: | ||||
| pass # XXX, shadow buffers not supported. | pass # XXX, shadow buffers not supported. | ||||
| Context not available. | |||||
| #fw('%s<field name="%s" type="SFInt32" accessType="inputOutput" value="%s" />%s\n' % (ident, uniform['varname'], value, field_descr)) | #fw('%s<field name="%s" type="SFInt32" accessType="inputOutput" value="%s" />%s\n' % (ident, uniform['varname'], value, field_descr)) | ||||
| #print('test', len(uniform['texpixels'])) | #print('test', len(uniform['texpixels'])) | ||||
| else: | else: | ||||
| assert(0) | assert 0 | ||||
| else: | else: | ||||
| print("SKIPPING", uniform['type']) | print("SKIPPING", uniform['type']) | ||||
| Context not available. | |||||