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.txt7
-rw-r--r--source/blender/makesrna/intern/rna_access.c60
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c8
-rw-r--r--source/blender/makesrna/intern/rna_brush.c16
-rw-r--r--source/blender/makesrna/intern/rna_color.c3
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c50
-rw-r--r--source/blender/makesrna/intern/rna_curve.c31
-rw-r--r--source/blender/makesrna/intern/rna_define.c30
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c411
-rw-r--r--source/blender/makesrna/intern/rna_image.c3
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c14
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c11
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c2
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c5
-rw-r--r--source/blender/makesrna/intern/rna_nla.c3
-rw-r--r--source/blender/makesrna/intern/rna_object.c83
-rw-r--r--source/blender/makesrna/intern/rna_particle.c76
-rw-r--r--source/blender/makesrna/intern/rna_pose.c12
-rw-r--r--source/blender/makesrna/intern/rna_scene.c34
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c12
-rw-r--r--source/blender/makesrna/intern/rna_space.c36
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c85
-rw-r--r--source/blender/makesrna/intern/rna_wm.c9
-rw-r--r--source/blender/makesrna/intern/rna_workspace.c48
-rw-r--r--source/blender/makesrna/intern/rna_workspace_api.c4
25 files changed, 653 insertions, 400 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 86a12b66db7..3429fd25242 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -229,6 +229,10 @@ if(WITH_AUDASPACE)
list(APPEND INC_SYS
${AUDASPACE_C_INCLUDE_DIRS}
)
+ list(APPEND LIB
+ ${AUDASPACE_C_LIBRARIES}
+ ${AUDASPACE_PY_LIBRARIES}
+ )
endif()
if(WITH_CODEC_FFMPEG)
@@ -238,6 +242,9 @@ if(WITH_CODEC_FFMPEG)
list(APPEND INC_SYS
${FFMPEG_INCLUDE_DIRS}
)
+ list(APPEND LIB
+ ${FFMPEG_LIBRARIES}
+ )
add_definitions(-DWITH_FFMPEG)
endif()
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d8889455ac7..bd2e522c4b4 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -3762,25 +3762,59 @@ void RNA_property_pointer_set(PointerRNA *ptr,
ReportList *reports)
{
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
+ IDProperty *idprop = rna_idproperty_check(&prop, ptr);
BLI_assert(RNA_property_type(prop) == PROP_POINTER);
- /* Check types */
- if (ptr_value.type != NULL && !RNA_struct_is_a(ptr_value.type, pprop->type)) {
- BKE_reportf(reports,
- RPT_ERROR,
- "%s: expected %s type, not %s.\n",
- __func__,
- pprop->type->identifier,
- ptr_value.type->identifier);
- return;
+ /* Check types. */
+ if (pprop->set != NULL) {
+ /* Assigning to a real RNA property. */
+ if (ptr_value.type != NULL && !RNA_struct_is_a(ptr_value.type, pprop->type)) {
+ BKE_reportf(reports,
+ RPT_ERROR,
+ "%s: expected %s type, not %s.\n",
+ __func__,
+ pprop->type->identifier,
+ ptr_value.type->identifier);
+ return;
+ }
+ }
+ else {
+ /* Assigning to an IDProperty desguised as RNA one. */
+ if (ptr_value.type != NULL && !RNA_struct_is_a(ptr_value.type, &RNA_ID)) {
+ BKE_reportf(reports,
+ RPT_ERROR,
+ "%s: expected ID type, not %s.\n",
+ __func__,
+ ptr_value.type->identifier);
+ return;
+ }
}
- /* RNA */
- if (pprop->set && !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
- !((prop->flag & PROP_ID_SELF_CHECK) && ptr->owner_id == ptr_value.owner_id)) {
+ /* We got an existing IDProperty. */
+ if (idprop != NULL) {
+ /* Not-yet-defined ID IDProps have an IDP_GROUP type, not an IDP_ID one - because of reasons?
+ * XXX This has to be investigated fully - there might be a good reason for it, but off hands
+ * this seems really weird... */
+ if (idprop->type == IDP_ID) {
+ IDP_AssignID(idprop, ptr_value.data, 0);
+ rna_idproperty_touch(idprop);
+ }
+ else {
+ BLI_assert(idprop->type == IDP_GROUP);
+
+ IDPropertyTemplate val = {.id = ptr_value.data};
+ IDProperty *group = RNA_struct_idprops(ptr, true);
+ BLI_assert(group != NULL);
+
+ IDP_ReplaceInGroup_ex(group, IDP_New(IDP_ID, &val, idprop->name), idprop);
+ }
+ }
+ /* RNA property. */
+ else if (pprop->set && !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
+ !((prop->flag & PROP_ID_SELF_CHECK) && ptr->owner_id == ptr_value.owner_id)) {
pprop->set(ptr, ptr_value, reports);
}
- /* IDProperty */
+ /* IDProperty desguised as RNA property (and not yet defined in ptr). */
else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index f539da488ce..61a1f1ffcd5 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -63,6 +63,8 @@ static void rna_AnimViz_path_start_frame_set(PointerRNA *ptr, int value)
/* XXX: watchit! Path Start > MAXFRAME/2 could be a problem... */
data->path_sf = value;
+ FRAMENUMBER_MIN_CLAMP(data->path_sf);
+
CLAMP(data->path_ef, data->path_sf + 1, MAXFRAME / 2);
}
@@ -71,7 +73,11 @@ static void rna_AnimViz_path_end_frame_set(PointerRNA *ptr, int value)
bAnimVizSettings *data = (bAnimVizSettings *)ptr->data;
data->path_ef = value;
- CLAMP(data->path_sf, 1, data->path_ef - 1);
+ CLAMP_MAX(data->path_sf, data->path_ef - 1);
+ if (U.flag & USER_NONEGFRAMES) {
+ CLAMP_MIN(data->path_sf, 0);
+ CLAMP_MIN(data->path_ef, 1);
+ }
}
#else
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 5b683ffd80e..aded0a6ba09 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -93,7 +93,7 @@ const EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
{SCULPT_TOOL_POSE, "POSE", ICON_BRUSH_GRAB, "Pose", ""},
{SCULPT_TOOL_NUDGE, "NUDGE", ICON_BRUSH_NUDGE, "Nudge", ""},
{SCULPT_TOOL_ROTATE, "ROTATE", ICON_BRUSH_ROTATE, "Rotate", ""},
- {SCULPT_TOOL_TOPOLOGY, "TOPOLOGY", ICON_BRUSH_GRAB, "Topology", ""},
+ {SCULPT_TOOL_SLIDE_RELAX, "TOPOLOGY", ICON_BRUSH_GRAB, "Slide Relax", ""},
{0, "", 0, NULL, NULL},
{SCULPT_TOOL_SIMPLIFY, "SIMPLIFY", ICON_BRUSH_DATA, "Simplify", ""},
{SCULPT_TOOL_MASK, "MASK", ICON_BRUSH_MASK, "Mask", ""},
@@ -1927,6 +1927,16 @@ static void rna_def_brush(BlenderRNA *brna)
"Smooth iterations applied after calculating the pose factor of each vertex");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "pose_ik_segments", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "pose_ik_segments");
+ RNA_def_property_range(prop, 1, 20);
+ RNA_def_property_ui_range(prop, 1, 20, 1, 3);
+ RNA_def_property_ui_text(
+ prop,
+ "Pose IK Segments",
+ "Number of segments of the inverse kinematics chain that will deform the mesh");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "auto_smooth_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "autosmooth_factor");
RNA_def_property_float_default(prop, 0);
@@ -2374,13 +2384,13 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "add_col");
- RNA_def_property_array(prop, 3);
+ RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Add Color", "Color of cursor when adding");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop = RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "sub_col");
- RNA_def_property_array(prop, 3);
+ RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Subtract Color", "Color of cursor when subtracting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 679ccc9725b..215ccc78bc2 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -329,10 +329,11 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
WM_main_add_notifier(NC_LINESTYLE, linestyle);
break;
}
+ /* ColorRamp for particle display is owned by the object (see T54422) */
+ case ID_OB:
case ID_PA: {
ParticleSettings *part = (ParticleSettings *)ptr->owner_id;
- DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, part);
}
default:
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 6a10074810d..8e57de9baeb 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -633,6 +633,23 @@ static void rna_ArmatureConstraint_target_clear(ID *id, bConstraint *con, Main *
ED_object_constraint_dependency_tag_update(bmain, (Object *)id, con);
}
+static void rna_ActionConstraint_mix_mode_set(PointerRNA *ptr, int value)
+{
+ bConstraint *con = (bConstraint *)ptr->data;
+ bActionConstraint *acon = (bActionConstraint *)con->data;
+
+ acon->mix_mode = value;
+
+ /* The After mode can be computed in world space for efficiency
+ * and backward compatibility, while Before requires Local. */
+ if (ELEM(value, ACTCON_MIX_AFTER, ACTCON_MIX_AFTER_FULL)) {
+ con->ownspace = CONSTRAINT_SPACE_WORLD;
+ }
+ else {
+ con->ownspace = CONSTRAINT_SPACE_LOCAL;
+ }
+}
+
static void rna_ActionConstraint_minmax_range(
PointerRNA *ptr, float *min, float *max, float *UNUSED(softmin), float *UNUSED(softmax))
{
@@ -1618,6 +1635,29 @@ static void rna_def_constraint_action(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
+ static const EnumPropertyItem mix_mode_items[] = {
+ {ACTCON_MIX_BEFORE,
+ "BEFORE",
+ 0,
+ "Before Original",
+ "Apply the action channels before the original transformation, "
+ "as if applied to an imaginary parent with Aligned Inherit Scale"},
+ {ACTCON_MIX_AFTER,
+ "AFTER",
+ 0,
+ "After Original",
+ "Apply the action channels after the original transformation, "
+ "as if applied to an imaginary child with Aligned Inherit Scale"},
+ {ACTCON_MIX_AFTER_FULL,
+ "AFTER_FULL",
+ 0,
+ "After Original (Full Scale)",
+ "Apply the action channels after the original transformation, as if "
+ "applied to an imaginary child with Full Inherit Scale. This mode "
+ "can create shear and is provided only for backward compatibility"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
srna = RNA_def_struct(brna, "ActionConstraint", "Constraint");
RNA_def_struct_ui_text(
srna, "Action Constraint", "Map an action to the transform axes of a bone");
@@ -1626,6 +1666,16 @@ static void rna_def_constraint_action(BlenderRNA *brna)
rna_def_constraint_target_common(srna);
+ prop = RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mix_mode");
+ RNA_def_property_enum_items(prop, mix_mode_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_ActionConstraint_mix_mode_set", NULL);
+ RNA_def_property_ui_text(
+ prop,
+ "Mix Mode",
+ "Specify how existing transformations and the action channels are combined");
+ RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
+
prop = RNA_def_property(srna, "transform_channel", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, transform_channel_items);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index d7deccef355..b295a169c83 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -51,29 +51,25 @@ static const EnumPropertyItem beztriple_handle_type_items[] = {
#endif
const EnumPropertyItem rna_enum_keyframe_handle_type_items[] = {
- {HD_FREE,
- "FREE",
- ICON_HANDLETYPE_FREE_VEC,
- "Free",
- "Completely independent manually set handle"},
+ {HD_FREE, "FREE", ICON_HANDLE_FREE, "Free", "Completely independent manually set handle"},
{HD_ALIGN,
"ALIGNED",
- ICON_HANDLETYPE_ALIGNED_VEC,
+ ICON_HANDLE_ALIGNED,
"Aligned",
"Manually set handle with rotation locked together with its pair"},
{HD_VECT,
"VECTOR",
- ICON_HANDLETYPE_VECTOR_VEC,
+ ICON_HANDLE_VECTOR,
"Vector",
"Automatic handles that create straight lines"},
{HD_AUTO,
"AUTO",
- ICON_HANDLETYPE_AUTO_VEC,
+ ICON_HANDLE_AUTO,
"Automatic",
"Automatic handles that create smooth curves"},
{HD_AUTO_ANIM,
"AUTO_CLAMPED",
- ICON_HANDLETYPE_AUTO_CLAMP_VEC,
+ ICON_HANDLE_AUTOCLAMPED,
"Auto Clamped",
"Automatic handles that create smooth curves which only change direction at keyframes"},
{0, NULL, 0, NULL, NULL},
@@ -1033,16 +1029,9 @@ static void rna_def_path(BlenderRNA *UNUSED(brna), StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
-static void rna_def_nurbs(BlenderRNA *UNUSED(brna), StructRNA *srna)
+static void rna_def_nurbs(BlenderRNA *UNUSED(brna), StructRNA *UNUSED(srna))
{
- PropertyRNA *prop;
-
- /* flags */
- prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
- RNA_def_property_ui_text(
- prop, "Use UV for Mapping", "Uses the UV values as Generated textured coordinates");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+ /* Nothing. */
}
static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
@@ -1757,12 +1746,6 @@ static void rna_def_curve(BlenderRNA *brna)
prop, "rna_Curve_texspace_size_get", "rna_Curve_texspace_size_set", NULL);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
- RNA_def_property_ui_text(
- prop, "Use UV for mapping", "Uses the UV values as Generated textured coordinates");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
-
/* materials */
prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 55aa529a30e..73a59cbba11 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -3888,6 +3888,36 @@ PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_,
return prop;
}
+PropertyRNA *RNA_def_float_translation(StructOrFunctionRNA *cont_,
+ const char *identifier,
+ int len,
+ const float *default_value,
+ float hardmin,
+ float hardmax,
+ const char *ui_name,
+ const char *ui_description,
+ float softmin,
+ float softmax)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_float_vector(cont_,
+ identifier,
+ len,
+ default_value,
+ hardmin,
+ hardmax,
+ ui_name,
+ ui_description,
+ softmin,
+ softmax);
+ prop->subtype = PROP_TRANSLATION;
+
+ RNA_def_property_ui_range(prop, softmin, softmax, 1, RNA_TRANSLATION_PREC_DEFAULT);
+
+ return prop;
+}
+
PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont_,
const char *identifier,
int len,
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 53fa863f6da..01f240e715b 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -73,7 +73,7 @@ static void rna_Fluid_dependency_update(Main *bmain, Scene *scene, PointerRNA *p
DEG_relations_tag_update(bmain);
}
-static void rna_Fluid_resetCache(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_Fluid_resetCache(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data;
if (settings->mmd && settings->mmd->domain) {
@@ -81,7 +81,6 @@ static void rna_Fluid_resetCache(Main *UNUSED(bmain), Scene *scene, PointerRNA *
FLUID_DOMAIN_OUTDATED_NOISE |
FLUID_DOMAIN_OUTDATED_MESH |
FLUID_DOMAIN_OUTDATED_PARTICLES);
- scene->r.cfra = settings->cache_frame_start;
}
DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY);
}
@@ -153,22 +152,6 @@ static bool rna_Fluid_parts_exists(PointerRNA *ptr, int ptype)
return false;
}
-static void rna_Fluid_draw_type_update(Main *UNUSED(bmain),
- Scene *UNUSED(scene),
- struct PointerRNA *ptr)
-{
- Object *ob = (Object *)ptr->owner_id;
- FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data;
-
- /* Wireframe mode more convenient when particles present */
- if (settings->particle_type == 0) {
- ob->dt = OB_SOLID;
- }
- else {
- ob->dt = OB_WIRE;
- }
-}
-
static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Object *ob = (Object *)ptr->owner_id;
@@ -176,26 +159,25 @@ static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *p
mmd = (FluidModifierData *)modifiers_findByType(ob, eModifierType_Fluid);
bool exists = rna_Fluid_parts_exists(ptr, PART_FLUID_FLIP);
+ /* Only create a particle system in liquid domain mode. */
+ if (mmd->domain->type != FLUID_DOMAIN_TYPE_LIQUID) {
+ rna_Fluid_reset(bmain, scene, ptr);
+ return;
+ }
+
if (ob->type == OB_MESH && !exists) {
- rna_Fluid_parts_create(bmain,
- ptr,
- "FlipParticleSettings",
- "FLIP Particles",
- "FLIP Particle System",
- PART_FLUID_FLIP);
+ rna_Fluid_parts_create(
+ bmain, ptr, "LiquidParticleSettings", "Liquid", "Liquid Particle System", PART_FLUID_FLIP);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FLIP;
}
else {
rna_Fluid_parts_delete(ptr, PART_FLUID_FLIP);
- rna_Fluid_resetCache(bmain, scene, ptr);
-
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_FLIP;
}
- rna_Fluid_draw_type_update(NULL, NULL, ptr);
- rna_Fluid_reset(bmain, scene, ptr);
+ rna_Fluid_update(bmain, scene, ptr);
}
-static void rna_Fluid_spray_parts_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Fluid_spray_parts_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Object *ob = (Object *)ptr->owner_id;
FluidModifierData *mmd;
@@ -203,25 +185,17 @@ static void rna_Fluid_spray_parts_update(Main *bmain, Scene *scene, PointerRNA *
bool exists = rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAY);
if (ob->type == OB_MESH && !exists) {
- rna_Fluid_parts_create(bmain,
- ptr,
- "SprayParticleSettings",
- "Spray Particles",
- "Spray Particle System",
- PART_FLUID_SPRAY);
+ rna_Fluid_parts_create(
+ bmain, ptr, "SprayParticleSettings", "Spray", "Spray Particle System", PART_FLUID_SPRAY);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
}
else {
rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAY);
- rna_Fluid_resetCache(bmain, scene, ptr);
-
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_SPRAY;
}
- rna_Fluid_draw_type_update(NULL, NULL, ptr);
- rna_Fluid_reset(bmain, scene, ptr);
}
-static void rna_Fluid_bubble_parts_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Fluid_bubble_parts_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Object *ob = (Object *)ptr->owner_id;
FluidModifierData *mmd;
@@ -232,22 +206,18 @@ static void rna_Fluid_bubble_parts_update(Main *bmain, Scene *scene, PointerRNA
rna_Fluid_parts_create(bmain,
ptr,
"BubbleParticleSettings",
- "Bubble Particles",
+ "Bubbles",
"Bubble Particle System",
PART_FLUID_BUBBLE);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
}
else {
rna_Fluid_parts_delete(ptr, PART_FLUID_BUBBLE);
- rna_Fluid_resetCache(bmain, scene, ptr);
-
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_BUBBLE;
}
- rna_Fluid_draw_type_update(NULL, NULL, ptr);
- rna_Fluid_reset(bmain, scene, ptr);
}
-static void rna_Fluid_foam_parts_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Fluid_foam_parts_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Object *ob = (Object *)ptr->owner_id;
FluidModifierData *mmd;
@@ -255,25 +225,17 @@ static void rna_Fluid_foam_parts_update(Main *bmain, Scene *scene, PointerRNA *p
bool exists = rna_Fluid_parts_exists(ptr, PART_FLUID_FOAM);
if (ob->type == OB_MESH && !exists) {
- rna_Fluid_parts_create(bmain,
- ptr,
- "FoamParticleSettings",
- "Foam Particles",
- "Foam Particle System",
- PART_FLUID_FOAM);
+ rna_Fluid_parts_create(
+ bmain, ptr, "FoamParticleSettings", "Foam", "Foam Particle System", PART_FLUID_FOAM);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
}
else {
rna_Fluid_parts_delete(ptr, PART_FLUID_FOAM);
- rna_Fluid_resetCache(bmain, scene, ptr);
-
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_FOAM;
}
- rna_Fluid_draw_type_update(NULL, NULL, ptr);
- rna_Fluid_reset(bmain, scene, ptr);
}
-static void rna_Fluid_tracer_parts_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Fluid_tracer_parts_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Object *ob = (Object *)ptr->owner_id;
FluidModifierData *mmd;
@@ -284,19 +246,15 @@ static void rna_Fluid_tracer_parts_update(Main *bmain, Scene *scene, PointerRNA
rna_Fluid_parts_create(bmain,
ptr,
"TracerParticleSettings",
- "Tracer Particles",
+ "Tracers",
"Tracer Particle System",
PART_FLUID_TRACER);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_TRACER;
}
else {
rna_Fluid_parts_delete(ptr, PART_FLUID_TRACER);
- rna_Fluid_resetCache(bmain, scene, ptr);
-
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_TRACER;
}
- rna_Fluid_draw_type_update(NULL, NULL, ptr);
- rna_Fluid_reset(bmain, scene, ptr);
}
static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -306,102 +264,131 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR
mmd = (FluidModifierData *)modifiers_findByType(ob, eModifierType_Fluid);
if (mmd->domain->sndparticle_combined_export == SNDPARTICLE_COMBINED_EXPORT_OFF) {
- rna_Fluid_parts_delete(ptr, (PART_FLUID_SPRAY | PART_FLUID_FOAM | PART_FLUID_BUBBLE));
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAM);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYBUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FOAMBUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAMBUBBLE);
+
+ bool exists_spray = rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAY);
+ bool exists_foam = rna_Fluid_parts_exists(ptr, PART_FLUID_FOAM);
+ bool exists_bubble = rna_Fluid_parts_exists(ptr, PART_FLUID_BUBBLE);
- // re-add each particle type if enabled
- if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_SPRAY) != 0) {
+ /* Re-add each particle type if enabled and no particle system exists for them anymore. */
+ if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_SPRAY) && !exists_spray) {
rna_Fluid_spray_parts_update(bmain, scene, ptr);
}
- if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_FOAM) != 0) {
+ if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_FOAM) && !exists_foam) {
rna_Fluid_foam_parts_update(bmain, scene, ptr);
}
- if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_BUBBLE) != 0) {
+ if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_BUBBLE) && !exists_bubble) {
rna_Fluid_bubble_parts_update(bmain, scene, ptr);
}
}
else if (mmd->domain->sndparticle_combined_export == SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM) {
- if (ob->type == OB_MESH &&
- !rna_Fluid_parts_exists(ptr, (PART_FLUID_SPRAY | PART_FLUID_FOAM))) {
- rna_Fluid_parts_delete(ptr, (PART_FLUID_SPRAY | PART_FLUID_FOAM));
- }
- rna_Fluid_parts_create(bmain,
- ptr,
- "SprayFoamParticleSettings",
- "Spray + Foam Particles",
- "Spray + Foam Particle System",
- (PART_FLUID_SPRAY | PART_FLUID_FOAM));
-
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
-
- // re-add bubbles if enabled
- if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_BUBBLE) != 0) {
- rna_Fluid_bubble_parts_update(bmain, scene, ptr);
+ if (ob->type == OB_MESH && !rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAYFOAM)) {
+
+ rna_Fluid_parts_create(bmain,
+ ptr,
+ "SprayFoamParticleSettings",
+ "Spray + Foam",
+ "Spray + Foam Particle System",
+ PART_FLUID_SPRAYFOAM);
+
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
+
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAY);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FOAM);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYBUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FOAMBUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAMBUBBLE);
+
+ /* Re-add spray if enabled and no particle system exists for it anymore. */
+ bool exists_bubble = rna_Fluid_parts_exists(ptr, PART_FLUID_BUBBLE);
+ if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_BUBBLE) && !exists_bubble) {
+ rna_Fluid_bubble_parts_update(bmain, scene, ptr);
+ }
}
}
else if (mmd->domain->sndparticle_combined_export == SNDPARTICLE_COMBINED_EXPORT_SPRAY_BUBBLE) {
- if (ob->type == OB_MESH &&
- !rna_Fluid_parts_exists(ptr, (PART_FLUID_SPRAY | PART_FLUID_BUBBLE))) {
- rna_Fluid_parts_delete(ptr, (PART_FLUID_SPRAY | PART_FLUID_BUBBLE));
- }
- rna_Fluid_parts_create(bmain,
- ptr,
- "SprayBubbleParticleSettings",
- "Spray + Bubble Particles",
- "Spray + Bubble Particle System",
- (PART_FLUID_SPRAY | PART_FLUID_BUBBLE));
-
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
-
- // re-add foam if enabled
- if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_FOAM) != 0) {
- rna_Fluid_foam_parts_update(bmain, scene, ptr);
+ if (ob->type == OB_MESH && !rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAYBUBBLE)) {
+
+ rna_Fluid_parts_create(bmain,
+ ptr,
+ "SprayBubbleParticleSettings",
+ "Spray + Bubbles",
+ "Spray + Bubble Particle System",
+ PART_FLUID_SPRAYBUBBLE);
+
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
+
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAY);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_BUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAM);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FOAMBUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAMBUBBLE);
+
+ /* Re-add foam if enabled and no particle system exists for it anymore. */
+ bool exists_foam = rna_Fluid_parts_exists(ptr, PART_FLUID_FOAM);
+ if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_FOAM) && !exists_foam) {
+ rna_Fluid_foam_parts_update(bmain, scene, ptr);
+ }
}
}
else if (mmd->domain->sndparticle_combined_export == SNDPARTICLE_COMBINED_EXPORT_FOAM_BUBBLE) {
- if (ob->type == OB_MESH &&
- !rna_Fluid_parts_exists(ptr, (PART_FLUID_FOAM | PART_FLUID_BUBBLE))) {
- rna_Fluid_parts_delete(ptr, (PART_FLUID_FOAM | PART_FLUID_BUBBLE));
- }
- rna_Fluid_parts_create(bmain,
- ptr,
- "FoamBubbleParticleSettings",
- "Foam + Bubble Particles",
- "Foam + Bubble Particle System",
- (PART_FLUID_FOAM | PART_FLUID_BUBBLE));
-
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
-
- // re-add spray if enabled
- if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_SPRAY) != 0) {
- rna_Fluid_spray_parts_update(bmain, scene, ptr);
+ if (ob->type == OB_MESH && !rna_Fluid_parts_exists(ptr, PART_FLUID_FOAMBUBBLE)) {
+
+ rna_Fluid_parts_create(bmain,
+ ptr,
+ "FoamBubbleParticleSettings",
+ "Foam + Bubble Particles",
+ "Foam + Bubble Particle System",
+ PART_FLUID_FOAMBUBBLE);
+
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
+
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FOAM);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_BUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAM);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYBUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAMBUBBLE);
+
+ /* Re-add foam if enabled and no particle system exists for it anymore. */
+ bool exists_spray = rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAY);
+ if ((mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_SPRAY) && !exists_spray) {
+ rna_Fluid_spray_parts_update(bmain, scene, ptr);
+ }
}
}
else if (mmd->domain->sndparticle_combined_export ==
SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM_BUBBLE) {
- if (ob->type == OB_MESH &&
- !rna_Fluid_parts_exists(ptr, (PART_FLUID_SPRAY | PART_FLUID_FOAM | PART_FLUID_BUBBLE))) {
- rna_Fluid_parts_delete(ptr, (PART_FLUID_SPRAY | PART_FLUID_FOAM | PART_FLUID_BUBBLE));
+ if (ob->type == OB_MESH && !rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAYFOAMBUBBLE)) {
+
+ rna_Fluid_parts_create(bmain,
+ ptr,
+ "SprayFoamBubbleParticleSettings",
+ "Spray + Foam + Bubbles",
+ "Spray + Foam + Bubble Particle System",
+ PART_FLUID_SPRAYFOAMBUBBLE);
+
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
+ mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
+
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAY);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FOAM);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_BUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYFOAM);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAYBUBBLE);
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FOAMBUBBLE);
}
- rna_Fluid_parts_create(bmain,
- ptr,
- "SprayFoamBubbleParticleSettings",
- "Spray + Foam + Bubble Particles",
- "Spray + Foam + Bubble Particle System",
- (PART_FLUID_SPRAY | PART_FLUID_FOAM | PART_FLUID_BUBBLE));
-
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
- mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
}
else {
// sanity check, should not occur
printf("ERROR: Unexpected combined export setting encountered!");
}
- rna_Fluid_resetCache(bmain, scene, ptr);
- rna_Fluid_draw_type_update(NULL, NULL, ptr);
}
static void rna_Fluid_cachetype_mesh_set(struct PointerRNA *ptr, int value)
@@ -992,13 +979,18 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
"REPLAY",
0,
"Replay",
- "Use the timeline to bake the scene. Pausing and resuming possible."},
+ "Use the timeline to bake the scene. Pausing and resuming possible"},
{FLUID_DOMAIN_CACHE_MODULAR,
"MODULAR",
0,
"Modular",
- "Bake every stage of the simulation on its own. Can pause and resume bake jobs."},
- {FLUID_DOMAIN_CACHE_FINAL, "FINAL", 0, "Final", "Bake the entire simulation at once."},
+ "Bake every stage of the simulation separately. Pausing and resuming possible"},
+ {FLUID_DOMAIN_CACHE_FINAL,
+ "FINAL",
+ 0,
+ "Final",
+ "Bake the entire simulation at once. Only generates the most essential cache files. "
+ "Pausing and resuming not possible"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem smoke_data_depth_items[] = {
@@ -1028,7 +1020,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
0,
"Domain",
"Use a fluid domain for guiding (domain needs to be baked already so that velocities can "
- "be extracted but can be of any type)"},
+ "be extracted). Guiding domain can be of any type (i.e. gas or liquid)"},
{FLUID_DOMAIN_GUIDE_SRC_EFFECTOR,
"EFFECTOR",
0,
@@ -1284,7 +1276,11 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "maxres");
RNA_def_property_range(prop, 6, 10000);
RNA_def_property_ui_range(prop, 24, 10000, 2, -1);
- RNA_def_property_ui_text(prop, "Max Res", "Resolution used for the fluid domain");
+ RNA_def_property_ui_text(
+ prop,
+ "Maximum Resolution",
+ "Resolution used for the fluid domain. Value corresponds to the longest domain side "
+ "(resolution for other domain sides is calculated automatically)");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
@@ -1330,7 +1326,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_enum_items(prop, domain_types);
RNA_def_property_enum_funcs(prop, NULL, "rna_Fluid_domaintype_set", NULL);
RNA_def_property_ui_text(prop, "Domain Type", "Change domain type of the simulation");
- RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_reset");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_flip_parts_update");
/* smoke domain options */
@@ -1340,8 +1336,8 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(
prop,
- "Density",
- "How much density affects smoke motion (higher value results in faster rising smoke)");
+ "Buoyancy Density",
+ "Buoyant force based on smoke density (higher value results in faster rising smoke)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE);
@@ -1350,21 +1346,24 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(
prop,
- "Heat",
- "How much heat affects smoke motion (higher value results in faster rising smoke)");
+ "Buoyancy Heat",
+ "Buoyant force based on smoke heat (higher value results in faster rising smoke)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "diss_speed");
RNA_def_property_range(prop, 1.0, 10000.0);
RNA_def_property_ui_range(prop, 1.0, 10000.0, 1, -1);
- RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
+ RNA_def_property_ui_text(
+ prop,
+ "Dissolve Speed",
+ "Determine how quickly the smoke dissolves (higher value makes smoke disappear faster)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vorticity");
RNA_def_property_range(prop, 0.0, 4.0);
- RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence/rotation in fluid");
+ RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence and rotation in smoke");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "highres_sampling", PROP_ENUM, PROP_NONE);
@@ -1374,12 +1373,15 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_DISSOLVE);
- RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time");
+ RNA_def_property_ui_text(prop, "Dissolve Smoke", "Let smoke disappear over time");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_DISSOLVE_LOG);
- RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
+ RNA_def_property_ui_text(
+ prop,
+ "Logarithmic Dissolve",
+ "Dissolve smoke in a logarithmic fashion. Dissolves quickly at first, but lingers longer");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
/* flame options */
@@ -1388,7 +1390,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.01, 4.0);
RNA_def_property_ui_range(prop, 0.01, 2.0, 1.0, 5);
RNA_def_property_ui_text(
- prop, "Speed", "Speed of the burning reaction (use larger values for smaller flame)");
+ prop, "Speed", "Speed of the burning reaction (higher value results in smaller flames)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "flame_smoke", PROP_FLOAT, PROP_NONE);
@@ -1406,13 +1408,19 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "flame_ignition", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.5, 5.0);
RNA_def_property_ui_range(prop, 0.5, 2.5, 1.0, 5);
- RNA_def_property_ui_text(prop, "Ignition", "Minimum temperature of flames");
+ RNA_def_property_ui_text(
+ prop,
+ "Minimum",
+ "Minimum temperature of the flames (higher value results in faster rising flames)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "flame_max_temp", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0, 10.0);
RNA_def_property_ui_range(prop, 1.0, 5.0, 1.0, 5);
- RNA_def_property_ui_text(prop, "Maximum", "Maximum temperature of flames");
+ RNA_def_property_ui_text(
+ prop,
+ "Maximum",
+ "Maximum temperature of the flames (higher value results in faster rising flames)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "flame_smoke_color", PROP_FLOAT, PROP_COLOR_GAMMA);
@@ -1447,8 +1455,8 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 1, 10, 1, -1);
RNA_def_property_ui_text(prop,
"Noise Scale",
- "Scale underlying noise grids by this factor. Noise grids have size "
- "factor times base resolution");
+ "The noise simulation is scaled up by this factor (compared to the "
+ "base resolution of the domain)");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
@@ -1456,7 +1464,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "noise_type");
RNA_def_property_enum_items(prop, prop_noise_type_items);
RNA_def_property_ui_text(
- prop, "Noise Method", "Noise method which is used for creating the high resolution");
+ prop, "Noise Method", "Noise method which is used during the high-res simulation");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
@@ -1514,10 +1522,10 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "particle_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(
- prop,
- "Radius",
- "Particle radius factor. Use this parameter when the simulation appears to leak volume");
+ RNA_def_property_ui_text(prop,
+ "Radius",
+ "Particle radius factor. Increase this value if the simulation appears "
+ "to leak volume, decrease it if the simulation seems to gain volume");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "particle_band_width", PROP_FLOAT, PROP_NONE);
@@ -1530,9 +1538,9 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_flip_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "particle_type", FLUID_DOMAIN_PARTICLE_FLIP);
- RNA_def_property_ui_text(prop, "FLIP", "Create FLIP particle system");
+ RNA_def_property_ui_text(prop, "FLIP", "Create liquid particle system");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, 0, "rna_Fluid_flip_parts_update");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_flip_parts_update");
prop = RNA_def_property(srna, "use_fractions", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_FRACTIONS);
@@ -1620,8 +1628,9 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 1, 10, 1, -1);
RNA_def_property_ui_text(prop,
"Mesh scale",
- "Scale underlying mesh grids by this factor. Mesh grids have size "
- "factor times base resolution");
+ "The mesh simulation is scaled up by this factor (compared to the base "
+ "resolution of the domain). For best meshing, it is recommended to "
+ "adjust the mesh particle radius alongside this value");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
@@ -1647,19 +1656,19 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_SPEED_VECTORS);
- RNA_def_property_ui_text(
- prop,
- "Speed Vectors",
- "Generate speed vectors (will be loaded automatically during render for motion blur)");
+ RNA_def_property_ui_text(prop,
+ "Speed Vectors",
+ "Caches velocities of mesh vertices. These will be used "
+ "(automatically) when rendering with motion blur enabled");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
prop = RNA_def_property(srna, "mesh_particle_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(
- prop,
- "Radius",
- "Particle radius factor (higher value results in larger (meshed) particles)");
+ RNA_def_property_ui_text(prop,
+ "Radius",
+ "Particle radius factor (higher value results in larger (meshed) "
+ "particles). Needs to be adjusted after changing the mesh scale");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
/* secondary particles options */
@@ -1668,36 +1677,36 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_range(prop, 0.0, 1000.0, 100.0, 3);
RNA_def_property_ui_text(prop,
- "tauMin_wc",
+ "Minimum Wave Crest Potential",
"Lower clamping threshold for marking fluid cells as wave crests "
- "(lower values result in more marked cells)");
+ "(lower value results in more marked cells)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_tau_max_wc", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_range(prop, 0.0, 1000.0, 100.0, 3);
RNA_def_property_ui_text(prop,
- "tauMax_wc",
+ "Maximum Wave Crest Potential",
"Upper clamping threshold for marking fluid cells as wave crests "
- "(higher values result in less marked cells)");
+ "(higher value results in less marked cells)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_tau_min_ta", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_range(prop, 0.0, 10000.0, 100.0, 3);
RNA_def_property_ui_text(prop,
- "tauMin_ta",
+ "Minimum Trapped Air Potential",
"Lower clamping threshold for marking fluid cells where air is trapped "
- "(lower values result in more marked cells)");
+ "(lower value results in more marked cells)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_tau_max_ta", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_range(prop, 0.0, 1000.0, 100.0, 3);
RNA_def_property_ui_text(prop,
- "tauMax_ta",
+ "Maximum Trapped Air Potential",
"Upper clamping threshold for marking fluid cells where air is trapped "
- "(higher values result in less marked cells)");
+ "(highe value results in less marked cells)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_tau_min_k", PROP_FLOAT, PROP_NONE);
@@ -1717,7 +1726,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop,
"tauMax_k",
"Upper clamping threshold that indicates the fluid speed where cells no longer emit more "
- "particles (higher values result in generally less particles)");
+ "particles (higher value results in generally less particles)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_k_wc", PROP_INT, PROP_NONE);
@@ -1740,8 +1749,8 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_range(prop, 0.0, 100.0, 10.0, 2);
RNA_def_property_ui_text(prop,
- "Buoyancy",
- "Amount of buoyancy force that rises bubbles (high values result in "
+ "Bubble Buoyancy",
+ "Amount of buoyancy force that rises bubbles (high value results in "
"bubble movement mainly upwards)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
@@ -1749,21 +1758,21 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_range(prop, 0.0, 100.0, 10.0, 2);
RNA_def_property_ui_text(prop,
- "Drag",
+ "Bubble Drag",
"Amount of drag force that moves bubbles along with the fluid (high "
- "values result in bubble movement mainly along with the fluid)");
+ "value results in bubble movement mainly along with the fluid)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_l_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10000.0);
RNA_def_property_ui_range(prop, 0.0, 10000.0, 100.0, 1);
- RNA_def_property_ui_text(prop, "Lifetime(min)", "Lowest possible particle lifetime");
+ RNA_def_property_ui_text(prop, "Minimum Lifetime", "Lowest possible particle lifetime");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_l_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10000.0);
RNA_def_property_ui_range(prop, 0.0, 10000.0, 100.0, 1);
- RNA_def_property_ui_text(prop, "Lifetime(max)", "Highest possible particle lifetime");
+ RNA_def_property_ui_text(prop, "Maximum Lifetime", "Highest possible particle lifetime");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "sndparticle_boundary", PROP_ENUM, PROP_NONE);
@@ -1807,9 +1816,9 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_range(prop, 1, 10, 1, -1);
RNA_def_property_ui_text(prop,
- "Mesh scale",
- "Scale underlying particle grids by this factor. Particle grids have "
- "size factor times base resolution");
+ "Particle scale",
+ "The particle simulation is scaled up by this factor (compared to the "
+ "base resolution of the domain)");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
@@ -1817,25 +1826,25 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "particle_type", FLUID_DOMAIN_PARTICLE_SPRAY);
RNA_def_property_ui_text(prop, "Spray", "Create spray particle system");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, 0, "rna_Fluid_spray_parts_update");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_spray_parts_update");
prop = RNA_def_property(srna, "use_bubble_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "particle_type", FLUID_DOMAIN_PARTICLE_BUBBLE);
RNA_def_property_ui_text(prop, "Bubble", "Create bubble particle system");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, 0, "rna_Fluid_bubble_parts_update");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_bubble_parts_update");
prop = RNA_def_property(srna, "use_foam_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "particle_type", FLUID_DOMAIN_PARTICLE_FOAM);
RNA_def_property_ui_text(prop, "Foam", "Create foam particle system");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, 0, "rna_Fluid_foam_parts_update");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_foam_parts_update");
prop = RNA_def_property(srna, "use_tracer_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "particle_type", FLUID_DOMAIN_PARTICLE_TRACER);
RNA_def_property_ui_text(prop, "Tracer", "Create tracer particle system");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, 0, "rna_Fluid_tracer_parts_update");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_tracer_parts_update");
/* fluid guiding options */
@@ -1857,7 +1866,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(
prop,
"Weight",
- "Guiding velocity factor (higher value results in bigger guiding velocities)");
+ "Guiding velocity factor (higher value results in greater guiding velocities)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
prop = RNA_def_property(srna, "guide_source", PROP_ENUM, PROP_NONE);
@@ -2033,7 +2042,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cfl_condition");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(
- prop, "CFL", "Maximal velocity per cell (higher value results in larger timesteps)");
+ prop, "CFL", "Maximal velocity per cell (higher value results in greater timesteps)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "use_adaptive_timesteps", PROP_BOOLEAN, PROP_NONE);
@@ -2362,18 +2371,28 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "volume_density", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 0.05, 5);
- RNA_def_property_ui_text(prop, "Volume", "Factor for smoke emitted from inside the mesh volume");
+ RNA_def_property_ui_text(prop,
+ "Volume Emission",
+ "Controls fluid emission from within the mesh (higher value results in "
+ "greater emissions from inside the mesh)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
prop = RNA_def_property(srna, "surface_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_range(prop, 0.0, 10.0, 0.05, 5);
- RNA_def_property_ui_text(prop, "Surface", "Maximum distance from mesh surface to emit fluid");
+ RNA_def_property_ui_text(prop,
+ "Surface Emission",
+ "Controls fluid emission from the mesh surface (higher value results "
+ "in emission further away from the mesh surface");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
prop = RNA_def_property(srna, "use_plane_init", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_FLOW_USE_PLANE_INIT);
- RNA_def_property_ui_text(prop, "Is Planar", "Treat this object as a planar, unclosed mesh");
+ RNA_def_property_ui_text(
+ prop,
+ "Is Planar",
+ "Treat this object as a planar and unclosed mesh. Fluid will only be emitted from the mesh "
+ "surface and based on the surface emission value");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
prop = RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index d07bf542954..9f5f1635536 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -385,8 +385,7 @@ static void rna_Image_resolution_set(PointerRNA *ptr, const float *values)
static int rna_Image_bindcode_get(PointerRNA *ptr)
{
Image *ima = (Image *)ptr->data;
- ImageTile *tile = BKE_image_get_tile(ima, 0);
- GPUTexture *tex = tile->gputexture[TEXTARGET_TEXTURE_2D];
+ GPUTexture *tex = ima->gputexture[TEXTARGET_TEXTURE_2D];
return (tex) ? GPU_texture_opengl_bindcode(tex) : 0;
}
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index c4ec0a84a2c..7b5612ef8e7 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -216,14 +216,13 @@ static void rna_Image_scale(Image *image, ReportList *reports, int width, int he
}
}
-static int rna_Image_gl_load(Image *image, ReportList *reports, int frame, int tile_number)
+static int rna_Image_gl_load(Image *image, ReportList *reports, int frame)
{
ImageUser iuser;
BKE_imageuser_default(&iuser);
iuser.framenr = frame;
- iuser.tile = tile_number;
- GPUTexture *tex = GPU_texture_from_blender(image, &iuser, GL_TEXTURE_2D);
+ GPUTexture *tex = GPU_texture_from_blender(image, &iuser, NULL, GL_TEXTURE_2D);
if (tex == NULL) {
BKE_reportf(reports, RPT_ERROR, "Failed to load image texture '%s'", image->id.name + 2);
@@ -233,15 +232,14 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int frame, int t
return GL_NO_ERROR;
}
-static int rna_Image_gl_touch(Image *image, ReportList *reports, int frame, int tile_number)
+static int rna_Image_gl_touch(Image *image, ReportList *reports, int frame)
{
int error = GL_NO_ERROR;
BKE_image_tag_time(image);
- ImageTile *tile = BKE_image_get_tile(image, tile_number);
- if (tile->gputexture[TEXTARGET_TEXTURE_2D] == NULL) {
- error = rna_Image_gl_load(image, reports, frame, tile_number);
+ if (image->gputexture[TEXTARGET_TEXTURE_2D] == NULL) {
+ error = rna_Image_gl_load(image, reports, frame);
}
return error;
@@ -336,7 +334,6 @@ void RNA_api_image(StructRNA *srna)
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(
func, "frame", 0, 0, INT_MAX, "Frame", "Frame of image sequence or movie", 0, INT_MAX);
- RNA_def_int(func, "tile_number", 0, 0, INT_MAX, "Tile", "Tile of a tiled image", 0, INT_MAX);
/* return value */
parm = RNA_def_int(
func, "error", 0, -INT_MAX, INT_MAX, "Error", "OpenGL error value", -INT_MAX, INT_MAX);
@@ -351,7 +348,6 @@ void RNA_api_image(StructRNA *srna)
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(
func, "frame", 0, 0, INT_MAX, "Frame", "Frame of image sequence or movie", 0, INT_MAX);
- RNA_def_int(func, "tile_number", 0, 0, INT_MAX, "Tile", "Tile of a tiled image", 0, INT_MAX);
/* return value */
parm = RNA_def_int(
func, "error", 0, -INT_MAX, INT_MAX, "Error", "OpenGL error value", -INT_MAX, INT_MAX);
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index d85c5c5f249..9df21a16e90 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -250,6 +250,9 @@ static Object *rna_Main_objects_new(Main *bmain, ReportList *reports, const char
case ID_AR:
type = OB_ARMATURE;
break;
+ case ID_LP:
+ type = OB_LIGHTPROBE;
+ break;
default: {
const char *idname;
if (RNA_enum_id_from_value(rna_enum_id_type_items, GS(data->name), &idname) == 0) {
@@ -665,12 +668,15 @@ static FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name
return linestyle;
}
-static LightProbe *rna_Main_lightprobe_new(Main *bmain, const char *name)
+static LightProbe *rna_Main_lightprobe_new(Main *bmain, const char *name, int type)
{
char safe_name[MAX_ID_NAME - 2];
rna_idname_validate(name, safe_name);
LightProbe *probe = BKE_lightprobe_add(bmain, safe_name);
+
+ BKE_lightprobe_type_set(probe, type);
+
id_us_min(&probe->id);
return probe;
}
@@ -2079,6 +2085,9 @@ void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add a new probe to the main database");
parm = RNA_def_string(func, "name", "Probe", 0, "", "New name for the data-block");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ parm = RNA_def_enum(
+ func, "type", rna_enum_lightprobes_type_items, 0, "Type", "The type of lightprobe to add");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "lightprobe", "LightProbe", "", "New light probe data-block");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 5890c3fe8a2..5e21fc883a9 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -2987,7 +2987,7 @@ static void rna_def_mesh(BlenderRNA *brna)
/* Remesh */
prop = RNA_def_property(srna, "remesh_voxel_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "remesh_voxel_size");
- RNA_def_property_range(prop, 0.00001f, FLT_MAX);
+ RNA_def_property_range(prop, 0.0001f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001f, FLT_MAX, 0.01, 4);
RNA_def_property_ui_text(prop,
"Voxel Size",
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 589ce1414bb..8117085974c 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -3217,6 +3217,11 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_INVERT_VGROUP);
+ RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X);
RNA_def_property_ui_text(prop, "X", "");
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 97cab783aed..cf84d38a880 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -801,7 +801,8 @@ static void rna_def_nlastrip(BlenderRNA *brna)
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_MUTED);
- RNA_def_property_ui_text(prop, "Muted", "Disable NLA Strip evaluation");
+ RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1);
+ RNA_def_property_ui_text(prop, "Mute", "Disable NLA Strip evaluation");
RNA_def_property_update(prop, NC_ANIMATION | ND_NLA | NA_EDITED, "rna_NlaStrip_update");
prop = RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index a39ace3ff7f..1e6fe053c3b 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -25,6 +25,7 @@
#include "DNA_brush_types.h"
#include "DNA_collection_types.h"
#include "DNA_customdata_types.h"
+#include "DNA_lightprobe_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_force_types.h"
@@ -196,6 +197,13 @@ const EnumPropertyItem rna_enum_metaelem_type_items[] = {
{0, NULL, 0, NULL, NULL},
};
+const EnumPropertyItem rna_enum_lightprobes_type_items[] = {
+ {LIGHTPROBE_TYPE_CUBE, "CUBE", ICON_LIGHTPROBE_CUBEMAP, "Cube", ""},
+ {LIGHTPROBE_TYPE_PLANAR, "PLANAR", ICON_LIGHTPROBE_PLANAR, "Planar", ""},
+ {LIGHTPROBE_TYPE_GRID, "GRID", ICON_LIGHTPROBE_GRID, "Grid", ""},
+ {0, NULL, 0, NULL, NULL},
+};
+
/* used for 2 enums */
#define OBTYPE_CU_CURVE \
{ \
@@ -375,36 +383,44 @@ static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16])
BKE_object_apply_mat4(ob, (float(*)[4])values, false, false);
}
-void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+void rna_Object_internal_update_data_impl(PointerRNA *ptr)
{
DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->owner_id);
}
-void rna_Object_internal_update_data_dependency(Main *bmain, Scene *scene, PointerRNA *ptr)
+void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ rna_Object_internal_update_data_impl(ptr);
+}
+
+void rna_Object_internal_update_data_dependency(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
DEG_relations_tag_update(bmain);
- rna_Object_internal_update_data(bmain, scene, ptr);
+ rna_Object_internal_update_data_impl(ptr);
}
-static void rna_Object_active_shape_update(bContext *C, PointerRNA *ptr)
+static void rna_Object_active_shape_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Object *ob = (Object *)ptr->owner_id;
- Main *bmain = CTX_data_main(C);
- Scene *scene = CTX_data_scene(C);
- if (CTX_data_edit_object(C) == ob) {
+ if (BKE_object_is_in_editmode(ob)) {
/* exit/enter editmode to get new shape */
switch (ob->type) {
- case OB_MESH:
+ case OB_MESH: {
+ Mesh *me = ob->data;
+ BMEditMesh *em = me->edit_mesh;
+ int select_mode = em->selectmode;
EDBM_mesh_load(bmain, ob);
- EDBM_mesh_make(ob, scene->toolsettings->selectmode, true);
+ EDBM_mesh_make(ob, select_mode, true);
+ em = me->edit_mesh;
- DEG_id_tag_update(ob->data, 0);
+ DEG_id_tag_update(&me->id, 0);
- EDBM_mesh_normals_update(((Mesh *)ob->data)->edit_mesh);
- BKE_editmesh_looptri_calc(((Mesh *)ob->data)->edit_mesh);
+ EDBM_mesh_normals_update(em);
+ BKE_editmesh_looptri_calc(em);
break;
+ }
case OB_CURVE:
case OB_SURF:
ED_curve_editnurb_load(bmain, ob);
@@ -417,7 +433,7 @@ static void rna_Object_active_shape_update(bContext *C, PointerRNA *ptr)
}
}
- rna_Object_internal_update_data(bmain, scene, ptr);
+ rna_Object_internal_update_data_impl(ptr);
}
static void rna_Object_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
@@ -1514,7 +1530,7 @@ static void rna_Object_modifier_clear(Object *object, bContext *C)
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER | NA_REMOVED, object);
}
-bool rna_Object_modifiers_override_apply(Main *UNUSED(bmain),
+bool rna_Object_modifiers_override_apply(Main *bmain,
PointerRNA *ptr_dst,
PointerRNA *ptr_src,
PointerRNA *UNUSED(ptr_storage),
@@ -1537,7 +1553,7 @@ bool rna_Object_modifiers_override_apply(Main *UNUSED(bmain),
/* Remember that insertion operations are defined and stored in correct order, which means that
* even if we insert several items in a row, we always insert first one, then second one, etc.
- * So we should always find 'anchor' constraint in both _src *and* _dst. */
+ * So we should always find 'anchor' modifier in both _src *and* _dst. */
ModifierData *mod_anchor = NULL;
if (opop->subitem_local_name && opop->subitem_local_name[0]) {
mod_anchor = BLI_findstring(
@@ -1560,18 +1576,32 @@ bool rna_Object_modifiers_override_apply(Main *UNUSED(bmain),
BLI_assert(mod_src != NULL);
- ModifierData *mod_dst = modifier_new(mod_src->type);
+ /* While it would be nicer to use lower-level modifier_new() here, this one is lacking
+ * special-cases handling (particles and other physics modifiers mostly), so using the ED version
+ * instead, to avoid duplicating code. */
+ ModifierData *mod_dst = ED_object_modifier_add(
+ NULL, bmain, NULL, ob_dst, mod_src->name, mod_src->type);
+
+ /* XXX Current handling of 'copy' from particle-system modifier is *very* bad (it keeps same psys
+ * pointer as source, then calling code copies psys of object separately and do some magic
+ * remapping of pointers...), unfortunately several pieces of code in Object editing area rely on
+ * this behavior. So for now, hacking around it to get it doing what we want it to do, as getting
+ * a proper behavior would be everything but trivial, and this whole particle thingy is
+ * end-of-life. */
+ ParticleSystem *psys_dst = (mod_dst->type == eModifierType_ParticleSystem) ?
+ ((ParticleSystemModifierData *)mod_dst)->psys :
+ NULL;
modifier_copyData(mod_src, mod_dst);
+ if (mod_dst->type == eModifierType_ParticleSystem) {
+ psys_dst->flag &= ~PSYS_DELETE;
+ ((ParticleSystemModifierData *)mod_dst)->psys = psys_dst;
+ }
+ BLI_remlink(&ob_dst->modifiers, mod_dst);
/* This handles NULL anchor as expected by adding at head of list. */
BLI_insertlinkafter(&ob_dst->modifiers, mod_anchor, mod_dst);
- /* This should actually *not* be needed in typical cases.
- * However, if overridden source was edited,
- * we *may* have some new conflicting names. */
- modifier_unique_name(&ob_dst->modifiers, mod_dst);
-
- // printf("%s: We inserted a modifier...\n", __func__);
+ // printf("%s: We inserted a modifier '%s'...\n", __func__, mod_dst->name);
return true;
}
@@ -2767,14 +2797,14 @@ static void rna_def_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
+ RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location when transforming");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update");
prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
+ RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation when transforming");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update");
@@ -2786,7 +2816,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(
prop,
"Lock Rotation (4D Angle)",
- "Lock editing of 'angle' component of four-component rotations in the interface");
+ "Lock editing of 'angle' component of four-component rotations when transforming");
/* XXX this needs a better name */
prop = RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D);
@@ -2798,7 +2828,7 @@ static void rna_def_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
+ RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale when transforming");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update");
@@ -3187,7 +3217,6 @@ static void rna_def_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shapenr");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* XXX this is really unpredictable... */
RNA_def_property_int_funcs(prop,
"rna_Object_active_shape_key_index_get",
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index f3ca10e332a..4155c453440 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -120,6 +120,29 @@ static const EnumPropertyItem part_hair_ren_as_items[] = {
};
#endif
+static const EnumPropertyItem part_type_items[] = {
+ {PART_EMITTER, "EMITTER", 0, "Emitter", ""},
+ /*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */
+ {PART_HAIR, "HAIR", 0, "Hair", ""},
+ {0, NULL, 0, NULL, NULL},
+};
+
+#ifdef RNA_RUNTIME
+static const EnumPropertyItem part_fluid_type_items[] = {
+ {PART_FLUID, "FLUID", 0, "Fluid", ""},
+ {PART_FLUID_FLIP, "FLIP", 0, "Liquid", ""},
+ {PART_FLUID_SPRAY, "SPRAY", 0, "Spray", ""},
+ {PART_FLUID_BUBBLE, "BUBBLE", 0, "Bubble", ""},
+ {PART_FLUID_FOAM, "FOAM", 0, "Foam", ""},
+ {PART_FLUID_TRACER, "TRACER", 0, "Tracer", ""},
+ {PART_FLUID_SPRAYFOAM, "SPRAYFOAM", 0, "Spray-Foam", ""},
+ {PART_FLUID_SPRAYBUBBLE, "SPRAYBUBBLE", 0, "Spray-Bubble", ""},
+ {PART_FLUID_FOAMBUBBLE, "FOAMBUBBLE", 0, "Foam-Bubble", ""},
+ {PART_FLUID_SPRAYFOAMBUBBLE, "SPRAYFOAMBUBBLE", 0, "Spray-Foam-Bubble", ""},
+ {0, NULL, 0, NULL, NULL},
+};
+#endif
+
#ifdef RNA_RUNTIME
# include "BLI_math.h"
@@ -286,6 +309,11 @@ static void rna_Particle_uv_on_emitter(ParticleData *particle,
psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, nor, 0, 0, sd.orco, 0);
# endif
+ if (modifier->mesh_final == NULL) {
+ BKE_report(reports, RPT_ERROR, "uv_on_emitter() requires a modifier from an evaluated object");
+ return;
+ }
+
/* get uvco & mcol */
int num = particle->num_dmcache;
int from = modifier->psys->part->from;
@@ -862,7 +890,7 @@ static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
/* check for clipping */
if (value > settings->end) {
- value = settings->end;
+ settings->end = value;
}
/*if (settings->type==PART_REACTOR && value < 1.0) */
@@ -881,7 +909,7 @@ static void rna_PartSettings_end_set(struct PointerRNA *ptr, float value)
/* check for clipping */
if (value < settings->sta) {
- value = settings->sta;
+ settings->sta = value;
}
settings->end = value;
@@ -959,7 +987,11 @@ static int rna_PartSettings_is_fluid_get(PointerRNA *ptr)
PART_FLUID_FOAM,
PART_FLUID_SPRAY,
PART_FLUID_BUBBLE,
- PART_FLUID_TRACER));
+ PART_FLUID_TRACER,
+ PART_FLUID_SPRAYFOAM,
+ PART_FLUID_SPRAYBUBBLE,
+ PART_FLUID_FOAMBUBBLE,
+ PART_FLUID_SPRAYFOAMBUBBLE));
}
static void rna_ParticleSettings_use_clump_curve_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -1230,6 +1262,21 @@ static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr)
return strlen(tstr);
}
+static const EnumPropertyItem *rna_Particle_type_itemf(bContext *UNUSED(C),
+ PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop),
+ bool *UNUSED(r_free))
+{
+ ParticleSettings *part = (ParticleSettings *)ptr->owner_id;
+
+ if (part->type == PART_HAIR || part->type == PART_EMITTER) {
+ return part_type_items;
+ }
+ else {
+ return part_fluid_type_items;
+ }
+}
+
static const EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C),
PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop),
@@ -1763,9 +1810,14 @@ static void rna_def_particle(BlenderRNA *brna)
/* UVs */
func = RNA_def_function(srna, "uv_on_emitter", "rna_Particle_uv_on_emitter");
- RNA_def_function_ui_description(func, "Obtain uv for particle on derived mesh");
+ RNA_def_function_ui_description(func,
+ "Obtain UV coordinates for a particle on an evaluated mesh.");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
+ parm = RNA_def_pointer(func,
+ "modifier",
+ "ParticleSystemModifier",
+ "",
+ "Particle modifier from an evaluated object");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_property(func, "uv", PROP_FLOAT, PROP_COORDS);
RNA_def_property_array(parm, 2);
@@ -2246,13 +2298,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem type_items[] = {
- {PART_EMITTER, "EMITTER", 0, "Emitter", ""},
- /*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */
- {PART_HAIR, "HAIR", 0, "Hair", ""},
- {0, NULL, 0, NULL, NULL},
- };
-
static const EnumPropertyItem phys_type_items[] = {
{PART_PHYS_NO, "NO", 0, "None", ""},
{PART_PHYS_NEWTON, "NEWTON", 0, "Newtonian", ""},
@@ -2479,8 +2524,9 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, type_items);
+ RNA_def_property_enum_items(prop, part_type_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_type_itemf");
RNA_def_property_ui_text(prop, "Type", "Particle Type");
RNA_def_property_update(prop, 0, "rna_Particle_change_type");
@@ -3419,7 +3465,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "rad_root");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2);
- RNA_def_property_ui_text(prop, "Root", "Strand width at the root");
+ RNA_def_property_ui_text(prop, "Root Diameter", "Strand diameter width at the root");
RNA_def_property_update(
prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */
@@ -3427,7 +3473,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "rad_tip");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2);
- RNA_def_property_ui_text(prop, "Tip", "Strand width at the tip");
+ RNA_def_property_ui_text(prop, "Tip Diameter", "Strand diameter width at the tip");
RNA_def_property_update(
prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 8c4b7dd52d9..85c4352d277 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -1356,7 +1356,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
prop = RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
+ RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location when transforming");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
@@ -1364,7 +1364,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
+ RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation when transforming");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
@@ -1376,7 +1376,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_ui_text(
prop,
"Lock Rotation (4D Angle)",
- "Lock editing of 'angle' component of four-component rotations in the interface");
+ "Lock editing of 'angle' component of four-component rotations when transforming");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
@@ -1394,7 +1394,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
prop = RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
+ RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale when transforming");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
@@ -1663,7 +1663,9 @@ static void rna_def_pose(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_mirror_relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", POSE_MIRROR_RELATIVE);
RNA_def_property_ui_text(
- prop, "Relative Mirror", "Apply relative transformations in X-mirror mode");
+ prop,
+ "Relative Mirror",
+ "Apply relative transformations in X-mirror mode (not supported with Auto IK)");
RNA_def_struct_path_func(srna, "rna_Pose_path");
RNA_def_property_update(prop, 0, "rna_Pose_update");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 4f969ad2bf8..52be8f3ccc7 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -943,8 +943,8 @@ static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
CLAMP(value, MINFRAME, MAXFRAME);
data->r.sfra = value;
- if (data->r.sfra >= data->r.efra) {
- data->r.efra = MIN2(data->r.sfra, MAXFRAME);
+ if (value > data->r.efra) {
+ data->r.efra = MIN2(value, MAXFRAME);
}
}
@@ -954,8 +954,8 @@ static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
CLAMP(value, MINFRAME, MAXFRAME);
data->r.efra = value;
- if (data->r.sfra >= data->r.efra) {
- data->r.sfra = MAX2(data->r.efra, MINFRAME);
+ if (data->r.sfra > value) {
+ data->r.sfra = MAX2(value, MINFRAME);
}
}
@@ -987,10 +987,12 @@ static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
/* TODO: or just refuse to set instead? */
data->r.pefra = data->r.efra;
}
-
- /* now set normally */
- CLAMP(value, MINAFRAME, data->r.pefra);
+ CLAMP(value, MINAFRAME, MAXFRAME);
data->r.psfra = value;
+
+ if (value > data->r.pefra) {
+ data->r.pefra = MIN2(value, MAXFRAME);
+ }
}
static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
@@ -1003,10 +1005,12 @@ static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
/* TODO: or just refuse to set instead? */
data->r.psfra = data->r.sfra;
}
-
- /* now set normally */
- CLAMP(value, data->r.psfra, MAXFRAME);
+ CLAMP(value, MINAFRAME, MAXFRAME);
data->r.pefra = value;
+
+ if (data->r.psfra > value) {
+ data->r.psfra = MAX2(value, MINAFRAME);
+ }
}
static void rna_Scene_show_subframe_update(Main *UNUSED(bmain),
@@ -3021,17 +3025,21 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_transform_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_AXIS_ALIGN);
RNA_def_property_ui_text(
- prop, "Only Locations", "Manipulate origins (object, pose and weight paint mode only)");
+ prop,
+ "Only Locations",
+ "Only transform object locations, without affecting rotation or scaling");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "use_transform_data_origin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_DATA_ORIGIN);
- RNA_def_property_ui_text(prop, "Transform Origins", "Manipulate object data");
+ RNA_def_property_ui_text(
+ prop, "Transform Origins", "Transform object origins, while leaving the shape in place");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "use_transform_skip_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_SKIP_CHILDREN);
- RNA_def_property_ui_text(prop, "Transform Parents", "Don't transform children");
+ RNA_def_property_ui_text(
+ prop, "Transform Parents", "Transform the parents, leaving the children in place");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "use_mesh_automerge", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 2c5f93e28ed..16dbe38f866 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -2701,15 +2701,15 @@ static void rna_def_text(StructRNA *srna)
{
/* Avoid text icons because they imply this aligns within a frame, see: T71082 */
static const EnumPropertyItem text_align_x_items[] = {
- {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", 0, "Left", ""},
- {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", 0, "Center", ""},
- {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", 0, "Right", ""},
+ {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", ICON_ANCHOR_LEFT, "Left", ""},
+ {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
+ {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", ICON_ANCHOR_RIGHT, "Right", ""},
{0, NULL, 0, NULL, NULL},
};
static const EnumPropertyItem text_align_y_items[] = {
- {SEQ_TEXT_ALIGN_Y_TOP, "TOP", 0, "Top", ""},
- {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", 0, "Center", ""},
- {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", 0, "Bottom", ""},
+ {SEQ_TEXT_ALIGN_Y_TOP, "TOP", ICON_ANCHOR_TOP, "Top", ""},
+ {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
+ {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", ICON_ANCHOR_BOTTOM, "Bottom", ""},
{0, NULL, 0, NULL, NULL},
};
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index b7da8d616d3..d14742077ff 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -161,6 +161,13 @@ const EnumPropertyItem rna_enum_space_graph_mode_items[] = {
{0, NULL, 0, NULL, NULL},
};
+const EnumPropertyItem rna_enum_space_sequencer_view_type_items[] = {
+ {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
+ {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Preview", ""},
+ {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, "Sequencer/Preview", ""},
+ {0, NULL, 0, NULL, NULL},
+};
+
#define SACT_ITEM_DOPESHEET \
{ \
SACTCONT_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dope Sheet", "Edit all keyframes in scene" \
@@ -2654,7 +2661,9 @@ static void rna_def_space(BlenderRNA *brna)
/* access to V2D_VIEWSYNC_SCREEN_TIME */
prop = RNA_def_property(srna, "show_locked_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Space_view2d_sync_get", "rna_Space_view2d_sync_set");
- RNA_def_property_ui_text(prop, "Lock Time to Other Windows", "");
+ RNA_def_property_ui_text(prop,
+ "Sync Visible Range",
+ "Syncronize the visible timeline range with other time-based editors");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, "rna_Space_view2d_sync_update");
rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_HEADER));
@@ -3489,7 +3498,7 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_look_dev", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_LOOK_DEV);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Look Dev Preview", "Show look development spheres");
+ RNA_def_property_ui_text(prop, "HDRI Preview", "Show HDRI preview spheres");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_wireframes", PROP_BOOLEAN, PROP_NONE);
@@ -3500,8 +3509,10 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "wireframe_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "overlay.wireframe_threshold");
- RNA_def_property_ui_text(
- prop, "Wireframe Threshold", "Adjust the number of wires displayed (1 for all wires)");
+ RNA_def_property_ui_text(prop,
+ "Wireframe Threshold",
+ "Adjust the angle threshold for displaying edges "
+ "(1.0 for all)");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
@@ -4470,17 +4481,6 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem view_type_items[] = {
- {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
- {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Preview", ""},
- {SEQ_VIEW_SEQUENCE_PREVIEW,
- "SEQUENCER_PREVIEW",
- ICON_SEQ_SPLITVIEW,
- "Sequencer/Preview",
- ""},
- {0, NULL, 0, NULL, NULL},
- };
-
static const EnumPropertyItem display_mode_items[] = {
{SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""},
{SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""},
@@ -4540,12 +4540,14 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "SpaceSeq");
RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data");
- rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI));
+ rna_def_space_generic_show_region_toggles(srna,
+ (1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_UI) |
+ (1 << RGN_TYPE_TOOLS) | (1 << RGN_TYPE_HUD));
/* view type, fairly important */
prop = RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "view");
- RNA_def_property_enum_items(prop, view_type_items);
+ RNA_def_property_enum_items(prop, rna_enum_space_sequencer_view_type_items);
RNA_def_property_ui_text(
prop, "View Type", "Type of the Sequencer view (sequencer, preview or both)");
RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 1f15288d2d6..b9fb8638c49 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -580,9 +580,6 @@ static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *p
return USER_EXPERIMENTAL_TEST(userdef, member); \
}
-RNA_USERDEF_EXPERIMENTAL_BOOLEAN_GET(use_tool_fallback)
-RNA_USERDEF_EXPERIMENTAL_BOOLEAN_GET(use_usd_exporter)
-
static bAddon *rna_userdef_addon_new(void)
{
ListBase *addons_list = &U.addons;
@@ -2234,6 +2231,14 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Bone Solid", "");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+ prop = RNA_def_property(srna, "bone_locked_weight", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(
+ prop,
+ "Bone Locked Weight",
+ "Shade for bones corresponding to a locked weight group during painting");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
/* misc */
prop = RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
@@ -2511,63 +2516,73 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
prop = RNA_def_property(srna, "info_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_selected");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Selected Line Background", "");
+ RNA_def_property_ui_text(prop, "Selected Line Background", "Background color of selected line");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_selected_text");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Selected Line Text", "");
+ RNA_def_property_ui_text(prop, "Selected Line Text Color", "Text color of selected line");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_error", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_error");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Error Background", "");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Error Icon Background", "Background color of Error icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_error_text", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_error_text");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Error Text", "");
+ RNA_def_property_ui_text(prop, "Error Icon Foreground", "Foreground color of Error icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_warning", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_warning");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Warning Background", "");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Warning Icon Background", "Background color of Warning icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_warning_text", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_warning_text");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Warning Text", "");
+ RNA_def_property_ui_text(prop, "Warning Icon Foreground", "Foreground color of Warning icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_info", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_info");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Info Background", "");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Info Icon Background", "Background color of Info icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_info_text", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_info_text");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Info Text", "");
+ RNA_def_property_ui_text(prop, "Info Icon Foreground", "Foreground color of Info icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_debug", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_debug");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Debug Background", "");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Debug Icon Background", "Background color of Debug icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "info_debug_text", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "info_debug_text");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Debug Text", "");
+ RNA_def_property_ui_text(prop, "Debug Icon Foreground", "Foreground color of Debug icon");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
+ prop = RNA_def_property(srna, "info_property", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Property Icon Background", "Backgrond color of Property icon");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
+ prop = RNA_def_property(srna, "info_property_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Property Icon Foreground", "Foreground color of Property icon");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
+ prop = RNA_def_property(srna, "info_operator", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Operator Icon Background", "Background color of Operator icon");
+ RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
+
+ prop = RNA_def_property(srna, "info_operator_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Operator Icon Foreground", "Foreground color of Operator icon");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
}
@@ -4511,8 +4526,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop = RNA_def_property(srna, "lookdev_sphere_size", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "lookdev_sphere_size");
RNA_def_property_range(prop, 50, 400);
- RNA_def_property_ui_text(
- prop, "Look Dev Spheres Size", "Maximum diameter of the look development sphere size");
+ RNA_def_property_ui_text(prop, "HDRI Preview Size", "Diameter of the HDRI preview spheres");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* View2D Grid Displays */
@@ -5851,25 +5865,12 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
static void rna_def_userdef_experimental(BlenderRNA *brna)
{
StructRNA *srna;
- PropertyRNA *prop;
srna = RNA_def_struct(brna, "PreferencesExperimental", NULL);
RNA_def_struct_sdna(srna, "UserDef_Experimental");
RNA_def_struct_nested(brna, srna, "Preferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Experimental", "Experimental features");
-
- prop = RNA_def_property(srna, "use_tool_fallback", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "use_tool_fallback", 1);
- RNA_def_property_boolean_funcs(prop, "rna_userdef_experimental_use_tool_fallback_get", NULL);
- RNA_def_property_ui_text(prop, "Fallback Tool Support", "Allow selection with an active tool");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
- prop = RNA_def_property(srna, "use_usd_exporter", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "use_usd_exporter", 1);
- RNA_def_property_boolean_funcs(prop, "rna_userdef_experimental_use_usd_exporter_get", NULL);
- RNA_def_property_ui_text(prop, "USD Exporter", "Enable exporting to the USD format");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index a57be90b08c..bf3c562f95f 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -90,6 +90,7 @@ static const EnumPropertyItem event_mouse_type_items[] = {
{MOUSEPAN, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", ""},
{MOUSEZOOM, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", ""},
{MOUSEROTATE, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", ""},
+ {MOUSESMARTZOOM, "MOUSESMARTZOOM", 0, "Mouse/Trackpad Smart Zoom", ""},
{0, "", 0, NULL, NULL},
{WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""},
{WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""},
@@ -186,6 +187,7 @@ const EnumPropertyItem rna_enum_event_type_items[] = {
{MOUSEPAN, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", "MsPan"},
{MOUSEZOOM, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", "MsZoom"},
{MOUSEROTATE, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", "MsRot"},
+ {MOUSESMARTZOOM, "MOUSESMARTZOOM", 0, "Mouse/Trackpad Smart Zoom", "MsSmartZoom"},
{0, "", 0, NULL, NULL},
{WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", "WhUp"},
{WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", "WhDown"},
@@ -302,6 +304,11 @@ const EnumPropertyItem rna_enum_event_type_items[] = {
{F17KEY, "F17", 0, "F17", ""},
{F18KEY, "F18", 0, "F18", ""},
{F19KEY, "F19", 0, "F19", ""},
+ {F20KEY, "F20", 0, "F20", ""},
+ {F21KEY, "F21", 0, "F21", ""},
+ {F22KEY, "F22", 0, "F22", ""},
+ {F23KEY, "F23", 0, "F23", ""},
+ {F24KEY, "F24", 0, "F24", ""},
{PAUSEKEY, "PAUSE", 0, "Pause", ""},
{INSERTKEY, "INSERT", 0, "Insert", "Ins"},
{HOMEKEY, "HOME", 0, "Home", ""},
@@ -2180,7 +2187,7 @@ static void rna_def_event(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Is Tablet", "The event has tablet data");
prop = RNA_def_property(srna, "is_mouse_absolute", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "is_motion_absolute", 1);
+ RNA_def_property_boolean_sdna(prop, NULL, "tablet.is_motion_absolute", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Absolute Motion", "The last motion event was an absolute input");
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c
index 7c6e3c2730b..32e348ea72f 100644
--- a/source/blender/makesrna/intern/rna_workspace.c
+++ b/source/blender/makesrna/intern/rna_workspace.c
@@ -152,7 +152,17 @@ static bToolRef *rna_WorkSpace_tools_from_space_node(WorkSpace *workspace, bool
},
create);
}
-
+static bToolRef *rna_WorkSpace_tools_from_space_sequencer(WorkSpace *workspace,
+ int mode,
+ bool create)
+{
+ return rna_WorkSpace_tools_from_tkey(workspace,
+ &(bToolKey){
+ .space_type = SPACE_SEQ,
+ .mode = mode,
+ },
+ create);
+}
const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C),
PointerRNA *ptr,
PropertyRNA *UNUSED(prop),
@@ -164,6 +174,8 @@ const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C),
return rna_enum_context_mode_items;
case SPACE_IMAGE:
return rna_enum_space_image_mode_all_items;
+ case SPACE_SEQ:
+ return rna_enum_space_sequencer_view_type_items;
}
return DummyRNA_DEFAULT_items;
}
@@ -192,18 +204,6 @@ static int rna_WorkSpaceTool_widget_length(PointerRNA *ptr)
return tref->runtime ? strlen(tref->runtime->gizmo_group) : 0;
}
-static void rna_WorkSpaceTool_tool_fallback_get(PointerRNA *ptr, char *value)
-{
- bToolRef *tref = ptr->data;
- strcpy(value, tref->runtime ? tref->runtime->idname_fallback : "");
-}
-
-static int rna_WorkSpaceTool_tool_fallback_length(PointerRNA *ptr)
-{
- bToolRef *tref = ptr->data;
- return tref->runtime ? strlen(tref->runtime->idname_fallback) : 0;
-}
-
#else /* RNA_RUNTIME */
static void rna_def_workspace_owner(BlenderRNA *brna)
@@ -270,6 +270,10 @@ static void rna_def_workspace_tool(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Identifier", "");
RNA_def_struct_name_property(srna, prop);
+ prop = RNA_def_property(srna, "idname_fallback", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Identifier Fallback", "");
+ RNA_def_struct_name_property(srna, prop);
+
prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Index", "");
@@ -300,14 +304,6 @@ static void rna_def_workspace_tool(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Widget", "");
RNA_def_property_string_funcs(
prop, "rna_WorkSpaceTool_widget_get", "rna_WorkSpaceTool_widget_length", NULL);
- RNA_define_verify_sdna(1);
-
- prop = RNA_def_property(srna, "tool_fallback", PROP_STRING, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Fallback", "");
- RNA_def_property_string_funcs(
- prop, "rna_WorkSpaceTool_tool_fallback_get", "rna_WorkSpaceTool_tool_fallback_length", NULL);
- RNA_define_verify_sdna(1);
RNA_api_workspace_tool(srna);
}
@@ -351,6 +347,16 @@ static void rna_def_workspace_tools(BlenderRNA *brna, PropertyRNA *cprop)
/* return type */
parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(
+ srna, "from_space_sequencer", "rna_WorkSpace_tools_from_space_sequencer");
+ RNA_def_function_ui_description(func, "");
+ parm = RNA_def_enum(func, "mode", rna_enum_space_sequencer_view_type_items, 0, "", "");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ RNA_def_boolean(func, "create", false, "Create", "");
+ /* return type */
+ parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
+ RNA_def_function_return(func, parm);
}
static void rna_def_workspace(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c
index 5cc55bfad8a..4fb6677199f 100644
--- a/source/blender/makesrna/intern/rna_workspace_api.c
+++ b/source/blender/makesrna/intern/rna_workspace_api.c
@@ -63,7 +63,9 @@ static void rna_WorkSpaceTool_setup(ID *id,
STRNCPY(tref_rt.op, op_idname);
tref_rt.index = index;
- STRNCPY(tref_rt.idname_fallback, idname_fallback);
+ /* While it's logical to assign both these values from setup,
+ * it's useful to stored this in DNA for re-use, exceptional case: write to the 'tref'. */
+ STRNCPY(tref->idname_fallback, idname_fallback);
STRNCPY(tref_rt.keymap_fallback, keymap_fallback);
WM_toolsystem_ref_set_from_runtime(C, (WorkSpace *)id, tref, &tref_rt, idname);