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
2019-11-20Alembic: clean up exporter metadata codeSybren A. Stüvel
The Alembic file metadata object was created in one place, a bit of metadata was added, then it was passed along with other properties which were then injected as metadata in another function. This is now cleaned up. No functional changes.
2019-11-06Alembic: improved import/export of mesh normalsSybren A. Stüvel
This commit implements the change in behaviour described in T71246. In short: For export, per mesh: - Custom loop normals are defined → loop normals are exported. - One or more polys are marked flat → loop normals are exported. - Otherwise, no normals are exported. For import, when the Alembic mesh contains: - loop normals (kFacevaryingScope) → use as custom loop normals, and enble Auto Smooth to have Blender actually use them. - vertex normals (kVertexScope or kVaryingScope) → convert to loop normals, and handle as above. - no normals → mark mesh as smooth. - unsupported normal types (kConstantScope, kUniformScope, kUnknownScope) → handle as 'no normals'. This also fixes T71130: Alembic split normal export issue Previously the mesh flag `ME_AUTOSMOOTH` was used in conjunction with the poly flag `ME_SMOOTH` to determine whether loop normals or vertex normals were exported. This behaviour was hard to predict for artists, and hard to describe in the manual. Instead, Blender now only exports loop normals, computing them if necessary. This way, the mesh in Alembic should always have the same loop normals as in Blender. Maniphest Tasks: T71130 Differential Revision: https://developer.blender.org/D6197
2019-11-05Alembic import: fix incorrect 'topology changed' errorSybren A. Stüvel
When importing subdivision surfaces a 'Topology Changed' error was shown even though the topology didn't change at all. The code was comparing to `totpoly` where `totloop` should have been used.
2019-10-17Fix T69182: Auto-Smooth does not work on Alembic meshes without normalsSybren A. Stüvel
The auto-smoothing flag can now be used by artists when the Alembic file does not contain custom loop normals. - Auto-smoothing disabled: mesh is flat-shaded. - Auto-smoothing enabled: works as usual; set angle to 180° to ensure a 100% smoothed mesh.
2019-10-09Local Collections: Allow users to show hidden collectionsDalai Felinto
Users now can turn on in a viewport collections that are temporarily hidden (eye) in the view layer. Design task: T61327 As for the implementation, I had to decouple the visibility in the depsgraph from the visibility in the view layer. Also there is a "bug" that in a way was there before which is some operators (e.g., writing a text inside of a text object, tab into edit mode) run regardless of the visibility of the active object. The bug was present already (with object type visibility restriction) in 2.80 so if we decide to tackle it, can be done separately (I have a patch for it though P1132). Reviewed by: brecht (thank you) Differential Revision: D5992
2019-09-23Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-09-21Revert "Modifiers: every modifier now copies mesh settings, fixing texture ↵Brecht Van Lommel
space issues" This reverts commit e7a514369fe700dcc5a1fe433c8f709ed9595ded, it introduces a bug in selection in edit mode. Fixes T70103: can't select extruded Vertex Ref T64739
2019-09-19Fix T70021: Alembic incomplete crease importSybren A. Stüvel
Creases are stored by the vertex indices of the edges. Sometimes they were stored with (v1, v2) when the edge itself was stored with (v2, v1). We now search for both orientations. Sorting the vertex indices before searching avoids the second search altogether when loading the example file of T70021.
2019-09-19Alembic: Fix compiler error on WindowsSybren A. Stüvel
Error was introduced in 34143e45104b.
2019-09-19Fix T55403: Alembic: export of animated child hairsSybren A. Stüvel
The parent hairs were written to Alembic even when the 'Parent Particles' checkbox (`use_parent_particles`) was disabled. In this case the parent hairs were not correct in Blender's memory, and thus also not correct in the exported Alembic file. The Alembic exporter now respects this setting and doesn't write the parent hairs when 'Parent Particles' is off.
2019-09-19Fix T70070: Path always absolute when importing AlembicSybren A. Stüvel
Importing an Alembic file with a relative path is now also possible.
2019-09-19Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-09-18Fix T65816: Alembic export of procedural mesh results in a static mesh and ↵Sybren A. Stüvel
crashes The static mesh issue described in T65816 has been resolved by @Sergey in T60094. This commit fixes the last bit of the puzzle, which was two-fold: - A missing depsgraph update when setting `orig_object.data = new_mesh` from Python. Thanks @Sergey for providing the fix :) - Properly locking the interface while exporting. This prevents crashes as described in T60094. The previous approach of calling `BKE_spacedata_draw_locks()` was not enough.
2019-09-17Alembic: fix updating of GUI when export progress is madeSybren A. Stüvel
The `do_update` variable wasn't set after changing the `progress` variable, causing the GUI only to update on redraw (f.e. when the user was waving the mouse around).
2019-09-17Cleanup: Alembic: use pointers instead of references when passing progress ↵Sybren A. Stüvel
variables Using pointers instead of references when passing progress variables makes the C++ code more in line with the C code (as it doesn't transform pointer parameters to reference parameters). Also makes it easier to spot when a common Blender pattern is implemented incorrectly (fix will be in the next commit).
2019-09-11Depsgraph: Pass bmain to depsgraph object creationSergey Sharybin
Currently unused, but will allow to keep of an owner of the depsgraph. Could also simplify other APIs in the future by avoiding to pass bmain explicitly to relation update functions and things like that.
2019-09-07Partially revert "Cleanup: use post increment/decrement"Campbell Barton
This partially reverts commit 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 Post increment can deep-copy for C++ iterators, while in my own checks GCC was able to optimize this to get the same output, better follow C++ best practice and use pre-increment for iterators.
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-08-26Cleanp: fix compiler warningsBrecht Van Lommel
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-17Cleanup: spellingCampbell Barton
2019-08-16Fix T56408: Hair children recalc on every frame on Alembic meshSybren A. Stüvel
This fixes the glitching hairs described in T56408, T63534, and possibly also T63534. The fix consists of returning the original mesh (i.e. as visible in edit mode) when constructing the ORCO mesh. This allows a static set of coordinates to be used when computing the child hair positions. The original mesh is only returned when it has the same topology (at least same number of vertices, loops, and polys. It's up the author of the Alembic file to ensure stable geometry when it's desired to be compatible with Blender's hair system. Reviewers: mont29, brecht Differential Revision: https://developer.blender.org/D5492
2019-08-14Cleanup: clang-format, sort structs & cmake filesCampbell Barton
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-08-01Alembic: fix heap-use-after-free errorSybren A. Stüvel
The mesh can be freed by BKE_mesh_nomain_to_mesh(), so we need to get the `ME_AUTOSMOOTH` flag before that call, and not after.
2019-08-01Fix T61935: load camera transforms from Alembic files written by MeshroomSybren A. Stüvel
Meshroom writes two hierarchies to Alembic, one rooted at `/mvgRoot/mvgCameras` and the other at `/mvgRoot/mvgCamerasUndefined`. These paths have no schema definition, and thus are ignored by Blender. The cameras themselves have those schemaless paths as parent, and have their transforms marked as "inherited", e.g. relative to their parent. As these cameras have no valid parent, there is no Blender object to use to convert their local matrices to world matrices, and Blender just decided to reset them to the unit matrix. Now "inherited" transforms without a parent in Blender are interpreted as world transforms. Reparenting those objects to a Blender object will re-interpret the transforms as local to the parent again.
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-31Fix build error after recent cleanupBrecht Van Lommel
2019-07-31Cleanup: remove unused boost codeBrecht Van Lommel
2019-07-30Alembic export: fix exporting of loop normalsSybren A. Stüvel
When the mesh is using custom normals, those should always be exported, regardless of the `ME_SMOOTH` flag on the invidivual polys. Also replaced the loop normal writing with the same logic as we use for reading (less pointer arithmetic, more normal counting).
2019-07-30Alembic import: load face-varying normalsSybren A. Stüvel
Loop normals are called 'Face-varying normals' in Alembic. Before this commit, the existence of such normals was used to enable smooth shading. This is incorrect, as the normals could encode flat faces just as well. This commit adds the loading of these normals as custom loop normals. It then also enables Auto-Smoothing on the mesh (which is a bit of a misnomer and indicates to Blender that the custom normals should be used). Fixes the glitching described in T65959. Differential Revision: https://developer.blender.org/D5191
2019-07-30Cleanup: Alembic: renamed 'smooth_normals' to 'export_loop_normals'Sybren A. Stüvel
The name now indicates what happens when the variable is set to true. No functional changes.
2019-07-30Alembic: changed 'void *user_data' to 'Mesh *mesh'Sybren A. Stüvel
The only thing that is stored in this pointer is a `Mesh*`, and casting it from/to `void*` is unnecessary and confusing. Maybe the entire CDStreamConfig class could/should be removed at some point. No functional changes.
2019-07-30Alembic: transformed chain-of-ifs into switch statementSybren A. Stüvel
By having a switch statement that lists all the values of the enum, it is clear which cases we're not handling, and it also allows for warnings in the future when the enum expands. No functional changes.
2019-07-30Alembic: use `r_` prefix for return variablesSybren A. Stüvel
No functional changes.
2019-07-30Alembic: removal of always-zero parameterSybren A. Stüvel
The `poly_start` parameter was always 0, so adding it to a poly index from Alembic is a no-op. No functional changes.
2019-07-30Fix T65717: Alembic (camera - also mesh) import scale issueSybren A. Stüvel
The w-component of the translation column of the scaled matrix wasn't set to 1.0, which, apart from being incorrect, caused drawing problems. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5290
2019-07-10Alembic export: avoid BLI_assert() failure when object is not in depsgraphSybren A. Stüvel
When the object we iterate over is not part of the depsgraph, we cannot get the evaluated copy to export. This workaround is temporary to avoid a BLI_assert() failure getting the evaluated mesh of this object. This will be handled more elegantly in the new AbstractHierarchyIterator that I'm working on, but that requires a bigger change than we should allow this close to the 2.80 release candidate. This fixes a problem described in T58686.
2019-07-09Alembic import: fix crash when loading invalid meshSybren A. Stüvel
These were just some missing nullptr checks.
2019-07-09Fix T52814 and T58686: Alembic crashing on fluid sim exportSybren A. Stüvel
The velocities std::vector was allocated in too narrow a scope, causing use-after-free errors.
2019-07-03Fix T66369: Excessive WARN messages in console when opening older filesBastien Montagne
CDData checking on file load was not taking into account deprecated CD_MTEXPOLY datatype, which unfortunately shows same weird glitch as CD_PAINT_MASK and CD_FACEMAP ones... Note that it was annoying (due to amount of warnings in console), but totally harmless, since that data type is just deleted anyway. This commit also generally cleans up the CD_MTEXPOLY deprecation code, we have a system to handle that, let's use it, instead of defining local static values to replace it...
2019-07-02Fix assert in Alembic tests with constraintsBrecht Van Lommel
Leave the reader to be created on the CoW object in the depsgraph evaluation, don't assign the one used for importing to the original object.
2019-06-21Fix: Alembic import segfault when importing mesh with null UVsSybren A. Stüvel
This fixes an issue introduced in 4337bc2e6303dbd5f295878f3e7490995a62713a.
2019-06-18Fix T65901: Alembic crash on out-of-bounds UV indicesSybren A. Stüvel
An Alembic file saved by 3DS Max caused Blender to crash when importing. Either the UV indices in the file are out of bounds or they are written in a way we don't expect. In either case, this now no longer causes Blender to crash.
2019-05-17Cycles/Eevee: unify depth of field settings for camerasJeroen Bakker
There is now a checkbox to enable/disable depth of field per camera. For Eevee this replace the scene level setting. For Cycles there is now only an F-Stop value, no longer a Radius. Existing files are converted based on Cycles or Eevee being set in the scene. Differential Revision: https://developer.blender.org/D4882
2019-05-15Outliner Restriction: Naming sanitization and iconDalai Felinto
No major API change here, only in the outliner restriction column variables (e.g., show_restrict_column_selectable > show_restrict_column_select). * Get rid of _INSTANCE (introduced on b1af68200159). * Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global). * Use the expected icon for restrict viewport (same as objects and modifiers). * selectable > select
2019-05-11Outliner Visibility UpdateDalai Felinto
See T61578 for discussions and mockups. Visibility Options ================== We are adding more granular control over restriction columns in the outliner, exposing "indirect only" and "holdout" as options, and change the way users enable/disable collections in a viewlayer. We also rename the object viewport restriction to hide instance. So the options we have are: Collection ---------- * Render Visibility * Instance Visibility * Selectable (View) Layer Collection ----------------------- * Enable * Holdout * Indirect Only * Viewport Shortcuts ========= Isolate Collection ------------------ * Ctr + click isolates the collection. It turns all its parents and children "visible", and all the other collections "invisible". If ALL the collections were already properly set, we re-set the collections to their default value. Set Collection Inside Collections and Objects --------------------------------------------- * Shift + click: Set/unset inside collections and objects. We only set objects values as well when we are in View Layer mode and (obviously) when the objects have a matching property. Icons ===== Little reminder that we will need better icons for holdout, indirect only, and probably instanced (nothing wrong with the current, but it differs from the proposal when it is turned off). Also, we need to decide where do we want the modifier/bones/... icons to be (in which column) and ideally make sure their icons match the ones we use for collections/objects. At the moment those are using the screen icon, which is not being used by collections. Reviewers: brecht, billrey Subscribers: pablovazquez Differential Revision: https://developer.blender.org/D4823
2019-05-01Alembic: integrate cache file into the dependency graphBrecht Van Lommel
* The cache file datablock is now evaluated as part of the dependency graph, creating/freeing the Alembic file handle matching the current frame. Modifiers and constraints depend on this evaluation. * Cache file handles and readers now only exist on COW datablocks, never the original ones. * Object data paths are flushed back to the original for the user interface. * The cache file keeps a list of all readers associated with its handle, and automatically frees them when the handle is freed. This kind of sharing of data across datablocks is weak but we have no better mechanism for it. Fix T62720: Alembic sequences not working and crashing Differential Revision: https://developer.blender.org/D4774
2019-04-29Cleanup: comments (long lines) in alembicCampbell Barton
2019-04-25Fix T63528: Alembic export always showing error on macOS, even on successBrecht Van Lommel
tellp() is not valid to check if the string stream is empty. Just get the string directly as there is no obvious efficient method to check otherwise.