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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index a2d783afc32..576f15731a0 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -126,8 +126,8 @@ void WM_operator_py_idname(char *to, const char *from)
if (sep) {
int ofs = (sep - from);
- /* note, we use ascii tolower instead of system tolower, because the
- * latter depends on the locale, and can lead to idname mismatch */
+ /* NOTE: we use ascii `tolower` instead of system `tolower`, because the
+ * latter depends on the locale, and can lead to `idname` mismatch. */
memcpy(to, from, sizeof(char) * ofs);
BLI_str_tolower_ascii(to, ofs);
@@ -604,6 +604,12 @@ void WM_operator_properties_create(PointerRNA *ptr, const char *opstring)
* used for keymaps and macros */
void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
{
+ IDProperty *tmp_properties = NULL;
+ /* Allow passing NULL for properties, just create the properties here then. */
+ if (properties == NULL) {
+ properties = &tmp_properties;
+ }
+
if (*properties == NULL) {
IDPropertyTemplate val = {0};
*properties = IDP_New(IDP_GROUP, &val, "wmOpItemProp");
@@ -745,7 +751,7 @@ static bool operator_last_properties_init_impl(wmOperator *op, IDProperty *last_
if (idp_src) {
IDProperty *idp_dst = IDP_CopyProperty(idp_src);
- /* note - in the future this may need to be done recursively,
+ /* NOTE: in the future this may need to be done recursively,
* but for now RNA doesn't access nested operators */
idp_dst->flag |= IDP_FLAG_GHOST;
@@ -1156,7 +1162,7 @@ bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFor
RNA_property_string_get(op->ptr, prop, filepath);
if (BKE_image_path_ensure_ext_from_imformat(filepath, im_format)) {
RNA_property_string_set(op->ptr, prop, filepath);
- /* note, we could check for and update 'filename' here,
+ /* NOTE: we could check for and update 'filename' here,
* but so far nothing needs this. */
return true;
}
@@ -2361,7 +2367,7 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void
strdrawlen = BLI_strlen_utf8(str);
break;
default:
- tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE; /* note, this is a dummy value */
+ tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE; /* NOTE: this is a dummy value. */
alpha = 0.75;
break;
}
@@ -3202,7 +3208,7 @@ static void redraw_timer_step(bContext *C,
int tot = (scene->r.efra - scene->r.sfra) + 1;
while (tot--) {
- /* todo, ability to escape! */
+ /* TODO: ability to escape! */
scene->r.cfra++;
if (scene->r.cfra > scene->r.efra) {
scene->r.cfra = scene->r.sfra;