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:
authorCampbell Barton <ideasman42@gmail.com>2014-04-01 04:34:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-01 08:22:28 +0400
commit617557b08ea94e2b65a1697ddf0b79651204d92b (patch)
tree50b24bab075b42fa20456140c9a9681cfb01325b /source/blender/editors
parent2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff)
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c6
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c16
-rw-r--r--source/blender/editors/animation/anim_deps.c2
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/animation/anim_markers.c12
-rw-r--r--source/blender/editors/animation/anim_ops.c8
-rw-r--r--source/blender/editors/animation/drivers.c24
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c80
-rw-r--r--source/blender/editors/animation/keyframing.c22
-rw-r--r--source/blender/editors/animation/keyingsets.c4
-rw-r--r--source/blender/editors/armature/armature_add.c6
-rw-r--r--source/blender/editors/armature/armature_edit.c4
-rw-r--r--source/blender/editors/armature/armature_ops.c42
-rw-r--r--source/blender/editors/armature/armature_select.c2
-rw-r--r--source/blender/editors/armature/armature_skinning.c2
-rw-r--r--source/blender/editors/armature/editarmature_generate.c2
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c10
-rw-r--r--source/blender/editors/armature/meshlaplacian.c8
-rw-r--r--source/blender/editors/armature/pose_edit.c4
-rw-r--r--source/blender/editors/armature/pose_group.c10
-rw-r--r--source/blender/editors/armature/pose_select.c4
-rw-r--r--source/blender/editors/armature/pose_slide.c12
-rw-r--r--source/blender/editors/armature/pose_transform.c12
-rw-r--r--source/blender/editors/armature/reeb.c6
-rw-r--r--source/blender/editors/curve/curve_ops.c16
-rw-r--r--source/blender/editors/curve/editcurve.c6
-rw-r--r--source/blender/editors/curve/editfont.c6
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_buttons.c36
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c16
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c18
-rw-r--r--source/blender/editors/include/ED_keyframing.h14
-rw-r--r--source/blender/editors/include/ED_mesh.h2
-rw-r--r--source/blender/editors/include/ED_view3d.h2
-rw-r--r--source/blender/editors/io/io_collada.c46
-rw-r--r--source/blender/editors/mask/mask_edit.c36
-rw-r--r--source/blender/editors/mask/mask_ops.c2
-rw-r--r--source/blender/editors/mask/mask_select.c2
-rw-r--r--source/blender/editors/mask/mask_shapekey.c4
-rw-r--r--source/blender/editors/mesh/editmesh_path.c2
-rw-r--r--source/blender/editors/mesh/editmesh_select.c4
-rw-r--r--source/blender/editors/metaball/mball_ops.c6
-rw-r--r--source/blender/editors/object/object_add.c58
-rw-r--r--source/blender/editors/object/object_bake.c12
-rw-r--r--source/blender/editors/object/object_constraint.c4
-rw-r--r--source/blender/editors/object/object_edit.c8
-rw-r--r--source/blender/editors/object/object_hook.c8
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_modifier.c50
-rw-r--r--source/blender/editors/object/object_ops.c34
-rw-r--r--source/blender/editors/object/object_relations.c40
-rw-r--r--source/blender/editors/object/object_select.c14
-rw-r--r--source/blender/editors/object/object_transform.c22
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c2
-rw-r--r--source/blender/editors/physics/particle_edit.c4
-rw-r--r--source/blender/editors/physics/particle_object.c8
-rw-r--r--source/blender/editors/physics/physics_fluid.c10
-rw-r--r--source/blender/editors/physics/physics_ops.c12
-rw-r--r--source/blender/editors/physics/physics_pointcache.c2
-rw-r--r--source/blender/editors/render/render_internal.c24
-rw-r--r--source/blender/editors/render/render_opengl.c16
-rw-r--r--source/blender/editors/render/render_preview.c36
-rw-r--r--source/blender/editors/render/render_shading.c12
-rw-r--r--source/blender/editors/render/render_update.c20
-rw-r--r--source/blender/editors/render/render_view.c2
-rw-r--r--source/blender/editors/screen/area.c8
-rw-r--r--source/blender/editors/screen/screen_edit.c26
-rw-r--r--source/blender/editors/screen/screen_intern.h4
-rw-r--r--source/blender/editors/screen/screen_ops.c60
-rw-r--r--source/blender/editors/screen/screendump.c13
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c40
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c12
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c90
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c28
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c40
-rw-r--r--source/blender/editors/sound/sound_ops.c12
-rw-r--r--source/blender/editors/space_action/action_edit.c4
-rw-r--r--source/blender/editors/space_action/action_ops.c52
-rw-r--r--source/blender/editors/space_action/action_select.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c2
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c16
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_ops.c4
-rw-r--r--source/blender/editors/space_clip/clip_editor.c14
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c6
-rw-r--r--source/blender/editors/space_clip/clip_ops.c4
-rw-r--r--source/blender/editors/space_clip/clip_toolbar.c2
-rw-r--r--source/blender/editors/space_clip/clip_utils.c2
-rw-r--r--source/blender/editors/space_clip/space_clip.c66
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c12
-rw-r--r--source/blender/editors/space_clip/tracking_select.c4
-rw-r--r--source/blender/editors/space_console/console_ops.c8
-rw-r--r--source/blender/editors/space_console/space_console.c12
-rw-r--r--source/blender/editors/space_file/file_ops.c14
-rw-r--r--source/blender/editors/space_file/file_panels.c8
-rw-r--r--source/blender/editors/space_file/filelist.c12
-rw-r--r--source/blender/editors/space_file/filesel.c18
-rw-r--r--source/blender/editors/space_file/fsmenu.c2
-rw-r--r--source/blender/editors/space_file/space_file.c30
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c64
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_graph/graph_edit.c18
-rw-r--r--source/blender/editors/space_graph/graph_intern.h2
-rw-r--r--source/blender/editors/space_graph/graph_ops.c66
-rw-r--r--source/blender/editors/space_graph/graph_select.c16
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
-rw-r--r--source/blender/editors/space_image/image_buttons.c54
-rw-r--r--source/blender/editors/space_image/image_edit.c6
-rw-r--r--source/blender/editors/space_image/image_ops.c58
-rw-r--r--source/blender/editors/space_image/space_image.c22
-rw-r--r--source/blender/editors/space_info/info_draw.c10
-rw-r--r--source/blender/editors/space_info/info_report.c2
-rw-r--r--source/blender/editors/space_logic/logic_ops.c4
-rw-r--r--source/blender/editors/space_logic/logic_window.c370
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c56
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c10
-rw-r--r--source/blender/editors/space_nla/nla_ops.c28
-rw-r--r--source/blender/editors/space_node/drawnode.c280
-rw-r--r--source/blender/editors/space_node/node_add.c2
-rw-r--r--source/blender/editors/space_node/node_buttons.c20
-rw-r--r--source/blender/editors/space_node/node_draw.c6
-rw-r--r--source/blender/editors/space_node/node_edit.c46
-rw-r--r--source/blender/editors/space_node/node_group.c22
-rw-r--r--source/blender/editors/space_node/node_ops.c34
-rw-r--r--source/blender/editors/space_node/node_relationships.c12
-rw-r--r--source/blender/editors/space_node/node_select.c30
-rw-r--r--source/blender/editors/space_node/node_templates.c26
-rw-r--r--source/blender/editors/space_node/node_view.c20
-rw-r--r--source/blender/editors/space_node/space_node.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c24
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c8
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c2
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c20
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c16
-rw-r--r--source/blender/editors/space_sequencer/sequencer_modifier.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_ops.c104
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c14
-rw-r--r--source/blender/editors/space_sequencer/sequencer_view.c6
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c6
-rw-r--r--source/blender/editors/space_text/space_text.c14
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c4
-rw-r--r--source/blender/editors/space_text/text_draw.c4
-rw-r--r--source/blender/editors/space_text/text_format.h2
-rw-r--r--source/blender/editors/space_text/text_format_lua.c2
-rw-r--r--source/blender/editors/space_text/text_format_osl.c2
-rw-r--r--source/blender/editors/space_text/text_format_py.c2
-rw-r--r--source/blender/editors/space_text/text_ops.c18
-rw-r--r--source/blender/editors/space_time/space_time.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c8
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c36
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c54
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c138
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c4
-rw-r--r--source/blender/editors/transform/transform.c30
-rw-r--r--source/blender/editors/transform/transform_conversions.c80
-rw-r--r--source/blender/editors/transform/transform_manipulator.c20
-rw-r--r--source/blender/editors/transform/transform_ops.c18
-rw-r--r--source/blender/editors/transform/transform_orientations.c6
-rw-r--r--source/blender/editors/util/ed_util.c2
-rw-r--r--source/blender/editors/util/editmode_undo.c4
-rw-r--r--source/blender/editors/util/undo.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c102
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c40
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c18
175 files changed, 1856 insertions, 1853 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 3f81bb35db5..44ac78ed358 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -3408,7 +3408,8 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi
Scene *scene = CTX_data_scene(C);
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short flag = 0, done = FALSE;
+ short flag = 0;
+ bool done = false;
float cfra;
/* get current frame */
@@ -3446,7 +3447,8 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
Scene *scene = CTX_data_scene(C);
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short flag = 0, done = FALSE;
+ short flag = 0;
+ bool done = false;
float cfra;
/* get current frame */
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index eb9881aa0b6..341e27a12bf 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -891,7 +891,7 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re
{
ListBase islands = {NULL, NULL};
Link *channel, *chanNext = NULL;
- short done = FALSE;
+ bool done = false;
/* don't waste effort on an empty list */
if (BLI_listbase_is_empty(list))
@@ -919,7 +919,7 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re
/* perform rearranging */
if (rearrange_func(&islands, island)) {
island->flag |= REORDER_ISLAND_MOVED;
- done = TRUE;
+ done = true;
}
}
}
@@ -2287,7 +2287,7 @@ static void ANIM_OT_channels_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
/* ******************* Rename Operator ***************************** */
@@ -2828,15 +2828,15 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf)
/* click-select */
/* XXX for now, only leftmouse.... */
WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "children_only", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "children_only", true);
/* rename */
WM_keymap_add_item(keymap, "ANIM_OT_channels_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
/* deselect all */
WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", true);
/* borderselect */
WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0);
@@ -2859,9 +2859,9 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "all", FALSE);
+ RNA_boolean_set(kmi->ptr, "all", false);
kmi = WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "all", FALSE);
+ RNA_boolean_set(kmi->ptr, "all", false);
/* rearranging */
RNA_enum_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_move", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "direction", REARRANGE_ANIMCHAN_UP);
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 71e405a2209..c0543862265 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -249,7 +249,7 @@ static void animchan_sync_fcurve(bAnimContext *ac, bAnimListElem *ale, FCurve **
/* get strip name, and check if this strip is selected */
seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all[");
- seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, FALSE);
+ seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, false);
if (seq_name) MEM_freeN(seq_name);
/* update selection status */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 9ec8b678f0b..6c28d05110f 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -921,7 +921,7 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id
if (ed) {
/* get strip name, and check if this strip is selected */
seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all[");
- seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, FALSE);
+ seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, false);
if (seq_name) MEM_freeN(seq_name);
}
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 49e136f6e95..9cba7d04c3e 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -1210,7 +1210,7 @@ static void MARKER_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
/* *********************** (de)select all ***************** */
@@ -1504,16 +1504,16 @@ void ED_keymap_marker(wmKeyConfig *keyconf)
WM_keymap_verify_item(keymap, "MARKER_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
#ifdef DURIAN_CAMERA_SWITCH
kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "camera", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "camera", true);
kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "camera", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "camera", true);
#else
(void)kmi;
#endif
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index cc2144c3617..072b4c4c201 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -66,25 +66,25 @@ static int change_frame_poll(bContext *C)
ScrArea *sa = CTX_wm_area(C);
/* XXX temp? prevent changes during render */
- if (G.is_rendering) return FALSE;
+ if (G.is_rendering) return false;
/* although it's only included in keymaps for regions using ED_KEYMAP_ANIMATION,
* this shouldn't show up in 3D editor (or others without 2D timeline view) via search
*/
if (sa) {
if (ELEM5(sa->spacetype, SPACE_TIME, SPACE_ACTION, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
- return TRUE;
+ return true;
}
else if (sa->spacetype == SPACE_IPO) {
/* NOTE: Graph Editor has special version which does some extra stuff.
* No need to show the generic error message for that case though!
*/
- return FALSE;
+ return false;
}
}
CTX_wm_operator_poll_msg_set(C, "Expected an timeline/animation area to be active");
- return FALSE;
+ return false;
}
/* Set the new frame number */
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index d96fa2ba853..808eb6656d3 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -163,13 +163,13 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde
/* Main Driver Management API calls:
* Add a new driver for the specified property on the given ID block
*/
-short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type)
+int ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
FCurve *fcu;
int array_index_max;
- int done = FALSE;
+ int done_tot;
/* validate pointer first - exit if failure */
RNA_id_pointer_create(id, &id_ptr);
@@ -249,21 +249,21 @@ short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int ar
}
/* set the done status */
- done += (fcu != NULL);
+ done_tot += (fcu != NULL);
}
/* done */
- return done;
+ return done_tot;
}
/* Main Driver Management API calls:
* Remove the driver for the specified property on the given ID block (if available)
*/
-short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag))
+bool ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag))
{
AnimData *adt;
FCurve *fcu;
- int success = 0;
+ bool success = false;
/* we don't check the validity of the path here yet, but it should be ok... */
adt = BKE_animdata_from_id(id);
@@ -282,7 +282,7 @@ short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_pat
free_fcurve(fcu);
/* done successfully */
- success |= 1;
+ success = true;
}
}
else {
@@ -295,7 +295,7 @@ short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_pat
BLI_remlink(&adt->drivers, fcu);
free_fcurve(fcu);
- success = 1;
+ success = true;
}
}
}
@@ -320,7 +320,7 @@ void free_anim_drivers_copybuf(void)
}
/* Checks if there is a driver in the copy/paste buffer */
-short ANIM_driver_can_paste(void)
+bool ANIM_driver_can_paste(void)
{
return (channeldriver_copypaste_buf != NULL);
}
@@ -330,7 +330,7 @@ short ANIM_driver_can_paste(void)
/* Main Driver Management API calls:
* Make a copy of the driver for the specified property on the given ID block
*/
-short ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
+bool ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
@@ -377,7 +377,7 @@ short ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int a
* Add a new driver for the specified property on the given ID block or replace an existing one
* with the driver + driver-curve data from the buffer
*/
-short ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
+bool ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
@@ -501,7 +501,7 @@ static int add_driver_button_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr = {{NULL}};
PropertyRNA *prop = NULL;
- short success = 0;
+ int success = 0;
int index;
const bool all = RNA_boolean_get(op->ptr, "all");
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 75ea133176c..48611633592 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -117,7 +117,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
RNA_pointer_create(id, &RNA_FModifierFunctionGenerator, fcm, &ptr);
/* basic settings (backdrop + mode selector + some padding) */
- /* col = uiLayoutColumn(layout, TRUE); */ /* UNUSED */
+ /* col = uiLayoutColumn(layout, true); */ /* UNUSED */
block = uiLayoutGetBlock(layout);
uiBlockBeginAlign(block);
but = uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, bwidth, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
@@ -136,7 +136,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
int maxXWidth;
/* draw polynomial order selector */
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
block = uiLayoutGetBlock(row);
but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0.5f * UI_UNIT_X, 0, bwidth, UI_UNIT_Y,
&data->poly_order, 1, 100, 0, 0,
@@ -155,7 +155,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
}
/* draw controls for each coefficient and a + sign at end of row */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
block = uiLayoutGetBlock(row);
cp = data->coefficients;
@@ -183,7 +183,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
uiDefBut(block, LABEL, 1, "+", 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
/* next coefficient on a new row */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
block = uiLayoutGetBlock(row);
}
else {
@@ -200,7 +200,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
unsigned int i;
/* draw polynomial order selector */
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
block = uiLayoutGetBlock(row);
but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width - 1.5 * UI_UNIT_X, UI_UNIT_Y,
&data->poly_order, 1, 100, 0, 0,
@@ -209,7 +209,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
/* draw controls for each pair of coefficients */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
block = uiLayoutGetBlock(row);
cp = data->coefficients;
@@ -236,7 +236,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
uiDefBut(block, LABEL, 1, ") \xc3\x97", 0, 0, 2 * UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
/* set up new row for the next pair of coefficients */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
block = uiLayoutGetBlock(row);
}
else
@@ -259,11 +259,11 @@ static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm
RNA_pointer_create(id, &RNA_FModifierFunctionGenerator, fcm, &ptr);
/* add the settings */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, &ptr, "function_type", 0, "", ICON_NONE);
uiItemR(col, &ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE); // no grouping for now
+ col = uiLayoutColumn(layout, false); // no grouping for now
uiItemR(col, &ptr, "amplitude", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "phase_multiplier", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "phase_offset", 0, NULL, ICON_NONE);
@@ -284,16 +284,16 @@ static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, shor
/* split into 2 columns
* NOTE: the mode comboboxes shouldn't get labels, otherwise there isn't enough room
*/
- split = uiLayoutSplit(layout, 0.5f, FALSE);
+ split = uiLayoutSplit(layout, 0.5f, false);
/* before range */
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemL(col, IFACE_("Before:"), ICON_NONE);
uiItemR(col, &ptr, "mode_before", 0, "", ICON_NONE);
uiItemR(col, &ptr, "cycles_before", 0, NULL, ICON_NONE);
/* after range */
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemL(col, IFACE_("After:"), ICON_NONE);
uiItemR(col, &ptr, "mode_after", 0, "", ICON_NONE);
uiItemR(col, &ptr, "cycles_after", 0, NULL, ICON_NONE);
@@ -314,16 +314,16 @@ static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short
uiItemR(layout, &ptr, "blend_type", 0, NULL, ICON_NONE);
/* split into 2 columns */
- split = uiLayoutSplit(layout, 0.5f, FALSE);
+ split = uiLayoutSplit(layout, 0.5f, false);
/* col 1 */
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiItemR(col, &ptr, "scale", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "strength", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "offset", 0, NULL, ICON_NONE);
/* col 2 */
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiItemR(col, &ptr, "phase", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "depth", 0, NULL, ICON_NONE);
}
@@ -425,18 +425,18 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
RNA_pointer_create(id, &RNA_FModifierEnvelope, fcm, &ptr);
/* general settings */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(col, IFACE_("Envelope:"), ICON_NONE);
uiItemR(col, &ptr, "reference_value", 0, NULL, ICON_NONE);
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE);
uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE);
/* control points header */
/* TODO: move this control-point control stuff to using the new special widgets for lists
* the current way is far too cramped */
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
block = uiLayoutGetBlock(row);
uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
@@ -448,7 +448,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
/* control points list */
for (i = 0, fed = env->data; i < env->totvert; i++, fed++) {
/* get a new row to operate on */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
block = uiLayoutGetBlock(row);
uiBlockBeginAlign(block);
@@ -481,36 +481,36 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor
/* row 1: minimum */
{
- /* row = uiLayoutRow(layout, FALSE); */ /* UNUSED */
+ /* row = uiLayoutRow(layout, false); */ /* UNUSED */
/* split into 2 columns */
- split = uiLayoutSplit(layout, 0.5f, FALSE);
+ split = uiLayoutSplit(layout, 0.5f, false);
/* x-minimum */
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemR(col, &ptr, "use_min_x", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "min_x", 0, NULL, ICON_NONE);
/* y-minimum*/
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemR(col, &ptr, "use_min_y", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "min_y", 0, NULL, ICON_NONE);
}
/* row 2: maximum */
{
- /* row = uiLayoutRow(layout, FALSE); */ /* UNUSED */
+ /* row = uiLayoutRow(layout, false); */ /* UNUSED */
/* split into 2 columns */
- split = uiLayoutSplit(layout, 0.5f, FALSE);
+ split = uiLayoutSplit(layout, 0.5f, false);
/* x-minimum */
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemR(col, &ptr, "use_max_x", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "max_x", 0, NULL, ICON_NONE);
/* y-minimum*/
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemR(col, &ptr, "use_max_y", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "max_y", 0, NULL, ICON_NONE);
}
@@ -528,23 +528,23 @@ static void draw_modifier__stepped(uiLayout *layout, ID *id, FModifier *fcm, sho
RNA_pointer_create(id, &RNA_FModifierStepped, fcm, &ptr);
/* block 1: "stepping" settings */
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, &ptr, "frame_step", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "frame_offset", 0, NULL, ICON_NONE);
/* block 2: start range settings */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, &ptr, "use_frame_start", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_start"));
uiItemR(sub, &ptr, "frame_start", 0, NULL, ICON_NONE);
/* block 3: end range settings */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, &ptr, "use_frame_end", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_end"));
uiItemR(sub, &ptr, "frame_end", 0, NULL, ICON_NONE);
}
@@ -568,11 +568,11 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifier
/* get layout-row + UI-block for this */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
block = uiLayoutGetBlock(row); // err...
/* left-align -------------------------------------------- */
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT);
uiBlockSetEmboss(block, UI_EMBOSSN);
@@ -590,7 +590,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifier
uiItemL(sub, IFACE_("<Unknown Modifier>"), ICON_NONE);
/* right-align ------------------------------------------- */
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT);
@@ -652,28 +652,28 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifier
box = uiLayoutBox(layout);
/* restricted range ----------------------------------------------------- */
- col = uiLayoutColumn(box, TRUE);
+ col = uiLayoutColumn(box, true);
/* top row: use restricted range */
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemR(row, &ptr, "use_restricted_range", 0, NULL, ICON_NONE);
if (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) {
/* second row: settings */
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemR(row, &ptr, "frame_start", 0, IFACE_("Start"), ICON_NONE);
uiItemR(row, &ptr, "frame_end", 0, IFACE_("End"), ICON_NONE);
/* third row: blending influence */
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemR(row, &ptr, "blend_in", 0, IFACE_("In"), ICON_NONE);
uiItemR(row, &ptr, "blend_out", 0, IFACE_("Out"), ICON_NONE);
}
/* influence -------------------------------------------------------------- */
- col = uiLayoutColumn(box, TRUE);
+ col = uiLayoutColumn(box, true);
/* top row: use influence */
uiItemR(col, &ptr, "use_influence", 0, NULL, ICON_NONE);
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index c2d8332b6fd..72402d498ba 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1367,7 +1367,7 @@ static int insert_key_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UN
else {
/* just call the exec() on the active keyingset */
RNA_enum_set(op->ptr, "type", 0);
- RNA_boolean_set(op->ptr, "confirm_success", TRUE);
+ RNA_boolean_set(op->ptr, "confirm_success", true);
return op->type->exec(C, op);
}
@@ -1511,7 +1511,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op))
FCurve *fcu, *fcn;
for (fcu = act->curves.first; fcu; fcu = fcn) {
- short can_delete = FALSE;
+ bool can_delete = false;
fcn = fcu->next;
@@ -1529,13 +1529,13 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op))
/* delete if bone is selected*/
if ((pchan) && (pchan->bone)) {
if (pchan->bone->flag & BONE_SELECTED)
- can_delete = TRUE;
+ can_delete = true;
}
}
}
else {
/* object mode - all of Object's F-Curves are affected */
- can_delete = TRUE;
+ can_delete = true;
}
/* delete F-Curve completely */
@@ -1930,7 +1930,7 @@ bool fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter)
/* Checks whether an Action has a keyframe for a given frame
* Since we're only concerned whether a keyframe exists, we can simply loop until a match is found...
*/
-static short action_frame_has_keyframe(bAction *act, float frame, short filter)
+static bool action_frame_has_keyframe(bAction *act, float frame, short filter)
{
FCurve *fcu;
@@ -1958,7 +1958,7 @@ static short action_frame_has_keyframe(bAction *act, float frame, short filter)
}
/* Checks whether an Object has a keyframe for a given frame */
-static short object_frame_has_keyframe(Object *ob, float frame, short filter)
+static bool object_frame_has_keyframe(Object *ob, float frame, short filter)
{
/* error checking */
if (ob == NULL)
@@ -2016,7 +2016,7 @@ static short object_frame_has_keyframe(Object *ob, float frame, short filter)
/* --------------- API ------------------- */
/* Checks whether a keyframe exists for the given ID-block one the given frame */
-short id_frame_has_keyframe(ID *id, float frame, short filter)
+bool id_frame_has_keyframe(ID *id, float frame, short filter)
{
/* sanity checks */
if (id == NULL)
@@ -2064,10 +2064,10 @@ bool ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
BLI_freelistN(&dsources);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
}
@@ -2090,7 +2090,7 @@ bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *
pchan->bone->flag &= ~BONE_UNKEYED;
}
- return TRUE;
+ return true;
}
else {
/* add unkeyed tags */
@@ -2098,6 +2098,6 @@ bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *
pchan->bone->flag |= BONE_UNKEYED;
}
- return FALSE;
+ return false;
}
}
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 9d8fc708de6..3e7009337a8 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -783,7 +783,7 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(pt
/* Polling API ----------------------------------------------- */
/* Check if KeyingSet can be used in the current context */
-short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks)
+bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks)
{
if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) {
KeyingSetInfo *ksi = ANIM_keyingset_info_find_name(ks->typeinfo);
@@ -797,7 +797,7 @@ short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks)
return (ksi->poll(ksi, C));
}
- return 1;
+ return true;
}
/* Special 'Overrides' Iterator for Relative KeyingSets ------ */
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index 456dd802086..52a8137f27f 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -548,9 +548,9 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
for (ebone = arm->edbo->first; ((ebone) && (ebone != first)); ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone)) {
/* we extrude per definition the tip */
- do_extrude = FALSE;
+ do_extrude = false;
if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED)) {
- do_extrude = TRUE;
+ do_extrude = true;
}
else if (ebone->flag & BONE_ROOTSEL) {
/* but, a bone with parent deselected we do the root... */
@@ -589,7 +589,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
totbone++;
newbone = MEM_callocN(sizeof(EditBone), "extrudebone");
- if (do_extrude == TRUE) {
+ if (do_extrude == true) {
copy_v3_v3(newbone->head, ebone->tail);
copy_v3_v3(newbone->tail, newbone->head);
newbone->parent = ebone;
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 63869f50c1b..e5e4ee9bf08 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -268,8 +268,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
const short type = RNA_enum_get(op->ptr, "type");
- const short axis_only = RNA_boolean_get(op->ptr, "axis_only");
- const short axis_flip = RNA_boolean_get(op->ptr, "axis_flip");
+ const bool axis_only = RNA_boolean_get(op->ptr, "axis_only");
+ const bool axis_flip = RNA_boolean_get(op->ptr, "axis_flip");
float imat[3][3];
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index be23c285cf7..f3c23c1f202 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -179,7 +179,7 @@ void ED_operatormacros_armature(void)
"Create new bones from the selected joints and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
- RNA_boolean_set(otmacro->ptr, "forked", FALSE);
+ RNA_boolean_set(otmacro->ptr, "forked", false);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
@@ -189,7 +189,7 @@ void ED_operatormacros_armature(void)
"Create new bones from the selected joints and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
- RNA_boolean_set(otmacro->ptr, "forked", TRUE);
+ RNA_boolean_set(otmacro->ptr, "forked", true);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
}
@@ -215,16 +215,16 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "snap", TRUE);
+ RNA_boolean_set(kmi->ptr, "snap", true);
WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0);
kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "snap", TRUE);
+ RNA_boolean_set(kmi->ptr, "snap", true);
/* only set in editmode armature, by space_view3d listener */
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
@@ -243,21 +243,21 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
WM_keymap_add_item(keymap, "ARMATURE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
@@ -315,9 +315,9 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "POSE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
@@ -334,16 +334,16 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "flipped", FALSE);
+ RNA_boolean_set(kmi->ptr, "flipped", false);
kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "flipped", TRUE);
+ RNA_boolean_set(kmi->ptr, "flipped", true);
#ifdef __APPLE__
WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0);
kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0);
- RNA_boolean_set(kmi->ptr, "flipped", FALSE);
+ RNA_boolean_set(kmi->ptr, "flipped", false);
kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_OSKEY | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "flipped", TRUE);
+ RNA_boolean_set(kmi->ptr, "flipped", true);
#endif
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0);
@@ -355,17 +355,17 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "POSE_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index d51b27aefb8..e420e56fdb0 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -256,7 +256,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
}
/* does bones and points */
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index e3059e113d6..560af2dbd0b 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -272,7 +272,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
if (numbones == 0)
return;
- if (ED_vgroup_data_create(ob->data) == FALSE)
+ if (ED_vgroup_data_create(ob->data) == false)
return;
/* create an array of pointer to bones that are skinnable
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index 179e0a97c9d..4eb9e3ecc79 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -39,7 +39,7 @@ void setBoneRollFromNormal(EditBone *bone, const float no[3], float UNUSED(invma
copy_v3_v3(normal, no);
mul_m3_v3(tmat, normal);
- bone->roll = ED_rollBoneToVector(bone, normal, FALSE);
+ bone->roll = ED_rollBoneToVector(bone, normal, false);
}
}
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index a0411f246c8..8f71f722525 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -159,11 +159,11 @@ static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float q
if (angle_normalized_v3v3(x_axis, new_up_axis) < angle_normalized_v3v3(z_axis, new_up_axis)) {
rotation_between_vecs_to_quat(qroll, new_up_axis, x_axis); /* set roll rotation quat */
- return ED_rollBoneToVector(bone, x_axis, FALSE);
+ return ED_rollBoneToVector(bone, x_axis, false);
}
else {
rotation_between_vecs_to_quat(qroll, new_up_axis, z_axis); /* set roll rotation quat */
- return ED_rollBoneToVector(bone, z_axis, FALSE);
+ return ED_rollBoneToVector(bone, z_axis, false);
}
}
@@ -208,7 +208,7 @@ static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4]
/* real qroll between normal and up_axis */
rotation_between_vecs_to_quat(qroll, new_up_axis, normal);
- return ED_rollBoneToVector(edge->bone, normal, FALSE);
+ return ED_rollBoneToVector(edge->bone, normal, false);
}
}
@@ -219,7 +219,7 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4])
copy_v3_v3(new_up_axis, old_up_axis);
mul_qt_v3(qrot, new_up_axis);
- return ED_rollBoneToVector(bone, new_up_axis, FALSE);
+ return ED_rollBoneToVector(bone, new_up_axis, false);
}
/************************************ DESTRUCTORS ******************************************************/
@@ -1129,7 +1129,7 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
}
}
-static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bone, RigNode *starting_node, int selected)
+static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bone, RigNode *starting_node, bool selected)
{
EditBone *bone, *last_bone = root_bone;
RigArc *arc = NULL;
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index bc47a673365..c2a54c6d9f8 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -635,8 +635,8 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
bool use_topology = (me->editflag & ME_EDIT_MIRROR_TOPO) != 0;
MVert *mvert = me->mvert;
- int use_vert_sel = FALSE;
- int use_face_sel = FALSE;
+ bool use_vert_sel = false;
+ bool use_face_sel = false;
*err_str = NULL;
@@ -662,9 +662,7 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
if (use_vert_sel) {
for (a = 0, mp = me->mpoly; a < me->totpoly; mp++, a++) {
for (j = 0, ml = me->mloop + mp->loopstart; j < mp->totloop; j++, ml++) {
- if (use_vert_sel) {
- mask[ml->v] = (mvert[ml->v].flag & SELECT) != 0;
- }
+ mask[ml->v] = (mvert[ml->v].flag & SELECT) != 0;
}
}
}
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index d1c096e6cf5..b354facb9b3 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -424,7 +424,7 @@ static void pose_copy_menu(Scene *scene)
/* copy constraints to tmpbase and apply 'local' tags before
* appending to list of constraints for this channel
*/
- BKE_copy_constraints(&tmp_constraints, &pchanact->constraints, TRUE);
+ BKE_copy_constraints(&tmp_constraints, &pchanact->constraints, true);
if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
bConstraint *con;
@@ -536,7 +536,7 @@ static void pose_copy_menu(Scene *scene)
/* copy constraints to tmpbase and apply 'local' tags before
* appending to list of constraints for this channel
*/
- BKE_copy_constraints(&tmp_constraints, &const_copy, TRUE);
+ BKE_copy_constraints(&tmp_constraints, &const_copy, true);
if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
/* add proxy-local tags */
for (con = tmp_constraints.first; con; con = con->next)
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index d2d48fce8e6..376c1bc0838 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -176,7 +176,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_pose_object_from_context(C);
bPose *pose;
- short done = FALSE;
+ bool done = false;
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
@@ -195,7 +195,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
pchan->agrp_index = pose->active_group;
- done = TRUE;
+ done = true;
}
CTX_DATA_END;
@@ -232,7 +232,7 @@ void POSE_OT_group_assign(wmOperatorType *ot)
static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_pose_object_from_context(C);
- short done = FALSE;
+ bool done = false;
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
@@ -243,7 +243,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
{
if (pchan->agrp_index) {
pchan->agrp_index = 0;
- done = TRUE;
+ done = true;
}
}
CTX_DATA_END;
@@ -438,7 +438,7 @@ void POSE_OT_group_sort(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static void pose_group_select(bContext *C, Object *ob, int select)
+static void pose_group_select(bContext *C, Object *ob, bool select)
{
bPose *pose = ob->pose;
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index 4038200d0a0..a852f47ba4b 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -332,7 +332,7 @@ void POSE_OT_select_linked(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
}
/* -------------------------------------- */
@@ -846,7 +846,7 @@ void POSE_OT_select_grouped(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
ot->prop = RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
}
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index ec49dad69b5..56cc5c5b1ee 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -1013,11 +1013,11 @@ static float pose_propagate_get_boneHoldEndFrame(Object *ob, tPChanFCurveLink *p
}
/* get reference value from F-Curve using RNA */
-static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value)
+static bool pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short found = FALSE;
+ bool found = false;
/* base pointer is always the object -> id_ptr */
RNA_id_pointer_create(&ob->id, &id_ptr);
@@ -1027,7 +1027,7 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value)
if (RNA_property_array_check(prop)) {
/* array */
if (fcu->array_index < RNA_property_array_length(&ptr, prop)) {
- found = TRUE;
+ found = true;
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
*value = (float)RNA_property_boolean_get_index(&ptr, prop, fcu->array_index);
@@ -1039,14 +1039,14 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value)
*value = RNA_property_float_get_index(&ptr, prop, fcu->array_index);
break;
default:
- found = FALSE;
+ found = false;
break;
}
}
}
else {
/* not an array */
- found = TRUE;
+ found = true;
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
*value = (float)RNA_property_boolean_get(&ptr, prop);
@@ -1061,7 +1061,7 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value)
*value = RNA_property_float_get(&ptr, prop);
break;
default:
- found = FALSE;
+ found = false;
break;
}
}
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index 5fba6554b8c..094af99776b 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -78,7 +78,7 @@ static void applyarmature_fix_boneparents(Scene *scene, Object *armob)
/* apply current transform from parent (not yet destroyed),
* then calculate new parent inverse matrix
*/
- BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, false, false);
BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
@@ -218,7 +218,7 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
*/
BKE_armature_mat_pose_to_bone(pchan, pchan->pose_mat, delta_mat);
- BKE_pchan_apply_mat4(pchan, delta_mat, TRUE);
+ BKE_pchan_apply_mat4(pchan, delta_mat, true);
}
CTX_DATA_END;
@@ -521,10 +521,10 @@ void POSE_OT_paste(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop = RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
+ prop = RNA_def_boolean(ot->srna, "flipped", false, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- RNA_def_boolean(ot->srna, "selected_mask", FALSE, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose");
+ RNA_def_boolean(ot->srna, "selected_mask", false, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose");
}
/* ********************************************** */
@@ -812,7 +812,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
float cframe = (float)CFRA;
- const short only_select = RNA_boolean_get(op->ptr, "only_selected");
+ const bool only_select = RNA_boolean_get(op->ptr, "only_selected");
if ((ob->adt) && (ob->adt->action)) {
/* XXX: this is just like this to avoid contaminating anything else;
@@ -879,5 +879,5 @@ void POSE_OT_user_transforms_clear(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "only_selected", TRUE, "Only Selected", "Only visible/selected bones");
+ RNA_def_boolean(ot->srna, "only_selected", true, "Only Selected", "Only visible/selected bones");
}
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index e36b5c808dc..8cc6059e87b 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -1796,7 +1796,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
static void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external)
{
- int done = TRUE;
+ bool done = true;
calculateGraphLength(rg);
@@ -1810,8 +1810,8 @@ static void filterGraph(ReebGraph *rg, short options, float threshold_internal,
if (threshold_internal > 0 || threshold_external > 0) {
/* filter until there's nothing more to do */
- while (done == 1) {
- done = FALSE; /* no work done yet */
+ while (done == true) {
+ done = false; /* no work done yet */
done = filterInternalExternalReebGraph(rg, threshold_internal, threshold_external);
}
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 4f95bceddb3..f1b34182439 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -155,14 +155,14 @@ void ED_operatormacros_curve(void)
WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
- RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
+ RNA_boolean_set(otmacro->ptr, "mirror", false);
ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move",
"Extrude curve and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
- RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
+ RNA_boolean_set(otmacro->ptr, "mirror", false);
}
void ED_keymap_curve(wmKeyConfig *keyconf)
@@ -225,7 +225,7 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "FONT_OT_line_break", RETKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FONT_OT_text_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last!
kmi = WM_keymap_add_item(keymap, "FONT_OT_text_insert", BACKSPACEKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "accent", TRUE); /* accented characters */
+ RNA_boolean_set(kmi->ptr, "accent", true); /* accented characters */
/* only set in editmode curve, by space_view3d listener */
keymap = WM_keymap_find(keyconf, "Curve", 0, 0);
@@ -248,9 +248,9 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CURVE_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
WM_keymap_add_item(keymap, "CURVE_OT_separate", PKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CURVE_OT_split", YKEY, KM_PRESS, 0, 0);
@@ -268,9 +268,9 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CURVE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "CURVE_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0);
@@ -282,5 +282,5 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "VIEW3D_MT_hook", HKEY, KM_PRESS, KM_CTRL, 0);
ED_keymap_proportional_cycle(keyconf, keymap);
- ED_keymap_proportional_editmode(keyconf, keymap, TRUE);
+ ED_keymap_proportional_editmode(keyconf, keymap, true);
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 7444f9e433b..9c0909b67f2 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -4133,11 +4133,11 @@ static bool is_u_selected(Nurb *nu, int u)
bp = &nu->bp[u];
for (v = 0; v < nu->pntsv - 1; v++, bp += nu->pntsu) {
if ((v != 0) && (bp->f1 & SELECT)) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
typedef struct NurbSort {
@@ -7014,7 +7014,7 @@ static int match_texture_space_exec(bContext *C, wmOperator *UNUSED(op))
int a;
if (object->curve_cache == NULL) {
- BKE_displist_make_curveTypes(scene, object, FALSE);
+ BKE_displist_make_curveTypes(scene, object, false);
}
INIT_MINMAX(min, max);
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index b7b25b2fdec..5c067e80619 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -973,7 +973,7 @@ static EnumPropertyItem move_type_items[] = {
{NEXT_PAGE, "NEXT_PAGE", 0, "Next Page", ""},
{0, NULL, 0, NULL, NULL}};
-static int move_cursor(bContext *C, int type, int select)
+static int move_cursor(bContext *C, int type, const bool select)
{
Object *obedit = CTX_data_edit_object(C);
Curve *cu = obedit->data;
@@ -1083,7 +1083,7 @@ static int move_exec(bContext *C, wmOperator *op)
{
int type = RNA_enum_get(op->ptr, "type");
- return move_cursor(C, type, 0);
+ return move_cursor(C, type, false);
}
void FONT_OT_move(wmOperatorType *ot)
@@ -1110,7 +1110,7 @@ static int move_select_exec(bContext *C, wmOperator *op)
{
int type = RNA_enum_get(op->ptr, "type");
- return move_cursor(C, type, 1);
+ return move_cursor(C, type, true);
}
void FONT_OT_move_select(wmOperatorType *ot)
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index c10f081b4fa..a4597b6bf6c 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -782,7 +782,7 @@ void draw_gpencil_view3d(Scene *scene, View3D *v3d, ARegion *ar, bool only3d)
* deal with the camera border, otherwise map the coords to the camera border. */
if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) {
rctf rectf;
- ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, TRUE); /* no shift */
+ ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, true); /* no shift */
offsx = iroundf(rectf.xmin);
offsy = iroundf(rectf.ymin);
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c
index 5f829a1cb27..481323992d0 100644
--- a/source/blender/editors/gpencil/gpencil_buttons.c
+++ b/source/blender/editors/gpencil/gpencil_buttons.c
@@ -134,14 +134,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
/* get layout-row + UI-block for header */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND);
block = uiLayoutGetBlock(row); /* err... */
uiBlockSetEmboss(block, UI_EMBOSSN);
/* left-align ............................... */
- sub = uiLayoutRow(row, FALSE);
+ sub = uiLayoutRow(row, false);
/* active */
block = uiLayoutGetBlock(sub);
@@ -172,7 +172,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
/* delete button (only if hidden but not locked!) */
if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED)) {
/* right-align ............................... */
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT);
block = uiLayoutGetBlock(sub); /* XXX... err... */
@@ -216,7 +216,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
/* delete 'button' */
uiBlockSetEmboss(block, UI_EMBOSSN);
/* right-align ............................... */
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT);
block = uiLayoutGetBlock(sub); /* XXX... err... */
@@ -227,14 +227,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
/* new backdrop ----------------------------------- */
box = uiLayoutBox(layout);
- split = uiLayoutSplit(box, 0.5f, FALSE);
+ split = uiLayoutSplit(box, 0.5f, false);
/* draw settings ---------------------------------- */
/* left column ..................... */
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
/* color */
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiItemR(sub, &ptr, "color", 0, "", ICON_NONE);
uiItemR(sub, &ptr, "alpha", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -247,10 +247,10 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
}
/* right column ................... */
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
/* onion-skinning */
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiItemR(sub, &ptr, "use_onion_skinning", 0, NULL, ICON_NONE);
uiItemR(sub, &ptr, "ghost_range_max", 0, IFACE_("Frames"), ICON_NONE);
@@ -273,14 +273,14 @@ static void draw_gpencil_space_specials(const bContext *C, uiLayout *layout)
uiLayout *col, *row;
SpaceClip *sc = CTX_wm_space_clip(C);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
if (sc) {
bScreen *screen = CTX_wm_screen(C);
PointerRNA sc_ptr;
RNA_pointer_create(&screen->id, &RNA_SpaceClipEditor, sc, &sc_ptr);
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemR(row, &sc_ptr, "grease_pencil_source", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
}
@@ -299,7 +299,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
RNA_id_pointer_create((ID *)gpd, &gpd_ptr);
/* draw gpd settings first ------------------------------------- */
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
/* current Grease Pencil block */
/* TODO: show some info about who owns this? */
@@ -307,7 +307,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
/* add new layer button - can be used even when no data, since it can add a new block too */
uiItemO(col, IFACE_("New Layer"), ICON_NONE, "GPENCIL_OT_layer_add");
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemO(row, IFACE_("Delete Frame"), ICON_NONE, "GPENCIL_OT_active_frame_delete");
uiItemO(row, IFACE_("Convert"), ICON_NONE, "GPENCIL_OT_convert");
@@ -317,12 +317,12 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
/* draw each layer --------------------------------------------- */
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
gp_drawui_layer(col, gpd, gpl, is_v3d);
}
/* draw gpd drawing settings first ------------------------------------- */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
/* label */
uiItemL(col, IFACE_("Drawing Settings:"), ICON_NONE);
@@ -335,17 +335,17 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
}
/* drawing space options */
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "VIEW", NULL, ICON_NONE);
uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "CURSOR", NULL, ICON_NONE);
if (sc == NULL) {
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiLayoutSetActive(row, v3d_stroke_opts);
uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "SURFACE", NULL, ICON_NONE);
uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "STROKE", NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiLayoutSetActive(row, v3d_stroke_opts == STROKE_OPTS_V3D_ON);
uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 94400682f9e..092951be3da 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -757,8 +757,8 @@ static void gp_stroke_path_animation(bContext *C, ReportList *reports, Curve *cu
prop = RNA_struct_find_property(&ptr, "eval_time");
/* Ensure we have an F-Curve to add keyframes to */
- act = verify_adt_action((ID *)cu, TRUE);
- fcu = verify_fcurve(act, NULL, &ptr, "eval_time", 0, TRUE);
+ act = verify_adt_action((ID *)cu, true);
+ fcu = verify_fcurve(act, NULL, &ptr, "eval_time", 0, true);
if (G.debug & G_DEBUG) {
printf("%s: tot len: %f\t\ttot time: %f\n", __func__, gtd->tot_dist, gtd->tot_time);
@@ -1392,7 +1392,7 @@ static int gp_camera_view_subrect(bContext *C, rctf *subrect)
/* for camera view set the subrect */
if (rv3d->persp == RV3D_CAMOB) {
Scene *scene = CTX_data_scene(C);
- ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, TRUE); /* no shift */
+ ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, true); /* no shift */
return 1;
}
}
@@ -1673,7 +1673,7 @@ static bool gp_convert_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop)
/* Never show this prop */
if (strcmp(prop_id, "use_timing_data") == 0)
- return FALSE;
+ return false;
if (link_strokes) {
/* Only show when link_stroke is true */
@@ -1749,11 +1749,11 @@ void GPENCIL_OT_convert(wmOperatorType *ot)
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", prop_gpencil_convertmodes, 0, "Type", "Which type of curve to convert to");
- RNA_def_boolean(ot->srna, "use_normalize_weights", TRUE, "Normalize Weight",
+ RNA_def_boolean(ot->srna, "use_normalize_weights", true, "Normalize Weight",
"Normalize weight (set from stroke width)");
RNA_def_float(ot->srna, "radius_multiplier", 1.0f, 0.0f, 1000.0f, "Radius Fac",
"Multiplier for the points' radii (set from stroke width)", 0.0f, 10.0f);
- RNA_def_boolean(ot->srna, "use_link_strokes", TRUE, "Link Strokes",
+ RNA_def_boolean(ot->srna, "use_link_strokes", true, "Link Strokes",
"Whether to link strokes with zero-radius sections of curves");
prop = RNA_def_enum(ot->srna, "timing_mode", prop_gpencil_convert_timingmodes, GP_STROKECONVERT_TIMING_FULL,
@@ -1764,7 +1764,7 @@ void GPENCIL_OT_convert(wmOperatorType *ot)
"The duration of evaluation of the path control curve", 1, 1000);
RNA_def_int(ot->srna, "start_frame", 1, 1, 100000, "Start Frame",
"The start frame of the path control curve", 1, 100000);
- RNA_def_boolean(ot->srna, "use_realtime", FALSE, "Realtime",
+ RNA_def_boolean(ot->srna, "use_realtime", false, "Realtime",
"Whether the path control curve reproduces the drawing in realtime, starting from Start Frame");
prop = RNA_def_int(ot->srna, "end_frame", 250, 1, 100000, "End Frame",
"The end frame of the path control curve (if Realtime is not set)", 1, 100000);
@@ -1779,7 +1779,7 @@ void GPENCIL_OT_convert(wmOperatorType *ot)
"Custom Gap mode: Random generator seed", 0, 100);
/* Note: Internal use, this one will always be hidden by UI code... */
- prop = RNA_def_boolean(ot->srna, "use_timing_data", FALSE, "Has Valid Timing",
+ prop = RNA_def_boolean(ot->srna, "use_timing_data", false, "Has Valid Timing",
"Whether the converted Grease Pencil layer has valid timing data (internal use)");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 05d56458a3f..65f205c2f2f 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -668,16 +668,16 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) &&
(i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
{
- interp_depth = TRUE;
+ interp_depth = true;
}
else {
- found_depth = TRUE;
+ found_depth = true;
}
copy_v2_v2_int(mval_prev, mval);
}
- if (found_depth == FALSE) {
+ if (found_depth == false) {
/* eeh... not much we can do.. :/, ignore depth in this case, use the 3D cursor */
for (i = gpd->sbuffer_size - 1; i >= 0; i--)
depth_arr[i] = 0.9999f;
@@ -704,7 +704,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
for (i = first_valid + 1; i < last_valid; i++)
depth_arr[i] = FLT_MAX;
- interp_depth = TRUE;
+ interp_depth = true;
}
if (interp_depth) {
@@ -886,11 +886,11 @@ static short gp_stroke_eraser_strokeinside(const int mval[2], const int UNUSED(m
const float screen_co_b[2] = {x1, y1};
if (edge_inside_circle(mval_fl, rad, screen_co_a, screen_co_b)) {
- return TRUE;
+ return true;
}
/* not inside */
- return FALSE;
+ return false;
}
static void gp_point_to_xy(ARegion *ar, View2D *v2d, rctf *subrect, bGPDstroke *gps, bGPDspoint *pt,
@@ -1280,7 +1280,7 @@ static void gp_paint_initstroke(tGPsdata *p, short paintmode)
/* for camera view set the subrect */
if (rv3d->persp == RV3D_CAMOB) {
- ED_view3d_calc_camera_border(p->scene, p->ar, v3d, rv3d, &p->subrect_data, TRUE); /* no shift */
+ ED_view3d_calc_camera_border(p->scene, p->ar, v3d, rv3d, &p->subrect_data, true); /* no shift */
p->subrect = &p->subrect_data;
}
}
@@ -1438,7 +1438,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op)
/* check size of buffer before cleanup, to determine if anything happened here */
if (p->paintmode == GP_PAINTMODE_ERASER) {
/* turn off radial brush cursor */
- gpencil_draw_toggle_eraser_cursor(C, p, FALSE);
+ gpencil_draw_toggle_eraser_cursor(C, p, false);
/* if successful, store the new eraser size to be used again next time */
if (p->status == GP_STATUS_DONE)
@@ -1758,7 +1758,7 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event
/* if eraser is on, draw radial aid */
if (p->paintmode == GP_PAINTMODE_ERASER) {
- gpencil_draw_toggle_eraser_cursor(C, p, TRUE);
+ gpencil_draw_toggle_eraser_cursor(C, p, true);
}
/* set cursor */
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index a73b8821173..7543e170c9d 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -224,7 +224,7 @@ struct KeyingSet *ANIM_get_keyingset_for_autokeying(struct Scene *scene, const c
struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
/* Check if KeyingSet can be used in the current context */
-short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks);
+bool ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks);
/* ************ Drivers ********************** */
@@ -244,28 +244,28 @@ struct FCurve *verify_driver_fcurve(struct ID *id, const char rna_path[], const
/* -------- */
/* Returns whether there is a driver in the copy/paste buffer to paste */
-short ANIM_driver_can_paste(void);
+bool ANIM_driver_can_paste(void);
/* Main Driver Management API calls:
* Add a new driver for the specified property on the given ID block
*/
-short ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type);
+int ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type);
/* Main Driver Management API calls:
* Remove the driver for the specified property on the given ID block (if available)
*/
-short ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
+bool ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
/* Main Driver Management API calls:
* Make a copy of the driver for the specified property on the given ID block
*/
-short ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
+bool ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
/* Main Driver Management API calls:
* Add a new driver for the specified property on the given ID block or replace an existing one
* with the driver + driver-curve data from the buffer
*/
-short ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
+bool ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
/* ************ Auto-Keyframing ********************** */
/* Notes:
@@ -305,7 +305,7 @@ bool fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter);
* in case some detail of the implementation changes...
* - frame: the value of this is quite often result of BKE_scene_frame_get()
*/
-short id_frame_has_keyframe(struct ID *id, float frame, short filter);
+bool id_frame_has_keyframe(struct ID *id, float frame, short filter);
/* filter flags for id_cfra_has_keyframe
*
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 6c07e5eeec7..ebc97c58e24 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -166,7 +166,7 @@ bool EDBM_selectmode_disable(struct Scene *scene, struct BMEditMesh *em,
const short selectmode_disable,
const short selectmode_fallback);
-void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const short select);
+void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const bool select);
void EDBM_select_toggle_all(struct BMEditMesh *em);
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index d0200bbe01a..377bb7cebb1 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -329,7 +329,7 @@ bool ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d);
/* copy the camera to the view before starting a view transformation */
void ED_view3d_camera_lock_init_ex(struct View3D *v3d, struct RegionView3D *rv3d, const bool calc_dist);
void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d);
-/* copy the view to the camera, return TRUE if */
+/* copy the view to the camera, return true if */
bool ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d);
void ED_view3D_lock_clear(struct View3D *v3d);
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index f50e4400b91..4d2ea0e64f4 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -184,76 +184,76 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
/* Export Options: */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemL(row, IFACE_("Export Data Options:"), ICON_MESH_DATA);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
split = uiLayoutSplit(row, 0.6f, UI_LAYOUT_ALIGN_RIGHT);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiItemR(col, imfptr, "apply_modifiers", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiItemR(col, imfptr, "export_mesh_type_selection", 0, "", ICON_NONE);
uiLayoutSetEnabled(col, RNA_boolean_get(imfptr, "apply_modifiers"));
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "selected", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "include_children", 0, NULL, ICON_NONE);
uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected"));
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "include_armatures", 0, NULL, ICON_NONE);
uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected"));
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "include_shapekeys", 0, NULL, ICON_NONE);
uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected"));
/* Texture options */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemL(row, IFACE_("Texture Options:"), ICON_TEXTURE_DATA);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "active_uv_only", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "include_uv_textures", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "include_material_textures", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "use_texture_copies", 1, NULL, ICON_NONE);
/* Armature options */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemL(row, IFACE_("Armature Options:"), ICON_ARMATURE_DATA);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "open_sim", 0, NULL, ICON_NONE);
/* Collada options: */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemL(row, IFACE_("Collada Options:"), ICON_MODIFIER);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "triangulate", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "use_object_instantiation", 0, NULL, ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
split = uiLayoutSplit(row, 0.6f, UI_LAYOUT_ALIGN_RIGHT);
uiItemL(split, IFACE_("Transformation Type"), ICON_NONE);
uiItemR(split, imfptr, "export_transformation_type_selection", 0, "", ICON_NONE);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "sort_by_name", 0, NULL, ICON_NONE);
}
@@ -385,10 +385,10 @@ static void uiCollada_importSettings(uiLayout *layout, PointerRNA *imfptr)
/* Import Options: */
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemL(row, IFACE_("Import Data Options:"), ICON_MESH_DATA);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "import_units", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c
index af4645e31ec..e27f36e5a4c 100644
--- a/source/blender/editors/mask/mask_edit.c
+++ b/source/blender/editors/mask/mask_edit.c
@@ -69,7 +69,7 @@ int ED_maskedit_poll(bContext *C)
return ED_space_image_maskedit_poll(C);
}
}
- return FALSE;
+ return false;
}
int ED_maskedit_mask_poll(bContext *C)
@@ -85,7 +85,7 @@ int ED_maskedit_mask_poll(bContext *C)
return ED_space_image_maskedit_mask_poll(C);
}
}
- return FALSE;
+ return false;
}
/********************** registration *********************/
@@ -487,13 +487,13 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
/* selection */
kmi = WM_keymap_add_item(keymap, "MASK_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", false);
kmi = WM_keymap_add_item(keymap, "MASK_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
kmi = WM_keymap_add_item(keymap, "MASK_OT_select_all", AKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
@@ -502,17 +502,17 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MASK_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
kmi = WM_keymap_add_item(keymap, "MASK_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "MASK_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
WM_keymap_add_item(keymap, "MASK_OT_select_border", BKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MASK_OT_select_circle", CKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "MASK_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "MASK_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
WM_keymap_add_item(keymap, "MASK_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "MASK_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
@@ -520,16 +520,16 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
/* hide/reveal */
WM_keymap_add_item(keymap, "MASK_OT_hide_view_clear", HKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "MASK_OT_hide_view_set", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "MASK_OT_hide_view_set", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
/* select clip while in maker view,
* this matches View3D functionality where you can select an
* object while in editmode to allow vertex parenting */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
/* shape */
WM_keymap_add_item(keymap, "MASK_OT_cyclic_toggle", CKEY, KM_PRESS, KM_ALT, 0);
@@ -571,19 +571,19 @@ void ED_operatormacros_mask(void)
ot->description = "Add new vertex and slide it";
WM_operatortype_macro_define(ot, "MASK_OT_add_vertex");
otmacro = WM_operatortype_macro_define(ot, "MASK_OT_slide_point");
- RNA_boolean_set(otmacro->ptr, "is_new_point", TRUE);
+ RNA_boolean_set(otmacro->ptr, "is_new_point", true);
ot = WM_operatortype_append_macro("MASK_OT_add_feather_vertex_slide", "Add Feather Vertex and Slide",
"Add new vertex to feather and slide it", OPTYPE_UNDO | OPTYPE_REGISTER);
ot->description = "Add new feather vertex and slide it";
WM_operatortype_macro_define(ot, "MASK_OT_add_feather_vertex");
otmacro = WM_operatortype_macro_define(ot, "MASK_OT_slide_point");
- RNA_boolean_set(otmacro->ptr, "slide_feather", TRUE);
+ RNA_boolean_set(otmacro->ptr, "slide_feather", true);
ot = WM_operatortype_append_macro("MASK_OT_duplicate_move", "Add Duplicate", "Duplicate mask and move",
OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MASK_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
- RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
+ RNA_boolean_set(otmacro->ptr, "mirror", false);
}
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 438853a081d..c262f177252 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -1621,7 +1621,7 @@ static int mask_layer_move_poll(bContext *C)
return mask->masklay_tot > 0;
}
- return FALSE;
+ return false;
}
static int mask_layer_move_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index da5fdd37316..56eb8cf626b 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -482,7 +482,7 @@ void MASK_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
static bool do_lasso_select_mask(bContext *C, const int mcords[][2], short moves, short select)
diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c
index 99b2e1a13ef..26b97580b91 100644
--- a/source/blender/editors/mask/mask_shapekey.c
+++ b/source/blender/editors/mask/mask_shapekey.c
@@ -411,8 +411,8 @@ void MASK_OT_shape_key_rekey(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "location", TRUE, "Location", "");
- RNA_def_boolean(ot->srna, "feather", TRUE, "Feather", "");
+ RNA_def_boolean(ot->srna, "location", true, "Location", "");
+ RNA_def_boolean(ot->srna, "feather", true, "Feather", "");
}
diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c
index 373c4efb34d..44d03da93a2 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -178,7 +178,7 @@ static bool edgetag_test_cb(BMEdge *e, void *user_data_v)
case EDGE_MODE_TAG_FREESTYLE:
{
FreestyleEdge *fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_FREESTYLE_EDGE);
- return (!fed) ? FALSE : (fed->flag & FREESTYLE_EDGE_MARK) ? true : false;
+ return (!fed) ? false : (fed->flag & FREESTYLE_EDGE_MARK) ? true : false;
}
#endif
}
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 37b93c8c282..467b08c266c 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1885,7 +1885,7 @@ bool EDBM_selectmode_disable(Scene *scene, BMEditMesh *em,
}
}
-void EDBM_deselect_by_material(BMEditMesh *em, const short index, const short select)
+void EDBM_deselect_by_material(BMEditMesh *em, const short index, const bool select)
{
BMIter iter;
BMFace *efa;
@@ -2211,7 +2211,7 @@ static int edbm_select_face_by_sides_exec(bContext *C, wmOperator *op)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- int select;
+ bool select;
switch (type) {
case 0:
diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c
index 249e7361cc0..b7822200d98 100644
--- a/source/blender/editors/metaball/mball_ops.c
+++ b/source/blender/editors/metaball/mball_ops.c
@@ -81,9 +81,9 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MBALL_OT_reveal_metaelems", HKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", DELKEY, KM_PRESS, 0, 0);
@@ -97,6 +97,6 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MBALL_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0);
ED_keymap_proportional_cycle(keyconf, keymap);
- ED_keymap_proportional_editmode(keyconf, keymap, TRUE);
+ ED_keymap_proportional_editmode(keyconf, keymap, true);
}
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 182a9f70968..e3041d97019 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -477,7 +477,7 @@ void OBJECT_OT_add(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", "");
- ED_object_add_generic_props(ot, TRUE);
+ ED_object_add_generic_props(ot, true);
}
/********************* Add Effector Operator ********************/
@@ -499,7 +499,7 @@ static int effector_add_exec(bContext *C, wmOperator *op)
if (type == PFIELD_GUIDE) {
Curve *cu;
- ob = ED_object_add_type(C, OB_CURVE, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_CURVE, loc, rot, false, layer);
if (!ob)
return OPERATOR_CANCELLED;
@@ -507,13 +507,13 @@ static int effector_add_exec(bContext *C, wmOperator *op)
cu = ob->data;
cu->flag |= CU_PATH | CU_3D;
ED_object_editmode_enter(C, 0);
- ED_object_new_primitive_matrix(C, ob, loc, rot, mat, FALSE);
+ ED_object_new_primitive_matrix(C, ob, loc, rot, mat, false);
BLI_addtail(&cu->editnurb->nurbs, add_nurbs_primitive(C, ob, mat, CU_NURBS | CU_PRIM_PATH, 1));
if (!enter_editmode)
ED_object_editmode_exit(C, EM_FREEDATA);
}
else {
- ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer);
if (!ob)
return OPERATOR_CANCELLED;
@@ -545,7 +545,7 @@ void OBJECT_OT_effector_add(wmOperatorType *ot)
ot->prop = RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", "");
- ED_object_add_generic_props(ot, TRUE);
+ ED_object_add_generic_props(ot, true);
}
/********************* Add Camera Operator ********************/
@@ -560,12 +560,12 @@ static int object_camera_add_exec(bContext *C, wmOperator *op)
float loc[3], rot[3];
/* force view align for cameras */
- RNA_boolean_set(op->ptr, "view_align", TRUE);
+ RNA_boolean_set(op->ptr, "view_align", true);
if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- ob = ED_object_add_type(C, OB_CAMERA, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_CAMERA, loc, rot, false, layer);
if (v3d) {
if (v3d->camera == NULL)
@@ -594,7 +594,7 @@ void OBJECT_OT_camera_add(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- ED_object_add_generic_props(ot, TRUE);
+ ED_object_add_generic_props(ot, true);
/* hide this for cameras, default */
prop = RNA_struct_type_find_property(ot->srna, "view_align");
@@ -619,7 +619,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if (obedit == NULL || obedit->type != OB_MBALL) {
- obedit = ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer);
+ obedit = ED_object_add_type(C, OB_MBALL, loc, rot, true, layer);
newob = true;
}
else {
@@ -659,7 +659,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot)
ot->prop = RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", "");
ED_object_add_unit_props(ot);
- ED_object_add_generic_props(ot, TRUE);
+ ED_object_add_generic_props(ot, true);
}
/********************* Add Text Operator ********************/
@@ -697,7 +697,7 @@ void OBJECT_OT_text_add(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- ED_object_add_generic_props(ot, TRUE);
+ ED_object_add_generic_props(ot, true);
}
/********************* Add Armature Operator ********************/
@@ -716,7 +716,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if ((obedit == NULL) || (obedit->type != OB_ARMATURE)) {
- obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer);
+ obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, true, layer);
ED_object_editmode_enter(C, 0);
newob = true;
}
@@ -753,7 +753,7 @@ void OBJECT_OT_armature_add(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- ED_object_add_generic_props(ot, TRUE);
+ ED_object_add_generic_props(ot, true);
}
/********************* Add Empty Operator ********************/
@@ -768,7 +768,7 @@ static int object_empty_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL))
return OPERATOR_CANCELLED;
- ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer);
BKE_object_empty_draw_type_set(ob, type);
@@ -793,7 +793,7 @@ void OBJECT_OT_empty_add(wmOperatorType *ot)
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", object_empty_drawtype_items, 0, "Type", "");
- ED_object_add_generic_props(ot, FALSE);
+ ED_object_add_generic_props(ot, false);
}
static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@@ -836,7 +836,7 @@ static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEv
if (!ED_object_add_generic_get_opts(C, op, 'Z', NULL, rot, NULL, &layer, NULL))
return OPERATOR_CANCELLED;
- ob = ED_object_add_type(C, OB_EMPTY, NULL, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_EMPTY, NULL, rot, false, layer);
/* add under the mouse */
ED_object_location_from_view(C, ob->loc);
@@ -870,7 +870,7 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
prop = RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Image name to assign");
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
- ED_object_add_generic_props(ot, FALSE);
+ ED_object_add_generic_props(ot, false);
}
/********************* Add Lamp Operator ********************/
@@ -900,7 +900,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL))
return OPERATOR_CANCELLED;
- ob = ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_LAMP, loc, rot, false, layer);
la = (Lamp *)ob->data;
la->type = type;
@@ -909,7 +909,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
if (BKE_scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(C, &la->id);
- la->use_nodes = TRUE;
+ la->use_nodes = true;
}
return OPERATOR_FINISHED;
@@ -934,7 +934,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot)
ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", "");
RNA_def_property_translation_context(ot->prop, BLF_I18NCONTEXT_ID_LAMP);
- ED_object_add_generic_props(ot, FALSE);
+ ED_object_add_generic_props(ot, false);
}
/********************* Add Group Instance Operator ********************/
@@ -967,7 +967,7 @@ static int group_instance_add_exec(bContext *C, wmOperator *op)
if (group) {
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- Object *ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer);
+ Object *ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer);
rename_id(&ob->id, group->id.name + 2);
ob->dup_group = group;
ob->transflag |= OB_DUPLIGROUP;
@@ -1004,7 +1004,7 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot)
RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME - 2, "Name", "Group name to add");
ot->prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
RNA_def_enum_funcs(ot->prop, RNA_group_itemf);
- ED_object_add_generic_props(ot, FALSE);
+ ED_object_add_generic_props(ot, false);
}
/********************* Add Speaker Operator ********************/
@@ -1019,7 +1019,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op)
if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL))
return OPERATOR_CANCELLED;
- ob = ED_object_add_type(C, OB_SPEAKER, loc, rot, FALSE, layer);
+ ob = ED_object_add_type(C, OB_SPEAKER, loc, rot, false, layer);
/* to make it easier to start using this immediately in NLA, a default sound clip is created
* ready to be moved around to retime the sound and/or make new sound clips
@@ -1059,7 +1059,7 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- ED_object_add_generic_props(ot, TRUE);
+ ED_object_add_generic_props(ot, true);
}
/**************************** Delete Object *************************/
@@ -1093,7 +1093,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win;
- const short use_global = RNA_boolean_get(op->ptr, "use_global");
+ const bool use_global = RNA_boolean_get(op->ptr, "use_global");
bool changed = false;
if (CTX_data_edit_object(C))
@@ -1310,7 +1310,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
ob->lay = base->lay;
copy_m4_m4(ob->obmat, dob->mat);
- BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, false, false);
if (dupli_gh)
BLI_ghash_insert(dupli_gh, dob, ob);
@@ -1358,7 +1358,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
/* note, this may be the parent of other objects, but it should
* still work out ok */
- BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
+ BKE_object_apply_mat4(ob_dst, dob->mat, false, true);
/* to set ob_dst->orig and in case theres any other discrepicies */
DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB);
@@ -1377,7 +1377,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
/* similer to the code above, see comments */
invert_m4_m4(ob_dst->parentinv, dob->mat);
- BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
+ BKE_object_apply_mat4(ob_dst, dob->mat, false, true);
DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB);
}
}
@@ -1465,7 +1465,7 @@ static void convert_ensure_curve_cache(Main *bmain, Scene *scene, Object *ob)
* redo we might end up with an object which isn't evaluated yet.
*/
if (ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) {
- BKE_displist_make_curveTypes(scene, ob, FALSE);
+ BKE_displist_make_curveTypes(scene, ob, false);
}
else if (ob->type == OB_MBALL) {
BKE_displist_make_mball(bmain->eval_ctx, scene, ob);
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 1f022c922e8..5a8d1d081f8 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -548,7 +548,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(wm_job, multiresbake_startjob, NULL, NULL, NULL);
- G.is_break = FALSE;
+ G.is_break = false;
WM_jobs_start(CTX_wm_manager(C), wm_job);
WM_cursor_wait(0);
@@ -721,7 +721,7 @@ static void bake_startjob(void *bkv, short *stop, short *do_update, float *progr
bkr->progress = progress;
RE_test_break_cb(bkr->re, NULL, thread_break);
- G.is_break = FALSE; /* blender_test_break uses this global */
+ G.is_break = false; /* blender_test_break uses this global */
RE_Database_Baking(bkr->re, bmain, scene, scene->lay, scene->r.bake_mode, bkr->actob);
@@ -751,7 +751,7 @@ static void bake_freejob(void *bkv)
BKE_report(bkr->reports, RPT_WARNING, "Circular reference in texture stack");
MEM_freeN(bkr);
- G.is_rendering = FALSE;
+ G.is_rendering = false;
}
/* catch esc */
@@ -807,8 +807,8 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, const wmEvent
WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(wm_job, bake_startjob, NULL, bake_update, NULL);
- G.is_break = FALSE;
- G.is_rendering = TRUE;
+ G.is_break = false;
+ G.is_rendering = true;
WM_jobs_start(CTX_wm_manager(C), wm_job);
@@ -848,7 +848,7 @@ static int bake_image_exec(bContext *C, wmOperator *op)
bkr.reports = op->reports;
RE_test_break_cb(bkr.re, NULL, thread_break);
- G.is_break = FALSE; /* blender_test_break uses this global */
+ G.is_break = false; /* blender_test_break uses this global */
RE_Database_Baking(bkr.re, bmain, scene, scene->lay, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT : NULL);
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 1e7e543ccb8..9b79b2e93da 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1400,7 +1400,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
{
/* if we're not handling the object we're copying from, copy all constraints over */
if (pchan != chan) {
- BKE_copy_constraints(&chan->constraints, &pchan->constraints, TRUE);
+ BKE_copy_constraints(&chan->constraints, &pchan->constraints, true);
/* update flags (need to add here, not just copy) */
chan->constflag |= pchan->constflag;
}
@@ -1440,7 +1440,7 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
/* if we're not handling the object we're copying from, copy all constraints over */
if (obact != ob) {
- BKE_copy_constraints(&ob->constraints, &obact->constraints, TRUE);
+ BKE_copy_constraints(&ob->constraints, &obact->constraints, true);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 201ce460f88..7ae54a1a803 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -990,7 +990,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
}
else if (event == 22) {
/* Copy the constraint channels over */
- BKE_copy_constraints(&base->object->constraints, &ob->constraints, TRUE);
+ BKE_copy_constraints(&base->object->constraints, &ob->constraints, true);
do_depgraph_update = true;
}
@@ -998,7 +998,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
base->object->softflag = ob->softflag;
if (base->object->soft) sbFree(base->object->soft);
- base->object->soft = copy_softbody(ob->soft, FALSE);
+ base->object->soft = copy_softbody(ob->soft, false);
if (!modifiers_findByType(base->object, eModifierType_Softbody)) {
BLI_addhead(&base->object->modifiers, modifier_new(eModifierType_Softbody));
@@ -1439,7 +1439,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d)
for (base = FIRSTBASE; base; base = base->next) {
if (TESTBASELIB(v3d, base)) {
ob = base->object;
- done = FALSE;
+ done = false;
for (a = 1; a <= ob->totcol; a++) {
ma = give_current_material(ob, a);
@@ -1469,7 +1469,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d)
if (x > y) ob->size[0] = ob->size[1] * x / y;
else ob->size[1] = ob->size[0] * y / x;
- done = TRUE;
+ done = true;
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
BKE_image_release_ibuf(tex->ima, ibuf, NULL);
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 5e7572e3681..e67381a1d43 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -152,7 +152,7 @@ static void select_editbmesh_hook(Object *ob, HookModifierData *hmd)
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
if (nr == hmd->indexar[index]) {
- BM_vert_select_set(em->bm, eve, TRUE);
+ BM_vert_select_set(em->bm, eve, true);
if (index < hmd->totindex - 1) index++;
}
@@ -474,7 +474,7 @@ static int add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *ob
if (!ok) {
BKE_report(reports, RPT_ERROR, "Requires selected vertices or active vertex group");
- return FALSE;
+ return false;
}
if (mode == OBJECT_ADDHOOK_NEWOB && !ob) {
@@ -533,7 +533,7 @@ static int add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *ob
DAG_relations_tag_update(bmain);
- return TRUE;
+ return true;
}
static int object_add_hook_selob_exec(bContext *C, wmOperator *op)
@@ -587,7 +587,7 @@ void OBJECT_OT_hook_add_selob(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "use_bone", FALSE, "Active Bone",
+ RNA_def_boolean(ot->srna, "use_bone", false, "Active Bone",
"Assign the hook to the hook objects active bone");
}
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 196e912e74e..2af2ca3b0e9 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -886,7 +886,7 @@ bool mouse_lattice(bContext *C, const int mval[2], bool extend, bool deselect, b
view3d_set_viewcontext(C, &vc);
lt = ((Lattice *)vc.obedit->data)->editlatt->latt;
- bp = findnearestLattvert(&vc, mval, TRUE);
+ bp = findnearestLattvert(&vc, mval, true);
if (bp) {
if (extend) {
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 327e840a873..234273de9b9 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -175,8 +175,8 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
return new_md;
}
-/* Return TRUE if the object has a modifier of type 'type' other than
- * the modifier pointed to be 'exclude', otherwise returns FALSE. */
+/* Return true if the object has a modifier of type 'type' other than
+ * the modifier pointed to be 'exclude', otherwise returns false. */
static bool object_has_modifier(const Object *ob, const ModifierData *exclude,
ModifierType type)
{
@@ -184,19 +184,19 @@ static bool object_has_modifier(const Object *ob, const ModifierData *exclude,
for (md = ob->modifiers.first; md; md = md->next) {
if ((md != exclude) && (md->type == type))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* If the object data of 'orig_ob' has other users, run 'callback' on
* each of them.
*
- * If include_orig is TRUE, the callback will run on 'orig_ob' too.
+ * If include_orig is true, the callback will run on 'orig_ob' too.
*
- * If the callback ever returns TRUE, iteration will stop and the
- * function value will be TRUE. Otherwise the function returns FALSE.
+ * If the callback ever returns true, iteration will stop and the
+ * function value will be true. Otherwise the function returns false.
*/
bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig,
bool (*callback)(Object *ob, void *callback_data),
@@ -220,7 +220,7 @@ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig,
(ob->data == orig_ob->data))
{
if (callback(ob, callback_data))
- return TRUE;
+ return true;
totfound++;
}
@@ -230,7 +230,7 @@ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig,
return callback(orig_ob, callback_data);
}
- return FALSE;
+ return false;
}
static bool object_has_modifier_cb(Object *ob, void *data)
@@ -254,16 +254,16 @@ bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
}
- return FALSE;
+ return false;
}
-/* Return TRUE if no modifier of type 'type' other than 'exclude' */
+/* Return true if no modifier of type 'type' other than 'exclude' */
static bool object_modifier_safe_to_delete(Main *bmain, Object *ob,
ModifierData *exclude,
ModifierType type)
{
return (!object_has_modifier(ob, exclude, type) &&
- !ED_object_iter_other(bmain, ob, FALSE,
+ !ED_object_iter_other(bmain, ob, false,
object_has_modifier_cb, &type));
}
@@ -678,7 +678,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
}
else if ((ob->mode & OB_MODE_SCULPT) &&
(find_multires_modifier_before(scene, md)) &&
- (modifier_isSameTopology(md) == FALSE))
+ (modifier_isSameTopology(md) == false))
{
BKE_report(reports, RPT_ERROR, "Constructive modifier cannot be applied to multi-res data in sculpt mode");
return 0;
@@ -834,18 +834,18 @@ static int edit_modifier_invoke_properties(bContext *C, wmOperator *op)
ModifierData *md;
if (RNA_struct_property_is_set(op->ptr, "modifier")) {
- return TRUE;
+ return true;
}
else {
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
if (ptr.data) {
md = ptr.data;
RNA_string_set(op->ptr, "modifier", md->name);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
static ModifierData *edit_modifier_property_get(wmOperator *op, Object *ob, int type)
@@ -1134,7 +1134,7 @@ static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op)
multiresModifier_del_levels(mmd, ob, 1);
- ED_object_iter_other(CTX_data_main(C), ob, TRUE,
+ ED_object_iter_other(CTX_data_main(C), ob, true,
ED_object_multires_update_totlevels_cb,
&mmd->totlvl);
@@ -1178,7 +1178,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op)
multiresModifier_subdivide(mmd, ob, 0, mmd->simple);
- ED_object_iter_other(CTX_data_main(C), ob, TRUE,
+ ED_object_iter_other(CTX_data_main(C), ob, true,
ED_object_multires_update_totlevels_cb,
&mmd->totlvl);
@@ -1974,7 +1974,7 @@ static void init_ocean_modifier_bake(struct Ocean *oc, struct OceanModifierData
if (!omd || !oc) return;
- do_heightfield = TRUE;
+ do_heightfield = true;
do_chop = (omd->chop_amount > 0);
do_normals = (omd->flag & MOD_OCEAN_GENERATE_NORMALS);
do_jacobian = (omd->flag & MOD_OCEAN_GENERATE_FOAM);
@@ -2023,7 +2023,7 @@ static void oceanbake_update(void *customdata, float progress, int *cancel)
if (oceanbake_breakjob(oj))
*cancel = 1;
- *(oj->do_update) = TRUE;
+ *(oj->do_update) = true;
*(oj->progress) = progress;
}
@@ -2035,11 +2035,11 @@ static void oceanbake_startjob(void *customdata, short *stop, short *do_update,
oj->do_update = do_update;
oj->progress = progress;
- G.is_break = FALSE; /* XXX shared with render - replace with job 'stop' switch */
+ G.is_break = false; /* XXX shared with render - replace with job 'stop' switch */
BKE_bake_ocean(oj->ocean, oj->och, oceanbake_update, (void *)oj);
- *do_update = TRUE;
+ *do_update = true;
*stop = 0;
}
@@ -2053,7 +2053,7 @@ static void oceanbake_endjob(void *customdata)
}
oj->omd->oceancache = oj->och;
- oj->omd->cached = TRUE;
+ oj->omd->cached = true;
}
static int ocean_bake_exec(bContext *C, wmOperator *op)
@@ -2120,7 +2120,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
BKE_bake_ocean(ocean, och);
omd->oceancache = och;
- omd->cached = TRUE;
+ omd->cached = true;
scene->r.cfra = cfra;
@@ -2174,7 +2174,7 @@ void OBJECT_OT_ocean_bake(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
edit_modifier_properties(ot);
- RNA_def_boolean(ot->srna, "free", FALSE, "Free", "Free the bake, rather than generating it");
+ RNA_def_boolean(ot->srna, "free", false, "Free", "Free the bake, rather than generating it");
}
/************************ LaplacianDeform bind operator *********************/
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index eee811abeee..5f93f4b5deb 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -268,7 +268,7 @@ void ED_operatormacros_object(void)
"Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
- RNA_boolean_set(otmacro->ptr, "linked", TRUE);
+ RNA_boolean_set(otmacro->ptr, "linked", true);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
}
@@ -293,19 +293,19 @@ void ED_keymap_object(wmKeyConfig *keyconf)
/* Note: this keymap works disregarding mode */
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", OB_MODE_EDIT);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "mode", OB_MODE_POSE);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", VKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", OB_MODE_VERTEX_PAINT);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "mode", OB_MODE_WEIGHT_PAINT);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
WM_keymap_add_item(keymap, "OBJECT_OT_origin_set", CKEY, KM_PRESS, KM_ALT | KM_SHIFT | KM_CTRL, 0);
@@ -331,19 +331,19 @@ void ED_keymap_object(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT");
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT");
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD");
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD");
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_no_inverse_set", PKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
@@ -361,10 +361,10 @@ void ED_keymap_object(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_clear", HKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
/* same as above but for rendering */
WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_clear", HKEY, KM_PRESS, KM_ALT | KM_CTRL, 0);
@@ -373,21 +373,21 @@ void ED_keymap_object(wmKeyConfig *keyconf)
/* conflicts, removing */
#if 0
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
#endif
WM_keymap_add_item(keymap, "OBJECT_OT_move_to_layer", MKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "use_global", FALSE);
+ RNA_boolean_set(kmi->ptr, "use_global", false);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "use_global", TRUE);
+ RNA_boolean_set(kmi->ptr, "use_global", true);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "use_global", FALSE);
+ RNA_boolean_set(kmi->ptr, "use_global", false);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "use_global", TRUE);
+ RNA_boolean_set(kmi->ptr, "use_global", true);
WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
@@ -445,7 +445,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "VIEW3D_MT_hook", HKEY, KM_PRESS, KM_CTRL, 0);
ED_keymap_proportional_cycle(keyconf, keymap);
- ED_keymap_proportional_editmode(keyconf, keymap, FALSE);
+ ED_keymap_proportional_editmode(keyconf, keymap, false);
}
void ED_keymap_proportional_cycle(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyMap *keymap)
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index c1adabf0a94..7e138639cea 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -450,7 +450,7 @@ static void object_remove_parent_deform_modifiers(Object *ob, const Object *par)
/* assume that we only need to remove the first instance of matching deform modifier here */
for (md = ob->modifiers.first; md; md = mdn) {
- short free = FALSE;
+ bool free = false;
mdn = md->next;
@@ -458,19 +458,19 @@ static void object_remove_parent_deform_modifiers(Object *ob, const Object *par)
if ((md->type == eModifierType_Armature) && (par->type == OB_ARMATURE)) {
ArmatureModifierData *amd = (ArmatureModifierData *)md;
if (amd->object == par) {
- free = TRUE;
+ free = true;
}
}
else if ((md->type == eModifierType_Lattice) && (par->type == OB_LATTICE)) {
LatticeModifierData *lmd = (LatticeModifierData *)md;
if (lmd->object == par) {
- free = TRUE;
+ free = true;
}
}
else if ((md->type == eModifierType_Curve) && (par->type == OB_CURVE)) {
CurveModifierData *cmd = (CurveModifierData *)md;
if (cmd->object == par) {
- free = TRUE;
+ free = true;
}
}
@@ -502,7 +502,7 @@ void ED_object_parent_clear(Object *ob, int type)
{
/* remove parent, and apply the parented transform result as object's local transforms */
ob->parent = NULL;
- BKE_object_apply_mat4(ob, ob->obmat, TRUE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, true, false);
break;
}
case CLEAR_PARENT_INVERSE:
@@ -650,7 +650,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
if (keep_transform) {
/* was removed because of bug [#23577],
* but this can be handy in some cases too [#32616], so make optional */
- BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, false, false);
}
/* set the parent (except for follow-path constraint option) */
@@ -750,7 +750,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
}
else if (pararm && (ob->type == OB_MESH) && (par->type == OB_ARMATURE)) {
if (partype == PAR_ARMATURE_NAME)
- create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_NAME, FALSE);
+ create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_NAME, false);
else if (partype == PAR_ARMATURE_ENVELOPE)
create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_ENVELOPE, xmirror);
else if (partype == PAR_ARMATURE_AUTO) {
@@ -871,7 +871,7 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent
uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE);
uiLayout *layout = uiPupMenuLayout(pup);
- wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_parent_set", TRUE);
+ wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_parent_set", true);
PointerRNA opptr;
#if 0
@@ -879,12 +879,12 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent
#else
opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "type", PAR_OBJECT);
- RNA_boolean_set(&opptr, "keep_transform", FALSE);
+ RNA_boolean_set(&opptr, "keep_transform", false);
opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object (Keep Transform)"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT,
UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "type", PAR_OBJECT);
- RNA_boolean_set(&opptr, "keep_transform", TRUE);
+ RNA_boolean_set(&opptr, "keep_transform", true);
#endif
/* ob becomes parent, make the associated menus */
if (ob->type == OB_ARMATURE) {
@@ -960,9 +960,9 @@ void OBJECT_OT_parent_set(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", "");
- RNA_def_boolean(ot->srna, "xmirror", FALSE, "X Mirror",
+ RNA_def_boolean(ot->srna, "xmirror", false, "X Mirror",
"Apply weights symmetrically along X axis, for Envelope/Automatic vertex groups creation");
- RNA_def_boolean(ot->srna, "keep_transform", FALSE, "Keep Transform",
+ RNA_def_boolean(ot->srna, "keep_transform", false, "Keep Transform",
"Apply transformation before parenting");
}
@@ -1134,7 +1134,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
}
if (type == 1)
- BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
+ BKE_object_apply_mat4(ob, ob->obmat, true, true);
}
CTX_DATA_END;
@@ -1320,7 +1320,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
unsigned int lay, local;
- /* bool is_lamp = FALSE; */ /* UNUSED */
+ /* bool is_lamp = false; */ /* UNUSED */
lay = move_to_layer_init(C, op);
lay &= 0xFFFFFF;
@@ -1337,7 +1337,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
base->object->lay = lay;
base->object->flag &= ~SELECT;
base->flag &= ~SELECT;
- /* if (base->object->type == OB_LAMP) is_lamp = TRUE; */
+ /* if (base->object->type == OB_LAMP) is_lamp = true; */
}
CTX_DATA_END;
}
@@ -1350,7 +1350,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
local = base->lay & 0xFF000000;
base->lay = lay + local;
base->object->lay = lay;
- /* if (base->object->type == OB_LAMP) is_lamp = TRUE; */
+ /* if (base->object->type == OB_LAMP) is_lamp = true; */
}
CTX_DATA_END;
}
@@ -1549,13 +1549,13 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
DAG_id_tag_update(&ob_dst->id, 0);
break;
case MAKE_LINKS_ANIMDATA:
- BKE_copy_animdata_id((ID *)ob_dst, (ID *)ob_src, FALSE);
+ BKE_copy_animdata_id((ID *)ob_dst, (ID *)ob_src, false);
if (ob_dst->data && ob_src->data) {
if (obdata_id->lib) {
is_lib = true;
break;
}
- BKE_copy_animdata_id((ID *)ob_dst->data, (ID *)ob_src->data, FALSE);
+ BKE_copy_animdata_id((ID *)ob_dst->data, (ID *)ob_src->data, false);
}
DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
break;
@@ -1572,7 +1572,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
BKE_group_object_add(group_node->link, ob_dst, scene, base_dst);
}
else {
- is_cycle = TRUE;
+ is_cycle = true;
}
}
break;
@@ -2289,7 +2289,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op)
#if 0 /* can't do this separate from materials */
if (RNA_boolean_get(op->ptr, "texture"))
- single_mat_users(scene, flag, TRUE);
+ single_mat_users(scene, flag, true);
#endif
if (RNA_boolean_get(op->ptr, "animation"))
single_object_action_users(scene, flag);
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index a1f447fbf50..41ca4bf50e7 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -183,7 +183,7 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
ot->prop = RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", "");
}
@@ -398,7 +398,7 @@ void ED_object_select_linked_by_id(bContext *C, ID *id)
changed = object_select_all_by_obdata(C, id);
}
else if (idtype == ID_MA) {
- changed = object_select_all_by_material_texture(C, FALSE, (Material *)id, NULL);
+ changed = object_select_all_by_material_texture(C, false, (Material *)id, NULL);
}
else if (idtype == ID_LI) {
changed = object_select_all_by_library(C, (Library *) id);
@@ -447,12 +447,12 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
else if (nr == OBJECT_SELECT_LINKED_MATERIAL || nr == OBJECT_SELECT_LINKED_TEXTURE) {
Material *mat = NULL;
Tex *tex = NULL;
- int use_texture = FALSE;
+ bool use_texture = false;
mat = give_current_material(ob, ob->actcol);
if (mat == NULL) return OPERATOR_CANCELLED;
if (nr == OBJECT_SELECT_LINKED_TEXTURE) {
- use_texture = TRUE;
+ use_texture = true;
if (mat->mtex[(int)mat->texact]) tex = mat->mtex[(int)mat->texact]->tex;
if (tex == NULL) return OPERATOR_CANCELLED;
@@ -509,7 +509,7 @@ void OBJECT_OT_select_linked(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
ot->prop = RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", "");
}
@@ -885,7 +885,7 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
ot->prop = RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
}
@@ -951,7 +951,7 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot)
/* properties */
RNA_def_enum(ot->srna, "match", match_items, 0, "Match", "");
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20);
}
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 1682cde9f16..b0d3d363c45 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -368,7 +368,7 @@ static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob)
/* a change was made, adjust the children to compensate */
for (ob_child = bmain->object.first; ob_child; ob_child = ob_child->id.next) {
if (ob_child->parent == ob) {
- BKE_object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
+ BKE_object_apply_mat4(ob_child, ob_child->obmat, true, false);
BKE_object_workob_calc_parent(scene, ob_child, &workob);
invert_m4_m4(ob_child->parentinv, workob.obmat);
}
@@ -442,7 +442,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
float tmat[3][3], timat[3][3];
/* simple rotation matrix */
- BKE_object_rot_to_mat3(ob, rsmat, TRUE);
+ BKE_object_rot_to_mat3(ob, rsmat, true);
/* correct for scale, note mul_m3_m3m3 has swapped args! */
BKE_object_scale_to_mat3(ob, tmat);
@@ -613,7 +613,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
BKE_object_where_is_calc(scene, ob);
- BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
+ BKE_object_apply_mat4(ob, ob->obmat, true, true);
BKE_object_where_is_calc(scene, ob);
/* update for any children that may get moved */
@@ -818,7 +818,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
float min[3], max[3];
/* only bounds support */
INIT_MINMAX(min, max);
- BKE_object_minmax_dupli(scene, ob, min, max, TRUE);
+ BKE_object_minmax_dupli(scene, ob, min, max, true);
mid_v3_v3v3(cent, min, max);
invert_m4_m4(ob->imat, ob->obmat);
mul_m4_v3(ob->imat, cent);
@@ -828,7 +828,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
ob->dup_group->id.flag |= LIB_DOIT;
- do_inverse_offset = TRUE;
+ do_inverse_offset = true;
}
}
}
@@ -849,7 +849,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
me->id.flag |= LIB_DOIT;
- do_inverse_offset = TRUE;
+ do_inverse_offset = true;
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu = ob->data;
@@ -867,7 +867,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
cu->id.flag |= LIB_DOIT;
- do_inverse_offset = TRUE;
+ do_inverse_offset = true;
if (obedit) {
if (centermode == GEOMETRY_TO_ORIGIN) {
@@ -900,7 +900,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
cu->id.flag |= LIB_DOIT;
- do_inverse_offset = TRUE;
+ do_inverse_offset = true;
}
}
else if (ob->type == OB_ARMATURE) {
@@ -921,7 +921,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
arm->id.flag |= LIB_DOIT;
- /* do_inverse_offset = TRUE; */ /* docenter_armature() handles this */
+ /* do_inverse_offset = true; */ /* docenter_armature() handles this */
BKE_object_where_is_calc(scene, ob);
BKE_pose_where_is(scene, ob); /* needed for bone parents */
@@ -944,7 +944,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
mb->id.flag |= LIB_DOIT;
- do_inverse_offset = TRUE;
+ do_inverse_offset = true;
if (obedit) {
if (centermode == GEOMETRY_TO_ORIGIN) {
@@ -965,7 +965,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++;
lt->id.flag |= LIB_DOIT;
- do_inverse_offset = TRUE;
+ do_inverse_offset = true;
}
/* offset other selected objects */
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index 568802dd7a0..637af5d6536 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -381,7 +381,7 @@ static int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op)
/* Set state to baking and init surface */
canvas->error[0] = '\0';
canvas->flags |= MOD_DPAINT_BAKING;
- G.is_break = FALSE; /* reset blender_test_break*/
+ G.is_break = false; /* reset blender_test_break*/
/* Bake Dynamic Paint */
status = dynamicPaint_bakeImageSequence(C, surface, ob);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 5a43ca110fe..f835d08032b 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3888,7 +3888,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, const wmEvent *e
RNA_collection_add(op->ptr, "stroke", &itemptr);
RNA_float_set_array(&itemptr, "mouse", mouse);
- RNA_boolean_set(&itemptr, "pen_flip", event->shift != FALSE); // XXX hardcoded
+ RNA_boolean_set(&itemptr, "pen_flip", event->shift != false); // XXX hardcoded
/* apply */
brush_edit_apply(C, op, &itemptr);
@@ -4266,7 +4266,7 @@ int PE_minmax(Scene *scene, float min[3], float max[3])
}
if (!ok) {
- BKE_object_minmax(ob, min, max, TRUE);
+ BKE_object_minmax(ob, min, max, true);
ok= 1;
}
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 8090cf4fefd..25bc2aeed07 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -623,7 +623,7 @@ void PARTICLE_OT_disconnect_hair(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh");
}
-static int connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
+static bool connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
{
ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
ParticleData *pa;
@@ -642,7 +642,7 @@ static int connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
float v[4][3], vec[3];
if (!psys || !psys->part || psys->part->type != PART_HAIR || !psmd->dm)
- return FALSE;
+ return false;
edit= psys->edit;
point= edit ? edit->points : NULL;
@@ -730,7 +730,7 @@ static int connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
PE_update_object(scene, ob, 0);
- return TRUE;
+ return true;
}
static int connect_hair_exec(bContext *C, wmOperator *op)
@@ -740,7 +740,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op)
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= NULL;
const bool all = RNA_boolean_get(op->ptr, "all");
- int any_connected = FALSE;
+ bool any_connected = false;
if (!ob)
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index cab4ed6e8b5..cf228fcffb5 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -753,7 +753,7 @@ static void fluidbake_updatejob(void *customdata, float progress)
{
FluidBakeJob *fb= (FluidBakeJob *)customdata;
- *(fb->do_update) = TRUE;
+ *(fb->do_update) = true;
*(fb->progress) = progress;
}
@@ -765,10 +765,10 @@ static void fluidbake_startjob(void *customdata, short *stop, short *do_update,
fb->do_update = do_update;
fb->progress = progress;
- G.is_break = FALSE; /* XXX shared with render - replace with job 'stop' switch */
+ G.is_break = false; /* XXX shared with render - replace with job 'stop' switch */
elbeemSimulate();
- *do_update = TRUE;
+ *do_update = true;
*stop = 0;
}
@@ -1133,7 +1133,7 @@ static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(
if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID))
return OPERATOR_CANCELLED;
- if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), TRUE))
+ if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), true))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -1141,7 +1141,7 @@ static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(
static int fluid_bake_exec(bContext *C, wmOperator *op)
{
- if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), FALSE))
+ if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), false))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index 444c87ded34..48cc51ffb55 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -121,21 +121,21 @@ static void keymap_particle(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
kmi = WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, KM_ANY, 0);
- RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(kmi->ptr, "release_confirm", true);
WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
@@ -153,7 +153,7 @@ static void keymap_particle(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "PARTICLE_OT_weight_set", KKEY, KM_PRESS, KM_SHIFT, 0);
ED_keymap_proportional_cycle(keyconf, keymap);
- ED_keymap_proportional_editmode(keyconf, keymap, FALSE);
+ ED_keymap_proportional_editmode(keyconf, keymap, false);
}
/******************************* boids *************************************/
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 515ac330cc9..422b2525725 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -61,7 +61,7 @@
static int cache_break_test(void *UNUSED(cbd))
{
- return (G.is_break == TRUE);
+ return (G.is_break == true);
}
static int ptcache_bake_all_poll(bContext *C)
{
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 9531c7793d3..064f6ca3d1e 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -104,7 +104,7 @@ typedef struct RenderJob {
struct Object *camera_override;
int lay_override;
bool v3d_override;
- short anim, write_still;
+ bool anim, write_still;
Image *image;
ImageUser iuser;
bool image_outdated;
@@ -304,7 +304,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
re = RE_NewRender(scene->id.name);
lay_override = (v3d && v3d->lay != scene->lay) ? v3d->lay : 0;
- G.is_break = FALSE;
+ G.is_break = false;
RE_test_break_cb(re, NULL, render_break);
ima = BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result");
@@ -444,7 +444,7 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs)
RE_ReleaseResult(rj->re);
/* make jobs timer to send notifier */
- *(rj->do_update) = TRUE;
+ *(rj->do_update) = true;
}
@@ -456,7 +456,7 @@ static void render_progress_update(void *rjv, float progress)
*rj->progress = progress;
/* make jobs timer to send notifier */
- *(rj->do_update) = TRUE;
+ *(rj->do_update) = true;
}
}
@@ -534,7 +534,7 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
/* update entire render */
rj->image_outdated = false;
BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE);
- *(rj->do_update) = TRUE;
+ *(rj->do_update) = true;
return;
}
@@ -560,7 +560,7 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
}
/* make jobs timer to send notifier */
- *(rj->do_update) = TRUE;
+ *(rj->do_update) = true;
}
BKE_image_release_ibuf(ima, ibuf, lock);
}
@@ -640,7 +640,7 @@ static void render_endjob(void *rjv)
}
/* XXX render stability hack */
- G.is_rendering = FALSE;
+ G.is_rendering = false;
WM_main_add_notifier(NC_SCENE | ND_RENDER_RESULT, NULL);
/* Partial render result will always update display buffer
@@ -945,7 +945,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
RE_progress_cb(re, rj, render_progress_update);
rj->re = re;
- G.is_break = FALSE;
+ G.is_break = false;
/* store actual owner of job, so modal operator could check for it,
* the reason of this is that active scene could change when rendering
@@ -961,7 +961,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
/* we set G.is_rendering here already instead of only in the job, this ensure
* main loop or other scene updates are disabled in time, since they may
* have started before the job thread */
- G.is_rendering = TRUE;
+ G.is_rendering = true;
/* add modal handler for ESC */
WM_event_add_modal_handler(C, op);
@@ -1095,7 +1095,7 @@ static void render_view3d_display_update(void *rpv, RenderResult *UNUSED(rr), vo
{
RenderPreview *rp = rpv;
- *(rp->do_update) = TRUE;
+ *(rp->do_update) = true;
}
static void render_view3d_renderinfo_cb(void *rjp, RenderStats *rs)
@@ -1110,7 +1110,7 @@ static void render_view3d_renderinfo_cb(void *rjp, RenderStats *rs)
make_renderinfo_string(rs, rp->scene, false, rp->engine->text);
/* make jobs timer to send notifier */
- *(rp->do_update) = TRUE;
+ *(rp->do_update) = true;
}
}
@@ -1133,7 +1133,7 @@ static void render_view3d_startjob(void *customdata, short *stop, short *do_upda
//printf("ma %d res %d view %d db %d\n", update_flag & PR_UPDATE_MATERIAL, update_flag & PR_UPDATE_RENDERSIZE, update_flag & PR_UPDATE_VIEW, update_flag & PR_UPDATE_DATABASE);
- G.is_break = FALSE;
+ G.is_break = false;
if (false == render_view3d_get_rects(rp->ar, rp->v3d, rp->rv3d, &viewplane, rp->engine, &clipsta, &clipend, &pixsize, &orth))
return;
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index dba44bacd03..242ba1f1d67 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -247,7 +247,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
/* shouldnt suddenly give errors mid-render but possible */
char err_out[256] = "unknown";
ImBuf *ibuf_view = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey,
- IB_rect, OB_SOLID, FALSE, TRUE,
+ IB_rect, OB_SOLID, false, true,
(draw_sky) ? R_ADDSKY : R_ALPHAPREMUL, err_out);
camera = scene->camera;
@@ -308,8 +308,9 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
IMB_color_to_bw(ibuf);
}
- BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, FALSE);
- ok = BKE_imbuf_write_as(ibuf, name, &scene->r.im_format, TRUE); /* no need to stamp here */
+ BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra,
+ &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, false);
+ ok = BKE_imbuf_write_as(ibuf, name, &scene->r.im_format, true); /* no need to stamp here */
if (ok) printf("OpenGL Render written to '%s'\n", name);
else printf("OpenGL Render failed to write '%s'\n", name);
}
@@ -348,7 +349,7 @@ static bool screen_opengl_render_init(bContext *C, wmOperator *op)
/* ensure we have a 3d view */
if (!ED_view3d_context_activate(C)) {
- RNA_boolean_set(op->ptr, "view_context", FALSE);
+ RNA_boolean_set(op->ptr, "view_context", false);
is_view_context = false;
}
@@ -532,7 +533,8 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op)
is_movie = BKE_imtype_is_movie(scene->r.im_format.imtype);
if (!is_movie) {
- BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra,
+ &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, true);
if ((scene->r.mode & R_NO_OVERWRITE) && BLI_exists(name)) {
BKE_reportf(op->reports, RPT_INFO, "Skipping existing frame \"%s\"", name);
@@ -569,7 +571,7 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op)
ibuf = BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock);
if (ibuf) {
- int needs_free = FALSE;
+ bool needs_free = false;
ibuf_save = ibuf;
@@ -577,7 +579,7 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op)
ibuf_save = IMB_colormanagement_imbuf_for_write(ibuf, true, true, &scene->view_settings,
&scene->display_settings, &scene->r.im_format);
- needs_free = TRUE;
+ needs_free = true;
}
/* color -> grayscale */
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 482c855f067..fdb9b5c04ed 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -392,8 +392,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
sce->lay = 1 << mat->pr_type;
if (mat->nodetree && sp->pr_method == PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
- BKE_node_preview_init_tree(mat->nodetree, sp->sizex, sp->sizey, TRUE);
- BKE_node_preview_init_tree(origmat->nodetree, sp->sizex, sp->sizey, TRUE);
+ BKE_node_preview_init_tree(mat->nodetree, sp->sizex, sp->sizey, true);
+ BKE_node_preview_init_tree(origmat->nodetree, sp->sizex, sp->sizey, true);
}
}
}
@@ -456,8 +456,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
if (tex && tex->nodetree && sp->pr_method == PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
- BKE_node_preview_init_tree(origtex->nodetree, sp->sizex, sp->sizey, TRUE);
- BKE_node_preview_init_tree(tex->nodetree, sp->sizex, sp->sizey, TRUE);
+ BKE_node_preview_init_tree(origtex->nodetree, sp->sizex, sp->sizey, true);
+ BKE_node_preview_init_tree(tex->nodetree, sp->sizex, sp->sizey, true);
}
}
else if (id_type == ID_LA) {
@@ -493,8 +493,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
if (la && la->nodetree && sp->pr_method == PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
- BKE_node_preview_init_tree(origla->nodetree, sp->sizex, sp->sizey, TRUE);
- BKE_node_preview_init_tree(la->nodetree, sp->sizex, sp->sizey, TRUE);
+ BKE_node_preview_init_tree(origla->nodetree, sp->sizex, sp->sizey, true);
+ BKE_node_preview_init_tree(la->nodetree, sp->sizex, sp->sizey, true);
}
}
else if (id_type == ID_WO) {
@@ -511,8 +511,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
if (wrld && wrld->nodetree && sp->pr_method == PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
- BKE_node_preview_init_tree(wrld->nodetree, sp->sizex, sp->sizey, TRUE);
- BKE_node_preview_init_tree(origwrld->nodetree, sp->sizex, sp->sizey, TRUE);
+ BKE_node_preview_init_tree(wrld->nodetree, sp->sizex, sp->sizey, true);
+ BKE_node_preview_init_tree(origwrld->nodetree, sp->sizex, sp->sizey, true);
}
}
@@ -629,7 +629,7 @@ static void shader_preview_update(void *spv, RenderResult *UNUSED(rr), volatile
{
ShaderPreview *sp = spv;
- *(sp->do_update) = TRUE;
+ *(sp->do_update) = true;
}
/* called by renderer, checks job value */
@@ -790,7 +790,7 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd
else
shader_preview_render(sp, sp->id, 0, 0);
- *do_update = TRUE;
+ *do_update = true;
}
static void shader_preview_free(void *customdata)
@@ -807,9 +807,9 @@ static void shader_preview_free(void *customdata)
/* get rid of copied material */
BLI_remlink(&pr_main->mat, sp->matcopy);
- BKE_material_free_ex(sp->matcopy, FALSE);
+ BKE_material_free_ex(sp->matcopy, false);
- properties = IDP_GetProperties((ID *)sp->matcopy, FALSE);
+ properties = IDP_GetProperties((ID *)sp->matcopy, false);
if (properties) {
IDP_FreeProperty(properties);
MEM_freeN(properties);
@@ -825,7 +825,7 @@ static void shader_preview_free(void *customdata)
BLI_remlink(&pr_main->tex, sp->texcopy);
BKE_texture_free(sp->texcopy);
- properties = IDP_GetProperties((ID *)sp->texcopy, FALSE);
+ properties = IDP_GetProperties((ID *)sp->texcopy, false);
if (properties) {
IDP_FreeProperty(properties);
MEM_freeN(properties);
@@ -839,9 +839,9 @@ static void shader_preview_free(void *customdata)
/* get rid of copied world */
BLI_remlink(&pr_main->world, sp->worldcopy);
- BKE_world_free_ex(sp->worldcopy, TRUE); /* [#32865] - we need to unlink the texture copies, unlike for materials */
+ BKE_world_free_ex(sp->worldcopy, true); /* [#32865] - we need to unlink the texture copies, unlike for materials */
- properties = IDP_GetProperties((ID *)sp->worldcopy, FALSE);
+ properties = IDP_GetProperties((ID *)sp->worldcopy, false);
if (properties) {
IDP_FreeProperty(properties);
MEM_freeN(properties);
@@ -857,7 +857,7 @@ static void shader_preview_free(void *customdata)
BLI_remlink(&pr_main->lamp, sp->lampcopy);
BKE_lamp_free(sp->lampcopy);
- properties = IDP_GetProperties((ID *)sp->lampcopy, FALSE);
+ properties = IDP_GetProperties((ID *)sp->lampcopy, false);
if (properties) {
IDP_FreeProperty(properties);
MEM_freeN(properties);
@@ -959,7 +959,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect);
- *do_update = TRUE;
+ *do_update = true;
BKE_image_release_ibuf(ima, ibuf, NULL);
}
@@ -975,7 +975,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
icon_copy_rect(br->icon_imbuf, sp->sizex, sp->sizey, sp->pr_rect);
- *do_update = TRUE;
+ *do_update = true;
}
else {
/* re-use shader job */
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index c691c2ca0b2..3906b3d0c10 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -229,7 +229,7 @@ void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-static int material_slot_de_select(bContext *C, int select)
+static int material_slot_de_select(bContext *C, bool select)
{
Object *ob = ED_object_context(C);
@@ -295,7 +295,7 @@ static int material_slot_de_select(bContext *C, int select)
static int material_slot_select_exec(bContext *C, wmOperator *UNUSED(op))
{
- return material_slot_de_select(C, 1);
+ return material_slot_de_select(C, true);
}
void OBJECT_OT_material_slot_select(wmOperatorType *ot)
@@ -314,7 +314,7 @@ void OBJECT_OT_material_slot_select(wmOperatorType *ot)
static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op))
{
- return material_slot_de_select(C, 0);
+ return material_slot_de_select(C, false);
}
void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
@@ -392,7 +392,7 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
if (BKE_scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(C, &ma->id);
- ma->use_nodes = TRUE;
+ ma->use_nodes = true;
}
}
@@ -496,7 +496,7 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
if (BKE_scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(C, &wo->id);
- wo->use_nodes = TRUE;
+ wo->use_nodes = true;
}
}
@@ -743,7 +743,7 @@ static int freestyle_active_lineset_poll(bContext *C)
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
if (!srl) {
- return FALSE;
+ return false;
}
return BKE_freestyle_lineset_get_active(&srl->freestyleConfig) != NULL;
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 5f74bf6576a..81eb11d7138 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -81,7 +81,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
bContext *C;
wmWindowManager *wm;
wmWindow *win;
- static int recursive_check = FALSE;
+ static bool recursive_check = false;
/* don't do this render engine update if we're updating the scene from
* other threads doing e.g. rendering or baking jobs */
@@ -92,7 +92,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
if (recursive_check)
return;
- recursive_check = TRUE;
+ recursive_check = true;
C = CTX_create();
CTX_data_main_set(C, bmain);
@@ -140,7 +140,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
CTX_free(C);
- recursive_check = FALSE;
+ recursive_check = false;
}
void ED_render_engine_area_exit(ScrArea *sa)
@@ -275,7 +275,7 @@ static void material_changed(Main *bmain, Material *ma)
Material *parent;
Object *ob;
Scene *scene;
- int texture_draw = FALSE;
+ int texture_draw = false;
/* icons */
BKE_icon_changed(BKE_icon_getid(&ma->id));
@@ -302,7 +302,7 @@ static void material_changed(Main *bmain, Material *ma)
/* find if we have a scene with textured display */
for (scene = bmain->scene.first; scene; scene = scene->id.next) {
if (scene->customdata_mask & CD_MASK_MTFACE) {
- texture_draw = TRUE;
+ texture_draw = true;
break;
}
}
@@ -351,11 +351,11 @@ static void lamp_changed(Main *bmain, Lamp *la)
static int material_uses_texture(Material *ma, Tex *tex)
{
if (mtex_use_tex(ma->mtex, MAX_MTEX, tex))
- return TRUE;
+ return true;
else if (ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex))
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
static void texture_changed(Main *bmain, Tex *tex)
@@ -366,7 +366,7 @@ static void texture_changed(Main *bmain, Tex *tex)
Scene *scene;
Object *ob;
bNode *node;
- int texture_draw = FALSE;
+ int texture_draw = false;
/* icons */
BKE_icon_changed(BKE_icon_getid(&tex->id));
@@ -424,7 +424,7 @@ static void texture_changed(Main *bmain, Tex *tex)
}
if (scene->customdata_mask & CD_MASK_MTFACE)
- texture_draw = TRUE;
+ texture_draw = true;
}
/* find textured objects */
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index c1cd17465cf..80ce74f3c5b 100644
--- a/source/blender/editors/render/render_view.c
+++ b/source/blender/editors/render/render_view.c
@@ -305,7 +305,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), const wm
/* determine if render already shows */
if (sa) {
/* but don't close it when rendering */
- if (G.is_rendering == FALSE) {
+ if (G.is_rendering == false) {
SpaceImage *sima = sa->spacedata.first;
if (sima->flag & SI_PREVSPACE) {
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 70378046b02..f62166d33b0 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -151,7 +151,7 @@ void ED_area_do_refresh(bContext *C, ScrArea *sa)
if (sa->type && sa->type->refresh) {
sa->type->refresh(C, sa);
}
- sa->do_refresh = FALSE;
+ sa->do_refresh = false;
}
/**
@@ -526,7 +526,7 @@ void ED_area_tag_redraw_regiontype(ScrArea *sa, int regiontype)
void ED_area_tag_refresh(ScrArea *sa)
{
if (sa)
- sa->do_refresh = TRUE;
+ sa->do_refresh = true;
}
/* *************************************************************** */
@@ -1332,7 +1332,7 @@ void ED_region_init(bContext *C, ARegion *ar)
}
/* for quick toggle, can skip fades */
-void region_toggle_hidden(bContext *C, ARegion *ar, int do_fade)
+void region_toggle_hidden(bContext *C, ARegion *ar, bool do_fade)
{
ScrArea *sa = CTX_wm_area(C);
@@ -1359,7 +1359,7 @@ void ED_region_toggle_hidden(bContext *C, ARegion *ar)
/* sa2 to sa1, we swap spaces for fullscreen to keep all allocated data */
/* area vertices were set */
-void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
+void area_copy_data(ScrArea *sa1, ScrArea *sa2, const bool swap_space)
{
SpaceType *st;
ARegion *ar;
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 23ead971cd3..b10f521d25d 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -468,7 +468,7 @@ bScreen *ED_screen_add(wmWindow *win, Scene *scene, const char *name)
sc = BKE_libblock_alloc(G.main, ID_SCR, name);
sc->scene = scene;
- sc->do_refresh = TRUE;
+ sc->do_refresh = true;
sc->redraws_flag = TIME_ALL_3D_WIN | TIME_ALL_ANIM_WIN;
sc->winid = win->winid;
@@ -1099,18 +1099,18 @@ void ED_screen_do_listen(bContext *C, wmNotifier *note)
switch (note->category) {
case NC_WM:
if (note->data == ND_FILEREAD)
- win->screen->do_draw = TRUE;
+ win->screen->do_draw = true;
break;
case NC_WINDOW:
- win->screen->do_draw = TRUE;
+ win->screen->do_draw = true;
break;
case NC_SCREEN:
if (note->action == NA_EDITED)
- win->screen->do_draw = win->screen->do_refresh = TRUE;
+ win->screen->do_draw = win->screen->do_refresh = true;
break;
case NC_SCENE:
if (note->data == ND_MODE)
- region_cursor_set(win, note->swinid, TRUE);
+ region_cursor_set(win, note->swinid, true);
break;
}
}
@@ -1185,7 +1185,7 @@ void ED_screen_draw(wmWindow *win)
glDisable(GL_BLEND);
}
- win->screen->do_draw = FALSE;
+ win->screen->do_draw = false;
}
/* helper call for below, dpi changes headers */
@@ -1240,7 +1240,7 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
if (G.debug & G_DEBUG_EVENTS) {
printf("%s: set screen\n", __func__);
}
- win->screen->do_refresh = FALSE;
+ win->screen->do_refresh = false;
win->screen->context = ed_screen_context;
}
@@ -1415,11 +1415,11 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
if (oldswin != scr->subwinactive) {
for (sa = scr->areabase.first; sa; sa = sa->next) {
- int do_draw = FALSE;
+ bool do_draw = false;
for (ar = sa->regionbase.first; ar; ar = ar->next)
if (ar->swinid == oldswin || ar->swinid == scr->subwinactive)
- do_draw = TRUE;
+ do_draw = true;
if (do_draw) {
for (ar = sa->regionbase.first; ar; ar = ar->next)
@@ -1436,7 +1436,7 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
else {
/* notifier invokes freeing the buttons... causing a bit too much redraws */
if (oldswin != scr->subwinactive) {
- region_cursor_set(win, scr->subwinactive, TRUE);
+ region_cursor_set(win, scr->subwinactive, true);
/* this used to be a notifier, but needs to be done immediate
* because it can undo setting the right button as active due
@@ -1444,7 +1444,7 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
uiFreeActiveButtons(C, win->screen);
}
else
- region_cursor_set(win, scr->subwinactive, FALSE);
+ region_cursor_set(win, scr->subwinactive, false);
}
}
}
@@ -1563,7 +1563,7 @@ void ED_screen_set(bContext *C, bScreen *sc)
* have different layers visible in 3D viewpots. This is possible
* because of view3d.lock_camera_and_layers option.
*/
- DAG_on_visible_update(bmain, FALSE);
+ DAG_on_visible_update(bmain, false);
}
}
@@ -1697,7 +1697,7 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
CTX_data_scene_set(C, scene);
BKE_scene_set_background(bmain, scene);
- DAG_on_visible_update(bmain, FALSE);
+ DAG_on_visible_update(bmain, false);
ED_render_engine_changed(bmain);
ED_update_for_newframe(bmain, scene, 1);
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h
index 8a76c52d985..b279ddab42f 100644
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@ -38,8 +38,8 @@ struct Scene;
#define AZONESPOT (0.6f * U.widget_unit)
/* area.c */
-void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space);
-void region_toggle_hidden(bContext *C, ARegion *ar, int do_fade);
+void area_copy_data(ScrArea *sa1, ScrArea *sa2, const bool swap_space);
+void region_toggle_hidden(bContext *C, ARegion *ar, const bool do_fade);
/* screen_edit.c */
ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index f5c2c9e5fcb..915ed7679f4 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -193,10 +193,10 @@ int ED_operator_view3d_active(bContext *C)
int ED_operator_region_view3d_active(bContext *C)
{
if (CTX_wm_region_view3d(C))
- return TRUE;
+ return true;
CTX_wm_operator_poll_msg_set(C, "expected a view3d region");
- return FALSE;
+ return false;
}
/* generic for any view2d which uses anim_ops */
@@ -205,7 +205,7 @@ int ED_operator_animview_active(bContext *C)
if (ED_operator_areaactive(C)) {
SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C);
if (sl && (ELEM5(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME)))
- return TRUE;
+ return true;
}
CTX_wm_operator_poll_msg_set(C, "expected a timeline/animation area to be active");
@@ -453,10 +453,10 @@ int ED_operator_uvmap(bContext *C)
}
if (em && (em->bm->totface)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
int ED_operator_editsurfcurve(bContext *C)
@@ -552,7 +552,7 @@ int ED_operator_mask(bContext *C)
}
}
- return FALSE;
+ return false;
}
/* *************************** action zone operator ************************** */
@@ -662,7 +662,7 @@ static void actionzone_apply(bContext *C, wmOperator *op, int type)
event.type = EVT_ACTIONZONE_REGION;
event.val = 0;
event.customdata = op->customdata;
- event.customdatafree = TRUE;
+ event.customdatafree = true;
op->customdata = NULL;
wm_event_add(win, &event);
@@ -1625,7 +1625,7 @@ static int area_split_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
}
- CTX_wm_window(C)->screen->do_draw = TRUE;
+ CTX_wm_window(C)->screen->do_draw = true;
}
@@ -2123,20 +2123,20 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
if (CFRA != (int)ak->cfra) {
/* this changes the frame, so set the frame and we're done */
CFRA = (int)ak->cfra;
- done = TRUE;
+ done = true;
}
else {
/* make this the new starting point for the search */
cfra = ak->cfra;
}
}
- } while ((ak != NULL) && (done == FALSE));
+ } while ((ak != NULL) && (done == false));
/* free temp stuff */
BLI_dlrbTree_free(&keys);
/* any success? */
- if (done == FALSE) {
+ if (done == false) {
BKE_report(op->reports, RPT_INFO, "No more keyframes to jump to in this direction");
return OPERATOR_CANCELLED;
@@ -2162,7 +2162,7 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "next", TRUE, "Next Keyframe", "");
+ RNA_def_boolean(ot->srna, "next", true, "Next Keyframe", "");
}
/* ************** jump to marker operator ***************************** */
@@ -2222,7 +2222,7 @@ static void SCREEN_OT_marker_jump(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "next", TRUE, "Next Marker", "");
+ RNA_def_boolean(ot->srna, "next", true, "Next Marker", "");
}
/* ************** switch screen operator ***************************** */
@@ -3238,7 +3238,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
else sync = (scene->flag & SCE_FRAME_DROP);
if ((scene->audio.flag & AUDIO_SYNC) &&
- (sad->flag & ANIMPLAY_FLAG_REVERSE) == FALSE &&
+ (sad->flag & ANIMPLAY_FLAG_REVERSE) == false &&
finite(time = sound_sync_scene(scene)))
{
scene->r.cfra = (double)time * FPS + 0.5;
@@ -3473,7 +3473,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
ot->poll = ED_operator_screenactive;
- RNA_def_boolean(ot->srna, "restore_frame", TRUE, "Restore Frame", "Restore the frame when animation was initialized");
+ RNA_def_boolean(ot->srna, "restore_frame", true, "Restore Frame", "Restore the frame when animation was initialized");
}
/* ************** border select operator (template) ***************************** */
@@ -4052,10 +4052,10 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* render */
kmi = WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "use_viewport", TRUE);
+ RNA_boolean_set(kmi->ptr, "use_viewport", true);
kmi = WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "animation", TRUE);
- RNA_boolean_set(kmi->ptr, "use_viewport", TRUE);
+ RNA_boolean_set(kmi->ptr, "animation", true);
+ RNA_boolean_set(kmi->ptr, "use_viewport", true);
WM_keymap_add_item(keymap, "RENDER_OT_view_cancel", ESCKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "RENDER_OT_view_show", F11KEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "RENDER_OT_play_rendered_anim", F11KEY, KM_PRESS, KM_CTRL, 0);
@@ -4079,27 +4079,27 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELDOWNMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELUPMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", FALSE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", FALSE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", true);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", false);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", true);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", false);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", UPARROWKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "next", TRUE);
+ RNA_boolean_set(kmi->ptr, "next", true);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", DOWNARROWKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "next", FALSE);
+ RNA_boolean_set(kmi->ptr, "next", false);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIALAST, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "next", TRUE);
+ RNA_boolean_set(kmi->ptr, "next", true);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIAFIRST, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "next", FALSE);
+ RNA_boolean_set(kmi->ptr, "next", false);
/* play (forward and backwards) */
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0)->ptr, "reverse", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0)->ptr, "reverse", true);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_cancel", ESCKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", MEDIAPLAY, KM_PRESS, 0, 0);
@@ -4109,11 +4109,11 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
#if 0 /* XXX: disabled for restoring later... bad implementation */
keymap = WM_keymap_find(keyconf, "Frames", 0, 0);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
+ RNA_boolean_set(kmi->ptr, "cycle_speed", true);
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
- RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", true);
+ RNA_boolean_set(kmi->ptr, "cycle_speed", true);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", DOWNARROWKEY, KM_PRESS, KM_ALT, 0);
#endif
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 0153d609adb..c5ca5ab921f 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -138,11 +138,11 @@ static int screenshot_data_create(bContext *C, wmOperator *op)
op->customdata = scd;
- return TRUE;
+ return true;
}
else {
op->customdata = NULL;
- return FALSE;
+ return false;
}
}
@@ -257,7 +257,7 @@ static void screenshot_draw(bContext *UNUSED(C), wmOperator *op)
/* image template */
RNA_pointer_create(NULL, &RNA_ImageFormatSettings, &scd->im_format, &ptr);
- uiTemplateImageSettings(layout, &ptr, FALSE);
+ uiTemplateImageSettings(layout, &ptr, false);
/* main draw call */
RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
@@ -356,7 +356,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
sj->stop = stop;
sj->do_update = do_update;
- *do_update = TRUE; /* wait for opengl rect */
+ *do_update = true; /* wait for opengl rect */
while (*stop == 0) {
@@ -378,7 +378,8 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
char name[FILE_MAX];
int ok;
- BKE_makepicstring(name, rd.pic, sj->bmain->name, rd.cfra, &rd.im_format, rd.scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, rd.pic, sj->bmain->name, rd.cfra,
+ &rd.im_format, (rd.scemode & R_EXTENSION) != 0, true);
ibuf->rect = sj->dumprect;
ok = BKE_imbuf_write(ibuf, name, &rd.im_format);
@@ -400,7 +401,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
MEM_freeN(sj->dumprect);
sj->dumprect = NULL;
- *do_update = TRUE;
+ *do_update = true;
rd.cfra++;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 434aaaf8835..4cf59a575b9 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -808,13 +808,13 @@ void ED_space_image_paint_update(wmWindowManager *wm, ToolSettings *settings)
wmWindow *win;
ScrArea *sa;
ImagePaintSettings *imapaint = &settings->imapaint;
- int enabled = FALSE;
+ int enabled = false;
for (win = wm->windows.first; win; win = win->next)
for (sa = win->screen->areabase.first; sa; sa = sa->next)
if (sa->spacetype == SPACE_IMAGE)
if (((SpaceImage *)sa->spacedata.first)->mode == SI_MODE_PAINT)
- enabled = TRUE;
+ enabled = true;
if (enabled) {
BKE_paint_init(&imapaint->paint, PAINT_CURSOR_TEXTURE_PAINT);
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 488e00e16ee..c6de5749274 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -661,7 +661,7 @@ static int project_paint_occlude_ptv_clip(const ProjPaintState *ps, const MFace
if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w);
else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w);
- if (!ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) {
+ if (!ED_view3d_clipping_test(ps->rv3d, wco, true)) {
return 1;
}
@@ -2017,9 +2017,9 @@ static void project_bucket_clip_face(
return;
}
- doubles = TRUE;
- while (doubles == TRUE) {
- doubles = FALSE;
+ doubles = true;
+ while (doubles == true) {
+ doubles = false;
for (i = 1; i < (*tot); i++) {
if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_PIXEL_TOLERANCE &&
fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_PIXEL_TOLERANCE)
@@ -2029,7 +2029,7 @@ static void project_bucket_clip_face(
isectVCosSS[j - 1][0] = isectVCosSS[j][0];
isectVCosSS[j - 1][1] = isectVCosSS[j][1];
}
- doubles = TRUE; /* keep looking for more doubles */
+ doubles = true; /* keep looking for more doubles */
(*tot)--;
}
}
@@ -2308,8 +2308,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
/* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesnt work,
* could check the poly direction but better to do this */
- if ((do_backfacecull == TRUE && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) ||
- (do_backfacecull == FALSE && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot)))
+ if ((do_backfacecull == true && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) ||
+ (do_backfacecull == false && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot)))
{
has_x_isect = has_isect = 1;
@@ -2321,7 +2321,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
/* a pity we need to get the worldspace pixel location here */
if (do_clip || do_3d_mapping) {
interp_v3_v3v3v3(wco, ps->dm_mvert[(*(&mf->v1 + i1))].co, ps->dm_mvert[(*(&mf->v1 + i2))].co, ps->dm_mvert[(*(&mf->v1 + i3))].co, w);
- if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) {
+ if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, true)) {
continue; /* Watch out that no code below this needs to run */
}
}
@@ -2329,7 +2329,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
/* Is this UV visible from the view? - raytrace */
/* project_paint_PickFace is less complex, use for testing */
//if (project_paint_PickFace(ps, pixelScreenCo, w, &side) == face_index) {
- if ((ps->do_occlude == FALSE) ||
+ if ((ps->do_occlude == false) ||
!project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo))
{
mask = project_paint_uvpixel_mask(ps, face_index, side, w);
@@ -2507,7 +2507,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
pixelScreenCo[2] = pixelScreenCo[2] / pixelScreenCo[3]; /* Use the depth for bucket point occlusion */
}
- if ((ps->do_occlude == FALSE) ||
+ if ((ps->do_occlude == false) ||
!project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo))
{
/* Only bother calculating the weights if we intersect */
@@ -2547,7 +2547,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w);
else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w);
- if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) {
+ if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, true)) {
continue; /* Watch out that no code below this needs to run */
}
}
@@ -2842,20 +2842,20 @@ static void project_paint_begin(ProjPaintState *ps)
if (ps->source == PROJ_SRC_IMAGE_CAM) {
/* using render mesh, assume only camera was rendered from */
ps->dm = mesh_create_derived_render(ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE);
- ps->dm_release = TRUE;
+ ps->dm_release = true;
}
else if (ps->ob->derivedFinal &&
CustomData_has_layer(&ps->ob->derivedFinal->faceData, CD_MTFACE) &&
(ps->do_face_sel == false || CustomData_has_layer(&ps->ob->derivedFinal->polyData, CD_ORIGINDEX)))
{
ps->dm = ps->ob->derivedFinal;
- ps->dm_release = FALSE;
+ ps->dm_release = false;
}
else {
ps->dm = mesh_get_derived_final(
ps->scene, ps->ob,
ps->scene->customdata_mask | CD_MASK_MTFACE | (ps->do_face_sel ? CD_ORIGINDEX : 0));
- ps->dm_release = TRUE;
+ ps->dm_release = true;
}
if (!CustomData_has_layer(&ps->dm->faceData, CD_MTFACE) ) {
@@ -2900,7 +2900,7 @@ static void project_paint_begin(ProjPaintState *ps)
ps->dm_mtface_clone = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num);
if (ps->dm_mtface_clone == NULL || ps->dm_mtface_clone == ps->dm_mtface) {
- ps->do_layer_clone = FALSE;
+ ps->do_layer_clone = false;
ps->dm_mtface_clone = NULL;
}
}
@@ -2912,7 +2912,7 @@ static void project_paint_begin(ProjPaintState *ps)
ps->dm_mtface_stencil = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num);
if (ps->dm_mtface_stencil == NULL || ps->dm_mtface_stencil == ps->dm_mtface) {
- ps->do_layer_stencil = FALSE;
+ ps->do_layer_stencil = false;
ps->dm_mtface_stencil = NULL;
}
}
@@ -3698,7 +3698,7 @@ static void do_projectpaint_soften_f(ProjPaintState *ps, ProjPixel *projPixel, f
float co_ofs[2];
float rgba_tmp[4];
sub_v2_v2v2(co_ofs, projPixel->projCoSS, proj_pixel_soften_v2[i]);
- if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, TRUE)) {
+ if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, true)) {
add_v4_v4(rgba, rgba_tmp);
accum_tot++;
}
@@ -3729,7 +3729,7 @@ static void do_projectpaint_soften(ProjPaintState *ps, ProjPixel *projPixel, flo
float co_ofs[2];
float rgba_tmp[4];
sub_v2_v2v2(co_ofs, projPixel->projCoSS, proj_pixel_soften_v2[i]);
- if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, TRUE)) {
+ if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, true)) {
add_v4_v4(rgba, rgba_tmp);
accum_tot++;
}
@@ -4263,7 +4263,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int
ps->normal_angle_range = ps->normal_angle - ps->normal_angle_inner;
if (ps->normal_angle_range <= 0.0f)
- ps->do_mask_normal = FALSE; /* no need to do blending */
+ ps->do_mask_normal = false; /* no need to do blending */
return;
}
@@ -4486,7 +4486,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
if (w > maxsize) w = maxsize;
if (h > maxsize) h = maxsize;
- ibuf = ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, FALSE, R_ALPHAPREMUL, err_out);
+ ibuf = ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, false, R_ALPHAPREMUL, err_out);
if (!ibuf) {
/* Mostly happens when OpenGL offscreen buffer was failed to create, */
/* but could be other reasons. Should be handled in the future. nazgul */
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index eec666426b6..71a548d2f21 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -1165,11 +1165,11 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
/* multires switch */
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0);
RNA_int_set(kmi->ptr, "level", 1);
- RNA_boolean_set(kmi->ptr, "relative", TRUE);
+ RNA_boolean_set(kmi->ptr, "relative", true);
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEDOWNKEY, KM_PRESS, 0, 0);
RNA_int_set(kmi->ptr, "level", -1);
- RNA_boolean_set(kmi->ptr, "relative", TRUE);
+ RNA_boolean_set(kmi->ptr, "relative", true);
ed_keymap_paint_brush_switch(keymap, "sculpt");
ed_keymap_paint_brush_size(keymap, "tool_settings.sculpt.brush.size");
@@ -1273,9 +1273,9 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0);
/* Image/Texture Paint mode */
@@ -1314,9 +1314,9 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "PAINT_OT_face_select_reveal", HKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index f96f0edf672..15f21cc44c8 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -257,7 +257,7 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
paint_calculate_rake_rotation(ups, mouse);
}
- stroke->brush_init = TRUE;
+ stroke->brush_init = true;
}
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 4f9ca4c2675..5364ac6e26a 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -473,7 +473,7 @@ void PAINT_OT_face_select_linked_pick(wmOperatorType *ot)
static int face_select_all_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
- paintface_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE);
+ paintface_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), true);
ED_region_tag_redraw(CTX_wm_region(C));
return OPERATOR_FINISHED;
}
@@ -497,7 +497,7 @@ void PAINT_OT_face_select_all(wmOperatorType *ot)
static int vert_select_all_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
- paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE);
+ paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), true);
ED_region_tag_redraw(CTX_wm_region(C));
return OPERATOR_FINISHED;
}
@@ -528,7 +528,7 @@ static int vert_select_ungrouped_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- paintvert_select_ungrouped(ob, RNA_boolean_get(op->ptr, "extend"), TRUE);
+ paintvert_select_ungrouped(ob, RNA_boolean_get(op->ptr, "extend"), true);
ED_region_tag_redraw(CTX_wm_region(C));
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index e058f924a7b..d90f9a80b37 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -91,12 +91,12 @@ static bool vertex_paint_use_fast_update_check(Object *ob)
}
}
- return FALSE;
+ return false;
}
/* if the polygons from the mesh and the 'derivedFinal' match
* we can assume that no modifiers are applied and that its worth adding tessellated faces
- * so 'vertex_paint_use_fast_update_check()' returns TRUE */
+ * so 'vertex_paint_use_fast_update_check()' returns true */
static bool vertex_paint_use_tessface_check(Object *ob, Mesh *me)
{
DerivedMesh *dm = ob->derivedFinal;
@@ -105,7 +105,7 @@ static bool vertex_paint_use_tessface_check(Object *ob, Mesh *me)
return (me->mpoly == CustomData_get_layer(&dm->polyData, CD_MPOLY));
}
- return FALSE;
+ return false;
}
static void update_tessface_data(Object *ob, Mesh *me)
@@ -226,7 +226,7 @@ static void do_shared_vertex_tesscol(Mesh *me, bool *mfacetag)
mface = me->mface;
mcol = (char *)me->mcol;
for (a = me->totface; a > 0; a--, mface++, mcol += 16) {
- if ((use_face_sel == FALSE) || (mface->flag & ME_FACE_SEL)) {
+ if ((use_face_sel == false) || (mface->flag & ME_FACE_SEL)) {
scol = scolmain + 4 * mface->v1;
scol[0]++; scol[1] += mcol[1]; scol[2] += mcol[2]; scol[3] += mcol[3];
scol = scolmain + 4 * mface->v2;
@@ -255,7 +255,7 @@ static void do_shared_vertex_tesscol(Mesh *me, bool *mfacetag)
mcol = (char *)me->mcol;
mftag = mfacetag;
for (a = me->totface; a > 0; a--, mface++, mcol += 16, mftag += 4) {
- if ((use_face_sel == FALSE) || (mface->flag & ME_FACE_SEL)) {
+ if ((use_face_sel == false) || (mface->flag & ME_FACE_SEL)) {
if (mftag[0]) {
scol = scolmain + 4 * mface->v1;
mcol[1] = scol[1]; mcol[2] = scol[2]; mcol[3] = scol[3];
@@ -297,7 +297,7 @@ static void do_shared_vertexcol(Mesh *me, bool *mlooptag, bool *mfacetag, const
scol = MEM_callocN(sizeof(int) * me->totvert * 5, "scol");
for (i = 0, mp = me->mpoly; i < me->totpoly; i++, mp++) {
- if ((use_face_sel == FALSE) || (mp->flag & ME_FACE_SEL)) {
+ if ((use_face_sel == false) || (mp->flag & ME_FACE_SEL)) {
MLoop *ml = me->mloop + mp->loopstart;
MLoopCol *lcol = me->mloopcol + mp->loopstart;
for (j = 0; j < mp->totloop; j++, ml++, lcol++) {
@@ -320,7 +320,7 @@ static void do_shared_vertexcol(Mesh *me, bool *mlooptag, bool *mfacetag, const
}
for (i = 0, mp = me->mpoly; i < me->totpoly; i++, mp++) {
- if ((use_face_sel == FALSE) || (mp->flag & ME_FACE_SEL)) {
+ if ((use_face_sel == false) || (mp->flag & ME_FACE_SEL)) {
MLoop *ml = me->mloop + mp->loopstart;
MLoopCol *lcol = me->mloopcol + mp->loopstart;
for (j = 0; j < mp->totloop; j++, ml++, lcol++) {
@@ -1055,13 +1055,13 @@ static float wpaint_blend(VPaint *wp, float weight, float weight_prev,
weight = wpaint_blend_tool(tool, weight, paintval, alpha);
/* delay clamping until the end so multi-paint can function when the active group is at the limits */
- if (do_multipaint_totsel == FALSE) {
+ if (do_multipaint_totsel == false) {
CLAMP(weight, 0.0f, 1.0f);
}
/* if no spray, clip result with orig weight & orig alpha */
if ((wp->flag & VP_SPRAY) == 0) {
- if (do_multipaint_totsel == FALSE) {
+ if (do_multipaint_totsel == false) {
float testw = wpaint_blend_tool(tool, weight_prev, paintval, brush_alpha_value);
CLAMP(testw, 0.0f, 1.0f);
@@ -1102,7 +1102,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even
ED_view3d_init_mats_rv3d(vc.obact, vc.rv3d);
if (use_vert_sel) {
- if (ED_mesh_pick_vert(C, vc.obact, event->mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, TRUE)) {
+ if (ED_mesh_pick_vert(C, vc.obact, event->mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, true)) {
v_idx_best = index;
}
}
@@ -1153,16 +1153,16 @@ void PAINT_OT_weight_sample(wmOperatorType *ot)
}
/* samples cursor location, and gives menu with vertex groups to activate */
-static int weight_paint_sample_enum_itemf__helper(const MDeformVert *dvert, const int defbase_tot, int *groups)
+static bool weight_paint_sample_enum_itemf__helper(const MDeformVert *dvert, const int defbase_tot, int *groups)
{
/* this func fills in used vgroup's */
- int found = FALSE;
+ bool found = false;
int i = dvert->totweight;
MDeformWeight *dw;
for (dw = dvert->dw; i > 0; dw++, i--) {
if (dw->def_nr < defbase_tot) {
- groups[dw->def_nr] = TRUE;
- found = TRUE;
+ groups[dw->def_nr] = true;
+ found = true;
}
}
return found;
@@ -1182,7 +1182,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA
const int defbase_tot = BLI_countlist(&vc.obact->defbase);
const int use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
int *groups = MEM_callocN(defbase_tot * sizeof(int), "groups");
- int found = FALSE;
+ bool found = false;
unsigned int index;
int mval[2] = {win->eventstate->x - vc.ar->winrct.xmin,
@@ -1192,7 +1192,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA
ED_view3d_init_mats_rv3d(vc.obact, vc.rv3d);
if (use_vert_sel) {
- if (ED_mesh_pick_vert(C, vc.obact, mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, TRUE)) {
+ if (ED_mesh_pick_vert(C, vc.obact, mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, true)) {
MDeformVert *dvert = &me->dvert[index];
found |= weight_paint_sample_enum_itemf__helper(dvert, defbase_tot, groups);
}
@@ -1209,7 +1209,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA
}
}
- if (found == FALSE) {
+ if (found == false) {
MEM_freeN(groups);
}
else {
@@ -1387,11 +1387,11 @@ static bool has_locked_group(MDeformVert *dvert, const int defbase_tot,
for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot) {
if (bone_groups[dw->def_nr] && lock_flags[dw->def_nr] && dw->weight > 0.0f) {
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
static bool has_locked_group_selected(int defbase_tot, const bool *defbase_sel, const bool *lock_flags)
@@ -1412,14 +1412,14 @@ static bool has_unselected_unlocked_bone_group(int defbase_tot, bool *defbase_se
{
int i;
if (defbase_tot == selected) {
- return FALSE;
+ return false;
}
for (i = 0; i < defbase_tot; i++) {
if (vgroup_validmap[i] && !defbase_sel[i] && !lock_flags[i]) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
#endif
@@ -1488,7 +1488,7 @@ static float redistribute_change(MDeformVert *ndv, const int defbase_tot,
if (change_status[ndw->def_nr] == change_me) {
oldval = ndw->weight;
/* if auto normalize is active, don't worry about upper bounds */
- if (do_auto_normalize == FALSE && ndw->weight + change > 1) {
+ if (do_auto_normalize == false && ndw->weight + change > 1) {
totchange -= 1.0f - ndw->weight;
ndw->weight = 1.0f;
/* stop the changes to this group */
@@ -1707,7 +1707,7 @@ typedef struct WeightPaintInfo {
} WeightPaintInfo;
/* fresh start to make multi-paint and locking modular */
-/* returns TRUE if it thinks you need to reset the weights due to
+/* returns true if it thinks you need to reset the weights due to
* normalizing while multi-painting
*
* note: this assumes dw->def_nr range has been checked by the caller
@@ -1753,19 +1753,19 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
if (neww > oldw) {
if (tdw->weight <= oldw) {
MEM_freeN(dv_test.dw);
- return TRUE;
+ return true;
}
}
else {
if (tdw->weight >= oldw) {
MEM_freeN(dv_test.dw);
- return TRUE;
+ return true;
}
}
}
}
MEM_freeN(dv_test.dw);
- return FALSE;
+ return false;
}
/* within the current dvert index, get the dw that is selected and has a weight
@@ -1875,11 +1875,11 @@ static void do_weight_paint_vertex(
/* If there are no locks or multipaint,
* then there is no need to run the more complicated checks */
- if ((do_multipaint_totsel == FALSE) &&
- (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == FALSE))
+ if ((do_multipaint_totsel == false) &&
+ (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == false))
{
dw->weight = wpaint_blend(wp, dw->weight, dw_prev->weight, alpha, paintweight,
- wpi->brush_alpha_value, wpi->do_flip, FALSE);
+ wpi->brush_alpha_value, wpi->do_flip, false);
/* WATCH IT: take care of the ordering of applying mirror -> normalize,
* can give wrong results [#26193], least confusing if normalize is done last */
@@ -2149,11 +2149,11 @@ static bool wpaint_ensure_data(bContext *C, wmOperator *op)
Mesh *me = BKE_mesh_from_object(ob);
if (scene->obedit) {
- return FALSE;
+ return false;
}
if (me == NULL || me->totpoly == 0) {
- return FALSE;
+ return false;
}
/* if nothing was added yet, we make dverts and a vertex deform group */
@@ -2191,10 +2191,10 @@ static bool wpaint_ensure_data(bContext *C, wmOperator *op)
/* ensure we don't try paint onto an invalid group */
if (ob->actdef <= 0) {
BKE_report(op->reports, RPT_WARNING, "No active vertex group for painting, aborting");
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UNUSED(mouse[2]))
@@ -2209,8 +2209,8 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UN
float mat[4][4], imat[4][4];
- if (wpaint_ensure_data(C, op) == FALSE) {
- return FALSE;
+ if (wpaint_ensure_data(C, op) == false) {
+ return false;
}
{
@@ -2219,7 +2219,7 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UN
bDeformGroup *dg = BLI_findlink(&ob->defbase, (ob->actdef - 1));
if (dg->flag & DG_LOCK_WEIGHT) {
BKE_report(op->reports, RPT_WARNING, "Active group is locked, aborting");
- return FALSE;
+ return false;
}
}
@@ -2256,7 +2256,7 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UN
wpd->vgroup_mirror = wpaint_mirror_vgroup_ensure(ob, wpd->vgroup_active);
}
- return TRUE;
+ return true;
}
static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
@@ -2611,7 +2611,7 @@ static int weight_paint_set_exec(bContext *C, wmOperator *op)
Brush *brush = BKE_paint_brush(&ts->wpaint->paint);
float vgroup_weight = BKE_brush_weight_get(scene, brush);
- if (wpaint_ensure_data(C, op) == FALSE) {
+ if (wpaint_ensure_data(C, op) == false) {
return OPERATOR_CANCELLED;
}
@@ -2823,11 +2823,11 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f
* if not we can skip face map trickyness */
if (vertex_paint_use_fast_update_check(ob)) {
vpaint_build_poly_facemap(vpd, me);
- vpd->use_fast_update = TRUE;
+ vpd->use_fast_update = true;
/* printf("Fast update!\n");*/
}
else {
- vpd->use_fast_update = FALSE;
+ vpd->use_fast_update = false;
/* printf("No fast update!\n");*/
}
@@ -3024,7 +3024,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
ED_region_tag_redraw(vc->ar);
- if (vpd->use_fast_update == FALSE) {
+ if (vpd->use_fast_update == false) {
/* recalculate modifier stack to get new colors, slow,
* avoid this if we can! */
DAG_id_tag_update(ob->data, 0);
@@ -3206,7 +3206,7 @@ static void gradientVert__mapFunc(void *userData, int index, const float co[3],
DMGradient_userData *grad_data = userData;
Mesh *me = grad_data->me;
- if (grad_data->use_select == FALSE || (me->mvert[index].flag & SELECT)) {
+ if (grad_data->use_select == false || (me->mvert[index].flag & SELECT)) {
DMGradient_vertStore *vs = &grad_data->vert_cache[index];
/* run first pass only, could be split into its own mapFunc
@@ -3356,7 +3356,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
vert_cache = gesture->userdata;
}
else {
- if (wpaint_ensure_data(C, op) == FALSE) {
+ if (wpaint_ensure_data(C, op) == false) {
return OPERATOR_CANCELLED;
}
@@ -3404,7 +3404,7 @@ static int paint_weight_gradient_invoke(bContext *C, wmOperator *op, const wmEve
{
int ret;
- if (wpaint_ensure_data(C, op) == FALSE) {
+ if (wpaint_ensure_data(C, op) == false) {
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 441ce0f29b6..15a1cfdbdd3 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1723,7 +1723,7 @@ static void smooth(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode,
static void do_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
{
SculptSession *ss = ob->sculpt;
- smooth(sd, ob, nodes, totnode, ss->cache->bstrength, FALSE);
+ smooth(sd, ob, nodes, totnode, ss->cache->bstrength, false);
}
static void do_mask_brush_draw(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
@@ -1768,7 +1768,7 @@ static void do_mask_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
do_mask_brush_draw(sd, ob, nodes, totnode);
break;
case BRUSH_MASK_SMOOTH:
- smooth(sd, ob, nodes, totnode, ss->cache->bstrength, TRUE);
+ smooth(sd, ob, nodes, totnode, ss->cache->bstrength, true);
break;
}
}
@@ -3243,10 +3243,10 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush)
brush->autosmooth_factor > 0)
{
if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) {
- smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure), FALSE);
+ smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure), false);
}
else {
- smooth(sd, ob, nodes, totnode, brush->autosmooth_factor, FALSE);
+ smooth(sd, ob, nodes, totnode, brush->autosmooth_factor, false);
}
}
@@ -4239,7 +4239,7 @@ static void sculpt_stroke_modifiers_check(const bContext *C, Object *ob)
Brush *brush = BKE_paint_brush(&sd->paint);
sculpt_update_mesh_elements(CTX_data_scene(C), sd, ob,
- sculpt_any_smooth_mode(brush, ss->cache, 0), FALSE);
+ sculpt_any_smooth_mode(brush, ss->cache, 0), false);
}
}
@@ -4263,17 +4263,17 @@ static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float *tmin)
if (BKE_pbvh_node_get_tmin(node) < *tmin) {
SculptRaycastData *srd = data_v;
float (*origco)[3] = NULL;
- int use_origco = FALSE;
+ bool use_origco = false;
if (srd->original && srd->ss->cache) {
if (BKE_pbvh_type(srd->ss->pbvh) == PBVH_BMESH) {
- use_origco = TRUE;
+ use_origco = true;
}
else {
/* intersect with coordinates from before we started stroke */
SculptUndoNode *unode = sculpt_undo_get_node(node);
origco = (unode) ? unode->co : NULL;
- use_origco = origco ? TRUE : FALSE;
+ use_origco = origco ? true : false;
}
}
@@ -4394,10 +4394,10 @@ static int sculpt_brush_stroke_init(bContext *C, wmOperator *op)
Brush *brush = BKE_paint_brush(&sd->paint);
int mode = RNA_enum_get(op->ptr, "mode");
int is_smooth = 0;
- int need_mask = FALSE;
+ int need_mask = false;
if (brush->sculpt_tool == SCULPT_TOOL_MASK) {
- need_mask = TRUE;
+ need_mask = true;
}
view3d_operator_needs_opengl(C);
@@ -4554,7 +4554,7 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *UNUSED(st
if (ss->modifiers_active)
sculpt_flush_stroke_deform(sd, ob);
- ss->cache->first_time = FALSE;
+ ss->cache->first_time = false;
/* Cleanup */
sculpt_flush_update(C);
@@ -4801,7 +4801,7 @@ void sculpt_update_after_dynamic_topology_toggle(bContext *C)
Sculpt *sd = scene->toolsettings->sculpt;
/* Create the PBVH */
- sculpt_update_mesh_elements(scene, sd, ob, FALSE, FALSE);
+ sculpt_update_mesh_elements(scene, sd, ob, false, false);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
}
@@ -4878,7 +4878,7 @@ void sculpt_dynamic_topology_disable(bContext *C,
BKE_mesh_update_customdata_pointers(me, false);
}
else {
- sculptsession_bm_to_me(ob, TRUE);
+ sculptsession_bm_to_me(ob, true);
}
/* Clear data */
@@ -5046,7 +5046,7 @@ static void sculpt_init_session(Scene *scene, Object *ob)
{
ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session");
- sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, FALSE);
+ sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, false);
}
int ED_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 03321cd1a85..5adef17c6ad 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -114,7 +114,7 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo
if (kb) {
ob->shapenr = BLI_findindex(&key->block, kb) + 1;
- sculpt_update_mesh_elements(scene, sd, ob, 0, FALSE);
+ sculpt_update_mesh_elements(scene, sd, ob, 0, false);
WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob);
}
else {
@@ -273,11 +273,11 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C,
{
if (unode->applied) {
BM_log_undo(ss->bm, ss->bm_log);
- unode->applied = FALSE;
+ unode->applied = false;
}
else {
BM_log_redo(ss->bm, ss->bm_log);
- unode->applied = TRUE;
+ unode->applied = true;
}
if (unode->type == SCULPT_UNDO_MASK) {
@@ -330,7 +330,7 @@ static void sculpt_undo_bmesh_restore_begin(bContext *C,
{
if (unode->applied) {
sculpt_dynamic_topology_disable(C, unode);
- unode->applied = FALSE;
+ unode->applied = false;
}
else {
sculpt_undo_bmesh_enable(ob, unode);
@@ -338,7 +338,7 @@ static void sculpt_undo_bmesh_restore_begin(bContext *C,
/* Restore the mesh from the first log entry */
BM_log_redo(ss->bm, ss->bm_log);
- unode->applied = TRUE;
+ unode->applied = true;
}
}
@@ -353,19 +353,19 @@ static void sculpt_undo_bmesh_restore_end(bContext *C,
/* Restore the mesh from the last log entry */
BM_log_undo(ss->bm, ss->bm_log);
- unode->applied = FALSE;
+ unode->applied = false;
}
else {
/* Disable dynamic topology sculpting */
sculpt_dynamic_topology_disable(C, NULL);
- unode->applied = TRUE;
+ unode->applied = true;
}
}
/* Handle all dynamic-topology updates
*
- * Returns TRUE if this was a dynamic-topology undo step, otherwise
- * returns FALSE to indicate the non-dyntopo code should run. */
+ * Returns true if this was a dynamic-topology undo step, otherwise
+ * returns false to indicate the non-dyntopo code should run. */
static int sculpt_undo_bmesh_restore(bContext *C,
SculptUndoNode *unode,
Object *ob,
@@ -374,21 +374,21 @@ static int sculpt_undo_bmesh_restore(bContext *C,
switch (unode->type) {
case SCULPT_UNDO_DYNTOPO_BEGIN:
sculpt_undo_bmesh_restore_begin(C, unode, ob, ss);
- return TRUE;
+ return true;
case SCULPT_UNDO_DYNTOPO_END:
sculpt_undo_bmesh_restore_end(C, unode, ob, ss);
- return TRUE;
+ return true;
default:
if (ss->bm_log) {
sculpt_undo_bmesh_restore_generic(C, unode, ob, ss);
- return TRUE;
+ return true;
}
break;
}
- return FALSE;
+ return false;
}
static void sculpt_undo_restore(bContext *C, ListBase *lb)
@@ -399,15 +399,15 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
DerivedMesh *dm;
SculptSession *ss = ob->sculpt;
SculptUndoNode *unode;
- int update = FALSE, rebuild = FALSE;
- int need_mask = FALSE;
+ int update = false, rebuild = false;
+ int need_mask = false;
for (unode = lb->first; unode; unode = unode->next) {
if (strcmp(unode->idname, ob->id.name) == 0) {
if (unode->type == SCULPT_UNDO_MASK) {
/* is possible that we can't do the mask undo (below)
* because of the vertex count */
- need_mask = TRUE;
+ need_mask = true;
break;
}
}
@@ -442,15 +442,15 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
switch (unode->type) {
case SCULPT_UNDO_COORDS:
if (sculpt_undo_restore_coords(C, dm, unode))
- update = TRUE;
+ update = true;
break;
case SCULPT_UNDO_HIDDEN:
if (sculpt_undo_restore_hidden(C, dm, unode))
- rebuild = TRUE;
+ rebuild = true;
break;
case SCULPT_UNDO_MASK:
if (sculpt_undo_restore_mask(C, dm, unode))
- update = TRUE;
+ update = true;
break;
case SCULPT_UNDO_DYNTOPO_BEGIN:
@@ -713,7 +713,7 @@ static SculptUndoNode *sculpt_undo_bmesh_push(Object *ob,
BLI_strncpy(unode->idname, ob->id.name, sizeof(unode->idname));
unode->type = type;
- unode->applied = TRUE;
+ unode->applied = true;
if (type == SCULPT_UNDO_DYNTOPO_END) {
unode->bm_entry = BM_log_entry_add(ss->bm_log);
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 88891c9f05c..71a6c775774 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -187,8 +187,8 @@ static void SOUND_OT_open(wmOperatorType *ot)
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
- RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
- RNA_def_boolean(ot->srna, "mono", FALSE, "Mono", "Mixdown the sound to mono");
+ RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory");
+ RNA_def_boolean(ot->srna, "mono", false, "Mono", "Mixdown the sound to mono");
}
static void SOUND_OT_open_mono(wmOperatorType *ot)
@@ -209,8 +209,8 @@ static void SOUND_OT_open_mono(wmOperatorType *ot)
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
- RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
- RNA_def_boolean(ot->srna, "mono", TRUE, "Mono", "Mixdown the sound to mono");
+ RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory");
+ RNA_def_boolean(ot->srna, "mono", true, "Mono", "Mixdown the sound to mono");
}
/* ******************************************************* */
@@ -430,10 +430,10 @@ static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op)
return check;
RNA_property_string_set(op->ptr, prop, filepath);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#endif // WITH_AUDASPACE
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 4c2cb16bdd1..6e040371037 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -285,7 +285,7 @@ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const
float tmin, tmax;
/* get range and apply necessary scaling before processing */
- if (calc_fcurve_range(fcu, &tmin, &tmax, onlySel, TRUE)) {
+ if (calc_fcurve_range(fcu, &tmin, &tmax, onlySel, true)) {
if (adt) {
tmin = BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP);
@@ -335,7 +335,7 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
scene = ac.scene;
/* set the range directly */
- get_keyframe_extents(&ac, &min, &max, FALSE);
+ get_keyframe_extents(&ac, &min, &max, false);
scene->r.flag |= SCER_PRV_RANGE;
scene->r.psfra = iroundf(min);
scene->r.pefra = iroundf(max);
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index bc1a4fa4069..b93728a7b3e 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -111,61 +111,61 @@ static void action_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
/* action_select.c - selection tools */
/* click-select: keyframe (replace) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
- RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "column", false);
+ RNA_boolean_set(kmi->ptr, "channel", false);
/* click-select: all on same frame (replace) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
- RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "column", true);
+ RNA_boolean_set(kmi->ptr, "channel", false);
/* click-select: keyframe (add) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
- RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "column", false);
+ RNA_boolean_set(kmi->ptr, "channel", false);
/* click-select: all on same frame (add) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
- RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "column", true);
+ RNA_boolean_set(kmi->ptr, "channel", false);
/* click-select: all on same channel (replace) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
- RNA_boolean_set(kmi->ptr, "channel", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "column", false);
+ RNA_boolean_set(kmi->ptr, "channel", true);
/* click-select: all on same channel (add) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
- RNA_boolean_set(kmi->ptr, "channel", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "column", false);
+ RNA_boolean_set(kmi->ptr, "channel", true);
/* click-select: left/right */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
/* deselect all */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "invert", FALSE);
+ RNA_boolean_set(kmi->ptr, "invert", false);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "invert", TRUE);
+ RNA_boolean_set(kmi->ptr, "invert", true);
/* borderselect */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", false);
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", true);
/* column select */
RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS);
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index c256dbb3b59..14cc38ed296 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -369,7 +369,7 @@ void ACTION_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
}
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 4718f5dbbdd..f1b3cb42251 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -1002,7 +1002,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
if (!path)
return;
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
block = uiLayoutGetBlock(row);
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 50bb8a0e061..6c228d52a96 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -130,18 +130,18 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c
if (clip) {
uiLayout *col;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
block = uiLayoutGetBlock(row);
uiDefBut(block, LABEL, 0, IFACE_("File Path:"), 0, 19, 145, 19, NULL, 0, 0, 0, 0, "");
- row = uiLayoutRow(layout, FALSE);
- split = uiLayoutSplit(row, 0.0f, FALSE);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(layout, false);
+ split = uiLayoutSplit(row, 0.0f, false);
+ row = uiLayoutRow(split, true);
uiItemR(row, &clipptr, "filepath", 0, "", ICON_NONE);
uiItemO(row, "", ICON_FILE_REFRESH, "clip.reload");
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiTemplateColorspaceSettings(col, &clipptr, "colorspace_settings");
}
}
@@ -412,7 +412,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
BKE_movieclip_get_size(clip, user, &width, &height);
if (track->flag & TRACK_LOCKED) {
- uiLayoutSetActive(layout, FALSE);
+ uiLayoutSetActive(layout, false);
block = uiLayoutAbsoluteBlock(layout);
uiDefBut(block, LABEL, 0, IFACE_("Track is locked"), 0, 0, UI_UNIT_X * 15.0f, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
@@ -450,7 +450,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
uiDefButBitI(block, OPTIONN, MARKER_DISABLED, B_MARKER_FLAG, IFACE_("Enabled"), 0.5 * UI_UNIT_X, 9.5 * UI_UNIT_Y, 7.25 * UI_UNIT_X, UI_UNIT_Y,
&cb->marker_flag, 0, 0, 0, 0, tip);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0);
block = uiLayoutAbsoluteBlock(col);
@@ -523,7 +523,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, const cha
clip = (MovieClip *)clipptr.data;
user = userptr->data;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
ibuf = BKE_movieclip_get_ibuf_flag(clip, user, clip->flag, MOVIECLIP_CACHE_SKIP);
diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c
index 8cd096a2438..58ae0d14e4d 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_ops.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c
@@ -71,7 +71,7 @@ static int space_clip_dopesheet_poll(bContext *C)
}
}
- return FALSE;
+ return false;
}
/********************** select channel operator *********************/
@@ -83,7 +83,7 @@ static int dopesheet_select_channel_poll(bContext *C)
if (sc && sc->clip)
return sc->view == SC_VIEW_DOPESHEET;
- return FALSE;
+ return false;
}
static int dopesheet_select_channel_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 42b4051d7ff..f3938c2aebe 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -83,9 +83,9 @@ int ED_space_clip_poll(bContext *C)
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc && sc->clip)
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
int ED_space_clip_view_clip_poll(bContext *C)
@@ -96,7 +96,7 @@ int ED_space_clip_view_clip_poll(bContext *C)
return sc->view == SC_VIEW_CLIP;
}
- return FALSE;
+ return false;
}
int ED_space_clip_tracking_poll(bContext *C)
@@ -106,7 +106,7 @@ int ED_space_clip_tracking_poll(bContext *C)
if (sc && sc->clip)
return ED_space_clip_check_show_trackedit(sc);
- return FALSE;
+ return false;
}
int ED_space_clip_maskedit_poll(bContext *C)
@@ -117,7 +117,7 @@ int ED_space_clip_maskedit_poll(bContext *C)
return ED_space_clip_check_show_maskedit(sc);
}
- return FALSE;
+ return false;
}
int ED_space_clip_maskedit_mask_poll(bContext *C)
@@ -132,7 +132,7 @@ int ED_space_clip_maskedit_mask_poll(bContext *C)
}
}
- return FALSE;
+ return false;
}
/* ******** common editing functions ******** */
@@ -316,7 +316,7 @@ void ED_clip_update_frame(const Main *mainp, int cfra)
if (sa->spacetype == SPACE_CLIP) {
SpaceClip *sc = sa->spacedata.first;
- sc->scopes.ok = FALSE;
+ sc->scopes.ok = false;
BKE_movieclip_user_set_frame(&sc->user, cfra);
}
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index b0de9dda6cd..2aaf064ef53 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -69,7 +69,7 @@ static int ED_space_clip_graph_poll(bContext *C)
return sc->view == SC_VIEW_GRAPH;
}
- return FALSE;
+ return false;
}
static int clip_graph_knots_poll(bContext *C)
@@ -79,7 +79,7 @@ static int clip_graph_knots_poll(bContext *C)
return (sc->flag & SC_SHOW_GRAPH_TRACKS_MOTION) != 0;
}
- return FALSE;
+ return false;
}
typedef struct {
@@ -410,7 +410,7 @@ void CLIP_OT_graph_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
/********************** select all operator *********************/
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index d9a2ccbe70e..2b425e23183 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -1030,7 +1030,7 @@ static void do_movie_proxy(void *pjv, int *UNUSED(build_sizes), int UNUSED(build
if (*stop || G.is_break)
break;
- *do_update = TRUE;
+ *do_update = true;
*progress = ((float) cfra - sfra) / (efra - sfra);
}
@@ -1523,5 +1523,5 @@ void ED_operatormacros_clip(void)
OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_boolean_set(otmacro->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(otmacro->ptr, "release_confirm", true);
}
diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c
index 42300f88a4f..55b78219770 100644
--- a/source/blender/editors/space_clip/clip_toolbar.c
+++ b/source/blender/editors/space_clip/clip_toolbar.c
@@ -239,7 +239,7 @@ static void clip_panel_operator_redo(const bContext *C, Panel *pa)
uiBlock *block = uiLayoutGetBlock(pa->layout);
if (!WM_operator_check_ui_enabled(C, op->type->name))
- uiLayoutSetEnabled(pa->layout, FALSE);
+ uiLayoutSetEnabled(pa->layout, false);
/* note, blockfunc is a default but->func, use Handle func to allow button callbacks too */
uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, op);
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index bedd576a65e..fd994d5e1b3 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -256,7 +256,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track)
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
if (update_stab) {
- tracking->stabilization.ok = FALSE;
+ tracking->stabilization.ok = false;
WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
}
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 0ee05cac0b9..ad425d21612 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -213,7 +213,7 @@ static void clip_scopes_tag_refresh(ScrArea *sa)
return;
}
- sc->scopes.ok = FALSE;
+ sc->scopes.ok = false;
}
static void clip_scopes_check_gpencil_change(ScrArea *sa)
@@ -233,7 +233,7 @@ static void clip_stabilization_tag_refresh(ScrArea *sa)
if (clip) {
MovieTrackingStabilization *stab = &clip->tracking.stabilization;
- stab->ok = FALSE;
+ stab->ok = false;
}
}
@@ -336,7 +336,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
/* clear or remove stuff from old */
scn->scopes.track_search = NULL;
scn->scopes.track_preview = NULL;
- scn->scopes.ok = FALSE;
+ scn->scopes.ok = false;
return (SpaceLink *)scn;
}
@@ -564,17 +564,17 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* 2d tracking */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "backwards", TRUE);
- RNA_boolean_set(kmi->ptr, "sequence", FALSE);
+ RNA_boolean_set(kmi->ptr, "backwards", true);
+ RNA_boolean_set(kmi->ptr, "sequence", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "backwards", FALSE);
- RNA_boolean_set(kmi->ptr, "sequence", FALSE);
+ RNA_boolean_set(kmi->ptr, "backwards", false);
+ RNA_boolean_set(kmi->ptr, "sequence", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "backwards", FALSE);
- RNA_boolean_set(kmi->ptr, "sequence", TRUE);
+ RNA_boolean_set(kmi->ptr, "backwards", false);
+ RNA_boolean_set(kmi->ptr, "sequence", true);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "backwards", TRUE);
- RNA_boolean_set(kmi->ptr, "sequence", TRUE);
+ RNA_boolean_set(kmi->ptr, "backwards", true);
+ RNA_boolean_set(kmi->ptr, "sequence", true);
/* mode */
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", TABKEY, KM_PRESS, 0, 0);
@@ -627,7 +627,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CLIP_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_view_all", FKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "fit_view", TRUE);
+ RNA_boolean_set(kmi->ptr, "fit_view", true);
WM_keymap_add_item(keymap, "CLIP_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
@@ -652,9 +652,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* selection */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_all", AKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
@@ -664,9 +664,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "CLIP_MT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
/* marker */
WM_keymap_add_item(keymap, "CLIP_OT_add_marker_slide", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
@@ -690,10 +690,10 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "action", 1); /* unlock */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks_clear", HKEY, KM_PRESS, KM_ALT, 0);
@@ -727,13 +727,13 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* clean-up */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED);
- RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
+ RNA_boolean_set(kmi->ptr, "clear_active", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO);
- RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
+ RNA_boolean_set(kmi->ptr, "clear_active", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL);
- RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
+ RNA_boolean_set(kmi->ptr, "clear_active", false);
/* Cursor */
WM_keymap_add_item(keymap, "CLIP_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0);
@@ -764,9 +764,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* selection */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select_all_markers", AKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
@@ -793,13 +793,13 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* clean-up */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED);
- RNA_boolean_set(kmi->ptr, "clear_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "clear_active", true);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO);
- RNA_boolean_set(kmi->ptr, "clear_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "clear_active", true);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL);
- RNA_boolean_set(kmi->ptr, "clear_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "clear_active", true);
/* tracks */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0);
@@ -812,7 +812,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
keymap = WM_keymap_find(keyconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
kmi = WM_keymap_add_item(keymap, "CLIP_OT_dopesheet_select_channel", ACTIONMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE); /* toggle */
+ RNA_boolean_set(kmi->ptr, "extend", true); /* toggle */
WM_keymap_add_item(keymap, "CLIP_OT_dopesheet_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CLIP_OT_dopesheet_view_all", NDOF_BUTTON_FIT, KM_PRESS, 0, 0);
@@ -827,20 +827,20 @@ static int clip_context(const bContext *C, const char *member, bContextDataResul
if (CTX_data_dir(member)) {
CTX_data_dir_set(result, clip_context_dir);
- return TRUE;
+ return true;
}
else if (CTX_data_equals(member, "edit_movieclip")) {
if (sc->clip)
CTX_data_id_pointer_set(result, &sc->clip->id);
- return TRUE;
+ return true;
}
else if (CTX_data_equals(member, "edit_mask")) {
if (sc->mask_info.mask)
CTX_data_id_pointer_set(result, &sc->mask_info.mask->id);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* dropboxes */
@@ -848,9 +848,9 @@ static int clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUS
{
if (drag->type == WM_DRAG_PATH)
if (ELEM4(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
static void clip_drop_copy(wmDrag *drag, wmDropBox *drop)
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 22878d3a0cd..c59b6b8c8a1 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1280,7 +1280,7 @@ static void track_markers_startjob(void *tmv, short *stop, short *do_update, flo
else if (!BKE_tracking_context_step(tmj->context))
break;
- *do_update = TRUE;
+ *do_update = true;
*progress = (float)(framenr - tmj->sfra) / (tmj->efra - tmj->sfra);
if (tmj->backwards)
@@ -2011,7 +2011,7 @@ static int set_orientation_poll(bContext *C)
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
- return TRUE;
+ return true;
}
else {
return OBACT != NULL;
@@ -2019,7 +2019,7 @@ static int set_orientation_poll(bContext *C)
}
}
- return FALSE;
+ return false;
}
static int count_selected_bundles(bContext *C)
@@ -2650,7 +2650,7 @@ static int set_solution_scale_poll(bContext *C)
}
}
- return FALSE;
+ return false;
}
static int set_solution_scale_exec(bContext *C, wmOperator *op)
@@ -2706,7 +2706,7 @@ static int apply_solution_scale_poll(bContext *C)
}
}
- return FALSE;
+ return false;
}
static int apply_solution_scale_exec(bContext *C, wmOperator *op)
@@ -3306,7 +3306,7 @@ static int stabilize_2d_poll(bContext *C)
return tracking_object->flag & TRACKING_OBJECT_CAMERA;
}
- return FALSE;
+ return false;
}
static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c
index b60d4473ab5..ec3b10a008c 100644
--- a/source/blender/editors/space_clip/tracking_select.c
+++ b/source/blender/editors/space_clip/tracking_select.c
@@ -382,7 +382,7 @@ static int select_poll(bContext *C)
return sc->clip && sc->view == SC_VIEW_CLIP;
}
- return FALSE;
+ return false;
}
static int select_exec(bContext *C, wmOperator *op)
@@ -553,7 +553,7 @@ void CLIP_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
/********************** lasso select operator *********************/
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 36144a074e3..213d9d79132 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -554,7 +554,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
int stride;
const short type = RNA_enum_get(op->ptr, "type");
- int done = FALSE;
+ int done = false;
if (ci->len == 0) {
return OPERATOR_CANCELLED;
@@ -573,7 +573,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - (ci->cursor + stride)) + 1);
ci->len -= stride;
BLI_assert(ci->len >= 0);
- done = TRUE;
+ done = true;
}
}
break;
@@ -590,7 +590,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - (ci->cursor + stride)) + 1);
ci->len -= stride;
BLI_assert(ci->len >= 0);
- done = TRUE;
+ done = true;
}
}
break;
@@ -1063,7 +1063,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, const wmEven
sel_prev[0] = sc->sel_start;
sel_prev[1] = sc->sel_end;
- console_cursor_set_to_pos(sc, ar, scu, mval, TRUE);
+ console_cursor_set_to_pos(sc, ar, scu, mval, true);
/* only redraw if the selection changed */
if (sel_prev[0] != sc->sel_start || sel_prev[1] != sc->sel_end) {
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index c4cbab4f230..247fb997055 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -280,25 +280,25 @@ static void console_keymap(struct wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", FALSE);
+ RNA_boolean_set(kmi->ptr, "reverse", false);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", true);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", FALSE);
+ RNA_boolean_set(kmi->ptr, "reverse", false);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", true);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_CHAR);
- RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", FALSE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", true);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", false);
#if 0
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 4a298e183e6..9c11fc712c8 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -171,7 +171,7 @@ static FileSelect file_select_do(bContext *C, int selected_idx, short do_diropen
params->active_file = selected_idx;
if (S_ISDIR(file->type)) {
- if (do_diropen == FALSE) {
+ if (do_diropen == false) {
params->file[0] = '\0';
retval = FILE_SELECT_DIR;
}
@@ -287,7 +287,7 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
BLI_rcti_isect(&(ar->v2d.mask), &rect, &rect);
- ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, FALSE, FALSE);
+ ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, false, false);
if (FILE_SELECT_DIR == ret) {
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL);
}
@@ -363,11 +363,11 @@ void FILE_OT_select(wmOperatorType *ot)
ot->poll = ED_operator_file_active;
/* properties */
- prop = RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ prop = RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "fill", FALSE, "Fill", "Select everything beginning with the last selection");
+ prop = RNA_def_boolean(ot->srna, "fill", false, "Fill", "Select everything beginning with the last selection");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "open", TRUE, "Open", "Open a directory when selecting it");
+ prop = RNA_def_boolean(ot->srna, "open", true, "Open", "Open a directory when selecting it");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
@@ -773,13 +773,13 @@ bool file_draw_check_exists(SpaceFile *sfile)
char filepath[FILE_MAX];
BLI_join_dirfile(filepath, sizeof(filepath), sfile->params->dir, sfile->params->file);
if (BLI_is_file(filepath)) {
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
/* sends events now, so things get handled on windowqueue level */
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 4b81b726dcf..cb07db75a91 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -86,12 +86,12 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
uiLayoutSetAlignment(pa->layout, UI_LAYOUT_ALIGN_LEFT);
block = uiLayoutGetBlock(pa->layout);
box = uiLayoutBox(pa->layout);
- col = uiLayoutColumn(box, TRUE);
+ col = uiLayoutColumn(box, true);
for (i = 0; i < nentries; ++i) {
char dir[FILE_MAX];
char temp[FILE_MAX];
- uiLayout *layout = uiLayoutRow(col, FALSE);
+ uiLayout *layout = uiLayoutRow(col, false);
char *entry;
entry = fsmenu_get_entry(fsmenu, category, i);
@@ -157,7 +157,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa)
uiLayout *row;
if (sfile) {
- row = uiLayoutRow(pa->layout, FALSE);
+ row = uiLayoutRow(pa->layout, false);
uiItemO(row, IFACE_("Add"), ICON_ZOOMIN, "file.bookmark_add");
uiItemL(row, NULL, ICON_NONE);
@@ -178,7 +178,7 @@ static void file_panel_recent(const bContext *C, Panel *pa)
if (sfile) {
if (!(U.uiflag & USER_HIDE_RECENT)) {
- row = uiLayoutRow(pa->layout, FALSE);
+ row = uiLayoutRow(pa->layout, false);
uiItemO(row, IFACE_("Reset"), ICON_X, "file.reset_recent");
uiItemL(row, NULL, ICON_NONE);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index a7995dd8a90..15d177011c4 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -393,7 +393,7 @@ void filelist_init_icons(void)
ImBuf *bbuf;
ImBuf *ibuf;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
#ifdef WITH_HEADLESS
bbuf = NULL;
@@ -421,7 +421,7 @@ void filelist_free_icons(void)
{
int i;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
for (i = 0; i < SPECIAL_IMG_MAX; ++i) {
IMB_freeImBuf(gSpecialFileImages[i]);
@@ -624,7 +624,7 @@ ImBuf *filelist_getimage(struct FileList *filelist, int index)
ImBuf *ibuf = NULL;
int fidx = 0;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
if ((index < 0) || (index >= filelist->numfiltered)) {
return NULL;
@@ -641,7 +641,7 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index)
struct direntry *file = NULL;
int fidx = 0;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
if ((index < 0) || (index >= filelist->numfiltered)) {
return NULL;
@@ -1333,7 +1333,7 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float
limg->flags |= MOVIEFILE_ICON;
}
}
- *do_update = TRUE;
+ *do_update = true;
PIL_sleep_ms(10);
limg = limg->next;
}
@@ -1353,7 +1353,7 @@ static void thumbnails_update(void *tjv)
tj->filelist->filelist[limg->index].flags &= ~MOVIEFILE;
tj->filelist->filelist[limg->index].flags |= MOVIEFILE_ICON;
}
- limg->done = TRUE;
+ limg->done = true;
}
limg = limg->next;
}
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index e00d0f34dd9..19947a9ffc9 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -124,7 +124,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
else
params->type = FILE_SPECIAL;
- if (is_filepath && RNA_struct_property_is_set_ex(op->ptr, "filepath", FALSE)) {
+ if (is_filepath && RNA_struct_property_is_set_ex(op->ptr, "filepath", false)) {
char name[FILE_MAX];
RNA_string_get(op->ptr, "filepath", name);
if (params->type == FILE_LOADLIB) {
@@ -136,12 +136,12 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
}
else {
- if (is_directory && RNA_struct_property_is_set_ex(op->ptr, "directory", FALSE)) {
+ if (is_directory && RNA_struct_property_is_set_ex(op->ptr, "directory", false)) {
RNA_string_get(op->ptr, "directory", params->dir);
sfile->params->file[0] = '\0';
}
- if (is_filename && RNA_struct_property_is_set_ex(op->ptr, "filename", FALSE)) {
+ if (is_filename && RNA_struct_property_is_set_ex(op->ptr, "filename", false)) {
RNA_string_get(op->ptr, "filename", params->file);
}
}
@@ -151,7 +151,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
BLI_path_abs(params->dir, G.main->name);
}
- if (is_directory == TRUE && is_filename == FALSE && is_filepath == FALSE && is_files == FALSE) {
+ if (is_directory == true && is_filename == false && is_filepath == false && is_files == false) {
params->flag |= FILE_DIRSEL_ONLY;
}
else {
@@ -228,7 +228,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
if (is_relative_path) {
- if (!RNA_struct_property_is_set_ex(op->ptr, "relative_path", FALSE)) {
+ if (!RNA_struct_property_is_set_ex(op->ptr, "relative_path", false)) {
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
}
}
@@ -267,7 +267,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
/* switching thumbnails needs to recalc layout [#28809] */
if (sfile->layout) {
- sfile->layout->dirty = TRUE;
+ sfile->layout->dirty = true;
}
return 1;
@@ -498,9 +498,9 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
if (sfile->layout == NULL) {
sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout");
- sfile->layout->dirty = TRUE;
+ sfile->layout->dirty = true;
}
- else if (sfile->layout->dirty == FALSE) {
+ else if (sfile->layout->dirty == false) {
return;
}
@@ -574,7 +574,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
layout->width = sfile->layout->columns * (layout->tile_w + 2 * layout->tile_border_x) + layout->tile_border_x * 2;
layout->flag = FILE_LAYOUT_HOR;
}
- layout->dirty = FALSE;
+ layout->dirty = false;
}
FileLayout *ED_fileselect_get_layout(struct SpaceFile *sfile, ARegion *ar)
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 201abf6934a..f6bc6f70f36 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -542,7 +542,7 @@ void fsmenu_refresh_system_category(struct FSMenu *fsmenu)
fsmenu_set_category(fsmenu, FS_CATEGORY_SYSTEM_BOOKMARKS, NULL);
/* Add all entries to system category */
- fsmenu_read_system(fsmenu, TRUE);
+ fsmenu_read_system(fsmenu, true);
}
void fsmenu_free(void)
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 4c4b9fc79f0..c04f4a5627e 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -152,7 +152,7 @@ static void file_init(wmWindowManager *UNUSED(wm), ScrArea *sa)
/* refresh system directory list */
fsmenu_refresh_system_category(fsmenu_get());
- if (sfile->layout) sfile->layout->dirty = TRUE;
+ if (sfile->layout) sfile->layout->dirty = true;
}
static void file_exit(wmWindowManager *wm, ScrArea *sa)
@@ -250,7 +250,7 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa))
BLI_strncpy(sfile->params->renameedit, sfile->params->renamefile, sizeof(sfile->params->renameedit));
params->renamefile[0] = '\0';
}
- if (sfile->layout) sfile->layout->dirty = TRUE;
+ if (sfile->layout) sfile->layout->dirty = true;
}
@@ -417,26 +417,26 @@ static void file_keymap(struct wmKeyConfig *keyconf)
/* keys for main area */
keymap = WM_keymap_find(keyconf, "File Browser Main", SPACE_FILE, 0);
kmi = WM_keymap_add_item(keymap, "FILE_OT_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
- RNA_boolean_set(kmi->ptr, "need_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "need_active", true);
/* left mouse selects and opens */
WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, 0, 0);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "fill", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "fill", true);
/* right mouse selects without opening */
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, 0, 0);
- RNA_boolean_set(kmi->ptr, "open", FALSE);
+ RNA_boolean_set(kmi->ptr, "open", false);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "open", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "open", false);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "fill", TRUE);
- RNA_boolean_set(kmi->ptr, "open", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "fill", true);
+ RNA_boolean_set(kmi->ptr, "open", false);
/* front and back mouse folder navigation */
WM_keymap_add_item(keymap, "FILE_OT_previous", BUTTON4MOUSE, KM_CLICK, 0, 0);
@@ -639,7 +639,7 @@ void ED_file_init(void)
{
ED_file_read_bookmarks();
- if (G.background == FALSE) {
+ if (G.background == false) {
filelist_init_icons();
}
@@ -650,7 +650,7 @@ void ED_file_exit(void)
{
fsmenu_free();
- if (G.background == FALSE) {
+ if (G.background == false) {
filelist_free_icons();
}
}
@@ -661,7 +661,7 @@ void ED_file_read_bookmarks(void)
fsmenu_free();
- fsmenu_read_system(fsmenu_get(), TRUE);
+ fsmenu_read_system(fsmenu_get(), true);
if (cfgdir) {
char name[FILE_MAX];
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 437e3bef0d4..df2da0e78ed 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -122,20 +122,20 @@ static void graph_panel_view(const bContext *C, Panel *pa)
RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr);
/* 2D-Cursor */
- col = uiLayoutColumn(pa->layout, FALSE);
+ col = uiLayoutColumn(pa->layout, false);
uiItemR(col, &spaceptr, "show_cursor", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
uiItemO(sub, IFACE_("Cursor from Selection"), ICON_NONE, "GRAPH_OT_frame_jump");
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
- row = uiLayoutSplit(sub, 0.7f, TRUE);
+ row = uiLayoutSplit(sub, 0.7f, true);
uiItemR(row, &sceneptr, "frame_current", 0, IFACE_("Cursor X"), ICON_NONE);
uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_CFRA);
- row = uiLayoutSplit(sub, 0.7f, TRUE);
+ row = uiLayoutSplit(sub, 0.7f, true);
uiItemR(row, &spaceptr, "cursor_position_y", 0, IFACE_("Cursor Y"), ICON_NONE);
uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_VALUE);
}
@@ -165,24 +165,24 @@ static void graph_panel_properties(const bContext *C, Panel *pa)
/* user-friendly 'name' for F-Curve */
/* TODO: only show the path if this is invalid? */
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
icon = getname_anim_fcurve(name, ale->id, fcu);
uiItemL(col, name, icon);
/* RNA-Path Editing - only really should be enabled when things aren't working */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED) != 0);
uiItemR(col, &fcu_ptr, "data_path", 0, "", ICON_RNA);
uiItemR(col, &fcu_ptr, "array_index", 0, NULL, ICON_NONE);
/* color settings */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(col, IFACE_("Display Color:"), ICON_NONE);
- row = uiLayoutRow(col, TRUE);
+ row = uiLayoutRow(col, true);
uiItemR(row, &fcu_ptr, "color_mode", 0, "", ICON_NONE);
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiLayoutSetEnabled(sub, (fcu->color_mode == FCURVE_COLOR_CUSTOM));
uiItemR(sub, &fcu_ptr, "color", 0, "", ICON_NONE);
@@ -289,7 +289,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
}
/* interpolation */
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE);
/* easing type */
@@ -315,7 +315,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
* - we use the button-versions of the calls so that we can attach special update handlers
* and unit conversion magic that cannot be achieved using a purely RNA-approach
*/
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
/* keyframe itself */
{
uiItemL(col, IFACE_("Key:"), ICON_NONE);
@@ -466,7 +466,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* Target ID */
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiLayoutSetRedAlert(row, ((dtar->flag & DTAR_FLAG_INVALID) && !dtar->id));
uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", IFACE_("Prop:"));
@@ -478,7 +478,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa
RNA_id_pointer_create(dtar->id, &root_ptr);
/* rna path */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID));
uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, IFACE_("Path"));
}
@@ -499,7 +499,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar *
RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr);
/* Bone 1 */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Bone 1:"));
@@ -510,7 +510,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar *
uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
}
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */
uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Bone 2:"));
@@ -537,7 +537,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar *
RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr);
/* Bone 1 */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone 1:"));
@@ -551,7 +551,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar *
uiLayoutSetRedAlert(col, false); /* we can clear it again now - it's only needed when creating the ID/Bone fields */
uiItemR(col, &dtar_ptr, "transform_space", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */
uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Ob/Bone 2:"));
@@ -578,7 +578,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* properties */
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone:"));
@@ -589,7 +589,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar
uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
}
- sub = uiLayoutColumn(layout, TRUE);
+ sub = uiLayoutColumn(layout, true);
uiItemR(sub, &dtar_ptr, "transform_type", 0, NULL, ICON_NONE);
uiItemR(sub, &dtar_ptr, "transform_space", 0, IFACE_("Space"), ICON_NONE);
}
@@ -617,7 +617,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
uiBlockSetHandleFunc(block, do_graph_region_driver_buttons, NULL);
/* general actions - management */
- col = uiLayoutColumn(pa->layout, FALSE);
+ col = uiLayoutColumn(pa->layout, false);
block = uiLayoutGetBlock(col);
but = uiDefIconTextBut(block, BUT, B_IPO_DEPCHANGE, ICON_FILE_REFRESH, IFACE_("Update Dependencies"),
0, 0, 10 * UI_UNIT_X, 22,
@@ -634,7 +634,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* driver-level settings - type, expressions, and errors */
RNA_pointer_create(ale->id, &RNA_Driver, driver, &driver_ptr);
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
block = uiLayoutGetBlock(col);
uiItemR(col, &driver_ptr, "type", 0, NULL, ICON_NONE);
@@ -688,13 +688,13 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
}
}
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
/* debug setting */
uiItemR(col, &driver_ptr, "show_debug_info", 0, NULL, ICON_NONE);
/* value of driver */
if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
- uiLayout *row = uiLayoutRow(col, TRUE);
+ uiLayout *row = uiLayoutRow(col, true);
char valBuf[32];
uiItemL(row, IFACE_("Driver Value:"), ICON_NONE);
@@ -704,7 +704,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
}
/* add driver variables */
- col = uiLayoutColumn(pa->layout, FALSE);
+ col = uiLayoutColumn(pa->layout, false);
block = uiLayoutGetBlock(col);
but = uiDefIconTextBut(block, BUT, B_IPO_DEPCHANGE, ICON_ZOOMIN, IFACE_("Add Variable"),
0, 0, 10 * UI_UNIT_X, UI_UNIT_Y,
@@ -718,14 +718,14 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
uiLayout *box, *row;
/* sub-layout column for this variable's settings */
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
/* header panel */
box = uiLayoutBox(col);
/* first row context info for driver */
RNA_pointer_create(ale->id, &RNA_DriverVariable, dvar, &dvar_ptr);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
block = uiLayoutGetBlock(row);
/* variable name */
uiItemR(row, &dvar_ptr, "name", 0, "", ICON_NONE);
@@ -738,7 +738,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
uiBlockSetEmboss(block, UI_EMBOSS);
/* variable type */
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, &dvar_ptr, "type", 0, "", ICON_NONE);
/* variable type settings */
@@ -764,7 +764,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
char valBuf[32];
box = uiLayoutBox(col);
- row = uiLayoutRow(box, TRUE);
+ row = uiLayoutRow(box, true);
uiItemL(row, IFACE_("Value:"), ICON_NONE);
if ((dvar->type == DVAR_TYPE_ROT_DIFF) ||
@@ -816,7 +816,7 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa)
/* 'add modifier' button at top of panel */
{
- row = uiLayoutRow(pa->layout, FALSE);
+ row = uiLayoutRow(pa->layout, false);
block = uiLayoutGetBlock(row);
/* this is an operator button which calls a 'add modifier' operator...
@@ -826,14 +826,14 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa)
0.5 * UI_UNIT_X, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y, TIP_("Adds a new F-Curve Modifier for the active F-Curve"));
/* copy/paste (as sub-row)*/
- row = uiLayoutRow(row, TRUE);
+ row = uiLayoutRow(row, true);
uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy");
uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste");
}
/* draw each modifier */
for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) {
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm);
}
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 491309e5a07..e2b04476d46 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -1033,7 +1033,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
glScalef(1.0f, unit_scale, 1.0f);
if (fcu->bezt) {
- int do_handles = draw_fcurve_handles_check(sipo, fcu);
+ bool do_handles = draw_fcurve_handles_check(sipo, fcu);
if (do_handles) {
/* only draw handles/vertices on keyframes */
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 0fa6edd0011..c2053c15f95 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -85,7 +85,7 @@
/* Get the min/max keyframes*/
/* note: it should return total boundbox, filter for selection only can be argument... */
void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax,
- const short do_sel_only, const short include_handles)
+ const bool do_sel_only, const bool include_handles)
{
Scene *scene = ac->scene;
@@ -105,7 +105,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, floa
/* check if any channels to set range with */
if (anim_data.first) {
- short foundBounds = FALSE;
+ bool foundBounds = false;
/* go through channels, finding max extents */
for (ale = anim_data.first; ale; ale = ale->next) {
@@ -135,7 +135,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, floa
if ((ymin) && (tymin < *ymin)) *ymin = tymin;
if ((ymax) && (tymax > *ymax)) *ymax = tymax;
- foundBounds = TRUE;
+ foundBounds = true;
}
}
@@ -187,7 +187,7 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
scene = ac.scene;
/* set the range directly */
- get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, FALSE, FALSE);
+ get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, false, false);
scene->r.flag |= SCER_PRV_RANGE;
scene->r.psfra = iroundf(min);
scene->r.pefra = iroundf(max);
@@ -216,7 +216,7 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot)
/* ****************** View-All Operator ****************** */
-static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles,
+static int graphkeys_viewall(bContext *C, const bool do_sel_only, const bool include_handles,
const int smooth_viewtx)
{
bAnimContext ac;
@@ -243,7 +243,7 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i
static int graphkeys_viewall_exec(bContext *C, wmOperator *op)
{
- const short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const bool include_handles = RNA_boolean_get(op->ptr, "include_handles");
const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* whole range */
@@ -252,7 +252,7 @@ static int graphkeys_viewall_exec(bContext *C, wmOperator *op)
static int graphkeys_view_selected_exec(bContext *C, wmOperator *op)
{
- const short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const bool include_handles = RNA_boolean_get(op->ptr, "include_handles");
const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* only selected */
@@ -274,7 +274,7 @@ void GRAPH_OT_view_all(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- ot->prop = RNA_def_boolean(ot->srna, "include_handles", TRUE, "Include Handles",
+ ot->prop = RNA_def_boolean(ot->srna, "include_handles", true, "Include Handles",
"Include handles of keyframes when calculating extents");
}
@@ -293,7 +293,7 @@ void GRAPH_OT_view_selected(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- ot->prop = RNA_def_boolean(ot->srna, "include_handles", TRUE, "Include Handles",
+ ot->prop = RNA_def_boolean(ot->srna, "include_handles", true, "Include Handles",
"Include handles of keyframes when calculating extents");
}
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index fe1378679d8..408c78d194e 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -88,7 +88,7 @@ enum eGraphKeys_ColumnSelect_Mode {
/* graph_edit.c */
void get_graph_keyframe_extents(struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax,
- const short do_selected, const short include_handles);
+ const bool do_selected, const bool include_handles);
void GRAPH_OT_previewrange_set(struct wmOperatorType *ot);
void GRAPH_OT_view_all(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 1041c885697..907bcc3154b 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -282,70 +282,70 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
/* graph_select.c - selection tools */
/* click-select: keyframe (replace) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "curves", false);
+ RNA_boolean_set(kmi->ptr, "column", false);
/* click-select: all keyframes on same frame (replace) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "curves", false);
+ RNA_boolean_set(kmi->ptr, "column", true);
/* click-select: keyframe (add) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "curves", false);
+ RNA_boolean_set(kmi->ptr, "column", false);
/* click-select: all keyframes on same frame (add) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "curves", FALSE);
- RNA_boolean_set(kmi->ptr, "column", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "curves", false);
+ RNA_boolean_set(kmi->ptr, "column", true);
/* click-select: all keyframes in same curve (replace) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "curves", TRUE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "curves", true);
+ RNA_boolean_set(kmi->ptr, "column", false);
/* click-select: all keyframes in same curve (add) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "curves", TRUE);
- RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "curves", true);
+ RNA_boolean_set(kmi->ptr, "column", false);
/* click-select left/right */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_LEFT);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT);
/* deselect all */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "invert", FALSE);
+ RNA_boolean_set(kmi->ptr, "invert", false);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "invert", TRUE);
+ RNA_boolean_set(kmi->ptr, "invert", true);
/* borderselect */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
- RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", false);
+ RNA_boolean_set(kmi->ptr, "include_handles", false);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
- RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", true);
+ RNA_boolean_set(kmi->ptr, "include_handles", false);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
- RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", false);
+ RNA_boolean_set(kmi->ptr, "include_handles", true);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
- RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", true);
+ RNA_boolean_set(kmi->ptr, "include_handles", true);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "deselect", false);
@@ -411,7 +411,7 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
/* F-Modifiers */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "only_active", FALSE);
+ RNA_boolean_set(kmi->ptr, "only_active", false);
/* animation module */
/* channels list
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 342a2d18b99..23bc8e94ef8 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -164,9 +164,9 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op)
/* 'standard' behavior - check if selected, then apply relevant selection */
if (RNA_boolean_get(op->ptr, "invert"))
- deselect_graph_keys(&ac, 0, SELECT_INVERT, TRUE);
+ deselect_graph_keys(&ac, 0, SELECT_INVERT, true);
else
- deselect_graph_keys(&ac, 1, SELECT_ADD, TRUE);
+ deselect_graph_keys(&ac, 1, SELECT_ADD, true);
/* restore active F-Curve... */
if (ale_active) {
@@ -334,7 +334,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
/* clear all selection if not extending selection */
extend = RNA_boolean_get(op->ptr, "extend");
if (!extend)
- deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE);
+ deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true);
/* get select mode
* - 'gesture_mode' from the operator specifies how to select
@@ -395,7 +395,7 @@ void GRAPH_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/;
/* rna */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria");
@@ -424,7 +424,7 @@ static int graphkeys_lassoselect_exec(bContext *C, wmOperator *op)
/* clear all selection if not extending selection */
extend = RNA_boolean_get(op->ptr, "extend");
if (!extend)
- deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE);
+ deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true);
if (!RNA_boolean_get(op->ptr, "deselect"))
selectmode = SELECT_ADD;
@@ -867,7 +867,7 @@ static void graphkeys_select_leftright(bAnimContext *ac, short leftright, short
/* - deselect all other keyframes, so that just the newly selected remain
* - channels aren't deselected, since we don't re-select any as a consequence
*/
- deselect_graph_keys(ac, 0, SELECT_SUBTRACT, FALSE);
+ deselect_graph_keys(ac, 0, SELECT_SUBTRACT, false);
}
/* set callbacks and editing data */
@@ -1234,7 +1234,7 @@ static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_m
select_mode = SELECT_ADD;
/* deselect all other keyframes (+ F-Curves too) */
- deselect_graph_keys(ac, 0, SELECT_SUBTRACT, TRUE);
+ deselect_graph_keys(ac, 0, SELECT_SUBTRACT, true);
/* deselect other channels too, but only only do this if
* selection of channel when the visibility of keyframes
@@ -1371,7 +1371,7 @@ static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short
/* - deselect all other keyframes, so that just the newly selected remain
* - channels aren't deselected, since we don't re-select any as a consequence
*/
- deselect_graph_keys(ac, 0, SELECT_SUBTRACT, FALSE);
+ deselect_graph_keys(ac, 0, SELECT_SUBTRACT, false);
}
/* initialize keyframe editing data */
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 2aac3133b7b..bfc1bcbcba0 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -256,7 +256,7 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
graph_draw_curves(&ac, sipo, ar, grid, 1);
/* XXX the slow way to set tot rect... but for nice sliders needed (ton) */
- get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, FALSE, TRUE);
+ get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, false, true);
/* extra offset so that these items are visible */
v2d->tot.xmin -= 10.0f;
v2d->tot.xmax += 10.0f;
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index f88cdaf6713..97a8e9b59d0 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -179,7 +179,7 @@ void image_preview_event(int event)
ntreeCompositTagGenerators(G.scene->nodetree);
- G.is_break = FALSE;
+ G.is_break = false;
G.scene->nodetree->timecursor = set_timecursor;
G.scene->nodetree->test_break = blender_test_break;
@@ -509,7 +509,7 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image
const char *fake_name;
const char *display_name;
- uiLayoutRow(layout, TRUE);
+ uiLayoutRow(layout, true);
/* layer menu is 1/3 larger than pass */
wmenu1 = (2 * w) / 5;
@@ -561,7 +561,7 @@ static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr,
uiBut *but;
const float dpi_fac = UI_DPI_FAC;
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
if (rr == NULL || iuser == NULL)
return;
@@ -706,13 +706,13 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
uiItemR(layout, &imaptr, "source", 0, NULL, ICON_NONE);
if (ima->source != IMA_SRC_GENERATED) {
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
if (ima->packedfile)
uiItemO(row, "", ICON_PACKAGE, "image.unpack");
else
uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack");
- row = uiLayoutRow(row, TRUE);
+ row = uiLayoutRow(row, true);
uiLayoutSetEnabled(row, ima->packedfile == NULL);
uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE);
uiItemO(row, "", ICON_FILE_REFRESH, "image.reload");
@@ -742,7 +742,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
}
}
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiTemplateColorspaceSettings(col, &imaptr, "colorspace_settings");
uiItemR(col, &imaptr, "use_view_as_render", 0, NULL, ICON_NONE);
@@ -761,29 +761,29 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
}
if (has_alpha) {
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, &imaptr, "use_alpha", 0, NULL, ICON_NONE);
uiItemR(col, &imaptr, "alpha_mode", 0, "Alpha", ICON_NONE);
}
uiItemS(layout);
- split = uiLayoutSplit(layout, 0.0f, FALSE);
+ split = uiLayoutSplit(layout, 0.0f, false);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
/* XXX Why only display fields_per_frame only for video image types?
* And why allow fields for non-video image types at all??? */
if (BKE_image_is_animated(ima)) {
- uiLayout *subsplit = uiLayoutSplit(col, 0.0f, FALSE);
- uiLayout *subcol = uiLayoutColumn(subsplit, FALSE);
+ uiLayout *subsplit = uiLayoutSplit(col, 0.0f, false);
+ uiLayout *subcol = uiLayoutColumn(subsplit, false);
uiItemR(subcol, &imaptr, "use_fields", 0, NULL, ICON_NONE);
- subcol = uiLayoutColumn(subsplit, FALSE);
+ subcol = uiLayoutColumn(subsplit, false);
uiLayoutSetActive(subcol, RNA_boolean_get(&imaptr, "use_fields"));
uiItemR(subcol, userptr, "fields_per_frame", 0, IFACE_("Fields"), ICON_NONE);
}
else
uiItemR(col, &imaptr, "use_fields", 0, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "use_fields"));
uiItemR(row, &imaptr, "field_order", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
@@ -792,24 +792,24 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
if (BKE_image_is_animated(ima)) {
uiItemS(layout);
- split = uiLayoutSplit(layout, 0.0f, FALSE);
+ split = uiLayoutSplit(layout, 0.0f, false);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
BLI_snprintf(str, sizeof(str), IFACE_("(%d) Frames"), iuser->framenr);
uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE);
uiItemR(col, userptr, "frame_start", 0, IFACE_("Start"), ICON_NONE);
uiItemR(col, userptr, "frame_offset", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiItemO(col, NULL, ICON_NONE, "IMAGE_OT_match_movie_length");
uiItemR(col, userptr, "use_auto_refresh", 0, NULL, ICON_NONE);
uiItemR(col, userptr, "use_cyclic", 0, NULL, ICON_NONE);
}
else if (ima->source == IMA_SRC_GENERATED) {
- split = uiLayoutSplit(layout, 0.0f, FALSE);
+ split = uiLayoutSplit(layout, 0.0f, false);
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemR(col, &imaptr, "generated_width", 0, "X", ICON_NONE);
uiItemR(col, &imaptr, "generated_height", 0, "Y", ICON_NONE);
@@ -839,14 +839,14 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man
const bool is_render_out = (id && GS(id->name) == ID_SCE);
uiLayout *col, *row, *split, *sub;
- int show_preview = FALSE;
+ int show_preview = false;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
- split = uiLayoutSplit(col, 0.5f, FALSE);
+ split = uiLayoutSplit(col, 0.5f, false);
uiItemR(split, imfptr, "file_format", 0, "", ICON_NONE);
- sub = uiLayoutRow(split, FALSE);
+ sub = uiLayoutRow(split, false);
uiItemR(sub, imfptr, "color_mode", UI_ITEM_R_EXPAND, IFACE_("Color"), ICON_NONE);
/* only display depth setting if multiple depths can be used */
@@ -859,7 +859,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man
R_IMF_CHAN_DEPTH_24,
R_IMF_CHAN_DEPTH_32)) == 0)
{
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemL(row, IFACE_("Color Depth:"), ICON_NONE);
uiItemR(row, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@@ -877,20 +877,20 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man
uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE);
}
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
if (BKE_imtype_supports_zbuf(imf->imtype)) {
uiItemR(row, imfptr, "use_zbuffer", 0, NULL, ICON_NONE);
}
if (is_render_out && (imf->imtype == R_IMF_IMTYPE_OPENEXR)) {
- show_preview = TRUE;
+ show_preview = true;
uiItemR(row, imfptr, "use_preview", 0, NULL, ICON_NONE);
}
if (imf->imtype == R_IMF_IMTYPE_JP2) {
uiItemR(col, imfptr, "jpeg2k_codec", 0, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, imfptr, "use_jpeg2k_cinema_preset", 0, NULL, ICON_NONE);
uiItemR(row, imfptr, "use_jpeg2k_cinema_48", 0, NULL, ICON_NONE);
@@ -920,7 +920,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man
prop = RNA_struct_find_property(imfptr, "display_settings");
display_settings_ptr = RNA_property_pointer_get(imfptr, prop);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemL(col, IFACE_("Color Management"), ICON_NONE);
uiItemR(col, &display_settings_ptr, "display_device", 0, NULL, ICON_NONE);
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c
index 9b9c13a1d4f..deabcfa85f4 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -345,7 +345,7 @@ bool ED_space_image_check_show_maskedit(Scene *scene, SpaceImage *sima)
/* check editmode - this is reserved for UV editing */
Object *ob = OBACT;
if (ob && ob->mode & OB_MODE_EDIT && ED_space_image_show_uvedit(sima, ob)) {
- return FALSE;
+ return false;
}
return (sima->mode == SI_MODE_MASK);
@@ -360,7 +360,7 @@ int ED_space_image_maskedit_poll(bContext *C)
return ED_space_image_check_show_maskedit(scene, sima);
}
- return FALSE;
+ return false;
}
int ED_space_image_maskedit_mask_poll(bContext *C)
@@ -370,6 +370,6 @@ int ED_space_image_maskedit_mask_poll(bContext *C)
return sima->mask_info.mask != NULL;
}
- return FALSE;
+ return false;
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 90e308ecfa2..93cb1acaa8b 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -156,7 +156,7 @@ static int space_image_file_exists_poll(bContext *C)
SpaceImage *sima = CTX_wm_space_image(C);
ImBuf *ibuf;
void *lock;
- int ret = FALSE;
+ int ret = false;
char name[FILE_MAX];
ibuf = ED_space_image_acquire_buffer(sima, &lock);
@@ -164,14 +164,14 @@ static int space_image_file_exists_poll(bContext *C)
BLI_strncpy(name, ibuf->name, FILE_MAX);
BLI_path_abs(name, bmain->name);
- if (BLI_exists(name) == FALSE) {
+ if (BLI_exists(name) == false) {
CTX_wm_operator_poll_msg_set(C, "image file not found");
}
else if (!BLI_file_is_writable(name)) {
CTX_wm_operator_poll_msg_set(C, "image path can't be written to");
}
else {
- ret = TRUE;
+ ret = true;
}
}
ED_space_image_release_buffer(sima, ibuf, lock);
@@ -223,16 +223,16 @@ static int image_sample_poll(bContext *C)
if (obedit) {
if (ED_space_image_show_uvedit(sima, obedit) && (toolsettings->use_uv_sculpt))
- return FALSE;
+ return false;
}
else if (sima->mode != SI_MODE_VIEW) {
- return FALSE;
+ return false;
}
return space_image_main_area_poll(C);
}
else {
- return FALSE;
+ return false;
}
}
/********************** view pan operator *********************/
@@ -1459,11 +1459,11 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
if (ibuf) {
ImBuf *colormanaged_ibuf;
const char *relbase = ID_BLEND_PATH(CTX_data_main(C), &ima->id);
- const short relative = (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path"));
- const short save_copy = (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy"));
+ const bool relative = (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path"));
+ const bool save_copy = (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy"));
const bool save_as_render = (RNA_struct_find_property(op->ptr, "save_as_render") && RNA_boolean_get(op->ptr, "save_as_render"));
ImageFormatData *imf = &simopts->im_format;
- short ok = FALSE;
+ bool ok = false;
/* old global to ensure a 2nd save goes to same dir */
BLI_strncpy(G.ima, simopts->filepath, sizeof(G.ima));
@@ -1494,7 +1494,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
RenderResult *rr = BKE_image_acquire_renderresult(scene, ima);
if (rr) {
RE_WriteRenderResult(op->reports, rr, simopts->filepath, simopts->im_format.exr_codec);
- ok = TRUE;
+ ok = true;
}
else {
BKE_report(op->reports, RPT_ERROR, "Did not write, no Multilayer Image");
@@ -1503,7 +1503,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
}
else {
if (BKE_imbuf_write_as(colormanaged_ibuf, simopts->filepath, &simopts->im_format, save_copy)) {
- ok = TRUE;
+ ok = true;
}
}
@@ -1593,7 +1593,7 @@ static int image_save_as_exec(bContext *C, wmOperator *op)
save_image_options_from_op(&simopts, op);
- save_image_doit(C, sima, op, &simopts, TRUE);
+ save_image_doit(C, sima, op, &simopts, true);
image_save_as_free(op);
return OPERATOR_FINISHED;
@@ -1625,7 +1625,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS
/* enable save_copy by default for render results */
if (ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_struct_property_is_set(op->ptr, "copy")) {
- RNA_boolean_set(op->ptr, "copy", TRUE);
+ RNA_boolean_set(op->ptr, "copy", true);
}
RNA_boolean_set(op->ptr, "save_as_render", save_as_render);
@@ -1663,7 +1663,7 @@ static void image_save_as_draw(bContext *UNUSED(C), wmOperator *op)
/* image template */
RNA_pointer_create(NULL, &RNA_ImageFormatSettings, imf, &ptr);
- uiTemplateImageSettings(layout, &ptr, FALSE);
+ uiTemplateImageSettings(layout, &ptr, false);
/* main draw call */
RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
@@ -1680,12 +1680,12 @@ static int image_save_as_poll(bContext *C)
if (ima->source == IMA_SRC_VIEWER) {
CTX_wm_operator_poll_msg_set(C, "can't save image while rendering");
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void IMAGE_OT_save_as(wmOperatorType *ot)
@@ -1730,7 +1730,7 @@ static int image_save_exec(bContext *C, wmOperator *op)
save_image_options_from_op(&simopts, op);
if (BLI_exists(simopts.filepath) && BLI_file_is_writable(simopts.filepath)) {
- save_image_doit(C, sima, op, &simopts, FALSE);
+ save_image_doit(C, sima, op, &simopts, false);
}
else {
BKE_reportf(op->reports, RPT_ERROR, "Cannot save image, path '%s' is not writable", simopts.filepath);
@@ -2018,10 +2018,10 @@ static int image_invert_exec(bContext *C, wmOperator *op)
bool support_undo = ((sima != NULL) && (sima->mode == SI_MODE_PAINT));
/* flags indicate if this channel should be inverted */
- const short r = RNA_boolean_get(op->ptr, "invert_r");
- const short g = RNA_boolean_get(op->ptr, "invert_g");
- const short b = RNA_boolean_get(op->ptr, "invert_b");
- const short a = RNA_boolean_get(op->ptr, "invert_a");
+ const bool r = RNA_boolean_get(op->ptr, "invert_r");
+ const bool g = RNA_boolean_get(op->ptr, "invert_g");
+ const bool b = RNA_boolean_get(op->ptr, "invert_b");
+ const bool a = RNA_boolean_get(op->ptr, "invert_a");
int i;
@@ -2330,7 +2330,7 @@ bool ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], flo
if (ibuf == NULL) {
ED_space_image_release_buffer(sima, ibuf, lock);
- return FALSE;
+ return false;
}
UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &fx, &fy);
@@ -2346,12 +2346,12 @@ bool ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], flo
if (ibuf->rect_float) {
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
linearrgb_to_srgb_v3_v3(r_col, fp);
- ret = TRUE;
+ ret = true;
}
else if (ibuf->rect) {
cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x);
rgb_uchar_to_float(r_col, cp);
- ret = TRUE;
+ ret = true;
}
}
@@ -2397,7 +2397,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event
info->zp = NULL;
info->zfp = NULL;
- info->use_default_view = (image->flag & IMA_VIEW_AS_RENDER) ? FALSE : TRUE;
+ info->use_default_view = (image->flag & IMA_VIEW_AS_RENDER) ? false : true;
if (ibuf->rect) {
cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x);
@@ -2417,7 +2417,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event
copy_v4_v4(info->linearcol, info->colf);
IMB_colormanagement_colorspace_to_scene_linear_v4(info->linearcol, false, ibuf->rect_colorspace);
- info->color_manage = TRUE;
+ info->color_manage = true;
}
if (ibuf->rect_float) {
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
@@ -2430,7 +2430,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event
copy_v4_v4(info->linearcol, info->colf);
- info->color_manage = TRUE;
+ info->color_manage = true;
}
if (ibuf->zbuf) {
@@ -2827,7 +2827,7 @@ static int image_cycle_render_slot_exec(bContext *C, wmOperator *op)
{
Image *ima = CTX_data_edit_image(C);
int a, slot, cur = ima->render_slot;
- const short use_reverse = RNA_boolean_get(op->ptr, "reverse");
+ const bool use_reverse = RNA_boolean_get(op->ptr, "reverse");
for (a = 1; a < IMA_MAX_RENDER_SLOT; a++) {
slot = (cur + (use_reverse ? -a : a)) % IMA_MAX_RENDER_SLOT;
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 14fd486c546..1224ade8337 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -153,10 +153,10 @@ static SpaceLink *image_new(const bContext *UNUSED(C))
simage = MEM_callocN(sizeof(SpaceImage), "initimage");
simage->spacetype = SPACE_IMAGE;
simage->zoom = 1.0f;
- simage->lock = TRUE;
+ simage->lock = true;
simage->flag = SI_SHOW_GPENCIL | SI_USE_ALPHA;
- simage->iuser.ok = TRUE;
+ simage->iuser.ok = true;
simage->iuser.fie_ima = 2;
simage->iuser.frames = 100;
@@ -274,14 +274,14 @@ static void image_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "IMAGE_OT_toolshelf", TKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, KM_ALT, 0)->ptr, "reverse", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, KM_ALT, 0)->ptr, "reverse", true);
keymap = WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "IMAGE_OT_view_all", FKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "fit_view", TRUE);
+ RNA_boolean_set(kmi->ptr, "fit_view", true);
WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
@@ -319,7 +319,7 @@ static void image_keymap(struct wmKeyConfig *keyconf)
/* toggle editmode is handy to have while UV unwrapping */
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", OB_MODE_EDIT);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
/* fast switch to render slots */
for (i = 0; i < MAX2(IMA_MAX_RENDER_SLOT, 9); i++) {
@@ -395,8 +395,8 @@ static void image_refresh(const bContext *C, ScrArea *sa)
else if (obedit && obedit->type == OB_MESH) {
Mesh *me = (Mesh *)obedit->data;
struct BMEditMesh *em = me->edit_btmesh;
- int sloppy = TRUE; /* partially selected face is ok */
- int selected = !(scene->toolsettings->uv_flag & UV_SYNC_SELECTION); /* only selected active face? */
+ bool sloppy = true; /* partially selected face is ok */
+ bool selected = !(scene->toolsettings->uv_flag & UV_SYNC_SELECTION); /* only selected active face? */
if (BKE_scene_use_new_shading_nodes(scene)) {
/* new shading system does not alter image */
@@ -550,7 +550,7 @@ static int image_context(const bContext *C, const char *member, bContextDataResu
if (mask) {
CTX_data_id_pointer_set(result, &mask->id);
}
- return TRUE;
+ return true;
}
return 0;
}
@@ -697,7 +697,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
if (sima->flag & SI_SHOW_GPENCIL) {
/* Grease Pencil too (in addition to UV's) */
- draw_image_grease_pencil((bContext *)C, TRUE);
+ draw_image_grease_pencil((bContext *)C, true);
}
/* sample line */
@@ -707,7 +707,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
if (sima->flag & SI_SHOW_GPENCIL) {
/* draw Grease Pencil - screen space only */
- draw_image_grease_pencil((bContext *)C, FALSE);
+ draw_image_grease_pencil((bContext *)C, false);
}
if (mask) {
@@ -736,7 +736,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
sima->mask_info.overlay_mode,
width, height,
aspx, aspy,
- TRUE, FALSE,
+ true, false,
NULL, C);
ED_mask_draw_frames(mask, ar, CFRA, mask->sfra, mask->efra);
diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c
index 6647a8ee946..575f44b61a9 100644
--- a/source/blender/editors/space_info/info_draw.c
+++ b/source/blender/editors/space_info/info_draw.c
@@ -149,10 +149,10 @@ static int report_textview_begin(TextViewContext *tvc)
tvc->iter_char = 0;
report_textview_init__internal(tvc);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
#else
return (tvc->iter != NULL);
@@ -178,10 +178,10 @@ static int report_textview_step(TextViewContext *tvc)
tvc->iter_char = 0; /* reset start */
report_textview_init__internal(tvc);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
}
else {
@@ -189,7 +189,7 @@ static int report_textview_step(TextViewContext *tvc)
tvc->iter_char = tvc->iter_char_next + 1;
report_textview_init__internal(tvc);
- return TRUE;
+ return true;
}
}
diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c
index 827e4427ca0..2135166abe9 100644
--- a/source/blender/editors/space_info/info_report.c
+++ b/source/blender/editors/space_info/info_report.c
@@ -319,7 +319,7 @@ void INFO_OT_select_border(wmOperatorType *ot)
/* ot->flag = OPTYPE_REGISTER; */
/* rna */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index 0d4246144da..5fe3c57a4c8 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -228,9 +228,9 @@ static int logicbricks_move_property_get(wmOperator *op)
int type = RNA_enum_get(op->ptr, "direction");
if (type == 1)
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
/* ************* Add/Remove Sensor Operator ************* */
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index d6de4307ca8..746adb238b8 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -598,9 +598,9 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
/* BUTS_XXX_STATE are similar to BUTS_XXX_LINK for selecting the object */
if (scavisflag & (BUTS_SENS_LINK|BUTS_CONT_LINK|BUTS_ACT_LINK|BUTS_SENS_STATE|BUTS_ACT_STATE)) {
- do_it = TRUE;
+ do_it = true;
while (do_it) {
- do_it = FALSE;
+ do_it = false;
ob= bmain->object.first;
while (ob) {
@@ -613,7 +613,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
if (sens->links[a]) {
obt= (Object *)sens->links[a]->mynew;
if (obt && (obt->scavisflag & OB_VIS_CONT)) {
- do_it = TRUE;
+ do_it = true;
ob->scavisflag |= OB_VIS_SENS;
break;
}
@@ -632,7 +632,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
if (cont->links[a]) {
obt= (Object *)cont->links[a]->mynew;
if (obt && (obt->scavisflag & OB_VIS_ACT)) {
- do_it = TRUE;
+ do_it = true;
ob->scavisflag |= OB_VIS_CONT;
break;
}
@@ -651,7 +651,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
if (sens->links[a]) {
obt= (Object *)sens->links[a]->mynew;
if (obt && (obt->scavisflag & OB_VIS_CONT)==0) {
- do_it = TRUE;
+ do_it = true;
obt->scavisflag |= OB_VIS_CONT;
}
}
@@ -668,7 +668,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
if (cont->links[a]) {
obt= (Object *)cont->links[a]->mynew;
if (obt && (obt->scavisflag & OB_VIS_ACT)==0) {
- do_it = TRUE;
+ do_it = true;
obt->scavisflag |= OB_VIS_ACT;
}
}
@@ -943,7 +943,7 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo
bSensor *sens= (bSensor *)ptr->data;
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")) {
@@ -955,13 +955,13 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo
uiItemL(row, sens->name, ICON_NONE);
}
- sub = uiLayoutRow(row, FALSE);
+ sub = uiLayoutRow(row, false);
uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_sensors_active_states") &&
RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin")));
uiItemR(sub, ptr, "pin", UI_ITEM_R_NO_BG, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")==0) {
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiItemEnumO(sub, "LOGIC_OT_sensor_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(sub, "LOGIC_OT_sensor_move", "", ICON_TRIA_DOWN, "direction", 2); // down
}
@@ -974,18 +974,18 @@ static void draw_sensor_internal_header(uiLayout *layout, PointerRNA *ptr)
uiLayout *box, *split, *sub, *row;
box = uiLayoutBox(layout);
- split = uiLayoutSplit(box, 0.45f, FALSE);
+ split = uiLayoutSplit(box, 0.45f, false);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiItemR(row, ptr, "use_pulse_true_level", 0, "", ICON_DOTSUP);
uiItemR(row, ptr, "use_pulse_false_level", 0, "", ICON_DOTSDOWN);
- sub = uiLayoutRow(row, FALSE);
+ sub = uiLayoutRow(row, false);
uiLayoutSetActive(sub, (RNA_boolean_get(ptr, "use_pulse_true_level") ||
RNA_boolean_get(ptr, "use_pulse_false_level")));
uiItemR(sub, ptr, "frequency", 0, IFACE_("Freq"), ICON_NONE);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiItemR(row, ptr, "use_level", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(row, ptr, "use_tap", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
@@ -1026,7 +1026,7 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr)
if (RNA_property_collection_lookup_string(&pose_ptr, bones_prop, as->posechannel, &pchan_ptr))
uiItemPointerR(layout, ptr, "constraint", &pchan_ptr, "constraints", NULL, ICON_CONSTRAINT_BONE);
}
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "test_type", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "test_type") != SENS_ARM_STATE_CHANGED)
uiItemR(row, ptr, "value", 0, NULL, ICON_NONE);
@@ -1039,8 +1039,8 @@ static void draw_sensor_collision(uiLayout *layout, PointerRNA *ptr, bContext *C
RNA_main_pointer_create(CTX_data_main(C), &main_ptr);
- split = uiLayoutSplit(layout, 0.3f, FALSE);
- row = uiLayoutRow(split, TRUE);
+ split = uiLayoutSplit(layout, 0.3f, false);
+ row = uiLayoutRow(split, true);
uiItemR(row, ptr, "use_pulse", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(row, ptr, "use_material", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
@@ -1058,7 +1058,7 @@ static void draw_sensor_delay(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *row;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "delay", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "duration", 0, NULL, ICON_NONE);
@@ -1076,30 +1076,30 @@ static void draw_sensor_joystick(uiLayout *layout, PointerRNA *ptr)
case SENS_JOY_BUTTON:
uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE);
+ col = uiLayoutColumn(layout, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == false);
uiItemR(col, ptr, "button_number", 0, NULL, ICON_NONE);
break;
case SENS_JOY_AXIS:
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "axis_number", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "axis_threshold", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE);
+ col = uiLayoutColumn(layout, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == false);
uiItemR(col, ptr, "axis_direction", 0, NULL, ICON_NONE);
break;
case SENS_JOY_HAT:
uiItemR(layout, ptr, "hat_number", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE);
+ col = uiLayoutColumn(layout, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == false);
uiItemR(col, ptr, "hat_direction", 0, NULL, ICON_NONE);
break;
case SENS_JOY_AXIS_SINGLE:
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "single_axis_number", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "axis_threshold", 0, NULL, ICON_NONE);
break;
@@ -1112,21 +1112,21 @@ static void draw_sensor_keyboard(uiLayout *layout, PointerRNA *ptr)
PointerRNA settings_ptr;
uiLayout *row, *col;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemL(row, CTX_IFACE_(BLF_I18NCONTEXT_ID_WINDOWMANAGER, "Key:"), ICON_NONE);
- col = uiLayoutColumn(row, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == FALSE);
+ col = uiLayoutColumn(row, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == false);
uiItemR(col, ptr, "key", UI_ITEM_R_EVENT, "", ICON_NONE);
- col = uiLayoutColumn(row, FALSE);
+ col = uiLayoutColumn(row, false);
uiItemR(col, ptr, "use_all_keys", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == FALSE);
- row = uiLayoutRow(col, FALSE);
+ col = uiLayoutColumn(layout, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == false);
+ row = uiLayoutRow(col, false);
uiItemL(row, IFACE_("First Modifier:"), ICON_NONE);
uiItemR(row, ptr, "modifier_key_1", UI_ITEM_R_EVENT, "", ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemL(row, IFACE_("Second Modifier:"), ICON_NONE);
uiItemR(row, ptr, "modifier_key_2", UI_ITEM_R_EVENT, "", ICON_NONE);
@@ -1144,7 +1144,7 @@ static void draw_sensor_mouse(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *split;
- split = uiLayoutSplit(layout, 0.8f, FALSE);
+ split = uiLayoutSplit(layout, 0.8f, false);
uiItemR(split, ptr, "mouse_event", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "mouse_event") == BL_SENS_MOUSE_MOUSEOVER_ANY)
@@ -1157,7 +1157,7 @@ static void draw_sensor_near(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "property", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "distance", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "reset_distance", 0, NULL, ICON_NONE);
}
@@ -1175,7 +1175,7 @@ static void draw_sensor_property(uiLayout *layout, PointerRNA *ptr)
switch (RNA_enum_get(ptr, "evaluation_type")) {
case SENS_PROP_INTERVAL:
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "value_min", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "value_max", 0, NULL, ICON_NONE);
break;
@@ -1197,7 +1197,7 @@ static void draw_sensor_radar(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "property", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "axis", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "angle", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "distance", 0, NULL, ICON_NONE);
}
@@ -1213,7 +1213,7 @@ static void draw_sensor_ray(uiLayout *layout, PointerRNA *ptr, bContext *C)
PointerRNA main_ptr;
RNA_main_pointer_create(CTX_data_main(C), &main_ptr);
- split = uiLayoutSplit(layout, 0.3f, FALSE);
+ split = uiLayoutSplit(layout, 0.3f, false);
uiItemR(split, ptr, "ray_type", 0, "", ICON_NONE);
switch (RNA_enum_get(ptr, "ray_type")) {
case SENS_RAY_PROPERTY:
@@ -1224,9 +1224,9 @@ static void draw_sensor_ray(uiLayout *layout, PointerRNA *ptr, bContext *C)
break;
}
- split = uiLayoutSplit(layout, 0.3, FALSE);
+ split = uiLayoutSplit(layout, 0.3, false);
uiItemR(split, ptr, "axis", 0, "", ICON_NONE);
- row = uiLayoutRow(split, FALSE);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "range", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "use_x_ray", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
}
@@ -1298,7 +1298,7 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i
BLI_snprintf(state, sizeof(state), "%d", RNA_int_get(ptr, "states"));
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")) {
@@ -1316,7 +1316,7 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i
uiItemR(row, ptr, "use_priority", 0, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")==0) {
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiItemEnumO(sub, "LOGIC_OT_controller_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(sub, "LOGIC_OT_controller_move", "", ICON_TRIA_DOWN, "direction", 2); // down
}
@@ -1332,13 +1332,13 @@ static void draw_controller_python(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *split, *sub;
- split = uiLayoutSplit(layout, 0.3, TRUE);
+ split = uiLayoutSplit(layout, 0.3, true);
uiItemR(split, ptr, "mode", 0, "", ICON_NONE);
if (RNA_enum_get(ptr, "mode") == CONT_PY_SCRIPT) {
uiItemR(split, ptr, "text", 0, "", ICON_NONE);
}
else {
- sub = uiLayoutSplit(split, 0.8f, FALSE);
+ sub = uiLayoutSplit(split, 0.8f, false);
uiItemR(sub, ptr, "module", 0, "", ICON_NONE);
uiItemR(sub, ptr, "use_debug", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
}
@@ -1389,7 +1389,7 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *
bActuator *act= (bActuator *)ptr->data;
box = uiLayoutBox(layout);
- row = uiLayoutRow(box, FALSE);
+ row = uiLayoutRow(box, false);
uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")) {
@@ -1401,13 +1401,13 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *
uiItemL(row, act->name, ICON_NONE);
}
- sub = uiLayoutRow(row, FALSE);
+ sub = uiLayoutRow(row, false);
uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_actuators_active_states") &&
RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin")));
uiItemR(sub, ptr, "pin", UI_ITEM_R_NO_BG, "", ICON_NONE);
if (RNA_boolean_get(ptr, "show_expanded")==0) {
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiItemEnumO(sub, "LOGIC_OT_actuator_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(sub, "LOGIC_OT_actuator_move", "", ICON_TRIA_DOWN, "direction", 2); // down
}
@@ -1422,22 +1422,22 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr)
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "play_mode", 0, "", ICON_NONE);
- sub = uiLayoutRow(row, TRUE);
+ sub = uiLayoutRow(row, true);
uiItemR(sub, ptr, "use_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(sub, ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- row = uiLayoutColumn(sub, FALSE);
+ row = uiLayoutColumn(sub, false);
uiLayoutSetActive(row, (RNA_boolean_get(ptr, "use_additive") || RNA_boolean_get(ptr, "use_force")));
uiItemR(row, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "action", 0, "", ICON_NONE);
uiItemR(row, ptr, "use_continue_last_frame", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
if ((RNA_enum_get(ptr, "play_mode") == ACT_ACTION_FROM_PROP))
uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
@@ -1448,11 +1448,11 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr)
uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "frame_blend_in", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "priority", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "layer", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "layer_weight", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "blend_mode", 0, "", ICON_NONE);
@@ -1541,11 +1541,11 @@ static void draw_actuator_camera(uiLayout *layout, PointerRNA *ptr)
uiLayout *row;
uiItemR(layout, ptr, "object", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "height", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "axis", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "min", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "max", 0, NULL, ICON_NONE);
@@ -1564,7 +1564,7 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
case ACT_CONST_TYPE_LOC:
uiItemR(layout, ptr, "limit", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "limit_min", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "limit_max", 0, NULL, ICON_NONE);
@@ -1572,36 +1572,36 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
break;
case ACT_CONST_TYPE_DIST:
- split = uiLayoutSplit(layout, 0.8, FALSE);
+ split = uiLayoutSplit(layout, 0.8, false);
uiItemR(split, ptr, "direction", 0, NULL, ICON_NONE);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiItemR(row, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(row, ptr, "use_normal", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
- col = uiLayoutColumn(row, TRUE);
+ row = uiLayoutRow(layout, false);
+ col = uiLayoutColumn(row, true);
uiItemL(col, IFACE_("Range:"), ICON_NONE);
uiItemR(col, ptr, "range", 0, "", ICON_NONE);
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
uiItemR(col, ptr, "use_force_distance", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, FALSE);
- uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_force_distance") == TRUE);
+ sub = uiLayoutColumn(col, false);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_force_distance") == true);
uiItemR(sub, ptr, "distance", 0, "", ICON_NONE);
uiItemR(layout, ptr, "damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.15f, FALSE);
+ split = uiLayoutSplit(layout, 0.15f, false);
uiItemR(split, ptr, "use_material_detect", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
if (RNA_boolean_get(ptr, "use_material_detect"))
uiItemPointerR(split, ptr, "material", &main_ptr, "materials", NULL, ICON_MATERIAL_DATA);
else
uiItemR(split, ptr, "property", 0, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.15, FALSE);
+ split = uiLayoutSplit(layout, 0.15, false);
uiItemR(split, ptr, "use_persistent", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiItemR(row, ptr, "time", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "damping_rotation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
break;
@@ -1609,43 +1609,43 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext
case ACT_CONST_TYPE_ORI:
uiItemR(layout, ptr, "direction_axis_pos", 0, NULL, ICON_NONE);
- row=uiLayoutRow(layout, TRUE);
+ row=uiLayoutRow(layout, true);
uiItemR(row, ptr, "damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "time", 0, NULL, ICON_NONE);
- row=uiLayoutRow(layout, FALSE);
+ row=uiLayoutRow(layout, false);
uiItemR(row, ptr, "rotation_max", 0, NULL, ICON_NONE);
- row=uiLayoutRow(layout, TRUE);
+ row=uiLayoutRow(layout, true);
uiItemR(row, ptr, "angle_min", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "angle_max", 0, NULL, ICON_NONE);
break;
case ACT_CONST_TYPE_FH:
- split = uiLayoutSplit(layout, 0.75, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.75, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "fh_damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "fh_height", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_fh_paralel_axis", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "direction_axis", 0, NULL, ICON_NONE);
- split = uiLayoutSplit(row, 0.9f, FALSE);
+ split = uiLayoutSplit(row, 0.9f, false);
uiItemR(split, ptr, "fh_force", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_fh_normal", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.15, FALSE);
+ split = uiLayoutSplit(layout, 0.15, false);
uiItemR(split, ptr, "use_material_detect", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
if (RNA_boolean_get(ptr, "use_material_detect"))
uiItemPointerR(split, ptr, "material", &main_ptr, "materials", NULL, ICON_MATERIAL_DATA);
else
uiItemR(split, ptr, "property", 0, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.15, FALSE);
+ split = uiLayoutSplit(layout, 0.15, false);
uiItemR(split, ptr, "use_persistent", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- row = uiLayoutRow(split, FALSE);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "time", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "damping_rotation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
break;
@@ -1660,17 +1660,17 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
switch (RNA_enum_get(ptr, "mode")) {
case ACT_EDOB_ADD_OBJECT:
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "object", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "time", 0, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "linear_velocity", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "angular_velocity", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_angular_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
break;
@@ -1681,16 +1681,16 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
uiItemL(layout, IFACE_("Mode only available for mesh objects"), ICON_NONE);
break;
}
- split = uiLayoutSplit(layout, 0.6, FALSE);
+ split = uiLayoutSplit(layout, 0.6, false);
uiItemR(split, ptr, "mesh", 0, NULL, ICON_NONE);
- row = uiLayoutRow(split, FALSE);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "use_replace_display_mesh", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(row, ptr, "use_replace_physics_mesh", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
break;
case ACT_EDOB_TRACK_TO:
- split = uiLayoutSplit(layout, 0.5, FALSE);
+ split = uiLayoutSplit(layout, 0.5, false);
uiItemR(split, ptr, "track_object", 0, NULL, ICON_NONE);
- sub = uiLayoutSplit(split, 0.7f, FALSE);
+ sub = uiLayoutSplit(split, 0.7f, false);
uiItemR(sub, ptr, "time", 0, NULL, ICON_NONE);
uiItemR(sub, ptr, "use_3d_tracking", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
break;
@@ -1717,9 +1717,9 @@ static void draw_actuator_filter_2d(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "glsl_shader", 0, NULL, ICON_NONE);
break;
case ACT_2DFILTER_MOTIONBLUR:
- split=uiLayoutSplit(layout, 0.75f, TRUE);
- row = uiLayoutRow(split, FALSE);
- uiLayoutSetActive(row, RNA_boolean_get(ptr, "use_motion_blur") == TRUE);
+ split=uiLayoutSplit(layout, 0.75f, true);
+ row = uiLayoutRow(split, false);
+ uiLayoutSetActive(row, RNA_boolean_get(ptr, "use_motion_blur") == true);
uiItemR(row, ptr, "motion_blur_factor", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_motion_blur", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
break;
@@ -1750,7 +1750,7 @@ static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr, bContext *C
uiItemPointerR(layout, ptr, "to_property", &main_ptr, "objects", NULL, ICON_OBJECT_DATA);
uiItemR(layout, ptr, "subject", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "body_type", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "body_type") == ACT_MESG_MESG)
@@ -1774,37 +1774,37 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr)
switch (RNA_enum_get(ptr, "mode")) {
case ACT_OBJECT_NORMAL:
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "offset_location", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_location", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "offset_rotation", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_rotation", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
if (ELEM3(physics_type, OB_BODY_TYPE_DYNAMIC, OB_BODY_TYPE_RIGID, OB_BODY_TYPE_SOFT)) {
uiItemL(layout, IFACE_("Dynamic Object Settings:"), ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "force", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "torque", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_torque", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "linear_velocity", 0, NULL, ICON_NONE);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiItemR(row, ptr, "use_local_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(row, ptr, "use_add_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "angular_velocity", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_angular_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
@@ -1814,30 +1814,30 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr)
case ACT_OBJECT_SERVO:
uiItemR(layout, ptr, "reference_object", 0, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "linear_velocity", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
- col = uiLayoutColumn(row, FALSE);
+ row = uiLayoutRow(layout, false);
+ col = uiLayoutColumn(row, false);
uiItemR(col, ptr, "use_servo_limit_x", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
- uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_x") == TRUE);
+ sub = uiLayoutColumn(col, true);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_x") == true);
uiItemR(sub, ptr, "force_max_x", 0, NULL, ICON_NONE);
uiItemR(sub, ptr, "force_min_x", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(row, FALSE);
+ col = uiLayoutColumn(row, false);
uiItemR(col, ptr, "use_servo_limit_y", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
- uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_y") == TRUE);
+ sub = uiLayoutColumn(col, true);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_y") == true);
uiItemR(sub, ptr, "force_max_y", 0, NULL, ICON_NONE);
uiItemR(sub, ptr, "force_min_y", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(row, FALSE);
+ col = uiLayoutColumn(row, false);
uiItemR(col, ptr, "use_servo_limit_z", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
- uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_z") == TRUE);
+ sub = uiLayoutColumn(col, true);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_z") == true);
uiItemR(sub, ptr, "force_max_z", 0, NULL, ICON_NONE);
uiItemR(sub, ptr, "force_min_z", 0, NULL, ICON_NONE);
@@ -1845,27 +1845,27 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr)
//Layout designers willing to help on that, please compare with 2.49 ui
// (since the old code is going to be deleted ... soon)
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "proportional_coefficient", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "integral_coefficient", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "derivate_coefficient", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
break;
case ACT_OBJECT_CHARACTER:
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "offset_location", 0, NULL, ICON_NONE);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiItemR(row, ptr, "use_local_location", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(row, ptr, "use_add_character_location", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
uiItemR(row, ptr, "offset_rotation", 0, NULL, ICON_NONE);
uiItemR(split, ptr, "use_local_rotation", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- split = uiLayoutSplit(layout, 0.9, FALSE);
- row = uiLayoutRow(split, FALSE);
- split = uiLayoutSplit(row, 0.7, FALSE);
+ split = uiLayoutSplit(layout, 0.9, false);
+ row = uiLayoutRow(split, false);
+ split = uiLayoutSplit(row, 0.7, false);
uiItemL(split, "", ICON_NONE); /*Just use this for some spacing */
uiItemR(split, ptr, "use_character_jump", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
break;
@@ -1881,10 +1881,10 @@ static void draw_actuator_parent(uiLayout *layout, PointerRNA *ptr)
if (RNA_enum_get(ptr, "mode") == ACT_PARENT_SET) {
uiItemR(layout, ptr, "object", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "use_compound", 0, NULL, ICON_NONE);
- sub = uiLayoutRow(row, FALSE);
- uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_compound") == TRUE);
+ sub = uiLayoutRow(row, false);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_compound") == true);
uiItemR(sub, ptr, "use_ghost", 0, NULL, ICON_NONE);
}
}
@@ -1914,15 +1914,15 @@ static void draw_actuator_property(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "value", 0, NULL, ICON_NONE);
break;
case ACT_PROP_COPY:
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "object", 0, NULL, ICON_NONE);
if (ob_from) {
RNA_pointer_create((ID *)ob_from, &RNA_GameObjectSettings, ob_from, &obj_settings_ptr);
uiItemPointerR(row, ptr, "object_property", &obj_settings_ptr, "properties", NULL, ICON_NONE);
}
else {
- sub = uiLayoutRow(row, FALSE);
- uiLayoutSetActive(sub, FALSE);
+ sub = uiLayoutRow(row, false);
+ uiLayoutSetActive(sub, false);
uiItemR(sub, ptr, "object_property", 0, NULL, ICON_NONE);
}
break;
@@ -1938,15 +1938,15 @@ static void draw_actuator_random(uiLayout *layout, PointerRNA *ptr)
ob = (Object *)ptr->id.data;
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "seed", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "distribution", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
switch (RNA_enum_get(ptr, "distribution")) {
case ACT_RANDOM_BOOL_CONST:
@@ -2023,12 +2023,12 @@ static void draw_actuator_shape_action(uiLayout *layout, PointerRNA *ptr)
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "mode", 0, "", ICON_NONE);
uiItemR(row, ptr, "action", 0, "", ICON_NONE);
uiItemR(row, ptr, "use_continue_last_frame", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
if ((RNA_enum_get(ptr, "mode") == ACT_ACTION_FROM_PROP))
uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
@@ -2037,11 +2037,11 @@ static void draw_actuator_shape_action(uiLayout *layout, PointerRNA *ptr)
uiItemR(row, ptr, "frame_end", 0, NULL, ICON_NONE);
}
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "frame_blend_in", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "priority", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemPointerR(row, ptr, "frame_property", &settings_ptr, "properties", NULL, ICON_NONE);
#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
@@ -2060,28 +2060,28 @@ static void draw_actuator_sound(uiLayout *layout, PointerRNA *ptr, bContext *C)
}
uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "volume", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "pitch", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_sound_3d", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_sound_3d") == TRUE);
+ col = uiLayoutColumn(layout, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_sound_3d") == true);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "gain_3d_min", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "gain_3d_max", 0, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "distance_3d_reference", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "distance_3d_max", 0, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "rolloff_factor_3d", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "cone_outer_gain_3d", 0, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "cone_outer_angle_3d", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "cone_inner_angle_3d", 0, NULL, ICON_NONE);
}
@@ -2093,7 +2093,7 @@ static void draw_actuator_state(uiLayout *layout, PointerRNA *ptr)
PointerRNA settings_ptr;
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
- split = uiLayoutSplit(layout, 0.35, FALSE);
+ split = uiLayoutSplit(layout, 0.35, false);
uiItemR(split, ptr, "operation", 0, NULL, ICON_NONE);
uiTemplateLayers(split, ptr, "states", &settings_ptr, "used_states", 0);
@@ -2102,7 +2102,7 @@ static void draw_actuator_state(uiLayout *layout, PointerRNA *ptr)
static void draw_actuator_visibility(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *row;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "use_visible", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "use_occlusion", 0, NULL, ICON_NONE);
@@ -2118,37 +2118,37 @@ static void draw_actuator_steering(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "target", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "navmesh", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "distance", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "velocity", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "acceleration", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "turn_speed", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
- col = uiLayoutColumn(row, FALSE);
+ row = uiLayoutRow(layout, false);
+ col = uiLayoutColumn(row, false);
uiItemR(col, ptr, "facing", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(row, FALSE);
+ col = uiLayoutColumn(row, false);
uiItemR(col, ptr, "facing_axis", 0, NULL, ICON_NONE);
if (!RNA_boolean_get(ptr, "facing")) {
- uiLayoutSetActive(col, FALSE);
+ uiLayoutSetActive(col, false);
}
- col = uiLayoutColumn(row, FALSE);
+ col = uiLayoutColumn(row, false);
uiItemR(col, ptr, "normal_up", 0, NULL, ICON_NONE);
if (!RNA_pointer_get(ptr, "navmesh").data) {
- uiLayoutSetActive(col, FALSE);
+ uiLayoutSetActive(col, false);
}
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "self_terminated", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING) {
uiItemR(row, ptr, "update_period", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
}
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "show_visualization", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "mode") != ACT_STEERING_PATHFOLLOWING) {
- uiLayoutSetActive(row, FALSE);
+ uiLayoutSetActive(row, false);
}
}
@@ -2286,7 +2286,7 @@ void logic_buttons(bContext *C, ARegion *ar)
xco= 21 * U.widget_unit; yco= - U.widget_unit / 2; width= 15 * U.widget_unit;
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, 0, UI_GetStyle());
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiDefBlockBut(block, controller_menu, NULL, IFACE_("Controllers"), xco - U.widget_unit / 2, yco, width, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */
@@ -2311,10 +2311,10 @@ void logic_buttons(bContext *C, ARegion *ar)
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
- split = uiLayoutSplit(layout, 0.05f, FALSE);
+ split = uiLayoutSplit(layout, 0.05f, false);
uiItemR(split, &settings_ptr, "show_state_panel", UI_ITEM_R_NO_BG, "", ICON_DISCLOSURE_TRI_RIGHT);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide controllers"));
RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr);
@@ -2324,21 +2324,21 @@ void logic_buttons(bContext *C, ARegion *ar)
if (RNA_boolean_get(&settings_ptr, "show_state_panel")) {
box = uiLayoutBox(layout);
- split = uiLayoutSplit(box, 0.2f, FALSE);
+ split = uiLayoutSplit(box, 0.2f, false);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiItemL(col, IFACE_("Visible"), ICON_NONE);
uiItemL(col, IFACE_("Initial"), ICON_NONE);
- subsplit = uiLayoutSplit(split, 0.85f, FALSE);
- col = uiLayoutColumn(subsplit, FALSE);
- row = uiLayoutRow(col, FALSE);
- uiLayoutSetActive(row, RNA_boolean_get(&settings_ptr, "use_all_states") == FALSE);
+ subsplit = uiLayoutSplit(split, 0.85f, false);
+ col = uiLayoutColumn(subsplit, false);
+ row = uiLayoutRow(col, false);
+ uiLayoutSetActive(row, RNA_boolean_get(&settings_ptr, "use_all_states") == false);
uiTemplateGameStates(row, &settings_ptr, "states_visible", &settings_ptr, "used_states", 0);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiTemplateGameStates(row, &settings_ptr, "states_initial", &settings_ptr, "used_states", 0);
- col = uiLayoutColumn(subsplit, FALSE);
+ col = uiLayoutColumn(subsplit, false);
uiItemR(col, &settings_ptr, "use_all_states", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(col, &settings_ptr, "show_debug_state", 0, "", ICON_NONE);
}
@@ -2357,18 +2357,18 @@ void logic_buttons(bContext *C, ARegion *ar)
continue;
/* use two nested splits to align inlinks/links properly */
- split = uiLayoutSplit(layout, 0.05f, FALSE);
+ split = uiLayoutSplit(layout, 0.05f, false);
/* put inlink button to the left */
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_LEFT);
uiDefIconBut(block, INLINK, 0, ICON_INLINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, cont, LINK_CONTROLLER, 0, 0, 0, "");
- //col = uiLayoutColumn(split, TRUE);
+ //col = uiLayoutColumn(split, true);
/* nested split for middle and right columns */
- subsplit = uiLayoutSplit(split, 0.95f, FALSE);
+ subsplit = uiLayoutSplit(split, 0.95f, false);
- col = uiLayoutColumn(subsplit, TRUE);
+ col = uiLayoutColumn(subsplit, true);
uiLayoutSetContextPointer(col, "controller", &ptr);
/* should make UI template for controller header.. function will do for now */
@@ -2380,7 +2380,7 @@ void logic_buttons(bContext *C, ARegion *ar)
/* put link button to the right */
- col = uiLayoutColumn(subsplit, FALSE);
+ col = uiLayoutColumn(subsplit, false);
uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_LEFT);
but = uiDefIconBut(block, LINK, 0, ICON_LINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
uiSetButLink(but, NULL, (void ***)&(cont->links), &cont->totlinks, LINK_CONTROLLER, LINK_ACTUATOR);
@@ -2393,7 +2393,7 @@ void logic_buttons(bContext *C, ARegion *ar)
xco= U.widget_unit / 2; yco= -U.widget_unit / 2; width= 17 * U.widget_unit;
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, 0, UI_GetStyle());
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiDefBlockBut(block, sensor_menu, NULL, IFACE_("Sensors"), xco - U.widget_unit / 2, yco, 15 * U.widget_unit, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */
@@ -2411,7 +2411,7 @@ void logic_buttons(bContext *C, ARegion *ar)
/* only draw the sensor common header if "use_visible" */
if ((ob->scavisflag & OB_VIS_SENS) == 0) continue;
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide sensors"));
RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr);
@@ -2437,8 +2437,8 @@ void logic_buttons(bContext *C, ARegion *ar)
/* make as visible, for move operator */
sens->flag |= SENS_VISIBLE;
- split = uiLayoutSplit(layout, 0.95f, FALSE);
- col = uiLayoutColumn(split, TRUE);
+ split = uiLayoutSplit(layout, 0.95f, false);
+ col = uiLayoutColumn(split, true);
uiLayoutSetContextPointer(col, "sensor", &ptr);
/* should make UI template for sensor header.. function will do for now */
@@ -2448,7 +2448,7 @@ void logic_buttons(bContext *C, ARegion *ar)
draw_brick_sensor(col, &ptr, C);
/* put link button to the right */
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
/* use old-school uiButtons for links for now */
but = uiDefIconBut(block, LINK, 0, ICON_LINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
uiSetButLink(but, NULL, (void ***)&(sens->links), &sens->totlinks, LINK_SENSOR, LINK_CONTROLLER);
@@ -2462,7 +2462,7 @@ void logic_buttons(bContext *C, ARegion *ar)
xco= 40 * U.widget_unit; yco= -U.widget_unit / 2; width= 17 * U.widget_unit;
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, 0, UI_GetStyle());
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiDefBlockBut(block, actuator_menu, NULL, IFACE_("Actuators"), xco - U.widget_unit / 2, yco, 15 * U.widget_unit, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */
@@ -2482,7 +2482,7 @@ void logic_buttons(bContext *C, ARegion *ar)
continue;
}
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide actuators"));
RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr);
@@ -2509,13 +2509,13 @@ void logic_buttons(bContext *C, ARegion *ar)
/* make as visible, for move operator */
act->flag |= ACT_VISIBLE;
- split = uiLayoutSplit(layout, 0.05f, FALSE);
+ split = uiLayoutSplit(layout, 0.05f, false);
/* put inlink button to the left */
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiDefIconBut(block, INLINK, 0, ICON_INLINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, act, LINK_ACTUATOR, 0, 0, 0, "");
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiLayoutSetContextPointer(col, "actuator", &ptr);
/* should make UI template for actuator header.. function will do for now */
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index ce7d537a518..0c4f08c9199 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -269,7 +269,7 @@ static void nla_panel_animdata(const bContext *C, Panel *pa)
RNA_id_pointer_create(id, &id_ptr);
/* ID-block name > AnimData */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
uiItemL(row, id->name + 2, RNA_struct_ui_icon(id_ptr.type)); /* id-block (src) */
@@ -281,19 +281,19 @@ static void nla_panel_animdata(const bContext *C, Panel *pa)
/* Active Action Properties ------------------------------------- */
/* action */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiTemplateID(row, (bContext *)C, &adt_ptr, "action", "ACTION_OT_new", NULL, NULL /*"ACTION_OT_unlink"*/); // XXX: need to make these operators
/* extrapolation */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, ICON_NONE);
/* blending */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, ICON_NONE);
/* influence */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &adt_ptr, "action_influence", 0, NULL, ICON_NONE);
}
@@ -313,7 +313,7 @@ static void nla_panel_track(const bContext *C, Panel *pa)
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* Info - Active NLA-Context:Track ---------------------- */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &nlt_ptr, "name", 0, NULL, ICON_NLA);
}
@@ -334,12 +334,12 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
/* Strip Properties ------------------------------------- */
/* strip type */
- row = uiLayoutColumn(layout, TRUE);
+ row = uiLayoutColumn(layout, true);
uiItemR(row, &strip_ptr, "name", 0, NULL, ICON_NLA); // XXX icon?
uiItemR(row, &strip_ptr, "type", 0, NULL, ICON_NONE);
/* strip extents */
- column = uiLayoutColumn(layout, TRUE);
+ column = uiLayoutColumn(layout, true);
uiItemL(column, IFACE_("Strip Extents:"), ICON_NONE);
uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NONE);
uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NONE);
@@ -353,27 +353,27 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
/* only show if allowed to... */
if (showEvalProps) {
/* extrapolation */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE);
/* blending */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
/* blend in/out + autoblending
* - blend in/out can only be set when autoblending is off
*/
- column = uiLayoutColumn(layout, TRUE);
- uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == FALSE);
+ column = uiLayoutColumn(layout, true);
+ uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle?
- sub = uiLayoutColumn(column, TRUE);
- uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == FALSE);
+ sub = uiLayoutColumn(column, true);
+ uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == false);
uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE);
uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE);
/* settings */
- column = uiLayoutColumn(layout, TRUE);
+ column = uiLayoutColumn(layout, true);
uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time")));
uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);
uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NONE);
@@ -399,24 +399,24 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
/* Strip Properties ------------------------------------- */
/* action pointer */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);
/* action extents */
// XXX custom names were used here (to avoid the prefixes)... probably not necessary in future?
- column = uiLayoutColumn(layout, TRUE);
+ column = uiLayoutColumn(layout, true);
uiItemL(column, IFACE_("Action Extents:"), ICON_NONE);
uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Start Frame"), ICON_NONE);
uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End Frame"), ICON_NONE);
// XXX: this layout may actually be too abstract and confusing, and may be better using standard column layout
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, &strip_ptr, "use_sync_length", 0, IFACE_("Sync Length"), ICON_NONE);
uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length");
/* action usage */
- column = uiLayoutColumn(layout, TRUE);
- uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == FALSE);
+ column = uiLayoutColumn(layout, true);
+ uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false);
uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);
uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE);
uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
@@ -437,19 +437,19 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence"));
uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
- sub = uiLayoutRow(col, FALSE);
+ col = uiLayoutColumn(layout, true);
+ sub = uiLayoutRow(col, false);
uiItemR(sub, &strip_ptr, "use_animated_time", 0, NULL, ICON_NONE);
uiItemR(sub, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE);
- sub = uiLayoutRow(col, FALSE);
+ sub = uiLayoutRow(col, false);
uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_time"));
uiItemR(sub, &strip_ptr, "strip_time", 0, NULL, ICON_NONE);
}
@@ -473,7 +473,7 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
/* 'add modifier' button at top of panel */
{
- row = uiLayoutRow(pa->layout, FALSE);
+ row = uiLayoutRow(pa->layout, false);
block = uiLayoutGetBlock(row);
// XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
@@ -482,14 +482,14 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
TIP_("Adds a new F-Modifier for the active NLA Strip"));
/* copy/paste (as sub-row)*/
- row = uiLayoutRow(row, TRUE);
+ row = uiLayoutRow(row, true);
uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");
uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
}
/* draw each modifier */
for (fcm = strip->modifiers.first; fcm; fcm = fcm->next) {
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.id.data, &strip->modifiers, fcm);
}
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 9f83bc80314..cf01ebd6976 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -656,7 +656,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
BLI_strncpy(name, act ? act->id.name + 2 : "<No Action>", sizeof(name));
/* draw manually still */
- do_draw = TRUE;
+ do_draw = true;
break;
}
default: /* handled by standard channel-drawing API */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index f54ceeeb702..80b1918ff8e 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -342,13 +342,13 @@ static int nlaedit_viewall(bContext *C, const short onlySel)
static int nlaedit_viewall_exec(bContext *C, wmOperator *UNUSED(op))
{
/* whole range */
- return nlaedit_viewall(C, FALSE);
+ return nlaedit_viewall(C, false);
}
static int nlaedit_viewsel_exec(bContext *C, wmOperator *UNUSED(op))
{
/* only selected */
- return nlaedit_viewall(C, TRUE);
+ return nlaedit_viewall(C, true);
}
void NLA_OT_view_all(wmOperatorType *ot)
@@ -527,7 +527,7 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
bAnimListElem *ale;
int filter;
- int done = FALSE;
+ int done = false;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -846,7 +846,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
bAnimListElem *ale;
int filter;
- short done = FALSE;
+ bool done = false;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -889,7 +889,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
/* auto-name newly created strip */
BKE_nlastrip_validate_name(adt, nstrip);
- done++;
+ done = true;
}
}
}
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 7a7431b22b3..0a010ffb819 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -178,16 +178,16 @@ static void nla_keymap_channels(wmKeyMap *keymap)
/* click-select */
// XXX for now, only leftmouse....
kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
/* channel operations ------------------------------------------------------------ */
/* add tracks */
kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "above_selected", FALSE);
+ RNA_boolean_set(kmi->ptr, "above_selected", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "above_selected", TRUE);
+ RNA_boolean_set(kmi->ptr, "above_selected", true);
/* delete tracks */
WM_keymap_add_item(keymap, "NLA_OT_tracks_delete", XKEY, KM_PRESS, 0, 0);
@@ -201,38 +201,38 @@ static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap)
/* selection ------------------------------------------------ */
/* click select */
kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
/* select left/right */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_LEFT);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT);
/* deselect all */
/* TODO: uniformize with other select_all ops? */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "invert", FALSE);
+ RNA_boolean_set(kmi->ptr, "invert", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "invert", TRUE);
+ RNA_boolean_set(kmi->ptr, "invert", true);
/* borderselect */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", true);
/* view ---------------------------------------------------- */
/* auto-set range */
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index d534eefb0a1..5e3ac42d865 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -148,7 +148,7 @@ static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr
uiLayout *col;
RNA_pointer_create(ptr->id.data, &RNA_NodeSocket, output, &sockptr);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiTemplateColorPicker(col, &sockptr, "default_value", 1, 0, 0, 0);
uiItemR(col, &sockptr, "default_value", UI_ITEM_R_SLIDER, "", ICON_NONE);
}
@@ -159,8 +159,8 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA
bNodeTree *ntree = (bNodeTree *)ptr->id.data;
- col = uiLayoutColumn(layout, FALSE);
- row = uiLayoutRow(col, TRUE);
+ col = uiLayoutColumn(layout, false);
+ row = uiLayoutRow(col, true);
uiItemR(row, ptr, "blend_type", 0, "", ICON_NONE);
if (ELEM(ntree->type, NTREE_COMPOSIT, NTREE_TEXTURE))
uiItemR(row, ptr, "use_alpha", 0, "", ICON_IMAGE_RGB_ALPHA);
@@ -185,7 +185,7 @@ static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *pt
uiTemplateCurveMapping(layout, ptr, "curve", 's', 0, 0);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "frame_start", 0, IFACE_("Sta"), ICON_NONE);
uiItemR(row, ptr, "frame_end", 0, IFACE_("End"), ICON_NONE);
}
@@ -425,7 +425,7 @@ static void node_draw_frame(const bContext *C, ARegion *ar, SpaceNode *snode,
float alpha;
/* skip if out of view */
- if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == FALSE) {
+ if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == false) {
uiEndBlock(C, node->block);
node->block = NULL;
return;
@@ -646,7 +646,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr,
if (!imaptr->data)
return;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, imaptr, "source", 0, "", ICON_NONE);
@@ -665,7 +665,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr,
}
if (ELEM(source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "frame_duration", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "frame_start", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "frame_offset", 0, NULL, ICON_NONE);
@@ -673,7 +673,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr,
uiItemR(col, ptr, "use_auto_refresh", 0, NULL, ICON_NONE);
}
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
if (RNA_enum_get(imaptr, "type") == IMA_TYPE_MULTILAYER)
uiItemR(col, ptr, "layer", 0, NULL, ICON_NONE);
@@ -688,7 +688,7 @@ static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA
if (!node->id) return;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "use_diffuse", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "use_specular", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "invert_normal", 0, NULL, ICON_NONE);
@@ -700,31 +700,31 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemR(layout, ptr, "vector_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
uiItemL(col, IFACE_("Location:"), ICON_NONE);
uiItemR(col, ptr, "translation", 0, "", ICON_NONE);
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
uiItemL(col, IFACE_("Rotation:"), ICON_NONE);
uiItemR(col, ptr, "rotation", 0, "", ICON_NONE);
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
uiItemL(col, IFACE_("Scale:"), ICON_NONE);
uiItemR(col, ptr, "scale", 0, "", ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
uiItemR(col, ptr, "use_min", 0, IFACE_("Min"), ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min"));
uiItemR(sub, ptr, "min", 0, "", ICON_NONE);
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
uiItemR(col, ptr, "use_max", 0, IFACE_("Max"), ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max"));
uiItemR(sub, ptr, "max", 0, "", ICON_NONE);
}
@@ -746,7 +746,7 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA
PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
PointerRNA dataptr = RNA_pointer_get(&obptr, "data");
@@ -839,11 +839,11 @@ static void node_shader_buts_tex_brick(uiLayout *layout, bContext *UNUSED(C), Po
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "offset", UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE);
uiItemR(col, ptr, "offset_frequency", 0, IFACE_("Frequency"), ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "squash", 0, IFACE_("Squash"), ICON_NONE);
uiItemR(col, ptr, "squash_frequency", 0, IFACE_("Frequency"), ICON_NONE);
}
@@ -893,11 +893,11 @@ static void node_shader_buts_tangent(uiLayout *layout, bContext *C, PointerRNA *
{
uiLayout *split, *row;
- split = uiLayoutSplit(layout, 0.0f, FALSE);
+ split = uiLayoutSplit(layout, 0.0f, false);
uiItemR(split, ptr, "direction_type", 0, "", 0);
- row = uiLayoutRow(split, FALSE);
+ row = uiLayoutRow(split, false);
if (RNA_enum_get(ptr, "direction_type") == SHD_TANGENT_UVMAP) {
PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
@@ -958,10 +958,10 @@ static void node_shader_buts_script(uiLayout *layout, bContext *UNUSED(C), Point
{
uiLayout *row;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "mode", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
if (RNA_enum_get(ptr, "mode") == NODE_SCRIPT_INTERNAL)
uiItemR(row, ptr, "script", 0, "", ICON_NONE);
@@ -1150,8 +1150,8 @@ static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, Point
if (!node->id) return;
- col = uiLayoutColumn(layout, FALSE);
- row = uiLayoutRow(col, TRUE);
+ col = uiLayoutColumn(layout, false);
+ row = uiLayoutRow(col, true);
uiItemR(row, ptr, "layer", 0, "", ICON_NONE);
prop = RNA_struct_find_property(ptr, "layer");
@@ -1175,7 +1175,7 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), Point
int reference;
int filter;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
filter = RNA_enum_get(ptr, "filter_type");
reference = RNA_boolean_get(ptr, "use_variable_size");
@@ -1192,15 +1192,15 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), Point
if (RNA_boolean_get(ptr, "use_relative")) {
uiItemL(col, IFACE_("Aspect Correction"), ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "aspect_correction", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "factor_x", 0, IFACE_("X"), ICON_NONE);
uiItemR(col, ptr, "factor_y", 0, IFACE_("Y"), ICON_NONE);
}
else {
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "size_x", 0, IFACE_("X"), ICON_NONE);
uiItemR(col, ptr, "size_y", 0, IFACE_("Y"), ICON_NONE);
}
@@ -1213,14 +1213,14 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemR(layout, ptr, "iterations", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_wrap", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(col, IFACE_("Center:"), ICON_NONE);
uiItemR(col, ptr, "center_x", 0, IFACE_("X"), ICON_NONE);
uiItemR(col, ptr, "center_y", 0, IFACE_("Y"), ICON_NONE);
uiItemS(layout);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "distance", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "angle", 0, NULL, ICON_NONE);
@@ -1234,7 +1234,7 @@ static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *UNUSED(
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "iterations", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "sigma_color", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "sigma_space", 0, NULL, ICON_NONE);
@@ -1244,29 +1244,29 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA
{
uiLayout *sub, *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemL(col, IFACE_("Bokeh Type:"), ICON_NONE);
uiItemR(col, ptr, "bokeh", 0, "", ICON_NONE);
uiItemR(col, ptr, "angle", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_gamma_correction", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer") == TRUE);
+ col = uiLayoutColumn(layout, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer") == true);
uiItemR(col, ptr, "f_stop", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "blur_max", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "threshold", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "use_preview", 0, NULL, ICON_NONE);
uiTemplateID(layout, C, ptr, "scene", NULL, NULL, NULL);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "use_zbuffer", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, FALSE);
- uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer") == FALSE);
+ sub = uiLayoutColumn(col, false);
+ uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer") == false);
uiItemR(sub, ptr, "z_scale", 0, NULL, ICON_NONE);
}
@@ -1305,7 +1305,7 @@ static void node_composit_buts_tonemap(uiLayout *layout, bContext *UNUSED(C), Po
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "tonemap_type", 0, "", ICON_NONE);
if (RNA_enum_get(ptr, "tonemap_type") == 0) {
uiItemR(col, ptr, "key", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1324,11 +1324,11 @@ static void node_composit_buts_lensdist(uiLayout *layout, bContext *UNUSED(C), P
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "use_projector", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(col, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector") == FALSE);
+ col = uiLayoutColumn(col, false);
+ uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector") == false);
uiItemR(col, ptr, "use_jitter", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "use_fit", 0, NULL, ICON_NONE);
}
@@ -1337,11 +1337,11 @@ static void node_composit_buts_vecblur(uiLayout *layout, bContext *UNUSED(C), Po
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "samples", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "factor", 0, IFACE_("Blur"), ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(col, IFACE_("Speed:"), ICON_NONE);
uiItemR(col, ptr, "speed_min", 0, IFACE_("Min"), ICON_NONE);
uiItemR(col, ptr, "speed_max", 0, IFACE_("Max"), ICON_NONE);
@@ -1366,7 +1366,7 @@ static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(layout, ptr, "use_crop_size", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "relative", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
if (RNA_boolean_get(ptr, "relative")) {
uiItemR(col, ptr, "rel_min_x", 0, IFACE_("Left"), ICON_NONE);
uiItemR(col, ptr, "rel_max_x", 0, IFACE_("Right"), ICON_NONE);
@@ -1385,8 +1385,8 @@ static void node_composit_buts_splitviewer(uiLayout *layout, bContext *UNUSED(C)
{
uiLayout *row, *col;
- col = uiLayoutColumn(layout, FALSE);
- row = uiLayoutRow(col, FALSE);
+ col = uiLayoutColumn(layout, false);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "axis", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(col, ptr, "factor", 0, NULL, ICON_NONE);
}
@@ -1395,7 +1395,7 @@ static void node_composit_buts_double_edge_mask(uiLayout *layout, bContext *UNUS
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemL(col, IFACE_("Inner Edge:"), ICON_NONE);
uiItemR(col, ptr, "inner_mode", 0, "", ICON_NONE);
@@ -1407,7 +1407,7 @@ static void node_composit_buts_map_range(uiLayout *layout, bContext *UNUSED(C),
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "use_clamp", 0, NULL, ICON_NONE);
}
@@ -1415,19 +1415,19 @@ static void node_composit_buts_map_value(uiLayout *layout, bContext *UNUSED(C),
{
uiLayout *sub, *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "offset", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "size", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "use_min", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, FALSE);
+ sub = uiLayoutColumn(col, false);
uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min"));
uiItemR(sub, ptr, "min", 0, "", ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "use_max", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, FALSE);
+ sub = uiLayoutColumn(col, false);
uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max"));
uiItemR(sub, ptr, "max", 0, "", ICON_NONE);
}
@@ -1436,7 +1436,7 @@ static void node_composit_buts_alphaover(uiLayout *layout, bContext *UNUSED(C),
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "use_premultiply", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "premul", 0, NULL, ICON_NONE);
}
@@ -1445,7 +1445,7 @@ static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), P
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "use_alpha", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "use_antialias_z", 0, NULL, ICON_NONE);
}
@@ -1455,7 +1455,7 @@ static void node_composit_buts_hue_sat(uiLayout *layout, bContext *UNUSED(C), Po
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "color_hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "color_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1484,7 +1484,7 @@ static void node_composit_buts_despeckle(uiLayout *layout, bContext *UNUSED(C),
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "threshold", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "threshold_neighbor", 0, NULL, ICON_NONE);
}
@@ -1493,7 +1493,7 @@ static void node_composit_buts_diff_matte(uiLayout *layout, bContext *UNUSED(C),
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
}
@@ -1502,10 +1502,10 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED
{
uiLayout *col, *row;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(layout, IFACE_("Color Space:"), ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(col, ptr, "tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1517,21 +1517,21 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C)
uiLayout *row, *col;
uiItemL(layout, IFACE_("Despill Channel:"), ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "limit_method") == 0) {
uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
uiItemR(col, ptr, "ratio", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "use_unspill", 0, NULL, ICON_NONE);
- if (RNA_boolean_get(ptr, "use_unspill") == TRUE) {
+ if (RNA_boolean_get(ptr, "use_unspill") == true) {
uiItemR(col, ptr, "unspill_red", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "unspill_green", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "unspill_blue", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1542,11 +1542,11 @@ static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *UNUSED(C
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "tolerance", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "threshold", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
/*uiItemR(col, ptr, "lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE); Removed for now */
uiItemR(col, ptr, "gain", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
/*uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, NULL, ICON_NONE); Removed for now*/
@@ -1556,7 +1556,7 @@ static void node_composit_buts_color_matte(uiLayout *layout, bContext *UNUSED(C)
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "color_hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "color_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1567,20 +1567,20 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(
uiLayout *col, *row;
uiItemL(layout, IFACE_("Color Space:"), ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "color_space", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemL(col, IFACE_("Key Channel:"), ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "matte_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "limit_method") == 0) {
uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
@@ -1592,7 +1592,7 @@ static void node_composit_buts_luma_matte(uiLayout *layout, bContext *UNUSED(C),
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "limit_max", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(col, ptr, "limit_min", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
}
@@ -1628,14 +1628,14 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
int multilayer = (RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER);
node_composit_buts_file_output(layout, C, ptr);
- uiTemplateImageSettings(layout, &imfptr, FALSE);
+ uiTemplateImageSettings(layout, &imfptr, false);
uiItemS(layout);
uiItemO(layout, IFACE_("Add Input"), ICON_ZOOMIN, "NODE_OT_output_file_add_socket");
- row = uiLayoutRow(layout, FALSE);
- col = uiLayoutColumn(row, TRUE);
+ row = uiLayoutRow(layout, false);
+ col = uiLayoutColumn(row, true);
active_index = RNA_int_get(ptr, "active_input_index");
/* using different collection properties if multilayer format is enabled */
@@ -1654,7 +1654,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
/* XXX collection lookup does not return the ID part of the pointer, setting this manually here */
active_input_ptr.id.data = ptr->id.data;
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
op_ptr = uiItemFullO(col, "NODE_OT_output_file_move_active_socket", "",
ICON_TRIA_UP, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&op_ptr, "direction", 1);
@@ -1664,19 +1664,19 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
if (active_input_ptr.data) {
if (multilayer) {
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(col, IFACE_("Layer:"), ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &active_input_ptr, "name", 0, "", ICON_NONE);
uiItemFullO(row, "NODE_OT_output_file_remove_active_socket", "",
ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY);
}
else {
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(col, IFACE_("File Subpath:"), ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &active_input_ptr, "path", 0, "", ICON_NONE);
uiItemFullO(row, "NODE_OT_output_file_remove_active_socket", "",
ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY);
@@ -1684,13 +1684,13 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
/* format details for individual files */
imfptr = RNA_pointer_get(&active_input_ptr, "format");
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemL(col, IFACE_("Format:"), ICON_NONE);
uiItemR(col, &active_input_ptr, "use_node_format", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, FALSE);
- uiLayoutSetActive(col, RNA_boolean_get(&active_input_ptr, "use_node_format") == FALSE);
- uiTemplateImageSettings(col, &imfptr, FALSE);
+ col = uiLayoutColumn(layout, false);
+ uiLayoutSetActive(col, RNA_boolean_get(&active_input_ptr, "use_node_format") == false);
+ uiTemplateImageSettings(col, &imfptr, false);
}
}
}
@@ -1702,7 +1702,7 @@ static void node_composit_buts_scale(uiLayout *layout, bContext *UNUSED(C), Poin
if (RNA_enum_get(ptr, "space") == CMP_SCALE_RENDERPERCENT) {
uiLayout *row;
uiItemR(layout, ptr, "frame_method", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "offset_x", 0, "X", ICON_NONE);
uiItemR(row, ptr, "offset_y", 0, "Y", ICON_NONE);
}
@@ -1717,7 +1717,7 @@ static void node_composit_buts_invert(uiLayout *layout, bContext *UNUSED(C), Poi
{
uiLayout *col;
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, ptr, "invert_rgb", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "invert_alpha", 0, NULL, ICON_NONE);
}
@@ -1740,39 +1740,39 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C
if (RNA_enum_get(ptr, "correction_method") == 0) {
- split = uiLayoutSplit(layout, 0.0f, FALSE);
- col = uiLayoutColumn(split, FALSE);
+ split = uiLayoutSplit(layout, 0.0f, false);
+ col = uiLayoutColumn(split, false);
uiTemplateColorPicker(col, ptr, "lift", 1, 1, 0, 1);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "lift", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiTemplateColorPicker(col, ptr, "gamma", 1, 1, 1, 1);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "gamma", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiTemplateColorPicker(col, ptr, "gain", 1, 1, 1, 1);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "gain", 0, NULL, ICON_NONE);
}
else {
- split = uiLayoutSplit(layout, 0.0f, FALSE);
- col = uiLayoutColumn(split, FALSE);
+ split = uiLayoutSplit(layout, 0.0f, false);
+ col = uiLayoutColumn(split, false);
uiTemplateColorPicker(col, ptr, "offset", 1, 1, 0, 1);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "offset", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiTemplateColorPicker(col, ptr, "power", 1, 1, 0, 1);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "power", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(split, FALSE);
+ col = uiLayoutColumn(split, false);
uiTemplateColorPicker(col, ptr, "slope", 1, 1, 0, 1);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, ptr, "slope", 0, NULL, ICON_NONE);
}
@@ -1885,12 +1885,12 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
{
uiLayout *row;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "red", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "green", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "blue", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemL(row, "", ICON_NONE);
uiItemL(row, IFACE_("Saturation"), ICON_NONE);
uiItemL(row, IFACE_("Contrast"), ICON_NONE);
@@ -1898,7 +1898,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemL(row, IFACE_("Gain"), ICON_NONE);
uiItemL(row, IFACE_("Lift"), ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemL(row, IFACE_("Master"), ICON_NONE);
uiItemR(row, ptr, "master_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "master_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -1906,7 +1906,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "master_gain", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "master_lift", UI_ITEM_R_SLIDER, "", ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemL(row, IFACE_("Highlights"), ICON_NONE);
uiItemR(row, ptr, "highlights_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "highlights_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -1914,7 +1914,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "highlights_gain", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "highlights_lift", UI_ITEM_R_SLIDER, "", ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemL(row, IFACE_("Midtones"), ICON_NONE);
uiItemR(row, ptr, "midtones_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "midtones_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -1922,7 +1922,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "midtones_gain", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "midtones_lift", UI_ITEM_R_SLIDER, "", ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemL(row, IFACE_("Shadows"), ICON_NONE);
uiItemR(row, ptr, "shadows_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "shadows_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -1930,7 +1930,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "shadows_gain", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "shadows_lift", UI_ITEM_R_SLIDER, "", ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "midtones_start", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "midtones_end", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
}
@@ -1939,7 +1939,7 @@ static void node_composit_buts_colorcorrection_ex(uiLayout *layout, bContext *UN
{
uiLayout *row;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "red", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "green", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "blue", 0, NULL, ICON_NONE);
@@ -1974,7 +1974,7 @@ static void node_composit_buts_colorcorrection_ex(uiLayout *layout, bContext *UN
uiItemR(row, ptr, "midtones_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "shadows_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, ptr, "midtones_start", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "midtones_end", 0, NULL, ICON_NONE);
}
@@ -1988,11 +1988,11 @@ static void node_composit_buts_boxmask(uiLayout *layout, bContext *UNUSED(C), Po
{
uiLayout *row;
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "x", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "y", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -2116,10 +2116,10 @@ static void node_composit_backdrop_ellipsemask(SpaceNode *snode, ImBuf *backdrop
static void node_composit_buts_ellipsemask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "x", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "y", 0, NULL, ICON_NONE);
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -2144,7 +2144,7 @@ static void node_composit_buts_viewer_ex(uiLayout *layout, bContext *UNUSED(C),
uiItemR(layout, ptr, "use_alpha", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "tile_order", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "tile_order") == 0) {
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "center_x", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "center_y", 0, NULL, ICON_NONE);
}
@@ -2185,7 +2185,7 @@ static void node_composit_buts_keyingscreen(uiLayout *layout, bContext *C, Point
RNA_pointer_create(&clip->id, &RNA_MovieTracking, &clip->tracking, &tracking_ptr);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA);
}
}
@@ -2224,7 +2224,7 @@ static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRN
RNA_pointer_create(&clip->id, &RNA_MovieTracking, tracking, &tracking_ptr);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA);
object = BKE_tracking_object_get_named(tracking, data->tracking_object);
@@ -2263,7 +2263,7 @@ static void node_composit_buts_planetrackdeform(uiLayout *layout, bContext *C, P
RNA_pointer_create(&clip->id, &RNA_MovieTracking, tracking, &tracking_ptr);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA);
object = BKE_tracking_object_get_named(tracking, data->tracking_object);
@@ -2517,11 +2517,11 @@ static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), Poin
{
uiLayout *col;
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "offset", UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE);
uiItemR(col, ptr, "offset_frequency", 0, IFACE_("Frequency"), ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "squash", 0, IFACE_("Squash"), ICON_NONE);
uiItemR(col, ptr, "squash_frequency", 0, IFACE_("Frequency"), ICON_NONE);
}
@@ -2536,23 +2536,23 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
RNA_pointer_create(id, &RNA_Texture, tex, &tex_ptr);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
switch (tex->type) {
case TEX_BLEND:
uiItemR(col, &tex_ptr, "progression", 0, "", ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "use_flip_axis", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
break;
case TEX_MARBLE:
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "marble_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "noise_basis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
break;
@@ -2561,9 +2561,9 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
break;
case TEX_STUCCI:
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "stucci_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
break;
@@ -2571,18 +2571,18 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
case TEX_WOOD:
uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
uiItemR(col, &tex_ptr, "wood_type", 0, "", ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "noise_basis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiLayoutSetActive(row, !(ELEM(tex->stype, TEX_BAND, TEX_RING)));
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
break;
case TEX_CLOUDS:
uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "cloud_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- row = uiLayoutRow(col, FALSE);
+ row = uiLayoutRow(col, false);
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(col, &tex_ptr, "noise_depth", UI_ITEM_R_EXPAND, IFACE_("Depth"), ICON_NONE);
break;
@@ -2833,7 +2833,7 @@ static void node_file_output_socket_draw(bContext *C, uiLayout *layout, PointerR
PointerRNA inputptr, imfptr;
int imtype;
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
imfptr = RNA_pointer_get(node_ptr, "format");
imtype = RNA_enum_get(&imfptr, "file_format");
@@ -3414,7 +3414,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
/* new connection */
if (!link->fromsock || !link->tosock) {
th_col1 = TH_ACTIVE;
- do_triple = TRUE;
+ do_triple = true;
}
else {
/* going to give issues once... */
@@ -3435,8 +3435,8 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
if (link->tonode && link->tonode->flag & SELECT)
th_col2 = TH_EDGE_SELECT;
}
- do_shaded = TRUE;
- do_triple = TRUE;
+ do_shaded = true;
+ do_triple = true;
}
else {
th_col1 = TH_REDALERT;
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index 428495542c2..02e6f9b69f3 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -82,7 +82,7 @@ bNode *node_add_node(const bContext *C, const char *idname, int type, float locx
/* generics */
node->locx = locx;
node->locy = locy + 60.0f; /* arbitrary... so its visible, (0,0) is top of node */
- nodeSetSelected(node, TRUE);
+ nodeSetSelected(node, true);
node->locx = locx;
node->locy = locy + 60.0f;
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index 035287c0411..ebff840dc9f 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -87,7 +87,7 @@ static void node_sockets_panel(const bContext *C, Panel *pa)
for (sock = node->inputs.first; sock; sock = sock->next) {
BLI_snprintf(name, sizeof(name), "%s:", sock->name);
- split = uiLayoutSplit(layout, 0.35f, FALSE);
+ split = uiLayoutSplit(layout, 0.35f, false);
uiItemL(split, name, ICON_NONE);
uiTemplateNodeLink(split, ntree, node, sock);
}
@@ -107,20 +107,20 @@ static bool node_tree_find_active_socket(bNodeTree *ntree, bNodeSocket **r_sock,
if (sock->flag & SELECT) {
*r_sock = sock;
*r_in_out = SOCK_IN;
- return TRUE;
+ return true;
}
}
for (sock = ntree->outputs.first; sock; sock = sock->next) {
if (sock->flag & SELECT) {
*r_sock = sock;
*r_in_out = SOCK_OUT;
- return TRUE;
+ return true;
}
}
*r_sock = NULL;
*r_in_out = 0;
- return FALSE;
+ return false;
}
static void node_tree_interface_panel(const bContext *C, Panel *pa)
@@ -140,31 +140,31 @@ static void node_tree_interface_panel(const bContext *C, Panel *pa)
node_tree_find_active_socket(ntree, &sock, &in_out);
RNA_pointer_create((ID *)ntree, &RNA_NodeSocketInterface, sock, &sockptr);
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
- split = uiLayoutRow(row, TRUE);
- col = uiLayoutColumn(split, TRUE);
+ split = uiLayoutRow(row, true);
+ col = uiLayoutColumn(split, true);
uiItemL(col, IFACE_("Inputs:"), ICON_NONE);
uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "inputs", &ptr, "inputs", &ptr, "active_input",
0, 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_IN);
- col = uiLayoutColumn(split, TRUE);
+ col = uiLayoutColumn(split, true);
uiItemL(col, IFACE_("Outputs:"), ICON_NONE);
uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "outputs", &ptr, "outputs", &ptr, "active_output",
0, 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_OUT);
- col = uiLayoutColumn(row, TRUE);
+ col = uiLayoutColumn(row, true);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_move", "", ICON_TRIA_UP, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "direction", 1);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_move", "", ICON_TRIA_DOWN, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "direction", 2);
if (sock) {
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &sockptr, "name", 0, NULL, ICON_NONE);
uiItemO(row, "", ICON_X, "NODE_OT_tree_socket_remove");
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 632bf1d3b14..f3d02c179ff 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -765,7 +765,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
nodeSynchronizeID(node, false);
/* skip if out of view */
- if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == FALSE) {
+ if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == false) {
uiEndBlock(C, node->block);
node->block = NULL;
return;
@@ -1340,7 +1340,7 @@ void drawnodespace(const bContext *C, ARegion *ar)
if (snode->flag & SNODE_SHOW_GPENCIL) {
/* draw grease-pencil ('canvas' strokes) */
- draw_gpencil_view2d(C, TRUE);
+ draw_gpencil_view2d(C, true);
}
}
else {
@@ -1359,7 +1359,7 @@ void drawnodespace(const bContext *C, ARegion *ar)
if (snode->treepath.last) {
if (snode->flag & SNODE_SHOW_GPENCIL) {
/* draw grease-pencil (screen strokes, and also paintbuffer) */
- draw_gpencil_view2d(C, FALSE);
+ draw_gpencil_view2d(C, false);
}
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 3ca87f7cd00..ac0834cd635 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -176,8 +176,8 @@ static void compo_statsdrawjob(void *cjv, char *UNUSED(str))
{
CompoJob *cj = cjv;
- *(cj->do_update) = TRUE;
- cj->need_sync = TRUE;
+ *(cj->do_update) = true;
+ cj->need_sync = true;
}
/* called by compo, wmJob sends notifier */
@@ -185,7 +185,7 @@ static void compo_redrawjob(void *cjv)
{
CompoJob *cj = cjv;
- *(cj->do_update) = TRUE;
+ *(cj->do_update) = true;
}
static void compo_freejob(void *cjv)
@@ -219,7 +219,7 @@ static void compo_updatejob(void *cjv)
/* was used by old compositor system only */
ntreeLocalSync(cj->localtree, cj->ntree);
- cj->need_sync = FALSE;
+ cj->need_sync = false;
}
WM_main_add_notifier(NC_SCENE | ND_COMPO_RESULT, NULL);
@@ -240,7 +240,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update, float *prog
bNodeTree *ntree = cj->localtree;
Scene *scene = cj->scene;
- if (scene->use_nodes == FALSE)
+ if (scene->use_nodes == false)
return;
cj->stop = stop;
@@ -259,7 +259,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update, float *prog
// XXX BIF_store_spare();
/* 1 is do_previews */
- ntreeCompositExecTree(cj->scene, ntree, &cj->scene->r, FALSE, TRUE, &scene->view_settings, &scene->display_settings);
+ ntreeCompositExecTree(cj->scene, ntree, &cj->scene->r, false, true, &scene->view_settings, &scene->display_settings);
ntree->test_break = NULL;
ntree->stats_draw = NULL;
@@ -285,7 +285,7 @@ void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene
}
#ifdef USE_ESC_COMPO
- G.is_break = FALSE;
+ G.is_break = false;
#endif
wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene_owner, "Compositing",
@@ -619,7 +619,7 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
if (node->type != NODE_GROUP) {
const bool was_output = (node->flag & NODE_DO_OUTPUT) != 0;
- int do_update = 0;
+ bool do_update = false;
/* generic node group output: set node as active output */
if (node->type == NODE_GROUP_OUTPUT) {
@@ -1205,9 +1205,9 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
/* has been set during copy above */
newnode = node->new_node;
- nodeSetSelected(node, FALSE);
+ nodeSetSelected(node, false);
node->flag &= ~NODE_ACTIVE;
- nodeSetSelected(newnode, TRUE);
+ nodeSetSelected(newnode, true);
}
/* make sure we don't copy new nodes again! */
@@ -1248,11 +1248,11 @@ bool ED_node_select_check(ListBase *lb)
for (node = lb->first; node; node = node->next) {
if (node->flag & NODE_SELECT) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/* ******************************** */
@@ -2012,15 +2012,15 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
}
/* only warn */
- if (is_clipboard_valid == FALSE) {
+ if (is_clipboard_valid == false) {
BKE_report(op->reports, RPT_WARNING, "Some nodes references could not be restored, will be left empty");
}
/* make sure all clipboard nodes would be valid in the target tree */
- all_nodes_valid = TRUE;
+ all_nodes_valid = true;
for (node = clipboard_nodes_lb->first; node; node = node->next) {
if (!node->typeinfo->poll_instance(node, ntree)) {
- all_nodes_valid = FALSE;
+ all_nodes_valid = false;
BKE_reportf(op->reports, RPT_ERROR, "Cannot add node %s into node tree %s", node->name, ntree->id.name + 2);
}
}
@@ -2048,7 +2048,7 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
id_us_plus(node->id);
/* pasted nodes are selected */
- nodeSetSelected(new_node, TRUE);
+ nodeSetSelected(new_node, true);
}
/* reparent copied nodes */
@@ -2317,10 +2317,10 @@ static int node_shader_script_update_poll(bContext *C)
/* recursively check for script nodes in groups using this text and update */
static int node_shader_script_update_text_recursive(RenderEngine *engine, RenderEngineType *type, bNodeTree *ntree, Text *text)
{
- int found = FALSE;
+ int found = false;
bNode *node;
- ntree->done = TRUE;
+ ntree->done = true;
/* update each script that is using this text datablock */
for (node = ntree->nodes.first; node; node = node->next) {
@@ -2331,7 +2331,7 @@ static int node_shader_script_update_text_recursive(RenderEngine *engine, Render
}
else if (node->type == SH_NODE_SCRIPT && node->id == &text->id) {
type->update_script_node(engine, ntree, node);
- found = TRUE;
+ found = true;
}
}
@@ -2348,7 +2348,7 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op)
bNode *node = NULL;
RenderEngine *engine;
RenderEngineType *type;
- int found = FALSE;
+ int found = false;
/* setup render engine */
type = RE_engines_find(scene->r.engine);
@@ -2369,7 +2369,7 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op)
/* update single node */
type->update_script_node(engine, ntree, node);
- found = TRUE;
+ found = true;
}
else {
/* update all nodes using text datablock */
@@ -2379,7 +2379,7 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op)
/* clear flags for recursion check */
FOREACH_NODETREE(bmain, ntree, id) {
if (ntree->type == NTREE_SHADER)
- ntree->done = FALSE;
+ ntree->done = false;
} FOREACH_NODETREE_END
FOREACH_NODETREE(bmain, ntree, id) {
@@ -2514,5 +2514,5 @@ void NODE_OT_viewer_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c
index 20e6900a268..05348acfae7 100644
--- a/source/blender/editors/space_node/node_group.c
+++ b/source/blender/editors/space_node/node_group.c
@@ -179,7 +179,7 @@ void NODE_OT_group_edit(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "exit", FALSE, "Exit", "");
+ RNA_def_boolean(ot->srna, "exit", false, "Exit", "");
}
/* ******************** Ungroup operator ********************** */
@@ -203,7 +203,7 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
* - ngroup (i.e. the source NodeTree) is left unscathed
* - temp copy. don't change ID usercount
*/
- wgroup = ntreeCopyTree_ex(ngroup, FALSE);
+ wgroup = ntreeCopyTree_ex(ngroup, false);
/* Add the nodes into the ntree */
for (node = wgroup->nodes.first; node; node = nextnode) {
@@ -401,7 +401,7 @@ static int node_group_separate_selected(bNodeTree *ntree, bNodeTree *ngroup, flo
/* deselect all nodes in the target tree */
for (node = ntree->nodes.first; node; node = node->next)
- nodeSetSelected(node, FALSE);
+ nodeSetSelected(node, false);
/* clear new pointers, set in nodeCopyNode */
for (node = ngroup->nodes.first; node; node = node->next)
@@ -415,7 +415,7 @@ static int node_group_separate_selected(bNodeTree *ntree, bNodeTree *ngroup, flo
/* ignore interface nodes */
if (ELEM(node->type, NODE_GROUP_INPUT, NODE_GROUP_OUTPUT)) {
- nodeSetSelected(node, FALSE);
+ nodeSetSelected(node, false);
continue;
}
@@ -684,7 +684,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree,
ListBase anim_basepaths = {NULL, NULL};
float min[2], max[2], center[2];
int totselect;
- int expose_all = FALSE;
+ int expose_all = false;
bNode *input_node, *output_node;
/* XXX rough guess, not nice but we don't have access to UI constants here ... */
@@ -693,7 +693,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree,
/* deselect all nodes in the target tree */
for (node = ngroup->nodes.first; node; node = node->next)
- nodeSetSelected(node, FALSE);
+ nodeSetSelected(node, false);
totselect = node_get_selected_minmax(ntree, gnode, min, max);
add_v2_v2v2(center, min, max);
@@ -701,7 +701,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree,
/* auto-add interface for "solo" nodes */
if (totselect == 1)
- expose_all = TRUE;
+ expose_all = true;
/* move nodes over */
for (node = ntree->nodes.first; node; node = nextn) {
@@ -831,10 +831,10 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree,
if (node_group_make_use_node(node, gnode)) {
for (sock = node->inputs.first; sock; sock = sock->next) {
bNodeSocket *iosock, *input_sock;
- int skip = FALSE;
+ int skip = false;
for (link = ngroup->links.first; link; link = link->next) {
if (link->tosock == sock) {
- skip = TRUE;
+ skip = true;
break;
}
}
@@ -852,10 +852,10 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree,
for (sock = node->outputs.first; sock; sock = sock->next) {
bNodeSocket *iosock, *output_sock;
- int skip = FALSE;
+ int skip = false;
for (link = ngroup->links.first; link; link = link->next)
if (link->fromsock == sock)
- skip = TRUE;
+ skip = true;
if (skip)
continue;
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index dcc72afa362..ac541ef6a28 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -143,7 +143,7 @@ void ED_operatormacros_node(void)
"Move nodes and attach to frame",
OPTYPE_UNDO | OPTYPE_REGISTER);
mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_boolean_set(mot->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(mot->ptr, "release_confirm", true);
WM_operatortype_macro_define(ot, "NODE_OT_attach");
ot = WM_operatortype_append_macro("NODE_OT_detach_translate_attach", "Detach and Move",
@@ -151,7 +151,7 @@ void ED_operatormacros_node(void)
OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "NODE_OT_detach");
mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_boolean_set(mot->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(mot->ptr, "release_confirm", true);
WM_operatortype_macro_define(ot, "NODE_OT_attach");
ot = WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate",
@@ -165,7 +165,7 @@ void ED_operatormacros_node(void)
"Duplicate selected nodes keeping input links and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
- RNA_boolean_set(mot->ptr, "keep_inputs", TRUE);
+ RNA_boolean_set(mot->ptr, "keep_inputs", true);
WM_operatortype_macro_define(ot, "NODE_OT_translate_attach");
ot = WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", "Move a node to detach links",
@@ -222,24 +222,24 @@ void node_keymap(struct wmKeyConfig *keyconf)
* NOTE 3: select op is registered for various combinations of modifier key, so the specialized
* grab operators (unlink, attach, etc.) can work easily on single nodes.
*/
- node_select_keymap(keymap, FALSE);
- node_select_keymap(keymap, TRUE);
+ node_select_keymap(keymap, false);
+ node_select_keymap(keymap, true);
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0);
- RNA_boolean_set(kmi->ptr, "tweak", TRUE);
+ RNA_boolean_set(kmi->ptr, "tweak", true);
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
WM_keymap_add_item(keymap, "NODE_OT_select_circle", CKEY, KM_PRESS, 0, 0);
/* each of these falls through if not handled... */
kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "detach", FALSE);
+ RNA_boolean_set(kmi->ptr, "detach", false);
kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "detach", TRUE);
+ RNA_boolean_set(kmi->ptr, "detach", true);
WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0);
@@ -256,9 +256,9 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_backimage_sample", ACTIONMOUSE, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "replace", FALSE);
+ RNA_boolean_set(kmi->ptr, "replace", false);
kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "replace", TRUE);
+ RNA_boolean_set(kmi->ptr, "replace", true);
WM_keymap_add_menu(keymap, "NODE_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NODE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
@@ -279,7 +279,7 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "tweak", FALSE);
+ RNA_boolean_set(kmi->ptr, "tweak", false);
WM_keymap_add_item(keymap, "NODE_OT_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_delete", DELKEY, KM_PRESS, 0, 0);
@@ -295,9 +295,9 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_select_same_type", GKEY, KM_PRESS, KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "prev", FALSE);
+ RNA_boolean_set(kmi->ptr, "prev", false);
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "prev", TRUE);
+ RNA_boolean_set(kmi->ptr, "prev", true);
WM_keymap_add_item(keymap, "NODE_OT_find_node", FKEY, KM_PRESS, KM_CTRL, 0);
@@ -306,9 +306,9 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_group_ungroup", GKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "NODE_OT_group_separate", PKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "exit", FALSE);
+ RNA_boolean_set(kmi->ptr, "exit", false);
kmi = WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "exit", TRUE);
+ RNA_boolean_set(kmi->ptr, "exit", true);
WM_keymap_add_item(keymap, "NODE_OT_read_renderlayers", RKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "NODE_OT_read_fullsamplelayers", RKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 3e1e605682f..7d9bf4b67f2 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -691,7 +691,7 @@ void NODE_OT_link(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
- RNA_def_boolean(ot->srna, "detach", FALSE, "Detach", "Detach and redirect existing links");
+ RNA_def_boolean(ot->srna, "detach", false, "Detach", "Detach and redirect existing links");
}
/* ********************** Make Link operator ***************** */
@@ -770,7 +770,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
RNA_END;
if (i > 1) {
- int found = FALSE;
+ int found = false;
bNodeLink *link, *next;
ED_preview_kill_jobs(C);
@@ -782,9 +782,9 @@ static int cut_links_exec(bContext *C, wmOperator *op)
if (cut_links_intersect(link, mcoords, i)) {
- if (found == FALSE) {
+ if (found == false) {
ED_preview_kill_jobs(C);
- found = TRUE;
+ found = true;
}
snode_update(snode, link->tonode);
@@ -1057,7 +1057,7 @@ static int node_attach_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent
if (node->flag & NODE_SELECT) {
if (node->parent == NULL) {
/* disallow moving a parent into its child */
- if (nodeAttachNodeCheck(frame, node) == FALSE) {
+ if (nodeAttachNodeCheck(frame, node) == false) {
/* attach all unparented nodes */
nodeAttachNode(node, frame);
}
@@ -1072,7 +1072,7 @@ static int node_attach_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent
if (parent) {
/* disallow moving a parent into its child */
- if (nodeAttachNodeCheck(frame, node) == FALSE) {
+ if (nodeAttachNodeCheck(frame, node) == false) {
nodeDetachNode(node);
nodeAttachNode(node, frame);
}
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 89f07950fe9..d9e1f4fa611 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -141,7 +141,7 @@ void node_deselect_all(SpaceNode *snode)
bNode *node;
for (node = snode->edittree->nodes.first; node; node = node->next)
- nodeSetSelected(node, FALSE);
+ nodeSetSelected(node, false);
}
void node_deselect_all_input_sockets(SpaceNode *snode, const bool deselect_nodes)
@@ -227,12 +227,12 @@ int node_select_same_type(SpaceNode *snode)
if (p->type != nac->type && p->flag & SELECT) {
/* if it's selected but different type, unselect */
redraw = 1;
- nodeSetSelected(p, FALSE);
+ nodeSetSelected(p, false);
}
else if (p->type == nac->type && (!(p->flag & SELECT))) {
/* if it's the same type and is not selected, select! */
redraw = 1;
- nodeSetSelected(p, TRUE);
+ nodeSetSelected(p, true);
}
}
return(redraw);
@@ -274,8 +274,8 @@ int node_select_same_type_np(SpaceNode *snode, int dir)
if (p) {
for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next)
if (tnode != p)
- nodeSetSelected(tnode, FALSE);
- nodeSetSelected(p, TRUE);
+ nodeSetSelected(tnode, false);
+ nodeSetSelected(p, true);
return(1);
}
return(0);
@@ -289,8 +289,8 @@ void node_select_single(bContext *C, bNode *node)
for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next)
if (tnode != node)
- nodeSetSelected(tnode, FALSE);
- nodeSetSelected(node, TRUE);
+ nodeSetSelected(tnode, false);
+ nodeSetSelected(node, true);
ED_node_set_active(bmain, snode->edittree, node);
ED_node_set_active_viewer_key(snode);
@@ -365,7 +365,7 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next) {
nodeSetSelected(tnode, false);
}
- nodeSetSelected(node, TRUE);
+ nodeSetSelected(node, true);
ED_node_set_active(bmain, snode->edittree, node);
selected = 1;
}
@@ -460,7 +460,7 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
nodeSetSelected(node, (gesture_mode == GESTURE_MODAL_SELECT));
}
else if (!extend) {
- nodeSetSelected(node, FALSE);
+ nodeSetSelected(node, false);
}
}
@@ -510,7 +510,7 @@ void NODE_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
RNA_def_boolean(ot->srna, "tweak", 0, "Tweak", "Only activate when mouse is not over a node - useful for tweak gesture");
}
@@ -672,10 +672,10 @@ static int node_select_all_exec(bContext *C, wmOperator *op)
for (node = node_lb->first; node; node = node->next) {
switch (action) {
case SEL_SELECT:
- nodeSetSelected(node, TRUE);
+ nodeSetSelected(node, true);
break;
case SEL_DESELECT:
- nodeSetSelected(node, FALSE);
+ nodeSetSelected(node, false);
break;
case SEL_INVERT:
nodeSetSelected(node, !(node->flag & SELECT));
@@ -726,7 +726,7 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op))
for (node = snode->edittree->nodes.first; node; node = node->next) {
if (node->flag & NODE_TEST)
- nodeSetSelected(node, TRUE);
+ nodeSetSelected(node, true);
}
ED_node_sort(snode->edittree);
@@ -770,7 +770,7 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op))
for (node = snode->edittree->nodes.first; node; node = node->next) {
if (node->flag & NODE_TEST)
- nodeSetSelected(node, TRUE);
+ nodeSetSelected(node, true);
}
ED_node_sort(snode->edittree);
@@ -985,7 +985,7 @@ static uiBlock *node_find_menu(bContext *C, ARegion *ar, void *arg_op)
event.type = EVT_BUT_OPEN;
event.val = KM_PRESS;
event.customdata = but;
- event.customdatafree = FALSE;
+ event.customdatafree = false;
wm_event_add(win, &event);
return block;
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index c75c16e61c5..44639b1295c 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -512,7 +512,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_
bNodeTreeType *ntreetype = arg->ntree->typeinfo;
uiBlockSetCurLayout(block, layout);
- split = uiLayoutSplit(layout, 0.0f, FALSE);
+ split = uiLayoutSplit(layout, 0.0f, false);
arg->bmain = bmain;
arg->scene = scene;
@@ -521,7 +521,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_
if (ntreetype && ntreetype->foreach_nodeclass)
ntreetype->foreach_nodeclass(scene, arg, node_menu_column_foreach_cb);
- column = uiLayoutColumn(split, FALSE);
+ column = uiLayoutColumn(split, false);
uiBlockSetCurLayout(block, column);
if (sock->link) {
@@ -588,9 +588,9 @@ static void ui_node_draw_node(uiLayout *layout, bContext *C, bNodeTree *ntree, b
if (node->typeinfo->draw_buttons) {
if (node->type != NODE_GROUP) {
- split = uiLayoutSplit(layout, 0.35f, FALSE);
- col = uiLayoutColumn(split, FALSE);
- col = uiLayoutColumn(split, FALSE);
+ split = uiLayoutSplit(layout, 0.35f, false);
+ col = uiLayoutColumn(split, false);
+ col = uiLayoutColumn(split, false);
node->typeinfo->draw_buttons(col, C, &nodeptr);
}
@@ -632,9 +632,9 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
BLI_snprintf(label, UI_MAX_NAME_STR, "%s%s:", label, IFACE_(input->name));
/* split in label and value */
- split = uiLayoutSplit(layout, 0.35f, FALSE);
+ split = uiLayoutSplit(layout, 0.35f, false);
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
if (depth > 0) {
uiBlockSetEmboss(block, UI_EMBOSSN);
@@ -657,7 +657,7 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
bt->drawflag = UI_BUT_TEXT_LEFT;
if (dependency_loop) {
- row = uiLayoutRow(split, FALSE);
+ row = uiLayoutRow(split, false);
uiItemL(row, IFACE_("Dependency Loop"), ICON_ERROR);
}
else if (lnode) {
@@ -680,22 +680,22 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
case SOCK_BOOLEAN:
case SOCK_RGBA:
case SOCK_STRING:
- row = uiLayoutRow(split, TRUE);
+ row = uiLayoutRow(split, true);
uiItemR(row, &inputptr, "default_value", 0, "", ICON_NONE);
break;
case SOCK_VECTOR:
- row = uiLayoutRow(split, FALSE);
- col = uiLayoutColumn(row, FALSE);
+ row = uiLayoutRow(split, false);
+ col = uiLayoutColumn(row, false);
uiItemR(col, &inputptr, "default_value", 0, "", ICON_NONE);
break;
default:
- row = uiLayoutRow(split, FALSE);
+ row = uiLayoutRow(split, false);
break;
}
}
else
- row = uiLayoutRow(split, FALSE);
+ row = uiLayoutRow(split, false);
uiTemplateNodeLink(row, ntree, node, input);
}
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index a8ab96067d5..90b9c2071de 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -88,7 +88,7 @@ int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar,
tot++;
if (node->type == NODE_FRAME) {
- has_frame = TRUE;
+ has_frame = true;
}
}
}
@@ -102,7 +102,7 @@ int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar,
/* for single non-frame nodes, don't zoom in, just pan view,
* but do allow zooming out, this allows for big nodes to be zoomed out */
if ((tot == 1) &&
- (has_frame == FALSE) &&
+ (has_frame == false) &&
((oldwidth * oldheight) > (width * height)))
{
/* center, don't zoom */
@@ -411,7 +411,7 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
ImageSampleInfo *info = arg_info;
if (info->draw) {
- ED_image_draw_info(scene, ar, info->color_manage, FALSE, info->channels,
+ ED_image_draw_info(scene, ar, info->color_manage, false, info->channels,
info->x, info->y, info->col, info->colf, info->linearcol,
info->zp, info->zfp);
}
@@ -425,19 +425,19 @@ bool ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], floa
Image *ima;
ImBuf *ibuf;
float fx, fy, bufx, bufy;
- int ret = FALSE;
+ int ret = false;
if (STREQ(snode->tree_idname, ntreeType_Composite->idname) || (snode->flag & SNODE_BACKDRAW) == 0) {
/* use viewer image for color sampling only if we're in compositor tree
* with backdrop enabled
*/
- return FALSE;
+ return false;
}
ima = BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
if (!ibuf) {
- return FALSE;
+ return false;
}
/* map the mouse coords to the backdrop image space */
@@ -458,12 +458,12 @@ bool ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], floa
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
/* IB_PROFILE_NONE is default but infact its linear */
linearrgb_to_srgb_v3_v3(r_col, fp);
- ret = TRUE;
+ ret = true;
}
else if (ibuf->rect) {
cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x);
rgb_uchar_to_float(r_col, cp);
- ret = TRUE;
+ ret = true;
}
}
@@ -531,7 +531,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
copy_v4_v4(info->linearcol, info->colf);
IMB_colormanagement_colorspace_to_scene_linear_v4(info->linearcol, false, ibuf->rect_colorspace);
- info->color_manage = TRUE;
+ info->color_manage = true;
}
if (ibuf->rect_float) {
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
@@ -541,7 +541,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
info->colf[2] = fp[2];
info->colf[3] = fp[3];
- info->color_manage = TRUE;
+ info->color_manage = true;
}
if (ibuf->zbuf) {
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index f7520d12bf6..e9531ea0020 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -828,7 +828,7 @@ void ED_spacetype_node(void)
art->draw = node_main_area_draw;
art->listener = node_region_listener;
art->cursor = node_cursor;
- art->event_cursor = TRUE;
+ art->event_cursor = true;
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_GPENCIL;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 91b8554a789..117730cdb9e 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -1657,7 +1657,7 @@ static int outliner_parenting_poll(bContext *C)
return ELEM4(soops->outlinevis, SO_ALL_SCENES, SO_CUR_SCENE, SO_VISIBLE, SO_GROUPS);
}
- return FALSE;
+ return false;
}
static int parent_clear_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index b9e3942a7ce..d735b5e75cf 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -88,28 +88,28 @@ void outliner_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, 0, 0);
- RNA_boolean_set(kmi->ptr, "recursive", FALSE);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "recursive", false);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "recursive", FALSE);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "recursive", false);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "recursive", TRUE);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "recursive", true);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "recursive", TRUE);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "recursive", true);
+ RNA_boolean_set(kmi->ptr, "extend", true);
WM_keymap_add_item(keymap, "OUTLINER_OT_select_border", BKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "all", FALSE);
+ RNA_boolean_set(kmi->ptr, "all", false);
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "all", TRUE);
+ RNA_boolean_set(kmi->ptr, "all", true);
WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OUTLINER_OT_operation", RIGHTMOUSE, KM_PRESS, 0, 0);
@@ -121,11 +121,11 @@ void outliner_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "OUTLINER_OT_scroll_page", PAGEDOWNKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_scroll_page", PAGEUPKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "up", TRUE);
+ RNA_boolean_set(kmi->ptr, "up", true);
WM_keymap_add_item(keymap, "OUTLINER_OT_show_one_level", PADPLUSKEY, KM_PRESS, 0, 0); /* open */
kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_show_one_level", PADMINUS, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "open", FALSE); /* close */
+ RNA_boolean_set(kmi->ptr, "open", false); /* close */
WM_keymap_verify_item(keymap, "OUTLINER_OT_selected_toggle", AKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "OUTLINER_OT_expanded_toggle", AKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index d5b46655b82..9fa17cd1120 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -618,19 +618,19 @@ static eOLDrawState tree_element_active_ebone(
if (set == OL_SETSEL_NORMAL) {
if (!(ebone->flag & BONE_HIDDEN_A)) {
ED_armature_deselect_all(scene->obedit, 0); // deselect
- tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE);
+ tree_element_active_ebone__sel(C, scene, arm, ebone, true);
status = OL_DRAWSEL_NORMAL;
}
}
else if (set == OL_SETSEL_EXTEND) {
if (!(ebone->flag & BONE_HIDDEN_A)) {
if (!(ebone->flag & BONE_SELECTED)) {
- tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE);
+ tree_element_active_ebone__sel(C, scene, arm, ebone, true);
status = OL_DRAWSEL_NORMAL;
}
else {
/* entirely selected, so de-select */
- tree_element_active_ebone__sel(C, scene, arm, ebone, FALSE);
+ tree_element_active_ebone__sel(C, scene, arm, ebone, false);
status = OL_DRAWSEL_NONE;
}
}
@@ -1117,7 +1117,7 @@ void OUTLINER_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
- WM_operator_properties_gesture_border(ot, FALSE);
+ WM_operator_properties_gesture_border(ot, false);
}
/* ****************************************************** */
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index cdc7178e767..9f31bbb3320 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -419,7 +419,7 @@ static void group_instance_cb(bContext *C, Scene *scene, TreeElement *UNUSED(te)
{
Group *group = (Group *)tselem->id;
- Object *ob = ED_object_add_type(C, OB_EMPTY, scene->cursor, NULL, FALSE, scene->layact);
+ Object *ob = ED_object_add_type(C, OB_EMPTY, scene->cursor, NULL, false, scene->layact);
rename_id(&ob->id, group->id.name + 2);
ob->dup_group = group;
ob->transflag |= OB_DUPLIGROUP;
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 0c8c7a2e12f..721eb626cdf 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1402,7 +1402,7 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)
TreeElement *te, *ten;
TreeStoreElem *tselem;
- /* although we don't have any search string, we return TRUE
+ /* although we don't have any search string, we return true
* since the entire tree is ok then...
*/
if (soops->search_string[0] == 0)
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 1f7415a3a56..eede11cb51c 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -146,7 +146,7 @@ static int outliner_parent_clear_poll(bContext *C, wmDrag *drag, const wmEvent *
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
if (!ELEM4(soops->outlinevis, SO_ALL_SCENES, SO_CUR_SCENE, SO_VISIBLE, SO_GROUPS)) {
- return FALSE;
+ return false;
}
if (drag->type == WM_DRAG_ID) {
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index d6b5bb3e534..c266563cd6f 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -284,7 +284,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op)
seq->flag |= SELECT;
}
- if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (RNA_boolean_get(op->ptr, "overlap") == false) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
@@ -378,7 +378,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op)
seq->flag |= SELECT;
}
- if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (RNA_boolean_get(op->ptr, "overlap") == false) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
@@ -470,7 +470,7 @@ static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op)
seq->flag |= SELECT;
}
- if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (RNA_boolean_get(op->ptr, "overlap") == false) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
@@ -523,7 +523,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
SeqLoadInfo seq_load;
Sequence *seq;
int tot_files;
- const short overlap = RNA_boolean_get(op->ptr, "overlap");
+ const bool overlap = RNA_boolean_get(op->ptr, "overlap");
seq_load_operator_info(&seq_load, op);
@@ -552,7 +552,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
seq = seq_load_func(C, ed->seqbasep, &seq_load);
if (seq) {
- if (overlap == FALSE) {
+ if (overlap == false) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq))
BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
@@ -564,7 +564,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
/* single file */
seq = seq_load_func(C, ed->seqbasep, &seq_load);
if (seq) {
- if (overlap == FALSE) {
+ if (overlap == false) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq))
BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
@@ -630,7 +630,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
WM_operator_properties_filesel(ot, FOLDERFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
- RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie");
+ RNA_def_boolean(ot->srna, "sound", true, "Sound", "Load sound with the movie");
}
/* add sound operator */
@@ -679,7 +679,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE,
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
- RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
+ RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory");
}
/* add image operator */
@@ -736,7 +736,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
/* last active name */
BLI_strncpy(ed->act_imagedir, strip->dir, sizeof(ed->act_imagedir));
- if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (RNA_boolean_get(op->ptr, "overlap") == false) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq))
BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
@@ -867,7 +867,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
}
}
- if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (RNA_boolean_get(op->ptr, "overlap") == false) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index ddade51e5ad..952be939025 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -493,7 +493,7 @@ int ED_space_sequencer_maskedit_poll(bContext *C)
return ED_space_sequencer_check_show_maskedit(sseq, scene);
}
- return FALSE;
+ return false;
}
/* are we displaying the seq output (not channels or histogram)*/
@@ -1246,7 +1246,7 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, false);
Sequence *seq;
- int selected;
+ bool selected;
selected = !RNA_boolean_get(op->ptr, "unselected");
@@ -1297,7 +1297,7 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, false);
Sequence *seq;
- int selected;
+ bool selected;
selected = !RNA_boolean_get(op->ptr, "unselected");
@@ -2572,8 +2572,8 @@ void SEQUENCER_OT_strip_jump(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "next", TRUE, "Next Strip", "");
- RNA_def_boolean(ot->srna, "center", TRUE, "Use strip center", "");
+ RNA_def_boolean(ot->srna, "next", true, "Next Strip", "");
+ RNA_def_boolean(ot->srna, "center", true, "Use strip center", "");
}
static void swap_sequence(Scene *scene, Sequence *seqa, Sequence *seqb)
@@ -3009,7 +3009,7 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
ot->flag = 0;
/* rna */
- WM_operator_properties_gesture_border(ot, FALSE);
+ WM_operator_properties_gesture_border(ot, false);
}
/* rebuild_proxy operator */
@@ -3245,10 +3245,10 @@ static int sequencer_change_path_invoke(bContext *C, wmOperator *op, const wmEve
/* set default display depending on seq type */
if (seq->type == SEQ_TYPE_IMAGE) {
- RNA_boolean_set(op->ptr, "filter_movie", FALSE);
+ RNA_boolean_set(op->ptr, "filter_movie", false);
}
else {
- RNA_boolean_set(op->ptr, "filter_image", FALSE);
+ RNA_boolean_set(op->ptr, "filter_image", false);
}
WM_event_add_fileselect(C, op);
diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c
index d3057645972..ff40bf1e638 100644
--- a/source/blender/editors/space_sequencer/sequencer_modifier.c
+++ b/source/blender/editors/space_sequencer/sequencer_modifier.c
@@ -74,7 +74,7 @@ static int strip_modifier_active_poll(bContext *C)
return BKE_sequence_supports_modifiers(seq);
}
- return FALSE;
+ return false;
}
static int strip_modifier_add_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index 184e686678a..f022e78a0ad 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -160,14 +160,14 @@ void sequencer_keymap(wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "type", SEQ_CUT_HARD);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0);
@@ -176,7 +176,7 @@ void sequencer_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "adjust_length", TRUE);
+ RNA_boolean_set(kmi->ptr, "adjust_length", true);
WM_keymap_add_item(keymap, "SEQUENCER_OT_offset_clear", OKEY, KM_PRESS, KM_ALT, 0);
@@ -204,25 +204,25 @@ void sequencer_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEUPKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "next", TRUE);
- RNA_boolean_set(kmi->ptr, "center", FALSE);
+ RNA_boolean_set(kmi->ptr, "next", true);
+ RNA_boolean_set(kmi->ptr, "center", false);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEDOWNKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "next", FALSE);
- RNA_boolean_set(kmi->ptr, "center", FALSE);
+ RNA_boolean_set(kmi->ptr, "next", false);
+ RNA_boolean_set(kmi->ptr, "center", false);
/* alt for center */
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEUPKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "next", TRUE);
- RNA_boolean_set(kmi->ptr, "center", TRUE);
+ RNA_boolean_set(kmi->ptr, "next", true);
+ RNA_boolean_set(kmi->ptr, "center", true);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEDOWNKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "next", FALSE);
- RNA_boolean_set(kmi->ptr, "center", TRUE);
+ RNA_boolean_set(kmi->ptr, "next", false);
+ RNA_boolean_set(kmi->ptr, "center", true);
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", LEFTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_LEFT);
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_RIGHT);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "all", FALSE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "all", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "all", false);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "all", true);
WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_insert", EQUALKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
@@ -242,76 +242,76 @@ void sequencer_keymap(wmKeyConfig *keyconf)
/* Mouse selection, a bit verbose :/ */
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_handle", FALSE);
- RNA_boolean_set(kmi->ptr, "left_right", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_time", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "linked_handle", false);
+ RNA_boolean_set(kmi->ptr, "left_right", false);
+ RNA_boolean_set(kmi->ptr, "linked_time", false);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_handle", FALSE);
- RNA_boolean_set(kmi->ptr, "left_right", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_time", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "linked_handle", false);
+ RNA_boolean_set(kmi->ptr, "left_right", false);
+ RNA_boolean_set(kmi->ptr, "linked_time", false);
/* 2.4x method, now use Alt for handles and select the side based on which handle was selected */
#if 0
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "linked_left", TRUE);
+ RNA_boolean_set(kmi->ptr, "linked_left", true);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "linked_right", TRUE);
+ RNA_boolean_set(kmi->ptr, "linked_right", true);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "linked_left", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_right", TRUE);
+ RNA_boolean_set(kmi->ptr, "linked_left", true);
+ RNA_boolean_set(kmi->ptr, "linked_right", true);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_left", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_right", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "linked_left", true);
+ RNA_boolean_set(kmi->ptr, "linked_right", true);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_left", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "linked_left", true);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_right", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "linked_right", true);
#endif
/* 2.5 method, Alt and use selected handle */
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_handle", TRUE);
- RNA_boolean_set(kmi->ptr, "left_right", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_time", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "linked_handle", true);
+ RNA_boolean_set(kmi->ptr, "left_right", false);
+ RNA_boolean_set(kmi->ptr, "linked_time", false);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_handle", TRUE);
- RNA_boolean_set(kmi->ptr, "left_right", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_time", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "linked_handle", true);
+ RNA_boolean_set(kmi->ptr, "left_right", false);
+ RNA_boolean_set(kmi->ptr, "linked_time", false);
/* match action editor */
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_handle", FALSE);
- RNA_boolean_set(kmi->ptr, "left_right", TRUE); /* grr, these conflict - only use left_right if not over an active seq */
- RNA_boolean_set(kmi->ptr, "linked_time", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "linked_handle", false);
+ RNA_boolean_set(kmi->ptr, "left_right", true); /* grr, these conflict - only use left_right if not over an active seq */
+ RNA_boolean_set(kmi->ptr, "linked_time", true);
/* adjusted since 2.4 */
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "linked_handle", FALSE);
- RNA_boolean_set(kmi->ptr, "left_right", FALSE);
- RNA_boolean_set(kmi->ptr, "linked_time", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "linked_handle", false);
+ RNA_boolean_set(kmi->ptr, "left_right", false);
+ RNA_boolean_set(kmi->ptr, "linked_time", true);
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index cc97f7108ce..9edf8433fca 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -723,11 +723,11 @@ void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot)
static int sequencer_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
- int selected;
+ bool selected;
- selected = 1;
+ selected = true;
while (selected) {
- selected = select_more_less_seq__internal(scene, 1, 1);
+ selected = select_more_less_seq__internal(scene, true, true);
}
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene);
@@ -907,7 +907,7 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* rna */
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
/* ****** Selected Grouped ****** */
@@ -1105,7 +1105,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq)
}
SEQ_END;
- actseq->tmp = SET_INT_IN_POINTER(TRUE);
+ actseq->tmp = SET_INT_IN_POINTER(true);
for (BKE_sequence_iterator_begin(ed, &iter, true); iter.valid; BKE_sequence_iterator_next(&iter)) {
seq = iter.seq;
@@ -1129,7 +1129,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq)
if (enddisp < seq->enddisp) enddisp = seq->enddisp;
if (machine < seq->machine) machine = seq->machine;
- seq->tmp = SET_INT_IN_POINTER(TRUE);
+ seq->tmp = SET_INT_IN_POINTER(true);
seq->flag |= SELECT;
changed = true;
@@ -1210,7 +1210,7 @@ void SEQUENCER_OT_select_grouped(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
ot->prop = RNA_def_enum(ot->srna, "type", sequencer_prop_select_grouped_types, 0, "Type", "");
}
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c
index 74fd22b4226..cad25663609 100644
--- a/source/blender/editors/space_sequencer/sequencer_view.c
+++ b/source/blender/editors/space_sequencer/sequencer_view.c
@@ -82,7 +82,7 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
ImageSampleInfo *info = arg_info;
if (info->draw) {
- ED_image_draw_info(scene, ar, info->color_manage, FALSE, info->channels,
+ ED_image_draw_info(scene, ar, info->color_manage, false, info->channels,
info->x, info->y, info->colp, info->colfp,
info->linearcol, NULL, NULL);
}
@@ -140,7 +140,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
copy_v4_v4(info->linearcol, info->colf);
IMB_colormanagement_colorspace_to_scene_linear_v4(info->linearcol, false, ibuf->rect_colorspace);
- info->color_manage = TRUE;
+ info->color_manage = true;
}
if (ibuf->rect_float) {
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
@@ -155,7 +155,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
copy_v4_v4(info->linearcol, info->colf);
BKE_sequencer_pixel_from_sequencer_space_v4(scene, info->linearcol);
- info->color_manage = TRUE;
+ info->color_manage = true;
}
}
else {
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 03d74d1952f..f24d853369c 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -458,17 +458,17 @@ static int sequencer_context(const bContext *C, const char *member, bContextData
if (CTX_data_dir(member)) {
CTX_data_dir_set(result, sequencer_context_dir);
- return TRUE;
+ return true;
}
else if (CTX_data_equals(member, "edit_mask")) {
Mask *mask = BKE_sequencer_mask_get(scene);
if (mask) {
CTX_data_id_pointer_set(result, &mask->id);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 875496d5edf..6e49569314f 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -275,19 +275,19 @@ static void text_keymap(struct wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", FALSE);
+ RNA_boolean_set(kmi->ptr, "reverse", false);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", true);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", FALSE);
+ RNA_boolean_set(kmi->ptr, "reverse", false);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", true);
WM_keymap_add_item(keymap, "TEXT_OT_new", NKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_open", OKEY, KM_PRESS, KM_ALT, 0);
@@ -309,7 +309,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
if (U.uiflag & USER_MMB_PASTE) { // XXX not dynamic
kmi = WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "selection", TRUE);
+ RNA_boolean_set(kmi->ptr, "selection", true);
}
WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_CTRL, 0);
@@ -368,7 +368,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "TEXT_OT_selection_set", EVT_TWEAK_L, KM_ANY, 0, 0);
WM_keymap_add_item(keymap, "TEXT_OT_cursor_set", LEFTMOUSE, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "TEXT_OT_selection_set", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "select", TRUE);
+ RNA_boolean_set(kmi->ptr, "select", true);
RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELUPMOUSE, KM_PRESS, 0, 0)->ptr, "lines", -1);
RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELDOWNMOUSE, KM_PRESS, 0, 0)->ptr, "lines", 1);
@@ -572,7 +572,7 @@ void ED_spacetype_text(void)
art->init = text_main_area_init;
art->draw = text_main_area_draw;
art->cursor = text_cursor;
- art->event_cursor = TRUE;
+ art->event_cursor = true;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index 692cefd3ee9..d3b494631bb 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -280,7 +280,7 @@ static int text_autocomplete_invoke(bContext *C, wmOperator *op, const wmEvent *
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
- st->doplugins = TRUE;
+ st->doplugins = true;
op->customdata = text_autocomplete_build(text);
if (texttool_suggest_first()) {
@@ -524,7 +524,7 @@ static void text_autocomplete_free(bContext *C, wmOperator *op)
/* other stuff */
{
SpaceText *st = CTX_wm_space_text(C);
- st->doplugins = FALSE;
+ st->doplugins = false;
texttool_text_clear();
}
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index f25e09a905d..6a98fd802f9 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1340,7 +1340,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
lineno = 0;
for (i = 0; i < st->top && tmp; i++) {
if (st->showsyntax && !tmp->format)
- tft->format_line(st, tmp, 0);
+ tft->format_line(st, tmp, false);
if (st->wordwrap) {
int lines = text_get_visible_lines_no(st, lineno);
@@ -1389,7 +1389,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
for (i = 0; y > 0 && i < st->viewlines && tmp; i++, tmp = tmp->next) {
if (st->showsyntax && !tmp->format)
- tft->format_line(st, tmp, 0);
+ tft->format_line(st, tmp, false);
if (st->showlinenrs && !wrap_skip) {
/* draw line number */
diff --git a/source/blender/editors/space_text/text_format.h b/source/blender/editors/space_text/text_format.h
index 808311cbb62..daed3b3e447 100644
--- a/source/blender/editors/space_text/text_format.h
+++ b/source/blender/editors/space_text/text_format.h
@@ -77,7 +77,7 @@ typedef struct TextFormatType {
*
* See: FMT_TYPE_ enums below
*/
- void (*format_line)(SpaceText *st, TextLine *line, int do_next);
+ void (*format_line)(SpaceText *st, TextLine *line, const bool do_next);
const char **ext; /* NULL terminated extensions */
} TextFormatType;
diff --git a/source/blender/editors/space_text/text_format_lua.c b/source/blender/editors/space_text/text_format_lua.c
index d9d2a9213a3..1e842729ab3 100644
--- a/source/blender/editors/space_text/text_format_lua.c
+++ b/source/blender/editors/space_text/text_format_lua.c
@@ -150,7 +150,7 @@ static char txtfmt_lua_format_identifier(const char *str)
return fmt;
}
-static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const int do_next)
+static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const bool do_next)
{
FlattenString fs;
const char *str;
diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c
index 2e863f2a569..97dc1be3b9a 100644
--- a/source/blender/editors/space_text/text_format_osl.c
+++ b/source/blender/editors/space_text/text_format_osl.c
@@ -174,7 +174,7 @@ static char txtfmt_osl_format_identifier(const char *str)
return fmt;
}
-static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const int do_next)
+static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_next)
{
FlattenString fs;
const char *str;
diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c
index 50425e258e3..2f6962f0493 100644
--- a/source/blender/editors/space_text/text_format_py.c
+++ b/source/blender/editors/space_text/text_format_py.c
@@ -157,7 +157,7 @@ static char txtfmt_py_format_identifier(const char *str)
return fmt;
}
-static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_next)
+static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const bool do_next)
{
FlattenString fs;
const char *str;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 43776f28c62..b45838e0bac 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -1571,7 +1571,7 @@ static int cursor_skip_find_line(SpaceText *st, ARegion *ar,
return 1;
}
-static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1643,7 +1643,7 @@ static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
if (!sel) txt_pop_sel(text);
}
-static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1713,7 +1713,7 @@ static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
if (!sel) txt_pop_sel(text);
}
-static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_up(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1746,7 +1746,7 @@ static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
if (!sel) txt_pop_sel(text);
}
-static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_down(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1783,7 +1783,7 @@ static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
*
* This is to replace screen_skip for PageUp/Down operations.
*/
-static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, int sel)
+static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, const bool sel)
{
TextLine **linep;
int *charp;
@@ -1814,7 +1814,7 @@ static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, int s
if (!sel) txt_pop_sel(text);
}
-static int text_move_cursor(bContext *C, int type, int select)
+static int text_move_cursor(bContext *C, int type, bool select)
{
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
@@ -2465,7 +2465,7 @@ static TextLine *get_first_visible_line(SpaceText *st, ARegion *ar, int *y)
return linep;
}
-static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, int y, int sel)
+static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, int y, const bool sel)
{
Text *text = st->text;
int max = wrap_width(st, ar); /* column */
@@ -2582,7 +2582,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
}
}
-static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
+static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, const bool sel)
{
Text *text = st->text;
text_update_character_width(st);
@@ -2845,7 +2845,7 @@ static int text_insert_exec(bContext *C, wmOperator *op)
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
char *str;
- int done = FALSE;
+ int done = false;
size_t i = 0;
unsigned int code;
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index f86f7134b31..eba4451502e 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -368,7 +368,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
time_draw_idblock_keyframes(v2d, (ID *)ob, onlysel);
}
else {
- short active_done = FALSE;
+ bool active_done = false;
/* draw keyframes from all selected objects */
CTX_DATA_BEGIN (C, Object *, obsel, selected_objects)
@@ -378,7 +378,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
/* if this object is the active one, set flag so that we don't draw again */
if (obsel == ob)
- active_done = TRUE;
+ active_done = true;
}
CTX_DATA_END;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index daa6ea0a95a..a8abd08a4cc 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1517,7 +1517,7 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D
}
for (track = tracksbase->first; track; track = track->next) {
- int selected = TRACK_SELECTED(track);
+ bool selected = TRACK_SELECTED(track);
if (draw_selected && !selected)
continue;
@@ -1915,7 +1915,7 @@ static void ensure_curve_cache(Scene *scene, Object *object)
case OB_CURVE:
case OB_SURF:
case OB_FONT:
- BKE_displist_make_curveTypes(scene, object, FALSE);
+ BKE_displist_make_curveTypes(scene, object, false);
break;
case OB_MBALL:
BKE_displist_make_mball(G.main->eval_ctx, scene, object);
@@ -4129,7 +4129,7 @@ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3
break;
}
- return FALSE;
+ return false;
}
static bool drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
const char dt, const short dflag, const unsigned char ob_wire_col[4])
@@ -4396,7 +4396,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
float cfra;
float ma_col[3] = {0.0f, 0.0f, 0.0f};
int a, totpart, totpoint = 0, totve = 0, drawn, draw_as, totchild = 0;
- int select = ob->flag & SELECT, create_cdata = 0, need_v = 0;
+ bool select = (ob->flag & SELECT) != 0, create_cdata = false, need_v = false;
GLint polygonmode[2];
char numstr[32];
unsigned char tcol[4] = {0, 0, 0, 255};
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index e49e135ec6e..187919e9ff3 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -318,7 +318,7 @@ static SpaceLink *view3d_new(const bContext *C)
v3d->lay = v3d->layact = scene->lay;
v3d->camera = scene->camera;
}
- v3d->scenelock = TRUE;
+ v3d->scenelock = true;
v3d->grid = 1.0f;
v3d->gridlines = 16;
v3d->gridsubdiv = 10;
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 5ba2ed8c89c..d61017fb80e 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -930,7 +930,7 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *split, *colsub;
- split = uiLayoutSplit(layout, 0.8f, FALSE);
+ split = uiLayoutSplit(layout, 0.8f, false);
if (ptr->type == &RNA_PoseBone) {
PointerRNA boneptr;
@@ -940,19 +940,19 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
bone = boneptr.data;
uiLayoutSetActive(split, !(bone->parent && bone->flag & BONE_CONNECTED));
}
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemR(colsub, ptr, "location", 0, NULL, ICON_NONE);
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemL(colsub, "", ICON_NONE);
uiItemR(colsub, ptr, "lock_location", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
- split = uiLayoutSplit(layout, 0.8f, FALSE);
+ split = uiLayoutSplit(layout, 0.8f, false);
switch (RNA_enum_get(ptr, "rotation_mode")) {
case ROT_MODE_QUAT: /* quaternion */
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemR(colsub, ptr, "rotation_quaternion", 0, IFACE_("Rotation"), ICON_NONE);
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, IFACE_("4L"), ICON_NONE);
if (RNA_boolean_get(ptr, "lock_rotations_4d"))
uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE + UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
@@ -961,9 +961,9 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
break;
case ROT_MODE_AXISANGLE: /* axis angle */
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemR(colsub, ptr, "rotation_axis_angle", 0, IFACE_("Rotation"), ICON_NONE);
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, IFACE_("4L"), ICON_NONE);
if (RNA_boolean_get(ptr, "lock_rotations_4d"))
uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
@@ -972,19 +972,19 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
break;
default: /* euler rotations */
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemR(colsub, ptr, "rotation_euler", 0, IFACE_("Rotation"), ICON_NONE);
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemL(colsub, "", ICON_NONE);
uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
break;
}
uiItemR(layout, ptr, "rotation_mode", 0, "", ICON_NONE);
- split = uiLayoutSplit(layout, 0.8f, FALSE);
- colsub = uiLayoutColumn(split, TRUE);
+ split = uiLayoutSplit(layout, 0.8f, false);
+ colsub = uiLayoutColumn(split, true);
uiItemR(colsub, ptr, "scale", 0, NULL, ICON_NONE);
- colsub = uiLayoutColumn(split, TRUE);
+ colsub = uiLayoutColumn(split, true);
uiItemL(colsub, "", ICON_NONE);
uiItemR(colsub, ptr, "lock_scale", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
@@ -1013,7 +1013,7 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob)
RNA_pointer_create(&ob->id, &RNA_PoseBone, pchan, &pchanptr);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
/* XXX: RNA buts show data in native types (i.e. quats, 4-component axis/angle, etc.)
* but old-school UI shows in eulers always. Do we want to be able to still display in Eulers?
@@ -1037,7 +1037,7 @@ static void v3d_editarmature_buts(uiLayout *layout, Object *ob)
RNA_pointer_create(&arm->id, &RNA_EditBone, ebone, &eboneptr);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, &eboneptr, "head", 0, NULL, ICON_NONE);
if (ebone->parent && ebone->flag & BONE_CONNECTED) {
PointerRNA parptr = RNA_pointer_get(&eboneptr, "parent");
@@ -1067,7 +1067,7 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob)
RNA_pointer_create(&mball->id, &RNA_MetaElement, mball->lastelem, &ptr);
- col = uiLayoutColumn(layout, FALSE);
+ col = uiLayoutColumn(layout, false);
uiItemR(col, &ptr, "co", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "radius", 0, NULL, ICON_NONE);
@@ -1075,7 +1075,7 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob)
uiItemR(col, &ptr, "type", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
switch (RNA_enum_get(&ptr, "type")) {
case MB_BALL:
break;
@@ -1144,7 +1144,7 @@ static void view3d_panel_transform(const bContext *C, Panel *pa)
block = uiLayoutGetBlock(pa->layout);
uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
- col = uiLayoutColumn(pa->layout, FALSE);
+ col = uiLayoutColumn(pa->layout, false);
if (ob == obedit) {
if (ob->type == OB_ARMATURE) {
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 09c120477b7..9b455748713 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1313,7 +1313,7 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
}
#endif
- if (v3d->drawtype > OB_WIRE) v3d->zbuf = TRUE;
+ if (v3d->drawtype > OB_WIRE) v3d->zbuf = true;
/* dithering and AA break color coding, so disable */
glDisable(GL_DITHER);
@@ -1378,7 +1378,7 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
v3d->flag &= ~V3D_INVALID_BACKBUF;
G.f &= ~G_BACKBUFSEL;
- v3d->zbuf = FALSE;
+ v3d->zbuf = false;
glDisable(GL_DEPTH_TEST);
glEnable(GL_DITHER);
if (multisample_enabled)
@@ -1877,7 +1877,7 @@ static void view3d_draw_transp(Scene *scene, ARegion *ar, View3D *v3d)
View3DAfter *v3da, *next;
glDepthMask(0);
- v3d->transp = TRUE;
+ v3d->transp = true;
for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) {
next = v3da->next;
@@ -1885,7 +1885,7 @@ static void view3d_draw_transp(Scene *scene, ARegion *ar, View3D *v3d)
BLI_remlink(&v3d->afterdraw_transp, v3da);
MEM_freeN(v3da);
}
- v3d->transp = FALSE;
+ v3d->transp = false;
glDepthMask(1);
@@ -1899,14 +1899,14 @@ static void view3d_draw_xray(Scene *scene, ARegion *ar, View3D *v3d, int clear)
if (clear && v3d->zbuf)
glClear(GL_DEPTH_BUFFER_BIT);
- v3d->xray = TRUE;
+ v3d->xray = true;
for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) {
next = v3da->next;
draw_object(scene, ar, v3d, v3da->base, v3da->dflag);
BLI_remlink(&v3d->afterdraw_xray, v3da);
MEM_freeN(v3da);
}
- v3d->xray = FALSE;
+ v3d->xray = false;
}
@@ -1918,8 +1918,8 @@ static void view3d_draw_xraytransp(Scene *scene, ARegion *ar, View3D *v3d, int c
if (clear && v3d->zbuf)
glClear(GL_DEPTH_BUFFER_BIT);
- v3d->xray = TRUE;
- v3d->transp = TRUE;
+ v3d->xray = true;
+ v3d->transp = true;
for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) {
next = v3da->next;
@@ -1928,8 +1928,8 @@ static void view3d_draw_xraytransp(Scene *scene, ARegion *ar, View3D *v3d, int c
MEM_freeN(v3da);
}
- v3d->transp = FALSE;
- v3d->xray = FALSE;
+ v3d->transp = false;
+ v3d->xray = false;
}
@@ -2230,7 +2230,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d)
glLoadMatrixf(rv3d->viewmat);
- v3d->zbuf = TRUE;
+ v3d->zbuf = true;
glEnable(GL_DEPTH_TEST);
if (v3d->flag2 & V3D_SHOW_GPENCIL) {
@@ -2272,7 +2272,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
ED_view3d_clipping_set(rv3d);
}
- v3d->zbuf = TRUE;
+ v3d->zbuf = true;
glEnable(GL_DEPTH_TEST);
/* draw set first */
@@ -2310,7 +2310,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
View3DAfter *v3da, *next;
int mask_orig;
- v3d->xray = TRUE;
+ v3d->xray = true;
/* transp materials can change the depth mask, see #21388 */
glGetIntegerv(GL_DEPTH_WRITEMASK, &mask_orig);
@@ -2326,8 +2326,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
}
/* draw 3 passes, transp/xray/xraytransp */
- v3d->xray = FALSE;
- v3d->transp = TRUE;
+ v3d->xray = false;
+ v3d->transp = true;
for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) {
next = v3da->next;
draw_object(scene, ar, v3d, v3da->base, 0);
@@ -2335,8 +2335,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
MEM_freeN(v3da);
}
- v3d->xray = TRUE;
- v3d->transp = FALSE;
+ v3d->xray = true;
+ v3d->transp = false;
for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) {
next = v3da->next;
draw_object(scene, ar, v3d, v3da->base, 0);
@@ -2344,8 +2344,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
MEM_freeN(v3da);
}
- v3d->xray = TRUE;
- v3d->transp = TRUE;
+ v3d->xray = true;
+ v3d->transp = true;
for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) {
next = v3da->next;
draw_object(scene, ar, v3d, v3da->base, 0);
@@ -2354,8 +2354,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
}
- v3d->xray = FALSE;
- v3d->transp = FALSE;
+ v3d->xray = false;
+ v3d->transp = false;
glDepthMask(mask_orig);
}
@@ -2626,11 +2626,11 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
/* set zbuffer */
if (v3d->drawtype > OB_WIRE) {
- v3d->zbuf = TRUE;
+ v3d->zbuf = true;
glEnable(GL_DEPTH_TEST);
}
else
- v3d->zbuf = FALSE;
+ v3d->zbuf = false;
/* important to do before clipping */
if (do_bgpic) {
@@ -2687,7 +2687,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
/* cleanup */
if (v3d->zbuf) {
- v3d->zbuf = FALSE;
+ v3d->zbuf = false;
glDisable(GL_DEPTH_TEST);
}
@@ -3255,11 +3255,11 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
/* set zbuffer after we draw clipping region */
if (v3d->drawtype > OB_WIRE) {
- v3d->zbuf = TRUE;
+ v3d->zbuf = true;
glEnable(GL_DEPTH_TEST);
}
else
- v3d->zbuf = FALSE;
+ v3d->zbuf = false;
/* enables anti-aliasing for 3D view drawing */
if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) {
@@ -3380,7 +3380,7 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
if (v3d->zbuf) {
- v3d->zbuf = FALSE;
+ v3d->zbuf = false;
glDisable(GL_DEPTH_TEST);
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 204054b24cd..6c04f836349 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -197,7 +197,7 @@ static int view3d_layers_invoke(bContext *C, wmOperator *op, const wmEvent *even
return OPERATOR_PASS_THROUGH;
if (event->shift)
- RNA_boolean_set(op->ptr, "extend", TRUE);
+ RNA_boolean_set(op->ptr, "extend", true);
else
RNA_boolean_set(op->ptr, "extend", false);
@@ -274,7 +274,7 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
BMEditMesh *em = BKE_editmesh_from_object(obedit);
uiLayout *row;
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
block = uiLayoutGetBlock(row);
uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL,
0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0,
@@ -322,7 +322,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
modeselect = OB_MODE_OBJECT;
}
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
{
EnumPropertyItem *item = object_mode_items;
const char *name = "";
@@ -347,7 +347,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
if (ob->mode & OB_MODE_WEIGHT_PAINT) {
/* Only for Weight Paint. makes no sense in other paint modes. */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
@@ -361,14 +361,14 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
else {
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
}
}
else {
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
/* pose/object only however we want to allow in weight paint mode too
@@ -380,7 +380,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
}
/* Transform widget / manipulators */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
if (v3d->twflag & V3D_USE_MANIPULATOR) {
uiItemR(row, &v3dptr, "transform_manipulators", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index c087fe72fdb..3383ac3660a 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -207,7 +207,7 @@ void view3d_keymap(wmKeyConfig *keyconf)
keymap = WM_keymap_find(keyconf, "3D View", SPACE_VIEW3D, 0);
kmi = WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, KM_ANY, 0);
- RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(kmi->ptr, "release_confirm", true);
/*
* Doesn't work with KM_SHIFT, have to use KM_ANY and filter in invoke
* */
@@ -220,9 +220,9 @@ void view3d_keymap(wmKeyConfig *keyconf)
WM_keymap_verify_item(keymap, "VIEW3D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_dolly", MIDDLEMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", PADPERIOD, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "use_all_regions", TRUE);
+ RNA_boolean_set(kmi->ptr, "use_all_regions", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "use_all_regions", FALSE);
+ RNA_boolean_set(kmi->ptr, "use_all_regions", false);
WM_keymap_verify_item(keymap, "VIEW3D_OT_view_lock_to_active", PADPERIOD, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_view_lock_clear", PADPERIOD, KM_PRESS, KM_ALT, 0);
@@ -265,12 +265,12 @@ void view3d_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "VIEW3D_OT_view_center_pick", FKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "center", FALSE); /* only without camera view */
+ RNA_boolean_set(kmi->ptr, "center", false); /* only without camera view */
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "use_all_regions", TRUE);
- RNA_boolean_set(kmi->ptr, "center", FALSE); /* only without camera view */
+ RNA_boolean_set(kmi->ptr, "use_all_regions", true);
+ RNA_boolean_set(kmi->ptr, "center", false); /* only without camera view */
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", CKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "center", TRUE);
+ RNA_boolean_set(kmi->ptr, "center", true);
/* numpad view hotkeys*/
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD0, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_CAMERA);
@@ -309,22 +309,22 @@ void view3d_keymap(wmKeyConfig *keyconf)
/* active aligned, replaces '*' key in 2.4x */
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_FRONT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_RIGHT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_TOP);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BACK);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_LEFT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BOTTOM);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
WM_keymap_add_item(keymap, "VIEW3D_OT_localview", PADSLASHKEY, KM_PRESS, 0, 0);
@@ -336,7 +336,7 @@ void view3d_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_pan", NDOF_MOTION, 0, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_all", NDOF_MOTION, 0, KM_CTRL | KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", NDOF_BUTTON_FIT, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "use_all_regions", FALSE);
+ RNA_boolean_set(kmi->ptr, "use_all_regions", false);
RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", NDOF_BUTTON_ROLL_CCW, KM_PRESS, 0, 0)->ptr, "angle", M_PI / -2);
RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", NDOF_BUTTON_ROLL_CW, KM_PRESS, 0, 0)->ptr, "angle", M_PI / 2);
@@ -351,13 +351,13 @@ void view3d_keymap(wmKeyConfig *keyconf)
/* 3D mouse align */
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_FRONT, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_FRONT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_RIGHT, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_RIGHT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_TOP, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_TOP);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "align_active", true);
/* NDOF: end */
@@ -393,78 +393,78 @@ void view3d_keymap(wmKeyConfig *keyconf)
/* selection*/
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", FALSE);
- RNA_boolean_set(kmi->ptr, "center", FALSE);
- RNA_boolean_set(kmi->ptr, "object", FALSE);
- RNA_boolean_set(kmi->ptr, "enumerate", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", false);
+ RNA_boolean_set(kmi->ptr, "center", false);
+ RNA_boolean_set(kmi->ptr, "object", false);
+ RNA_boolean_set(kmi->ptr, "enumerate", false);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
- RNA_boolean_set(kmi->ptr, "center", FALSE);
- RNA_boolean_set(kmi->ptr, "object", FALSE);
- RNA_boolean_set(kmi->ptr, "enumerate", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
+ RNA_boolean_set(kmi->ptr, "center", false);
+ RNA_boolean_set(kmi->ptr, "object", false);
+ RNA_boolean_set(kmi->ptr, "enumerate", false);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", FALSE);
- RNA_boolean_set(kmi->ptr, "center", TRUE);
- RNA_boolean_set(kmi->ptr, "object", TRUE); /* use Ctrl+Select for 2 purposes */
- RNA_boolean_set(kmi->ptr, "enumerate", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", false);
+ RNA_boolean_set(kmi->ptr, "center", true);
+ RNA_boolean_set(kmi->ptr, "object", true); /* use Ctrl+Select for 2 purposes */
+ RNA_boolean_set(kmi->ptr, "enumerate", false);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", FALSE);
- RNA_boolean_set(kmi->ptr, "center", FALSE);
- RNA_boolean_set(kmi->ptr, "object", FALSE);
- RNA_boolean_set(kmi->ptr, "enumerate", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", false);
+ RNA_boolean_set(kmi->ptr, "center", false);
+ RNA_boolean_set(kmi->ptr, "object", false);
+ RNA_boolean_set(kmi->ptr, "enumerate", true);
/* selection key-combinations */
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
- RNA_boolean_set(kmi->ptr, "center", TRUE);
- RNA_boolean_set(kmi->ptr, "object", FALSE);
- RNA_boolean_set(kmi->ptr, "enumerate", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
+ RNA_boolean_set(kmi->ptr, "center", true);
+ RNA_boolean_set(kmi->ptr, "object", false);
+ RNA_boolean_set(kmi->ptr, "enumerate", false);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", FALSE);
- RNA_boolean_set(kmi->ptr, "center", TRUE);
- RNA_boolean_set(kmi->ptr, "object", FALSE);
- RNA_boolean_set(kmi->ptr, "enumerate", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", false);
+ RNA_boolean_set(kmi->ptr, "center", true);
+ RNA_boolean_set(kmi->ptr, "object", false);
+ RNA_boolean_set(kmi->ptr, "enumerate", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
- RNA_boolean_set(kmi->ptr, "center", FALSE);
- RNA_boolean_set(kmi->ptr, "object", FALSE);
- RNA_boolean_set(kmi->ptr, "enumerate", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
+ RNA_boolean_set(kmi->ptr, "center", false);
+ RNA_boolean_set(kmi->ptr, "object", false);
+ RNA_boolean_set(kmi->ptr, "enumerate", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
- RNA_boolean_set(kmi->ptr, "toggle", TRUE);
- RNA_boolean_set(kmi->ptr, "center", TRUE);
- RNA_boolean_set(kmi->ptr, "object", FALSE);
- RNA_boolean_set(kmi->ptr, "enumerate", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ RNA_boolean_set(kmi->ptr, "toggle", true);
+ RNA_boolean_set(kmi->ptr, "center", true);
+ RNA_boolean_set(kmi->ptr, "object", false);
+ RNA_boolean_set(kmi->ptr, "enumerate", true);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_clip_border", BKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_render_border", BKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "camera_only", TRUE);
+ RNA_boolean_set(kmi->ptr, "camera_only", true);
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_render_border", BKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "camera_only", FALSE);
+ RNA_boolean_set(kmi->ptr, "camera_only", false);
WM_keymap_add_item(keymap, "VIEW3D_OT_clear_render_border", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index bdb203ab003..8946559bca8 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -117,7 +117,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
uiBlock *block = uiLayoutGetBlock(pa->layout);
if (!WM_operator_check_ui_enabled(C, op->type->name))
- uiLayoutSetEnabled(pa->layout, FALSE);
+ uiLayoutSetEnabled(pa->layout, false);
/* note, blockfunc is a default but->func, use Handle func to allow button callbacks too */
uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, op);
@@ -199,7 +199,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase)
event.type = EVT_BUT_OPEN;
event.val = KM_PRESS;
event.customdata = but;
- event.customdatafree = FALSE;
+ event.customdatafree = false;
wm_event_add(win, &event);
return block;
@@ -221,12 +221,12 @@ static void view3d_panel_tool_shelf(const bContext *C, Panel *pa)
for (ct = st->toolshelf.first; ct; ct = ct->next) {
if (0 == strncmp(context, ct->context, OP_MAX_TYPENAME)) {
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
uiItemFullO(col, ct->opname, NULL, ICON_NONE, NULL, WM_OP_INVOKE_REGION_WIN, 0);
}
}
}
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
uiDefBlockBut(uiLayoutGetBlock(pa->layout), tool_search_menu, &st->toolshelf, "Add Tool", 0, 0, UI_UNIT_X, UI_UNIT_Y, "Add Tool in shelf, gets saved in files");
}
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index fa3e511f945..fdfce062adc 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -981,7 +981,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b
mul_m4_m4m4(vc->rv3d->persmat, vc->rv3d->winmat, vc->rv3d->viewmat);
if (v3d->drawtype > OB_WIRE) {
- v3d->zbuf = TRUE;
+ v3d->zbuf = true;
glEnable(GL_DEPTH_TEST);
}
@@ -1006,7 +1006,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b
else {
Base *base;
- v3d->xray = TRUE; /* otherwise it postpones drawing */
+ v3d->xray = true; /* otherwise it postpones drawing */
for (base = scene->base.first; base; base = base->next) {
if (base->lay & v3d->lay) {
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e1c240f72d0..13f030a3650 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1519,7 +1519,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], float cent2d[2])
{
TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data");
- int success;
+ bool success;
t->state = TRANS_RUNNING;
@@ -1538,10 +1538,10 @@ int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], float
t->around = centerMode; // override userdefined mode
if (t->total == 0) {
- success = FALSE;
+ success = false;
}
else {
- success = TRUE;
+ success = true;
calculateCenter(t);
@@ -2584,7 +2584,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
bConstraintTypeInfo *cti = BKE_get_constraint_typeinfo(CONSTRAINT_TYPE_ROTLIMIT);
bConstraintOb cob;
bConstraint *con;
- int do_limit = FALSE;
+ int do_limit = false;
/* Evaluate valid constraints */
for (con = td->con; con; con = con->next) {
@@ -2605,9 +2605,9 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
continue;
/* only do conversion if necessary, to preserve quats and eulers */
- if (do_limit == FALSE) {
+ if (do_limit == false) {
constraintob_from_transdata(&cob, td);
- do_limit = TRUE;
+ do_limit = true;
}
/* do space conversions */
@@ -4571,7 +4571,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td;
float ratio;
- int i, initial_feather = FALSE;
+ int i, initial_feather = false;
char str[MAX_INFO_LEN];
ratio = t->values[0];
@@ -4593,7 +4593,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
/* detect if no points have feather yet */
if (ratio > 1.0f) {
- initial_feather = TRUE;
+ initial_feather = true;
for (td = t->data, i = 0; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -4603,7 +4603,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
continue;
if (td->ival >= 0.001f)
- initial_feather = FALSE;
+ initial_feather = false;
}
}
@@ -5357,7 +5357,7 @@ static bool createEdgeSlideVerts(TransInfo *t)
sld->is_proportional = true;
sld->curr_sv_index = 0;
- sld->flipped_vtx = FALSE;
+ sld->flipped_vtx = false;
if (!rv3d) {
/* ok, let's try to survive this */
@@ -6003,7 +6003,7 @@ static eRedrawFlag handleEventEdgeSlide(struct TransInfo *t, const struct wmEven
case FKEY:
{
if (event->val == KM_PRESS) {
- if (sld->is_proportional == FALSE) {
+ if (sld->is_proportional == false) {
sld->flipped_vtx = !sld->flipped_vtx;
}
return TREDRAW_HARD;
@@ -6039,7 +6039,7 @@ static void drawEdgeSlide(const struct bContext *C, TransInfo *t)
if (t->mode == TFM_EDGE_SLIDE) {
EdgeSlideData *sld = (EdgeSlideData *)t->customData;
/* Non-Prop mode */
- if (sld && sld->is_proportional == FALSE) {
+ if (sld && sld->is_proportional == false) {
View3D *v3d = CTX_wm_view3d(C);
float co_a[3], co_b[3], co_mark[3];
TransDataEdgeSlideVert *curr_sv = &sld->sv[sld->curr_sv_index];
@@ -6120,7 +6120,7 @@ static int doEdgeSlide(TransInfo *t, float perc)
sld->perc = perc;
sv = svlist;
- if (sld->is_proportional == TRUE) {
+ if (sld->is_proportional == true) {
for (i = 0; i < sld->totsv; i++, sv++) {
float vec[3];
if (perc > 0.0f) {
@@ -6630,7 +6630,7 @@ static void drawVertSlide(const struct bContext *C, TransInfo *t)
glPointSize(ctrl_size);
bglBegin(GL_POINTS);
- bglVertex3fv((sld->flipped_vtx && sld->is_proportional == FALSE) ?
+ bglVertex3fv((sld->flipped_vtx && sld->is_proportional == false) ?
curr_sv->co_link_orig_3d[curr_sv->co_link_curr] :
curr_sv->co_orig_3d);
bglEnd();
@@ -6655,7 +6655,7 @@ static int doVertSlide(TransInfo *t, float perc)
sld->perc = perc;
sv = svlist;
- if (sld->is_proportional == TRUE) {
+ if (sld->is_proportional == true) {
for (i = 0; i < sld->totsv; i++, sv++) {
interp_v3_v3v3(sv->v->co, sv->co_orig_3d, sv->co_link_orig_3d[sv->co_link_curr], perc);
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index c81637cc827..4dd7f3c3fdf 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -3188,11 +3188,11 @@ static void posttrans_action_clean(bAnimContext *ac, bAction *act)
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
- posttrans_fcurve_clean(ale->key_data, FALSE); /* only use handles in graph editor */
+ posttrans_fcurve_clean(ale->key_data, false); /* only use handles in graph editor */
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else
- posttrans_fcurve_clean(ale->key_data, FALSE); /* only use handles in graph editor */
+ posttrans_fcurve_clean(ale->key_data, false); /* only use handles in graph editor */
}
/* free temp data */
@@ -4170,7 +4170,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
int right = BKE_sequence_tx_get_final_right(seq, true);
if (seq->depth == 0 && ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK))) {
- *recursive = FALSE;
+ *recursive = false;
*count = 0;
*flag = 0;
}
@@ -4178,16 +4178,16 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* for meta's we only ever need to extend their children, no matter what depth
* just check the meta's are in the bounds */
- if (t->frame_side == 'R' && right <= cfra) *recursive = FALSE;
- else if (t->frame_side == 'L' && left >= cfra) *recursive = FALSE;
- else *recursive = TRUE;
+ if (t->frame_side == 'R' && right <= cfra) *recursive = false;
+ else if (t->frame_side == 'L' && left >= cfra) *recursive = false;
+ else *recursive = true;
*count = 1;
*flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL);
}
else {
- *recursive = FALSE; /* not a meta, so no thinking here */
+ *recursive = false; /* not a meta, so no thinking here */
*count = 1; /* unless its set to 0, extend will never set 2 handles at once */
*flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL);
@@ -4215,7 +4215,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* Non nested strips (resect selection and handles) */
if ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK)) {
- *recursive = FALSE;
+ *recursive = false;
*count = 0;
*flag = 0;
}
@@ -4233,10 +4233,10 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
if ((seq->type == SEQ_TYPE_META) && ((seq->flag & (SEQ_LEFTSEL | SEQ_RIGHTSEL)) == 0)) {
/* if any handles are selected, don't recurse */
- *recursive = TRUE;
+ *recursive = true;
}
else {
- *recursive = FALSE;
+ *recursive = false;
}
}
}
@@ -4255,12 +4255,12 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
* BKE_sequence_calc() will update its settings when run on the toplevel meta */
*flag = 0;
*count = 0;
- *recursive = TRUE;
+ *recursive = true;
}
else {
*flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL);
*count = 1; /* ignore the selection for nested */
- *recursive = FALSE;
+ *recursive = false;
}
#endif
}
@@ -4732,7 +4732,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob,
}
/* update object's loc/rot to get current rigid body transform */
mat4_to_loc_rot_size(ob->loc, rot, scale, ob->obmat);
- BKE_object_mat3_to_rot(ob, rot, FALSE);
+ BKE_object_mat3_to_rot(ob, rot, false);
}
}
@@ -5053,29 +5053,29 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *ob,
/* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */
if (tmode == TFM_TRANSLATION) {
- do_loc = TRUE;
+ do_loc = true;
}
else if (tmode == TFM_ROTATION) {
if (v3d->around == V3D_ACTIVE) {
if (ob != OBACT)
- do_loc = TRUE;
+ do_loc = true;
}
else if (v3d->around == V3D_CURSOR)
- do_loc = TRUE;
+ do_loc = true;
if ((v3d->flag & V3D_ALIGN) == 0)
- do_rot = TRUE;
+ do_rot = true;
}
else if (tmode == TFM_RESIZE) {
if (v3d->around == V3D_ACTIVE) {
if (ob != OBACT)
- do_loc = TRUE;
+ do_loc = true;
}
else if (v3d->around == V3D_CURSOR)
- do_loc = TRUE;
+ do_loc = true;
if ((v3d->flag & V3D_ALIGN) == 0)
- do_scale = TRUE;
+ do_scale = true;
}
/* insert keyframes for the affected sets of channels using the builtin KeyingSets found */
@@ -5186,28 +5186,28 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
}
/* only insert keyframe if needed? */
else if (IS_AUTOKEY_FLAG(scene, INSERTNEEDED)) {
- short do_loc = FALSE, do_rot = FALSE, do_scale = FALSE;
+ bool do_loc = false, do_rot = false, do_scale = false;
/* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */
if (tmode == TFM_TRANSLATION) {
if (targetless_ik)
- do_rot = TRUE;
+ do_rot = true;
else
- do_loc = TRUE;
+ do_loc = true;
}
else if (tmode == TFM_ROTATION) {
if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE))
- do_loc = TRUE;
+ do_loc = true;
if ((v3d->flag & V3D_ALIGN) == 0)
- do_rot = TRUE;
+ do_rot = true;
}
else if (tmode == TFM_RESIZE) {
if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE))
- do_loc = TRUE;
+ do_loc = true;
if ((v3d->flag & V3D_ALIGN) == 0)
- do_scale = TRUE;
+ do_scale = true;
}
if (do_loc) {
@@ -5336,7 +5336,7 @@ static void special_aftertrans_update__mask(bContext *C, TransInfo *t)
static void special_aftertrans_update__node(bContext *UNUSED(C), TransInfo *t)
{
- int canceled = (t->state == TRANS_CANCEL);
+ const bool canceled = (t->state == TRANS_CANCEL);
if (canceled && t->remove_on_cancel) {
/* remove selected nodes on cancel */
@@ -5396,8 +5396,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
{
Object *ob;
// short redrawipo=0, resetslowpar=1;
- int canceled = (t->state == TRANS_CANCEL);
- short duplicate = (t->mode == TFM_TIME_DUPLICATE);
+ const bool canceled = (t->state == TRANS_CANCEL);
+ const bool duplicate = (t->mode == TFM_TIME_DUPLICATE);
/* early out when nothing happened */
if (t->total == 0 || t->mode == TFM_DUMMY)
@@ -5413,7 +5413,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* handle multires re-projection, done
* on transform completion since it's
* really slow -joeedh */
- projectEdgeSlideData(t, TRUE);
+ projectEdgeSlideData(t, true);
/* free temporary faces to avoid automerging and deleting
* during cleanup - psy-fi */
@@ -5429,7 +5429,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
EdgeSlideData *sld = t->customData;
sld->perc = 0.0;
- projectEdgeSlideData(t, FALSE);
+ projectEdgeSlideData(t, false);
}
}
}
@@ -5515,11 +5515,11 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
{
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
- posttrans_fcurve_clean(fcu, FALSE); /* only use handles in graph editor */
+ posttrans_fcurve_clean(fcu, false); /* only use handles in graph editor */
ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1);
}
else
- posttrans_fcurve_clean(fcu, FALSE); /* only use handles in graph editor */
+ posttrans_fcurve_clean(fcu, false); /* only use handles in graph editor */
}
}
@@ -5967,10 +5967,10 @@ static bool is_node_parent_select(bNode *node)
{
while ((node = node->parent)) {
if (node->flag & NODE_TRANSFORM) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
static void createTransNodeData(bContext *UNUSED(C), TransInfo *t)
@@ -5992,7 +5992,7 @@ static void createTransNodeData(bContext *UNUSED(C), TransInfo *t)
/* set transform flags on nodes */
for (node = snode->edittree->nodes.first; node; node = node->next) {
- if (node->flag & NODE_SELECT && is_node_parent_select(node) == FALSE) {
+ if (node->flag & NODE_SELECT && is_node_parent_select(node) == false) {
node->flag |= NODE_TRANSFORM;
t->total++;
}
@@ -6601,7 +6601,7 @@ static void MaskHandleToTransData(MaskSplinePoint *point, eMaskWhichHandle which
tdm->point = point;
copy_m3_m3(tdm->vec, bezt->vec);
- tdm->is_handle = TRUE;
+ tdm->is_handle = true;
copy_m3_m3(tdm->parent_matrix, parent_matrix);
copy_m3_m3(tdm->parent_inverse_matrix, parent_inverse_matrix);
@@ -6958,7 +6958,7 @@ void createTransData(bContext *C, TransInfo *t)
if (t->data && (t->flag & T_PROP_EDIT)) {
sort_trans_data(t); // makes selected become first in array
- set_prop_dist(t, TRUE);
+ set_prop_dist(t, true);
sort_trans_data_dist(t);
}
}
@@ -7014,7 +7014,7 @@ void createTransData(bContext *C, TransInfo *t)
if (t->data && (t->flag & T_PROP_EDIT)) {
sort_trans_data(t); // makes selected become first in array
- set_prop_dist(t, TRUE);
+ set_prop_dist(t, true);
sort_trans_data_dist(t);
}
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 845e3cfe349..2fa0b6b320f 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -372,7 +372,7 @@ int calc_manipulator_stats(const bContext *C)
totsel++;
}
if ((ebo->flag & BONE_ROOTSEL) ||
- ((ebo->flag & BONE_TIPSEL) == FALSE)) /* ensure we get at least one point */
+ ((ebo->flag & BONE_TIPSEL) == false)) /* ensure we get at least one point */
{
calc_tw_center(scene, ebo->head);
totsel++;
@@ -505,7 +505,7 @@ int calc_manipulator_stats(const bContext *C)
else if (ob && (ob->mode & OB_MODE_POSE)) {
bPoseChannel *pchan;
int mode = TFM_ROTATION; // mislead counting bones... bah. We don't know the manipulator mode, could be mixed
- int ok = FALSE;
+ int ok = false;
if ((ob->lay & v3d->lay) == 0) return 0;
@@ -515,7 +515,7 @@ int calc_manipulator_stats(const bContext *C)
if (bone) {
stats_pose(scene, rv3d, pchan);
totsel = 1;
- ok = TRUE;
+ ok = true;
}
}
else {
@@ -529,7 +529,7 @@ int calc_manipulator_stats(const bContext *C)
stats_pose(scene, rv3d, pchan);
}
}
- ok = TRUE;
+ ok = true;
}
}
@@ -709,9 +709,9 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
float cos_theta, sin_theta;
float cos_theta1, sin_theta1;
float ring_delta, side_delta;
- int i, j, do_caps = TRUE;
+ int i, j, do_caps = true;
- if (start == 0 && end == nrings) do_caps = FALSE;
+ if (start == 0 && end == nrings) do_caps = false;
ring_delta = 2.0f * (float)M_PI / (float)nrings;
side_delta = 2.0f * (float)M_PI / (float)nsides;
@@ -1835,7 +1835,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op)
}
RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
WM_operator_name_call(C, "TRANSFORM_OT_translate", WM_OP_INVOKE_DEFAULT, op->ptr);
- //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_translate", 0), event, op->ptr, NULL, FALSE);
+ //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_translate", 0), event, op->ptr, NULL, false);
}
else if (drawflags & MAN_SCALE_C) {
switch (drawflags) {
@@ -1866,7 +1866,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op)
}
RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
WM_operator_name_call(C, "TRANSFORM_OT_resize", WM_OP_INVOKE_DEFAULT, op->ptr);
- //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_resize", 0), event, op->ptr, NULL, FALSE);
+ //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_resize", 0), event, op->ptr, NULL, false);
}
else if (drawflags == MAN_ROT_T) { /* trackball need special case, init is different */
/* Do not pass op->ptr!!! trackball has no "constraint" properties!
@@ -1877,7 +1877,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op)
WM_operator_properties_create_ptr(&props_ptr, ot);
RNA_boolean_set(&props_ptr, "release_confirm", RNA_boolean_get(op->ptr, "release_confirm"));
WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, &props_ptr);
- //wm_operator_invoke(C, WM_operatortype_find(ot->idname, 0), event, NULL, NULL, FALSE);
+ //wm_operator_invoke(C, WM_operatortype_find(ot->idname, 0), event, NULL, NULL, false);
WM_operator_properties_free(&props_ptr);
}
else if (drawflags & MAN_ROT_C) {
@@ -1894,7 +1894,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op)
}
RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis);
WM_operator_name_call(C, "TRANSFORM_OT_rotate", WM_OP_INVOKE_DEFAULT, op->ptr);
- //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_rotate", 0), event, op->ptr, NULL, FALSE);
+ //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_rotate", 0), event, op->ptr, NULL, false);
}
}
/* after transform, restore drawflags */
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 3f53ee796a0..d8c5339c14f 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -283,10 +283,10 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot)
ot->poll = ED_operator_areaactive;
RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the new custom orientation");
- RNA_def_boolean(ot->srna, "use_view", FALSE, "Use View",
+ RNA_def_boolean(ot->srna, "use_view", false, "Use View",
"Use the current view instead of the active object to create the new orientation");
- RNA_def_boolean(ot->srna, "use", FALSE, "Use after creation", "Select orientation after its creation");
- RNA_def_boolean(ot->srna, "overwrite", FALSE, "Overwrite previous",
+ RNA_def_boolean(ot->srna, "use", false, "Use after creation", "Select orientation after its creation");
+ RNA_def_boolean(ot->srna, "overwrite", false, "Overwrite previous",
"Overwrite previously created orientation with same name");
}
@@ -991,7 +991,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
WM_keymap_add_item(keymap, "TRANSFORM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_create_orientation", SPACEKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "use", TRUE);
+ RNA_boolean_set(kmi->ptr, "use", true);
WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0);
@@ -1003,10 +1003,10 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
kmi = WM_keymap_add_item(keymap, OP_TRANSLATION, TKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "texture_space", TRUE);
+ RNA_boolean_set(kmi->ptr, "texture_space", true);
kmi = WM_keymap_add_item(keymap, OP_RESIZE, TKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "texture_space", TRUE);
+ RNA_boolean_set(kmi->ptr, "texture_space", true);
WM_keymap_add_item(keymap, OP_SKIN_RESIZE, AKEY, KM_PRESS, KM_CTRL, 0);
@@ -1060,11 +1060,11 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
* in that case the secondary regular operators are called with same keymap.
*/
kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", GKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(kmi->ptr, "release_confirm", true);
kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", EVT_TWEAK_A, KM_ANY, 0, 0);
- RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(kmi->ptr, "release_confirm", true);
kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", EVT_TWEAK_S, KM_ANY, 0, 0);
- RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
+ RNA_boolean_set(kmi->ptr, "release_confirm", true);
WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 5d415d73be1..1338a34749a 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -858,12 +858,12 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
bArmature *arm = ob->data;
bPoseChannel *pchan;
float imat[3][3], mat[3][3];
- int ok = FALSE;
+ int ok = false;
if (activeOnly && (pchan = BKE_pose_channel_active(ob))) {
add_v3_v3(normal, pchan->pose_mat[2]);
add_v3_v3(plane, pchan->pose_mat[1]);
- ok = TRUE;
+ ok = true;
}
else {
int totsel;
@@ -877,7 +877,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
add_v3_v3(plane, pchan->pose_mat[1]);
}
}
- ok = TRUE;
+ ok = true;
}
}
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 246094a337a..887cc430f69 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -163,7 +163,7 @@ void ED_editors_flush_edits(const bContext *C, bool for_render)
else {
/* Set reorder=false so that saving the file doesn't reorder
* the BMesh's elements */
- sculptsession_bm_to_me(obact, FALSE);
+ sculptsession_bm_to_me(obact, false);
}
}
}
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index caa5e7659f8..9be0d68e573 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -212,9 +212,9 @@ static void undo_clean_stack(bContext *C)
if (uel->type == obedit->type) {
if (strcmp(uel->id.name, obedit->id.name) == 0) {
if (uel->validate_undo == NULL)
- is_valid = TRUE;
+ is_valid = true;
else if (uel->validate_undo(uel->undodata, editdata))
- is_valid = TRUE;
+ is_valid = true;
}
}
if (is_valid)
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 7aa5c7ee766..434f1e30188 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -482,7 +482,7 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem)
EnumPropertyItem item_tmp = {0}, *item = NULL;
int active, i = 0;
- while (TRUE) {
+ while (true) {
const char *name = NULL;
if (undosys == UNDOSYSTEM_PARTICLE) {
@@ -531,13 +531,13 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
if (totitem > 0) {
uiPopupMenu *pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE);
uiLayout *layout = uiPupMenuLayout(pup);
- uiLayout *split = uiLayoutSplit(layout, 0.0f, FALSE);
+ uiLayout *split = uiLayoutSplit(layout, 0.0f, false);
uiLayout *column = NULL;
int i, c;
for (c = 0, i = totitem - 1; i >= 0; i--, c++) {
if ( (c % 20) == 0)
- column = uiLayoutColumn(split, FALSE);
+ column = uiLayoutColumn(split, false);
if (item[i].identifier)
uiItemIntO(column, item[i].name, item[i].icon, op->type->idname, "item", item[i].value);
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 62a3b138632..7735c0b1b51 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -467,9 +467,9 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
const int cd_poly_tex_offset = CustomData_get_offset(&bm->pdata, CD_MTEXPOLY);
- activetf = EDBM_mtexpoly_active_get(em, &efa_act, FALSE, FALSE); /* will be set to NULL if hidden */
+ activetf = EDBM_mtexpoly_active_get(em, &efa_act, false, false); /* will be set to NULL if hidden */
#ifndef USE_EDBM_LOOPTRIS
- activef = BM_mesh_active_face_get(bm, FALSE, FALSE);
+ activef = BM_mesh_active_face_get(bm, false, false);
#endif
ts = scene->toolsettings;
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 8fc3e7952ca..f5dcac7e062 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -147,14 +147,14 @@ bool ED_object_get_active_image(Object *ob, int mat_nr,
if (r_ima) *r_ima = (Image *)node->id;
if (r_iuser) *r_iuser = NULL;
if (r_node) *r_node = node;
- return TRUE;
+ return true;
}
if (r_ima) *r_ima = NULL;
if (r_iuser) *r_iuser = NULL;
if (r_node) *r_node = node;
- return FALSE;
+ return false;
}
void ED_object_assign_active_image(Main *bmain, Object *ob, int mat_nr, Image *ima)
@@ -389,7 +389,7 @@ bool uvedit_face_select_enable(Scene *scene, BMEditMesh *em, BMFace *efa, const
ToolSettings *ts = scene->toolsettings;
if (ts->uv_flag & UV_SYNC_SELECTION) {
- BM_face_select_set(em->bm, efa, TRUE);
+ BM_face_select_set(em->bm, efa, true);
if (do_history) {
BM_select_history_store(em->bm, (BMElem *)efa);
}
@@ -416,7 +416,7 @@ bool uvedit_face_select_disable(Scene *scene, BMEditMesh *em, BMFace *efa,
ToolSettings *ts = scene->toolsettings;
if (ts->uv_flag & UV_SYNC_SELECTION) {
- BM_face_select_set(em->bm, efa, FALSE);
+ BM_face_select_set(em->bm, efa, false);
}
else {
BMLoop *l;
@@ -481,12 +481,12 @@ void uvedit_edge_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l, const bo
if (ts->uv_flag & UV_SYNC_SELECTION) {
if (ts->selectmode & SCE_SELECT_FACE)
- BM_face_select_set(em->bm, l->f, TRUE);
+ BM_face_select_set(em->bm, l->f, true);
else if (ts->selectmode & SCE_SELECT_EDGE)
- BM_edge_select_set(em->bm, l->e, TRUE);
+ BM_edge_select_set(em->bm, l->e, true);
else {
- BM_vert_select_set(em->bm, l->e->v1, TRUE);
- BM_vert_select_set(em->bm, l->e->v2, TRUE);
+ BM_vert_select_set(em->bm, l->e->v1, true);
+ BM_vert_select_set(em->bm, l->e->v2, true);
}
if (do_history) {
@@ -512,12 +512,12 @@ void uvedit_edge_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l,
if (ts->uv_flag & UV_SYNC_SELECTION) {
if (ts->selectmode & SCE_SELECT_FACE)
- BM_face_select_set(em->bm, l->f, FALSE);
+ BM_face_select_set(em->bm, l->f, false);
else if (ts->selectmode & SCE_SELECT_EDGE)
- BM_edge_select_set(em->bm, l->e, FALSE);
+ BM_edge_select_set(em->bm, l->e, false);
else {
- BM_vert_select_set(em->bm, l->e->v1, FALSE);
- BM_vert_select_set(em->bm, l->e->v2, FALSE);
+ BM_vert_select_set(em->bm, l->e->v1, false);
+ BM_vert_select_set(em->bm, l->e->v2, false);
}
}
else {
@@ -566,9 +566,9 @@ void uvedit_uv_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l,
if (ts->uv_flag & UV_SYNC_SELECTION) {
if (ts->selectmode & SCE_SELECT_FACE)
- BM_face_select_set(em->bm, l->f, TRUE);
+ BM_face_select_set(em->bm, l->f, true);
else
- BM_vert_select_set(em->bm, l->v, TRUE);
+ BM_vert_select_set(em->bm, l->v, true);
if (do_history) {
BM_select_history_remove(em->bm, (BMElem *)l->v);
@@ -587,9 +587,9 @@ void uvedit_uv_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l,
if (ts->uv_flag & UV_SYNC_SELECTION) {
if (ts->selectmode & SCE_SELECT_FACE)
- BM_face_select_set(em->bm, l->f, FALSE);
+ BM_face_select_set(em->bm, l->f, false);
else
- BM_vert_select_set(em->bm, l->v, FALSE);
+ BM_vert_select_set(em->bm, l->v, false);
}
else {
MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
@@ -1016,7 +1016,7 @@ static int uv_select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestH
uv_select_all_perform(scene, ima, em, SEL_DESELECT);
}
- BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, FALSE);
+ BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, false);
/* set flags for first face and verts */
iterv_curr = uv_select_edgeloop_vertex_map_get(vmap, hit->efa, hit->l);
@@ -1708,7 +1708,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
scene = CTX_data_scene(C);
ima = CTX_data_edit_image(C);
- if (use_unselected == FALSE) {
+ if (use_unselected == false) {
UVvert *vert_arr = NULL;
BLI_array_declare(vert_arr);
MLoopUV **loop_arr = NULL;
@@ -2158,7 +2158,7 @@ static int uv_mouse_select(bContext *C, const float co[2], bool extend, bool loo
/* de-selecting an edge may deselect a face too - validate */
if (sync) {
- if (select == FALSE) {
+ if (select == false) {
BM_select_history_validate(em->bm);
}
}
@@ -2488,10 +2488,10 @@ static int uv_select_split_exec(bContext *C, wmOperator *op)
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
if (luv->flag & MLOOPUV_VERTSEL) {
- is_sel = TRUE;
+ is_sel = true;
}
else {
- is_unsel = TRUE;
+ is_unsel = true;
}
/* we have mixed selection, bail out */
@@ -2538,7 +2538,7 @@ static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short s
/* bmesh API handles flushing but not on de-select */
if (ts->uv_flag & UV_SYNC_SELECTION) {
if (ts->selectmode != SCE_SELECT_FACE) {
- if (select == FALSE) {
+ if (select == false) {
EDBM_deselect_flush(em);
}
else {
@@ -2546,7 +2546,7 @@ static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short s
}
}
- if (select == FALSE) {
+ if (select == false) {
BM_select_history_validate(em->bm);
}
}
@@ -2906,7 +2906,7 @@ static void UV_OT_select_border(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only");
- WM_operator_properties_gesture_border(ot, TRUE);
+ WM_operator_properties_gesture_border(ot, true);
}
/* ******************** circle select operator **************** */
@@ -3629,7 +3629,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
if (em->selectmode == SCE_SELECT_FACE) {
/* check that every UV is selected */
if (bm_face_is_all_uv_sel(efa, true, cd_loop_uv_offset) == !swap) {
- BM_face_select_set(em->bm, efa, FALSE);
+ BM_face_select_set(em->bm, efa, false);
}
uvedit_face_select_disable(scene, em, efa, cd_loop_uv_offset);
}
@@ -3638,7 +3638,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
if (UV_SEL_TEST(luv, !swap)) {
- BM_vert_select_set(em->bm, l->v, FALSE);
+ BM_vert_select_set(em->bm, l->v, false);
}
}
}
@@ -3648,7 +3648,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
else if (em->selectmode == SCE_SELECT_FACE) {
/* check if a UV is de-selected */
if (bm_face_is_all_uv_sel(efa, false, cd_loop_uv_offset) != !swap) {
- BM_face_select_set(em->bm, efa, FALSE);
+ BM_face_select_set(em->bm, efa, false);
uvedit_face_select_disable(scene, em, efa, cd_loop_uv_offset);
}
}
@@ -3656,7 +3656,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
if (UV_SEL_TEST(luv, !swap)) {
- BM_vert_select_set(em->bm, l->v, FALSE);
+ BM_vert_select_set(em->bm, l->v, false);
if (!swap) luv->flag &= ~MLOOPUV_VERTSEL;
}
}
@@ -3729,7 +3729,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op))
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
luv->flag |= MLOOPUV_VERTSEL;
}
- /* BM_face_select_set(em->bm, efa, TRUE); */
+ /* BM_face_select_set(em->bm, efa, true); */
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
}
@@ -3750,7 +3750,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op))
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
luv->flag |= MLOOPUV_VERTSEL;
}
- /* BM_face_select_set(em->bm, efa, TRUE); */
+ /* BM_face_select_set(em->bm, efa, true); */
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
}
@@ -3766,7 +3766,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op))
luv->flag |= MLOOPUV_VERTSEL;
}
}
- /* BM_face_select_set(em->bm, efa, TRUE); */
+ /* BM_face_select_set(em->bm, efa, true); */
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
}
@@ -3781,7 +3781,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op))
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
luv->flag |= MLOOPUV_VERTSEL;
}
- /* BM_face_select_set(em->bm, efa, TRUE); */
+ /* BM_face_select_set(em->bm, efa, true); */
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
}
@@ -3796,7 +3796,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op))
luv->flag |= MLOOPUV_VERTSEL;
}
}
- /* BM_face_select_set(em->bm, efa, TRUE); */
+ /* BM_face_select_set(em->bm, efa, true); */
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
}
@@ -4095,7 +4095,7 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *UNUSED(op))
me->drawflag |= ME_DRAWSEAMS;
if (scene->toolsettings->edge_mode_live_unwrap)
- ED_unwrap_lscm(scene, ob, FALSE);
+ ED_unwrap_lscm(scene, ob, false);
DAG_id_tag_update(&me->id, 0);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
@@ -4182,30 +4182,30 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "UV_OT_mark_seam", EKEY, KM_PRESS, KM_CTRL, 0);
/* pick selection */
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", FALSE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "extend", FALSE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "extend", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", false);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "extend", false);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "extend", true);
WM_keymap_add_item(keymap, "UV_OT_select_split", YKEY, KM_PRESS, 0, 0);
/* border/circle selection */
kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "pinned", FALSE);
+ RNA_boolean_set(kmi->ptr, "pinned", false);
kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "pinned", TRUE);
+ RNA_boolean_set(kmi->ptr, "pinned", true);
WM_keymap_add_item(keymap, "UV_OT_circle_select", CKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "deselect", TRUE);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
/* selection manipulation */
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", FALSE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", FALSE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "extend", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", false);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", false);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "extend", true);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true);
/* select more/less */
WM_keymap_add_item(keymap, "UV_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
@@ -4223,9 +4223,9 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
/* uv operations */
WM_keymap_add_item(keymap, "UV_OT_stitch", VKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "clear", FALSE);
+ RNA_boolean_set(kmi->ptr, "clear", false);
kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "clear", TRUE);
+ RNA_boolean_set(kmi->ptr, "clear", true);
/* unwrap */
WM_keymap_add_item(keymap, "UV_OT_unwrap", EKEY, KM_PRESS, 0, 0);
@@ -4235,9 +4235,9 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
/* hide */
kmi = WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+ RNA_boolean_set(kmi->ptr, "unselected", false);
kmi = WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+ RNA_boolean_set(kmi->ptr, "unselected", true);
WM_keymap_add_item(keymap, "UV_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
@@ -4250,7 +4250,7 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "IMAGE_MT_uvs_select_mode", TABKEY, KM_PRESS, KM_CTRL, 0);
ED_keymap_proportional_cycle(keyconf, keymap);
- ED_keymap_proportional_editmode(keyconf, keymap, FALSE);
+ ED_keymap_proportional_editmode(keyconf, keymap, false);
transform_keymap_for_space(keyconf, keymap, SPACE_IMAGE);
}
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 7150d74c32c..64de56206c2 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -4148,7 +4148,7 @@ ParamHandle *param_construct_begin(void)
handle->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "param construct arena");
handle->aspx = 1.0f;
handle->aspy = 1.0f;
- handle->do_aspect = FALSE;
+ handle->do_aspect = false;
handle->hash_verts = phash_new((PHashLink **)&handle->construction_chart->verts, 1);
handle->hash_edges = phash_new((PHashLink **)&handle->construction_chart->edges, 1);
@@ -4163,7 +4163,7 @@ void param_aspect_ratio(ParamHandle *handle, float aspx, float aspy)
phandle->aspx = aspx;
phandle->aspy = aspy;
- phandle->do_aspect = TRUE;
+ phandle->do_aspect = true;
}
void param_delete(ParamHandle *handle)
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index d8a66979565..630b601b69d 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1257,7 +1257,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
UvEdge *edge = state->edges + i;
if ((edge->flag & STITCH_BOUNDARY) && (state->uvs[edge->uv1]->flag & STITCH_STITCHABLE) && (state->uvs[edge->uv2]->flag & STITCH_STITCHABLE)) {
stitch_island_calculate_edge_rotation(edge, state, final_position, uvfinal_map, island_stitch_data);
- island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = TRUE;
+ island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = true;
}
}
@@ -1305,7 +1305,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
if (edge->flag & STITCH_STITCHABLE) {
stitch_island_calculate_edge_rotation(edge, state, final_position, NULL, island_stitch_data);
- island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = TRUE;
+ island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = true;
}
}
@@ -1456,7 +1456,7 @@ static void stitch_switch_selection_mode(StitchState *state)
UvElement *element2 = state->uvs[edge->uv2];
if ((element1->flag & STITCH_SELECTED) && (element2->flag & STITCH_SELECTED))
- stitch_select_edge(edge, state, TRUE);
+ stitch_select_edge(edge, state, true);
}
/* unselect selected uvelements */
@@ -1477,8 +1477,8 @@ static void stitch_switch_selection_mode(StitchState *state)
UvElement *element1 = state->uvs[edge->uv1];
UvElement *element2 = state->uvs[edge->uv2];
- stitch_select_uv(element1, state, TRUE);
- stitch_select_uv(element2, state, TRUE);
+ stitch_select_uv(element1, state, true);
+ stitch_select_uv(element2, state, true);
edge->flag &= ~STITCH_SELECTED;
}
@@ -1857,7 +1857,7 @@ static int stitch_init(bContext *C, wmOperator *op)
edge = BLI_ghash_lookup(edge_hash, &tmp_edge);
- stitch_select_edge(edge, state, TRUE);
+ stitch_select_edge(edge, state, true);
}
RNA_END;
}
@@ -1897,7 +1897,7 @@ static int stitch_init(bContext *C, wmOperator *op)
if (uvedit_edge_select_test(scene, l, cd_loop_uv_offset)) {
UvEdge *edge = uv_edge_get(l, state);
if (edge) {
- stitch_select_edge(edge, state, TRUE);
+ stitch_select_edge(edge, state, true);
}
}
}
@@ -1921,7 +1921,7 @@ static int stitch_init(bContext *C, wmOperator *op)
}
}
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
state_delete(state);
return 0;
@@ -2043,7 +2043,7 @@ static void stitch_select(bContext *C, Scene *scene, const wmEvent *event, Stitc
/* This works due to setting of tmp in find nearest uv vert */
UvElement *element = BM_uv_element_get(state->element_map, hit.efa, hit.l);
- stitch_select_uv(element, state, FALSE);
+ stitch_select_uv(element, state, false);
}
}
@@ -2052,7 +2052,7 @@ static void stitch_select(bContext *C, Scene *scene, const wmEvent *event, Stitc
if (hit.efa) {
UvEdge *edge = uv_edge_get(hit.l, state);
- stitch_select_edge(edge, state, FALSE);
+ stitch_select_edge(edge, state, false);
}
}
}
@@ -2078,7 +2078,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (event->val == KM_PRESS) {
stitch_select(C, scene, event, state);
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2088,7 +2088,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
case PADENTER:
case RETKEY:
if (event->val == KM_PRESS) {
- if (stitch_process_data(state, scene, TRUE)) {
+ if (stitch_process_data(state, scene, true)) {
stitch_exit(C, op, 1);
return OPERATOR_FINISHED;
}
@@ -2105,7 +2105,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
case WHEELUPMOUSE:
if (event->val == KM_PRESS && event->alt) {
state->limit_dist += 0.01f;
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2120,7 +2120,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (event->val == KM_PRESS && event->alt) {
state->limit_dist -= 0.01f;
state->limit_dist = MAX2(0.01f, state->limit_dist);
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2134,7 +2134,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
case LKEY:
if (event->val == KM_PRESS) {
state->use_limit = !state->use_limit;
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2147,7 +2147,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
state->static_island++;
state->static_island %= state->element_map->totalIslands;
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2158,7 +2158,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
case MKEY:
if (event->val == KM_PRESS) {
state->midpoints = !state->midpoints;
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2174,7 +2174,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (event->val == KM_PRESS && !(U.flag & USER_LMOUSESELECT)) {
stitch_select(C, scene, event, state);
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2186,7 +2186,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
case SKEY:
if (event->val == KM_PRESS) {
state->snap_islands = !state->snap_islands;
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
@@ -2201,7 +2201,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (event->val == KM_PRESS) {
stitch_switch_selection_mode(state);
- if (!stitch_process_data(state, scene, FALSE)) {
+ if (!stitch_process_data(state, scene, false)) {
stitch_cancel(C, op);
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 75b124803ab..7f43ca01f4a 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -91,9 +91,9 @@ static void modifier_unwrap_state(Object *obedit, Scene *scene, bool *r_use_subs
/* subsurf will take the modifier settings only if modifier is first or right after mirror */
if (subsurf) {
if (md && md->type == eModifierType_Subsurf)
- subsurf = TRUE;
+ subsurf = true;
else
- subsurf = FALSE;
+ subsurf = false;
}
*r_use_subsurf = subsurf;
@@ -195,8 +195,8 @@ static bool uvedit_have_selection(Scene *scene, BMEditMesh *em, bool implicit)
void uvedit_get_aspect(Scene *scene, Object *ob, BMEditMesh *em, float *aspx, float *aspy)
{
- int sloppy = TRUE;
- int selected = FALSE;
+ bool sloppy = true;
+ bool selected = false;
BMFace *efa;
Image *ima;
@@ -808,9 +808,9 @@ void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit)
}
if (use_subsurf)
- liveHandle = construct_param_handle_subsurfed(scene, obedit, em, fillholes, FALSE, TRUE);
+ liveHandle = construct_param_handle_subsurfed(scene, obedit, em, fillholes, false, true);
else
- liveHandle = construct_param_handle(scene, obedit, em, FALSE, fillholes, FALSE, TRUE);
+ liveHandle = construct_param_handle(scene, obedit, em, false, fillholes, false, true);
param_lscm_begin(liveHandle, PARAM_TRUE, abf);
}
@@ -841,7 +841,7 @@ void ED_uvedit_live_unwrap(Scene *scene, Object *obedit)
if (scene->toolsettings->edge_mode_live_unwrap &&
CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV))
{
- ED_unwrap_lscm(scene, obedit, FALSE); /* unwrap all not just sel */
+ ED_unwrap_lscm(scene, obedit, false); /* unwrap all not just sel */
}
}
@@ -1139,7 +1139,7 @@ void ED_unwrap_lscm(Scene *scene, Object *obedit, const short sel)
if (use_subsurf)
handle = construct_param_handle_subsurfed(scene, obedit, em, fill_holes, sel, correct_aspect);
else
- handle = construct_param_handle(scene, obedit, em, FALSE, fill_holes, sel, correct_aspect);
+ handle = construct_param_handle(scene, obedit, em, false, fill_holes, sel, correct_aspect);
param_lscm_begin(handle, PARAM_FALSE, scene->toolsettings->unwrapper == 0);
param_lscm_solve(handle);
@@ -1211,7 +1211,7 @@ static int unwrap_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_INFO, "Subsurf modifier needs to be first to work with unwrap");
/* execute unwrap */
- ED_unwrap_lscm(scene, obedit, TRUE);
+ ED_unwrap_lscm(scene, obedit, true);
DAG_id_tag_update(obedit->data, 0);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);