|
Blender V4.5
|
#include <iostream>#include "../application/AppConfig.h"#include "../application/AppView.h"#include "../application/Controller.h"#include "BlenderStrokeRenderer.h"#include "MEM_guardedalloc.h"#include "DNA_collection_types.h"#include "DNA_freestyle_types.h"#include "DNA_material_types.h"#include "DNA_text_types.h"#include "BKE_callbacks.hh"#include "BKE_context.hh"#include "BKE_freestyle.h"#include "BKE_global.hh"#include "BKE_lib_id.hh"#include "BKE_linestyle.h"#include "BKE_scene.hh"#include "BKE_text.h"#include "BLT_translation.hh"#include "BLI_listbase.h"#include "BLI_math_color_blend.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BPY_extern.hh"#include "DEG_depsgraph_query.hh"#include "IMB_imbuf.hh"#include "pipeline.hh"#include "FRS_freestyle.h"Go to the source code of this file.
Classes | |
| struct | edge_type_condition |
Variables | |
| FreestyleGlobals | g_freestyle |
| static bool | freestyle_is_initialized = false |
| static Config::Path * | pathconfig = nullptr |
| static Controller * | controller = nullptr |
| static AppView * | view = nullptr |
| static FreestyleLineSet | lineset_buffer |
| static bool | lineset_copied = false |
| static bCallbackFuncStore | load_post_callback_funcstore |
|
static |
Definition at line 176 of file FRS_freestyle.cpp.
References BLI_sprintfN(), create_lineset_handler(), escape_quotes(), and MEM_freeN().
Referenced by create_lineset_handler(), and prepare().
|
static |
Definition at line 546 of file FRS_freestyle.cpp.
References displayed_layer_count(), ViewLayer::freestyle_config, FREESTYLE_CONTROL_EDITOR_MODE, FREESTYLE_CONTROL_SCRIPT_MODE, FREESTYLE_LINESET_ENABLED, FreestyleConfig::linesets, LISTBASE_FOREACH, FreestyleConfig::mode, and FreestyleConfig::modules.
Referenced by displayed_layer_count(), and FRS_is_freestyle_enabled().
|
static |
Definition at line 162 of file FRS_freestyle.cpp.
References escape_quotes(), and MEM_malloc_arrayN().
Referenced by create_lineset_handler(), and escape_quotes().
| void FRS_begin_stroke_rendering | ( | Render * | re | ) |
Definition at line 589 of file FRS_freestyle.cpp.
References FRS_begin_stroke_rendering().
Referenced by FRS_begin_stroke_rendering().
Definition at line 469 of file FRS_freestyle.cpp.
References blend_color_mix_float(), FreestyleConfig::flags, FREESTYLE_AS_RENDER_PASS, ViewLayer::freestyle_config, FRS_composite_result(), G, G_DEBUG_FREESTYLE, ViewLayer::name, RE_create_render_pass(), RE_GetRenderLayer(), RE_PASSNAME_COMBINED, RE_PASSNAME_FREESTYLE, RE_RenderLayerGetPass(), Render::rectx, RenderLayer::rectx, Render::recty, RenderLayer::recty, render_get_single_layer(), BaseRender::result, Render::viewname, x, and y.
Referenced by FRS_composite_result(), and FRS_do_stroke_rendering().
| void FRS_copy_active_lineset | ( | FreestyleConfig * | config | ) |
Definition at line 681 of file FRS_freestyle.cpp.
References BKE_freestyle_lineset_get_active(), FreestyleLineSet::edge_types, FreestyleLineSet::exclude_edge_types, FreestyleLineSet::flags, FRS_copy_active_lineset(), FreestyleLineSet::group, lineset_buffer, lineset_copied, FreestyleLineSet::linestyle, FreestyleLineSet::name, FreestyleLineSet::qi, FreestyleLineSet::qi_end, FreestyleLineSet::qi_start, FreestyleLineSet::selection, and STRNCPY().
Referenced by FRS_copy_active_lineset().
| Material * FRS_create_stroke_material | ( | Main * | bmain, |
| FreestyleLineStyle * | linestyle ) |
Definition at line 754 of file FRS_freestyle.cpp.
References FRS_create_stroke_material(), Freestyle::BlenderStrokeRenderer::GetStrokeShader(), Material::id, FreestyleLineStyle::nodetree, ID::us, and FreestyleLineStyle::use_nodes.
Referenced by FRS_create_stroke_material().
| void FRS_delete_active_lineset | ( | FreestyleConfig * | config | ) |
Definition at line 737 of file FRS_freestyle.cpp.
References BKE_freestyle_lineset_delete(), BKE_freestyle_lineset_get_active(), and FRS_delete_active_lineset().
Referenced by FRS_delete_active_lineset().
Definition at line 591 of file FRS_freestyle.cpp.
References Freestyle::Controller::_ViewMap, BKE_scene_graph_update_for_newframe(), BLI_findstring(), Freestyle::Controller::CloseFile(), controller, DAG_EVAL_RENDER, DEG_get_evaluated(), DEG_get_evaluated_scene(), DEG_graph_free(), DEG_graph_new(), Freestyle::Controller::DrawStrokes(), FreestyleConfig::flags, ViewLayer::freestyle_config, FREESTYLE_VIEW_MAP_CACHE, FRS_composite_result(), FRS_do_stroke_rendering(), G, G_DEBUG_FREESTYLE, g_freestyle, Render::i, Scene::id, RenderStats::infostr, Render::main, FreestyleGlobals::mv, ID::name, ViewLayer::name, offsetof, prepare(), FreestyleGlobals::proj, RE_FreeRender(), RE_GetCamera(), RE_GetCameraWindow(), Freestyle::Controller::RenderStrokes(), RPT_, FreestyleGlobals::scene, Render::scene, Freestyle::Controller::setRenderMonitor(), Freestyle::Controller::setViewMapCache(), Render::stats_draw(), Render::test_break(), unit_m4(), Scene::view_layers, FreestyleGlobals::viewpoint, and zero_v3().
Referenced by FRS_do_stroke_rendering().
| void FRS_end_stroke_rendering | ( | Render * | re | ) |
Definition at line 660 of file FRS_freestyle.cpp.
References Freestyle::Controller::Clear(), controller, and FRS_end_stroke_rendering().
Referenced by FRS_end_stroke_rendering().
| void FRS_exit | ( | void | ) |
Definition at line 111 of file FRS_freestyle.cpp.
References controller, FRS_exit(), pathconfig, and view.
Referenced by FRS_exit(), and RE_FreeAllRender().
| void FRS_free_view_map_cache | ( | void | ) |
Definition at line 666 of file FRS_freestyle.cpp.
References controller, Freestyle::Controller::DeleteViewMap(), FRS_free_view_map_cache(), G, G_DEBUG_FREESTYLE, and printf.
Referenced by FRS_free_view_map_cache().
| void FRS_init | ( | void | ) |
Definition at line 84 of file FRS_freestyle.cpp.
References BKE_callback_add(), BKE_CB_EVT_LOAD_POST, Freestyle::Controller::Clear(), Freestyle::Controller::Controller(), controller, freestyle_is_initialized, FRS_init(), g_freestyle, lineset_copied, load_post_callback_funcstore, pathconfig, FreestyleGlobals::scene, Freestyle::Controller::setView(), and view.
Referenced by FRS_init(), and main().
| void FRS_init_stroke_renderer | ( | Render * | re | ) |
Definition at line 575 of file FRS_freestyle.cpp.
References controller, FRS_init_stroke_renderer(), G, G_DEBUG_FREESTYLE, init_view(), and Freestyle::Controller::ResetRenderCount().
Referenced by FRS_init_stroke_renderer().
| int FRS_is_freestyle_enabled | ( | ViewLayer * | view_layer | ) |
Definition at line 569 of file FRS_freestyle.cpp.
References displayed_layer_count(), ViewLayer::flag, FRS_is_freestyle_enabled(), VIEW_LAYER_FREESTYLE, and VIEW_LAYER_RENDER.
Referenced by FRS_is_freestyle_enabled().
| bool FRS_move_active_lineset | ( | struct FreestyleConfig * | config, |
| int | direction ) |
Reinsert the active lineset at an offset direction from current position.
Definition at line 746 of file FRS_freestyle.cpp.
References BKE_freestyle_lineset_get_active(), BLI_listbase_link_move(), FRS_move_active_lineset(), and FreestyleConfig::linesets.
Referenced by FRS_move_active_lineset().
| void FRS_paste_active_lineset | ( | FreestyleConfig * | config | ) |
Definition at line 700 of file FRS_freestyle.cpp.
References BKE_freestyle_lineset_get_active(), BKE_freestyle_lineset_unique_name(), FreestyleLineSet::edge_types, FreestyleLineSet::exclude_edge_types, FreestyleLineSet::flags, FREESTYLE_LINESET_CURRENT, FRS_paste_active_lineset(), FreestyleLineSet::group, Collection::id, FreestyleLineStyle::id, id_us_min(), id_us_plus(), lineset_buffer, lineset_copied, FreestyleLineSet::linestyle, FreestyleLineSet::name, FreestyleLineSet::qi, FreestyleLineSet::qi_end, FreestyleLineSet::qi_start, FreestyleLineSet::selection, and STRNCPY().
Referenced by FRS_paste_active_lineset().
| void FRS_set_context | ( | bContext * | C | ) |
Definition at line 103 of file FRS_freestyle.cpp.
References C, controller, CTX_data_scene(), FRS_set_context(), G, G_DEBUG_FREESTYLE, and Freestyle::Controller::setContext().
Referenced by FRS_set_context(), and main().
|
static |
Definition at line 122 of file FRS_freestyle.cpp.
References Render::disprect, G, G_DEBUG_FREESTYLE, g_freestyle, init_view(), RenderData::line_thickness_mode, RenderData::mode, Render::r, Scene::r, R_BORDER, R_LINE_THICKNESS_ABSOLUTE, R_LINE_THICKNESS_RELATIVE, Render::scene, Freestyle::AppView::setBorder(), Freestyle::AppView::setHeight(), Freestyle::AppView::setThickness(), Freestyle::AppView::setWidth(), RenderData::size, RenderData::unit_line_thickness, view, FreestyleGlobals::viewport, Render::winx, Render::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by FRS_init_stroke_renderer(), and init_view().
|
static |
Definition at line 65 of file FRS_freestyle.cpp.
References lineset_copied, and load_post_callback().
Referenced by load_post_callback().
Definition at line 273 of file FRS_freestyle.cpp.
References ARRAY_SIZE, Freestyle::Controller::ComputeViewMap(), controller, FreestyleConfig::crease_angle, create_lineset_handler(), FreestyleConfig::dkr_epsilon, edge_type_condition::edge_type, FreestyleConfig::flags, FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE, FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE, ViewLayer::freestyle_config, FREESTYLE_CONTROL_EDITOR_MODE, FREESTYLE_CONTROL_SCRIPT_MODE, FREESTYLE_CULLING, FREESTYLE_FACE_SMOOTHNESS_FLAG, FREESTYLE_FE_BORDER, FREESTYLE_FE_CONTOUR, FREESTYLE_FE_CREASE, FREESTYLE_FE_EDGE_MARK, FREESTYLE_FE_EXTERNAL_CONTOUR, FREESTYLE_FE_MATERIAL_BOUNDARY, FREESTYLE_FE_RIDGE_VALLEY, FREESTYLE_FE_SILHOUETTE, FREESTYLE_FE_SUGGESTIVE_CONTOUR, FREESTYLE_LINESET_ENABLED, FREESTYLE_LINESET_FE_AND, FREESTYLE_LINESET_FE_NOT, FREESTYLE_MATERIAL_BOUNDARIES_FLAG, FREESTYLE_RIDGES_AND_VALLEYS_FLAG, FREESTYLE_SEL_EDGE_TYPES, FREESTYLE_SUGGESTIVE_CONTOURS_FLAG, G, G_DEBUG_FREESTYLE, Freestyle::Controller::getComputeMaterialBoundariesFlag(), Freestyle::Controller::getComputeRidgesAndValleysFlag(), Freestyle::Controller::getComputeSuggestiveContoursFlag(), Freestyle::Controller::getCreaseAngle(), Freestyle::Controller::getFaceSmoothness(), Freestyle::Controller::getSphereRadius(), Freestyle::Controller::getSuggestiveContourKrDerivativeEpsilon(), Freestyle::Controller::hitViewMapCache(), i, Render::i, id_name(), RenderStats::infostr, Freestyle::Controller::InsertStyleModule(), FreestyleConfig::linesets, LISTBASE_FOREACH, Freestyle::Controller::LoadMesh(), MEM_freeN(), FreestyleConfig::mode, FreestyleConfig::modules, ViewLayer::name, RenderLayer::passes, prepare(), RAD2DEGF, RE_GetRenderLayer(), RE_PASSNAME_DIFFUSE_COLOR, RE_PASSNAME_Z, BaseRender::result, RPT_, Freestyle::Controller::setComputeMaterialBoundariesFlag(), Freestyle::Controller::setComputeRidgesAndValleysFlag(), Freestyle::Controller::setComputeSuggestiveContoursFlag(), Freestyle::Controller::setCreaseAngle(), Freestyle::Controller::setFaceSmoothness(), Freestyle::Controller::setPassDiffuse(), Freestyle::Controller::setPassZ(), Freestyle::Controller::setSphereRadius(), Freestyle::Controller::setSuggestiveContourKrDerivativeEpsilon(), Freestyle::Controller::setVisibilityAlgo(), FreestyleConfig::sphere_radius, Render::stats_draw(), STREQ, Render::test_break(), test_edge_type_conditions(), Freestyle::Controller::toggleLayer(), edge_type_condition::value, and z().
Referenced by FRS_do_stroke_rendering(), and prepare().
|
static |
Definition at line 192 of file FRS_freestyle.cpp.
References i, test_edge_type_conditions(), and edge_type_condition::value.
Referenced by prepare(), and test_edge_type_conditions().
|
static |
Definition at line 58 of file FRS_freestyle.cpp.
Referenced by FRS_do_stroke_rendering(), FRS_end_stroke_rendering(), FRS_exit(), FRS_free_view_map_cache(), FRS_init(), FRS_init_stroke_renderer(), FRS_set_context(), and prepare().
|
static |
Definition at line 56 of file FRS_freestyle.cpp.
Referenced by FRS_init().
| FreestyleGlobals g_freestyle |
Definition at line 53 of file FRS_freestyle.cpp.
Referenced by Freestyle::Controller::ComputeViewMap(), Freestyle::AppView::distanceToSceneCenter(), Freestyle_getCurrentScene(), FRS_do_stroke_rendering(), FRS_init(), Freestyle::GridHelpers::getDefaultViewProscenium(), init_view(), Freestyle::Controller::LoadMesh(), Freestyle::AppView::zfar(), and Freestyle::AppView::znear().
|
static |
Definition at line 62 of file FRS_freestyle.cpp.
Referenced by FRS_copy_active_lineset(), and FRS_paste_active_lineset().
|
static |
Definition at line 63 of file FRS_freestyle.cpp.
Referenced by FRS_copy_active_lineset(), FRS_init(), FRS_paste_active_lineset(), and load_post_callback().
|
static |
Definition at line 73 of file FRS_freestyle.cpp.
Referenced by FRS_init().
|
static |
Definition at line 57 of file FRS_freestyle.cpp.
Referenced by FRS_exit(), and FRS_init().
Definition at line 59 of file FRS_freestyle.cpp.
Referenced by FRS_exit(), FRS_init(), and init_view().