Age | Commit message (Collapse) | Author |
|
Fixes T60251.
|
|
|
|
broken in Blender 2.80
In fact, we can get valid depsgraph 99% of time from current context.
Still added extra optionnal depsgraph parameter just in case (and also
for future, when we might be handling much more temp depsgraphs).
|
|
There were at least three copies of those:
- OB_RECALC* family of flags, which are rudiment of an old
dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
as a separate set since the graph itself did not handle
particle systems.
- DEG_TAG_* which was used to tag IDs.
Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.
Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.
Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.
Fixes T58632: Particle don't update rotation settings
|
|
Maniphest Tasks: T58100
Differential Revision: https://developer.blender.org/D4003
|
|
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.
We are using both the numpad /, as well as the regular /.
Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
(probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.
The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
|
|
Without description, parameters are not documented at all in API (not
even their type)... Always nice to have a short description anyway.
Also fixed a few other issues in existing descriptions.
|
|
- Was setting active state, making it necessary to backup/restore
active object in cases where this isn't needed.
Existing scripts are explicitly setting the active object when needed.
- Use a boolean select arg (toggle selection wasn't used anywhere).
- Add an optional view layer argument since scripts should be able to
operate outside the user context.
|
|
Selection should be separated from active state and handled by higher
level code (operators/editors) instead of happening automatically.
|
|
Note: This function changes the active object as well. Not sure it
should do.
|
|
If the caller wants loop-tris, there is a function to calculate them.
|
|
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.
Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.
Details on porting code to loop triangles is in the release notes.
Differential Revision: https://developer.blender.org/D3539
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
Conflicts:
source/blender/blenkernel/intern/rigidbody.c
|
|
RNA API Object.ray_cast would not normalize direction vector before
doing first quick bbox intersection test, while using its returned
distance value. This could lead to wrong exclusion of object.
Thanks to @codemanx for finding that issue.
|
|
|
|
In the outliner, right click > view layer > set indirect only. This is
like clearing camera ray visibility on objects in the collection, and is
temporary until we have more general dynamic overrides.
|
|
In the outliner, right click > view layer > set holdout. This is
temporary until we have more general dynamic overrides, but helps
Spring production for now.
|
|
Internally it's still mostly named lamps, though some modules like Cycles
were already calling them lights.
|
|
|
|
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
|
|
|
|
Only case remaining is a nasty ccgdm/opensubdiv update case, TBD once
subsurf case is addressed.
|
|
Conflicts:
source/blender/collada/DocumentImporter.cpp
source/blender/editors/include/ED_object.h
source/blender/editors/object/object_modifier.c
|
|
|
|
This commit actually adds some G.main... but at much, much higher level
than the ones it removes, so should still be better ;)
|
|
|
|
|
|
Conflicts:
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_edit.c
source/blender/editors/render/render_internal.c
source/blender/makesrna/intern/rna_object_api.c
source/blenderplayer/bad_level_call_stubs/stubs.c
|
|
|
|
The few ones in getters/setters we cannot remove as easily, for now we
can live with those I think...
|
|
Differential Revision: https://developer.blender.org/D3438
|
|
|
|
with `bvhtree_from_mesh_get`.
|
|
|
|
For correct results these must have been set already when the depsgraph was
created and evaluated, so all dependencies have appropriate resolutions too.
For particle we no longer backup and restore the viewport particles to avoid
overwriting them during render, as copy-on-write solves this for us. Even
without COW particles seem to work ok.
This also removes the particle simplification options based on camera. This
was never used much and only available in Blender Internal.
Differential Revision: https://developer.blender.org/D3148
|
|
Cycles is no longer using this. There are still addons using it but for
correct results with the new depsgraph this API should not be used.
Differential Revision: https://developer.blender.org/D3143
|
|
|
|
|
|
Sync changes from 2.8
|
|
Avoids having to check the objects mode in 'update_from_editmode'.
|
|
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
|
|
Finally, bases are all using the latest, newest SceneLayer bases.
|
|
|
|
While getting rid of Scene->base we got the following fixes:
* Fix "Convert To" operator
* Fix "NLA allowing to selected objects that are not selectable
* Fix scene.objects (readonly, no option to link/unlink)
Note: Collada needs to use the context SceneLayer for adding objects
however I added a placeholder, so Collada maintainers can fix this
properly.
|
|
|
|
Practically all access to enum data is read-only.
|
|
|