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:
authorYimingWu <xp8110@outlook.com>2021-07-04 08:23:52 +0300
committerYimingWu <xp8110@outlook.com>2021-07-04 08:23:52 +0300
commit442f269a72e8f07393fd246f642e210171a1c9bc (patch)
treeecab515215209172245f7709a0c07c1b14dab96c /source/blender/makesrna
parent87dae08dd3f2a80dd208576b130cabaca21c9912 (diff)
parent2d146b61d8583ec7169c5c04263d475a542b06ce (diff)
Merge remote-tracking branch 'origin/master' into lineart-bvh
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h6
-rw-r--r--source/blender/makesrna/RNA_types.h2
-rw-r--r--source/blender/makesrna/intern/makesrna.c6
-rw-r--r--source/blender/makesrna/intern/rna_access.c26
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c2
-rw-r--r--source/blender/makesrna/intern/rna_action.c2
-rw-r--r--source/blender/makesrna/intern/rna_animation.c4
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c4
-rw-r--r--source/blender/makesrna/intern/rna_attribute.c10
-rw-r--r--source/blender/makesrna/intern/rna_boid.c10
-rw-r--r--source/blender/makesrna/intern/rna_camera.c2
-rw-r--r--source/blender/makesrna/intern/rna_color.c6
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c62
-rw-r--r--source/blender/makesrna/intern/rna_context.c2
-rw-r--r--source/blender/makesrna/intern/rna_curve.c10
-rw-r--r--source/blender/makesrna/intern/rna_define.c12
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c2
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c14
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c2
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c374
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_layer.c2
-rw-r--r--source/blender/makesrna/intern/rna_mask.c4
-rw-r--r--source/blender/makesrna/intern/rna_material.c18
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c28
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c55
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c7
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c10
-rw-r--r--source/blender/makesrna/intern/rna_particle.c48
-rw-r--r--source/blender/makesrna/intern/rna_pose.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c1
-rw-r--r--source/blender/makesrna/intern/rna_rna.c8
-rw-r--r--source/blender/makesrna/intern/rna_scene.c51
-rw-r--r--source/blender/makesrna/intern/rna_screen.c2
-rw-r--r--source/blender/makesrna/intern/rna_sound.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c33
-rw-r--r--source/blender/makesrna/intern/rna_texture.c2
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c33
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c15
-rw-r--r--source/blender/makesrna/intern/rna_wm.c4
47 files changed, 592 insertions, 307 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index c691eb3b534..876229411e0 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -1358,9 +1358,9 @@ int RNA_parameter_flag(PropertyRNA *prop);
ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr, FunctionRNA *func);
void RNA_parameter_list_free(ParameterList *parms);
-int RNA_parameter_list_size(ParameterList *parms);
-int RNA_parameter_list_arg_count(ParameterList *parms);
-int RNA_parameter_list_ret_count(ParameterList *parms);
+int RNA_parameter_list_size(const ParameterList *parms);
+int RNA_parameter_list_arg_count(const ParameterList *parms);
+int RNA_parameter_list_ret_count(const ParameterList *parms);
void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter);
void RNA_parameter_list_next(ParameterIterator *iter);
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 17396a6a000..96604b8a5fe 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -555,7 +555,7 @@ typedef struct ParameterList {
typedef struct ParameterIterator {
struct ParameterList *parms;
- /* PointerRNA funcptr; */ /*UNUSED*/
+ // PointerRNA funcptr; /* UNUSED */
void *data;
int size, offset;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index a75921859cb..5bf16baa1e8 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -114,7 +114,7 @@ static void rna_generate_static_parameter_prototypes(FILE *f,
static int replace_if_different(const char *tmpfile, const char *dep_files[])
{
- /* return 0; */ /* use for testing had edited rna */
+ /* return 0; */ /* use for testing had edited rna */
#define REN_IF_DIFF \
{ \
@@ -641,7 +641,7 @@ static char *rna_def_property_get_func(
return NULL;
}
- /* typecheck, */
+ /* Type check. */
if (dp->dnatype && *dp->dnatype) {
if (prop->type == PROP_FLOAT) {
@@ -3083,7 +3083,7 @@ static void rna_auto_types(void)
PropertyDefRNA *dp;
for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
- /* DNA name for Screen is patched in 2.5, we do the reverse here .. */
+ /* DNA name for Screen is patched in 2.5, we do the reverse here. */
if (ds->dnaname) {
if (STREQ(ds->dnaname, "Screen")) {
ds->dnaname = "bScreen";
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index edcfcd130f7..840da76403a 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -3681,7 +3681,7 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
}
if (prop->flag & PROP_IDPROPERTY) {
/* XXX temporary hack to add it automatically, reading should
- * never do any write ops, to ensure thread safety etc .. */
+ * never do any write ops, to ensure thread safety etc. */
RNA_property_pointer_add(ptr, prop);
return RNA_property_pointer_get(ptr, prop);
}
@@ -3766,16 +3766,16 @@ void RNA_property_pointer_set(PointerRNA *ptr,
PointerRNA RNA_property_pointer_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop))
{
- /*PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop; */
+ // PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
- /* BLI_assert(RNA_property_type(prop) == PROP_POINTER); */
+ // BLI_assert(RNA_property_type(prop) == PROP_POINTER);
return PointerRNA_NULL; /* FIXME: there has to be a way... */
}
void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
{
- /*IDProperty *idprop;*/
+ // IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_POINTER);
@@ -3960,7 +3960,7 @@ static bool property_collection_liboverride_editable(PointerRNA *ptr,
if (!is_liboverride) {
/* We return True also for linked data, as it allows tricks like py scripts 'overriding' data
- * of those.*/
+ * of those. */
return true;
}
@@ -4005,7 +4005,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
item->flag |= IDP_FLAG_OVERRIDELIBRARY_LOCAL;
}
IDP_AppendArray(idprop, item);
- /* IDP_AppendArray does a shallow copy (memcpy), only free memory */
+ /* IDP_AppendArray does a shallow copy (memcpy), only free memory. */
/* IDP_FreePropertyContent(item); */
MEM_freeN(item);
rna_idproperty_touch(idprop);
@@ -4565,8 +4565,8 @@ static int rna_raw_access(ReportList *reports,
return 1;
}
- /* could also be faster with non-matching types,
- * for now we just do slower loop .. */
+ /* Could also be faster with non-matching types,
+ * for now we just do slower loop. */
}
}
@@ -5184,7 +5184,7 @@ static bool rna_path_parse_array_index(const char **path,
/* location.x || scale.X, single dimension arrays only */
token = rna_path_token(path, fixedbuf, sizeof(fixedbuf), 0);
if (token == NULL) {
- /* invalid syntax blah.. */
+ /* invalid syntax blah. */
return false;
}
temp_index = RNA_property_array_item_index(prop, *token);
@@ -7357,17 +7357,17 @@ void RNA_parameter_list_free(ParameterList *parms)
parms->func = NULL;
}
-int RNA_parameter_list_size(ParameterList *parms)
+int RNA_parameter_list_size(const ParameterList *parms)
{
return parms->alloc_size;
}
-int RNA_parameter_list_arg_count(ParameterList *parms)
+int RNA_parameter_list_arg_count(const ParameterList *parms)
{
return parms->arg_count;
}
-int RNA_parameter_list_ret_count(ParameterList *parms)
+int RNA_parameter_list_ret_count(const ParameterList *parms)
{
return parms->ret_count;
}
@@ -7375,7 +7375,7 @@ int RNA_parameter_list_ret_count(ParameterList *parms)
void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter)
{
/* may be useful but unused now */
- /* RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); */ /*UNUSED*/
+ // RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); /* UNUSED */
iter->parms = parms;
iter->parm = parms->func->cont.properties.first;
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 39e7774e5a4..c84ef1a6587 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -748,7 +748,7 @@ bool RNA_struct_override_matches(Main *bmain,
const char *prop_name = prop_local.identifier;
const size_t prop_name_len = strlen(prop_name);
- /* Inlined building, much much more efficient. */
+ /* Inlined building (significantly more efficient). */
if (!prop_local.is_idprop) {
rna_path_len = root_path_len + 1 + prop_name_len;
if (rna_path_len >= RNA_PATH_BUFFSIZE) {
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index fb9f5e0292e..2aa09a30c75 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -89,7 +89,7 @@ static void rna_Action_groups_remove(bAction *act, ReportList *reports, PointerR
return;
}
- /* move every one one of the group's F-Curves out into the Action again */
+ /* Move every one of the group's F-Curves out into the Action again. */
for (fcu = agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu = fcn) {
fcn = fcu->next;
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 10f86fe2671..52c25bae45a 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -337,7 +337,7 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain,
RNA_struct_blender_type_set(ksi->rna_ext.srna, ksi);
/* set callbacks */
- /* NOTE: we really should have all of these... */
+ /* NOTE: we really should have all of these... */
ksi->poll = (have_function[0]) ? RKS_POLL_rna_internal : NULL;
ksi->iter = (have_function[1]) ? RKS_ITER_rna_internal : NULL;
ksi->generate = (have_function[2]) ? RKS_GEN_rna_internal : NULL;
@@ -1146,7 +1146,7 @@ static void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
RNA_def_property_ui_text(prop, "Description", "A short description of the keying set");
- /* KeyingSetInfo (Type Info) for Builtin Sets only */
+ /* KeyingSetInfo (Type Info) for Builtin Sets only. */
prop = RNA_def_property(srna, "type_info", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSetInfo");
RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_typeinfo_get", NULL, NULL, NULL);
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
index 95b89e7efe4..fba523c9f89 100644
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ b/source/blender/makesrna/intern/rna_animation_api.c
@@ -70,7 +70,7 @@ static float rna_AnimData_nla_tweak_strip_time_to_scene(AnimData *adt, float fra
void RNA_api_keyingset(StructRNA *srna)
{
FunctionRNA *func;
- /*PropertyRNA *parm; */
+ // PropertyRNA *parm;
/* validate relative Keying Set (used to ensure paths are ok for context) */
func = RNA_def_function(srna, "refresh", "rna_KeyingSet_context_refresh");
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index f07aae0bb15..b3b0d7d13f7 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -1358,7 +1358,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
/* calculated and read only, not actual data access */
prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
- /*RNA_def_property_float_sdna(prop, NULL, ""); */ /* doesn't access any real data */
+ /* RNA_def_property_float_sdna(prop, NULL, ""); */ /* Doesn't access any real data. */
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_THICK_WRAP); /* no reference to original data */
@@ -1438,7 +1438,7 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "remove", "rna_Armature_edit_bone_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove an existing bone from the armature");
- /* target to remove*/
+ /* Target to remove. */
parm = RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);
RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0);
diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c
index a256002ffc1..b4ea70c33ab 100644
--- a/source/blender/makesrna/intern/rna_attribute.c
+++ b/source/blender/makesrna/intern/rna_attribute.c
@@ -162,6 +162,9 @@ const EnumPropertyItem *rna_enum_attribute_domain_itemf(ID *id, bool *r_free)
const ID_Type id_type = GS(id->name);
int totitem = 0, a;
+ static EnumPropertyItem mesh_vertex_domain_item = {
+ ATTR_DOMAIN_POINT, "POINT", 0, "Vertex", "Attribute per point/vertex"};
+
for (a = 0; rna_enum_attribute_domain_items[a].identifier; a++) {
domain_item = &rna_enum_attribute_domain_items[a];
@@ -175,7 +178,12 @@ const EnumPropertyItem *rna_enum_attribute_domain_itemf(ID *id, bool *r_free)
continue;
}
- RNA_enum_item_add(&item, &totitem, domain_item);
+ if (domain_item->value == ATTR_DOMAIN_POINT && id_type == ID_ME) {
+ RNA_enum_item_add(&item, &totitem, &mesh_vertex_domain_item);
+ }
+ else {
+ RNA_enum_item_add(&item, &totitem, domain_item);
+ }
}
RNA_enum_item_end(&item, &totitem);
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 3e3452af713..40a64ffccd1 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -491,10 +491,12 @@ static void rna_def_boidrule(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "On Land", "Use rule when boid is on land");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- /*prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); */
- /*RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);*/
- /*RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded); */
- /*RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface"); */
+# if 0
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
+ RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
+# endif
/* types */
rna_def_boidrule_goal(brna);
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index f48a781cfab..d218f92e639 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -758,7 +758,7 @@ void RNA_def_camera(BlenderRNA *brna)
rna_def_camera_background_image(brna);
rna_def_camera_background_images(brna, prop);
- /* Nested Data */
+ /* Nested Data. */
RNA_define_animate_sdna(true);
/* *** Animated *** */
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 54f9a93d90a..39a44d7568a 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -1206,7 +1206,7 @@ static void rna_def_colormanage(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- /* ** Display Settings ** */
+ /* ** Display Settings ** */
srna = RNA_def_struct(brna, "ColorManagedDisplaySettings", NULL);
RNA_def_struct_path_func(srna, "rna_ColorManagedDisplaySettings_path");
RNA_def_struct_ui_text(
@@ -1222,7 +1222,7 @@ static void rna_def_colormanage(BlenderRNA *brna)
RNA_def_property_update(
prop, NC_WINDOW, "rna_ColorManagedDisplaySettings_display_device_update");
- /* ** View Settings ** */
+ /* ** View Settings ** */
srna = RNA_def_struct(brna, "ColorManagedViewSettings", NULL);
RNA_def_struct_path_func(srna, "rna_ColorManagedViewSettings_path");
RNA_def_struct_ui_text(srna,
@@ -1276,7 +1276,7 @@ static void rna_def_colormanage(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Curves", "Use RGB curved for pre-display transformation");
RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
- /* ** Colorspace ** */
+ /* ** Colorspace ** */
srna = RNA_def_struct(brna, "ColorManagedInputColorspaceSettings", NULL);
RNA_def_struct_path_func(srna, "rna_ColorManagedInputColorspaceSettings_path");
RNA_def_struct_ui_text(
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index b363dcd4ba9..28aef635688 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -206,6 +206,7 @@ static const EnumPropertyItem target_space_pchan_items[] = {
"Custom Space",
"The transformation of the target is evaluated relative to a custom object/bone/vertex "
"group"},
+ {0, "", 0, NULL, NULL},
{CONSTRAINT_SPACE_POSE,
"POSE",
0,
@@ -224,6 +225,14 @@ static const EnumPropertyItem target_space_pchan_items[] = {
"Local Space",
"The transformation of the target is evaluated relative to its local "
"coordinate system"},
+ {CONSTRAINT_SPACE_OWNLOCAL,
+ "LOCAL_OWNER_ORIENT",
+ 0,
+ "Local Space (Owner Orientation)",
+ "The transformation of the target bone is evaluated relative to its local coordinate "
+ "system, followed by a correction for the difference in target and owner rest pose "
+ "orientations. When applied as local transform to the owner produces the same global "
+ "motion as the target if the parents are still in rest pose"},
{0, NULL, 0, NULL, NULL},
};
@@ -238,6 +247,7 @@ static const EnumPropertyItem owner_space_pchan_items[] = {
0,
"Custom Space",
"The constraint is applied in local space of a custom object/bone/vertex group"},
+ {0, "", 0, NULL, NULL},
{CONSTRAINT_SPACE_POSE,
"POSE",
0,
@@ -914,7 +924,7 @@ static void rna_def_constrainttarget(BlenderRNA *brna)
RNA_def_property_update(
prop, NC_OBJECT | ND_CONSTRAINT, "rna_ConstraintTarget_dependency_update");
- /* space, flag and type still to do */
+ /* space, flag and type still to do. */
RNA_define_lib_overridable(false);
}
@@ -1624,18 +1634,48 @@ static void rna_def_constraint_transform_like(BlenderRNA *brna)
0,
"Replace",
"Replace the original transformation with copied"},
+ {0, "", 0, NULL, NULL},
+ {TRANSLIKE_MIX_BEFORE_FULL,
+ "BEFORE_FULL",
+ 0,
+ "Before Original (Full)",
+ "Apply copied transformation before original, using simple matrix multiplication as if "
+ "the constraint target is a parent in Full Inherit Scale mode. "
+ "Will create shear when combining rotation and non-uniform scale"},
{TRANSLIKE_MIX_BEFORE,
"BEFORE",
0,
- "Before Original",
- "Apply copied transformation before original, as if the constraint target is a parent. "
- "Scale is handled specially to avoid creating shear"},
+ "Before Original (Aligned)",
+ "Apply copied transformation before original, as if the constraint target is a parent in "
+ "Aligned Inherit Scale mode. This effectively uses Full for location and Split Channels "
+ "for rotation and scale"},
+ {TRANSLIKE_MIX_BEFORE_SPLIT,
+ "BEFORE_SPLIT",
+ 0,
+ "Before Original (Split Channels)",
+ "Apply copied transformation before original, handling location, rotation and scale "
+ "separately, similar to a sequence of three Copy constraints"},
+ {0, "", 0, NULL, NULL},
+ {TRANSLIKE_MIX_AFTER_FULL,
+ "AFTER_FULL",
+ 0,
+ "After Original (Full)",
+ "Apply copied transformation after original, using simple matrix multiplication as if "
+ "the constraint target is a child in Full Inherit Scale mode. "
+ "Will create shear when combining rotation and non-uniform scale"},
{TRANSLIKE_MIX_AFTER,
"AFTER",
0,
- "After Original",
- "Apply copied transformation after original, as if the constraint target is a child. "
- "Scale is handled specially to avoid creating shear"},
+ "After Original (Aligned)",
+ "Apply copied transformation after original, as if the constraint target is a child in "
+ "Aligned Inherit Scale mode. This effectively uses Full for location and Split Channels "
+ "for rotation and scale"},
+ {TRANSLIKE_MIX_AFTER_SPLIT,
+ "AFTER_SPLIT",
+ 0,
+ "After Original (Split Channels)",
+ "Apply copied transformation after original, handling location, rotation and scale "
+ "separately, similar to a sequence of three Copy constraints"},
{0, NULL, 0, NULL, NULL},
};
@@ -1653,6 +1693,12 @@ static void rna_def_constraint_transform_like(BlenderRNA *brna)
RNA_define_lib_overridable(true);
+ prop = RNA_def_property(srna, "remove_target_shear", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", TRANSLIKE_REMOVE_TARGET_SHEAR);
+ RNA_def_property_ui_text(
+ prop, "Remove Target Shear", "Remove shear from the target transformation before combining");
+ RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
+
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);
@@ -2975,7 +3021,7 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna)
/* direct access to bindings */
/* NOTE: only to be used by experienced users */
prop = RNA_def_property(srna, "joint_bindings", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_array(prop, 32); /* XXX this is the maximum value allowed - why? */
+ RNA_def_property_array(prop, 32); /* XXX this is the maximum value allowed - why? */
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_SplineIKConstraint_joint_bindings_get_length");
RNA_def_property_float_funcs(prop,
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index e6dceb5af72..4079406e64b 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -36,7 +36,7 @@ const EnumPropertyItem rna_enum_context_mode_items[] = {
{CTX_MODE_EDIT_MESH, "EDIT_MESH", 0, "Mesh Edit", ""},
{CTX_MODE_EDIT_CURVE, "EDIT_CURVE", 0, "Curve Edit", ""},
{CTX_MODE_EDIT_SURFACE, "EDIT_SURFACE", 0, "Surface Edit", ""},
- {CTX_MODE_EDIT_TEXT, "EDIT_TEXT", 0, "Edit Edit", ""},
+ {CTX_MODE_EDIT_TEXT, "EDIT_TEXT", 0, "Text Edit", ""},
/* PARSKEL reuse will give issues */
{CTX_MODE_EDIT_ARMATURE, "EDIT_ARMATURE", 0, "Armature Edit", ""},
{CTX_MODE_EDIT_METABALL, "EDIT_METABALL", 0, "Metaball Edit", ""},
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 2a4cd1d934a..299cd2504a8 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -1418,7 +1418,7 @@ static void rna_def_text(BlenderRNA *brna)
static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- /*PropertyRNA *prop; */
+ // PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
@@ -1448,7 +1448,7 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- /*PropertyRNA *prop; */
+ // PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
@@ -1954,14 +1954,14 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop = RNA_def_property(srna, "point_count_u", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* Editing this needs knot recalc. */
RNA_def_property_int_sdna(prop, NULL, "pntsu");
RNA_def_property_ui_text(
prop, "Points U", "Total number points for the curve or surface in the U direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop = RNA_def_property(srna, "point_count_v", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* Editing this needs knot recalc. */
RNA_def_property_int_sdna(prop, NULL, "pntsv");
RNA_def_property_ui_text(
prop, "Points V", "Total number points for the surface on the V direction");
@@ -2074,7 +2074,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop = RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "charidx");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* Editing this needs knot recalc. */
RNA_def_property_ui_text(prop,
"Character Index",
"Location of this character in the text data (only for text curves)");
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 6b0a2b324c3..0c6c3fd9b0a 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1281,7 +1281,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_,
int type,
int subtype)
{
- /*StructRNA *srna = DefRNA.laststruct;*/ /* invalid for python defined props */
+ // StructRNA *srna = DefRNA.laststruct; /* Invalid for Python defined props. */
ContainerRNA *cont = cont_;
ContainerDefRNA *dcont;
PropertyDefRNA *dprop = NULL;
@@ -1351,7 +1351,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_,
iprop->hardmin = (subtype == PROP_UNSIGNED) ? 0 : INT_MIN;
iprop->hardmax = INT_MAX;
- iprop->softmin = (subtype == PROP_UNSIGNED) ? 0 : -10000; /* rather arbitrary .. */
+ iprop->softmin = (subtype == PROP_UNSIGNED) ? 0 : -10000; /* rather arbitrary. */
iprop->softmax = 10000;
iprop->step = 1;
break;
@@ -1371,7 +1371,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_,
fprop->softmax = fprop->hardmax = 1.0f;
}
else {
- fprop->softmin = (subtype == PROP_UNSIGNED) ? 0.0f : -10000.0f; /* rather arbitrary .. */
+ fprop->softmin = (subtype == PROP_UNSIGNED) ? 0.0f : -10000.0f; /* rather arbitrary. */
fprop->softmax = 10000.0f;
}
fprop->step = 10;
@@ -1670,7 +1670,7 @@ void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int le
memset(prop->arraylength, 0, sizeof(prop->arraylength));
}
- /* TODO make sure arraylength values are sane */
+ /* TODO: make sure `arraylength` values are sane. */
}
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
@@ -2416,7 +2416,7 @@ void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const
}
}
- /* SDNA doesn't pass us unsigned unfortunately .. */
+ /* SDNA doesn't pass us unsigned unfortunately. */
if (dp->dnatype && STREQ(dp->dnatype, "char")) {
iprop->hardmin = iprop->softmin = CHAR_MIN;
iprop->hardmax = iprop->softmax = CHAR_MAX;
@@ -2429,7 +2429,7 @@ void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const
iprop->hardmin = INT_MIN;
iprop->hardmax = INT_MAX;
- iprop->softmin = -10000; /* rather arbitrary .. */
+ iprop->softmin = -10000; /* rather arbitrary. */
iprop->softmax = 10000;
}
else if (dp->dnatype && STREQ(dp->dnatype, "int8_t")) {
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index 83df997b3d4..0dfd7d74c25 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -226,7 +226,7 @@ static bool rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr)
return (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) ? 1 : 0;
}
-/* does output layer exist*/
+/* Does output layer exist. */
static bool rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, Object *ob, int index)
{
return dynamicPaint_outputLayerExists(surface, ob, index);
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 399f45a2382..f81a806b009 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -61,8 +61,8 @@ const EnumPropertyItem rna_enum_fmodifier_type_items[] = {
"Reshape F-Curve values, e.g. change amplitude of movements"},
{FMODIFIER_TYPE_CYCLES, "CYCLES", 0, "Cycles", "Cyclic extend/repeat keyframe sequence"},
{FMODIFIER_TYPE_NOISE, "NOISE", 0, "Noise", "Add pseudo-random noise on top of F-Curves"},
- /*{FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""},*/ /* FIXME: not implemented yet! */
- /*{FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""},*/ /* FIXME: not implemented yet! */
+ // {FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""}, /* FIXME: not implemented yet! */
+ // {FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""}, /* FIXME: not implemented yet! */
{FMODIFIER_TYPE_LIMITS,
"LIMITS",
0,
@@ -263,8 +263,8 @@ static void rna_DriverTarget_update_data(Main *bmain, Scene *scene, PointerRNA *
fcu->flag &= ~FCURVE_DISABLED;
if (driver) {
- /* FIXME: need to be able to search targets for required one... */
- /*BLI_findindex(&driver->targets, ptr->data) != -1) */
+ /* FIXME: need to be able to search targets for required one. */
+ // BLI_findindex(&driver->targets, ptr->data) != -1)
RNA_pointer_create(ptr->owner_id, &RNA_Driver, driver, &driverptr);
rna_ChannelDriver_update_data(bmain, scene, &driverptr);
}
@@ -584,7 +584,7 @@ static void rna_FCurve_group_set(PointerRNA *ptr,
action_groups_remove_channel(act, fcu);
/* add the F-Curve back to the action now in the right place */
- /* TODO: make the api function handle the case where there isn't any group to assign to */
+ /* TODO: make the api function handle the case where there isn't any group to assign to. */
if (value.data) {
/* add to its group using API function, which makes sure everything goes ok */
action_groups_add_channel(act, value.data, fcu);
@@ -1449,7 +1449,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
static void rna_def_fmodifier_python(BlenderRNA *brna)
{
StructRNA *srna;
- /*PropertyRNA *prop; */
+ // PropertyRNA *prop;
srna = RNA_def_struct(brna, "FModifierPython", "FModifier");
RNA_def_struct_ui_text(
@@ -2432,7 +2432,7 @@ static void rna_def_fcurve(BlenderRNA *brna)
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_MUTED);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
- RNA_def_property_ui_text(prop, "Muted", "Disable F-Curve Modifier evaluation");
+ RNA_def_property_ui_text(prop, "Muted", "Disable F-Curve evaluation");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, "rna_FCurve_update_eval");
prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index dab76c84e6a..decdc728bbe 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1986,7 +1986,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
"e.g. 5*10^-6)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset");
- /* mesh options options */
+ /* Mesh options. */
prop = RNA_def_property(srna, "mesh_concave_upper", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 19ed5f960cf..21e905cfd2a 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1995,7 +1995,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Opacity", "Layer Opacity");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
- /* layer channel color (grease pencil) */
+ /* Layer channel color (grease pencil). */
prop = RNA_def_property(srna, "channel_color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "color");
RNA_def_property_array(prop, 3);
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 60b2b6cbd20..5b3b06fb3a8 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -93,6 +93,11 @@ const EnumPropertyItem rna_enum_object_greasepencil_modifier_type_items[] = {
ICON_MOD_SUBSURF,
"Subdivide",
"Subdivide stroke adding more control points"},
+ {eGpencilModifierType_Weight,
+ "GP_WEIGHT",
+ ICON_MOD_VERTEX_WEIGHT,
+ "Vertex Weight",
+ "Generate Vertex Weights"},
{0, "", 0, N_("Deform"), ""},
{eGpencilModifierType_Armature,
"GP_ARMATURE",
@@ -233,6 +238,8 @@ static StructRNA *rna_GpencilModifier_refine(struct PointerRNA *ptr)
return &RNA_TintGpencilModifier;
case eGpencilModifierType_Time:
return &RNA_TimeGpencilModifier;
+ case eGpencilModifierType_Weight:
+ return &RNA_WeightGpencilModifier;
case eGpencilModifierType_Color:
return &RNA_ColorGpencilModifier;
case eGpencilModifierType_Array:
@@ -331,6 +338,8 @@ RNA_GP_MOD_VGROUP_NAME_SET(Offset, vgname);
RNA_GP_MOD_VGROUP_NAME_SET(Armature, vgname);
RNA_GP_MOD_VGROUP_NAME_SET(Texture, vgname);
RNA_GP_MOD_VGROUP_NAME_SET(Tint, vgname);
+RNA_GP_MOD_VGROUP_NAME_SET(Weight, target_vgname);
+RNA_GP_MOD_VGROUP_NAME_SET(Weight, vgname);
RNA_GP_MOD_VGROUP_NAME_SET(Lineart, vgname);
# undef RNA_GP_MOD_VGROUP_NAME_SET
@@ -363,8 +372,7 @@ static void greasepencil_modifier_object_set(Object *self,
RNA_GP_MOD_OBJECT_SET(Armature, object, OB_ARMATURE);
RNA_GP_MOD_OBJECT_SET(Lattice, object, OB_LATTICE);
RNA_GP_MOD_OBJECT_SET(Mirror, object, OB_EMPTY);
-RNA_GP_MOD_OBJECT_SET(Opacity, object, OB_EMPTY);
-RNA_GP_MOD_OBJECT_SET(Thick, object, OB_EMPTY);
+RNA_GP_MOD_OBJECT_SET(Weight, object, OB_EMPTY);
# undef RNA_GP_MOD_OBJECT_SET
@@ -538,6 +546,16 @@ static void rna_ThickGpencilModifier_material_set(PointerRNA *ptr,
rna_GpencilModifier_material_set(ptr, value, ma_target, reports);
}
+static void rna_WeightGpencilModifier_material_set(PointerRNA *ptr,
+ PointerRNA value,
+ struct ReportList *reports)
+{
+ WeightGpencilModifierData *tmd = (WeightGpencilModifierData *)ptr->data;
+ Material **ma_target = &tmd->material;
+
+ rna_GpencilModifier_material_set(ptr, value, ma_target, reports);
+}
+
static void rna_OffsetGpencilModifier_material_set(PointerRNA *ptr,
PointerRNA value,
struct ReportList *reports)
@@ -701,7 +719,7 @@ static void rna_def_modifier_gpencilnoise(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "UV Factor", "Amount of noise to apply uv rotation");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "random", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_random", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_NOISE_USE_RANDOM);
RNA_def_property_ui_text(prop, "Random", "Use random values over time");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -1143,35 +1161,9 @@ static void rna_def_modifier_gpencilthick(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Thickness Factor", "Factor to multiply the thickness with");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_fading", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_THICK_FADING);
- RNA_def_property_ui_text(prop, "Fading", "Fading effect");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- /* Distance reference object */
- prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Object", "Object used as distance reference");
- RNA_def_property_pointer_funcs(prop, NULL, "rna_ThickGpencilModifier_object_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
-
- prop = RNA_def_property(srna, "fading_start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fading_start");
- RNA_def_property_ui_range(prop, 0, 1000.0, 1.0, 2);
- RNA_def_property_ui_text(prop, "Fading Start", "Start distance of fading effect");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- prop = RNA_def_property(srna, "fading_end", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fading_end");
- RNA_def_property_ui_range(prop, 0, 1000.0, 1.0, 2);
- RNA_def_property_ui_text(prop, "Fading End", "End distance of fading effect");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- prop = RNA_def_property(srna, "fading_end_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fading_end_factor");
- RNA_def_property_range(prop, 0.0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0, 10.0, 0.1, 3);
- RNA_def_property_ui_text(prop, "End Factor", "Fading end thickness factor");
+ prop = RNA_def_property(srna, "use_weight_factor", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_THICK_WEIGHT_FACTOR);
+ RNA_def_property_ui_text(prop, "Weighted", "Use weight to modulate effect");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_NONE);
@@ -1440,6 +1432,11 @@ static void rna_def_modifier_gpenciltint(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Strength", "Factor for tinting");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "use_weight_factor", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TINT_WEIGHT_FACTOR);
+ RNA_def_property_ui_text(prop, "Weighted", "Use weight to modulate effect");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 1e-6f, FLT_MAX);
@@ -1726,35 +1723,9 @@ static void rna_def_modifier_gpencilopacity(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Hardness", "Factor of stroke hardness");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_fading", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_OPACITY_FADING);
- RNA_def_property_ui_text(prop, "Fading", "Fading effect");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- /* Distance reference object */
- prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Object", "Object used as distance reference");
- RNA_def_property_pointer_funcs(prop, NULL, "rna_OpacityGpencilModifier_object_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
-
- prop = RNA_def_property(srna, "fading_start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fading_start");
- RNA_def_property_ui_range(prop, 0, 1000.0, 1.0, 2);
- RNA_def_property_ui_text(prop, "Fading Start", "Start distance of fading effect");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- prop = RNA_def_property(srna, "fading_end", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fading_end");
- RNA_def_property_ui_range(prop, 0, 1000.0, 1.0, 2);
- RNA_def_property_ui_text(prop, "Fading End", "End distance of fading effect");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- prop = RNA_def_property(srna, "fading_end_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fading_end_factor");
- RNA_def_property_range(prop, 0.0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0, 10.0, 0.1, 3);
- RNA_def_property_ui_text(prop, "End Factor", "Fading end thickness factor");
+ prop = RNA_def_property(srna, "use_weight_factor", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_OPACITY_WEIGHT_FACTOR);
+ RNA_def_property_ui_text(prop, "Weighted", "Use weight to modulate effect");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_NONE);
@@ -2733,6 +2704,170 @@ static void rna_def_modifier_gpenciltexture(BlenderRNA *brna)
RNA_define_lib_overridable(false);
}
+static void rna_def_modifier_gpencilweight(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static const EnumPropertyItem mode_items[] = {
+ {GP_WEIGHT_MODE_DISTANCE,
+ "DISTANCE",
+ 0,
+ "Distance",
+ "Calculate weights depending on the distance to the target object"},
+ {GP_WEIGHT_MODE_ANGLE,
+ "ANGLE",
+ 0,
+ "Angle",
+ "Calculate weights depending on the stroke orientation"},
+ {0, NULL, 0, NULL, NULL},
+ };
+ static const EnumPropertyItem axis_items[] = {
+ {0, "X", 0, "X", ""},
+ {1, "Y", 0, "Y", ""},
+ {2, "Z", 0, "Z", ""},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ static const EnumPropertyItem space_items[] = {
+ {GP_SPACE_LOCAL, "LOCAL", 0, "Local Space", ""},
+ {GP_SPACE_WORLD, "WORLD", 0, "World Space", ""},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ srna = RNA_def_struct(brna, "WeightGpencilModifier", "GpencilModifier");
+ RNA_def_struct_ui_text(srna, "Weight Modifier", "Calculate Vertex Weight dynamically");
+ RNA_def_struct_sdna(srna, "WeightGpencilModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
+
+ RNA_define_lib_overridable(true);
+
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "target_vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "target_vgname");
+ RNA_def_property_ui_text(prop, "Output", "Output Vertex group");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightGpencilModifier_target_vgname_set");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "use_blend", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_WEIGHT_BLEND_DATA);
+ RNA_def_property_ui_text(
+ prop, "Blend", "Blend results with existing weights in output weight group");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "use_invert_output", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_WEIGHT_INVERT_OUTPUT);
+ RNA_def_property_ui_text(prop, "Invert", "Invert weight values");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "angle");
+ RNA_def_property_ui_text(prop, "Angle", "Angle");
+ RNA_def_property_range(prop, 0.0f, DEG2RAD(180.0f));
+ RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "axis");
+ RNA_def_property_enum_items(prop, axis_items);
+ RNA_def_property_ui_text(prop, "Axis", "");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "space");
+ RNA_def_property_enum_items(prop, space_items);
+ RNA_def_property_ui_text(prop, "Space", "Coordinates space");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "layername");
+ RNA_def_property_ui_text(prop, "Layer", "Layer name");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop,
+ NULL,
+ "rna_WeightGpencilModifier_material_set",
+ NULL,
+ "rna_GpencilModifier_material_poll");
+ RNA_def_property_ui_text(prop, "Material", "Material used for filtering effect");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "vgname");
+ RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the deform");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightGpencilModifier_vgname_set");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ /* Distance reference object */
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Object", "Object used as distance reference");
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_WeightGpencilModifier_object_set", NULL, NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
+
+ prop = RNA_def_property(srna, "distance_start", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dist_start");
+ RNA_def_property_ui_range(prop, 0, 1000.0, 1.0, 2);
+ RNA_def_property_ui_text(prop, "Distance Start", "Start value for distance calculation");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "minimum_weight", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "min_weight");
+ RNA_def_property_ui_text(prop, "Minimum", "Minimum value for vertex weight");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "distance_end", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dist_end");
+ RNA_def_property_ui_range(prop, 0, 1000.0, 1.0, 2);
+ RNA_def_property_ui_text(prop, "Distance End", "End value for distance calculation");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "pass_index");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Pass index");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "invert_layers", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_WEIGHT_INVERT_LAYER);
+ RNA_def_property_ui_text(prop, "Inverse Layers", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "invert_materials", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_WEIGHT_INVERT_MATERIAL);
+ RNA_def_property_ui_text(prop, "Inverse Materials", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_WEIGHT_INVERT_PASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "invert_vertex", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_WEIGHT_INVERT_VGROUP);
+ RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "invert_layer_pass", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_WEIGHT_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ RNA_define_lib_overridable(false);
+}
+
static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2752,12 +2887,6 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_MOD_EDGESPLIT);
RNA_define_lib_overridable(true);
- prop = RNA_def_property(srna, "use_custom_camera", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_USE_CUSTOM_CAMERA);
- RNA_def_property_ui_text(
- prop, "Use Custom Camera", "Use custom camera instead of the active camera");
- RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
-
prop = RNA_def_property(srna, "use_fuzzy_intersections", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_INTERSECTION_AS_CONTOUR);
RNA_def_property_ui_text(prop,
@@ -2806,28 +2935,20 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "angle_splitting_threshold");
RNA_def_property_ui_text(
prop, "Angle Splitting", "Angle in screen space below which a stroke is split in two");
- /* Don't allow value very close to PI, or we get a lot of small segments.*/
+ /* Don't allow value very close to PI, or we get a lot of small segments. */
RNA_def_property_ui_range(prop, 0.0f, DEG2RAD(179.5f), 0.01f, 1);
RNA_def_property_range(prop, 0.0f, DEG2RAD(180.0f));
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "smooth_tolerance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "chain_smooth_tolerance");
- RNA_def_property_ui_text(
- prop, "Smooth Tolerance", "Strength of smoothing applied on jagged chains");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.05f, 4);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
-
prop = RNA_def_property(srna, "use_remove_doubles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_REMOVE_DOUBLES);
RNA_def_property_ui_text(
prop, "Remove Doubles", "Remove doubles from the source geometry before generating stokes");
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "floating_as_contour", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_FLOATING_AS_CONTOUR);
- RNA_def_property_ui_text(prop, "Floating As Contour", "Floating edges will have contour type");
+ prop = RNA_def_property(srna, "use_loose_as_contour", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_LOOSE_AS_CONTOUR);
+ RNA_def_property_ui_text(prop, "Loose As Contour", "Loose edges will have contour type");
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "invert_source_vertex_group", PROP_BOOLEAN, PROP_NONE);
@@ -2843,7 +2964,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_face_mark", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_FILTER_FACE_MARK);
RNA_def_property_ui_text(
- prop, "Filter Face Mark", "Filter feature lines using freestyle face mark");
+ prop, "Filter Face Marks", "Filter feature lines using freestyle face marks");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "use_face_mark_invert", PROP_BOOLEAN, PROP_NONE);
@@ -2854,7 +2975,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_face_mark_boundaries", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_FILTER_FACE_MARK_BOUNDARIES);
RNA_def_property_ui_text(
- prop, "Boundaries", "Filtering feature lines on face mark boundaries as well");
+ prop, "Boundaries", "Filter feature lines based on face mark boundaries");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "chaining_image_threshold", PROP_FLOAT, PROP_DISTANCE);
@@ -2866,56 +2987,25 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 0.3f);
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "chain_floating_edges", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_CHAIN_FLOATING_EDGES);
- RNA_def_property_ui_text(
- prop, "Chain Floating Edges", "Allow floating edges to be chained together");
+ prop = RNA_def_property(srna, "use_loose_edge_chain", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_CHAIN_LOOSE_EDGES);
+ RNA_def_property_ui_text(prop, "Chain Loose Edges", "Allow loose edges to be chained together");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "chain_geometry_space", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_geometry_space_chain", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_CHAIN_GEOMETRY_SPACE);
RNA_def_property_ui_text(
prop, "Use Geometry Space", "Use geometry distance for chaining instead of image space");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_multiple_edge_types", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_ALLOW_MULTIPLE_EDGE_TYPES);
- RNA_def_property_ui_text(
- prop, "Multiple Edge Types", "Allow edges with muliple types be added for every type");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- prop = RNA_def_property(srna, "offset_towards_custom_camera", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_GPENCIL_OFFSET_TOWARDS_CUSTOM_CAMERA);
+ prop = RNA_def_property(srna, "use_overlap_edge_type_support", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_ALLOW_OVERLAP_EDGE_TYPES);
RNA_def_property_ui_text(prop,
- "Offset Towards Custom Camera",
- "Offset strokes towards selected camera instead of the active camera");
+ "Overlapping Edge Types",
+ "Allow an edge to have multiple overlapping types. This will create a "
+ "separate stroke for each overlapping type");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "stroke_offset", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_ui_text(prop,
- "Stroke Offset",
- "Move strokes slightly towards the camera to avoid clipping while "
- "preserve depth for the viewport");
- RNA_def_property_ui_range(prop, 0.0f, 0.5f, 0.001f, 4);
- RNA_def_property_range(prop, 0.0f, 0.5f);
- RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
-
- prop = RNA_def_property(srna, "source_camera", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
- RNA_def_property_ui_text(
- prop, "Camera Object", "Use specified camera object for generating line art");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
-
- prop = RNA_def_property(srna, "light_contour_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
- RNA_def_property_ui_text(
- prop, "Light Object", "Use this light object to generate light contour");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
-
prop = RNA_def_property(srna, "source_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, modifier_lineart_source_type);
RNA_def_property_ui_text(prop, "Source Type", "Line art stroke source type");
@@ -2941,9 +3031,9 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Contour", "Generate strokes from contours lines");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_floating", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "edge_types", LRT_EDGE_FLAG_FLOATING);
- RNA_def_property_ui_text(prop, "Use Floating", "Generate strokes from floating edges");
+ prop = RNA_def_property(srna, "use_loose", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", LRT_EDGE_FLAG_LOOSE);
+ RNA_def_property_ui_text(prop, "Use Loose", "Generate strokes from loose edges");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "use_crease", PROP_BOOLEAN, PROP_NONE);
@@ -2967,13 +3057,6 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Intersection", "Generate strokes from intersections");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_light_contour", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "edge_types", LRT_EDGE_FLAG_LIGHT_CONTOUR);
- RNA_def_property_ui_text(prop,
- "Use Light Contour",
- "Generate light/shadow separation lines from a reference light object");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
prop = RNA_def_property(srna, "use_multiple_levels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_multiple_levels", 0);
RNA_def_property_ui_text(
@@ -3047,28 +3130,22 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_TRANSPARENCY_ENABLE);
+ prop = RNA_def_property(srna, "use_material_mask", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_MATERIAL_MASK_ENABLE);
RNA_def_property_ui_text(
- prop, "Use Transparency", "Use transparency mask from this material in line art");
+ prop, "Use Material Mask", "Use material masks to filter out occluded strokes");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_transparency_match", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_TRANSPARENCY_MATCH);
+ prop = RNA_def_property(srna, "use_material_mask_match", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_MATERIAL_MASK_MATCH);
RNA_def_property_ui_text(
- prop, "Match Transparency", "Require matching all transparency masks instead of just one");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-
- prop = RNA_def_property(srna, "use_transparency_mask", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "transparency_mask", 1);
- RNA_def_property_array(prop, 6);
- RNA_def_property_ui_text(prop, "Masks", "");
+ prop, "Match Masks", "Require matching all material masks instead of just one");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "use_intersection_filter", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mask_switches", LRT_GPENCIL_INTERSECTION_FILTER);
- RNA_def_property_ui_text(
- prop, "Flter Intersection", "Filter intersection lines using mask bits");
+ prop = RNA_def_property(srna, "use_material_mask_bits", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "material_mask_bits", 1);
+ RNA_def_property_array(prop, 8);
+ RNA_def_property_ui_text(prop, "Masks", "Mask bits to match from Material Line Art settings");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "use_intersection_match", PROP_BOOLEAN, PROP_NONE);
@@ -3080,7 +3157,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_intersection_mask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "intersection_mask", 1);
RNA_def_property_array(prop, 8);
- RNA_def_property_ui_text(prop, "Masks", "");
+ RNA_def_property_ui_text(prop, "Masks", "Mask bits to match from Collection Line Art settings");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
RNA_define_lib_overridable(false);
@@ -3244,6 +3321,7 @@ void RNA_def_greasepencil_modifier(BlenderRNA *brna)
rna_def_modifier_gpencilarmature(brna);
rna_def_modifier_gpencilmultiply(brna);
rna_def_modifier_gpenciltexture(brna);
+ rna_def_modifier_gpencilweight(brna);
rna_def_modifier_gpencillineart(brna);
rna_def_modifier_gpencillength(brna);
}
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 245730919b0..0bb452dfb07 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -320,7 +320,7 @@ struct PropertyRNA {
PropArrayLengthGetFunc getlength;
/* dimension of array */
unsigned int arraydimension;
- /* array lengths lengths for all dimensions (when arraydimension > 0) */
+ /* Array lengths for all dimensions (when `arraydimension > 0`). */
unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION];
unsigned int totarraylength;
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index 7fce9b1f908..b4253ab9236 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -604,7 +604,7 @@ void RNA_def_view_layer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Dependency Graph", "Dependencies in the scene data");
RNA_def_property_pointer_funcs(prop, "rna_ViewLayer_depsgraph_get", NULL, NULL, NULL);
- /* Nested Data */
+ /* Nested Data. */
/* *** Non-Animated *** */
RNA_define_animate_sdna(false);
rna_def_layer_collection(brna);
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index db3e5195c79..24bc5504a58 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -396,7 +396,7 @@ static void rna_MaskSplinePoint_handle_right_type_set(PointerRNA *ptr, int value
BKE_mask_calc_handle_point(spline, point);
}
-/* ** API ** */
+/* ** API ** */
static MaskLayer *rna_Mask_layers_new(Mask *mask, const char *name)
{
@@ -1008,7 +1008,7 @@ static void rna_def_mask_layer(BlenderRNA *brna)
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1);
RNA_def_property_update(prop, NC_MASK | NA_EDITED, NULL);
- /* select (for dopesheet)*/
+ /* Select (for dope-sheet). */
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MASK_LAYERFLAG_SELECT);
RNA_def_property_ui_text(prop, "Select", "Layer is selected for editing in the Dope Sheet");
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index c0a9b7ba9d8..b662f54ed4c 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -688,21 +688,21 @@ static void rna_def_material_lineart(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "MaterialLineArt");
RNA_def_struct_ui_text(srna, "Material Line Art", "");
- prop = RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_material_mask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_default(prop, 0);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_MATERIAL_TRANSPARENCY_ENABLED);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_MATERIAL_MASK_ENABLED);
RNA_def_property_ui_text(
- prop, "Use Transparency", "Use transparency mask from this material in line art");
+ prop, "Use Material Mask", "Use material masks to filter out occluded strokes");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update");
- prop = RNA_def_property(srna, "use_transparency_mask", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_material_mask_bits", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_default(prop, 0);
- RNA_def_property_boolean_sdna(prop, NULL, "transparency_mask", 1);
- RNA_def_property_array(prop, 6);
+ RNA_def_property_boolean_sdna(prop, NULL, "material_mask_bits", 1);
+ RNA_def_property_array(prop, 8);
RNA_def_property_ui_text(prop, "Mask", "");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update");
- prop = RNA_def_property(srna, "use_occlusion_effectiveness", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mat_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_default(prop, 0);
RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_MATERIAL_CUSTOM_OCCLUSION_EFFECTIVENESS);
RNA_def_property_ui_text(prop,
@@ -710,9 +710,9 @@ static void rna_def_material_lineart(BlenderRNA *brna)
"Use custom occlusion effectiveness for this material");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialLineArt_update");
- prop = RNA_def_property(srna, "occlusion_effectiveness", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mat_occlusion", PROP_INT, PROP_NONE);
RNA_def_property_int_default(prop, 1);
- RNA_def_property_range(prop, 0.0f, 3.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 5.0f, 1.0f, 1);
RNA_def_property_ui_text(
prop,
"Effectiveness",
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 50a5a196a98..81cf1447604 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -16,7 +16,7 @@
/* note: the original vertex color stuff is now just used for
* getting info on the layers themselves, accessing the data is
- * done through the (not yet written) mpoly interfaces.*/
+ * done through the (not yet written) mpoly interfaces. */
/** \file
* \ingroup RNA
@@ -239,6 +239,19 @@ static void rna_Mesh_update_data_legacy_deg_tag_all(Main *UNUSED(bmain),
WM_main_add_notifier(NC_GEOM | ND_DATA, id);
}
+static void rna_Mesh_update_geom_and_params(Main *UNUSED(bmain),
+ Scene *UNUSED(scene),
+ PointerRNA *ptr)
+{
+ ID *id = ptr->owner_id;
+ if (id->us <= 0) { /* See note in section heading. */
+ return;
+ }
+
+ DEG_id_tag_update(id, ID_RECALC_GEOMETRY | ID_RECALC_PARAMETERS);
+ WM_main_add_notifier(NC_GEOM | ND_DATA, id);
+}
+
static void rna_Mesh_update_data_edit_weight(Main *bmain, Scene *scene, PointerRNA *ptr)
{
BKE_mesh_batch_cache_dirty_tag(rna_mesh(ptr), BKE_MESH_BATCH_DIRTY_ALL);
@@ -2450,7 +2463,7 @@ static void rna_def_mesh_loops(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- /*PropertyRNA *prop;*/
+ // PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
@@ -3260,11 +3273,6 @@ static void rna_def_mesh(BlenderRNA *brna)
"generating triangles. A value greater than 0 disables Fix Poles");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
- prop = RNA_def_property(srna, "use_remesh_smooth_normals", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_SMOOTH_NORMALS);
- RNA_def_property_ui_text(prop, "Smooth Normals", "Smooth the normals of the remesher result");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
-
prop = RNA_def_property(srna, "use_remesh_fix_poles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_FIX_POLES);
RNA_def_property_ui_text(prop, "Fix Poles", "Produces less poles and a better topology flow");
@@ -3338,7 +3346,7 @@ static void rna_def_mesh(BlenderRNA *brna)
"Auto Smooth",
"Auto smooth (based on smooth/sharp faces/edges and angle between faces), "
"or use custom split normals data if available");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_geom_and_params");
prop = RNA_def_property(srna, "auto_smooth_angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "smoothresh");
@@ -3347,7 +3355,7 @@ static void rna_def_mesh(BlenderRNA *brna)
"Auto Smooth Angle",
"Maximum angle between face normals that will be considered as smooth "
"(unused if custom split normals data are available)");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_geom_and_params");
RNA_define_verify_sdna(false);
prop = RNA_def_property(srna, "has_custom_normals", PROP_BOOLEAN, PROP_NONE);
@@ -3378,7 +3386,7 @@ static void rna_def_mesh(BlenderRNA *brna)
prop,
"Auto Texture Space",
"Adjust active object's texture space automatically when transforming object");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_geom_and_params");
# if 0
prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 2b0582cae9a..8128bdb83a0 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -208,7 +208,7 @@ static void rna_Mesh_clear_geometry(Mesh *mesh)
{
BKE_mesh_clear_geometry(mesh);
- DEG_id_tag_update(&mesh->id, ID_RECALC_GEOMETRY);
+ DEG_id_tag_update(&mesh->id, ID_RECALC_GEOMETRY_ALL_MODES);
WM_main_add_notifier(NC_GEOM | ND_DATA, mesh);
}
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 674e5845ccb..9a895a0c75a 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -544,7 +544,7 @@ const EnumPropertyItem rna_enum_dt_mix_mode_items[] = {
0,
"Multiply",
"Multiply source value to destination one, using given threshold as factor"},
- /* etc. etc. */
+ /* Etc. */
{0, NULL, 0, NULL, NULL},
};
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index c26e9e883d6..c927c7df6bd 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -374,7 +374,7 @@ const EnumPropertyItem rna_enum_node_clamp_items[] = {
static const EnumPropertyItem rna_enum_node_tex_dimensions_items[] = {
{1, "1D", 0, "1D", "Use the scalar value W as input"},
{2, "2D", 0, "2D", "Use the 2D vector (x, y) as input. The z component is ignored"},
- {3, "3D", 0, "3D", "Use the 3D vector Vector as input"},
+ {3, "3D", 0, "3D", "Use the 3D vector (x, y, z) as input"},
{4, "4D", 0, "4D", "Use the 4D vector (x, y, z, w) as input"},
{0, NULL, 0, NULL, NULL},
};
@@ -8967,6 +8967,33 @@ static void def_geo_boolean(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
+static void def_geo_curve_primitive_bezier_segment(StructRNA *srna)
+{
+ static const EnumPropertyItem mode_items[] = {
+
+ {GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT_POSITION,
+ "POSITION",
+ ICON_NONE,
+ "Position",
+ "The start and end handles are fixed positions"},
+ {GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT_OFFSET,
+ "OFFSET",
+ ICON_NONE,
+ "Offset",
+ "The start and end handles are offsets from the spline's control points"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeGeometryCurvePrimitiveBezierSegment", "storage");
+
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "Method used to determine control handles");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
+}
+
static void def_geo_triangulate(StructRNA *srna)
{
PropertyRNA *prop;
@@ -9398,6 +9425,32 @@ static void def_geo_attribute_vector_rotate(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
+static void def_geo_curve_primitive_circle(StructRNA *srna)
+{
+ static const EnumPropertyItem mode_items[] = {
+ {GEO_NODE_CURVE_PRIMITIVE_CIRCLE_TYPE_POINTS,
+ "POINTS",
+ ICON_NONE,
+ "Points",
+ "Define the radius and location with three points"},
+ {GEO_NODE_CURVE_PRIMITIVE_CIRCLE_TYPE_RADIUS,
+ "RADIUS",
+ ICON_NONE,
+ "Radius",
+ "Define the radius with a float"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeGeometryCurvePrimitiveCircle", "storage");
+
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "Method used to determine radius and placement");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
+}
+
static void def_geo_point_rotate(StructRNA *srna)
{
static const EnumPropertyItem type_items[] = {
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 3d3faf0c56f..a208e520d02 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1882,7 +1882,7 @@ bool rna_Object_greasepencil_modifiers_override_apply(Main *bmain,
GpencilModifierData *mod_dst = ED_object_gpencil_modifier_add(
NULL, bmain, NULL, ob_dst, mod_src->name, mod_src->type);
- BLI_remlink(&ob_dst->modifiers, mod_dst);
+ BLI_remlink(&ob_dst->greasepencil_modifiers, mod_dst);
/* This handles NULL anchor as expected by adding at head of list. */
BLI_insertlinkafter(&ob_dst->greasepencil_modifiers, mod_anchor, mod_dst);
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index d08504dd6fe..10ba2b9acb1 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -303,6 +303,9 @@ static void rna_Object_mat_convert_space(Object *ob,
{
copy_m4_m4((float(*)[4])mat_ret, (float(*)[4])mat);
+ BLI_assert(!ELEM(from, CONSTRAINT_SPACE_OWNLOCAL));
+ BLI_assert(!ELEM(to, CONSTRAINT_SPACE_OWNLOCAL));
+
/* Error in case of invalid from/to values when pchan is NULL */
if (pchan == NULL) {
if (ELEM(from, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_PARLOCAL)) {
@@ -362,7 +365,7 @@ static void rna_Object_calc_matrix_camera(Object *ob,
BKE_camera_params_init(&params);
BKE_camera_params_from_object(&params, ob_eval);
- /* compute matrix, viewplane, .. */
+ /* Compute matrix, view-plane, etc. */
BKE_camera_params_compute_viewplane(&params, width, height, scalex, scaley);
BKE_camera_params_compute_matrix(&params);
@@ -508,7 +511,7 @@ static void rna_Mesh_assign_verts_to_group(
create_dverts(&me->id);
}
- /* loop list adding verts to group */
+ /* Loop list adding verts to group. */
for (i = 0; i < totindex; i++) {
if (i < 0 || i >= me->totvert) {
BKE_report(reports, RPT_ERROR, "Bad vertex index in list");
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index eb7da0d0ce2..30baf01e952 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -287,7 +287,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
pid2 = pid;
}
else if (cache->name[0] != '\0' && STREQ(cache->name, pid->cache->name)) {
- /*TODO: report "name exists" to user */
+ /* TODO: report "name exists" to user. */
BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name));
use_new_name = false;
}
@@ -2047,10 +2047,10 @@ static void rna_def_softbody(BlenderRNA *brna)
prop, "Estimate Transforms", "Store the estimated transforms in the soft body settings");
/***********************************************************************************/
- /* these are not exactly settings, but reading calculated results*/
- /* but i did not want to start a new property struct */
- /* so rather rename this from SoftBodySettings to SoftBody */
- /* translation */
+ /* These are not exactly settings, but reading calculated results
+ * but i did not want to start a new property struct
+ * so rather rename this from SoftBodySettings to SoftBody
+ * translation. */
prop = RNA_def_property(srna, "location_mass_center", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "lcom");
RNA_def_property_ui_text(prop, "Center of Mass", "Location of center of mass");
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 7ff2a82a465..9ab685fa462 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -970,9 +970,11 @@ static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
settings->end = value;
}
- /*if (settings->type==PART_REACTOR && value < 1.0) */
- /* value = 1.0; */
- /*else */
+# if 0
+ if (settings->type==PART_REACTOR && value < 1.0)
+ value = 1.0;
+ else
+# endif
if (value < MINAFRAMEF) {
value = MINAFRAMEF;
}
@@ -1359,9 +1361,11 @@ static const EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C),
PropertyRNA *UNUSED(prop),
bool *UNUSED(r_free))
{
- /*if (part->type==PART_REACTOR) */
- /* return part_reactor_from_items; */
- /*else */
+# if 0
+ if (part->type == PART_REACTOR) {
+ return part_reactor_from_items;
+ }
+# endif
return part_from_items;
}
@@ -1760,17 +1764,17 @@ static void rna_def_particle_key(BlenderRNA *brna)
static void rna_def_child_particle(BlenderRNA *brna)
{
StructRNA *srna;
- /*PropertyRNA *prop; */
+ // PropertyRNA *prop;
srna = RNA_def_struct(brna, "ChildParticle", NULL);
RNA_def_struct_ui_text(
srna, "Child Particle", "Child particle interpolated from simulated or edited particles");
- /* int num, parent; */ /* num is face index on the final derived mesh */
+ /* int num, parent; */ /* num is face index on the final derived mesh */
- /* int pa[4]; */ /* nearest particles to the child, used for the interpolation */
- /* float w[4]; */ /* interpolation weights for the above particles */
- /* float fuv[4], foffset; */ /* face vertex weights and offset */
+ /* int pa[4]; */ /* nearest particles to the child, used for the interpolation */
+ /* float w[4]; */ /* interpolation weights for the above particles */
+ /* float fuv[4], foffset; */ /* face vertex weights and offset */
/* float rand[3]; */
}
@@ -1840,8 +1844,8 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ParticleKey");
RNA_def_property_ui_text(prop, "Keyed States", "");
/* */
- /* float fuv[4], foffset; */ /* coordinates on face/edge number "num" and depth along*/
- /* */ /* face normal for volume emission */
+ /* float fuv[4], foffset; */ /* Coordinates on face/edge number "num" and depth along. */
+ /* Face normal for volume emission. */
prop = RNA_def_property(srna, "birth_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
@@ -2426,7 +2430,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- /*TODO: names, tooltips */
+ /* TODO: names, tool-tips. */
static const EnumPropertyItem integrator_type_items[] = {
{PART_INT_EULER, "EULER", 0, "Euler", ""},
{PART_INT_VERLET, "VERLET", 0, "Verlet", ""},
@@ -2659,7 +2663,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "React On", "The event of target particles to react on");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- /*draw flag*/
+ /* Draw flag. */
prop = RNA_def_property(srna, "show_guide_hairs", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GUIDE_HAIRS);
RNA_def_property_ui_text(prop, "Guide Hairs", "Show guide hairs");
@@ -2806,9 +2810,9 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Random Bending Stiffness", "Random stiffness of hairs");
RNA_def_property_update(prop, 0, "rna_Particle_cloth_update");
- /*TODO: not found in UI, readonly? */
+ /* TODO: not found in UI, read-only? */
prop = RNA_def_property(srna, "keys_step", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 0, SHRT_MAX); /*TODO:min,max */
+ RNA_def_property_range(prop, 0, SHRT_MAX); /* TODO: min,max. */
RNA_def_property_ui_text(prop, "Keys Step", "");
/* adaptive path rendering */
@@ -2870,7 +2874,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* general values */
prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
- RNA_def_property_float_sdna(prop, NULL, "sta"); /*optional if prop names are the same */
+ RNA_def_property_float_sdna(prop, NULL, "sta"); /* Optional if prop names are the same. */
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL);
@@ -2959,7 +2963,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop = RNA_def_property(
- srna, "userjit", PROP_INT, PROP_UNSIGNED); /*TODO: can we get a better name for userjit? */
+ srna, "userjit", PROP_INT, PROP_UNSIGNED); /* TODO: can we get a better name for userjit? */
RNA_def_property_int_sdna(prop, NULL, "userjit");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 1000);
@@ -2992,7 +2996,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* initial velocity factors */
prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_VELOCITY);
- RNA_def_property_float_sdna(prop, NULL, "normfac"); /*optional if prop names are the same */
+ RNA_def_property_float_sdna(prop, NULL, "normfac"); /* Optional if prop names are the same. */
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
RNA_def_property_ui_text(
@@ -3008,7 +3012,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop = RNA_def_property(srna, "factor_random", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "randfac"); /*optional if prop names are the same */
+ RNA_def_property_float_sdna(prop, NULL, "randfac"); /* Optional if prop names are the same. */
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
RNA_def_property_ui_text(prop, "Random", "Give the starting velocity a random variation");
@@ -3149,7 +3153,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* children */
prop = RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "child_nbr"); /*optional if prop names are the same */
+ RNA_def_property_int_sdna(prop, NULL, "child_nbr"); /* Optional if prop names are the same. */
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_range(prop, 0, 1000, 1, -1);
RNA_def_property_ui_text(prop, "Children Per Parent", "Number of children per parent");
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index f736885df77..bb4939a010b 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -932,7 +932,7 @@ static void rna_def_bone_group(BlenderRNA *brna)
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_BoneGroup_name_set");
RNA_def_struct_name_property(srna, prop);
- /* TODO: add some runtime-collections stuff to access grouped bones */
+ /* TODO: add some runtime-collections stuff to access grouped bones. */
/* color set */
rna_def_actionbone_group_common(srna, NC_OBJECT | ND_POSE, "rna_Pose_update");
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 6715941ae2a..4fe61df9387 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -858,6 +858,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
prop = RNA_def_property(srna, "bl_use_image_save", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "type->flag", RE_USE_NO_IMAGE_SAVE);
+ RNA_def_property_boolean_default(prop, true);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
RNA_def_property_ui_text(
prop,
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 9e7d0f99dfa..899c3397361 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -36,7 +36,7 @@
/** \name Generic Enum's
* \{ */
-/* Reuse for dynamic types */
+/* Reuse for dynamic types. */
const EnumPropertyItem DummyRNA_NULL_items[] = {
{0, NULL, 0, NULL, NULL},
};
@@ -951,7 +951,7 @@ static int rna_enum_check_separator(CollectionPropertyIterator *UNUSED(iter), vo
static void rna_EnumProperty_items_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
PropertyRNA *prop = (PropertyRNA *)ptr->data;
- /* EnumPropertyRNA *eprop; */ /* UNUSED */
+ /* EnumPropertyRNA *eprop; */ /* UNUSED */
const EnumPropertyItem *item = NULL;
int totitem;
bool free;
@@ -2966,7 +2966,7 @@ static void rna_def_function(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Description", "Description of the Function's purpose");
prop = RNA_def_property(srna, "parameters", PROP_COLLECTION, PROP_NONE);
- /*RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/
+ // RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Property");
RNA_def_property_collection_funcs(prop,
"rna_Function_parameters_begin",
@@ -3270,7 +3270,7 @@ void RNA_def_rna(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- /* Struct*/
+ /* Struct */
rna_def_struct(brna);
/* Property */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 7f23d9bc754..0ce4271c3c2 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3111,6 +3111,12 @@ static void rna_def_tool_settings(BlenderRNA *brna)
"Absolute grid alignment while translating (based on the pivot center)");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
+ prop = RNA_def_property(srna, "use_snap_sequencer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_SEQ);
+ RNA_def_property_ui_text(prop, "Use Snapping", "Snap to strip edges or current frame");
+ RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
+ RNA_def_property_boolean_default(prop, true);
+
prop = RNA_def_property(srna, "snap_elements", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "snap_mode");
RNA_def_property_enum_items(prop, rna_enum_snap_element_items);
@@ -3351,7 +3357,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
/* Annotations - 3D View Stroke Placement */
- /* XXX: Do we need to decouple the stroke_endpoints setting too? */
+ /* XXX: Do we need to decouple the stroke_endpoints setting too? */
prop = RNA_def_property(srna, "annotation_stroke_placement_view3d", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "annotate_v3d_align");
RNA_def_property_enum_items(prop, annotation_stroke_placement_items);
@@ -3505,9 +3511,35 @@ static void rna_def_sequencer_tool_settings(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_SequencerToolSettings_path");
RNA_def_struct_ui_text(srna, "Sequencer Tool Settings", "");
+ /* Add strip settings. */
prop = RNA_def_property(srna, "fit_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, scale_fit_methods);
RNA_def_property_ui_text(prop, "Fit Method", "Scale fit method");
+
+ /* Transform snapping. */
+ prop = RNA_def_property(srna, "snap_to_current_frame", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_mode", SEQ_SNAP_TO_CURRENT_FRAME);
+ RNA_def_property_ui_text(prop, "Current Frame", "Snap to current frame");
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
+
+ prop = RNA_def_property(srna, "snap_to_hold_offset", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_mode", SEQ_SNAP_TO_STRIP_HOLD);
+ RNA_def_property_ui_text(prop, "Hold Offset", "Snap to strip hold offsets");
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
+
+ prop = RNA_def_property(srna, "snap_ignore_muted", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SEQ_SNAP_IGNORE_MUTED);
+ RNA_def_property_ui_text(prop, "Ignore Muted Strips", "Don't snap to hidden strips");
+
+ prop = RNA_def_property(srna, "snap_ignore_sound", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SEQ_SNAP_IGNORE_SOUND);
+ RNA_def_property_ui_text(prop, "Ignore Sound Strips", "Don't snap to sound strips");
+
+ prop = RNA_def_property(srna, "snap_distance", PROP_INT, PROP_PIXEL);
+ RNA_def_property_int_sdna(prop, NULL, "snap_distance");
+ RNA_def_property_int_default(prop, 15);
+ RNA_def_property_ui_range(prop, 0, 50, 1, 1);
+ RNA_def_property_ui_text(prop, "Snapping Distance", "Maximum distance for snapping in pixels");
}
static void rna_def_unified_paint_settings(BlenderRNA *brna)
@@ -4204,6 +4236,17 @@ void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool sce
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
+ prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_MOTION_BLUR);
+ RNA_def_property_ui_text(
+ prop, "Motion Blur", "Render motion blur in this Layer, if enabled in the scene");
+ if (scene) {
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+ }
+ else {
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ }
+
/* passes */
prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
@@ -5762,7 +5805,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output for video streams");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- /* FFMPEG Audio*/
+ /* FFMPEG Audio. */
prop = RNA_def_property(srna, "audio_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio_codec");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -6624,7 +6667,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "BakeSettings");
RNA_def_property_ui_text(prop, "Bake Data", "");
- /* Nestled Data */
+ /* Nestled Data. */
/* *** Non-Animated *** */
RNA_define_animate_sdna(false);
rna_def_bake_data(brna);
@@ -7940,7 +7983,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "SceneGpencil");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil settings for the scene");
- /* Nestled Data */
+ /* Nestled Data. */
/* *** Non-Animated *** */
RNA_define_animate_sdna(false);
rna_def_tool_settings(brna);
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 25f29a3efe0..90029bd14a1 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -234,7 +234,7 @@ static int rna_Area_ui_type_get(PointerRNA *ptr)
* the area type is changing.
* So manually do the lookup in those cases, but do not actually change area->type
* since that prevents a proper exit when the area type is changing.
- * Logic copied from `ED_area_init()`.*/
+ * Logic copied from `ED_area_init()`. */
SpaceType *type = area->type;
if (type == NULL || area_changing) {
type = BKE_spacetype_from_id(area_type);
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index c5a53d4522d..9dc64fc950c 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -60,7 +60,7 @@ static void rna_def_sound(BlenderRNA *brna)
srna, "Sound", "Sound data-block referencing an external or packed sound file");
RNA_def_struct_ui_icon(srna, ICON_SOUND);
- /*rna_def_ipo_common(srna); */
+ // rna_def_ipo_common(srna);
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "filepath");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index f3871e625de..c8a779f890d 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -776,6 +776,20 @@ static void rna_Space_show_region_toolbar_update(bContext *C, PointerRNA *ptr)
rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN);
}
+/* Channels Region. */
+static bool rna_Space_show_region_channels_get(PointerRNA *ptr)
+{
+ return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN);
+}
+static void rna_Space_show_region_channels_set(PointerRNA *ptr, bool value)
+{
+ rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN, !value);
+}
+static void rna_Space_show_region_channels_update(bContext *C, PointerRNA *ptr)
+{
+ rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN);
+}
+
/* UI Region */
static bool rna_Space_show_region_ui_get(PointerRNA *ptr)
{
@@ -924,7 +938,7 @@ static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
void *regiondata = NULL;
if (area) {
ListBase *regionbase = (area->spacedata.first == v3d) ? &area->regionbase : &v3d->regionbase;
- ARegion *region = regionbase->last; /* always last in list, weak .. */
+ ARegion *region = regionbase->last; /* always last in list, weak. */
regiondata = region->regiondata;
}
@@ -2966,7 +2980,7 @@ static void rna_FileBrowser_FSMenu_active_range(PointerRNA *UNUSED(ptr),
static void rna_FileBrowser_FSMenu_active_update(struct bContext *C, PointerRNA *ptr)
{
ScrArea *area = rna_area_from_space(ptr);
- ED_file_change_dir_ex(C, (bScreen *)ptr->owner_id, area);
+ ED_file_change_dir_ex(C, area);
}
static int rna_FileBrowser_FSMenuSystem_active_get(PointerRNA *ptr)
@@ -3214,6 +3228,10 @@ static void rna_def_space_generic_show_region_toggles(StructRNA *srna, int regio
region_type_mask &= ~(1 << RGN_TYPE_TOOLS);
DEF_SHOW_REGION_PROPERTY(show_region_toolbar, "Toolbar", "");
}
+ if (region_type_mask & (1 << RGN_TYPE_CHANNELS)) {
+ region_type_mask &= ~(1 << RGN_TYPE_CHANNELS);
+ DEF_SHOW_REGION_PROPERTY(show_region_channels, "Channels", "");
+ }
if (region_type_mask & (1 << RGN_TYPE_UI)) {
region_type_mask &= ~(1 << RGN_TYPE_UI);
DEF_SHOW_REGION_PROPERTY(show_region_ui, "Sidebar", "");
@@ -3606,6 +3624,11 @@ static void rna_def_space_outliner(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Collections", "Show collections");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
+ prop = RNA_def_property(srna, "use_filter_view_layers", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_VIEW_LAYERS);
+ RNA_def_property_ui_text(prop, "Show All View Layers", "Show all the view layers");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
+
/* Filters object state. */
prop = RNA_def_property(srna, "filter_state", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filter_state");
@@ -7560,6 +7583,9 @@ static void rna_def_space_spreadsheet_context(BlenderRNA *brna)
RNA_def_property_enum_items(prop, spreadsheet_context_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of the context");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ rna_def_space_generic_show_region_toggles(srna,
+ (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER));
}
static void rna_def_space_spreadsheet_context_object(BlenderRNA *brna)
@@ -7674,7 +7700,8 @@ static void rna_def_space_spreadsheet(BlenderRNA *brna)
srna = RNA_def_struct(brna, "SpaceSpreadsheet", "Space");
RNA_def_struct_ui_text(srna, "Space Spreadsheet", "Spreadsheet space data");
- rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_FOOTER));
+ rna_def_space_generic_show_region_toggles(
+ srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER));
prop = RNA_def_property(srna, "is_pinned", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_FLAG_PINNED);
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index d8a8d64e639..128f1cb1e21 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -1659,7 +1659,7 @@ static void rna_def_texture(BlenderRNA *brna)
rna_def_texture_musgrave(brna);
rna_def_texture_voronoi(brna);
rna_def_texture_distorted_noise(brna);
- /* XXX add more types here .. */
+ /* XXX add more types here. */
RNA_api_texture(srna);
}
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 13b561f9dd6..42b3e4420c1 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -42,7 +42,7 @@ static void texture_evaluate(struct Tex *tex, float value[3], float r_color[4])
{
TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
- /* TODO(sergey): always use color management now. */
+ /* TODO(sergey): always use color management now. */
multitex_ext(tex, value, NULL, NULL, 1, &texres, 0, NULL, true, false);
r_color[0] = texres.tr;
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 8f596ec6a5c..acf580e3ddf 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -1231,7 +1231,7 @@ static void rna_def_ui_layout(BlenderRNA *brna)
{UI_EMBOSS_PULLDOWN, "PULLDOWN_MENU", 0, "Pulldown Menu", "Draw pulldown menu style"},
{UI_EMBOSS_RADIAL, "RADIAL_MENU", 0, "Radial Menu", "Draw radial menu style"},
{UI_EMBOSS_NONE_OR_STATUS,
- "UI_EMBOSS_NONE_OR_STATUS",
+ "NONE_OR_STATUS",
0,
"None or Status",
"Draw with no emboss unless the button has a coloring status like an animation state"},
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index dc973a9c75c..aa235b599b7 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -384,26 +384,28 @@ static void rna_uiItemsEnumO(uiLayout *layout,
uiItemsFullEnumO(layout, opname, propname, NULL, uiLayoutGetOperatorContext(layout), flag);
}
-static void rna_uiItemMenuEnumO(uiLayout *layout,
- bContext *C,
- const char *opname,
- const char *propname,
- const char *name,
- const char *text_ctxt,
- bool translate,
- int icon)
+static PointerRNA rna_uiItemMenuEnumO(uiLayout *layout,
+ bContext *C,
+ const char *opname,
+ const char *propname,
+ const char *name,
+ const char *text_ctxt,
+ bool translate,
+ int icon)
{
wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
if (!ot || !ot->srna) {
RNA_warning("%s '%s'", ot ? "unknown operator" : "operator missing srna", opname);
- return;
+ return PointerRNA_NULL;
}
/* Get translated name (label). */
name = rna_translate_ui_text(name, text_ctxt, ot->srna, NULL, translate);
- uiItemMenuEnumO_ptr(layout, C, ot, propname, name, icon);
+ PointerRNA opptr;
+ uiItemMenuEnumFullO_ptr(layout, C, ot, propname, name, icon, &opptr);
+ return opptr;
}
static void rna_uiItemL(uiLayout *layout,
@@ -912,7 +914,12 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_boolean(func, "event", false, "", "Use button to input key events");
RNA_def_boolean(
func, "full_event", false, "", "Use button to input full events including modifiers");
- RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, not just the icon/text");
+ RNA_def_boolean(func,
+ "emboss",
+ true,
+ "",
+ "Draw the button itself, not just the icon/text. When false, corresponds to the "
+ "'NONE_OR_STATUS' layout emboss type");
RNA_def_int(func,
"index",
/* RNA_NO_INDEX == -1 */
@@ -1023,6 +1030,10 @@ void RNA_api_ui_layout(StructRNA *srna)
parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
api_ui_item_common(func);
+ parm = RNA_def_pointer(
+ func, "properties", "OperatorProperties", "", "Operator properties to fill in");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED | PARM_RNAPTR);
+ RNA_def_function_return(func, parm);
/* useful in C but not in python */
# if 0
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 4d45d1d6d63..3b7af07479c 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -826,7 +826,7 @@ static PointerRNA rna_Addon_preferences_get(PointerRNA *ptr)
if (apt) {
if (addon->prop == NULL) {
IDPropertyTemplate val = {0};
- addon->prop = IDP_New(IDP_GROUP, &val, addon->module); /* name is unimportant */
+ addon->prop = IDP_New(IDP_GROUP, &val, addon->module); /* name is unimportant. */
}
return rna_pointer_inherit_refine(ptr, apt->rna_ext.srna, addon->prop);
}
@@ -2275,7 +2275,7 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
rna_def_userdef_theme_spaces_edge(srna);
rna_def_userdef_theme_spaces_face(srna);
- /* Mesh Object specific curves*/
+ /* Mesh Object specific curves. */
rna_def_userdef_theme_spaces_curves(srna, true, true, true, false);
@@ -2320,7 +2320,7 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Split Normal", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- /* Armature Object specific */
+ /* Armature Object specific. */
prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -2486,7 +2486,7 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- /* space_file */
+ /* space_file */
srna = RNA_def_struct(brna, "ThemeFileBrowser", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
@@ -3864,6 +3864,7 @@ static void rna_def_userdef_theme_space_spreadsheet(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
}
static void rna_def_userdef_themes(BlenderRNA *brna)
@@ -4509,7 +4510,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data");
- /* View */
+ /* View. */
prop = RNA_def_property(srna, "ui_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(
prop, "UI Scale", "Changes the size of the fonts and widgets in the interface");
@@ -6135,7 +6136,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
"Tabs as Spaces",
"Automatically convert all new tabs into spaces for new and loaded text files");
- /* Directories */
+ /* Directories. */
prop = RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "fontdir");
@@ -6199,7 +6200,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Animation Player Preset", "Preset configs for external animation players");
- /* Autosave */
+ /* Autosave. */
prop = RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "versions");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 2b1a5f7fde1..a563541b968 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -751,7 +751,7 @@ static void rna_Window_scene_update(bContext *C, PointerRNA *ptr)
Main *bmain = CTX_data_main(C);
wmWindow *win = ptr->data;
- /* exception: must use context so notifier gets to the right window */
+ /* Exception: must use context so notifier gets to the right window. */
if (win->new_scene) {
# ifdef WITH_PYTHON
BPy_BEGIN_ALLOW_THREADS;
@@ -892,7 +892,7 @@ static PointerRNA rna_KeyMapItem_properties_get(PointerRNA *ptr)
return *(kmi->ptr);
}
- /*return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties); */
+ // return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties);
return PointerRNA_NULL;
}