Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5480)

Issue 5416057: Direct X Importer from littleneo

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by ideasman42
Modified:
12 years, 5 months ago
Reviewers:
ideasman42, jerome.le.chat
Base URL:
https://svn.blender.org/svnroot/bf-extensions/trunk/py/scripts/addons/
Visibility:
Public.

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+749 lines, -0 lines) Patch
A io_directx_bel/import_x.py View 1 chunk +749 lines, -0 lines 7 comments Download

Messages

Total messages: 1
ideasman42
12 years, 5 months ago (2011-11-21 07:01:49 UTC) #1
Review for inclusion in contrib, some suggestios are picky -- not essential, but
mixing the dicrectX namespace with bpy.data.* is not really acceptable IMHO, its
also not hard t o fix so once this is done, +1 for inclusion in contrib :)

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py
File io_directx_bel/import_x.py (right):

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py#newco...
io_directx_bel/import_x.py:73: reserved_type = [
(picky), suggest tuples since these are not edited.

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py#newco...
io_directx_bel/import_x.py:197: return [minor, major, format, accuracy]
(picky), again, better use tuple

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py#newco...
io_directx_bel/import_x.py:635: if tokens[childname]['type'] ==
'meshtexturecoords' :
(picky) multiple tokens[childname] lookups in this if block, could make this a
variable. to avoid multiple lookups, will be faster though probably this isnt a
bottleneck in the script.

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py#newco...
io_directx_bel/import_x.py:640: dprint('uv       : %s'%(len(uv)))
might want to comment dprint() for release, the string formatting is probably
slowing the script down a bit even if its not actually printing.

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py#newco...
io_directx_bel/import_x.py:669: if matname not in bpy.data.materials :
bad assumption - material might exist in the blend before import, in this case
it should not re-use.

another bad assumption is that the material name requested will be used, this
could result in making a new material every time since it will keep _not_
finding the material name used in the directx format.

http://www.blender.org/documentation/blender_python_api_2_60_4/info_gotcha.ht...

Suggest to use a name:material dictionary mapping as noted in the doc linked
above.

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py#newco...
io_directx_bel/import_x.py:693: if filename not in bpy.data.images :
again, bad assumption with naming.

http://codereview.appspot.com/5416057/diff/1/io_directx_bel/import_x.py#newco...
io_directx_bel/import_x.py:697: if filename not in bpy.data.textures :
again, bad assumption with naming.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b