Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-09Fix T51658: Exporting and Importing OBJ Files isn't working.Bastien Montagne
Silly mistake in recent addition of Cycles basic material import...
2017-06-06Fix T51700: OBJ exporter would have inverted normals in some cases.Bastien Montagne
Applying a matrix with non-uniform negative scaling to a mesh requires normals (face winfing) to be inverted back to their original orientation!
2017-05-27OBJ import: Add basic support for Cycles shaders.Bastien Montagne
This code uses same wrapper as FBX importer to generate a basic nodal shader for Cycles material. Note that not all MTL features are supported, some might be possible to add later though.
2017-03-19OBJ IO: remove usage of register_module.Bastien Montagne
2017-03-19Cleanup: trailing spaceCampbell Barton
2017-01-17Fix T50453: Add option to OBJ export to apply render or preview modifiers.Bastien Montagne
2016-10-30Fix T49865: export .obj broke UVs.Bastien Montagne
This reverts rBAc553d7c0eb002a02e7, not actually sure why this change in precision of actually written value was done.
2016-09-15Fix T49357: OBJ importer cannot deal with texture names with spaces.Bastien Montagne
OBJ/MTL does not support spaces in filenames, but... users keep using them - and other exporters keep failing at being smart for the user here (like, replacing spaces with underscore etc.)... So now, when last part of a texture line is not giving any valid found image, we try backward adding more pieces to image filename until we find some existing file (hopefully). But again: please do not use spaces in filenames for OBJ, **THIS IS NOT SUPPORTED**!
2016-09-13Fix T49338: Export to OBJ add extra space to the texture file name on MTL fileSergey Sharybin
2016-04-05Avoid writing redundant zerosCampbell Barton
These values are always rounded to 4 decimal places so no need to write 6.
2016-03-29OBJ Import: prevent loading an image many timesCampbell Barton
When an MTL made multiple references to the same image, it would create a new data-block for each reference.
2016-03-19Fix T47831: Obj_Import_Problem.Bastien Montagne
Actually, think that's not valid OBJ (using '0' index instead of nothing when not assigning data to some face corner). But since supporting this is easy...
2016-02-02Fix T47299: Error writing MTL optionsCampbell Barton
2016-01-26Fix T47236: Error importing OBJCampbell Barton
Missed this in recent bytes -> string conversion
2016-01-22Fix T47219: OBJ import merges faces incorrectlyCampbell Barton
Invalid triangles were being detected as faces that looped back on themselves and had their edges dissolved. Now ignore invalid triangles entirely since they will never end up as faces in Blender.
2016-01-15Fix T47018: OBJ fails images search on win32Campbell Barton
Workaround for a bug in Python3.5, however bytes on win32 are deprecated so better not use them for file access at all.
2015-12-23Fix T47053: Problem while import/export of obj files.Bastien Montagne
Missing import of Vector...
2015-12-21Fix T47010: Blender OBJ UV's give issues with some appsCampbell Barton
Blender was sharing UV's for all vertices, while this is correct it was causing issues for Maya, 3ds Max & Unfold3D.
2015-11-07Remove unused operator argumentCampbell Barton
2015-10-13OBJ IO: add (limited) support for options of textures in MTL files.Bastien Montagne
This commit adds IO support for: * -o (offset texture) * -s (scale texture) * -bm (bump multiplier, used a normal factor) Note that it also fixes T46459.
2015-10-10Fix T46437: Dupli objects should also export themselves, not only their ↵Bastien Montagne
duplis... To be backported, should we need an 'a' release.
2015-08-13Fix T45766: Exported OBJ/MTL files do not include emissive lighting parameters.Bastien Montagne
ke/map_ke are not official .mtl specs, but seem to be rather common extension. map_ke was added three years ago to exporter only, this commit finishes the work by adding ke/map_ke to importer, and ke to exporter. NOTES: * mtl ke is a color, while in Blender emit is only a factor, using diffuse color. this implies there is some loss of data during import here. * I do not have the slightest idea about the range for ke values, so for now assuming a direct matching of Blender's emit value.
2015-07-12Fix T45378: Import obj with "keep vertex order" option on does not work.Bastien Montagne
Own stupid mistake with recent refactor of handling of partial missing indices of vnor/uvtex for face. Also, do not use '0' as special 'missing' value here, this is really brittle. Now using ellipsis instead, a bit more verbose but should be 100% safe. And fix one or two glitches from yesterday's changes too.
2015-07-11OBJ IO: add some progress report for user.Bastien Montagne
Use new 'progress_report' util module to do both a (basic) report of I/O progression, together with some logging/timing of main steps. We could probably go much further, but for now it will do. Also, using files as context manager, too!
2015-07-11Fix T45403: Error on OBJ export.Bastien Montagne
Own mistake in recent corrections in regarding material's ambient handling. Also, took the oportunity to fix a bit how shadings modes are handled (previously if read early, they could be overwritten by other later settings...).
2015-07-05Fix T45316: Obj loading/saving brightness inconsistency.Bastien Montagne
Fixes: * Wrong (off-by-one) import of specular hardness (aka specular exponent in OBJ). * Bad usage of world color when exporting ambient color (though it seems to make sense on first look, this is bad because impossible to 'undo' on import - merging data external to object itself). * Bad default values for diff/spec intensity in imported materials (OBJ does not have those, so we must assume they are 1.0). Thanks to Luke Brookes (propuke) for finding all those glitches! :)
2015-07-05Fix T45315: Obj loader incorrectly loading specular maps.Bastien Montagne
'map_Ks' is for specularity color, not secularity intensity (which seems to have no equivalent in OBJ).
2015-06-25Fix T45184: OBJ importer would add UV or clnor layers to all objects in ↵Bastien Montagne
split-import case. In case some parts have UVs and others not, when doing split import we have to avoid creating empty dummy UV layers for meshes that have no 'tex' data in .obj. Same goes for clnors.
2015-06-05Fix T44947: OBJ importer adding dummy empty matslot (in non-split case).Bastien Montagne
2015-04-24Fix T43487: Wavefront OBJ exporter should export more precise illum value in ↵Bastien Montagne
MTL file. Was a TODO actually, now we try to match better illum values with current mesh material. Also, using mirror color as Ka instead of ambient one, when mirror is enabled in blen mat.
2015-04-10Cleanup: imports (formatting)Campbell Barton
2015-03-24Fix T44089: restore default orientation axes of each addons to stae before ↵Bastien Montagne
rBAbfbabc0592b8. Now using a class factory to allow customization of those defaults axes, still way less verbose than previous code!
2015-03-17Fix T44106: Obj importer broken.Bastien Montagne
In fact, it's the OBJ file which is utterly broken (thousands of faces reusing the same vertex...). I think 'breakage' comes actually from change in bmesh (raising error when trying to get an edge with same vert in both items of the key), afaiks this is not different from old code in current importer. Anyway, working around this is easy and cheap, so... To be backported in final 2.74.
2015-03-09Edit recent commit, no need to assign dummy varsCampbell Barton
2015-03-09Fix T43934: import obj file fails ( error )Bastien Montagne
Stupid mistake in own recent work on OBJ...
2015-03-05Fix T43899: FBX and OBJ importers after new RNA API 'cleanup'.Bastien Montagne
Caused by rBc755d8fbb520fbcf2a, can understand we want a 'good' (sigh) naming before release, but please ensure code already using it is updated then...
2015-03-02Fix T43863: Some obj have three values per UV coordinate... sigh.Bastien Montagne
2015-03-01OBJ IO: More cleanup (mostly from pep8).Bastien Montagne
2015-03-01OBJ import/export cleanup.Danilo Bargen
Reviewers: mont29 Projects: #import_export Differential Revision: https://developer.blender.org/D1151
2015-02-27OBJ import: single vectors (vloc/vnor/vtex) may also be multiline :(Bastien Montagne
Issue reported by Daniel Salazar (ZanQdo) through IRC, thanks!
2015-02-19OBJ Importer: revert adding 'rel_index_process' helper.Bastien Montagne
Makes code nicer, but adds between 10 and 15% to parsing time... Not worth it.
2015-02-19Fix own error in rBAc307a89e281a2e8 - OBJ importer *do* have to ↵Bastien Montagne
tessellate/untessellate sometimes. Issue comes with ngons having holes (i.e. ngons using the same edge more than once). This is not supported in Blender, so we have to 'work around' it. However, we can limit this behavior to ngons actually 'blender-invalid', no need to do that systematically. So this commit still allows for much better performances with 'usual' ngons. Those with holes get back to previous performances, more or less. Many thanks to Campbell for the headup!
2015-02-18OBJ importer: some more minor cleanup.Bastien Montagne
Note I tried to make 'face' tuple a namedtuple, but this makes things significantly slower here (about ten percents), don't think it's worth it.
2015-02-18OBJ importer: more cleanup/factorization/simplification of the code...Bastien Montagne
2015-02-18OBJ importer: add support for (custom) normals.Bastien Montagne
Not much to say, pretty similar to how FBX custom normals import works...
2015-02-18OBJ exporter: enable normal export by default.Bastien Montagne
This is the main and best way to export complex shading...
2015-02-18OBJ Importer: Rework/cleanup of mesh generation code.Bastien Montagne
That code was doing some rather crazy things, like: * tessellating ngons, and un-tesselate them later; * use up to two bmesh transformations for each imported mesh; * ... Now, removed the 'use_ngons' option and all the tesselated mess, we always only work in polygon context, user can triangulate later if really needed. Got rid of all bmesh stuff. Also, some cleanup of 'old' fashioned code, like e.g. converting dict views to list before iterating on those... With pure-tessellated .obj, we gain nearly nothing (about 5% quicker - and much nicer code). With .obj containing a fair amount of ngons, we devide import time by six! E.g. with a test mesh of 475000 polygons (1100000 triangles), we go from 60 seconds (old code) to less than 10 seconds with new code!
2015-01-22Fix: replaced Python module "imp" with "implib"Sybren A. Stvel
Python 3.4.0 deprecated the "imp" module, and replaced it with "importlib". This changes imp.reload() into implib.reload(). Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1016
2015-01-14rename IOHelperOrientation -> OrientationHelperCampbell Barton
2015-01-14Use new IOHelperOrientation class to handle forward/up axes.Bastien Montagne
Helps ensuring common behavior, and saves quite a few lines of code, too...