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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-10Cleanup: Clang tidyHans Goudey
2022-06-09Cleanup: use C-style comments, add missing doxy sectionCampbell Barton
2022-06-09Cleanup: spelling in comments & variablesCampbell Barton
2022-06-08CMake: optionally disable OBJ, STL & GPencil SVG supportCampbell Barton
The following CMake options have been added (enabled by default), except for the lite build configuration. - WITH_IO_STL - WITH_IO_WAVEFRONT_OBJ - WITH_IO_GPENCIL (for grease pencil SVG importing). Note that it was already possible to disable grease pencil export by disabling WITH_PUGIXML & WITH_HARU. This is intended to keep the lite builds fast and small for building, linking & execution. Reviewed By: iyadahmed2001, aras_p, antoniov, mont29 Ref D15141
2022-06-07OBJ: Use filename as the default object nameJesse Yurkovich
To match the existing Python .obj importer, and to make it easier for the user to determine which object is which, use the filename for the default object name instead of "New object". Differential Revision: https://developer.blender.org/D15133
2022-06-07Cleanup: spelling in comments, additional white spaceCampbell Barton
2022-06-07Cleanup: compiler warnings: unused args, missing include, parenthesisCampbell Barton
2022-06-06STL: Add new C++ based STL importerIyad Ahmed
A new experimentatl STL importer, written in C++. Roughly 7-9x faster than the Python based one. Reviewed By: Aras Pranckevicius, Hans Goudey. Differential Revision: https://developer.blender.org/D14941
2022-06-04Cleanup: Use const for retrieved custom data layersHans Goudey
2022-06-04Cleanup: Use const, make formatHans Goudey
2022-06-03Constraints: introduce wrapper functions to access target lists.Alexander Gavrilov
Instead of directly accessing constraint-specific callbacks in code all over blender, introduce two wrappers to retrieve and free the target list. This incidentally revealed a place within the Collada exporter in BCAnimationSampler.cpp that didn't clean up after retrieving the targets, resulting in a small memory leak. Fixing this should be the only functional change in this commit. This was split off from D9732. Differential Revision: https://developer.blender.org/D13844
2022-06-03Cleanup: spelling in commentsCampbell Barton
2022-06-01Cleanup: use 'e' prefix for enum typesCampbell Barton
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
2022-05-23obj: remove unneeded CTX_data_ensure_evaluated_depsgraphAras Pranckevicius
As discussed on the chat and pointed out in D15015, that call is not needed there (none of the other importers do it either).
2022-05-23Fix T98293: Scene stats info not updated after new OBJ importAras Pranckevicius
The importer was not doing a notification that the scene has changed, so the bottom status bar scene stats info was not updated right after the new OBJ import. Reviewed By: Julian Eisel Differential Revision: https://developer.blender.org/D15015
2022-05-23Merge branch 'blender-v3.2-release'Aaron Carlisle
2022-05-20Fix wrong USD image color space export with non-default OpenColorIO configBrecht Van Lommel
The names of color spaces in OpenColorIO configs can be arbitrary, so don't use hardcoded names from our default config.
2022-05-18Cleanup: formatCampbell Barton
2022-05-17Cleanup: use term 'filepath' for full file pathsCampbell Barton
2022-05-16Fix std::optional value() build error on older macOS SDKBrecht Van Lommel
No longer happens on the buildbot, but for users building with an older Xcode, still need to avoid using value(). Differential Revision: https://developer.blender.org/D14883
2022-05-14Fix: Build error due to previous commitHans Goudey
2022-05-14Cleanup: Further use of const for retrieved custom data layersHans Goudey
Similar to cf69652618fefcd22b2cde9a2.
2022-05-13Cleanup: Use const when retrieving custom data layersHans Goudey
Knowing when layers are retrieved for write access will be essential when adding proper copy-on-write support. This commit makes that clearer by adding `const` where the retrieved data is not modified. Ref T95842
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-12OBJ: improve new importer file parsing performance on windowsAras Pranckevicius
The OBJ parser was primarily using StringRef for convenience, with functions like "skip whitespace" or "parse a number" taking an input stringref, representing an input line, and returning a new stringref, representing the remainder of the line. This is convenient, but does more work than strictly needed -- while parsing, only the "beginning" of the line ever changes by moving forward; the end of the line always stays the same. We can change the code to take a pair of pointers (begin of line, end of line) as input, and make the functions return the new begin of line pointer. This makes the return value neatly fit into a processor register, which StringRef did not. On Windows, this does result in non-trivial speedups in the actual OBJ file parsing part, due to Windows calling convention where return values larger than 64 bits are returned via memory. Does not measurably affect performance on Mac/Linux, because the calling convention there uses a pair of 64-bit registers to return a StringRef. End-to-end times of importing several test files, on Windows (VS2022 build, Ryzen 5950X): - Monkey subdivided to level 6, no normals (220MB file): 1.25s -> 0.85s - Rungholt minecraft level (270MB file): 7.0s -> 5.8s - Blender 3 splash scene (2.4GB file): 49.1s -> 45.5s The full import process has a lot of other overhead besides actual OBJ file parsing (mostly creating actual blender objects out of parsed data). In pure parsing, in the monkey test scene above, the parsing part goes 1.0s -> 0.6s. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14936
2022-05-12Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-11Cleanup: fix compiler warnings on macOSLoren Osborn
Differential Revision: https://developer.blender.org/D14917
2022-05-11Cleanup: formatCampbell Barton
2022-05-10Merge branch 'blender-v3.2-release'Aras Pranckevicius
2022-05-10Fix T96399: New 3.1 OBJ exporter is missing Path Mode settingAras Pranckevicius
New OBJ exporter is missing "Path Mode" setting for exporting .mtl files. The options that used to be available were: Auto, Absolute, Relative, Match, Strip Path, Copy. All of them are important. The new behavior (without any UI option to control it) curiously does not match any of the previous setting. New behavior is like "Relative, but to the source blender file, and not the destination export file". Most of the previous logic was only present in Python based code (bpy_extras.io_utils.path_reference and friends). The bulk of this commit is porting that to C++. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14906
2022-05-06obj: move parsing utilities out of io_common, since they are fairly obj specificAras Pranckevicius
As pointed out in https://developer.blender.org/rB213cd39b6db387bd88f12589fd50ff0e6563cf56#341113, the utilities are quite OBJ specific due to treating backslash as a line continuation character. It's unlikely that other formats need that. No functionality changes, just pure code move (and renamed tests so that their names reflect obj). Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D14871
2022-05-06USD: add volume/VDB exportPiotr Makal
Add support for volume (OpenVDB) USD export: - Allows to export both static and animated volumes. - Supports volumes that have OpenVDB data from files or are generated in Blender with 'Mesh to Volume' modifier. - For volumes that have generated data in Blender it also exports corresponding .vdb files. Those files are saved in a new folder named "volumes". - Slightly changes the USD export UI panel. "Relative Texture Paths" becomes "Relative Paths" (and has separate UI box) as the functionality will now apply to both textures and volumes. Disabling of this option due to "Materials" checkbox being turned off has been removed. Reviewed By: sybren, makowalski Differential Revision: https://developer.blender.org/D14193 Manifest Task: T95407
2022-05-05Merge branch 'blender-v3.2-release'Aras Pranckevicius
2022-05-05Fix T97863: new OBJ importer issues with extra whitespace after "f" keywordsAras Pranckevicius
While possible extra whitespace after all OBJ/MTL keywords was properly skipped, it was not done for the "f" (face definition) keyword. While at it, also support indented keywords, i.e. extra whitespace at the beginning of the line. There's a tiny bit of performance drop while importing (e.g. importing blender 3.0 splash scene: 53.38sec -> 54.21sec on my machine). But correctness is more important. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14854
2022-05-05Cleanup: sort cmake file listsCampbell Barton
2022-05-04Merge branch 'blender-v3.2-release'Aras Pranckevicius
2022-05-04Fix T97794: new OBJ importer does not handle quoted MTL pathsAras Pranckevicius
Fixes T97794 (which is a reintroduction of an older issue T67266 that has been fixed in the python importer, but the fix was not in the C++ one). Some software produces OBJ files with mtllib statements like mtllib "file name in quotes.mtl", and the new importer was not stripping the quotes away. While at it, I noticed that MTLParser constructor was taking a StringRef and treating it as a zero-terminated string, which is not necessarily the case. Fixed that by explicitly using a StringRefNull type. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14838
2022-05-03Merge branch 'blender-v3.2-release'Aras Pranckevicius
2022-05-03Fix T97793, Fix T97795: Use correct defaults for missing values in new OBJ ↵Aras Pranckevicius
importer - Fix T97793: when a UV coordinate after vt is missing, use zero. While at it, also use zeroes for positions & normals, since "maximum possible float" is very likely to cause issues in imported meshes. - Fix T97795: use 1.0 default if -bm value is missing, instead of zero. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14826
2022-05-03Fix T97757: Some MTL import correctness issues in the new OBJ importerAras Pranckevicius
Fix several correctness issues where the new OBJ/MTL importer was not producing the same results as the old one, mostly because the code for some reason had slightly different logic. Fixes T97757: - When .obj file tries to use a material that does not exist, the code was continuing to use the previous material, instead of creating new default one, as the previous importer did. - Previous importer was always searching/parsing "foo.mtl" for a "foo.obj" file, even if the file itself does not contain "mtllib foo.mtl" statement. One file from T97757 repros happens to depend on that, so resurrect that behavior. - When IOR (Ni) or Alpha (d) are not specified in .mtl file, do not wrongly set -1 values to the blender material. - When base (Kd) or emissive (Ke) colors are not specified in the .mtl file, do not set them on the blender material. - Roughness and metallic values used by viewport shading were not set onto blender material. - The logic for when metallic was set to zero was incorrect; it should be set to zero when "not using reflection", not when "mtl file does not contain metallic". - Do not produce a warning when illum value is not spelled out in .mtl file, treat as default (1). - Parse illum as a float just like python importer does, as to not reintroduce part of T60135. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14822
2022-05-03Cleanup: spelling in commentsCampbell Barton
2022-05-01Fix T97644: new 3.2 obj importer does not set blend mode for eeveeAras Pranckevicius
The old python importer had a "if do_transparency, set blend_method to BLEND" type of logic. This bit was missing in the new importer; it was only setting the eevee blend method when a transparency texture was present, but not in other cases of transparency (as driven by MTL "illum" mode). Reviewd By: Howard Trickey Differential Revision: https://developer.blender.org/D14783
2022-05-01Fix T97417: OBJ: support tab and other whitespace characters after obj/mtl ↵Aras Pranckevicius
keywords Even if available OBJ/MTL format documentations don't explicitly specify which characters can possibly separate keywords & arguments, turns out some files out there in the wild use TAB character after the line keywords. Which is something the new 3.2 importer was not quite expecting (T97417). Fix this by factoring out a utility function that checks if line starts with a keyword followed by any whitespace, and using that across the importer. Also fix some other "possible whitespace around name-like parts" of obj/mtl parser as pointed out by the repro files in T97417. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14782
2022-04-29Cleanup: missing declaration warnings & spelling in commentsCampbell Barton
2022-04-28Cleanup: Improve const correctness of shape key functionsHans Goudey
2022-04-22Cleanup: spelling in commentsCampbell Barton
2022-04-20Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLORHans Goudey
The "PROP" in the name reflects its generic status, and removing "LOOP" makes sense because it is no longer associated with just mesh face corners. In general the goal is to remove extra semantic meaning from the custom data types.
2022-04-20Cleanup: spelling in commentsCampbell Barton
2022-04-20Mesh: Avoid unnecessary normal calculation and dirty tagsHans Goudey
This is mostly a cleanup to avoid hardcoding the eager calculation of normals it isn't necessary, by reducing calls to `BKE_mesh_calc_normals` and by removing calls to `BKE_mesh_normals_tag_dirty` when the mesh is newly created and already has dirty normals anyway. This reduces boilerplate code and makes the "dirty by default" state more clear. Any regressions from this commit should be easy to fix, though the lazy calculation is solid enough that none are expected.
2022-04-19Cleanup: Use correct capitalization of "F-Curve"Aaron Carlisle