diff options
author | Hans Goudey <h.goudey@me.com> | 2021-07-13 02:42:26 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-07-13 02:42:26 +0300 |
commit | d7a74a2ad69914602f563852610efff3e8ed6e1c (patch) | |
tree | 278eee53ad1df1cfd5978fab8734be69ede6cb79 /source/blender/makesrna/intern | |
parent | 45803403216e31ea43e9e56b9c9b90c3cb20740c (diff) | |
parent | 8f94724f2246c9f4c2659f4380dc43fcda28d759 (diff) |
Merge branch 'master' into curve-sample-node
Diffstat (limited to 'source/blender/makesrna/intern')
38 files changed, 236 insertions, 182 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 5bf16baa1e8..719b0f73a9d 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2140,7 +2140,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property return; } - /* disabled for now to avoid msvc compiler error due to large file size */ + /* Disabled for now to avoid MSVC compiler error due to large file size. */ #if 0 if (prop->name && prop->description && prop->description[0] != '\0') { fprintf(f, "\t/* %s: %s */\n", prop->name, prop->description); @@ -2407,7 +2407,7 @@ static void rna_def_struct_function_prototype_cpp(FILE *f, static void rna_def_struct_function_header_cpp(FILE *f, StructRNA *srna, FunctionDefRNA *dfunc) { if (dfunc->call) { - /* disabled for now to avoid msvc compiler error due to large file size */ + /* Disabled for now to avoid MSVC compiler error due to large file size. */ #if 0 FunctionRNA *func = dfunc->func; fprintf(f, "\n\t/* %s */\n", func->description); @@ -4449,7 +4449,7 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const fprintf(f, "#pragma GCC diagnostic ignored \"-Wunused-parameter\"\n\n"); #endif - fprintf(f, "/* Autogenerated Functions */\n\n"); + fprintf(f, "/* Auto-generated Functions. */\n\n"); for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) { if (!filename || ds->filename == filename) { diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 43b65b087bf..499b5538ad8 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -384,7 +384,7 @@ short RNA_type_to_ID_code(const StructRNA *type) StructRNA *ID_code_to_RNA_type(short idcode) { - /* Note, this switch doesn't use a 'default', + /* NOTE: this switch doesn't use a 'default', * so adding new ID's causes a warning. */ switch ((ID_Type)idcode) { case ID_AC: @@ -538,7 +538,7 @@ StructRNA *rna_PropertyGroup_register(Main *UNUSED(bmain), return NULL; } - /* note: it looks like there is no length limit on the srna id since its + /* NOTE: it looks like there is no length limit on the srna id since its * just a char pointer, but take care here, also be careful that python * owns the string pointer which it could potentially free while blender * is running. */ diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 840da76403a..a0a84bf4fc9 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -692,7 +692,7 @@ static const char *rna_ensure_property_description(const PropertyRNA *prop) } if (description == NULL) { - description = ((IDProperty *)prop)->name; /* XXX - not correct */ + description = ((IDProperty *)prop)->name; /* XXX: not correct. */ } } @@ -907,7 +907,7 @@ static PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna) bool RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test) { - /* note, prop_test could be freed memory, only use for comparison */ + /* NOTE: prop_test could be freed memory, only use for comparison. */ /* validate the RNA is ok */ PropertyRNA *iterprop; @@ -1691,7 +1691,7 @@ static void property_enum_translate(PropertyRNA *prop, if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) { int i; - /* Note: Only do those tests once, and then use BLT_pgettext. */ + /* NOTE: Only do those tests once, and then use BLT_pgettext. */ bool do_iface = BLT_translate_iface(); bool do_tooltip = BLT_translate_tooltips(); EnumPropertyItem *nitem; @@ -2325,7 +2325,7 @@ static void rna_property_update( } /* must keep in sync with 'rna_property_update' - * note, its possible this returns a false positive in the case of PROP_CONTEXT_UPDATE + * NOTE: its possible this returns a false positive in the case of #PROP_CONTEXT_UPDATE * but this isn't likely to be a performance problem. */ bool RNA_property_update_check(PropertyRNA *prop) { @@ -5812,7 +5812,7 @@ static char *rna_path_from_ID_to_idpgroup(PointerRNA *ptr) BLI_assert(ptr->owner_id != NULL); - /* TODO, Support Bones/PoseBones. no pointers stored to the bones from here, only the ID. + /* TODO: Support Bones/PoseBones. no pointers stored to the bones from here, only the ID. * See example in T25746. * Unless this is added only way to find this is to also search * all bones and pose bones of an armature or object. @@ -6244,8 +6244,8 @@ char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index) data_path = RNA_path_from_ID_to_property(ptr, prop); if (data_path == NULL) { - /* this may not be an ID at all, check for simple when pointer owns property. - * TODO, more complex nested case */ + /* This may not be an ID at all, check for simple when pointer owns property. + * TODO: more complex nested case. */ if (!RNA_struct_is_ID(ptr->type)) { const char *prop_identifier = RNA_property_identifier(prop); if (RNA_struct_find_property(ptr, prop_identifier) == prop) { @@ -6559,7 +6559,7 @@ char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, in PropertyRNA *prop = RNA_struct_find_property(ptr, name); if (prop) { - /* TODO, pass length */ + /* TODO: pass length. */ return RNA_property_string_get_alloc(ptr, prop, fixedbuf, fixedlen, NULL); } printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name); diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c index c84ef1a6587..816fc68195f 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.c +++ b/source/blender/makesrna/intern/rna_access_compare_override.c @@ -132,7 +132,7 @@ bool RNA_property_overridable_get(PointerRNA *ptr, PropertyRNA *prop) { if (prop->magic == RNA_MAGIC) { /* Special handling for insertions of constraints or modifiers... */ - /* TODO Note We may want to add a more generic system to RNA + /* TODO: Note We may want to add a more generic system to RNA * (like a special property in struct of items) * if we get more overridable collections, * for now we can live with those special-cases handling I think. */ @@ -234,7 +234,7 @@ bool RNA_property_copy( prop_src = rna_ensure_property_realdata(&prop_src, fromptr); /* IDprops: destination may not exist, if source does and is set, try to create it. */ - /* Note: this is sort of quick hack/bandage to fix the issue, + /* NOTE: this is sort of quick hack/bandage to fix the issue, * we need to rethink how IDProps are handled in 'diff' RNA code completely, imho... */ if (prop_src != NULL && prop_dst == NULL && RNA_property_is_set(fromptr, prop)) { BLI_assert(prop_src->magic != RNA_MAGIC); @@ -681,7 +681,7 @@ bool RNA_struct_override_matches(Main *bmain, * ensure this is valid, but in some situations (like hidden collections etc.) this won't * be the case, so we need to take care of this ourselves. * - * Note: Typically callers of this function (from BKE_lib_override area) will already have + * NOTE: Typically callers of this function (from BKE_lib_override area) will already have * ensured this. However, studio is still reporting sporadic, unreproducible crashes due to * invalid pose data, so think there are still some cases where some armatures are somehow * missing updates (possibly due to dependencies?). Since calling this function on same ID @@ -741,7 +741,7 @@ bool RNA_struct_override_matches(Main *bmain, char *rna_path = rna_path_buffer; size_t rna_path_len = 0; - /* XXX TODO this will have to be refined to handle collections insertions, and array items */ + /* XXX TODO: this will have to be refined to handle collections insertions, and array items. */ if (root_path) { BLI_assert(strlen(root_path) == root_path_len); @@ -1138,7 +1138,7 @@ static void rna_property_override_apply_ex(Main *bmain, continue; } - /* Note: will have to think about putting that logic into its own function maybe? + /* NOTE: will have to think about putting that logic into its own function maybe? * Would be nice to have it in a single place... * Note that here, src is the local saved ID, and dst is a copy of the linked ID (since we use * local ID as storage to apply local changes on top of a clean copy of the linked data). */ @@ -1192,7 +1192,7 @@ void RNA_struct_override_apply(Main *bmain, #ifdef DEBUG_OVERRIDE_TIMEIT TIMEIT_START_AVERAGED(RNA_struct_override_apply); #endif - /* Note: Applying insert operations in a separate pass is mandatory. + /* NOTE: Applying insert operations in a separate pass is mandatory. * We could optimize this later, but for now, as inefficient as it is, * don't think this is a critical point. */ diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index b3b0d7d13f7..7114e21beff 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -1395,7 +1395,7 @@ static void rna_def_armature_bones(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_ui_text(prop, "Active Bone", "Armature's active bone"); RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_bone_set", NULL, NULL); - /* todo, redraw */ + /* TODO: redraw. */ /* RNA_def_property_collection_active(prop, prop_act); */ } @@ -1421,7 +1421,7 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop) /*RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); */ RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL, NULL); - /* todo, redraw */ + /* TODO: redraw. */ /* RNA_def_property_collection_active(prop, prop_act); */ /* add target */ diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 7e1d513502c..2b09ea51a84 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1486,7 +1486,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna) prop = RNA_def_property(srna, "uv_random", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "uv_random"); RNA_def_property_range(prop, 0.0, 1.0); - RNA_def_property_ui_text(prop, "UV Random", "Random factor for autogenerated UV rotation"); + RNA_def_property_ui_text(prop, "UV Random", "Random factor for auto-generated UV rotation"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); @@ -3260,7 +3260,7 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Restore Mesh", "Allow a single dot to be carefully positioned"); RNA_def_property_update(prop, 0, "rna_Brush_update"); - /* only for projection paint & vertex paint, TODO, other paint modes */ + /* only for projection paint & vertex paint, TODO: other paint modes. */ prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BRUSH_LOCK_ALPHA); RNA_def_property_ui_text( diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c index 577a3273e21..752c9495e50 100644 --- a/source/blender/makesrna/intern/rna_collection.c +++ b/source/blender/makesrna/intern/rna_collection.c @@ -189,7 +189,7 @@ static bool rna_Collection_objects_override_apply(Main *bmain, return false; } - /* XXX TODO We most certainly rather want to have a 'swap object pointer in collection' + /* XXX TODO: We most certainly rather want to have a 'swap object pointer in collection' * util in BKE_collection. This is only temp quick dirty test! */ id_us_min(&cob_dst->ob->id); cob_dst->ob = ob_src; @@ -292,7 +292,7 @@ static bool rna_Collection_children_override_apply(Main *bmain, return false; } - /* XXX TODO We most certainly rather want to have a 'swap object pointer in collection' + /* XXX TODO: We most certainly rather want to have a 'swap object pointer in collection' * util in BKE_collection. This is only temp quick dirty test! */ id_us_min(&collchild_dst->collection->id); collchild_dst->collection = subcoll_src; diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 39a44d7568a..9faf2ae7cb7 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -971,7 +971,7 @@ static void rna_def_color_ramp_element_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_path_func(srna, "rna_ColorRampElement_path"); RNA_def_struct_ui_text(srna, "Color Ramp Elements", "Collection of Color Ramp Elements"); - /* TODO, make these functions generic in texture.c */ + /* TODO: make these functions generic in `texture.c`. */ func = RNA_def_function(srna, "new", "rna_ColorRampElement_new"); RNA_def_function_ui_description(func, "Add element to ColorRamp"); RNA_def_function_flag(func, FUNC_USE_REPORTS); diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 28aef635688..3064703b02e 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -2841,7 +2841,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) RNA_define_lib_overridable(true); prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "target"); /* TODO, mesh type */ + RNA_def_property_pointer_sdna(prop, NULL, "target"); /* TODO: mesh type. */ RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll"); RNA_def_property_ui_text(prop, "Target", "Target Mesh object"); RNA_def_property_flag(prop, PROP_EDITABLE); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 299cd2504a8..9c6659a7130 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -591,7 +591,7 @@ static int rna_Curve_body_length(PointerRNA *ptr) return cu->len; } -/* TODO, how to handle editmode? */ +/* TODO: how to handle editmode? */ static void rna_Curve_body_set(PointerRNA *ptr, const char *value) { size_t len_bytes; @@ -1802,7 +1802,7 @@ static void rna_def_curve(BlenderRNA *brna) prop, "End Mapping Type", "Determine how the geometry end factor is mapped to a spline"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - /* XXX - would be nice to have a better way to do this, only add for testing. */ + /* XXX: would be nice to have a better way to do this, only add for testing. */ prop = RNA_def_property(srna, "twist_smooth", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "twist_smooth"); RNA_def_property_ui_range(prop, 0, 100.0, 1, 2); @@ -2017,7 +2017,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Cyclic V", "Make this surface a closed loop in the V direction"); RNA_def_property_update(prop, 0, "rna_Nurb_update_cyclic_v"); - /* Note, endpoint and bezier flags should never be on at the same time! */ + /* NOTE: endpoint and bezier flags should never be on at the same time! */ prop = RNA_def_property(srna, "use_endpoint_u", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_NURB_ENDPOINT); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 0c6c3fd9b0a..1a0d4ebb7e6 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -781,7 +781,7 @@ void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *rna_ext) { #ifdef RNA_RUNTIME rna_ext->free(rna_ext->data); /* decref's the PyObject that the srna owns */ - RNA_struct_blender_type_set(srna, NULL); /* this gets accessed again - XXX fixme */ + RNA_struct_blender_type_set(srna, NULL); /* FIXME: this gets accessed again. */ /* NULL the srna's value so RNA_struct_free won't complain of a leak */ RNA_struct_py_type_set(srna, NULL); @@ -4759,7 +4759,7 @@ static void rna_def_property_free(StructOrFunctionRNA *cont_, PropertyRNA *prop) } } -/* note: only intended for removing dynamic props */ +/* NOTE: only intended for removing dynamic props. */ int RNA_def_property_free_identifier(StructOrFunctionRNA *cont_, const char *identifier) { ContainerRNA *cont = cont_; diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index f81a806b009..1f187382980 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -281,7 +281,7 @@ static void rna_DriverTarget_update_name(Main *bmain, Scene *scene, PointerRNA * /* ----------- */ -/* note: this function exists only to avoid id refcounting */ +/* NOTE: this function exists only to avoid id refcounting. */ static void rna_DriverTarget_id_set(PointerRNA *ptr, PointerRNA value, struct ReportList *UNUSED(reports)) @@ -1831,7 +1831,7 @@ static void rna_def_drivertarget(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable"); - /* note: custom set function is ONLY to avoid rna setting a user for this. */ + /* NOTE: custom set function is ONLY to avoid rna setting a user for this. */ RNA_def_property_pointer_funcs( prop, NULL, "rna_DriverTarget_id_set", "rna_DriverTarget_id_typef", NULL); RNA_def_property_ui_text(prop, diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index decdc728bbe..5e015af8e20 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -2623,7 +2623,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "colors of a ramp or using a predefined color code"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - /* Coba field items - generated dynamically based on domain type */ + /* Color ramp field items are generated dynamically based on domain type. */ static const EnumPropertyItem coba_field_items[] = { {0, "NONE", 0, "", ""}, {0, NULL, 0, NULL, NULL}, diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 21e905cfd2a..aad6f1231dd 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -1808,7 +1808,7 @@ static void rna_def_gpencil_frame(BlenderRNA *brna) /* Frame Number */ prop = RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "framenum"); - /* XXX note: this cannot occur on the same frame as another sketch */ + /* XXX NOTE: this cannot occur on the same frame as another sketch. */ RNA_def_property_range(prop, -MAXFRAME, MAXFRAME); RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears"); diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 987517320f9..06ff1918040 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -117,7 +117,7 @@ static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *r BLI_strncpy(filename, image->filepath, sizeof(filename)); BLI_path_abs(filename, ID_BLEND_PATH(bmain, &image->id)); - /* note, we purposefully ignore packed files here, + /* NOTE: we purposefully ignore packed files here, * developers need to explicitly write them via 'packed_files' */ if (IMB_saveiff(ibuf, filename, ibuf->flags)) { @@ -374,7 +374,7 @@ void RNA_api_image(StructRNA *srna) func = RNA_def_function(srna, "buffers_free", "rna_Image_buffers_free"); RNA_def_function_ui_description(func, "Free the image buffers from memory"); - /* TODO, pack/unpack, maybe should be generic functions? */ + /* TODO: pack/unpack, maybe should be generic functions? */ } #endif diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 0bb452dfb07..ee60b199d64 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -280,7 +280,7 @@ struct FunctionRNA { CallFunc call; /* parameter for the return value - * note: this is only the C return value, rna functions can have multiple return values */ + * NOTE: this is only the C return value, rna functions can have multiple return values. */ PropertyRNA *c_ret; }; diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index a48727526c9..9d8ed161738 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -168,7 +168,7 @@ static void rna_ShapeKey_slider_max_set(PointerRNA *ptr, float value) # undef SHAPEKEY_SLIDER_TOL /* ***** Normals accessors for shapekeys. ***** */ -/* Note: with this we may recompute several times the same data, should we want to access verts, +/* NOTE: with this we may recompute several times the same data, should we want to access verts, * then polys, then loops normals... However, * such case looks rather unlikely - and not worth adding some kind of caching in KeyBlocks. */ diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 24bc5504a58..896e253049b 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -115,7 +115,7 @@ static void rna_Mask_update_parent(Main *bmain, Scene *scene, PointerRNA *ptr) rna_Mask_update_data(bmain, scene, ptr); } -/* note: this function exists only to avoid id refcounting */ +/* NOTE: this function exists only to avoid id refcounting. */ static void rna_MaskParent_id_set(PointerRNA *ptr, PointerRNA value, struct ReportList *UNUSED(reports)) @@ -631,7 +631,7 @@ static void rna_def_maskParent(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ID"); RNA_def_property_flag(prop, PROP_EDITABLE); // RNA_def_property_editable_func(prop, "rna_maskSpline_id_editable"); - /* note: custom set function is ONLY to avoid rna setting a user for this. */ + /* NOTE: custom set function is ONLY to avoid rna setting a user for this. */ RNA_def_property_pointer_funcs( prop, NULL, "rna_MaskParent_id_set", "rna_MaskParent_id_typef", NULL); RNA_def_property_ui_text( diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 81cf1447604..9caff88a3a5 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -14,7 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* note: the original vertex color stuff is now just used for +/* 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. */ @@ -1084,7 +1084,7 @@ static void rna_Mesh_face_map_remove(struct Mesh *me, static int rna_MeshPoly_vertices_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION]) { MPoly *mp = (MPoly *)ptr->data; - /* note, raw access uses dummy item, this _could_ crash, + /* NOTE: raw access uses dummy item, this _could_ crash, * watch out for this, mface uses it but it can't work here. */ return (length[0] = mp->totloop); } @@ -3006,7 +3006,7 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Loop Triangles", "Tessellation of mesh polygons into triangles"); rna_def_mesh_looptris(brna, prop); - /* TODO, should this be allowed to be its self? */ + /* TODO: should this be allowed to be its self? */ prop = RNA_def_property(srna, "texture_mesh", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "texcomesh"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); @@ -3098,7 +3098,7 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Sculpt Vertex Colors", "All vertex colors"); rna_def_vert_colors(brna, prop); - /* TODO, edge customdata layers (bmesh py api can access already) */ + /* TODO: edge customdata layers (bmesh py api can access already). */ prop = RNA_def_property(srna, "vertex_layers_float", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "vdata.layers", "vdata.totlayer"); RNA_def_property_collection_funcs(prop, diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index 8128bdb83a0..3fba8cdb035 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -288,7 +288,7 @@ void RNA_api_mesh(StructRNA *srna) "Define custom split normals of this mesh " "(use zero-vectors to keep auto ones)"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - /* TODO, see how array size of 0 works, this shouldn't be used */ + /* TODO: see how array size of 0 works, this shouldn't be used. */ parm = RNA_def_float_array(func, "normals", 1, NULL, -1.0f, 1.0f, "", "Normals", 0.0f, 0.0f); RNA_def_property_multi_array(parm, 2, normals_array_dim); RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_REQUIRED); @@ -301,7 +301,7 @@ void RNA_api_mesh(StructRNA *srna) "Define custom split normals of this mesh, from vertices' normals " "(use zero-vectors to keep auto ones)"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - /* TODO, see how array size of 0 works, this shouldn't be used */ + /* TODO: see how array size of 0 works, this shouldn't be used. */ parm = RNA_def_float_array(func, "normals", 1, NULL, -1.0f, 1.0f, "", "Normals", 0.0f, 0.0f); RNA_def_property_multi_array(parm, 2, normals_array_dim); RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_REQUIRED); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 9a895a0c75a..7def9bdb636 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -690,6 +690,7 @@ static void rna_Modifier_is_active_set(PointerRNA *ptr, bool value) } md->flag |= eModifierFlag_Active; + WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ptr->owner_id); } } @@ -2256,7 +2257,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; - /* Note, keep in sync with operator 'MESH_OT_decimate' */ + /* NOTE: keep in sync with operator 'MESH_OT_decimate'. */ StructRNA *srna; PropertyRNA *prop; diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 2642ba82bc0..17c7b331c88 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -297,7 +297,7 @@ static int rna_NlaStrip_action_editable(PointerRNA *ptr, const char **UNUSED(r_i { NlaStrip *strip = (NlaStrip *)ptr->data; - /* strip actions shouldn't be editable if NLA tweakmode is on */ + /* Strip actions shouldn't be editable if NLA tweak-mode is on. */ if (ptr->owner_id) { AnimData *adt = BKE_animdata_from_id(ptr->owner_id); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 88697760a77..978ea13f92f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -337,6 +337,31 @@ const EnumPropertyItem rna_enum_node_float_compare_items[] = { {0, NULL, 0, NULL, NULL}, }; +const EnumPropertyItem rna_enum_node_float_to_int_items[] = { + {FN_NODE_FLOAT_TO_INT_ROUND, + "ROUND", + 0, + "Round", + "Round the float up or down to the nearest integer"}, + {FN_NODE_FLOAT_TO_INT_FLOOR, + "FLOOR", + 0, + "Floor", + "Round the float down to the next smallest integer"}, + {FN_NODE_FLOAT_TO_INT_CEIL, + "CEILING", + 0, + "Ceiling", + "Round the float up to the next largest integer"}, + {FN_NODE_FLOAT_TO_INT_TRUNCATE, + "TRUNCATE", + 0, + "Truncate", + "Round the float to the closest integer in the direction of zero (floor if positive; ceiling " + "if negative)"}, + {0, NULL, 0, NULL, NULL}, +}; + const EnumPropertyItem rna_enum_node_map_range_items[] = { {NODE_MAP_RANGE_LINEAR, "LINEAR", @@ -774,7 +799,7 @@ const EnumPropertyItem *rna_node_socket_type_itemf(void *data, tmp.value = i; tmp.identifier = stype->idname; tmp.icon = RNA_struct_ui_icon(srna); - tmp.name = RNA_struct_ui_name(srna); + tmp.name = nodeSocketTypeLabel(stype); tmp.description = RNA_struct_ui_description(srna); RNA_enum_item_add(&item, &totitem, &tmp); @@ -1000,8 +1025,7 @@ static void rna_NodeTree_get_from_context( RNA_parameter_list_free(&list); } -static bool rna_NodeTree_valid_socket_type(eNodeSocketDatatype socket_type, - bNodeTreeType *ntreetype) +static bool rna_NodeTree_valid_socket_type(bNodeTreeType *ntreetype, bNodeSocketType *socket_type) { extern FunctionRNA rna_NodeTree_valid_socket_type_func; @@ -1015,7 +1039,7 @@ static bool rna_NodeTree_valid_socket_type(eNodeSocketDatatype socket_type, func = &rna_NodeTree_valid_socket_type_func; RNA_parameter_list_create(&list, &ptr, func); - RNA_parameter_set_lookup(&list, "type", &socket_type); + RNA_parameter_set_lookup(&list, "idname", &socket_type->idname); ntreetype->rna_ext.call(NULL, &ptr, func, &list); RNA_parameter_get_lookup(&list, "valid", &ret); @@ -2841,7 +2865,7 @@ static void rna_NodeSocket_type_set(PointerRNA *ptr, int value) bNodeSocket *sock = (bNodeSocket *)ptr->data; bNode *node; nodeFindNode(ntree, sock, &node, NULL); - nodeModifySocketType(ntree, node, sock, value, 0); + nodeModifySocketTypeStatic(ntree, node, sock, value, 0); } static void rna_NodeSocket_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -4794,6 +4818,18 @@ static void def_float_compare(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } +static void def_float_to_int(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "rounding_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, rna_enum_node_float_to_int_items); + RNA_def_property_ui_text( + prop, "Rounding Mode", "Method used to convert the float to an integer"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + static void def_vector_math(StructRNA *srna) { PropertyRNA *prop; @@ -5754,7 +5790,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna) func = RNA_def_function(srna, "calc_point_density", "rna_ShaderNodePointDensity_density_calc"); RNA_def_function_ui_description(func, "Calculate point density"); RNA_def_pointer(func, "depsgraph", "Depsgraph", "", ""); - /* TODO, See how array size of 0 works, this shouldn't be used. */ + /* TODO: See how array size of 0 works, this shouldn't be used. */ parm = RNA_def_float_array(func, "rgba_values", 1, NULL, 0, 0, "", "RGBA Values", 0, 0); RNA_def_parameter_flags(parm, PROP_DYNAMIC, 0); RNA_def_function_output(func, parm); @@ -6205,7 +6241,7 @@ static void def_sh_script(StructRNA *srna) /* API functions */ -# if 0 /* XXX TODO use general node api for this */ +# if 0 /* XXX TODO: use general node api for this. */ func = RNA_def_function(srna, "find_socket", "rna_ShaderNodeScript_find_socket"); RNA_def_function_ui_description(func, "Find a socket by name"); parm = RNA_def_string(func, "name", NULL, 0, "Socket name", ""); @@ -9451,6 +9487,32 @@ static void def_geo_curve_primitive_circle(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } +static void def_geo_curve_primitive_line(StructRNA *srna) +{ + static const EnumPropertyItem mode_items[] = { + {GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_POINTS, + "POINTS", + ICON_NONE, + "Points", + "Define the start and end points of the line"}, + {GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_DIRECTION, + "DIRECTION", + ICON_NONE, + "Direction", + "Define a line with a start point, direction and length"}, + {0, NULL, 0, NULL, NULL}, + }; + + PropertyRNA *prop; + + RNA_def_struct_sdna_from(srna, "NodeGeometryCurvePrimitiveLine", "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[] = { @@ -10139,7 +10201,7 @@ static void rna_def_node_socket(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Node Socket", "Input or output socket of a node"); RNA_def_struct_sdna(srna, "bNodeSocket"); RNA_def_struct_refine_func(srna, "rna_NodeSocket_refine"); - RNA_def_struct_ui_icon(srna, ICON_PLUGIN); + RNA_def_struct_ui_icon(srna, ICON_NONE); RNA_def_struct_path_func(srna, "rna_NodeSocket_path"); RNA_def_struct_register_funcs( srna, "rna_NodeSocket_register", "rna_NodeSocket_unregister", NULL); @@ -10244,6 +10306,11 @@ static void rna_def_node_socket(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", ""); + prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "typeinfo->label"); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_ui_text(prop, "Type Label", "Label to display for the socket type in the UI"); + /* draw socket */ func = RNA_def_function(srna, "draw", NULL); RNA_def_function_ui_description(func, "Draw socket"); @@ -10332,6 +10399,11 @@ static void rna_def_node_socket_interface(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", ""); + prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "typeinfo->label"); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_ui_text(prop, "Type Label", "Label to display for the socket type in the UI"); + func = RNA_def_function(srna, "draw", NULL); RNA_def_function_ui_description(func, "Draw template settings"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); @@ -11346,12 +11418,6 @@ static void rna_def_node(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Texture", "Display node in viewport textured shading mode"); RNA_def_property_update(prop, 0, "rna_Node_update"); - prop = RNA_def_property(srna, "active_preview", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", NODE_ACTIVE_PREVIEW); - RNA_def_property_ui_text(prop, "Active Preview", "Node is previewed in other editor"); - RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); - RNA_def_property_update(prop, NC_NODE, NULL); - /* generic property update function */ func = RNA_def_function(srna, "socket_value_update", "rna_Node_socket_value_update"); RNA_def_function_ui_description(func, "Update after property changes"); @@ -11848,11 +11914,12 @@ static void rna_def_nodetree(BlenderRNA *brna) func, "result_3", "ID", "From ID", "Original ID data-block selected from the context"); RNA_def_function_output(func, parm); - /* Check for support of a socket type. */ + /* Check for support of a socket type with a type identifier. */ func = RNA_def_function(srna, "valid_socket_type", NULL); RNA_def_function_ui_description(func, "Check if the socket type is valid for the node tree"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER_OPTIONAL); - parm = RNA_def_enum(func, "type", node_socket_type_items, 0, "", ""); + parm = RNA_def_string( + func, "idname", "NodeSocket", MAX_NAME, "Socket Type", "Identifier of the socket type"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); RNA_def_function_return(func, RNA_def_boolean(func, "valid", false, "", "")); } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index a208e520d02..7c012922c2c 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1706,6 +1706,8 @@ static void rna_Object_active_modifier_set(PointerRNA *ptr, PointerRNA value, Re Object *ob = (Object *)ptr->owner_id; ModifierData *md = value.data; + WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); + if (RNA_pointer_is_null(&value)) { BKE_object_modifier_set_active(ob, NULL); return; @@ -2268,7 +2270,7 @@ static void rna_def_vertex_group(BlenderRNA *brna) func = RNA_def_function(srna, "add", "rna_VertexGroup_vertex_add"); RNA_def_function_ui_description(func, "Add vertices to the group"); RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); - /* TODO, see how array size of 0 works, this shouldn't be used */ + /* TODO: see how array size of 0 works, this shouldn't be used. */ parm = RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "List of indices", 0, 0); RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_REQUIRED); parm = RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight", 0.0f, 1.0f); @@ -2279,7 +2281,7 @@ static void rna_def_vertex_group(BlenderRNA *brna) func = RNA_def_function(srna, "remove", "rna_VertexGroup_vertex_remove"); RNA_def_function_ui_description(func, "Remove vertices from the group"); RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); - /* TODO, see how array size of 0 works, this shouldn't be used */ + /* TODO: see how array size of 0 works, this shouldn't be used. */ parm = RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "List of indices", 0, 0); RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_REQUIRED); @@ -2326,14 +2328,14 @@ static void rna_def_face_map(BlenderRNA *brna) func = RNA_def_function(srna, "add", "rna_FaceMap_face_add"); RNA_def_function_ui_description(func, "Add faces to the face-map"); RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); - /* TODO, see how array size of 0 works, this shouldn't be used */ + /* TODO: see how array size of 0 works, this shouldn't be used. */ parm = RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "List of indices", 0, 0); RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_REQUIRED); func = RNA_def_function(srna, "remove", "rna_FaceMap_face_remove"); RNA_def_function_ui_description(func, "Remove faces from the face-map"); RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); - /* TODO, see how array size of 0 works, this shouldn't be used */ + /* TODO: see how array size of 0 works, this shouldn't be used. */ parm = RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "List of indices", 0, 0); RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_REQUIRED); } @@ -2488,7 +2490,7 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop) /*RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); */ RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL, NULL); - /* todo, redraw */ + /* TODO: redraw. */ /* RNA_def_property_collection_active(prop, prop_act); */ # endif diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 30baf01e952..f8a98eb1753 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -1095,7 +1095,7 @@ static void rna_def_pointcache_active(BlenderRNA *brna) * Those caches items have exact same content as 'active' one, except for that collection, * to prevent ugly recursive layout pattern. * - * Note: This shall probably be redone from scratch in a proper way at some point, + * NOTE: This shall probably be redone from scratch in a proper way at some point, * but for now that will do, and shall not break anything in the API. */ prop = RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_funcs(prop, diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 9ab685fa462..8edb80f68c5 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -554,7 +554,7 @@ static int rna_ParticleSystem_tessfaceidx_on_emitter(ParticleSystem *particlesys } part = particlesystem->part; - /* Note: only hair, keyed and baked particles may have cached items... */ + /* NOTE: only hair, keyed and baked particles may have cached items... */ totpart = particlesystem->totcached != 0 ? particlesystem->totcached : particlesystem->totpart; totchild = particlesystem->totchildcache != 0 ? particlesystem->totchildcache : particlesystem->totchild; @@ -3752,7 +3752,7 @@ static void rna_def_particle_system(BlenderRNA *brna) /* vertex groups */ - /* note, internally store as ints, access as strings */ + /* NOTE: internally store as ints, access as strings. */ # if 0 /* int access. works ok but isn't useful for the UI */ prop = RNA_def_property(srna, "vertex_group_density", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "vgroup[0]"); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 899c3397361..6008ef40b60 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -933,7 +933,7 @@ static const EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, return eprop->item_fn(C, ptr, prop, r_free); } -/* XXX - not sure this is needed? */ +/* XXX: not sure this is needed? */ static int rna_EnumProperty_default_get(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; @@ -1529,7 +1529,7 @@ int rna_property_override_diff_default(Main *bmain, BLI_assert(len_a == len_b); - /* Note: at this point, we are sure that when len_a is zero, + /* NOTE: at this point, we are sure that when len_a is zero, * we are not handling an (empty) array. */ const bool do_create = override != NULL && (flags & RNA_OVERRIDE_COMPARE_CREATE) != 0 && @@ -1537,7 +1537,7 @@ int rna_property_override_diff_default(Main *bmain, const bool no_ownership = (prop_a->rnaprop->flag & PROP_PTR_NO_OWNERSHIP) != 0; - /* Note: we assume we only insert in ptr_a (i.e. we can only get new items in ptr_a), + /* NOTE: we assume we only insert in ptr_a (i.e. we can only get new items in ptr_a), * and that we never remove anything. */ const bool use_collection_insertion = (prop_a->rnaprop->flag_override & PROPOVERRIDE_LIBRARY_INSERTION) && @@ -1564,7 +1564,7 @@ int rna_property_override_diff_default(Main *bmain, const int comp = memcmp(array_a, array_b, sizeof(bool) * len_a); if (do_create && comp != 0) { - /* XXX TODO this will have to be refined to handle array items */ + /* XXX TODO: this will have to be refined to handle array items. */ op = BKE_lib_override_library_property_get(override, rna_path, &created); if (op != NULL && created) { @@ -1625,7 +1625,7 @@ int rna_property_override_diff_default(Main *bmain, const int comp = memcmp(array_a, array_b, sizeof(int) * len_a); if (do_create && comp != 0) { - /* XXX TODO this will have to be refined to handle array items */ + /* XXX TODO: this will have to be refined to handle array items. */ op = BKE_lib_override_library_property_get(override, rna_path, &created); if (op != NULL && created) { @@ -1686,7 +1686,7 @@ int rna_property_override_diff_default(Main *bmain, const int comp = memcmp(array_a, array_b, sizeof(float) * len_a); if (do_create && comp != 0) { - /* XXX TODO this will have to be refined to handle array items */ + /* XXX TODO: this will have to be refined to handle array items. */ op = BKE_lib_override_library_property_get(override, rna_path, &created); if (op != NULL && created) { @@ -1758,7 +1758,7 @@ int rna_property_override_diff_default(Main *bmain, ptr_a, rawprop_a, fixed_a, sizeof(fixed_a), &len_str_a); char *value_b = RNA_property_string_get_alloc( ptr_b, rawprop_b, fixed_b, sizeof(fixed_b), &len_str_b); - /* TODO we could do a check on length too, + /* TODO: we could do a check on length too, * but then we would not have a 'real' string comparison... * Maybe behind a eRNAOverrideMatch flag? */ # if 0 @@ -2079,7 +2079,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), return changed; } - /* XXX TODO About range limits. + /* XXX TODO: About range limits. * Ideally, it would be great to get rid of RNA range in that specific case. * However, this won't be that easy and will add yet another layer of complexity in * generated code, not to mention that we could most likely *not* bypass custom setters anyway. @@ -2088,7 +2088,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), * Time will say whether this is acceptable limitation or not. */ switch (RNA_property_type(prop_local)) { case PROP_BOOLEAN: - /* TODO support boolean ops? Really doubt this would ever be useful though... */ + /* TODO: support boolean ops? Really doubt this would ever be useful though. */ BLI_assert(0 && "Boolean properties support no override diff operation"); break; case PROP_INT: { @@ -2306,7 +2306,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), return true; } case PROP_ENUM: - /* TODO support add/sub, for bitflags? */ + /* TODO: support add/sub, for bitflags? */ BLI_assert(0 && "Enum properties support no override diff operation"); break; case PROP_POINTER: @@ -2316,7 +2316,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), BLI_assert(0 && "String properties support no override diff operation"); break; case PROP_COLLECTION: - /* XXX TODO support this of course... */ + /* XXX TODO: support this of course... */ BLI_assert(0 && "Collection properties support no override diff operation"); break; default: @@ -2564,7 +2564,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), case IDOVERRIDE_LIBRARY_OP_REPLACE: RNA_property_enum_set(ptr_dst, prop_dst, value); break; - /* TODO support add/sub, for bitflags? */ + /* TODO: support add/sub, for bitflags? */ default: BLI_assert(0 && "Unsupported RNA override operation on enum"); return false; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 0ce4271c3c2..0a91d5f01bc 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1272,10 +1272,10 @@ static const EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext ID *id = ptr->owner_id; const bool is_render = (id && GS(id->name) == ID_SCE); - /* note, we need to act differently for render + /* NOTE(campbell): we need to act differently for render * where 'BW' will force grayscale even if the output format writes * as RGBA, this is age old blender convention and not sure how useful - * it really is but keep it for now - campbell */ + * it really is but keep it for now. */ char chan_flag = BKE_imtype_valid_channels(imf->imtype, true) | (is_render ? IMA_CHAN_FLAG_BW : 0); @@ -2166,7 +2166,7 @@ static char *rna_MeshStatVis_path(PointerRNA *UNUSED(ptr)) return BLI_strdup("tool_settings.statvis"); } -/* note: without this, when Multi-Paint is activated/deactivated, the colors +/* NOTE: without this, when Multi-Paint is activated/deactivated, the colors * will not change right away when multiple bones are selected, this function * is not for general use and only for the few cases where changing scene * settings and NOT for general purpose updates, possibly this should be @@ -3535,6 +3535,11 @@ static void rna_def_sequencer_tool_settings(BlenderRNA *brna) 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, "use_snap_current_frame_to_strips", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SEQ_SNAP_CURRENT_FRAME_TO_STRIPS); + RNA_def_property_ui_text( + prop, "Snap Current Frame to Strips", "Snap current frame to strip start or end"); + 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); @@ -5386,7 +5391,7 @@ static void rna_def_image_format_stereo3d_format(BlenderRNA *brna) } /* use for render output and image save operator, - * note: there are some cases where the members act differently when this is + * NOTE: there are some cases where the members act differently when this is * used from a scene, video formats can only be selected for render output * for example, this is checked by seeing if the ptr->owner_id is a Scene id */ @@ -7962,10 +7967,10 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "master_collection"); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP); - RNA_def_property_ui_text( - prop, - "Collection", - "Scene master collection that objects and other collections in the scene"); + RNA_def_property_ui_text(prop, + "Collection", + "Scene root collection that owns all the objects and other collections " + "instantiated in the scene"); /* Scene Display */ prop = RNA_def_property(srna, "display", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index caecd9a07d8..3e292ea89e2 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -207,7 +207,6 @@ static void rna_Scene_alembic_export(Scene *scene, bool apply_subdiv, bool flatten_hierarchy, bool visible_objects_only, - bool renderable_only, bool face_sets, bool use_subdiv_schema, bool export_hair, @@ -241,7 +240,6 @@ static void rna_Scene_alembic_export(Scene *scene, .apply_subdiv = apply_subdiv, .flatten_hierarchy = flatten_hierarchy, .visible_objects_only = visible_objects_only, - .renderable_only = renderable_only, .face_sets = face_sets, .use_subdiv_schema = use_subdiv_schema, .export_hair = export_hair, @@ -383,11 +381,6 @@ void RNA_api_scene(StructRNA *srna) 0, "Visible layers only", "Export only objects in visible layers"); - RNA_def_boolean(func, - "renderable_only", - 0, - "Renderable objects only", - "Export only objects marked renderable in the outliner"); RNA_def_boolean(func, "face_sets", 0, "Facesets", "Export face sets"); RNA_def_boolean(func, "subdiv_schema", diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 90029bd14a1..912f47ba9aa 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -495,7 +495,7 @@ static void rna_def_view2d(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "View2D", "Scroll and zoom for a 2D region"); RNA_def_struct_sdna(srna, "View2D"); - /* TODO more View2D properties could be exposed here (read-only) */ + /* TODO: more View2D properties could be exposed here (read-only). */ rna_def_view2d_api(srna); } diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 29100cd7658..0c46450759d 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -28,6 +28,7 @@ #include "DNA_sequence_types.h" #include "DNA_vfont_types.h" +#include "BLI_iterator.h" #include "BLI_math.h" #include "BLT_translation.h" @@ -102,17 +103,6 @@ typedef struct SequenceSearchData { SequenceModifierData *smd; } SequenceSearchData; -/* build a temp reference to the parent */ -static void meta_tmp_ref(Sequence *seq_par, Sequence *seq) -{ - for (; seq; seq = seq->next) { - seq->tmp = seq_par; - if (seq->type == SEQ_TYPE_META) { - meta_tmp_ref(seq, seq->seqbase.first); - } - } -} - static void rna_SequenceElement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; @@ -203,46 +193,36 @@ static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *i { Scene *scene = (Scene *)ptr->owner_id; Editing *ed = SEQ_editing_get(scene, false); + SeqCollection *all_strips = SEQ_query_all_strips_recursive(&ed->seqbase); - meta_tmp_ref(NULL, ed->seqbase.first); + BLI_Iterator *bli_iter = MEM_callocN(sizeof(BLI_Iterator), __func__); + bli_iter->data = MEM_callocN(sizeof(SeqIterator), __func__); + iter->internal.custom = bli_iter; - rna_iterator_listbase_begin(iter, &ed->seqbase, NULL); + SEQ_iterator_ensure(all_strips, bli_iter->data, (Sequence **)&bli_iter->current); + iter->valid = bli_iter->current != NULL; } -static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain), - Scene *scene, - PointerRNA *UNUSED(ptr)) +static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter) { - Editing *ed = scene->ed; - - SEQ_relations_free_imbuf(scene, &ed->seqbase, false); - SEQ_cache_cleanup(scene); + BLI_Iterator *bli_iter = iter->internal.custom; + bli_iter->current = SEQ_iterator_yield(bli_iter->data); + iter->valid = bli_iter->current != NULL; } -static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter) +static PointerRNA rna_SequenceEditor_sequences_all_get(CollectionPropertyIterator *iter) { - ListBaseIterator *internal = &iter->internal.listbase; - Sequence *seq = (Sequence *)internal->link; - - if (seq->seqbase.first) { - internal->link = (Link *)seq->seqbase.first; - } - else if (seq->next) { - internal->link = (Link *)seq->next; - } - else { - internal->link = NULL; - - do { - seq = seq->tmp; /* XXX - seq's don't reference their parents! */ - if (seq && seq->next) { - internal->link = (Link *)seq->next; - break; - } - } while (seq); - } + Sequence *seq = ((BLI_Iterator *)iter->internal.custom)->current; + return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, seq); +} - iter->valid = (internal->link != NULL); +static void rna_SequenceEditor_sequences_all_end(CollectionPropertyIterator *iter) +{ + BLI_Iterator *bli_iter = iter->internal.custom; + SeqIterator *seq_iter = bli_iter->data; + SEQ_collection_free(seq_iter->collection); + MEM_freeN(seq_iter); + MEM_freeN(bli_iter); } static int rna_SequenceEditor_sequences_all_lookup_string(PointerRNA *ptr, @@ -260,6 +240,16 @@ static int rna_SequenceEditor_sequences_all_lookup_string(PointerRNA *ptr, return false; } +static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain), + Scene *scene, + PointerRNA *UNUSED(ptr)) +{ + Editing *ed = scene->ed; + + SEQ_relations_free_imbuf(scene, &ed->seqbase, false); + SEQ_cache_cleanup(scene); +} + /* internal use */ static int rna_SequenceEditor_elements_length(PointerRNA *ptr) { @@ -308,7 +298,7 @@ static void do_sequence_frame_change_update(Scene *scene, Sequence *seq) } if (SEQ_transform_test_overlap(seqbase, seq)) { - SEQ_transform_seqbase_shuffle(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */ + SEQ_transform_seqbase_shuffle(seqbase, seq, scene); /* XXX: BROKEN!, uses context seqbasep. */ } SEQ_sort(seqbase); } @@ -488,7 +478,7 @@ static void rna_Sequence_channel_set(PointerRNA *ptr, int value) seq->machine = value; if (SEQ_transform_test_overlap(seqbase, seq)) { - /* XXX - BROKEN!, uses context seqbasep */ + /* XXX: BROKEN!, uses context seqbasep. */ SEQ_transform_seqbase_shuffle_ex(seqbase, seq, scene, channel_delta); } SEQ_sort(seqbase); @@ -799,7 +789,7 @@ static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator * return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq); } -/* TODO, expose seq path setting as a higher level sequencer BKE function */ +/* TODO: expose seq path setting as a higher level sequencer BKE function. */ static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value) { Sequence *seq = (Sequence *)(ptr->data); @@ -2009,8 +1999,8 @@ static void rna_def_editor(BlenderRNA *brna) RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_sequences_all_begin", "rna_SequenceEditor_sequences_all_next", - NULL, - NULL, + "rna_SequenceEditor_sequences_all_end", + "rna_SequenceEditor_sequences_all_get", NULL, NULL, "rna_SequenceEditor_sequences_all_lookup_string", @@ -2513,7 +2503,7 @@ static void rna_def_movieclip(BlenderRNA *brna) srna, "MovieClip Sequence", "Sequence strip to load a video from the clip editor"); RNA_def_struct_sdna(srna, "Sequence"); - /* TODO - add clip property? */ + /* TODO: add clip property? */ prop = RNA_def_property(srna, "undistort", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "clip_flag", SEQ_MOVIECLIP_RENDER_UNDISTORTED); diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c index 4a6cb0d740a..7c5212073ab 100644 --- a/source/blender/makesrna/intern/rna_shader_fx.c +++ b/source/blender/makesrna/intern/rna_shader_fx.c @@ -649,12 +649,12 @@ static void rna_def_shader_fx_flip(BlenderRNA *brna) RNA_define_lib_overridable(true); - prop = RNA_def_property(srna, "flip_horizontal", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FX_FLIP_HORIZONTAL); RNA_def_property_ui_text(prop, "Horizontal", "Flip image horizontally"); RNA_def_property_update(prop, NC_OBJECT | ND_SHADERFX, "rna_ShaderFx_update"); - prop = RNA_def_property(srna, "flip_vertical", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FX_FLIP_VERTICAL); RNA_def_property_ui_text(prop, "Vertical", "Flip image vertically"); RNA_def_property_update(prop, NC_OBJECT | ND_SHADERFX, "rna_ShaderFx_update"); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index c8a779f890d..56deb873611 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1839,7 +1839,7 @@ static void rna_SpaceTextEditor_updateEdited(Main *UNUSED(bmain), /* Space Properties */ -/* note: this function exists only to avoid id refcounting */ +/* NOTE: this function exists only to avoid id refcounting. */ static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr, PointerRNA value, struct ReportList *UNUSED(reports)) @@ -2136,7 +2136,7 @@ static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr) return; } - /* Exit editmode first - we cannot change actions while in tweakmode. */ + /* Exit editmode first - we cannot change actions while in tweak-mode. */ BKE_nla_tweakmode_exit(adt); /* To prevent data loss (i.e. if users flip between actions using the Browse menu), @@ -2756,7 +2756,7 @@ static void rna_FileBrowser_FSMenuEntry_path_set(PointerRNA *ptr, const char *va { FSMenuEntry *fsm = ptr->data; - /* Note: this will write to file immediately. + /* NOTE: this will write to file immediately. * Not nice (and to be fixed ultimately), but acceptable in this case for now. */ ED_fsmenu_entry_set_path(fsm, value); } @@ -2775,7 +2775,7 @@ static void rna_FileBrowser_FSMenuEntry_name_set(PointerRNA *ptr, const char *va { FSMenuEntry *fsm = ptr->data; - /* Note: this will write to file immediately. + /* NOTE: this will write to file immediately. * Not nice (and to be fixed ultimately), but acceptable in this case for now. */ ED_fsmenu_entry_set_name(fsm, value); } @@ -3177,11 +3177,9 @@ static void rna_spreadsheet_context_update(Main *UNUSED(bmain), } } -static void rna_spreadsheet_set_geometry_node_context(SpaceSpreadsheet *sspreadsheet, - SpaceNode *snode, - bNode *node) +static void rna_SpaceSpreadsheet_context_path_guess(SpaceSpreadsheet *sspreadsheet, bContext *C) { - ED_spreadsheet_set_geometry_node_context(sspreadsheet, snode, node); + ED_spreadsheet_context_path_guess(C, sspreadsheet); ED_spreadsheet_context_path_update_tag(sspreadsheet); WM_main_add_notifier(NC_SPACE | ND_SPACE_SPREADSHEET, NULL); } @@ -3438,7 +3436,7 @@ static void rna_def_space_image_uv(BlenderRNA *brna) RNA_def_property_ui_text(prop, "UV Opacity", "Opacity of UV overlays"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); - /* todo: move edge and face drawing options here from G.f */ + /* TODO: move edge and face drawing options here from `G.f`. */ prop = RNA_def_property(srna, "pixel_snap_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, pixel_snap_mode_items); @@ -5073,7 +5071,7 @@ static void rna_def_space_properties(BlenderRNA *brna) prop = RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "pinid"); RNA_def_property_struct_type(prop, "ID"); - /* note: custom set function is ONLY to avoid rna setting a user for this. */ + /* NOTE: custom set function is ONLY to avoid rna setting a user for this. */ RNA_def_property_pointer_funcs( prop, NULL, "rna_SpaceProperties_pin_id_set", "rna_SpaceProperties_pin_id_typef", NULL); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); @@ -7646,13 +7644,16 @@ static void rna_def_space_spreadsheet_context_path(BlenderRNA *brna, PropertyRNA func = RNA_def_function(srna, "clear", "rna_SpaceSpreadsheet_context_path_clear"); RNA_def_function_ui_description(func, "Clear entire context path"); + + func = RNA_def_function(srna, "guess", "rna_SpaceSpreadsheet_context_path_guess"); + RNA_def_function_ui_description(func, "Guess the context path from the current context"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT); } static void rna_def_space_spreadsheet(BlenderRNA *brna) { - PropertyRNA *prop, *parm; + PropertyRNA *prop; StructRNA *srna; - FunctionRNA *func; static const EnumPropertyItem geometry_component_type_items[] = { {GEO_COMPONENT_TYPE_MESH, @@ -7689,6 +7690,11 @@ static void rna_def_space_spreadsheet(BlenderRNA *brna) ICON_NONE, "Original", "Use data from original object without any modifiers applied"}, + {SPREADSHEET_OBJECT_EVAL_STATE_VIEWER_NODE, + "VIEWER_NODE", + ICON_NONE, + "Viewer Node", + "Use intermediate data from viewer node"}, {0, NULL, 0, NULL, NULL}, }; @@ -7764,16 +7770,6 @@ static void rna_def_space_spreadsheet(BlenderRNA *brna) RNA_def_property_struct_type(prop, "SpreadsheetRowFilter"); RNA_def_property_ui_text(prop, "Row Filters", "Filters to remove rows from the displayed data"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); - - func = RNA_def_function( - srna, "set_geometry_node_context", "rna_spreadsheet_set_geometry_node_context"); - RNA_def_function_ui_description( - func, "Update context_path to point to a specific node in a node editor"); - parm = RNA_def_pointer( - func, "node_editor", "SpaceNodeEditor", "", "Editor to take the context from"); - RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); - parm = RNA_def_pointer(func, "node", "Node", "", ""); - RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); } void RNA_def_space(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index acf580e3ddf..98bed5a7891 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -553,7 +553,7 @@ static void uilist_filter_items(uiList *ui_list, RNA_parameter_dynamic_length_get(&list, parm), "filter_flags", len); - /* Note: we cannot return here, we would let flt_data in inconsistent state... see T38356. */ + /* NOTE: we cannot return here, we would let flt_data in inconsistent state... see T38356. */ filter_flags = NULL; } else { @@ -569,7 +569,7 @@ static void uilist_filter_items(uiList *ui_list, RNA_parameter_dynamic_length_get(&list, parm), "filter_neworder", len); - /* Note: we cannot return here, we would let flt_data in inconsistent state... see T38356. */ + /* NOTE: we cannot return here, we would let flt_data in inconsistent state... see T38356. */ filter_neworder = NULL; } else { diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 3b7af07479c..81f6bcc5805 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3460,7 +3460,7 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna) RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text( prop, "Keyframe Scale Factor", "Scale factor for adjusting the height of keyframes"); - /* Note: These limits prevent buttons overlapping (min), and excessive size... (max) */ + /* NOTE: These limits prevent buttons overlapping (min), and excessive size... (max). */ RNA_def_property_range(prop, 0.8f, 5.0f); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, "rna_userdef_theme_update"); @@ -6161,7 +6161,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) "Python Scripts Directory", "Alternate script path, matching the default layout with subdirectories: " "startup, addons, modules, and presets (requires restart)"); - /* TODO, editing should reset sys.path! */ + /* TODO: editing should reset sys.path! */ prop = RNA_def_property(srna, "i18n_branches_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "i18ndir"); diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index e7ca41bb5be..bde15daa682 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -641,7 +641,7 @@ static wmEvent *rna_Window_event_add_simulate(wmWindow *win, e.is_repeat = false; e.x = x; e.y = y; - /* Note: KM_MOD_FIRST, KM_MOD_SECOND aren't used anywhere, set as bools */ + /* NOTE: KM_MOD_FIRST, KM_MOD_SECOND aren't used anywhere, set as bools. */ e.shift = shift; e.ctrl = ctrl; e.alt = alt; diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c index e91df38c96e..98920bbd518 100644 --- a/source/blender/makesrna/intern/rna_wm_gizmo.c +++ b/source/blender/makesrna/intern/rna_wm_gizmo.c @@ -1097,7 +1097,7 @@ static void rna_def_gizmo(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); parm = RNA_def_pointer(func, "event", "Event", "", ""); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); - /* TODO, should be a enum-flag */ + /* TODO: should be a enum-flag. */ parm = RNA_def_enum_flag(func, "tweak", tweak_actions, 0, "Tweak", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_enum_flag( diff --git a/source/blender/makesrna/intern/rna_wm_gizmo_api.c b/source/blender/makesrna/intern/rna_wm_gizmo_api.c index b4b7e02a95b..d6f2ffca65f 100644 --- a/source/blender/makesrna/intern/rna_wm_gizmo_api.c +++ b/source/blender/makesrna/intern/rna_wm_gizmo_api.c @@ -263,7 +263,7 @@ void RNA_api_gizmo(StructRNA *srna) /* Property API */ /* Define Properties */ - /* note, 'target_set_handler' is defined in 'bpy_rna_gizmo.c' */ + /* NOTE: 'target_set_handler' is defined in `bpy_rna_gizmo.c`. */ func = RNA_def_function(srna, "target_set_prop", "rna_gizmo_target_set_prop"); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_function_ui_description(func, ""); @@ -292,7 +292,7 @@ void RNA_api_gizmo(StructRNA *srna) RNA_def_function_return(func, parm); /* Access Properties */ - /* note, 'target_get', 'target_set' is defined in 'bpy_rna_gizmo.c' */ + /* NOTE: 'target_get', 'target_set' is defined in `bpy_rna_gizmo.c`. */ func = RNA_def_function(srna, "target_is_valid", "rna_gizmo_target_is_valid"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "property", NULL, 0, "", "Property identifier"); |