Age | Commit message (Collapse) | Author |
|
To bring this fix a step further we need to address all the BA_WAS_SEL instances, and make sure they follow the new design.
This commit allow you to see the object selected (its center anyways) when you do select all.
Note: in the clay engine selection (a) was already working fine.
|
|
Every time:
* A collection settings is set
* A collection visibility changes
* An object is added/removed/ ...
We need to recalculate the "accumulated" CollectionEngineSettings that
the render engine should use for an object.
This is to be handled by the depsgraph. Meanwhile this code should allow
us to start using those settings in the render engines.
Note: We are storing this in the objects, which means we can only have
one active calculated option every time.
This is intended to get the conversation with the Depsgraph department
going.
|
|
|
|
Initial work by Clément Foucault with contributions from Dalai Felinto
(mainly per-collection engine settings logic, and depsgraph iterator placeholder).
This makes Blender require OpenGL 3.3. Which means Intel graphic card
and OSX will break. Disable CLAY_ENGINE in CMake in those cases.
This is a prototype render engine intended to help the design of real
render engines. This is mainly an engine with enphasis in matcap and
ambient occlusion.
Implemented Features
--------------------
* Clay Render Engine, following the new API, to be used as reference for
future engines
* A more complete Matcap customization with more options
* Per-Collection render engine settings
* New Ground Truth AO - not enabled
Missing Features
----------------
* Finish object edit mode
- Fix shaders to use new matrix
- Fix artifacts when edge does off screen
- Fix depth issue
- Selection sillhouette
- Mesh wires
- Use mesh normals (for higher quality matcap)
- Non-Mesh objects drawing
- Widget drawing
- Performance issues
* Finish mesh edit mode
- Derived-Mesh-less edit mode API (mesh_rende.c)
* General edit mode
- Per-collection edit mode settings
* General engines
- Per-collection engine settings
(they are their, but they still need to be flushed by depsgraph, and
used by the drawing code)
|
|
Design Documents
----------------
* https://wiki.blender.org/index.php/Dev:2.8/Source/Layers
* https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised
User Commit Log
---------------
* New Layer and Collection system to replace render layers and viewport layers.
* A layer is a set of collections of objects (and their drawing options) required for specific tasks.
* A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers.
* All Scenes have a master collection that all other collections are children of.
* New collection "context" tab (in Properties Editor)
* New temporary viewport "collections" panel to control per-collection
visibility
Missing User Features
---------------------
* Collection "Filter"
Option to add objects based on their names
* Collection Manager operators
The existing buttons are placeholders
* Collection Manager drawing
The editor main region is empty
* Collection Override
* Per-Collection engine settings
This will come as a separate commit, as part of the clay-engine branch
Dev Commit Log
--------------
* New DNA file (DNA_layer_types.h) with the new structs
We are replacing Base by a new extended Base while keeping it backward
compatible with some legacy settings (i.e., lay, flag_legacy).
Renamed all Base to BaseLegacy to make it clear the areas of code that
still need to be converted
Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp
* Unittesting for main syncronization requirements
- read, write, add/copy/remove objects, copy scene, collection
link/unlinking, context)
* New Editor: Collection Manager
Based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes:
- Renamed references of layer manager to collections manager
- I doesn't include the editors/space_collections/ draw and util files
- The drawing code itself will be implemented separately by Julian
* Base / Object:
A little note about them. Original Blender code would try to keep them
in sync through the code, juggling flags back and forth. This will now
be handled by Depsgraph, keeping Object and Bases more separated
throughout the non-rendering code.
Scene.base is being cleared in doversion, and the old viewport drawing
code was poorly converted to use the new bases while the new viewport
code doesn't get merged and replace the old one.
Python API Changes
------------------
```
- scene.layers
+ # no longer exists
- scene.objects
+ scene.scene_layers.active.objects
- scene.objects.active
+ scene.render_layers.active.objects.active
- bpy.context.scene.objects.link()
+ bpy.context.scene_collection.objects.link()
- bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None)
+ bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None)
- bpy.context.object.select
+ bpy.context.object.select = True
+ bpy.context.object.select = False
+ bpy.context.object.select_get()
+ bpy.context.object.select_set(action='SELECT')
+ bpy.context.object.select_set(action='DESELECT')
-AddObjectHelper.layers
+ # no longer exists
```
|
|
Marks matrix state as dirty so shader will use the latest values from glScale, glTranslate, etc.
We'll remove this after transitioning 100% to the new matrix API, which handles this sort of thing automatically.
Part of T49450
|
|
follow-up to earlier patch
|
|
D2486 by @TCMBoby, part of T49043
|
|
ui_draw_but_WAVEFORM
ui_draw_but_VECTORSCOPE
|
|
ui_draw_but_HISTOGRAM
UI_draw_text_underline (untested)
|
|
Replaced GL_POLYGON in various places.
Ported UI_draw_roundbox_unfilled
|
|
|
|
Part of T49043
|
|
We had two versions of several BLF functions -- one for a specific font ID & another for the default font.
New BLF_default function lets us simplify this API & delete the redundant code.
|
|
There are still many places to fix. I'll miss the bright yellow!
This commit also uses the new BLF_default function where possible.
Part of T49043 since we call glColor less often.
|
|
So we don't need two versions of all other BLF functions -- one for specific font ID & another for the default font.
|
|
-Remove NPOT check as it should be supported by default with OGL 3.3
-All custom texture creation follow the same path now
-Now explicit texture format is required when creating a custom texture (Non RGBA8)
-Support for arrays of textures
Reviewers: dfelinto, merwin
Differential Revision: https://developer.blender.org/D2452
|
|
Had mistakenly used 3D shaders for some 2D drawings...
Replaced those now.
Part of T49043
|
|
|
|
Issue was indeed in join operation, mesh in which we join all others
could be re-added to final data after others, leading to undesired
re-ordering of CD layers, and existing vertices etc. being shifted away
from their original indices, etc.
All kind of more or less bad and undesired changes, fixed by always
re-inserting destination mesh first.
Also cleaned up a bit that code, it was doing some rather
non-recommanded things (like allocating zero-sized mem, doing own
coocking to remove a data-block from main, etc.).
|
|
Also converted ED_node_draw_snap from drawnode.c
Committing these together, as they are inter-dependent.
Part of T49043
|
|
(Approved by merwin in IRC)
Required by part of T49043
|
|
Part of T49043
|
|
Root of the issue was BM_mesh_bm_to_me() breaking application of basis
offset to 'child' shapekeys, when called more than once from same BMesh.
|
|
|
|
particle modifier + UV material
Tricky issue caused by CDDM_copy() coying MFACE array but not MTFACE which
confused logic later on.
Now we don't copy ANY tessellation unless it is requested to.
Thanks Bastien for help and review!
|
|
This was my own mistake
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2378
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2379
|
|
Differential Revision: https://developer.blender.org/D2485
Part of T49043
|
|
blenderplayer uses BLF but not Editor UI, so we got a link error for the missing UI_GetThemeColor function.
Moved the new function from BLF to UI.
@Blendify reported problem in IRC
|
|
Differential Revision: https://developer.blender.org/D2484
Part of T49043
|
|
Differential Revision: https://developer.blender.org/D2484
Used by part of T49043
|
|
For anything fancier than regular Theme colors (shading, alpha, etc.) do this:
unsigned char color[4]
UI_GetThemeColor[Fancy]4ubv(... color)
BLF_color4ubv(fontid, color)
That way the BLF color API stays simple.
|
|
Set to an annoying bright color so we can see where to add BLF_color calls.
|
|
Needed a way to pass main font color to BLF without using obsolete glColor. Could not use immUniform since BLF binds its shader internally.
|
|
Differential Revision: https://developer.blender.org/D2481
Part of T49043
|
|
Differential Revision: https://developer.blender.org/D2483
Part of T49043
|
|
Differential Revision: https://developer.blender.org/D2482
Part of T49043
|
|
scrolling speed.
'page' prop of scroll up/down operators would get stuck once set once by
pageup/down keys... Now only take this prop into account if explicitely
set, not when its value is inherited from previous run.
|
|
perspective view
Strangely this change does not affect the performance very much.
Suzanne subdividide 6x (ortho view):
Before:0.00013983
After :0.00013920
But it makes it easier to read the code
|
|
Follow-up to rB85174329d9f5
Part of T49450
|
|
Partial revert of rB06d4aca87956
Problem found while converting old GL matrix calls to new API (T49450)
|
|
When the function that tests snap on multiple elements starts from the face and ends at the vertex, the transition between elements becomes much smoother.
|
|
|
|
|
|
|
|
Conflicts:
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/library_query.c
|
|
`cd_flag` tends to be used for CustomData flags in mesh area, while for
library_query those are rather callback flags...
|
|
Better to have clear way to tell whether flag is parameter for
BKE_library_foreach_ID_link(), parameter for its callback function, or
return value from this callback function.
|