|
Blender V5.3
|
#include "BLI_listbase.hh"#include "BLI_math_base_c.hh"#include "BLI_string_utf8.hh"#include "DNA_camera_types.h"#include "DNA_material_types.h"#include "DNA_world_types.h"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "BKE_colortools.hh"#include "BKE_compute_context_cache.hh"#include "BKE_compute_contexts.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_material.hh"#include "BKE_node.hh"#include "BKE_node_legacy_types.hh"#include "BKE_node_runtime.hh"#include "BKE_node_tree_update.hh"#include "DEG_depsgraph.hh"#include "IMB_imbuf.hh"#include "WM_api.hh"#include "ED_node_preview.hh"#include "ED_render.hh"#include "ED_screen.hh"#include "node_intern.hh"Go to the source code of this file.
Classes | |
| struct | blender::ed::space_node::ShaderNodesPreviewJob |
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
| namespace | blender::ed |
| namespace | blender::ed::space_node |
Typedefs | |
Local Structs | |
| using | blender::ed::space_node::NodeSocketPair = std::pair<bNode *, bNodeSocket *> |
This file implements shader node previews which rely on a structure owned by each SpaceNode. We take advantage of the RenderResult available as ImBuf images to store a Render for every viewed nested node tree present in a SpaceNode. The computation is initiated at the moment of drawing nodes overlays. One render is started for the current nodetree, having a ViewLayer associated with each previewed node.
We separate the previewed nodes in two categories: the shader ones and the non-shader ones.
At the moment of drawing, we take the Render of the viewed node tree and extract the ImBuf of the wanted viewlayer/pass for each previewed node.
Definition in file node_shader_preview.cc.