Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt17
-rw-r--r--source/blender/makesrna/intern/makesrna.c8
-rw-r--r--source/blender/makesrna/intern/rna_ID.c18
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c4
-rw-r--r--source/blender/makesrna/intern/rna_armature.c2
-rw-r--r--source/blender/makesrna/intern/rna_brush.c76
-rw-r--r--source/blender/makesrna/intern/rna_color.c10
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h6
-rw-r--r--source/blender/makesrna/intern/rna_layer.c7
-rw-r--r--source/blender/makesrna/intern/rna_main.c12
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c18
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c32
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c3
-rw-r--r--source/blender/makesrna/intern/rna_object.c8
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c23
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene.c39
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_screen.c6
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c31
-rw-r--r--source/blender/makesrna/intern/rna_space_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c11
-rw-r--r--source/blender/makesrna/intern/rna_wm.c8
25 files changed, 289 insertions, 64 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 0b43a5a6653..303005a0f9e 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -47,7 +47,6 @@ set(DEFSRC
rna_fluid.c
rna_gpencil.c
rna_gpencil_modifier.c
- rna_hair.c
rna_image.c
rna_key.c
rna_lattice.c
@@ -69,7 +68,6 @@ set(DEFSRC
rna_packedfile.c
rna_palette.c
rna_particle.c
- rna_pointcloud.c
rna_pose.c
rna_render.c
rna_rigidbody.c
@@ -79,7 +77,6 @@ set(DEFSRC
rna_sculpt_paint.c
rna_sequencer.c
rna_shader_fx.c
- rna_simulation.c
rna_sound.c
rna_space.c
rna_speaker.c
@@ -99,6 +96,16 @@ set(DEFSRC
rna_xr.c
)
+if(WITH_EXPERIMENTAL_FEATURES)
+ add_definitions(-DWITH_PARTICLE_NODES)
+ add_definitions(-DWITH_HAIR_NODES)
+ list(APPEND DEFSRC
+ rna_pointcloud.c
+ rna_simulation.c
+ rna_hair.c
+ )
+endif()
+
set(APISRC
rna_action_api.c
rna_animation_api.c
@@ -345,6 +352,10 @@ if(WITH_XR_OPENXR)
add_definitions(-DWITH_XR_OPENXR)
endif()
+if(WITH_GMP)
+ add_definitions(-DWITH_GMP)
+endif()
+
# Build makesrna executable
blender_include_dirs(
.
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 779e4363be0..2b1e5b3c702 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -599,7 +599,7 @@ static void rna_float_print(FILE *f, float num)
else if (num == FLT_MAX) {
fprintf(f, "FLT_MAX");
}
- else if ((fabsf(num) < INT64_MAX) && ((int64_t)num == num)) {
+ else if ((fabsf(num) < (float)INT64_MAX) && ((int64_t)num == num)) {
fprintf(f, "%.1ff", num);
}
else {
@@ -4285,7 +4285,9 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_dynamicpaint.c", NULL, RNA_def_dynamic_paint},
{"rna_fcurve.c", "rna_fcurve_api.c", RNA_def_fcurve},
{"rna_gpencil.c", NULL, RNA_def_gpencil},
+#ifdef WITH_HAIR_NODES
{"rna_hair.c", NULL, RNA_def_hair},
+#endif
{"rna_image.c", "rna_image_api.c", RNA_def_image},
{"rna_key.c", NULL, RNA_def_key},
{"rna_light.c", NULL, RNA_def_light},
@@ -4308,7 +4310,9 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_packedfile.c", NULL, RNA_def_packedfile},
{"rna_palette.c", NULL, RNA_def_palette},
{"rna_particle.c", NULL, RNA_def_particle},
+#ifdef WITH_PARTICLE_NODES
{"rna_pointcloud.c", NULL, RNA_def_pointcloud},
+#endif
{"rna_pose.c", "rna_pose_api.c", RNA_def_pose},
{"rna_curveprofile.c", NULL, RNA_def_profile},
{"rna_lightprobe.c", NULL, RNA_def_lightprobe},
@@ -4318,7 +4322,9 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_screen.c", NULL, RNA_def_screen},
{"rna_sculpt_paint.c", NULL, RNA_def_sculpt_paint},
{"rna_sequencer.c", "rna_sequencer_api.c", RNA_def_sequencer},
+#ifdef WITH_PARTICLE_NODES
{"rna_simulation.c", NULL, RNA_def_simulation},
+#endif
{"rna_space.c", "rna_space_api.c", RNA_def_space},
{"rna_speaker.c", NULL, RNA_def_speaker},
{"rna_test.c", NULL, RNA_def_test},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index e9ca0d577ce..f1c125fcbb9 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -251,9 +251,11 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_FreestyleLineStyle) {
return ID_LS;
}
+# ifdef WITH_HAIR_NODES
if (base_type == &RNA_Hair) {
return ID_HA;
}
+# endif
if (base_type == &RNA_Lattice) {
return ID_LT;
}
@@ -287,9 +289,11 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_PaintCurve) {
return ID_PC;
}
+# ifdef WITH_PARTICLE_NODES
if (base_type == &RNA_PointCloud) {
return ID_PT;
}
+# endif
if (base_type == &RNA_LightProbe) {
return ID_LP;
}
@@ -299,9 +303,11 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_Screen) {
return ID_SCR;
}
+# ifdef WITH_PARTICLE_NODES
if (base_type == &RNA_Simulation) {
return ID_SIM;
}
+# endif
if (base_type == &RNA_Sound) {
return ID_SO;
}
@@ -355,7 +361,11 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_GR:
return &RNA_Collection;
case ID_HA:
+# ifdef WITH_HAIR_NODES
return &RNA_Hair;
+# else
+ return &RNA_ID;
+# endif
case ID_IM:
return &RNA_Image;
case ID_KE:
@@ -389,7 +399,11 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_PC:
return &RNA_PaintCurve;
case ID_PT:
+# ifdef WITH_PARTICLE_NODES
return &RNA_PointCloud;
+# else
+ return &RNA_ID;
+# endif
case ID_LP:
return &RNA_LightProbe;
case ID_SCE:
@@ -397,7 +411,11 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_SCR:
return &RNA_Screen;
case ID_SIM:
+# ifdef WITH_PARTICLE_NODES
return &RNA_Simulation;
+# else
+ return &RNA_ID;
+# endif
case ID_SO:
return &RNA_Sound;
case ID_SPK:
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 0a739dcfc5a..ac4553349cc 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -484,13 +484,13 @@ static bool rna_property_override_operation_apply(Main *bmain,
/* Special case for IDProps, we use default callback then. */
if (prop_dst->magic != RNA_MAGIC) {
override_apply = rna_property_override_apply_default;
- if (prop_src->magic == RNA_MAGIC && prop_src->override_apply != override_apply) {
+ if (prop_src->magic == RNA_MAGIC && !ELEM(prop_src->override_apply, NULL, override_apply)) {
override_apply = NULL;
}
}
else if (prop_src->magic != RNA_MAGIC) {
override_apply = rna_property_override_apply_default;
- if (prop_dst->override_apply != override_apply) {
+ if (!ELEM(prop_dst->override_apply, NULL, override_apply)) {
override_apply = NULL;
}
}
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 8454d5c125f..155943b3b8d 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -1264,6 +1264,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
prop = RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "head");
+ RNA_def_property_ui_range(prop, 0, FLT_MAX, 10, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -1271,6 +1272,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
prop = RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "tail");
+ RNA_def_property_ui_range(prop, 0, FLT_MAX, 10, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 38916e2a45a..0b923eb5635 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -45,6 +45,18 @@ static const EnumPropertyItem prop_direction_items[] = {
{0, NULL, 0, NULL, NULL},
};
+#ifdef RNA_RUNTIME
+static const EnumPropertyItem prop_smooth_direction_items[] = {
+ {0, "SMOOTH", ICON_ADD, "Smooth", "Smooth the surfae"},
+ {BRUSH_DIR_IN,
+ "ENHANCE_DETAILS",
+ ICON_REMOVE,
+ "Enhance Details",
+ "Enhance the surface detail"},
+ {0, NULL, 0, NULL, NULL},
+};
+#endif
+
static const EnumPropertyItem sculpt_stroke_method_items[] = {
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
{BRUSH_DRAG_DOT, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"},
@@ -527,6 +539,7 @@ static bool rna_BrushCapabilitiesSculpt_has_direction_get(PointerRNA *ptr)
SCULPT_TOOL_DRAW_SHARP,
SCULPT_TOOL_CLAY,
SCULPT_TOOL_CLAY_STRIPS,
+ SCULPT_TOOL_SMOOTH,
SCULPT_TOOL_LAYER,
SCULPT_TOOL_INFLATE,
SCULPT_TOOL_BLOB,
@@ -795,7 +808,8 @@ static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C,
case SCULPT_TOOL_CLAY:
case SCULPT_TOOL_CLAY_STRIPS:
return prop_direction_items;
-
+ case SCULPT_TOOL_SMOOTH:
+ return prop_smooth_direction_items;
case SCULPT_TOOL_MASK:
switch ((BrushMaskTool)me->mask_tool) {
case BRUSH_MASK_DRAW:
@@ -1967,6 +1981,20 @@ static void rna_def_brush(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
+ static const EnumPropertyItem brush_deformation_target_items[] = {
+ {BRUSH_DEFORM_TARGET_GEOMETRY,
+ "GEOMETRY",
+ 0,
+ "Geometry",
+ "Brush deformation displaces the vertices of the mesh"},
+ {BRUSH_DEFORM_TARGET_CLOTH_SIM,
+ "CLOTH_SIM",
+ 0,
+ "Cloth Simulation",
+ "Brush deforms the mesh by deforming the constraints of a cloth simulation"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
static const EnumPropertyItem brush_elastic_deform_type_items[] = {
{BRUSH_ELASTIC_DEFORM_GRAB, "GRAB", 0, "Grab", ""},
{BRUSH_ELASTIC_DEFORM_GRAB_BISCALE, "GRAB_BISCALE", 0, "Bi-scale Grab", ""},
@@ -1988,6 +2016,7 @@ static void rna_def_brush(BlenderRNA *brna)
{BRUSH_CLOTH_DEFORM_INFLATE, "INFLATE", 0, "Inflate", ""},
{BRUSH_CLOTH_DEFORM_GRAB, "GRAB", 0, "Grab", ""},
{BRUSH_CLOTH_DEFORM_EXPAND, "EXPAND", 0, "Expand", ""},
+ {BRUSH_CLOTH_DEFORM_SNAKE_HOOK, "SNAKE_HOOK", 0, "Snake Hook", ""},
{0, NULL, 0, NULL, NULL},
};
@@ -1997,6 +2026,31 @@ static void rna_def_brush(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
+ static const EnumPropertyItem brush_boundary_falloff_type_items[] = {
+ {BRUSH_BOUNDARY_FALLOFF_CONSTANT,
+ "CONSTANT",
+ 0,
+ "Constant",
+ "Applies the same deformation in the entire boundary"},
+ {BRUSH_BOUNDARY_FALLOFF_RADIUS,
+ "RADIUS",
+ 0,
+ "Brush Radius",
+ "Applies the deformation in a localiced area limited by the brush radius"},
+ {BRUSH_BOUNDARY_FALLOFF_LOOP,
+ "LOOP",
+ 0,
+ "Loop",
+ "Applies the brush falloff in a loop pattern"},
+ {BRUSH_BOUNDARY_FALLOFF_LOOP_INVERT,
+ "LOOP_INVERT",
+ 0,
+ "Loop and Invert",
+ "Applies the fallof radius in a loop pattern, inverting the displacement direction in each "
+ "pattern repetition"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
static const EnumPropertyItem brush_cloth_simulation_area_type_items[] = {
{BRUSH_CLOTH_SIMULATION_AREA_LOCAL,
"LOCAL",
@@ -2170,6 +2224,12 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Curve Preset", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "deform_target", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, brush_deformation_target_items);
+ RNA_def_property_ui_text(
+ prop, "Deformation Target", "How the deformation of the brush will affect the object");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "elastic_deform_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_elastic_deform_type_items);
RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
@@ -2194,6 +2254,12 @@ static void rna_def_brush(BlenderRNA *brna)
"Part of the mesh that is going to be simulated when the stroke is active");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "boundary_falloff_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, brush_boundary_falloff_type_items);
+ RNA_def_property_ui_text(
+ prop, "Boundary Falloff", "How the brush falloff is applied across the boundary");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "smooth_deform_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_smooth_deform_type_items);
RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
@@ -2545,6 +2611,14 @@ static void rna_def_brush(BlenderRNA *brna)
"Maximum distance to search for disconnected loose parts in the mesh");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "boundary_offset", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "boundary_offset");
+ RNA_def_property_range(prop, 0.0f, 30.0f);
+ RNA_def_property_ui_text(prop,
+ "Boundary Origin Offset",
+ "Offset of the boundary origin in relation to the brush radius");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "surface_smooth_shape_preservation", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "surface_smooth_shape_preservation");
RNA_def_property_range(prop, 0.0f, 1.0f);
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 60b6cc40792..ab4d936ae34 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -623,13 +623,13 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain,
bool seq_found = false;
if (&scene->sequencer_colorspace_settings != colorspace_settings) {
- SEQ_BEGIN (scene->ed, seq) {
+ SEQ_ALL_BEGIN (scene->ed, seq) {
if (seq->strip && &seq->strip->colorspace_settings == colorspace_settings) {
seq_found = true;
break;
}
}
- SEQ_END;
+ SEQ_ALL_END;
}
if (seq_found) {
@@ -643,10 +643,10 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain,
BKE_sequence_invalidate_cache_preprocessed(scene, seq);
}
else {
- SEQ_BEGIN (scene->ed, seq) {
+ SEQ_ALL_BEGIN (scene->ed, seq) {
BKE_sequence_free_anim(seq);
}
- SEQ_END;
+ SEQ_ALL_END;
}
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
@@ -1222,7 +1222,7 @@ static void rna_def_colormanage(BlenderRNA *brna)
"rna_ColorManagedViewSettings_look_set",
"rna_ColorManagedViewSettings_look_itemf");
RNA_def_property_ui_text(
- prop, "Look", "Additional transform applied before view transform for an artistic needs");
+ prop, "Look", "Additional transform applied before view transform for artistic needs");
RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
prop = RNA_def_property(srna, "view_transform", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index c8d16ab65cc..9bcf2b81557 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -106,7 +106,7 @@ static const EnumPropertyItem rna_enum_keyframe_type_items[] = {
};
static const EnumPropertyItem rna_enum_onion_keyframe_type_items[] = {
- {-1, "ALL", ICON_ACTION, "All Types", "Include all Keyframe types"},
+ {-1, "ALL", 0, "All", "Include all Keyframe types"},
{BEZT_KEYTYPE_KEYFRAME,
"KEYFRAME",
ICON_KEYTYPE_KEYFRAME_VEC,
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 8045279eef2..ad43202d850 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -455,10 +455,16 @@ void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_workspaces(BlenderRNA *brna, PropertyRNA *cprop);
void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop);
+#ifdef WITH_HAIR_NODES
void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop);
+#endif
+#ifdef WITH_PARTICLE_NODES
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop);
+#endif
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop);
+#ifdef WITH_PARTICLE_NODES
void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop);
+#endif
/* ID Properties */
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index e7a898b97ae..fc5e957bba6 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -184,10 +184,7 @@ static PointerRNA rna_ViewLayer_depsgraph_get(PointerRNA *ptr)
if (GS(id->name) == ID_SCE) {
Scene *scene = (Scene *)id;
ViewLayer *view_layer = (ViewLayer *)ptr->data;
- // NOTE: We don't allocate new depsgraph here, so the bmain is ignored. So it's easier to pass
- // NULL.
- // Still weak though.
- Depsgraph *depsgraph = BKE_scene_get_depsgraph(NULL, scene, view_layer, false);
+ Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer);
return rna_pointer_inherit_refine(ptr, &RNA_Depsgraph, depsgraph);
}
return PointerRNA_NULL;
@@ -206,7 +203,7 @@ static void rna_ViewLayer_update_tagged(ID *id_ptr,
ReportList *reports)
{
Scene *scene = (Scene *)id_ptr;
- Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true);
+ Depsgraph *depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, view_layer);
if (DEG_is_evaluating(depsgraph)) {
BKE_report(reports, RPT_ERROR, "Dependency graph update requested during evaluation");
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 97702b06b6f..d83fca69278 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -109,7 +109,9 @@ RNA_MAIN_LISTBASE_FUNCS_DEF(collections)
RNA_MAIN_LISTBASE_FUNCS_DEF(curves)
RNA_MAIN_LISTBASE_FUNCS_DEF(fonts)
RNA_MAIN_LISTBASE_FUNCS_DEF(gpencils)
+# ifdef WITH_HAIR_NODES
RNA_MAIN_LISTBASE_FUNCS_DEF(hairs)
+# endif
RNA_MAIN_LISTBASE_FUNCS_DEF(images)
RNA_MAIN_LISTBASE_FUNCS_DEF(lattices)
RNA_MAIN_LISTBASE_FUNCS_DEF(libraries)
@@ -126,11 +128,15 @@ RNA_MAIN_LISTBASE_FUNCS_DEF(objects)
RNA_MAIN_LISTBASE_FUNCS_DEF(paintcurves)
RNA_MAIN_LISTBASE_FUNCS_DEF(palettes)
RNA_MAIN_LISTBASE_FUNCS_DEF(particles)
+# ifdef WITH_PARTICLE_NODES
RNA_MAIN_LISTBASE_FUNCS_DEF(pointclouds)
+# endif
RNA_MAIN_LISTBASE_FUNCS_DEF(scenes)
RNA_MAIN_LISTBASE_FUNCS_DEF(screens)
RNA_MAIN_LISTBASE_FUNCS_DEF(shapekeys)
+# ifdef WITH_PARTICLE_NODES
RNA_MAIN_LISTBASE_FUNCS_DEF(simulations)
+# endif
RNA_MAIN_LISTBASE_FUNCS_DEF(sounds)
RNA_MAIN_LISTBASE_FUNCS_DEF(speakers)
RNA_MAIN_LISTBASE_FUNCS_DEF(texts)
@@ -384,25 +390,31 @@ void RNA_def_main(BlenderRNA *brna)
"LightProbes",
"LightProbe data-blocks",
RNA_def_main_lightprobes},
+# ifdef WITH_HAIR_NODES
{"hairs", "Hair", "rna_Main_hairs_begin", "Hairs", "Hair data-blocks", RNA_def_main_hairs},
+# endif
+# ifdef WITH_PARTICLE_NODES
{"pointclouds",
"PointCloud",
"rna_Main_pointclouds_begin",
"Point Clouds",
"Point cloud data-blocks",
RNA_def_main_pointclouds},
+# endif
{"volumes",
"Volume",
"rna_Main_volumes_begin",
"Volumes",
"Volume data-blocks",
RNA_def_main_volumes},
+# ifdef WITH_PARTICLE_NODES
{"simulations",
"Simulation",
"rna_Main_simulations_begin",
"Simulations",
"Simulation data-blocks",
RNA_def_main_simulations},
+# endif
{NULL, NULL, NULL, NULL, NULL, NULL},
};
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 990a5412093..7c941ddb524 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -708,6 +708,7 @@ static bGPdata *rna_Main_gpencils_new(Main *bmain, const char *name)
return gpd;
}
+# ifdef WITH_HAIR_NODES
static Hair *rna_Main_hairs_new(Main *bmain, const char *name)
{
char safe_name[MAX_ID_NAME - 2];
@@ -717,7 +718,9 @@ static Hair *rna_Main_hairs_new(Main *bmain, const char *name)
id_us_min(&hair->id);
return hair;
}
+# endif
+# ifdef WITH_PARTICLE_NODES
static PointCloud *rna_Main_pointclouds_new(Main *bmain, const char *name)
{
char safe_name[MAX_ID_NAME - 2];
@@ -727,6 +730,7 @@ static PointCloud *rna_Main_pointclouds_new(Main *bmain, const char *name)
id_us_min(&pointcloud->id);
return pointcloud;
}
+# endif
static Volume *rna_Main_volumes_new(Main *bmain, const char *name)
{
@@ -738,6 +742,7 @@ static Volume *rna_Main_volumes_new(Main *bmain, const char *name)
return volume;
}
+# ifdef WITH_PARTICLE_NODES
static Simulation *rna_Main_simulations_new(Main *bmain, const char *name)
{
char safe_name[MAX_ID_NAME - 2];
@@ -747,6 +752,7 @@ static Simulation *rna_Main_simulations_new(Main *bmain, const char *name)
id_us_min(&simulation->id);
return simulation;
}
+# endif
/* tag functions, all the same */
# define RNA_MAIN_ID_TAG_FUNCS_DEF(_func_name, _listbase_name, _id_type) \
@@ -790,10 +796,16 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(cachefiles, cachefiles, ID_CF)
RNA_MAIN_ID_TAG_FUNCS_DEF(paintcurves, paintcurves, ID_PC)
RNA_MAIN_ID_TAG_FUNCS_DEF(workspaces, workspaces, ID_WS)
RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobes, ID_LP)
+# ifdef WITH_HAIR_NODES
RNA_MAIN_ID_TAG_FUNCS_DEF(hairs, hairs, ID_HA)
+# endif
+# ifdef WITH_PARTICLE_NODES
RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds, ID_PT)
+# endif
RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes, ID_VO)
+# ifdef WITH_PARTICLE_NODES
RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations, ID_SIM)
+# endif
# undef RNA_MAIN_ID_TAG_FUNCS_DEF
@@ -2194,6 +2206,7 @@ void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
+# ifdef WITH_HAIR_NODES
void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
@@ -2237,7 +2250,9 @@ void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop)
parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
+# endif
+# ifdef WITH_PARTICLE_NODES
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
@@ -2284,6 +2299,7 @@ void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop)
parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
+# endif
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop)
{
@@ -2329,6 +2345,7 @@ void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
+# ifdef WITH_PARTICLE_NODES
void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
@@ -2368,5 +2385,6 @@ void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop)
parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
+# endif
#endif
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index f95899262d3..d9e151e5f73 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -723,7 +723,9 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
case eModifierType_WeightedNormal:
return &RNA_WeightedNormalModifier;
case eModifierType_Simulation:
+# ifdef WITH_PARTICLE_NODES
return &RNA_SimulationModifier;
+# endif
/* Default */
case eModifierType_Fluidsim: /* deprecated */
case eModifierType_None:
@@ -1630,6 +1632,7 @@ static void rna_ParticleInstanceModifier_particle_system_set(PointerRNA *ptr,
CLAMP_MIN(psmd->psys, 1);
}
+# ifdef WITH_PARTICLE_NODES
static void rna_SimulationModifier_simulation_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
SimulationModifierData *smd = ptr->data;
@@ -1672,6 +1675,7 @@ static void rna_SimulationModifier_data_path_set(PointerRNA *ptr, const char *va
smd->data_path = NULL;
}
}
+# endif
/**
* Special set callback that just changes the first bit of the expansion flag.
@@ -2076,6 +2080,14 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
prop, "Use Custom Normals", "Interpolates existing custom normals to resulting mesh");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ prop = RNA_def_property(srna, "use_sculpt_base_mesh", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", eMultiresModifierFlag_UseSculptBaseMesh);
+ RNA_def_property_ui_text(prop,
+ "Sculpt Base Mesh",
+ "Make Sculpt Mode tools deform the base mesh while previewing the "
+ "displacement of higher subdivision levels");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
RNA_define_lib_overridable(false);
}
@@ -2807,6 +2819,16 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
+ static const EnumPropertyItem prop_solver_items[] = {
+ {eBooleanModifierSolver_Fast,
+ "FAST",
+ 0,
+ "Fast",
+ "Simple solver for the best performance, without support for overlapping geometry"},
+ {eBooleanModifierSolver_Exact, "EXACT", 0, "Exact", "Advanced solver for the best result"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
srna = RNA_def_struct(brna, "BooleanModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier");
RNA_def_struct_sdna(srna, "BooleanModifierData");
@@ -2835,6 +2857,12 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
prop, "Overlap Threshold", "Threshold for checking overlapping geometry");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ prop = RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_solver_items);
+ RNA_def_property_enum_default(prop, eBooleanModifierSolver_Exact);
+ RNA_def_property_ui_text(prop, "Solver", "Method for calculating booleans");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
/* BMesh debugging options, only used when G_DEBUG is set */
/* BMesh intersection options */
@@ -6999,6 +7027,7 @@ static void rna_def_modifier_weightednormal(BlenderRNA *brna)
RNA_define_lib_overridable(false);
}
+# ifdef WITH_PARTICLE_NODES
static void rna_def_modifier_simulation(BlenderRNA *brna)
{
StructRNA *srna;
@@ -7027,6 +7056,7 @@ static void rna_def_modifier_simulation(BlenderRNA *brna)
RNA_define_lib_overridable(false);
}
+# endif
void RNA_def_modifier(BlenderRNA *brna)
{
@@ -7156,7 +7186,9 @@ void RNA_def_modifier(BlenderRNA *brna)
rna_def_modifier_meshseqcache(brna);
rna_def_modifier_surfacedeform(brna);
rna_def_modifier_weightednormal(brna);
+# ifdef WITH_PARTICLE_NODES
rna_def_modifier_simulation(brna);
+# endif
}
#endif
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index af07185ab4a..3237f33835e 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -5434,7 +5434,8 @@ static void def_sh_bevel(StructRNA *srna)
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 2, 16);
+ RNA_def_property_range(prop, 2, 128);
+ RNA_def_property_ui_range(prop, 2, 16, 1, 1);
RNA_def_property_ui_text(prop, "Samples", "Number of rays to trace per shader evaluation");
RNA_def_property_update(prop, 0, "rna_Node_update");
}
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 08ca3f16b6d..39e1f17d33d 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -570,9 +570,17 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr)
case OB_GPENCIL:
return &RNA_GreasePencil;
case OB_HAIR:
+# ifdef WITH_HAIR_NODES
return &RNA_Hair;
+# else
+ return &RNA_ID;
+# endif
case OB_POINTCLOUD:
+# ifdef WITH_PARTICLE_NODES
return &RNA_PointCloud;
+# else
+ return &RNA_ID;
+# endif
case OB_VOLUME:
return &RNA_Volume;
default:
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 3b80714bcc5..ab6b60603c7 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -713,8 +713,9 @@ bool rna_Object_generate_gpencil_strokes(Object *ob,
bContext *C,
ReportList *reports,
Object *ob_gpencil,
- bool gpencil_lines,
- bool use_collections)
+ bool use_collections,
+ float scale_thickness,
+ float sample)
{
if (ob->type != OB_CURVE) {
BKE_reportf(reports,
@@ -726,7 +727,8 @@ bool rna_Object_generate_gpencil_strokes(Object *ob,
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- BKE_gpencil_convert_curve(bmain, scene, ob_gpencil, ob, gpencil_lines, use_collections, false);
+ BKE_gpencil_convert_curve(
+ bmain, scene, ob_gpencil, ob, use_collections, scale_thickness, sample);
WM_main_add_notifier(NC_GPENCIL | ND_DATA, NULL);
@@ -1190,12 +1192,17 @@ void RNA_api_object(StructRNA *srna)
RNA_def_function_ui_description(func, "Convert a curve object to grease pencil strokes.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
- parm = RNA_def_pointer(
- func, "ob_gpencil", "Object", "", "Grease Pencil object used to create new strokes");
+ parm = RNA_def_pointer(func,
+ "grease_pencil_object",
+ "Object",
+ "",
+ "Grease Pencil object used to create new strokes");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
- parm = RNA_def_boolean(func, "gpencil_lines", 0, "", "Create Lines");
- parm = RNA_def_boolean(func, "use_collections", 1, "", "Use Collections");
-
+ parm = RNA_def_boolean(func, "use_collections", true, "", "Use Collections");
+ parm = RNA_def_float(
+ func, "scale_thickness", 1.0f, 0.0f, FLT_MAX, "", "Thickness scaling factor", 0.0f, 100.0f);
+ parm = RNA_def_float(
+ func, "sample", 0.0f, 0.0f, FLT_MAX, "", "Sample distance, zero to disable", 0.0f, 100.0f);
parm = RNA_def_boolean(func, "result", 0, "", "Result");
RNA_def_function_return(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index fa837df682a..4c22890887a 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -935,7 +935,7 @@ static void rna_def_pointcache_common(StructRNA *srna)
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startframe");
RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
- RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1);
+ RNA_def_property_ui_range(prop, 0, MAXFRAME, 1, 1);
RNA_def_property_ui_text(prop, "Start", "Frame on which the simulation starts");
prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
@@ -1918,7 +1918,7 @@ static void rna_def_softbody(BlenderRNA *brna)
prop = RNA_def_property(srna, "plastic", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "plastic");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Plastic", "Permanent deform");
+ RNA_def_property_ui_text(prop, "Plasticity", "Permanent deform");
RNA_def_property_update(prop, 0, "rna_softbody_update");
prop = RNA_def_property(srna, "bend", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 262c9f87b66..e470a8ddb85 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -924,6 +924,23 @@ static void rna_Scene_volume_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_VOLUME | ID_RECALC_SEQUENCER_STRIPS);
}
+static const char *rna_Scene_statistics_string_get(Scene *scene,
+ Main *bmain,
+ ReportList *reports,
+ ViewLayer *view_layer)
+{
+ if (!BKE_scene_has_view_layer(scene, view_layer)) {
+ BKE_reportf(reports,
+ RPT_ERROR,
+ "View Layer '%s' not found in scene '%s'",
+ view_layer->name,
+ scene->id.name + 2);
+ return "";
+ }
+
+ return ED_info_statistics_string(bmain, scene, view_layer);
+}
+
static void rna_Scene_framelen_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
scene->r.framelen = (float)scene->r.framapto / (float)scene->r.images;
@@ -1866,11 +1883,10 @@ static void object_simplify_update(Object *ob)
}
if (ob->instance_collection) {
- CollectionObject *cob;
-
- for (cob = ob->instance_collection->gobject.first; cob; cob = cob->next) {
- object_simplify_update(cob->ob);
+ FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (ob->instance_collection, ob_collection) {
+ object_simplify_update(ob_collection);
}
+ FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
}
}
@@ -5919,7 +5935,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL, NULL);
RNA_def_property_ui_text(prop,
"Threads",
- "Number of CPU threads to use simultaneously while rendering "
+ "Maximum number of CPU cores to use simultaneously while rendering "
"(for multi-core/CPU systems)");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
@@ -6465,7 +6481,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "simplify_gpencil_shader_fx", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_FX);
- RNA_def_property_ui_text(prop, "Shaders Effects", "Display Shader Effects");
+ RNA_def_property_ui_text(prop, "Shader Effects", "Display Shader Effects");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
prop = RNA_def_property(srna, "simplify_gpencil_tint", PROP_BOOLEAN, PROP_NONE);
@@ -7277,6 +7293,9 @@ void RNA_def_scene(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
static const EnumPropertyItem audio_distance_model_items[] = {
{0, "NONE", 0, "None", "No distance attenuation"},
{1, "INVERSE", 0, "Inverse", "Inverse distance model"},
@@ -7668,6 +7687,14 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, NULL);
RNA_def_property_update(prop, NC_SCENE, "rna_Scene_volume_update");
+ /* Statistics */
+ func = RNA_def_function(srna, "statistics", "rna_Scene_statistics_string_get");
+ RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS);
+ parm = RNA_def_pointer(func, "view_layer", "ViewLayer", "View Layer", "");
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
+ parm = RNA_def_string(func, "statistics", NULL, 0, "Statistics", "");
+ RNA_def_function_return(func, parm);
+
/* Grease Pencil */
prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 06c73fbb19c..ff887e53965 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -72,8 +72,8 @@ static void rna_Scene_frame_set(Scene *scene, Main *bmain, int frame, float subf
for (ViewLayer *view_layer = scene->view_layers.first; view_layer != NULL;
view_layer = view_layer->next) {
- Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true);
- BKE_scene_graph_update_for_newframe(depsgraph, bmain);
+ Depsgraph *depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, view_layer);
+ BKE_scene_graph_update_for_newframe(depsgraph);
}
# ifdef WITH_PYTHON
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index fb2a60db0fd..ab84dcb0aba 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -288,9 +288,11 @@ static void rna_View2D_view_to_region(
}
}
-static const char *rna_Screen_statusbar_info_get(struct bScreen *screen, Main *bmain, bContext *C)
+static const char *rna_Screen_statusbar_info_get(struct bScreen *UNUSED(screen),
+ Main *bmain,
+ bContext *C)
{
- return ED_info_statusbar_string(bmain, screen, C);
+ return ED_info_statusbar_string(bmain, CTX_data_scene(C), CTX_data_view_layer(C));
}
#else
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 0cfc6fd569c..629dc104ab5 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -637,6 +637,8 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(seq->name)];
AnimData *adt;
+ BKE_sequencer_prefetch_stop(scene);
+
/* make a copy of the old name first */
BLI_strncpy(oldname, seq->name + 2, sizeof(seq->name) - 2);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 155f5ab3043..21ba130f925 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -242,9 +242,9 @@ const EnumPropertyItem rna_enum_space_action_mode_items[] = {
#undef SACT_ITEM_MASK
#undef SACT_ITEM_CACHEFILE
-#define SI_ITEM_VIEW(name, icon) \
+#define SI_ITEM_VIEW(identifier, name, icon) \
{ \
- SI_MODE_VIEW, "VIEW", icon, name, "View the image" \
+ SI_MODE_VIEW, identifier, icon, name, "View the image" \
}
#define SI_ITEM_UV \
{ \
@@ -260,7 +260,7 @@ const EnumPropertyItem rna_enum_space_action_mode_items[] = {
}
const EnumPropertyItem rna_enum_space_image_mode_all_items[] = {
- SI_ITEM_VIEW("View", ICON_FILE_IMAGE),
+ SI_ITEM_VIEW("VIEW", "View", ICON_FILE_IMAGE),
SI_ITEM_UV,
SI_ITEM_PAINT,
SI_ITEM_MASK,
@@ -268,14 +268,14 @@ const EnumPropertyItem rna_enum_space_image_mode_all_items[] = {
};
static const EnumPropertyItem rna_enum_space_image_mode_ui_items[] = {
- SI_ITEM_VIEW("View", ICON_FILE_IMAGE),
+ SI_ITEM_VIEW("VIEW", "View", ICON_FILE_IMAGE),
SI_ITEM_PAINT,
SI_ITEM_MASK,
{0, NULL, 0, NULL, NULL},
};
const EnumPropertyItem rna_enum_space_image_mode_items[] = {
- SI_ITEM_VIEW("Image Editor", ICON_IMAGE),
+ SI_ITEM_VIEW("IMAGE_EDITOR", "Image Editor", ICON_IMAGE),
SI_ITEM_UV,
{0, NULL, 0, NULL, NULL},
};
@@ -1297,15 +1297,13 @@ static const EnumPropertyItem *rna_3DViewShading_render_pass_itemf(bContext *C,
{
Scene *scene = CTX_data_scene(C);
- const bool ao_enabled = scene->eevee.flag & SCE_EEVEE_GTAO_ENABLED;
const bool bloom_enabled = scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED;
int totitem = 0;
EnumPropertyItem *result = NULL;
for (int i = 0; rna_enum_view3dshading_render_pass_type_items[i].identifier != NULL; i++) {
const EnumPropertyItem *item = &rna_enum_view3dshading_render_pass_type_items[i];
- if (!((!ao_enabled && item->value == EEVEE_RENDER_PASS_AO) ||
- (!bloom_enabled &&
+ if (!((!bloom_enabled &&
(item->value == EEVEE_RENDER_PASS_BLOOM || STREQ(item->name, "Effects"))))) {
RNA_enum_item_add(&result, &totitem, item);
}
@@ -1321,9 +1319,6 @@ static int rna_3DViewShading_render_pass_get(PointerRNA *ptr)
eViewLayerEEVEEPassType result = shading->render_pass;
Scene *scene = rna_3DViewShading_scene(ptr);
- if (result == EEVEE_RENDER_PASS_AO && ((scene->eevee.flag & SCE_EEVEE_GTAO_ENABLED) == 0)) {
- result = EEVEE_RENDER_PASS_COMBINED;
- }
if (result == EEVEE_RENDER_PASS_BLOOM && ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
result = EEVEE_RENDER_PASS_COMBINED;
}
@@ -2122,6 +2117,7 @@ static void rna_SpaceNodeEditor_node_tree_update(const bContext *C, PointerRNA *
ED_node_tree_update(C);
}
+# ifdef WITH_PARTICLE_NODES
static PointerRNA rna_SpaceNodeEditor_simulation_get(PointerRNA *ptr)
{
SpaceNode *snode = (SpaceNode *)ptr->data;
@@ -2153,6 +2149,7 @@ static void rna_SpaceNodeEditor_simulation_set(PointerRNA *ptr,
}
snode->id = &sim->id;
}
+# endif
static int rna_SpaceNodeEditor_tree_type_get(PointerRNA *ptr)
{
@@ -3792,14 +3789,14 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "texture_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "overlay.texture_paint_mode_opacity");
RNA_def_property_ui_text(
- prop, "Stencil Opacity", "Opacity of the texture paint mode stencil mask overlay");
+ prop, "Stencil Mask Opacity", "Opacity of the texture paint mode stencil mask overlay");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "vertex_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "overlay.vertex_paint_mode_opacity");
RNA_def_property_ui_text(
- prop, "Stencil Opacity", "Opacity of the texture paint mode stencil mask overlay");
+ prop, "Stencil Mask Opacity", "Opacity of the texture paint mode stencil mask overlay");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
@@ -4796,6 +4793,12 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Waveform Displaying", "How Waveforms are drawn");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+ prop = RNA_def_property(srna, "use_zoom_to_fit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_ZOOM_TO_FIT);
+ RNA_def_property_ui_text(
+ prop, "Zoom to Fit", "Automatically zoom preview image to make it fully fit the region");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
+
prop = RNA_def_property(srna, "show_overexposed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "zebra");
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes");
@@ -6207,6 +6210,7 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "ID From", "Data-block from which the edited data-block is linked");
+# ifdef WITH_PARTICLE_NODES
prop = RNA_def_property(srna, "simulation", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Simulation");
@@ -6217,6 +6221,7 @@ static void rna_def_space_node(BlenderRNA *brna)
NULL,
NULL);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL);
+# endif
prop = RNA_def_property(srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "treepath", NULL);
diff --git a/source/blender/makesrna/intern/rna_space_api.c b/source/blender/makesrna/intern/rna_space_api.c
index 28fdc5fb60f..e4c0ade1533 100644
--- a/source/blender/makesrna/intern/rna_space_api.c
+++ b/source/blender/makesrna/intern/rna_space_api.c
@@ -49,7 +49,7 @@ static void rna_RegionView3D_update(ID *id, RegionView3D *rv3d, bContext *C)
if (WM_window_get_active_screen(win) == screen) {
Scene *scene = WM_window_get_active_scene(win);
ViewLayer *view_layer = WM_window_get_active_view_layer(win);
- Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true);
+ Depsgraph *depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, view_layer);
ED_view3d_update_viewmat(depsgraph, scene, v3d, region, NULL, NULL, NULL, false);
break;
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 31d417abeb1..e060114912e 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2483,6 +2483,11 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected File", "");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
+ prop = RNA_def_property(srna, "row_alternate", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Alternate Rows", "Overlay color on every other row");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
}
static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
@@ -3044,12 +3049,6 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Texture paint/Modifier UVs", "");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
- prop = RNA_def_property(srna, "uv_others", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "uv_others");
- RNA_def_property_array(prop, 4);
- RNA_def_property_ui_text(prop, "Other Object UVs", "");
- RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
-
prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index bfd99c01551..f248764eab9 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -438,8 +438,7 @@ static const EnumPropertyItem keymap_modifiers_items[] = {
};
#endif
-#ifndef RNA_RUNTIME
-static const EnumPropertyItem operator_flag_items[] = {
+const EnumPropertyItem rna_enum_operator_type_flag_items[] = {
{OPTYPE_REGISTER,
"REGISTER",
0,
@@ -465,7 +464,6 @@ static const EnumPropertyItem operator_flag_items[] = {
{OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
{0, NULL, 0, NULL, NULL},
};
-#endif
const EnumPropertyItem rna_enum_operator_return_items[] = {
{OPERATOR_RUNNING_MODAL,
@@ -1928,7 +1926,7 @@ static void rna_def_operator(BlenderRNA *brna)
prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->flag");
- RNA_def_property_enum_items(prop, operator_flag_items);
+ RNA_def_property_enum_items(prop, rna_enum_operator_type_flag_items);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL | PROP_ENUM_FLAG);
RNA_def_property_ui_text(prop, "Options", "Options for this operator type");
@@ -2020,7 +2018,7 @@ static void rna_def_macro_operator(BlenderRNA *brna)
prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->flag");
- RNA_def_property_enum_items(prop, operator_flag_items);
+ RNA_def_property_enum_items(prop, rna_enum_operator_type_flag_items);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL | PROP_ENUM_FLAG);
RNA_def_property_ui_text(prop, "Options", "Options for this operator type");