|
Blender V5.0
|
#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(), escape_quotes(), and MEM_freeN().
Referenced by prepare().
|
static |
Definition at line 546 of file FRS_freestyle.cpp.
References count, ViewLayer::freestyle_config, FREESTYLE_CONTROL_EDITOR_MODE, FREESTYLE_CONTROL_SCRIPT_MODE, FREESTYLE_LINESET_ENABLED, FreestyleConfig::linesets, LISTBASE_FOREACH, FreestyleConfig::mode, module, and FreestyleConfig::modules.
Referenced by FRS_is_freestyle_enabled().
|
static |
Definition at line 162 of file FRS_freestyle.cpp.
References MEM_malloc_arrayN(), and name.
Referenced by create_lineset_handler().
| void FRS_begin_stroke_rendering | ( | Render * | re | ) |
Definition at line 589 of file FRS_freestyle.cpp.
Definition at line 469 of file FRS_freestyle.cpp.
References blend_color_mix_float(), FreestyleConfig::flags, FREESTYLE_AS_RENDER_PASS, ViewLayer::freestyle_config, 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_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, FreestyleLineSet::group, lineset_buffer, lineset_copied, FreestyleLineSet::linestyle, FreestyleLineSet::name, FreestyleLineSet::qi, FreestyleLineSet::qi_end, FreestyleLineSet::qi_start, FreestyleLineSet::selection, and STRNCPY().
| Material * FRS_create_stroke_material | ( | Main * | bmain, |
| FreestyleLineStyle * | linestyle ) |
Definition at line 754 of file FRS_freestyle.cpp.
References Freestyle::BlenderStrokeRenderer::GetStrokeShader(), Material::id, FreestyleLineStyle::nodetree, ID::us, and FreestyleLineStyle::use_nodes.
| void FRS_delete_active_lineset | ( | FreestyleConfig * | config | ) |
Definition at line 737 of file FRS_freestyle.cpp.
References BKE_freestyle_lineset_delete(), and BKE_freestyle_lineset_get_active().
Definition at line 591 of file FRS_freestyle.cpp.
References BKE_scene_graph_update_for_newframe(), BLI_findstring(), controller, DAG_EVAL_RENDER, DEG_get_evaluated(), DEG_get_evaluated_scene(), DEG_graph_free(), DEG_graph_new(), depsgraph, BaseRender::display, FreestyleConfig::flags, ViewLayer::freestyle_config, FREESTYLE_VIEW_MAP_CACHE, FRS_composite_result(), G, G_DEBUG_FREESTYLE, g_freestyle, Render::i, Scene::id, RenderStats::infostr, Render::main, ID::name, name, ViewLayer::name, offsetof, prepare(), RE_FreeRender(), RE_GetCamera(), RE_GetCameraWindow(), RPT_, Render::scene, unit_m4(), Scene::view_layers, and zero_v3().
| void FRS_end_stroke_rendering | ( | Render * | re | ) |
Definition at line 660 of file FRS_freestyle.cpp.
References controller.
| void FRS_exit | ( | void | ) |
Definition at line 111 of file FRS_freestyle.cpp.
References controller, pathconfig, and view.
Referenced by RE_FreeAllRender().
| void FRS_free_view_map_cache | ( | void | ) |
Definition at line 666 of file FRS_freestyle.cpp.
References controller, G, G_DEBUG_FREESTYLE, and printf.
| void FRS_init | ( | void | ) |
Definition at line 84 of file FRS_freestyle.cpp.
References BKE_callback_add(), BKE_CB_EVT_LOAD_POST, controller, freestyle_is_initialized, g_freestyle, lineset_copied, load_post_callback_funcstore, pathconfig, and view.
Referenced by main().
| void FRS_init_stroke_renderer | ( | Render * | re | ) |
Definition at line 575 of file FRS_freestyle.cpp.
References controller, G, G_DEBUG_FREESTYLE, and init_view().
| int FRS_is_freestyle_enabled | ( | ViewLayer * | view_layer | ) |
Definition at line 569 of file FRS_freestyle.cpp.
References displayed_layer_count(), ViewLayer::flag, VIEW_LAYER_FREESTYLE, and VIEW_LAYER_RENDER.
| 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(), and FreestyleConfig::linesets.
| 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, 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().
| void FRS_set_context | ( | bContext * | C | ) |
Definition at line 103 of file FRS_freestyle.cpp.
References C, controller, CTX_data_scene(), G, and G_DEBUG_FREESTYLE.
Referenced by main().
|
static |
Definition at line 122 of file FRS_freestyle.cpp.
References Render::disprect, G, G_DEBUG_FREESTYLE, g_freestyle, RenderData::line_thickness_mode, RenderData::mode, Render::r, Scene::r, R_BORDER, R_LINE_THICKNESS_ABSOLUTE, R_LINE_THICKNESS_RELATIVE, Render::scene, RenderData::size, RenderData::unit_line_thickness, view, Render::winx, Render::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by FRS_init_stroke_renderer().
|
static |
Definition at line 65 of file FRS_freestyle.cpp.
References lineset_copied.
Definition at line 273 of file FRS_freestyle.cpp.
References ARRAY_SIZE, controller, FreestyleConfig::crease_angle, create_lineset_handler(), depsgraph, BaseRender::display, 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, i, Render::i, RenderStats::infostr, FreestyleConfig::linesets, LISTBASE_FOREACH, MEM_freeN(), FreestyleConfig::mode, FreestyleConfig::modules, ViewLayer::name, RenderLayer::passes, RAD2DEGF, RE_GetRenderLayer(), RE_PASSNAME_DEPTH, RE_PASSNAME_DIFFUSE_COLOR, BaseRender::result, RPT_, FreestyleConfig::sphere_radius, STREQ, test_edge_type_conditions(), edge_type_condition::value, and z().
Referenced by FRS_do_stroke_rendering().
|
static |
Definition at line 192 of file FRS_freestyle.cpp.
References i, and edge_type_condition::value.
Referenced by prepare().
|
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(), prepare(), wm_xr_controller_aim_draw(), wm_xr_controller_model_draw(), wm_xr_session_controller_aim_pose_find(), wm_xr_session_controller_data_populate(), wm_xr_session_controller_data_update(), WM_xr_session_state_controller_aim_location_get(), WM_xr_session_state_controller_aim_rotation_get(), WM_xr_session_state_controller_grip_location_get(), and WM_xr_session_state_controller_grip_rotation_get().
|
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 _BaseMathObject_RaiseBufferViewExc(), blender::ui::AbstractViewItemDragController::AbstractViewItemDragController(), blender::eevee::Film::accumulate(), DRWContext::acquire_data(), blender::ui::AbstractViewItem::add_rename_button(), blender::ed::asset::shelf::AssetDragController::AssetDragController(), axis_set_view(), blender::ui::AbstractViewItem::begin_renaming(), blender::draw::overlay::Instance::begin_sync(), BKE_image_is_multiview(), BKE_image_memorypack(), BKE_image_packfiles(), BKE_image_render_write_exr(), BKE_scene_disable_color_management(), blender_camera_view_subset(), BlenderSession::BlenderSession(), BlenderSession::BlenderSession(), blo_do_versions_280(), blo_do_versions_300(), BLO_update_defaults_workspace(), BPy_IDArray_getbuffer(), BPy_IDArray_releasebuffer(), blender::eevee::BackgroundPipeline::clear(), Color_getbuffer(), blender::draw::DebugDraw::color_pack(), Color_releasebuffer(), colormanage_check_view_settings(), colormanage_find_matching_view_name(), colormanage_load_config(), colormanage_view_settings_to_cache(), blender::draw::overlay::GreasePencil::compute_depth_planes(), blender::nodes::node_composite_file_output_cc::compute_image_path(), blender::draw::Manager::compute_visibility(), blender::eevee::DeferredPipeline::debug_draw(), blender::eevee::HiZBuffer::debug_draw(), blender::eevee::LightModule::debug_draw(), blender::eevee::ShadowModule::debug_draw(), blender::draw::DebugDraw::display_to_view(), blender::draw::edit_select::Instance::draw(), blender::draw::gpencil::Instance::draw(), blender::draw::overlay::Facing::draw(), blender::draw::overlay::Fade::draw(), blender::draw::overlay::Instance::draw(), blender::draw::overlay::MeshUVs::draw(), blender::draw::overlay::ModeTransfer::draw(), blender::draw::overlay::Paints::draw(), blender::draw::overlay::Particles::draw(), blender::draw::overlay::Text::draw(), blender::eevee::LookdevModule::draw(), blender::workbench::AntiAliasingPass::draw(), blender::workbench::DofPass::draw(), blender::workbench::OpaquePass::draw(), blender::workbench::ShadowPass::draw(), blender::workbench::TransparentDepthPass::draw(), blender::workbench::TransparentPass::draw(), blender::workbench::VolumePass::draw(), blender::draw::overlay::Cameras::draw_background_images(), blender::draw::overlay::Empties::draw_background_images(), blender::draw::overlay::Curves::draw_color_only(), blender::draw::overlay::GreasePencil::draw_color_only(), blender::draw::overlay::Grid::draw_color_only(), blender::draw::overlay::LightProbes::draw_color_only(), blender::draw::overlay::Meshes::draw_color_only(), blender::draw::overlay::MotionPath::draw_color_only(), blender::draw::overlay::Origins::draw_color_only(), blender::draw::overlay::Empties::draw_images(), blender::draw::overlay::Cameras::draw_in_front(), blender::draw::overlay::Empties::draw_in_front_images(), blender::draw::overlay::Armatures::draw_line(), blender::draw::overlay::AttributeViewer::draw_line(), blender::draw::overlay::Axes::draw_line(), blender::draw::overlay::Bounds::draw_line(), blender::draw::overlay::Cameras::draw_line(), blender::draw::overlay::Curves::draw_line(), blender::draw::overlay::Empties::draw_line(), blender::draw::overlay::Fluids::draw_line(), blender::draw::overlay::ForceFields::draw_line(), blender::draw::overlay::GreasePencil::draw_line(), blender::draw::overlay::Lattices::draw_line(), blender::draw::overlay::LightProbes::draw_line(), blender::draw::overlay::Lights::draw_line(), blender::draw::overlay::Meshes::draw_line(), blender::draw::overlay::Metaballs::draw_line(), blender::draw::overlay::Particles::draw_line(), blender::draw::overlay::PointClouds::draw_line(), blender::draw::overlay::Prepass::draw_line(), blender::draw::overlay::Relations::draw_line(), blender::draw::overlay::Sculpts::draw_line(), blender::draw::overlay::Speakers::draw_line(), blender::draw::overlay::Wireframe::draw_line(), blender::draw::overlay::Outline::draw_line_only_ex(), blender::draw::overlay::ImagePrepass::draw_on_render(), blender::draw::overlay::MeshUVs::draw_on_render(), blender::draw::overlay::Sculpts::draw_on_render(), blender::draw::overlay::Background::draw_output(), blender::eevee::VolumeModule::draw_resolve(), blender::draw::overlay::Cameras::draw_scene_background_images(), blender::draw::overlay::Background::draw_vignette(), ED_view3d_axis_view_opposite(), ED_view3d_quat_from_axis_view(), ED_view3d_quat_to_axis_view(), blender::ui::AbstractViewItem::end_renaming(), blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), blender::draw::Manager::ensure_visibility(), Euler_getbuffer(), Euler_releasebuffer(), blender::nodes::node_composite_file_output_cc::FileOutputOperation::execute_multi_layer(), exr_print_filecontents(), blender::ui::find_filtered_item_index(), blender::ui::find_first_view_item_but(), blender::ui::find_item_from_rename_button(), blender::draw::overlay::Outline::flat_objects_pass_sync(), blender::draw::Texture::free_texture_views(), blender::math::detail::from_rotation(), FRS_exit(), FRS_init(), blender::draw::Manager::generate_commands(), blender::draw::Manager::generate_commands(), blender::ocio::Config::get_display_view_color_space(), blender::ocio::FallbackConfig::get_display_view_color_space(), blender::nodes::node_composite_file_output_cc::FileOutputOperation::get_image_path(), get_multilayer_view_index(), blender::compositor::get_view_index(), blender::draw::compositor_engine::Context::get_view_name(), GHOST_WindowCocoa::getValid(), GHOST_WindowCocoa::GHOST_WindowCocoa(), ghost_xr_draw_view_info_from_view(), GPU_matrix_project_2fv(), GPU_matrix_project_3fv(), GPU_matrix_unproject_3fv(), GPU_matrix_unproject_precalc(), GPU_texture_create_view(), GPU_viewport_bind(), GPU_viewport_color_texture(), gpu_viewport_draw_colormanaged(), GPU_viewport_draw_to_screen(), GPU_viewport_draw_to_screen_ex(), GPU_viewport_overlay_texture(), GPU_viewport_unbind_from_offscreen(), blender::ui::GridViewItemDropTarget::GridViewItemDropTarget(), blender::draw::overlay::FlatObjectRef::if_flat_axis_orthogonal_to_view(), image_memorypack_imbuf(), image_render_pass_get(), image_save_single(), IMB_colormanagement_display_is_hdr(), IMB_colormanagement_display_is_wide_gamut(), IMB_colormanagement_display_support_emulation(), IMB_colormanagement_validate_settings(), IMB_colormanagement_view_get_default_name(), IMB_colormanagement_view_get_raw_or_default_name(), IMB_colormanagement_view_items_add(), IMB_colormangement_display_get_color_space(), imb_exr_get_views(), IMB_exr_multilayer_convert(), IMB_exr_multilayer_convert(), imb_exr_multilayer_parse_channels_from_file(), init_view(), GHOST_WindowCocoa::invalidate(), lineart_main_load_geometries(), lineart_main_try_generate_shadow_v3(), Matrix_getbuffer(), Matrix_releasebuffer(), ml_addpass_cb(), MOD_lineart_chain_offset_towards_camera(), NODE_DEFINE(), blender::workbench::ShadowPass::object_sync(), blender::nodes::node_composite_file_output_cc::output_path_layout(), blender::nodes::node_composite_file_output_cc::output_paths_layout(), parse_channel_name(), parse_channel_name(), point_is_visible(), blender::draw::overlay::AttributeViewer::pre_draw(), blender::draw::overlay::Cameras::pre_draw(), blender::draw::overlay::Empties::pre_draw(), blender::draw::overlay::Facing::pre_draw(), blender::draw::overlay::Fade::pre_draw(), blender::draw::overlay::Lattices::pre_draw(), blender::draw::overlay::LightProbes::pre_draw(), blender::draw::overlay::Outline::pre_draw(), blender::draw::overlay::Particles::pre_draw(), blender::draw::overlay::PointClouds::pre_draw(), blender::draw::overlay::Prepass::pre_draw(), blender::draw::overlay::Wireframe::pre_draw(), blender::ed::sculpt_paint::project_brush_radius(), pygpu_buffer__bf_getbuffer(), pygpu_buffer__bf_releasebuffer(), Quaternion_getbuffer(), Quaternion_releasebuffer(), RE_create_render_pass(), RE_ResultIsMultiView(), region_quadview_init_rv3d(), blender::ui::region_views_find_drop_target_at(), blender::draw::gpencil::remap_depth(), blender::ui::AbstractViewItem::rename_apply(), blender::eevee::AmbientOcclusion::render(), blender::eevee::BackgroundPipeline::render(), blender::eevee::CapturePipeline::render(), blender::eevee::DeferredProbePipeline::render(), blender::eevee::DepthOfField::render(), blender::eevee::ForwardPipeline::render(), blender::eevee::MotionBlurModule::render(), blender::eevee::PlanarProbePipeline::render(), blender::eevee::ShadowPipeline::render(), blender::eevee::SubsurfaceModule::render(), blender::eevee::VolumeLayer::render(), blender::eevee::VolumePipeline::render(), blender::eevee::WorldPipeline::render(), blender::eevee::WorldVolumePipeline::render(), blender::draw::gpencil::render_init_buffers(), blender::eevee::AmbientOcclusion::render_pass(), blender::eevee::CaptureView::render_probes(), render_result_new(), blender::eevee::CaptureView::render_world(), select_operator_view_and_item_find_xy(), blender::ed::vse::sequencer_ibuf_get(), blender::eevee::ShadowModule::set_lights_data(), blender::eevee::LightModule::set_view(), blender::eevee::PlanarProbe::set_view(), blender::eevee::ShadowModule::set_view(), GHOST_WindowCocoa::setNativePixelSize(), blender::workbench::AntiAliasingPass::setup_view(), blender::ed::object::shapekey::ShapeKeyDragController::ShapeKeyDragController(), blender::ocio::split_view_specific_look(), blender::StringRef::StringRef(), blender::draw::external::Prepass::submit(), blender::draw::Manager::submit(), blender::draw::Manager::submit(), blender::draw::Manager::submit(), blender::draw::Manager::submit_debug(), blender::draw::Manager::submit_debug(), blender::draw::Manager::submit_only(), blender::eevee::IrradianceBake::surfel_raster_views_sync(), blender::eevee::Camera::sync(), blender::ocio::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::draw::test_draw_resource_id_gen(), blender::draw::test_draw_submit_only(), blender::draw::test_draw_visibility(), blender::draw::test_eevee_shadow_tag_update(), blender::draw::test_eevee_shadow_tilemap_amend(), blender::draw::test_eevee_surfel_list(), blender::math::transform_direction(), blender::math::transform_point(), blender::math::transform_point(), blender::math::transform_point(), ui_block_add_view_impl(), ui_block_view_find_idname(), ui_block_view_persistent_state_restore(), ui_view_focused_poll(), UI_view_item_can_rename(), ui_view_item_delete_invoke(), ui_view_item_select_exec(), ui_view_scroll_invoke(), ui_view_scroll_poll(), blender::workbench::ShadowPass::update(), Vector_getbuffer(), Vector_releasebuffer(), view_item_click_select(), blender::eevee::PlanarProbeModule::viewport_draw(), blender::eevee::SphereProbeModule::viewport_draw(), blender::eevee::VolumeProbeModule::viewport_draw(), wm_draw_area_offscreen(), wm_draw_region_bind(), wm_draw_region_blend(), wm_draw_region_blit(), wm_draw_region_texture(), wm_draw_window(), wm_draw_window_onscreen(), WM_keymap_guess_from_context(), wm_stereo3d_draw_sidebyside(), and wm_stereo3d_draw_topbottom().