|
Blender V5.0
|
#include <iostream>#include <optional>#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_animsys.h"#include "BKE_asset_edit.hh"#include "BKE_attribute_legacy_convert.hh"#include "BKE_attribute_storage.hh"#include "BKE_attribute_storage_blend_write.hh"#include "BKE_bake_data_block_id.hh"#include "BKE_curves.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_fcurve.hh"#include "BKE_geometry_set.hh"#include "BKE_grease_pencil.h"#include "BKE_grease_pencil.hh"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_main.hh"#include "BKE_material.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_object_types.hh"#include "BLI_array_utils.hh"#include "BLI_bounds.hh"#include "BLI_color_types.hh"#include "BLI_enumerable_thread_specific.hh"#include "BLI_listbase.h"#include "BLI_map.hh"#include "BLI_math_euler_types.hh"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_matrix.hh"#include "BLI_math_matrix_types.hh"#include "BLI_math_vector_types.hh"#include "BLI_memarena.h"#include "BLI_memory_utils.hh"#include "BLI_polyfill_2d.h"#include "BLI_resource_scope.hh"#include "BLI_span.hh"#include "BLI_stack.hh"#include "BLI_string.h"#include "BLI_string_ref.hh"#include "BLI_string_utf8.h"#include "BLI_string_utils.hh"#include "BLI_utildefines.h"#include "BLI_vector_set.hh"#include "BLI_virtual_array.hh"#include "BLO_read_write.hh"#include "BLT_translation.hh"#include "DNA_ID.h"#include "DNA_ID_enums.h"#include "DNA_brush_types.h"#include "DNA_defaults.h"#include "DNA_grease_pencil_types.h"#include "DNA_material_types.h"#include "DNA_modifier_types.h"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "RNA_access.hh"#include "RNA_path.hh"#include "RNA_prototypes.hh"#include "MEM_guardedalloc.h"#include "attribute_storage_access.hh"Go to the source code of this file.
Classes | |
| class | VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > |
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
| namespace | blender::bke::greasepencil |
Typedefs | |
| using | float3 |
| using | int3 |
Variables | |
| static const char * | ATTR_POSITION = "position" |
| IDTypeInfo | IDType_ID_GP |
| constexpr StringRef | blender::bke::greasepencil::ATTR_RADIUS = "radius" |
| constexpr StringRef | blender::bke::greasepencil::ATTR_OPACITY = "opacity" |
| constexpr StringRef | blender::bke::greasepencil::ATTR_VERTEX_COLOR = "vertex_color" |
| constexpr StringRef | blender::bke::greasepencil::ATTR_FILL_COLOR = "fill_color" |
Draw Cache | |
| void(* | BKE_grease_pencil_batch_cache_dirty_tag_cb )(GreasePencil *grease_pencil, int mode) = nullptr |
| void(* | BKE_grease_pencil_batch_cache_free_cb )(GreasePencil *grease_pencil) = nullptr |
| void | BKE_grease_pencil_batch_cache_dirty_tag (GreasePencil *grease_pencil, int mode) |
| void | BKE_grease_pencil_batch_cache_free (GreasePencil *grease_pencil) |
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::int3 |
Definition at line 602 of file BLI_math_vector_types.hh.
| GreasePencil * BKE_grease_pencil_add | ( | Main * | bmain, |
| const char * | name ) |
Definition at line 2027 of file grease_pencil.cc.
References BKE_id_new(), and name.
Referenced by BKE_object_obdata_add_from_type(), blender::ed::object::convert_curves_legacy_to_grease_pencil(), blender::ed::object::convert_font_to_grease_pencil(), blender::ed::object::convert_mesh_to_grease_pencil(), blender::bke::tests::ArmatureDeformTestBase::create_test_grease_pencil_object(), and blender::ed::greasepencil::duplicate_grease_pencil_object().
| void BKE_grease_pencil_batch_cache_dirty_tag | ( | GreasePencil * | grease_pencil, |
| int | mode ) |
Definition at line 2828 of file grease_pencil.cc.
References BKE_grease_pencil_batch_cache_dirty_tag_cb, and GreasePencil::runtime.
Referenced by BKE_object_batch_cache_dirty_tag().
| void BKE_grease_pencil_batch_cache_free | ( | GreasePencil * | grease_pencil | ) |
Definition at line 2835 of file grease_pencil.cc.
References BKE_grease_pencil_batch_cache_free_cb, and GreasePencil::runtime.
Referenced by grease_pencil_free_data().
| GreasePencil * BKE_grease_pencil_copy_for_eval | ( | const GreasePencil * | grease_pencil_src | ) |
Definition at line 2040 of file grease_pencil.cc.
References BKE_id_copy_ex(), GreasePencil::id, LIB_ID_COPY_LOCALIZE, and GreasePencil::runtime.
Referenced by blender::ed::object::convert_curves_to_grease_pencil(), blender::bke::GreasePencilComponent::copy(), blender::bke::GreasePencilComponent::ensure_owns_direct_data(), blender::geometry::execute_realize_grease_pencil_tasks(), blender::bke::GreasePencilComponent::get_for_write(), and blender::ed::geometry::get_original_geometry_eval_copy().
| void BKE_grease_pencil_copy_layer_group_parameters | ( | const blender::bke::greasepencil::LayerGroup & | src, |
| blender::bke::greasepencil::LayerGroup & | dst ) |
Definition at line 2086 of file grease_pencil.cc.
References blender::bke::greasepencil::LayerGroup::as_node(), GreasePencilLayerTreeNode::color, GreasePencilLayerTreeGroup::color_tag, copy_v3_v3(), and GreasePencilLayerTreeNode::flag.
Referenced by blender::ed::greasepencil::copy_layer_group_recursive(), and blender::ed::greasepencil::copy_layer_groups_without_layers().
| void BKE_grease_pencil_copy_layer_parameters | ( | const blender::bke::greasepencil::Layer & | src, |
| blender::bke::greasepencil::Layer & | dst ) |
Definition at line 2059 of file grease_pencil.cc.
References GreasePencilLayer::active_mask_index, blender::bke::greasepencil::Layer::as_node(), GreasePencilLayer::blend_mode, BLI_addtail(), GreasePencilLayerTreeNode::color, copy_m4_m4(), copy_v3_v3(), GreasePencilLayerTreeNode::flag, LISTBASE_FOREACH, GreasePencilLayer::masks, GreasePencilLayer::opacity, GreasePencilLayer::parent, GreasePencilLayer::parentinv, GreasePencilLayer::parsubstr, GreasePencilLayer::rotation, GreasePencilLayer::scale, blender::bke::greasepencil::Layer::set_parent_bone_name(), blender::bke::greasepencil::Layer::set_view_layer_name(), GreasePencilLayer::translation, and GreasePencilLayer::viewlayername.
Referenced by blender::ed::greasepencil::copy_layer(), blender::ed::greasepencil::copy_layer_and_frames_to_target_object(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_layers(), blender::geometry::execute_realize_grease_pencil_task(), blender::ed::greasepencil::find_or_create_layer_in_dst_by_name(), blender::ed::greasepencil::merge_layers(), and blender::geometry::separate_grease_pencil_layer_selection().
| void BKE_grease_pencil_copy_parameters | ( | const GreasePencil & | src, |
| GreasePencil & | dst ) |
Copy everything except the layer tree and the drawings.
Definition at line 2048 of file grease_pencil.cc.
References GreasePencil::attributes_active_index, BLI_duplicatelist(), GreasePencil::flag, GreasePencil::material_array, GreasePencil::material_array_num, MEM_dupallocN(), GreasePencil::onion_skinning_settings, GreasePencil::vertex_group_active_index, and GreasePencil::vertex_group_names.
Referenced by blender::ed::greasepencil::duplicate_grease_pencil_object(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_layers(), blender::geometry::execute_realize_grease_pencil_tasks(), blender::ed::greasepencil::grease_pencil_merge_layer_exec(), blender::geometry::merge_layers(), blender::geometry::separate_grease_pencil_layer_selection(), blender::ed::greasepencil::tests::TEST(), blender::ed::greasepencil::tests::TEST(), and blender::ed::greasepencil::tests::TEST().
| bool BKE_grease_pencil_drawing_attribute_required | ( | const GreasePencilDrawing * | , |
| const blender::StringRef | name ) |
Definition at line 2021 of file grease_pencil.cc.
References ATTR_POSITION, and name.
Referenced by BKE_attribute_required().
| void BKE_grease_pencil_duplicate_drawing_array | ( | const GreasePencil * | grease_pencil_src, |
| GreasePencil * | grease_pencil_dst ) |
Definition at line 2373 of file grease_pencil.cc.
References blender::bke::greasepencil::copy_drawing_array(), GreasePencil::drawing_array, GreasePencil::drawing_array_num, and MEM_calloc_arrayN().
Referenced by grease_pencil_copy_data().
| void BKE_grease_pencil_eval_geometry | ( | Depsgraph * | depsgraph, |
| GreasePencil * | grease_pencil ) |
Definition at line 2312 of file grease_pencil.cc.
References DEG_get_ctime(), depsgraph, grease_pencil_evaluate_layers(), and GreasePencil::runtime.
Referenced by blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock().
| bool BKE_grease_pencil_has_curve_with_type | ( | const GreasePencil & | grease_pencil, |
| CurveType | type ) |
Definition at line 2393 of file grease_pencil.cc.
References GP_DRAWING, blender::bke::greasepencil::Drawing::strokes(), and wrap().
Referenced by blender::ed::object::data_xform_create_ex().
| void BKE_grease_pencil_material_index_remove | ( | GreasePencil * | grease_pencil, |
| const int | index ) |
Definition at line 2741 of file grease_pencil.cc.
References blender::bke::CurvesGeometry::attributes_for_write(), BLI_assert, blender::bke::Curve, blender::bke::SpanAttributeWriter< T >::domain, blender::bke::SpanAttributeWriter< T >::finish(), GP_DRAWING, i, blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes_for_write(), and wrap().
Referenced by material_data_index_remove_id().
| bool BKE_grease_pencil_material_index_used | ( | GreasePencil * | grease_pencil, |
| int | index ) |
Definition at line 2767 of file grease_pencil.cc.
References blender::bke::CurvesGeometry::attributes(), blender::Span< T >::contains(), blender::bke::Curve, GP_DRAWING, blender::bke::AttributeAccessor::lookup_or_default(), blender::bke::greasepencil::Drawing::strokes(), and wrap().
Referenced by BKE_object_material_slot_used().
| void BKE_grease_pencil_material_remap | ( | GreasePencil * | grease_pencil, |
| const uint * | remap, | ||
| int | totcol ) |
Definition at line 2716 of file grease_pencil.cc.
References blender::bke::CurvesGeometry::attributes_for_write(), BLI_assert, blender::bke::Curve, blender::bke::SpanAttributeWriter< T >::domain, blender::bke::SpanAttributeWriter< T >::finish(), GP_DRAWING, i, blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes_for_write(), UNUSED_VARS_NDEBUG, and wrap().
Referenced by BKE_object_material_remap().
| GreasePencil * BKE_grease_pencil_new_nomain | ( | ) |
Definition at line 2034 of file grease_pencil.cc.
References BKE_id_new_nomain().
Referenced by BKE_object_eval_grease_pencil(), blender::ed::object::convert_curves_to_grease_pencil(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curves_to_grease_pencil_with_one_layer(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_layers(), blender::geometry::execute_realize_grease_pencil_tasks(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::geometry::extract_greasepencil_layers(), blender::ed::greasepencil::grease_pencil_merge_layer_exec(), blender::geometry::merge_layers(), blender::geometry::separate_grease_pencil_layer_selection(), blender::ed::greasepencil::tests::TEST(), blender::ed::greasepencil::tests::TEST(), blender::ed::greasepencil::tests::TEST(), blender::ed::greasepencil::tests::TEST(), blender::ed::greasepencil::tests::TEST(), and blender::bke::bake::try_load_grease_pencil().
| void BKE_grease_pencil_nomain_to_grease_pencil | ( | GreasePencil * | grease_pencil_src, |
| GreasePencil * | grease_pencil_dst ) |
Move data from a grease pencil outside of the main data-base into a grease pencil in the data-base. Takes ownership of the source grease pencil.
Definition at line 2095 of file grease_pencil.cc.
References GreasePencil::active_node, GreasePencil::attribute_storage, BKE_id_free(), BLI_assert, DEG_id_tag_update(), GreasePencil::drawing_array, GreasePencil::drawing_array_num, free_drawing_array(), GP_DRAWING, GP_DRAWING_REFERENCE, i, GreasePencil::id, ID_RECALC_GEOMETRY, GreasePencil::root_group_ptr, GreasePencilDrawingBase::type, and wrap().
Referenced by blender::ed::object::convert_curves_to_grease_pencil(), and blender::ed::greasepencil::grease_pencil_merge_layer_exec().
| Material * BKE_grease_pencil_object_material_alt_ensure_from_brush | ( | Main * | bmain, |
| Object * | ob, | ||
| Brush * | brush ) |
Definition at line 2699 of file grease_pencil.cc.
References blender::bke::asset_edit_id_find_local(), BKE_grease_pencil_object_material_ensure_from_brush(), BKE_object_material_slot_find_index(), and Material::id.
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done().
| Material * BKE_grease_pencil_object_material_ensure_by_name | ( | Main * | bmain, |
| Object * | ob, | ||
| const char * | name, | ||
| int * | r_index ) |
Definition at line 2635 of file grease_pencil.cc.
References BKE_grease_pencil_object_material_index_get_by_name(), BKE_grease_pencil_object_material_new(), BKE_object_material_get(), and name.
Referenced by blender::ed::greasepencil::add_material_from_template(), and blender::ed::object::mesh_to_grease_pencil_add_material().
| Material * BKE_grease_pencil_object_material_ensure_from_brush | ( | Main * | bmain, |
| Object * | ob, | ||
| Brush * | brush ) |
Definition at line 2672 of file grease_pencil.cc.
References Object::actcol, BKE_material_default_gpencil(), BKE_object_material_get(), GP_BRUSH_MATERIAL_PINNED, and grease_pencil_object_material_ensure_from_brush_pinned().
Referenced by BKE_grease_pencil_object_material_alt_ensure_from_brush(), blender::ed::sculpt_paint::grease_pencil_fill_init(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), and blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin().
Definition at line 2624 of file grease_pencil.cc.
References Object::actcol, BKE_object_material_get(), and GP_BRUSH_MATERIAL_PINNED.
Referenced by blender::ed::sculpt_paint::grease_pencil_brush_cursor_draw().
| int BKE_grease_pencil_object_material_index_get_by_name | ( | Object * | ob, |
| const char * | name ) |
Definition at line 2593 of file grease_pencil.cc.
References BKE_object_material_get(), BKE_object_material_len_p(), i, Material::id, ID::name, name, and STREQ.
Referenced by BKE_grease_pencil_object_material_ensure_by_name(), and blender::io::grease_pencil::GreasePencilImporter::create_material().
| Material * BKE_grease_pencil_object_material_new | ( | Main * | bmain, |
| Object * | ob, | ||
| const char * | name, | ||
| int * | r_index ) |
Definition at line 2607 of file grease_pencil.cc.
References Object::actcol, BKE_gpencil_material_add(), BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), BKE_object_material_slot_add(), Material::id, id_us_min(), name, and Object::totcol.
Referenced by blender::ed::object::add_grease_pencil_materials_for_conversion(), BKE_grease_pencil_object_material_ensure_by_name(), blender::ed::greasepencil::clipboard_materials_remap(), blender::io::grease_pencil::GreasePencilImporter::create_material(), and blender::ui::greasepencil::eyedropper_add_material().
| void BKE_grease_pencil_point_coords_apply | ( | GreasePencil & | grease_pencil, |
| blender::Span< blender::float3 > | all_positions, | ||
| blender::Span< float > | all_radii ) |
Definition at line 2484 of file grease_pencil.cc.
References CURVE_TYPE_BEZIER, GreasePencilFrame::drawing_index, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::foreach_item(), blender::bke::greasepencil::Layer::frames(), GP_DRAWING, i, blender::math::invert(), blender::bke::greasepencil::Layer::local_transform(), blender::bke::greasepencil::Drawing::radii_for_write(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_positions_changed(), blender::math::transform_point(), GreasePencilDrawingBase::type, and wrap().
Referenced by blender::ed::object::data_xform_restore().
| void BKE_grease_pencil_point_coords_apply_with_mat4 | ( | GreasePencil & | grease_pencil, |
| blender::Span< blender::float3 > | all_positions, | ||
| blender::Span< float > | all_radii, | ||
| const blender::float4x4 & | mat ) |
Definition at line 2534 of file grease_pencil.cc.
References CURVE_TYPE_BEZIER, GreasePencilFrame::drawing_index, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::foreach_item(), blender::bke::greasepencil::Layer::frames(), GP_DRAWING, i, blender::math::invert(), blender::bke::greasepencil::Layer::local_transform(), mat4_to_scale(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::bke::greasepencil::Drawing::radii_for_write(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_positions_changed(), blender::math::transform_point(), GreasePencilDrawingBase::type, and wrap().
Referenced by blender::ed::object::data_xform_by_mat4().
| void BKE_grease_pencil_point_coords_get | ( | const GreasePencil & | grease_pencil, |
| blender::MutableSpan< blender::float3 > | all_positions, | ||
| blender::MutableSpan< float > | all_radii ) |
Definition at line 2437 of file grease_pencil.cc.
References CURVE_TYPE_BEZIER, GreasePencilFrame::drawing_index, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::foreach_item(), blender::bke::greasepencil::Layer::frames(), GP_DRAWING, i, blender::bke::greasepencil::Layer::local_transform(), blender::bke::greasepencil::Drawing::radii(), blender::bke::greasepencil::Drawing::strokes(), blender::math::transform_point(), GreasePencilDrawingBase::type, and wrap().
Referenced by blender::ed::object::data_xform_create_ex().
| bool BKE_grease_pencil_references_cyclic_check | ( | const GreasePencil * | id_reference, |
| const GreasePencil * | grease_pencil ) |
Definition at line 2812 of file grease_pencil.cc.
References grease_pencil_references_cyclic_check_internal().
| int BKE_grease_pencil_stroke_point_count | ( | const GreasePencil & | grease_pencil | ) |
Definition at line 2412 of file grease_pencil.cc.
References GreasePencilFrame::drawing_index, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::foreach_item(), blender::bke::greasepencil::Layer::frames(), GP_DRAWING, blender::bke::greasepencil::Drawing::strokes(), GreasePencilDrawingBase::type, and wrap().
Referenced by blender::ed::object::data_xform_create_ex().
| void BKE_grease_pencil_vgroup_name_update | ( | Object * | ob, |
| const char * | old_name, | ||
| const char * | new_name ) |
Definition at line 2143 of file grease_pencil.cc.
References Object::data, LISTBASE_FOREACH, STREQ, STRNCPY_UTF8, Drawing::strokes_for_write(), and wrap().
Referenced by BKE_object_defgroup_set_name(), and ED_armature_bone_rename().
Definition at line 2321 of file grease_pencil.cc.
References BKE_grease_pencil_new_nomain(), BKE_object_eval_assign_data(), BKE_object_free_derived_caches(), blender::bke::AttributeAccessor::contains(), data, DEG_get_ctime(), DEG_get_original(), depsgraph, ELEM, GeometrySet::from_grease_pencil(), GeometrySet::get_component_for_write(), GeometrySet::get_grease_pencil(), GeometrySet::get_grease_pencil_for_write(), grease_pencil_do_layer_adjustments(), blender::bke::GeometryComponentEditData::grease_pencil_edit_hints_, grease_pencil_evaluate_modifiers(), GeometrySet::has_grease_pencil(), GreasePencil::id, OB_MODE_EDIT, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_VERTEX_GREASE_PENCIL, OB_MODE_WEIGHT_GREASE_PENCIL, blender::bke::ReadOnly, GeometrySet::replace_grease_pencil(), and GreasePencil::runtime.
Referenced by BKE_object_handle_data_update().
|
static |
Definition at line 2893 of file grease_pencil.cc.
References GP_DRAWING, GP_DRAWING_REFERENCE, and GreasePencilDrawingBase::type.
|
static |
Definition at line 4436 of file grease_pencil.cc.
Referenced by BKE_grease_pencil_nomain_to_grease_pencil(), and grease_pencil_free_data().
|
static |
Definition at line 3692 of file grease_pencil.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), and GreasePencilLayerTreeNode::name.
Referenced by unique_node_name().
|
static |
Definition at line 328 of file grease_pencil.cc.
References GreasePencil::attribute_storage, BLO_read_pointer_array(), BLO_read_struct_list, CustomData_blend_read(), grease_pencil_initialize_drawing_user_counts_after_read(), GreasePencil::layers_data_legacy, GreasePencil::material_array, GreasePencil::material_array_num, read_drawing_array(), read_layer_tree(), GreasePencil::runtime, and GreasePencil::vertex_group_names.
|
static |
Definition at line 294 of file grease_pencil.cc.
References GreasePencil::attribute_storage, blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::BlendWriteData::attributes, BKE_defbase_blend_write(), BKE_id_blend_write(), BLO_write_id_struct, BLO_write_pointer_array(), CustomData_reset(), AttributeStorage::dna_attributes, AttributeStorage::dna_attributes_num, GreasePencil::id, GreasePencil::layers_data_legacy, GreasePencil::material_array, GreasePencil::material_array_num, GreasePencil::vertex_group_names, write_drawing_array(), and write_layer_tree().
|
static |
Definition at line 193 of file grease_pencil.cc.
References GreasePencil::attribute_storage, BKE_defgroup_copy_list(), BKE_grease_pencil_duplicate_drawing_array(), BLI_assert, grease_pencil_set_runtime_visibilities(), GreasePencil::material_array, MEM_dupallocN(), GreasePencil::root_group_ptr, GreasePencil::runtime, and GreasePencil::vertex_group_names.
|
static |
Definition at line 2218 of file grease_pencil.cc.
References Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::AttributeAccessor::contains(), MutableSpan< T >::index_range(), blender::bke::Layer, blender::bke::AttributeAccessor::lookup_or_default(), blender::threading::parallel_for(), and blender::threading::parallel_for_each().
Referenced by BKE_object_eval_grease_pencil().
|
static |
Definition at line 2287 of file grease_pencil.cc.
References Array< T, InlineBufferCapacity, Allocator >::index_range(), and GreasePencilLayer::runtime.
Referenced by BKE_grease_pencil_eval_geometry().
|
static |
Definition at line 2158 of file grease_pencil.cc.
References BKE_modifier_get_info(), BKE_modifier_is_enabled(), BKE_modifiers_clear_errors(), BKE_modifiers_get_virtual_modifierlist(), BKE_object_is_in_editmode(), DAG_EVAL_RENDER, DEG_get_mode(), depsgraph, eModifierMode_Editmode, eModifierMode_Realtime, eModifierMode_Render, eModifierType_GreasePencilTime, MOD_APPLY_RENDER, MOD_APPLY_USECACHE, ModifierTypeInfo::modify_geometry_set, ModifierData::next, and ModifierData::type.
Referenced by BKE_object_eval_grease_pencil().
|
static |
Definition at line 259 of file grease_pencil.cc.
References BKE_LIB_FOREACHID_PROCESS_IDSUPER, data, GP_DRAWING_REFERENCE, i, GreasePencilDrawingReference::id_reference, IDWALK_CB_USER, GreasePencil::material_array, and GreasePencil::material_array_num.
|
static |
Definition at line 279 of file grease_pencil.cc.
References GreasePencil::attribute_storage, GreasePencilOnionSkinningSettings::color_after, GreasePencilOnionSkinningSettings::color_before, and GreasePencil::onion_skinning_settings.
|
static |
Definition at line 239 of file grease_pencil.cc.
References GreasePencil::attribute_storage, BKE_animdata_free(), BKE_grease_pencil_batch_cache_free(), BLI_freelistN(), free_drawing_array(), GreasePencil::id, GreasePencil::material_array, MEM_SAFE_FREE, GreasePencil::runtime, and GreasePencil::vertex_group_names.
|
static |
Definition at line 102 of file grease_pencil.cc.
References GreasePencil::attribute_storage, BLI_assert, CustomData_reset(), DNA_struct_default_get, GreasePencil::layers_data_legacy, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, GreasePencil::root_group_ptr, and GreasePencil::runtime.
|
static |
Definition at line 178 of file grease_pencil.cc.
References BLI_assert, GP_DRAWING_REFERENCE, GreasePencilDrawing::runtime, Array< T, InlineBufferCapacity, Allocator >::size(), GreasePencilDrawingBase::type, and wrap().
Referenced by grease_pencil_blend_read_data().
|
static |
Definition at line 2648 of file grease_pencil.cc.
References blender::bke::asset_edit_id_ensure_local(), BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), BKE_object_material_index_get(), BKE_object_material_slot_add(), Material::id, and Object::totcol.
Referenced by BKE_grease_pencil_object_material_ensure_from_brush().
|
static |
Definition at line 2794 of file grease_pencil.cc.
References GP_DRAWING_REFERENCE, and grease_pencil_references_cyclic_check_internal().
Referenced by BKE_grease_pencil_references_cyclic_check(), and grease_pencil_references_cyclic_check_internal().
|
static |
Definition at line 122 of file grease_pencil.cc.
References GreasePencil::adt, blender::bke::greasepencil::LayerGroup::as_node(), BLI_assert_msg, DEG_is_evaluated(), blender::bke::greasepencil::TreeNode::parent_group(), blender::bke::animdata::prop_is_animated(), RNA_path_from_ID_to_property(), RNA_pointer_create_discrete(), and RNA_struct_type_find_property().
Referenced by grease_pencil_copy_data().
Definition at line 2848 of file grease_pencil.cc.
References BLI_assert, MEM_calloc_arrayN(), MEM_freeN(), num, T, and blender::uninitialized_relocate_n().
|
static |
Definition at line 4030 of file grease_pencil.cc.
References ATTR_FALLTHROUGH, eModifierType_GreasePencilArmature, eModifierType_GreasePencilArray, eModifierType_GreasePencilBuild, eModifierType_GreasePencilColor, eModifierType_GreasePencilDash, eModifierType_GreasePencilEnvelope, eModifierType_GreasePencilHook, eModifierType_GreasePencilLattice, eModifierType_GreasePencilLength, eModifierType_GreasePencilLineart, eModifierType_GreasePencilMirror, eModifierType_GreasePencilMultiply, eModifierType_GreasePencilNoise, eModifierType_GreasePencilOffset, eModifierType_GreasePencilOpacity, eModifierType_GreasePencilOutline, eModifierType_GreasePencilShrinkwrap, eModifierType_GreasePencilSimplify, eModifierType_GreasePencilSmooth, eModifierType_GreasePencilSubdiv, eModifierType_GreasePencilTexture, eModifierType_GreasePencilThickness, eModifierType_GreasePencilTime, eModifierType_GreasePencilTint, eModifierType_GreasePencilWeightAngle, eModifierType_GreasePencilWeightProximity, GreasePencilArmatureModifierData::influence, GreasePencilArrayModifierData::influence, GreasePencilBuildModifierData::influence, GreasePencilColorModifierData::influence, GreasePencilDashModifierData::influence, GreasePencilEnvelopeModifierData::influence, GreasePencilHookModifierData::influence, GreasePencilLatticeModifierData::influence, GreasePencilLengthModifierData::influence, GreasePencilMirrorModifierData::influence, GreasePencilMultiModifierData::influence, GreasePencilNoiseModifierData::influence, GreasePencilOffsetModifierData::influence, GreasePencilOpacityModifierData::influence, GreasePencilOutlineModifierData::influence, GreasePencilShrinkwrapModifierData::influence, GreasePencilSimplifyModifierData::influence, GreasePencilSmoothModifierData::influence, GreasePencilSubdivModifierData::influence, GreasePencilTextureModifierData::influence, GreasePencilThickModifierData::influence, GreasePencilTimeModifierData::influence, GreasePencilTintModifierData::influence, GreasePencilWeightAngleModifierData::influence, GreasePencilWeightProximityModifierData::influence, and ModifierData::type.
|
static |
Definition at line 4378 of file grease_pencil.cc.
References BLO_read_pointer_array(), BLO_read_struct, GreasePencil::drawing_array, GreasePencil::drawing_array_num, GP_DRAWING, GP_DRAWING_REFERENCE, i, GreasePencilDrawing::runtime, and GreasePencilDrawingBase::type.
Referenced by grease_pencil_blend_read_data().
|
static |
Definition at line 4447 of file grease_pencil.cc.
References GreasePencilLayer::base, BLO_read_int32_array(), BLO_read_string(), BLO_read_struct_array, BLO_read_struct_list, GreasePencilLayer::frames_storage, GreasePencilLayerFramesMapStorage::keys, LISTBASE_FOREACH, mask(), GreasePencilLayer::masks, GreasePencilLayerTreeNode::name, GreasePencilLayerFramesMapStorage::num, GreasePencilLayerTreeNode::parent, GreasePencilLayer::parsubstr, GreasePencilLayer::runtime, GreasePencilLayerFramesMapStorage::values, and GreasePencilLayer::viewlayername.
Referenced by read_layer_tree_group().
|
static |
Definition at line 4500 of file grease_pencil.cc.
References GreasePencil::active_node, BLO_read_struct, read_layer_tree_group(), and GreasePencil::root_group_ptr.
Referenced by grease_pencil_blend_read_data().
|
static |
Definition at line 4474 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::base, BLO_read_string(), BLO_read_struct_list, GreasePencilLayerTreeGroup::children, GP_LAYER_TREE_GROUP, GP_LAYER_TREE_LEAF, LISTBASE_FOREACH, GreasePencilLayerTreeNode::name, GreasePencilLayerTreeNode::parent, read_layer(), read_layer_tree_group(), and GreasePencilLayerTreeGroup::runtime.
Referenced by read_layer_tree(), and read_layer_tree_group().
|
static |
Definition at line 3861 of file grease_pencil.cc.
References blender::bke::Array, blender::bke::Attribute::assign_data(), blender::bke::attribute_type_to_cpp_type(), blender::bke::Attribute::data(), data, blender::bke::Attribute::data_type(), blender::bke::Attribute::domain(), blender::bke::Attribute::ArrayData::from_constructed(), blender::bke::attribute_math::gather(), blender::bke::Single, blender::Span< T >::size(), CPPType::size, and blender::bke::Attribute::storage_type().
Referenced by reorder_layer_data().
|
static |
Definition at line 3887 of file grease_pencil.cc.
References Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), GreasePencil::attribute_storage, BLI_assert, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), i, blender::Span< T >::index_range(), Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::bke::Layer, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop(), reorder_attribute_domain(), Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::Span< T >::size(), and Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
Definition at line 2862 of file grease_pencil.cc.
References BLI_assert, MEM_calloc_arrayN(), MEM_freeN(), num, T, and blender::uninitialized_move_n().
|
static |
Definition at line 4201 of file grease_pencil.cc.
References blender::bke::Array, blender::bke::Attribute::assign_data(), blender::bke::attribute_type_to_cpp_type(), CPPType::copy_construct_n(), blender::bke::Attribute::data(), data, blender::bke::Attribute::data_type(), blender::bke::AttributeStorage::foreach(), blender::bke::Attribute::ArrayData::from_uninitialized(), POINTER_OFFSET, blender::bke::Single, CPPType::size, IndexRange::size(), size(), IndexRange::start(), and blender::bke::Attribute::storage_type().
|
static |
Definition at line 3721 of file grease_pencil.cc.
References DATA_, name, and unique_node_name().
|
static |
Definition at line 3702 of file grease_pencil.cc.
References BLI_assert, BLI_uniquename_cb(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), get_node_names(), and name.
Referenced by unique_layer_group_name().
|
static |
Definition at line 4230 of file grease_pencil.cc.
References GreasePencilLayerTreeNode::next, GreasePencilLayerTreeNode::parent, GreasePencilLayerTreeNode::prev, and GreasePencil::root_group_ptr.
|
static |
Definition at line 4401 of file grease_pencil.cc.
References BLO_write_pointer_array(), BLO_write_shared_tag(), BLO_write_struct, BLO_write_struct_at_address, blender::ResourceScope::construct(), GreasePencil::drawing_array, GreasePencil::drawing_array_num, GreasePencilDrawing::geometry, GP_DRAWING, GP_DRAWING_REFERENCE, i, GreasePencil::id, GreasePencilDrawing::runtime, and GreasePencilDrawingBase::type.
Referenced by grease_pencil_blend_write().
|
static |
Definition at line 4519 of file grease_pencil.cc.
References GreasePencilLayer::base, BLO_write_int32_array(), BLO_write_string(), BLO_write_struct, BLO_write_struct_array, BLO_write_struct_list, GreasePencilLayer::frames_storage, GreasePencilLayerFramesMapStorage::keys, LISTBASE_FOREACH, mask(), GreasePencilLayer::masks, GreasePencilLayerTreeNode::name, GreasePencilLayerFramesMapStorage::num, GreasePencilLayer::parsubstr, GreasePencilLayerFramesMapStorage::values, and GreasePencilLayer::viewlayername.
Referenced by write_layer_tree_group().
|
static |
Definition at line 4556 of file grease_pencil.cc.
References GreasePencil::root_group_ptr, and write_layer_tree_group().
Referenced by grease_pencil_blend_write().
|
static |
Definition at line 4536 of file grease_pencil.cc.
References GreasePencilLayerTreeGroup::base, BLO_write_string(), BLO_write_struct, GreasePencilLayerTreeGroup::children, GP_LAYER_TREE_GROUP, GP_LAYER_TREE_LEAF, LISTBASE_FOREACH, GreasePencilLayerTreeNode::name, write_layer(), and write_layer_tree_group().
Referenced by write_layer_tree(), and write_layer_tree_group().
|
static |
Definition at line 90 of file grease_pencil.cc.
| void(* BKE_grease_pencil_batch_cache_dirty_tag_cb) (GreasePencil *grease_pencil, int mode) | ( | GreasePencil * | grease_pencil, |
| int | mode ) = nullptr |
Definition at line 2824 of file grease_pencil.cc.
Referenced by BKE_grease_pencil_batch_cache_dirty_tag(), and DRW_module_init().
| void(* BKE_grease_pencil_batch_cache_free_cb) (GreasePencil *grease_pencil) | ( | GreasePencil * | grease_pencil | ) | = nullptr |
Definition at line 2826 of file grease_pencil.cc.
Referenced by BKE_grease_pencil_batch_cache_free(), and DRW_module_init().
| IDTypeInfo IDType_ID_GP |
Definition at line 354 of file grease_pencil.cc.