Age | Commit message (Collapse) | Author |
|
T68035 by @luzpaz
|
|
Passing a const char** to MEM_recallocN lead to
C4090 'function': different 'const' qualifiers
warnings with MSVC
|
|
|
|
Allow versioning code to use checks which use run-time naming
instead of the old names which are only listed in dna_rename_defs.h.
Addresses T64791.
|
|
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
Use doxy references to function and enums,
also correct some names which became out of sync.
|
|
|
|
Ref T63164, there was a hidden bug like this on Windows 32 bit.
|
|
|
|
Cache the result of DNA_elem_array_size which was being called
for each element when reconstructing each struct.
Also skip padding members during reconstruction.
Gives ~18% overall speedup loading 10_010_A.anim.blend (r3154)
from the spring project.# Please enter the commit message for your changes. Lines starting
Note, this was reverted recently because it caused T62181
Changes to DNA_sdna_patch_struct_member_nr were needed which
caused issues loading old 2.8x files.
|
|
This reverts commit 657205530cc680012734200a8babd6232be5ee92.
This caused an T62181, looking into fix but revert for now.
|
|
Cache the result of DNA_elem_array_size which was being called
for each element when reconstructing each struct.
Also skip padding members during reconstruction.
Gives ~18% overall speedup loading 10_010_A.anim.blend (r3154)
from the spring project.
|
|
Use 'size' instead of 'len' to represent the size of data in bytes,
'len' is used for the result of 'strlen' or the length of an array
in some parts of 'makesdna.c' & 'dna_genfile.c'.
Also clarify comments and some variable names, no functional changes.
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
This allows us to rename struct & struct members in the source code
without changing the file format.
This is useful because the code becomes increasingly confusing when
names such as oops, ipo & dupli aren't used anywhere except DNA headers.
dna_rename_defs.h is used to define renaming operations.
The renaming it's self will be done separately.
|
|
Also sync variable names w/ D4342
|
|
Possible error changing names which are shared between structs.
While the problem doesn't occur at the moment, avoid future problems.
|
|
Use naming conventions from the patch so they match when it's applied.
|
|
Rename 'elem_dna' to 'elem_full' to signify it has array/pointer chars.
|
|
Rename old/new to src/dst since renaming happens in both directions
when versioning.
|
|
Currently only a single function was duplicated which isn't so bad,
this change is to allow DNA versioning code to be shared between
dna_genfile.c and makesdna.c.
|
|
This is only to be used rarely because it's not forwards compatible.
Replace version patching of old 2.80 DNA with a more generic API.
|
|
More direct and readable.
|
|
Also replace intptr_t -> int (no good reason to cast to intptr here).
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Prevents clang-format wrapping text before comments.
|
|
|
|
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4037
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
|
|
|
|
|
|
find_elem(olddata=NULL) doesn't work reliably for existence checks; it will
return NULL both when the field is found at offset 0 and when it is not
found at all.
|
|
|
|
|
|
OVERVIEW
* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
for each. For many workflows one view layer can be used, these are more of an
advanced feature now.
OUTLINER
* The outliner now has a "View Layer" display mode instead of "Collections",
which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
text gives different results, we'll unify this later.
LINKING AND OVERRIDES
* Collections can now be linked into the scene without creating an instance,
with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
into collections with overrides directly in the scene.
PERFORMANCE
* We tried to make performance not worse than before and improve it in some
cases. The main thing that's still a bit slower is multiple scenes, we have to
change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
lookups internally and in API functions like visible_get().
VERSIONING
* Compatibility with 2.7 files should be improved due to the new visibility
controls. Of course users may not want to set up their scenes differently
now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
files. There's a few things which are know to be not quite compatible, like
nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
#ifdef so it can be removed at the end of the release cycle.
KNOWN ISSUES
* The G-key group operators in the 3D viewport were left mostly as is, they
need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
be done later, we'll have to see how important this is as all objects within
the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.
Differential Revision: https://developer.blender.org/D3383
https://code.blender.org/2018/05/collections-and-groups/
|
|
|
|
|
|
|
|
Fixes CVE-2017-2908 from T52924.
Differential Revision: https://developer.blender.org/D3001
|
|
Short of checking for types (SceneLayer) this is the only reliable
way of getting all 2.80 files to date.
|
|
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.
* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started
Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.
Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.
Reviewers: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D2927
|
|
|