9#define DNA_DEPRECATED_ALLOW
77 ntree,
node,
SOCK_IN,
"NodeSocketMenu",
"Depth Order");
99 const float frame_aspect)
109 const int sensor_fit,
112 const float render_aspect)
117 (rv3d->
camdy == 0.0f))
123 sensor_fit, winx, winy,
float(winy) /
float(winx));
150 if (scene ==
nullptr) {
165 camera->data !=
nullptr) ?
166 id_cast<const Camera *>(
camera->data)->sensor_fit :
171 for (
ARegion ®ion : *regions) {
176 if (rv3d ==
nullptr) {
179 if ((region.winx <= 1) || (region.winy <= 1)) {
184 if (rv3d->
localvd !=
nullptr) {
186 rv3d->
localvd, sensor_fit, region.winx, region.winy, render_aspect);
196 if (
brush.gpencil_settings) {
220 ntree.ensure_interface_cache();
223 !
STREQ(input->socket_type,
"NodeSocketBool"))
277 bool has_skip_alphabet_sort_method =
false;
284 has_skip_alphabet_sort_method =
true;
290 auto version_collection_fn = [&](
Collection &collection) {
298 if (has_skip_alphabet_sort_method && cob.
ob !=
nullptr && cob.
ob->
parent !=
nullptr) {
308 version_collection_fn(collection);
362 if (std::optional<AssetWeakReference> paint_brush_asset_reference =
381 node_tree->ensure_interface_cache();
408 if (
brush.mesh_automasking_settings ==
nullptr) {
409 brush.mesh_automasking_settings = MEM_new<MeshAutomaskingSettings>(__func__);
416 if (
paint ==
nullptr) {
420 if (
paint->mesh_automasking_settings ==
nullptr) {
421 paint->mesh_automasking_settings = MEM_new<MeshAutomaskingSettings>(
"blo_do_versions_520");
445 if (
STREQ(
node.idname,
"GeometryNodeSetGreasePencilColor")) {
448 if (
STREQ(
node.idname,
"GeometryNodeSetGreasePencilDepth")) {
451 if (
STREQ(
node.idname,
"GeometryNodeMergeLayers")) {
461 if (
brush.curve_hardness ==
nullptr) {
466 if (
brush.curve_auto_smooth ==
nullptr) {
469 if (
brush.curve_spacing ==
nullptr) {
486 const Sculpt defaults = {};
513 switch (
brush.falloff_shape) {
516 brush.mesh_automasking_settings->start_normal_falloff = 0.5f;
517 brush.mesh_automasking_settings->start_normal_limit =
brush.falloff_angle_legacy;
521 brush.mesh_automasking_settings->view_normal_falloff = 0.5f;
522 brush.mesh_automasking_settings->view_normal_limit =
brush.falloff_angle_legacy;
531 auto validate_active_index_fn = [](
const AttributeOwner &owner,
int &active_index) ->
void {
533 if ((active_index < 0) || (active_index >=
storage->count()) ||
545 curves.geometry.attributes_active_index);
554 validate_active_index_fn(
604 switch (strip->type) {
605 case STRIP_TYPE_IMAGE:
609 strip->data->stripdata_num = strip->anim_startofs + strip->len + strip->anim_endofs;
611 case STRIP_TYPE_MOVIE:
612 case STRIP_TYPE_SOUND:
614 strip->data->stripdata_num = strip->data->stripdata ? 1 : 0;
617 strip->data->stripdata_num = 0;
627 for (bScreen &screen : bmain->screens) {
628 for (ScrArea &area : screen.areabase) {
629 for (SpaceLink &space : area.spacedata) {
631 SpaceSeq *space_sequencer =
reinterpret_cast<SpaceSeq *
>(&space);
632 SequencerTimelineOverlay &timeline_overlay = space_sequencer->timeline_overlay;
633 const bool show_thumbnails =
661 for (
bScreen &screen : bmain->screens) {
662 for (
ScrArea &area : screen.areabase) {
663 for (
SpaceLink &space : area.spacedata) {
674 for (
Material &materials : bmain->materials) {
675 if (materials.gp_style ==
nullptr) {
686 copy_v4_v4(&materials.gp_style->gradient->data[0].r, materials.gp_style->mix_rgba);
687 copy_v4_v4(&materials.gp_style->gradient->data[1].r, materials.gp_style->fill_rgba);
690 copy_v4_v4(&materials.gp_style->gradient->data[0].r, materials.gp_style->fill_rgba);
691 copy_v4_v4(&materials.gp_style->gradient->data[1].r, materials.gp_style->mix_rgba);
700 for (
Scene &scene : bmain->scenes) {
709 for (
bScreen &screen : bmain->screens) {
710 for (
ScrArea &area : screen.areabase) {
711 for (
SpaceLink &space : area.spacedata) {
715 ListBaseT<ARegion> *regionbase = (&space == area.spacedata.first_) ? &area.regionbase :
Generic geometry attributes built on CustomData.
Camera data-block and utility functions.
#define IDP_int_get(prop)
#define IDP_int_set(prop, value)
#define MAIN_VERSION_FILE_ATLEAST(main, ver, subver)
#define FOREACH_NODETREE_END
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
ID and Library types, which are fundamental for SDNA.
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
#define SET_FLAG_FROM_TEST(value, test, flag)
bke::AttributeStorage * get_storage() const
static AttributeOwner from_id(ID *id)
Value & lookup_or_add(const Key &key, const Value &value)
constexpr bool endswith(StringRef suffix) const
#define storage(slot, qualifiers)
void camera(KernelGlobals &kg, const ShadingData &sd, float3 &outview, float &outdepth, float &outdist)
bool allow_procedural_attribute_access(StringRef attribute_name)
void mesh_skin_to_generic(Mesh &mesh)
bNodeSocket * node_find_socket(bNode &node, eNodeSocketInOut in_out, UString identifier)
T clamp(const T &a, const T &min, const T &max)
void foreach_strip(ListBaseT< Strip > *seqbase, ForEachFunc callback, void *user_data)
Editing * editing_get(const Scene *scene)
SequencerToolSettings * tool_settings_ensure(Scene *scene)
bool version_node_ensure_storage_or_invalidate(bNode &node)
@ SEQ_TIMELINE_MIDDLE_THUMBNAILS
@ SEQ_TIMELINE_STRIP_END_THUMBNAILS
@ SEQ_TIMELINE_SHOW_THUMBNAILS
@ SEQ_TIMELINE_CONTINUOUS_THUMBNAILS
static void version_503_camera_view_fit(RegionView3D *rv3d, const int sensor_fit, const int winx, const int winy, const float render_aspect)
IDProperty * IDP_GetPropertyTypeFromGroup(const IDProperty *prop, StringRef name, char type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
std::optional< AssetWeakReference > BKE_paint_brush_type_default_reference(bke::paint::AssetCategory asset_category, std::optional< int > brush_type)
static void version_layer_selection_modifier_inputs(NodesModifierData &nmd)
@ PAINT_FALLOFF_SHAPE_SPHERE
@ PAINT_FALLOFF_SHAPE_TUBE
static float version_503_camera_view_viewfac(const int sensor_fit, const int winx, const int winy, const float frame_aspect)
ColorBand * BKE_colorband_add(bool rangetype)
float2 BKE_camera_frame_size(float winx, float winy, float frame_aspect)
static void do_version_set_grease_pencil_colors_options_to_inputs(bNodeTree &ntree, bNode &node)
void do_versions_after_linking_503(FileData *fd, Main *bmain)
static void clear_deprecated_brush_flags(Brush &brush)
VecBase< float, 2 > float2
@ OB_MODE_VERTEX_GREASE_PENCIL
@ OB_MODE_SCULPT_GREASE_PENCIL
@ OB_MODE_WEIGHT_GREASE_PENCIL
float BKE_screen_view3d_zoom_from_fac(float zoomfac)
CurveMapping * BKE_paint_default_curve_inverted()
CurveMapping * BKE_sculpt_default_cavity_curve()
bool BKE_paint_brush_set(Paint *paint, Brush *brush)
int BKE_camera_sensor_fit(int sensor_fit, float sizex, float sizey)
@ SEQ_RIPPLE_CLEAR_RANGES
@ SEQ_RIPPLE_ALL_CHANNELS
@ BRUSH_AUTOMASKING_BRUSH_NORMAL
@ BRUSH_AUTOMASKING_VIEW_NORMAL
static void do_versioning_camera_view_zoom(Main *bmain)
@ BRUSH_USE_UNIFIED_PAINT_SIZE
@ BRUSH_USE_UNIFIED_PAINT_COLOR
void version_compositing_node_group_to_effect(Scene &scene, bNodeTree &node_group)
@ NODE_DEFAULT_INPUT_POSITION_FIELD
@ NODE_DEFAULT_INPUT_VALUE
static void do_version_merge_layers_options_to_inputs(bNodeTree &ntree, bNode &node)
CurveMapping * BKE_paint_default_curve()
@ BRUSH_HARDNESS_PRESSURE
float BKE_screen_view3d_zoom_to_fac(float camzoom)
MINLINE void copy_v4_v4(float r[4], const float a[4])
@ EEVEE_DENOISING_PASS_USE_ALBEDO_ROUGHNESS_WEIGHTING
ARegion * do_versions_add_region_if_not_found(ListBaseT< ARegion > *regionbase, int region_type, const char *, int link_after_region_type)
@ NODE_INTERFACE_SOCKET_LAYER_SELECTION
static void do_version_set_grease_pencil_depth_options_to_inputs(bNodeTree &ntree, bNode &node)
void version_node_socket_index_animdata(Main *bmain, const int node_tree_type, const int node_type, const int socket_index_orig, const int socket_index_offset, const int total_number_of_sockets)
void blo_do_versions_503(FileData *fd, Library *lib, Main *bmain)
bNodeSocket & version_node_add_socket(bNodeTree &ntree, bNode &node, const eNodeSocketInOut in_out, const char *idname, const char *identifier)
@ GP_MATERIAL_FILL_STYLE_GRADIENT
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
const char * relative_asset_identifier
int attributes_active_index
ListBaseT< wmWindowManager > wm
ListBaseT< Collection > collections
ListBaseT< Curves > hair_curves
ListBaseT< PointCloud > pointclouds
ListBaseT< Brush > brushes
ListBaseT< Object > objects
ListBaseT< Scene > scenes
ListBaseT< GreasePencil > grease_pencils
ListBaseT< bScreen > screens
struct IDProperty * system_properties
struct bNodeTree * node_group
struct AssetWeakReference * brush_asset_reference
int attributes_active_index
struct RegionView3D * localvd
eRegionView3D_Persp persp
ListBaseT< ViewLayer > view_layers
struct Collection * master_collection
DNA_DEPRECATED struct bNodeTree * compositing_node_group
struct ToolSettings * toolsettings
ListBaseT< ARegion > regionbase
ListBaseT< SpaceLink > spacedata
eTimeline_Cache_Flag cache_display
ListBaseT< ARegion > regionbase
eSpaceOutliner_SortMethod sort_method
struct ViewLayerEEVEE eevee
ListBaseT< struct ScrArea > areabase